@atom-learning/components 6.17.0-beta.1 → 6.17.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.
@@ -1,48 +1,41 @@
1
- import useEmblaCarousel from 'embla-carousel-react';
1
+ import { CarouselProvider } from 'pure-react-carousel';
2
2
  import * as React from 'react';
3
- type EmblaApi = ReturnType<typeof useEmblaCarousel>[1];
3
+ import { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper';
4
4
  type CarouselProps = {
5
- currentSlide?: number;
5
+ slideHeight: number;
6
+ slideWidth: number;
7
+ numSlides: number;
6
8
  };
7
9
  export declare const CarouselComponent: {
8
- ({ children, currentSlide, ...props }: React.PropsWithChildren<CarouselProps & React.HTMLAttributes<HTMLDivElement>>): React.JSX.Element;
10
+ ({ children, className, slideHeight, slideWidth, numSlides, ...props }: CarouselProps & Omit<React.ComponentProps<typeof CarouselProvider>, "naturalSlideWidth" | "naturalSlideHeight" | "totalSlides"> & React.ComponentProps<typeof CSSWrapper>): React.JSX.Element;
9
11
  displayName: string;
10
12
  };
11
- export declare const useCarousel: () => {
12
- currentSlide: number;
13
- emblaRef: React.RefCallback<HTMLDivElement>;
14
- emblaApi: EmblaApi;
15
- selectedIndex: number;
16
- scrollSnaps: number[];
17
- canScrollPrev: boolean;
18
- canScrollNext: boolean;
19
- scrollPrev: () => void;
20
- scrollNext: () => void;
21
- scrollTo: (index: number) => void;
22
- };
13
+ /**
14
+ * Documentation about the hook usage
15
+ * https://github.com/express-labs/pure-react-carousel#hooks-and-usecontext
16
+ */
17
+ export declare const useCarousel: () => import("pure-react-carousel").CarouselStoreInterface;
23
18
  export declare const Carousel: {
24
- ({ children, currentSlide, ...props }: React.PropsWithChildren<CarouselProps & React.HTMLAttributes<HTMLDivElement>>): React.JSX.Element;
19
+ ({ children, className, slideHeight, slideWidth, numSlides, ...props }: CarouselProps & Omit<React.ComponentProps<typeof CarouselProvider>, "naturalSlideWidth" | "naturalSlideHeight" | "totalSlides"> & React.ComponentProps<typeof CSSWrapper>): React.JSX.Element;
25
20
  displayName: string;
26
21
  } & {
27
- ArrowNext: (props: React.ComponentProps<React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
28
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
29
- }, never> & {
22
+ ArrowNext: (props: Omit<React.ComponentProps<React.ForwardRefExoticComponent<Omit<import("pure-react-carousel").ButtonNextProps & React.RefAttributes<React.Component<import("pure-react-carousel").ButtonNextProps, any, any>>, never> & {
23
+ as?: React.ElementType;
24
+ }>>, "children">) => React.JSX.Element;
25
+ ArrowPrevious: (props: Omit<React.ComponentProps<React.ForwardRefExoticComponent<Omit<import("pure-react-carousel").ButtonBackProps & React.RefAttributes<React.Component<import("pure-react-carousel").ButtonBackProps, any, any>>, never> & {
30
26
  as?: React.ElementType;
31
- }>>) => React.JSX.Element;
32
- ArrowPrevious: (props: React.ComponentProps<React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
33
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
34
- }, never> & {
27
+ }>>, "children">) => React.JSX.Element;
28
+ Pagination: React.ForwardRefExoticComponent<Omit<import("pure-react-carousel").DotGroupProps & React.RefAttributes<React.Component<import("pure-react-carousel").DotGroupProps, any, any>>, never> & {
35
29
  as?: React.ElementType;
36
- }>>) => React.JSX.Element;
37
- Pagination: ({ className, ...rest }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
38
- Slide: ({ children, className, index, ...rest }: React.PropsWithChildren<{
30
+ }>;
31
+ Slide: ({ children, ...remainingProps }: React.ComponentProps<React.ComponentClass<import("pure-react-carousel").SlideProps, any> | React.FunctionComponent<import("pure-react-carousel").SlideProps>> & {
32
+ className?: string;
39
33
  index: number;
40
- } & React.HTMLAttributes<HTMLDivElement>>) => React.JSX.Element;
41
- Slider: ({ children, className, overflow, tabIndex, ...rest }: {
42
- children?: React.ReactNode;
34
+ }) => React.JSX.Element;
35
+ Slider: ({ children, className, overflow, ...rest }: React.PropsWithChildren<(React.ComponentClass<import("pure-react-carousel").SliderProps, any> | React.FunctionComponent<import("pure-react-carousel").SliderProps>) & {
36
+ tabIndex?: number;
43
37
  className?: string;
44
38
  overflow?: boolean;
45
- tabIndex?: number;
46
- }) => React.JSX.Element;
39
+ }>) => React.JSX.Element;
47
40
  };
48
41
  export {};
@@ -1,92 +1,22 @@
1
- import { cn } from "../../styled.js";
1
+ import { CSSWrapper } from "../../utilities/css-wrapper/CSSWrapper.js";
2
2
  import { CarouselArrowNext, CarouselArrowPrevious } from "./CarouselArrows.js";
3
3
  import { CarouselPagination } from "./CarouselPagination.js";
4
4
  import { CarouselSlide } from "./CarouselSlide.js";
5
5
  import { CarouselSlider } from "./CarouselSlider.js";
6
6
  import * as React$1 from "react";
7
- import useEmblaCarousel from "embla-carousel-react";
7
+ import { CarouselContext, CarouselProvider } from "pure-react-carousel";
8
8
  //#region src/components/carousel/Carousel.tsx
