@4alldigital/foundation-ui--gamma 1.76.2 → 1.76.4
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/foundation-ui.css +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/lib/src/components/Carousel/Carousel.d.ts +32 -1
- package/dist/types/lib/src/components/Carousel/Carousel.types.d.ts +9 -9
- package/dist/types/lib/src/components/ShadcnButton/ShadcnButton.d.ts +11 -0
- package/dist/types/lib/src/components/ShadcnButton/index.d.ts +2 -0
- package/dist/types/lib/src/components/ShadcnCarousel/ShadcnCarousel.d.ts +27 -0
- package/dist/types/lib/src/components/ShadcnCarousel/index.d.ts +1 -0
- package/dist/types/lib/src/utils/index.d.ts +2 -0
- package/package.json +2 -6
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
import { Props } from './Carousel.types';
|
|
2
|
+
/**
|
|
3
|
+
* Carousel component using Embla Carousel (shadcn)
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // New API (recommended)
|
|
7
|
+
* <Carousel
|
|
8
|
+
* data={items}
|
|
9
|
+
* carouselOptions={{
|
|
10
|
+
* slidesPerView: {
|
|
11
|
+
* base: 1, // Mobile
|
|
12
|
+
* md: 2, // Tablet
|
|
13
|
+
* lg: 4, // Desktop
|
|
14
|
+
* },
|
|
15
|
+
* loop: true,
|
|
16
|
+
* showArrows: true,
|
|
17
|
+
* }}
|
|
18
|
+
* />
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Legacy API (still supported)
|
|
22
|
+
* <Carousel
|
|
23
|
+
* data={items}
|
|
24
|
+
* carouselOptions={{
|
|
25
|
+
* slidesToShow: 4,
|
|
26
|
+
* responsive: [
|
|
27
|
+
* { breakpoint: 1024, settings: { slidesToShow: 3 } },
|
|
28
|
+
* { breakpoint: 600, settings: { slidesToShow: 1 } },
|
|
29
|
+
* ]
|
|
30
|
+
* }}
|
|
31
|
+
* />
|
|
32
|
+
*/
|
|
2
33
|
declare const Carousel: {
|
|
3
|
-
({ testID, data, onPressCallback,
|
|
34
|
+
({ testID, data, onPressCallback, carouselOptions, customRender, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
4
35
|
displayName: string;
|
|
5
36
|
};
|
|
6
37
|
export default Carousel;
|
|
@@ -7,23 +7,23 @@ export interface Props {
|
|
|
7
7
|
isCentered?: boolean;
|
|
8
8
|
carouselOptions?: {
|
|
9
9
|
loop?: boolean;
|
|
10
|
-
slidesToShow?: number;
|
|
11
10
|
vertical?: boolean;
|
|
12
|
-
autoPlay?: boolean;
|
|
13
|
-
scrollAnimationDuration?: number;
|
|
14
|
-
onSnapToItem?: (index?: number) => void;
|
|
15
|
-
shouldScrollOnClick?: boolean;
|
|
16
|
-
showDots?: boolean;
|
|
17
11
|
showArrows?: boolean;
|
|
12
|
+
slidesPerView?: {
|
|
13
|
+
base?: number;
|
|
14
|
+
sm?: number;
|
|
15
|
+
md?: number;
|
|
16
|
+
lg?: number;
|
|
17
|
+
xl?: number;
|
|
18
|
+
'2xl'?: number;
|
|
19
|
+
};
|
|
20
|
+
slidesToShow?: number;
|
|
18
21
|
responsive?: {
|
|
19
22
|
breakpoint: number;
|
|
20
23
|
settings: {
|
|
21
24
|
slidesToShow: number;
|
|
22
25
|
};
|
|
23
26
|
}[];
|
|
24
|
-
easing?: string;
|
|
25
|
-
rtl?: boolean;
|
|
26
|
-
autoplaySpeed?: number;
|
|
27
27
|
};
|
|
28
28
|
customRender?: (item: any, index: number) => ReactElement;
|
|
29
29
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "secondary" | "outline" | "default" | "destructive" | "ghost" | null | undefined;
|
|
5
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ShadcnButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const ShadcnButton: React.ForwardRefExoticComponent<ShadcnButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { ShadcnButton, buttonVariants };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
|
|
3
|
+
type CarouselApi = UseEmblaCarouselType[1];
|
|
4
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
5
|
+
type CarouselOptions = UseCarouselParameters[0];
|
|
6
|
+
type CarouselPlugin = UseCarouselParameters[1];
|
|
7
|
+
type CarouselProps = {
|
|
8
|
+
opts?: CarouselOptions;
|
|
9
|
+
plugins?: CarouselPlugin;
|
|
10
|
+
orientation?: "horizontal" | "vertical";
|
|
11
|
+
setApi?: (api: CarouselApi) => void;
|
|
12
|
+
};
|
|
13
|
+
type CarouselContextProps = {
|
|
14
|
+
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
15
|
+
api: ReturnType<typeof useEmblaCarousel>[1];
|
|
16
|
+
scrollPrev: () => void;
|
|
17
|
+
scrollNext: () => void;
|
|
18
|
+
canScrollPrev: boolean;
|
|
19
|
+
canScrollNext: boolean;
|
|
20
|
+
} & CarouselProps;
|
|
21
|
+
declare function useCarousel(): CarouselContextProps;
|
|
22
|
+
declare const ShadcnCarousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const ShadcnCarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const ShadcnCarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const ShadcnCarouselPrevious: React.ForwardRefExoticComponent<Omit<import("../ShadcnButton").ShadcnButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
26
|
+
declare const ShadcnCarouselNext: React.ForwardRefExoticComponent<Omit<import("../ShadcnButton").ShadcnButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
export { type CarouselApi, ShadcnCarousel, ShadcnCarouselContent, ShadcnCarouselItem, ShadcnCarouselPrevious, ShadcnCarouselNext, useCarousel, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type CarouselApi, ShadcnCarousel, ShadcnCarouselContent, ShadcnCarouselItem, ShadcnCarouselPrevious, ShadcnCarouselNext, useCarousel, } from './ShadcnCarousel';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type ClassValue } from 'clsx';
|
|
1
2
|
export * from './parseDuration';
|
|
3
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
2
4
|
export declare function truncateString(str: string, maxLen?: number): string;
|
|
3
5
|
export declare function formatDuration(duration: string): string;
|
|
4
6
|
export declare function getRandomImageFromArray(images?: string[]): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4alldigital/foundation-ui--gamma",
|
|
3
|
-
"version": "1.76.
|
|
3
|
+
"version": "1.76.4",
|
|
4
4
|
"description": "Foundation UI Component library with GAMMA theme. ",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "f9e231546af9eddfbc42f2b5fdb3c46658a42d9b",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@elastic/datemath": "^5.0.3",
|
|
45
45
|
"@elastic/react-search-ui": "^1.24.2",
|
|
@@ -78,10 +78,8 @@
|
|
|
78
78
|
"react-otp-input": "^3.1.1",
|
|
79
79
|
"react-player": "^2.16.1",
|
|
80
80
|
"react-share": "^5.2.2",
|
|
81
|
-
"react-slick": "^0.31.0",
|
|
82
81
|
"react-tabs": "^6.1.0",
|
|
83
82
|
"react-toastify": "^11.0.5",
|
|
84
|
-
"slick-carousel": "^1.8.1",
|
|
85
83
|
"tailwind-merge": "^3.4.0",
|
|
86
84
|
"tailwindcss": "^4.1.17",
|
|
87
85
|
"typescript": "^5.9.3",
|
|
@@ -96,8 +94,6 @@
|
|
|
96
94
|
"@types/jquery": "^3.5.33",
|
|
97
95
|
"@types/react": "19.2.2",
|
|
98
96
|
"@types/react-modal": "^3.16.3",
|
|
99
|
-
"@types/react-slick": "^0.23.13",
|
|
100
|
-
"@types/slick-carousel": "^1.6.40",
|
|
101
97
|
"jquery": "^3.7.1",
|
|
102
98
|
"moment": "^2.30.1",
|
|
103
99
|
"tsc-alias": "^1.8.16"
|