@4alldigital/foundation-ui--gamma 1.76.2 → 1.76.3

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.
@@ -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, isCentered, carouselOptions, customRender, }: Props): import("react/jsx-runtime").JSX.Element;
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,2 @@
1
+ export { ShadcnButton, buttonVariants } from './ShadcnButton';
2
+ export type { ShadcnButtonProps } from './ShadcnButton';
@@ -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.2",
3
+ "version": "1.76.3",
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": "4a58458e44352c10794675d27f0c0bcdb549e80c",
42
+ "gitHead": "7034221f4ce2adada6369e1cf66b06a02e3bc383",
43
43
  "dependencies": {
44
44
  "@elastic/datemath": "^5.0.3",
45
45
  "@elastic/react-search-ui": "^1.24.2",