9
- var CarouselContext = React$1.createContext(null);
10
- var CarouselComponent = ({ children, currentSlide = 0, ...props }) => {
11
- const [emblaRef, emblaApi] = useEmblaCarousel({
12
- startIndex: currentSlide,
13
- align: "center"
14
- });
15
- const [selectedIndex, setSelectedIndex] = React$1.useState(currentSlide);
16
- const [scrollSnaps, setScrollSnaps] = React$1.useState([]);
17
- const [canScrollPrev, setCanScrollPrev] = React$1.useState(false);
18
- const [canScrollNext, setCanScrollNext] = React$1.useState(false);
19
- const scrollPrev = React$1.useCallback(() => {
20
- emblaApi?.scrollPrev();
21
- }, [emblaApi]);
22
- const scrollNext = React$1.useCallback(() => {
23
- emblaApi?.scrollNext();
24
- }, [emblaApi]);
25
- const scrollTo = React$1.useCallback((index) => {
26
- emblaApi?.scrollTo(index);
27
- }, [emblaApi]);
28
- const onSelect = React$1.useCallback(() => {
29
- if (!emblaApi) return;
30
- setSelectedIndex(emblaApi.selectedScrollSnap());
31
- setCanScrollPrev(emblaApi.canScrollPrev());
32
- setCanScrollNext(emblaApi.canScrollNext());
33
- }, [emblaApi]);
34
- const onInit = React$1.useCallback(() => {
35
- if (!emblaApi) return;
36
- setScrollSnaps(emblaApi.scrollSnapList());
37
- }, [emblaApi]);
38
- React$1.useEffect(() => {
39
- if (!emblaApi) return;
40
- onInit();
41
- onSelect();
42
- emblaApi.on("reInit", onInit);
43
- emblaApi.on("reInit", onSelect);
44
- emblaApi.on("select", onSelect);
45
- return () => {
46
- emblaApi.off("reInit", onInit);
47
- emblaApi.off("reInit", onSelect);
48
- emblaApi.off("select", onSelect);
49
- };
50
- }, [
51
- emblaApi,
52
- onInit,
53
- onSelect
54
- ]);
55
- const contextValue = React$1.useMemo(() => ({
56
- emblaRef,
57
- emblaApi,
58
- selectedIndex,
59
- scrollSnaps,
60
- canScrollPrev,
61
- canScrollNext,
62
- scrollPrev,
63
- scrollNext,
64
- scrollTo
65
- }), [
66
- emblaRef,
67
- emblaApi,
68
- selectedIndex,
69
- scrollSnaps,
70
- canScrollPrev,
71
- canScrollNext,
72
- scrollPrev,
73
- scrollNext,
74
- scrollTo
75
- ]);
76
- const { className, ...rest } = props;
77
- return /* @__PURE__ */ React$1.createElement("div", {
78
- className: cn("relative", "w-full", className),
79
- ...rest
80
- }, /* @__PURE__ */ React$1.createElement(CarouselContext.Provider, { value: contextValue }, children));
81
- };
82
- var useCarousel = () => {
83
- const context = React$1.useContext(CarouselContext);
84
- if (!context) throw new Error("useCarousel must be used within a Carousel");
85
- return {
86
- ...context,
87
- currentSlide: context.selectedIndex
88
- };
89
- };
9
+ var CarouselComponent = ({ children, className, slideHeight, slideWidth, numSlides, ...props }) => /* @__PURE__ */ React$1.createElement(CSSWrapper, { className }, /* @__PURE__ */ React$1.createElement(CarouselProvider, {
10
+ naturalSlideWidth: slideWidth,
11
+ naturalSlideHeight: slideHeight,
12
+ totalSlides: numSlides,
13
+ ...props
14
+ }, children));
15
+ /**
16
+ * Documentation about the hook usage
17
+ * https://github.com/express-labs/pure-react-carousel#hooks-and-usecontext
18
+ */
19
+ var useCarousel = () => React$1.useContext(CarouselContext);
90
20
  var Carousel = Object.assign(CarouselComponent, {
91
21
  ArrowNext: CarouselArrowNext,
92
22
  ArrowPrevious: CarouselArrowPrevious,
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.js","names":[],"sources":["../../../src/components/carousel/Carousel.tsx"],"sourcesContent":["import useEmblaCarousel from 'embla-carousel-react'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { CarouselArrowNext, CarouselArrowPrevious } from './CarouselArrows'\nimport { CarouselPagination } from './CarouselPagination'\nimport { CarouselSlide } from './CarouselSlide'\nimport { CarouselSlider } from './CarouselSlider'\n\ntype EmblaApi = ReturnType<typeof useEmblaCarousel>[1]\n\ntype CarouselContextValue = {\n emblaRef: React.RefCallback<HTMLDivElement>\n emblaApi: EmblaApi\n selectedIndex: number\n scrollSnaps: number[]\n canScrollPrev: boolean\n canScrollNext: boolean\n scrollPrev: () => void\n scrollNext: () => void\n scrollTo: (index: number) => void\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null)\n\ntype CarouselProps = {\n currentSlide?: number\n}\n\nexport const CarouselComponent = ({\n children,\n currentSlide = 0,\n ...props\n}: React.PropsWithChildren<\n CarouselProps & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const [emblaRef, emblaApi] = useEmblaCarousel({\n startIndex: currentSlide,\n align: 'center'\n })\n\n const [selectedIndex, setSelectedIndex] = React.useState(currentSlide)\n const [scrollSnaps, setScrollSnaps] = React.useState<number[]>([])\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const scrollPrev = React.useCallback(() => {\n emblaApi?.scrollPrev()\n }, [emblaApi])\n\n const scrollNext = React.useCallback(() => {\n emblaApi?.scrollNext()\n }, [emblaApi])\n\n const scrollTo = React.useCallback(\n (index: number) => {\n emblaApi?.scrollTo(index)\n },\n [emblaApi]\n )\n\n const onSelect = React.useCallback(() => {\n if (!emblaApi) return\n setSelectedIndex(emblaApi.selectedScrollSnap())\n setCanScrollPrev(emblaApi.canScrollPrev())\n setCanScrollNext(emblaApi.canScrollNext())\n }, [emblaApi])\n\n const onInit = React.useCallback(() => {\n if (!emblaApi) return\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [emblaApi])\n\n React.useEffect(() => {\n if (!emblaApi) return\n\n onInit()\n onSelect()\n\n emblaApi.on('reInit', onInit)\n emblaApi.on('reInit', onSelect)\n emblaApi.on('select', onSelect)\n\n return () => {\n emblaApi.off('reInit', onInit)\n emblaApi.off('reInit', onSelect)\n emblaApi.off('select', onSelect)\n }\n }, [emblaApi, onInit, onSelect])\n\n const contextValue = React.useMemo<CarouselContextValue>(\n () => ({\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n }),\n [\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n ]\n )\n\n const { className, ...rest } = props\n\n return (\n <div className={cn('relative', 'w-full', className)} {...rest}>\n <CarouselContext.Provider value={contextValue}>\n {children}\n </CarouselContext.Provider>\n </div>\n )\n}\n\nexport const useCarousel = () => {\n const context = React.useContext(CarouselContext)\n if (!context) {\n throw new Error('useCarousel must be used within a Carousel')\n }\n\n return {\n ...context,\n // Alias for backward compatibility\n currentSlide: context.selectedIndex\n }\n}\n\nexport const Carousel = Object.assign(CarouselComponent, {\n ArrowNext: CarouselArrowNext,\n ArrowPrevious: CarouselArrowPrevious,\n Pagination: CarouselPagination,\n Slide: CarouselSlide,\n Slider: CarouselSlider\n})\n\nCarouselComponent.displayName = 'Carousel'\n"],"mappings":";;;;;;;;AAwBA,IAAM,kBAAkB,QAAM,cAA2C,KAAK;AAM9E,IAAa,qBAAqB,EAChC,UACA,eAAe,GACf,GAAG,YAGC;CACJ,MAAM,CAAC,UAAU,YAAY,iBAAiB;EAC5C,YAAY;EACZ,OAAO;EACR,CAAC;CAEF,MAAM,CAAC,eAAe,oBAAoB,QAAM,SAAS,aAAa;CACtE,MAAM,CAAC,aAAa,kBAAkB,QAAM,SAAmB,EAAE,CAAC;CAClE,MAAM,CAAC,eAAe,oBAAoB,QAAM,SAAS,MAAM;CAC/D,MAAM,CAAC,eAAe,oBAAoB,QAAM,SAAS,MAAM;CAE/D,MAAM,aAAa,QAAM,kBAAkB;AACzC,YAAU,YAAY;IACrB,CAAC,SAAS,CAAC;CAEd,MAAM,aAAa,QAAM,kBAAkB;AACzC,YAAU,YAAY;IACrB,CAAC,SAAS,CAAC;CAEd,MAAM,WAAW,QAAM,aACpB,UAAkB;AACjB,YAAU,SAAS,MAAM;IAE3B,CAAC,SAAS,CACX;CAED,MAAM,WAAW,QAAM,kBAAkB;AACvC,MAAI,CAAC,SAAU;AACf,mBAAiB,SAAS,oBAAoB,CAAC;AAC/C,mBAAiB,SAAS,eAAe,CAAC;AAC1C,mBAAiB,SAAS,eAAe,CAAC;IACzC,CAAC,SAAS,CAAC;CAEd,MAAM,SAAS,QAAM,kBAAkB;AACrC,MAAI,CAAC,SAAU;AACf,iBAAe,SAAS,gBAAgB,CAAC;IACxC,CAAC,SAAS,CAAC;AAEd,SAAM,gBAAgB;AACpB,MAAI,CAAC,SAAU;AAEf,UAAQ;AACR,YAAU;AAEV,WAAS,GAAG,UAAU,OAAO;AAC7B,WAAS,GAAG,UAAU,SAAS;AAC/B,WAAS,GAAG,UAAU,SAAS;AAE/B,eAAa;AACX,YAAS,IAAI,UAAU,OAAO;AAC9B,YAAS,IAAI,UAAU,SAAS;AAChC,YAAS,IAAI,UAAU,SAAS;;IAEjC;EAAC;EAAU;EAAQ;EAAS,CAAC;CAEhC,MAAM,eAAe,QAAM,eAClB;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;CAED,MAAM,EAAE,WAAW,GAAG,SAAS;AAE/B,QACE,wBAAA,cAAC,OAAD;EAAK,WAAW,GAAG,YAAY,UAAU,UAAU;EAAE,GAAI;EAInD,EAHJ,wBAAA,cAAC,gBAAgB,UAAjB,EAA0B,OAAO,cAEN,EADxB,SACwB,CACvB;;AAIV,IAAa,oBAAoB;CAC/B,MAAM,UAAU,QAAM,WAAW,gBAAgB;AACjD,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,6CAA6C;AAG/D,QAAO;EACL,GAAG;EAEH,cAAc,QAAQ;EACvB;;AAGH,IAAa,WAAW,OAAO,OAAO,mBAAmB;CACvD,WAAW;CACX,eAAe;CACf,YAAY;CACZ,OAAO;CACP,QAAQ;CACT,CAAC;AAEF,kBAAkB,cAAc"}
1
+ {"version":3,"file":"Carousel.js","names":[],"sources":["../../../src/components/carousel/Carousel.tsx"],"sourcesContent":["import { CarouselContext, CarouselProvider } from 'pure-react-carousel'\nimport * as React from 'react'\n\nimport { CSSWrapper } from '~/utilities/css-wrapper/CSSWrapper'\n\nimport { CarouselArrowNext, CarouselArrowPrevious } from './CarouselArrows'\nimport { CarouselPagination } from './CarouselPagination'\nimport { CarouselSlide } from './CarouselSlide'\nimport { CarouselSlider } from './CarouselSlider'\n\ntype CarouselProps = {\n slideHeight: number\n slideWidth: number\n numSlides: number\n}\n\nexport const CarouselComponent = ({\n children,\n className,\n slideHeight,\n slideWidth,\n numSlides,\n ...props\n}: CarouselProps &\n Omit<\n React.ComponentProps<typeof CarouselProvider>,\n 'naturalSlideWidth' | 'naturalSlideHeight' | 'totalSlides'\n > &\n React.ComponentProps<typeof CSSWrapper>) => (\n <CSSWrapper className={className}>\n <CarouselProvider\n naturalSlideWidth={slideWidth}\n naturalSlideHeight={slideHeight}\n totalSlides={numSlides}\n {...props}\n >\n {children}\n </CarouselProvider>\n </CSSWrapper>\n)\n\n/**\n * Documentation about the hook usage\n * https://github.com/express-labs/pure-react-carousel#hooks-and-usecontext\n */\nexport const useCarousel = () => React.useContext(CarouselContext)\n\nexport const Carousel = Object.assign(CarouselComponent, {\n ArrowNext: CarouselArrowNext,\n ArrowPrevious: CarouselArrowPrevious,\n Pagination: CarouselPagination,\n Slide: CarouselSlide,\n Slider: CarouselSlider\n})\n\nCarouselComponent.displayName = 'Carousel'\n"],"mappings":";;;;;;;;AAgBA,IAAa,qBAAqB,EAChC,UACA,WACA,aACA,YACA,WACA,GAAG,YAOH,wBAAA,cAAC,YAAD,EAAuB,WASV,EARX,wBAAA,cAAC,kBAAD;CACE,mBAAmB;CACnB,oBAAoB;CACpB,aAAa;CACb,GAAI;CAGa,EADhB,SACgB,CACR;;;;;AAOf,IAAa,oBAAoB,QAAM,WAAW,gBAAgB;AAElE,IAAa,WAAW,OAAO,OAAO,mBAAmB;CACvD,WAAW;CACX,eAAe;CACf,YAAY;CACZ,OAAO;CACP,QAAQ;CACT,CAAC;AAEF,kBAAkB,cAAc"}
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
- declare const ArrowButton: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
3
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
4
- }, never> & {
2
+ declare const StyledButtonBack: React.ForwardRefExoticComponent<Omit<import("pure-react-carousel").ButtonBackProps & React.RefAttributes<React.Component<import("pure-react-carousel").ButtonBackProps, any, any>>, never> & {
5
3
  as?: React.ElementType;
6
4
  }>;
7
- export declare const CarouselArrowPrevious: (props: React.ComponentProps<typeof ArrowButton>) => React.JSX.Element;
8
- export declare const CarouselArrowNext: (props: React.ComponentProps<typeof ArrowButton>) => React.JSX.Element;
5
+ declare const StyledButtonNext: React.ForwardRefExoticComponent<Omit<import("pure-react-carousel").ButtonNextProps & React.RefAttributes<React.Component<import("pure-react-carousel").ButtonNextProps, any, any>>, never> & {
6
+ as?: React.ElementType;
7
+ }>;
8
+ export declare const CarouselArrowPrevious: (props: Omit<React.ComponentProps<typeof StyledButtonBack>, "children">) => React.JSX.Element;
9
+ export declare const CarouselArrowNext: (props: Omit<React.ComponentProps<typeof StyledButtonNext>, "children">) => React.JSX.Element;
9
10
  export {};
@@ -1,11 +1,12 @@
1
1
  import { styled } from "../../styled.js";
2
2
  import { Icon } from "../icon/Icon.js";
3
- import { useCarousel } from "./Carousel.js";
4
3
  import * as React$1 from "react";
5
4
  import { ChevronLeft, ChevronRight } from "@atom-learning/icons";
5
+ import { ButtonBack, ButtonNext } from "pure-react-carousel";
6
6
  //#region src/components/carousel/CarouselArrows.tsx
7
- var ArrowButton = styled("button", { base: [
7
+ var buttonStyles = [
8
8
  "items-center",
9
+ "bg-[unset]",
9
10
  "text-primary-800",
10
11
  "cursor-pointer",
11
12
  "flex",
@@ -18,29 +19,12 @@ var ArrowButton = styled("button", { base: [
18
19
  "ease-in-out",
19
20
  "hover:text-primary-900",
20
21
  "active:text-primary-1000",
21
- "disabled:text-grey-200",
22
- "disabled:cursor-not-allowed"
23
- ] });
24
- var CarouselArrowPrevious = (props) => {
25
- const { scrollPrev, canScrollPrev } = useCarousel();
26
- return /* @__PURE__ */ React$1.createElement(ArrowButton, {
27
- type: "button",
28
- onClick: scrollPrev,
29
- disabled: !canScrollPrev,
30
- "aria-label": "Previous slide",
31
- ...props
32
- }, /* @__PURE__ */ React$1.createElement(Icon, { is: ChevronLeft }));
33
- };
34
- var CarouselArrowNext = (props) => {
35
- const { scrollNext, canScrollNext } = useCarousel();
36
- return /* @__PURE__ */ React$1.createElement(ArrowButton, {
37
- type: "button",
38
- onClick: scrollNext,
39
- disabled: !canScrollNext,
40
- "aria-label": "Next slide",
41
- ...props
42
- }, /* @__PURE__ */ React$1.createElement(Icon, { is: ChevronRight }));
43
- };
22
+ "disabled:text-grey-200"
23
+ ];
24
+ var StyledButtonBack = styled(ButtonBack, { base: buttonStyles });
25
+ var StyledButtonNext = styled(ButtonNext, { base: buttonStyles });
26
+ var CarouselArrowPrevious = (props) => /* @__PURE__ */ React$1.createElement(StyledButtonBack, props, /* @__PURE__ */ React$1.createElement(Icon, { is: ChevronLeft }));
27
+ var CarouselArrowNext = (props) => /* @__PURE__ */ React$1.createElement(StyledButtonNext, props, /* @__PURE__ */ React$1.createElement(Icon, { is: ChevronRight }));
44
28
  //#endregion
45
29
  export { CarouselArrowNext, CarouselArrowPrevious };
46
30
 
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselArrows.js","names":[],"sources":["../../../src/components/carousel/CarouselArrows.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\n\nimport { useCarousel } from './Carousel'\n\nconst ArrowButton = styled('button', {\n base: [\n 'items-center',\n 'text-primary-800',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'size-12',\n 'top-1/2',\n '-translate-y-1/2',\n 'transition-colors',\n 'duration-150',\n 'ease-in-out',\n 'hover:text-primary-900',\n 'active:text-primary-1000',\n 'disabled:text-grey-200',\n 'disabled:cursor-not-allowed'\n ]\n})\n\nexport const CarouselArrowPrevious = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollPrev}\n disabled={!canScrollPrev}\n aria-label=\"Previous slide\"\n {...props}\n >\n <Icon is={ChevronLeft} />\n </ArrowButton>\n )\n}\n\nexport const CarouselArrowNext = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollNext, canScrollNext } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollNext}\n disabled={!canScrollNext}\n aria-label=\"Next slide\"\n {...props}\n >\n <Icon is={ChevronRight} />\n </ArrowButton>\n )\n}\n"],"mappings":";;;;;;AAQA,IAAM,cAAc,OAAO,UAAU,EACnC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAa,yBACX,UACG;CACH,MAAM,EAAE,YAAY,kBAAkB,aAAa;AAEnD,QACE,wBAAA,cAAC,aAAD;EACE,MAAK;EACL,SAAS;EACT,UAAU,CAAC;EACX,cAAW;EACX,GAAI;EAGQ,EADZ,wBAAA,cAAC,MAAD,EAAM,IAAI,aAAe,CAAA,CACb;;AAIlB,IAAa,qBACX,UACG;CACH,MAAM,EAAE,YAAY,kBAAkB,aAAa;AAEnD,QACE,wBAAA,cAAC,aAAD;EACE,MAAK;EACL,SAAS;EACT,UAAU,CAAC;EACX,cAAW;EACX,GAAI;EAGQ,EADZ,wBAAA,cAAC,MAAD,EAAM,IAAI,cAAgB,CAAA,CACd"}
1
+ {"version":3,"file":"CarouselArrows.js","names":[],"sources":["../../../src/components/carousel/CarouselArrows.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport {\n ButtonBack as BaseButtonBack,\n ButtonNext as BaseButtonNext\n} from 'pure-react-carousel'\nimport * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\n\nconst buttonStyles = [\n 'items-center',\n 'bg-[unset]',\n 'text-primary-800',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'size-12',\n 'top-1/2',\n '-translate-y-1/2',\n 'transition-colors',\n 'duration-150',\n 'ease-in-out',\n 'hover:text-primary-900',\n 'active:text-primary-1000',\n 'disabled:text-grey-200'\n]\n\nconst StyledButtonBack = styled(BaseButtonBack, {\n base: buttonStyles\n})\n\nconst StyledButtonNext = styled(BaseButtonNext, {\n base: buttonStyles\n})\n\nexport const CarouselArrowPrevious = (\n props: Omit<React.ComponentProps<typeof StyledButtonBack>, 'children'>\n) => (\n <StyledButtonBack {...props}>\n <Icon is={ChevronLeft} />\n </StyledButtonBack>\n)\nexport const CarouselArrowNext = (\n props: Omit<React.ComponentProps<typeof StyledButtonNext>, 'children'>\n) => (\n <StyledButtonNext {...props}>\n <Icon is={ChevronRight} />\n </StyledButtonNext>\n)\n"],"mappings":";;;;;;AAUA,IAAM,eAAe;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,IAAM,mBAAmB,OAAO,YAAgB,EAC9C,MAAM,cACP,CAAC;AAEF,IAAM,mBAAmB,OAAO,YAAgB,EAC9C,MAAM,cACP,CAAC;AAEF,IAAa,yBACX,UAEA,wBAAA,cAAC,kBAAqB,OACpB,wBAAA,cAAC,MAAD,EAAM,IAAI,aAAe,CAAA,CACR;AAErB,IAAa,qBACX,UAEA,wBAAA,cAAC,kBAAqB,OACpB,wBAAA,cAAC,MAAD,EAAM,IAAI,cAAgB,CAAA,CACT"}
@@ -1,2 +1,3 @@
1
- import * as React from 'react';
2
- export declare const CarouselPagination: ({ className, ...rest }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
1
+ export declare const CarouselPagination: import("react").ForwardRefExoticComponent<Omit<import("pure-react-carousel").DotGroupProps & import("react").RefAttributes<import("react").Component<import("pure-react-carousel").DotGroupProps, any, any>>, never> & {
2
+ as?: import("react").ElementType;
3
+ }>;
@@ -1,36 +1,22 @@
1
- import { cn, styled } from "../../styled.js";
2
- import { useCarousel } from "./Carousel.js";
3
- import * as React$1 from "react";
1
+ import { styled } from "../../styled.js";
2
+ import { DotGroup } from "pure-react-carousel";
4
3
  //#region src/components/carousel/CarouselPagination.tsx
5
- var Dot = styled("button", { base: [
6
- "bg-grey-600",
7
- "cursor-pointer",
8
- "duration-100",
9
- "ease-in",
10
- "focus:bg-primary-900",
11
- "hover:bg-primary-900",
12
- "mx-1",
13
- "p-1",
14
- "rounded-full",
15
- "size-3",
16
- "transition-all",
17
- "disabled:bg-primary-800",
18
- "disabled:cursor-default"
4
+ var CarouselPagination = styled(DotGroup, { base: [
5
+ "justify-center",
6
+ "[&_button]:[[class*=selected]]:bg-primary-800",
7
+ "[&_button]:bg-grey-600",
8
+ "[&_button]:border-none",
9
+ "[&_button]:cursor-pointer",
10
+ "[&_button]:duration-100",
11
+ "[&_button]:ease-in",
12
+ "[&_button]:focus:bg-primary-900",
13
+ "[&_button]:hover:bg-primary-900",
14
+ "[&_button]:mx-1",
15
+ "[&_button]:p-1",
16
+ "[&_button]:rounded-[50%]",
17
+ "[&_button]:size-3",
18
+ "[&_button]:transition-all"
19
19
  ] });
20
- var CarouselPagination = ({ className, ...rest }) => {
21
- const { scrollSnaps, selectedIndex, scrollTo } = useCarousel();
22
- const dots = Array.from({ length: scrollSnaps.length }, (_, i) => i);
23
- return /* @__PURE__ */ React$1.createElement("div", {
24
- className: cn("flex", "justify-center", className),
25
- ...rest
26
- }, dots.map((index) => /* @__PURE__ */ React$1.createElement(Dot, {
27
- key: index,
28
- type: "button",
29
- onClick: () => scrollTo(index),
30
- disabled: index === selectedIndex,
31
- "aria-label": "slide dot"
32
- })));
33
- };
34
20
  //#endregion
35
21
  export { CarouselPagination };
36
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselPagination.js","names":[],"sources":["../../../src/components/carousel/CarouselPagination.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn, styled } from '~/styled'\n\nimport { useCarousel } from './Carousel'\n\nconst Dot = styled('button', {\n base: [\n 'bg-grey-600',\n 'cursor-pointer',\n 'duration-100',\n 'ease-in',\n 'focus:bg-primary-900',\n 'hover:bg-primary-900',\n 'mx-1',\n 'p-1',\n 'rounded-full',\n 'size-3',\n 'transition-all',\n 'disabled:bg-primary-800',\n 'disabled:cursor-default'\n ]\n})\n\nexport const CarouselPagination = ({\n className,\n ...rest\n}: React.HTMLAttributes<HTMLDivElement>) => {\n const { scrollSnaps, selectedIndex, scrollTo } = useCarousel()\n\n const dots = Array.from({ length: scrollSnaps.length }, (_, i) => i)\n\n return (\n <div className={cn('flex', 'justify-center', className)} {...rest}>\n {dots.map((index) => (\n <Dot\n key={index}\n type=\"button\"\n onClick={() => scrollTo(index)}\n disabled={index === selectedIndex}\n aria-label=\"slide dot\"\n />\n ))}\n </div>\n )\n}\n"],"mappings":";;;;AAMA,IAAM,MAAM,OAAO,UAAU,EAC3B,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAa,sBAAsB,EACjC,WACA,GAAG,WACuC;CAC1C,MAAM,EAAE,aAAa,eAAe,aAAa,aAAa;CAE9D,MAAM,OAAO,MAAM,KAAK,EAAE,QAAQ,YAAY,QAAQ,GAAG,GAAG,MAAM,EAAE;AAEpE,QACE,wBAAA,cAAC,OAAD;EAAK,WAAW,GAAG,QAAQ,kBAAkB,UAAU;EAAE,GAAI;EAUvD,EATH,KAAK,KAAK,UACT,wBAAA,cAAC,KAAD;EACE,KAAK;EACL,MAAK;EACL,eAAe,SAAS,MAAM;EAC9B,UAAU,UAAU;EACpB,cAAW;EACX,CAAA,CACF,CACE"}
1
+ {"version":3,"file":"CarouselPagination.js","names":[],"sources":["../../../src/components/carousel/CarouselPagination.tsx"],"sourcesContent":["import { DotGroup } from 'pure-react-carousel'\n\nimport { styled } from '~/styled'\n\nexport const CarouselPagination = styled(DotGroup, {\n base: [\n 'justify-center',\n '[&_button]:[[class*=selected]]:bg-primary-800',\n '[&_button]:bg-grey-600',\n '[&_button]:border-none',\n '[&_button]:cursor-pointer',\n '[&_button]:duration-100',\n '[&_button]:ease-in',\n '[&_button]:focus:bg-primary-900',\n '[&_button]:hover:bg-primary-900',\n '[&_button]:mx-1',\n '[&_button]:p-1',\n '[&_button]:rounded-[50%]',\n '[&_button]:size-3',\n '[&_button]:transition-all'\n ]\n})\n"],"mappings":";;;AAIA,IAAa,qBAAqB,OAAO,UAAU,EACjD,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC"}
@@ -1,4 +1,6 @@
1
+ import { Slide as BaseSlide } from 'pure-react-carousel';
1
2
  import * as React from 'react';
2
- export declare const CarouselSlide: ({ children, className, index, ...rest }: React.PropsWithChildren<{
3
+ export declare const CarouselSlide: ({ children, ...remainingProps }: React.ComponentProps<typeof BaseSlide> & {
4
+ className?: string;
3
5
  index: number;
4
- } & React.HTMLAttributes<HTMLDivElement>>) => React.JSX.Element;
6
+ }) => React.JSX.Element;
@@ -1,17 +1,10 @@
1
- import { cn } from "../../styled.js";
2
- import { useCarousel } from "./Carousel.js";
3
1
  import * as React$1 from "react";
2
+ import { Slide } from "pure-react-carousel";
4
3
  //#region src/components/carousel/CarouselSlide.tsx
5
- var CarouselSlide = ({ children, className, index, ...rest }) => {
6
- const { selectedIndex } = useCarousel();
7
- const isSelected = selectedIndex === index;
8
- return /* @__PURE__ */ React$1.createElement("div", {
9
- role: "option",
10
- "aria-selected": isSelected,
11
- className: cn("basis-full", "shrink-0", className),
12
- ...rest
13
- }, /* @__PURE__ */ React$1.createElement("div", { className: "flex items-center justify-center px-3" }, children));
14
- };
4
+ var CarouselSlide = ({ children, ...remainingProps }) => /* @__PURE__ */ React$1.createElement(Slide, {
5
+ ...remainingProps,
6
+ tag: "div"
7
+ }, /* @__PURE__ */ React$1.createElement("div", { className: "px-3" }, children));
15
8
  //#endregion
16
9
  export { CarouselSlide };
17
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselSlide.js","names":[],"sources":["../../../src/components/carousel/CarouselSlide.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { useCarousel } from './Carousel'\n\nexport const CarouselSlide = ({\n children,\n className,\n index,\n ...rest\n}: React.PropsWithChildren<\n { index: number } & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const { selectedIndex } = useCarousel()\n const isSelected = selectedIndex === index\n\n return (\n <div\n role=\"option\"\n aria-selected={isSelected}\n className={cn('basis-full', 'shrink-0', className)}\n {...rest}\n >\n {/* padding to create the gap between slides */}\n <div className=\"flex items-center justify-center px-3\">{children}</div>\n </div>\n )\n}\n"],"mappings":";;;;AAMA,IAAa,iBAAiB,EAC5B,UACA,WACA,OACA,GAAG,WAGC;CACJ,MAAM,EAAE,kBAAkB,aAAa;CACvC,MAAM,aAAa,kBAAkB;AAErC,QACE,wBAAA,cAAC,OAAD;EACE,MAAK;EACL,iBAAe;EACf,WAAW,GAAG,cAAc,YAAY,UAAU;EAClD,GAAI;EAIA,EADJ,wBAAA,cAAC,OAAD,EAAK,WAAU,yCAAwD,EAAf,SAAe,CACnE"}
1
+ {"version":3,"file":"CarouselSlide.js","names":[],"sources":["../../../src/components/carousel/CarouselSlide.tsx"],"sourcesContent":["import { Slide as BaseSlide } from 'pure-react-carousel'\nimport * as React from 'react'\n\nexport const CarouselSlide = ({\n children,\n ...remainingProps\n}: React.ComponentProps<typeof BaseSlide> & {\n className?: string\n index: number\n}) => (\n <BaseSlide {...remainingProps} tag=\"div\">\n {/* padding to create the gap between slides */}\n <div className=\"px-3\">{children}</div>\n </BaseSlide>\n)\n"],"mappings":";;;AAGA,IAAa,iBAAiB,EAC5B,UACA,GAAG,qBAKH,wBAAA,cAAC,OAAD;CAAW,GAAI;CAAgB,KAAI;CAGvB,EADV,wBAAA,cAAC,OAAD,EAAK,WAAU,QAAuB,EAAf,SAAe,CAC5B"}
@@ -1,9 +1,7 @@
1
+ import { Slider as BaseSlider } from 'pure-react-carousel';
1
2
  import * as React from 'react';
2
- type CarouselSliderProps = {
3
- children?: React.ReactNode;
3
+ export declare const CarouselSlider: ({ children, className, overflow, ...rest }: React.PropsWithChildren<typeof BaseSlider & {
4
+ tabIndex?: number;
4
5
  className?: string;
5
6
  overflow?: boolean;
6
- tabIndex?: number;
7
- };
8
- export declare const CarouselSlider: ({ children, className, overflow, tabIndex, ...rest }: CarouselSliderProps) => React.JSX.Element;
9
- export {};
7
+ }>) => React.JSX.Element;
@@ -1,18 +1,11 @@
1
1
  import { cn } from "../../styled.js";
2
- import { useCarousel } from "./Carousel.js";
3
2
  import * as React$1 from "react";
3
+ import { Slider } from "pure-react-carousel";
4
4
  //#region src/components/carousel/CarouselSlider.tsx
5
- var CarouselSlider = ({ children, className, overflow, tabIndex = 0, ...rest }) => {
6
- const { emblaRef } = useCarousel();
7
- return /* @__PURE__ */ React$1.createElement("div", {
8
- ref: emblaRef,
9
- className: cn("ml-[50%]", "-translate-x-1/2", "cursor-grab", overflow ? "overflow-visible" : "overflow-hidden", className),
10
- role: "listbox",
11
- "aria-live": "polite",
12
- tabIndex,
13
- ...rest
14
- }, /* @__PURE__ */ React$1.createElement("div", { className: "flex" }, children));
15
- };
5
+ var CarouselSlider = ({ children, className, overflow, ...rest }) => /* @__PURE__ */ React$1.createElement(Slider, {
6
+ ...rest,
7
+ className: cn(String.raw`ml-[50%] -translate-x-1/2 cursor-grab overflow-hidden **:[[class*=slideInner]]:flex **:[[class*=slideInner]]:justify-center **:[[class*=slide\_]]:float-left **:[[class*=slide\_]]:pb-0! **:[[class*=sliderTray\_]]:transition-transform **:[[class*=sliderTray\_]]:duration-500 **:[[class*=sliderTray\_]]:ease-[cubic-bezier(.645,.045,.355,1)]`, overflow && "overflow-visible", className)
8
+ }, children);
16
9
  //#endregion
17
10
  export { CarouselSlider };
18
11
 
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselSlider.js","names":[],"sources":["../../../src/components/carousel/CarouselSlider.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { useCarousel } from './Carousel'\n\ntype CarouselSliderProps = {\n children?: React.ReactNode\n className?: string\n overflow?: boolean\n tabIndex?: number\n}\n\nexport const CarouselSlider = ({\n children,\n className,\n overflow,\n tabIndex = 0,\n ...rest\n}: CarouselSliderProps) => {\n const { emblaRef } = useCarousel()\n\n return (\n <div\n ref={emblaRef}\n className={cn(\n 'ml-[50%]',\n '-translate-x-1/2',\n 'cursor-grab',\n overflow ? 'overflow-visible' : 'overflow-hidden',\n className\n )}\n role=\"listbox\"\n aria-live=\"polite\"\n tabIndex={tabIndex}\n {...rest}\n >\n <div className=\"flex\">{children}</div>\n </div>\n )\n}\n"],"mappings":";;;;AAaA,IAAa,kBAAkB,EAC7B,UACA,WACA,UACA,WAAW,GACX,GAAG,WACsB;CACzB,MAAM,EAAE,aAAa,aAAa;AAElC,QACE,wBAAA,cAAC,OAAD;EACE,KAAK;EACL,WAAW,GACT,YACA,oBACA,eACA,WAAW,qBAAqB,mBAChC,UACD;EACD,MAAK;EACL,aAAU;EACA;EACV,GAAI;EAGA,EADJ,wBAAA,cAAC,OAAD,EAAK,WAAU,QAAuB,EAAf,SAAe,CAClC"}
1
+ {"version":3,"file":"CarouselSlider.js","names":[],"sources":["../../../src/components/carousel/CarouselSlider.tsx"],"sourcesContent":["import { Slider as BaseSlider } from 'pure-react-carousel'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nexport const CarouselSlider = ({\n children,\n className,\n overflow,\n ...rest\n}: React.PropsWithChildren<\n typeof BaseSlider & {\n tabIndex?: number\n className?: string\n overflow?: boolean\n }\n>) => (\n <BaseSlider\n {...rest}\n className={cn(\n String.raw`ml-[50%] -translate-x-1/2 cursor-grab overflow-hidden **:[[class*=slideInner]]:flex **:[[class*=slideInner]]:justify-center **:[[class*=slide\\_]]:float-left **:[[class*=slide\\_]]:pb-0! **:[[class*=sliderTray\\_]]:transition-transform **:[[class*=sliderTray\\_]]:duration-500 **:[[class*=sliderTray\\_]]:ease-[cubic-bezier(.645,.045,.355,1)]`,\n overflow && 'overflow-visible',\n className\n )}\n >\n {children}\n </BaseSlider>\n)\n"],"mappings":";;;;AAKA,IAAa,kBAAkB,EAC7B,UACA,WACA,UACA,GAAG,WAQH,wBAAA,cAAC,QAAD;CACE,GAAI;CACJ,WAAW,GACT,OAAO,GAAG,qVACV,YAAY,oBACZ,UACD;CAGU,EADV,SACU"}
@@ -4,9 +4,14 @@ export declare const DropdownMenu: React.FC<import("@radix-ui/react-dropdown-men
4
4
  Content: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dropdown-menu").DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, never> & {
5
5
  as?: React.ElementType;
6
6
  }>;
7
+ Group: React.ForwardRefExoticComponent<import("@radix-ui/react-dropdown-menu").DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
7
8
  Item: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dropdown-menu").DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, never> & {
8
9
  as?: React.ElementType;
9
10
  }>;
11
+ Label: {
12
+ ({ className, ...props }: import("@radix-ui/react-dropdown-menu").DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>): React.JSX.Element;
13
+ displayName: string;
14
+ };
10
15
  LinkItem: ({ children, href, ...props }: React.ComponentProps<typeof DropdownMenuItem> & {
11
16
  href: string;
12
17
  }) => React.JSX.Element;
@@ -1,13 +1,16 @@
1
1
  import { DropdownMenuContent } from "./DropdownMenuContent.js";
2
2
  import { DropdownMenuItem } from "./DropdownMenuItem.js";
3
+ import { DropdownMenuLabel } from "./DropdownMenuLabel.js";
3
4
  import { DropdownMenuLinkItem } from "./DropdownMenuLinkItem.js";
4
5
  import { DropdownMenuSeparator } from "./DropdownMenuSeparator.js";
5
6
  import { DropdownMenuTrigger } from "./DropdownMenuTrigger.js";
6
- import { Portal, Root } from "@radix-ui/react-dropdown-menu";
7
+ import { Group, Portal, Root } from "@radix-ui/react-dropdown-menu";
7
8
  //#region src/components/dropdown-menu/DropdownMenu.tsx
8
9
  var DropdownMenu = Object.assign(Root, {
9
10
  Content: DropdownMenuContent,
11
+ Group,
10
12
  Item: DropdownMenuItem,
13
+ Label: DropdownMenuLabel,
11
14
  LinkItem: DropdownMenuLinkItem,
12
15
  Portal,
13
16
  Separator: DropdownMenuSeparator,
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.js","names":[],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"sourcesContent":["import { Portal, Root as DropdownMenuRoot } from '@radix-ui/react-dropdown-menu'\nimport React from 'react'\n\nimport { DropdownMenuContent } from './DropdownMenuContent'\nimport { DropdownMenuItem } from './DropdownMenuItem'\nimport { DropdownMenuLinkItem } from './DropdownMenuLinkItem'\nimport { DropdownMenuSeparator } from './DropdownMenuSeparator'\nimport { DropdownMenuTrigger } from './DropdownMenuTrigger'\n\nexport const DropdownMenu = Object.assign(DropdownMenuRoot, {\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n LinkItem: DropdownMenuLinkItem,\n Portal: Portal,\n Separator: DropdownMenuSeparator,\n Trigger: DropdownMenuTrigger\n})\n"],"mappings":";;;;;;;AASA,IAAa,eAAe,OAAO,OAAO,MAAkB;CAC1D,SAAS;CACT,MAAM;CACN,UAAU;CACF;CACR,WAAW;CACX,SAAS;CACV,CAAC"}
1
+ {"version":3,"file":"DropdownMenu.js","names":[],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"sourcesContent":["import {\n Group,\n Portal,\n Root as DropdownMenuRoot\n} from '@radix-ui/react-dropdown-menu'\nimport React from 'react'\n\nimport { DropdownMenuContent } from './DropdownMenuContent'\nimport { DropdownMenuItem } from './DropdownMenuItem'\nimport { DropdownMenuLabel } from './DropdownMenuLabel'\nimport { DropdownMenuLinkItem } from './DropdownMenuLinkItem'\nimport { DropdownMenuSeparator } from './DropdownMenuSeparator'\nimport { DropdownMenuTrigger } from './DropdownMenuTrigger'\n\nexport const DropdownMenu = Object.assign(DropdownMenuRoot, {\n Content: DropdownMenuContent,\n Group: Group,\n Item: DropdownMenuItem,\n Label: DropdownMenuLabel,\n LinkItem: DropdownMenuLinkItem,\n Portal: Portal,\n Separator: DropdownMenuSeparator,\n Trigger: DropdownMenuTrigger\n})\n"],"mappings":";;;;;;;;AAcA,IAAa,eAAe,OAAO,OAAO,MAAkB;CAC1D,SAAS;CACF;CACP,MAAM;CACN,OAAO;CACP,UAAU;CACF;CACR,WAAW;CACX,SAAS;CACV,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Label } from '@radix-ui/react-dropdown-menu';
2
+ import * as React from 'react';
3
+ type DropdownMenuLabelProps = React.ComponentProps<typeof Label>;
4
+ export declare const DropdownMenuLabel: {
5
+ ({ className, ...props }: DropdownMenuLabelProps): React.JSX.Element;
6
+ displayName: string;
7
+ };
8
+ export {};
@@ -0,0 +1,16 @@
1
+ import { cn } from "../../styled.js";
2
+ import { Text } from "../text/Text.js";
3
+ import * as React$1 from "react";
4
+ import { Label } from "@radix-ui/react-dropdown-menu";
5
+ //#region src/components/dropdown-menu/DropdownMenuLabel.tsx
6
+ var DropdownMenuLabel = ({ className, ...props }) => /* @__PURE__ */ React$1.createElement(Text, {
7
+ as: Label,
8
+ size: "sm",
9
+ className: cn("px-3", "py-2", "text-text-subtle", className),
10
+ ...props
11
+ });
12
+ DropdownMenuLabel.displayName = "DropdownMenuLabel";
13
+ //#endregion
14
+ export { DropdownMenuLabel };
15
+
16
+ //# sourceMappingURL=DropdownMenuLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenuLabel.js","names":[],"sources":["../../../src/components/dropdown-menu/DropdownMenuLabel.tsx"],"sourcesContent":["import { Label } from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Text } from '../text/Text'\n\ntype DropdownMenuLabelProps = React.ComponentProps<typeof Label>\n\nexport const DropdownMenuLabel = ({\n className,\n ...props\n}: DropdownMenuLabelProps) => (\n <Text\n as={Label}\n size=\"sm\"\n className={cn('px-3', 'py-2', 'text-text-subtle', className)}\n {...props}\n />\n)\n\nDropdownMenuLabel.displayName = 'DropdownMenuLabel'\n"],"mappings":";;;;;AASA,IAAa,qBAAqB,EAChC,WACA,GAAG,YAEH,wBAAA,cAAC,MAAD;CACE,IAAI;CACJ,MAAK;CACL,WAAW,GAAG,QAAQ,QAAQ,oBAAoB,UAAU;CAC5D,GAAI;CACJ,CAAA;AAGJ,kBAAkB,cAAc"}