@spark-ui/components 10.6.8 → 10.7.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.
- package/CHANGELOG.md +7 -0
- package/dist/alert-dialog/index.js +8 -3
- package/dist/alert-dialog/index.js.map +1 -1
- package/dist/alert-dialog/index.mjs +3 -3
- package/dist/avatar/index.js +8 -3
- package/dist/avatar/index.js.map +1 -1
- package/dist/avatar/index.mjs +2 -2
- package/dist/button/index.d.mts +2 -1
- package/dist/button/index.d.ts +2 -1
- package/dist/button/index.js +8 -3
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +1 -1
- package/dist/carousel/index.js +8 -3
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +2 -2
- package/dist/{chunk-6HHB3DJU.mjs → chunk-3PRCMWLU.mjs} +2 -2
- package/dist/{chunk-LDBAW6VB.mjs → chunk-73YYIDSP.mjs} +3 -2
- package/dist/chunk-73YYIDSP.mjs.map +1 -0
- package/dist/{chunk-FWJ7K6FT.mjs → chunk-7A5MVJB3.mjs} +9 -4
- package/dist/chunk-7A5MVJB3.mjs.map +1 -0
- package/dist/{chunk-4BLDSUXN.mjs → chunk-O42QOEJ6.mjs} +3 -3
- package/dist/{chunk-4BLDSUXN.mjs.map → chunk-O42QOEJ6.mjs.map} +1 -1
- package/dist/{chunk-YINJJQE6.mjs → chunk-SBJNVOF7.mjs} +2 -2
- package/dist/combobox/index.js +10 -5
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +4 -4
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/dialog/index.js +8 -3
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +3 -3
- package/dist/drawer/index.js +8 -3
- package/dist/drawer/index.js.map +1 -1
- package/dist/drawer/index.mjs +2 -2
- package/dist/dropdown/index.js +9 -4
- package/dist/dropdown/index.js.map +1 -1
- package/dist/dropdown/index.mjs +3 -3
- package/dist/icon-button/index.js +8 -3
- package/dist/icon-button/index.js.map +1 -1
- package/dist/icon-button/index.mjs +2 -2
- package/dist/input/index.js +2 -1
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +1 -1
- package/dist/pagination/index.js +14 -18
- package/dist/pagination/index.js.map +1 -1
- package/dist/pagination/index.mjs +8 -17
- package/dist/pagination/index.mjs.map +1 -1
- package/dist/popover/index.js +9 -4
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +3 -3
- package/dist/scrolling-list/index.js +8 -3
- package/dist/scrolling-list/index.js.map +1 -1
- package/dist/scrolling-list/index.mjs +2 -2
- package/dist/snackbar/index.js +9 -4
- package/dist/snackbar/index.js.map +1 -1
- package/dist/snackbar/index.mjs +3 -3
- package/dist/snackbar/index.mjs.map +1 -1
- package/dist/stepper/index.js +10 -4
- package/dist/stepper/index.js.map +1 -1
- package/dist/stepper/index.mjs +3 -3
- package/dist/tabs/index.js +8 -3
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/textarea/index.js +2 -1
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +1 -1
- package/package.json +5 -5
- package/dist/chunk-FWJ7K6FT.mjs.map +0 -1
- package/dist/chunk-LDBAW6VB.mjs.map +0 -1
- /package/dist/{chunk-6HHB3DJU.mjs.map → chunk-3PRCMWLU.mjs.map} +0 -0
- /package/dist/{chunk-YINJJQE6.mjs.map → chunk-SBJNVOF7.mjs.map} +0 -0
package/dist/carousel/index.js
CHANGED
|
@@ -1258,7 +1258,7 @@ var buttonStyles = (0, import_class_variance_authority5.cva)(
|
|
|
1258
1258
|
[
|
|
1259
1259
|
"u-shadow-border-transition",
|
|
1260
1260
|
"box-border inline-flex items-center justify-center gap-md whitespace-nowrap",
|
|
1261
|
-
"px-lg",
|
|
1261
|
+
"default:px-lg",
|
|
1262
1262
|
"text-body-1 font-bold",
|
|
1263
1263
|
"focus-visible:u-outline"
|
|
1264
1264
|
],
|
|
@@ -1282,9 +1282,12 @@ var buttonStyles = (0, import_class_variance_authority5.cva)(
|
|
|
1282
1282
|
filled: [],
|
|
1283
1283
|
outlined: ["bg-transparent", "border-sm", "border-current"],
|
|
1284
1284
|
tinted: [],
|
|
1285
|
-
ghost: [],
|
|
1285
|
+
ghost: ["default:-mx-md px-md hover:bg-main/dim-5"],
|
|
1286
1286
|
contrast: ["bg-surface"]
|
|
1287
1287
|
}),
|
|
1288
|
+
underline: {
|
|
1289
|
+
true: ["underline"]
|
|
1290
|
+
},
|
|
1288
1291
|
/**
|
|
1289
1292
|
* Color scheme of the button.
|
|
1290
1293
|
*/
|
|
@@ -1367,6 +1370,7 @@ var Button = ({
|
|
|
1367
1370
|
size = "md",
|
|
1368
1371
|
asChild,
|
|
1369
1372
|
className,
|
|
1373
|
+
underline = false,
|
|
1370
1374
|
ref,
|
|
1371
1375
|
...others
|
|
1372
1376
|
}) => {
|
|
@@ -1396,7 +1400,8 @@ var Button = ({
|
|
|
1396
1400
|
disabled: shouldNotInteract,
|
|
1397
1401
|
intent,
|
|
1398
1402
|
shape,
|
|
1399
|
-
size
|
|
1403
|
+
size,
|
|
1404
|
+
underline
|
|
1400
1405
|
}),
|
|
1401
1406
|
disabled: !!disabled,
|
|
1402
1407
|
"aria-busy": isLoading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/carousel/index.ts","../../src/carousel/Carousel.tsx","../../src/carousel/useCarousel.ts","../../src/carousel/useEvent.ts","../../src/carousel/useIsMounted.ts","../../src/carousel/useScrollEnd.ts","../../src/carousel/useSnapPoints.ts","../../src/carousel/useResizeObserver.ts","../../src/carousel/utils.ts","../../src/carousel/CarouselControls.tsx","../../src/carousel/CarouselNextButton.tsx","../../src/icon/Icon.tsx","../../src/slot/Slot.tsx","../../src/visually-hidden/VisuallyHidden.tsx","../../src/icon/Icon.styles.tsx","../../src/button/Button.tsx","../../src/spinner/Spinner.styles.tsx","../../src/spinner/Spinner.tsx","../../src/button/Button.styles.tsx","../../src/button/variants/filled.ts","../../src/button/variants/ghost.ts","../../src/button/variants/outlined.ts","../../src/button/variants/tinted.ts","../../src/button/variants/contrast.ts","../../src/icon-button/IconButton.styles.tsx","../../src/icon-button/IconButton.tsx","../../src/carousel/CarouselPageIndicator.tsx","../../src/carousel/CarouselPagePicker.tsx","../../src/carousel/CarouselPrevButton.tsx","../../src/carousel/CarouselSlide.tsx","../../src/carousel/useIsVisible.ts","../../src/carousel/CarouselSlides.tsx","../../src/carousel/CarouselViewport.tsx"],"sourcesContent":["import { Carousel as Root } from './Carousel'\nimport { CarouselControls as Controls } from './CarouselControls'\nimport { CarouselNextButton as NextButton } from './CarouselNextButton'\nimport { CarouselPageIndicator as PageIndicator } from './CarouselPageIndicator'\nimport { CarouselPagePicker as PagePicker } from './CarouselPagePicker'\nimport { CarouselPrevButton as PrevButton } from './CarouselPrevButton'\nimport { CarouselSlide as Slide } from './CarouselSlide'\nimport { CarouselSlides as Slides } from './CarouselSlides'\nimport { CarouselViewport as Viewport } from './CarouselViewport'\n\nexport const Carousel: typeof Root & {\n Controls: typeof Controls\n NextButton: typeof NextButton\n PrevButton: typeof PrevButton\n Slide: typeof Slide\n Slides: typeof Slides\n Viewport: typeof Viewport\n PagePicker: typeof PagePicker\n PageIndicator: typeof PageIndicator\n} = Object.assign(Root, {\n Controls,\n NextButton,\n PrevButton,\n Slide,\n Slides,\n Viewport,\n PagePicker,\n PageIndicator,\n})\n\nCarousel.displayName = 'Carousel'\n","import { cx } from 'class-variance-authority'\nimport { createContext, ReactNode, useContext } from 'react'\n\nimport { CarouselAPI, UseCarouselProps } from './types'\nimport { useCarousel } from './useCarousel'\n\ninterface Props extends UseCarouselProps {\n children?: ReactNode\n className?: string\n}\n\nconst CarouselContext = createContext<CarouselAPI | null>(null)\n\nexport const Carousel = ({\n className,\n snapType = 'mandatory',\n snapStop = 'always',\n scrollBehavior = 'smooth',\n slidesPerMove = 'auto',\n slidesPerPage = 1,\n loop = false,\n children,\n gap = 16,\n defaultPage,\n page,\n onPageChange,\n}: Props) => {\n const carouselApi = useCarousel({\n defaultPage,\n slidesPerPage,\n slidesPerMove,\n loop,\n gap,\n scrollBehavior,\n snapStop,\n snapType,\n page,\n onPageChange,\n })\n\n return (\n <CarouselContext.Provider\n value={{\n ...carouselApi,\n scrollBehavior,\n }}\n >\n <div\n className={cx('gap-lg relative box-border flex flex-col', className)}\n {...carouselApi.getRootProps()}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n )\n}\n\nCarousel.displayName = 'Carousel'\n\nexport const useCarouselContext = () => {\n const context = useContext(CarouselContext)\n\n if (!context) {\n throw Error('useCarouselContext must be used within a Carousel provider')\n }\n\n return context\n}\n","/* eslint-disable max-lines-per-function */\nimport {\n KeyboardEvent,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react'\n\nimport {\n CarouselAPI,\n ComputedControlProps,\n ComputedIndicatorGroupProps,\n ComputedIndicatorProps,\n ComputedRootProps,\n ComputedSlideGroupProps,\n ComputedSlideProps,\n ComputedTriggerProps,\n UseCarouselProps,\n} from './types'\nimport { useEvent } from './useEvent'\nimport { useIsMounted } from './useIsMounted'\nimport { useScrollEnd } from './useScrollEnd'\nimport { useSnapPoints } from './useSnapPoints'\nimport { getSnapPositions, isSnapPoint } from './utils'\n\nconst DATA_SCOPE = 'carousel' as const\nconst DIRECTION = 'ltr' as const\n\nexport const useCarousel = ({\n defaultPage,\n gap = 16,\n snapType = 'mandatory',\n snapStop = 'always',\n scrollPadding = 0,\n slidesPerPage = 1,\n slidesPerMove = 'auto',\n scrollBehavior = 'smooth',\n loop = false,\n // state control\n page: controlledPage,\n onPageChange: onPageChangeProp,\n}: UseCarouselProps): CarouselAPI => {\n const carouselId = useId()\n const [pageState, setPageState] = useState(defaultPage || controlledPage || 0)\n\n const carouselRef = useRef<HTMLDivElement>(null)\n const pageIndicatorsRefs = useRef<(HTMLElement | null)[]>([])\n const isMountedRef = useIsMounted()\n const isMounted = isMountedRef.current\n const onPageChange = useEvent(onPageChangeProp)\n\n const [pageSnapPoints] = useSnapPoints([], {\n carouselRef,\n slidesPerMove,\n slidesPerPage,\n })\n\n const canScrollPrev = useRef(loop || pageState > 0)\n const canScrollNext = useRef(loop || pageState < pageSnapPoints.length - 1)\n canScrollPrev.current = loop || pageState > 0\n canScrollNext.current = loop || pageState < pageSnapPoints.length - 1\n\n const handlePageChange = useCallback(\n (page: number) => {\n if (page !== pageState) {\n setPageState(page)\n onPageChange?.(page)\n }\n },\n [onPageChange, pageState]\n )\n\n const scrollTo = useCallback(\n (page: number, behavior: 'instant' | 'smooth') => {\n if (carouselRef.current) {\n carouselRef.current.scrollTo({\n left: pageSnapPoints[page],\n behavior: behavior === 'instant' ? 'auto' : 'smooth',\n })\n handlePageChange(page)\n }\n },\n [handlePageChange, pageSnapPoints]\n )\n\n const scrollPrev = useCallback(\n (cb?: (pageIndex: number) => void) => {\n if (canScrollPrev) {\n const targetPage =\n loop && pageState === 0 ? pageSnapPoints.length - 1 : Math.max(pageState - 1, 0)\n\n scrollTo(targetPage, scrollBehavior)\n cb?.(targetPage)\n }\n },\n [loop, pageSnapPoints, pageState, scrollBehavior, scrollTo]\n )\n\n const scrollNext = useCallback(\n (cb?: (pageIndex: number) => void) => {\n if (canScrollNext) {\n const targetPage =\n loop && pageState === pageSnapPoints.length - 1\n ? 0\n : Math.min(pageState + 1, pageSnapPoints.length - 1)\n\n scrollTo(targetPage, scrollBehavior)\n cb?.(targetPage)\n }\n },\n [loop, pageSnapPoints, pageState, scrollBehavior, scrollTo]\n )\n\n useEffect(() => {\n if (controlledPage != null) {\n scrollTo(controlledPage, scrollBehavior)\n }\n }, [controlledPage, scrollBehavior, scrollTo])\n\n /**\n * Set the default scroll position of the carousel based on `defaultPage`.\n * As this operation is done before the snap points are set in the state, we have to get them from the ref directly.\n */\n useLayoutEffect(() => {\n if (defaultPage != null && !isMounted && carouselRef.current) {\n const snapPositions = getSnapPositions({\n container: carouselRef.current,\n slidesPerMove,\n slidesPerPage,\n })\n\n carouselRef.current.scrollTo({\n left: snapPositions[defaultPage],\n behavior: 'instant',\n })\n }\n }, [defaultPage, isMounted, slidesPerMove, slidesPerPage])\n\n /**\n * Monitoring scrollend events inside the scrollable area to sync the carousel active page with current scroll position.\n * Scrollend has been chosen over \"scroll\" for performance reason.\n */\n const syncPageStateWithScrollPosition = useCallback(() => {\n if (!carouselRef.current || pageSnapPoints.length === 0) return\n\n const { scrollLeft } = carouselRef.current\n\n const distances = pageSnapPoints.map(pagePosition => Math.abs(scrollLeft - pagePosition))\n const pageInViewport = distances.indexOf(Math.min(...distances))\n\n if (pageInViewport !== -1) {\n handlePageChange(pageInViewport)\n }\n }, [pageSnapPoints, handlePageChange])\n\n useScrollEnd(carouselRef, syncPageStateWithScrollPosition)\n\n const contextValue: CarouselAPI = {\n ref: carouselRef,\n pageIndicatorsRefs,\n // props\n gap,\n snapType,\n snapStop,\n scrollPadding,\n slidesPerPage,\n slidesPerMove,\n scrollBehavior,\n loop,\n // computed state\n page: pageState,\n pageSnapPoints,\n canScrollNext: canScrollNext.current,\n canScrollPrev: canScrollPrev.current,\n scrollTo,\n scrollPrev,\n scrollNext,\n // anatomy\n getRootProps: (): ComputedRootProps => ({\n id: `carousel::${carouselId}:`,\n role: 'region',\n 'aria-roledescription': 'carousel',\n 'data-scope': DATA_SCOPE,\n 'data-part': 'root',\n 'data-orientation': 'horizontal',\n dir: DIRECTION,\n style: {\n '--slides-per-page': slidesPerPage,\n '--slide-spacing': `${gap}px`,\n '--slide-item-size':\n 'calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))',\n },\n }),\n\n getControlProps: (): ComputedControlProps => ({\n 'data-scope': DATA_SCOPE,\n 'data-part': 'control',\n 'data-orientation': 'horizontal',\n }),\n\n getPrevTriggerProps: (): ComputedTriggerProps<'prev-trigger'> => ({\n id: `carousel::${carouselId}::prev-trigger`,\n 'aria-controls': `carousel::${carouselId}::item-group`,\n 'data-scope': DATA_SCOPE,\n 'data-part': 'prev-trigger',\n 'data-orientation': 'horizontal',\n type: 'button',\n dir: DIRECTION,\n disabled: !canScrollPrev.current,\n onClick: () => scrollPrev(),\n }),\n\n getNextTriggerProps: (): ComputedTriggerProps<'next-trigger'> => ({\n id: `carousel::${carouselId}::next-trigger`,\n 'aria-controls': `carousel::${carouselId}::item-group`,\n 'data-scope': DATA_SCOPE,\n 'data-part': 'next-trigger',\n 'data-orientation': 'horizontal',\n type: 'button',\n dir: DIRECTION,\n disabled: !canScrollNext.current,\n onClick: () => scrollNext(),\n }),\n\n getSlidesContainerProps: (): ComputedSlideGroupProps => ({\n id: `carousel::${carouselId}::item-group`,\n /**\n * The carousel pattern was originally designed for a single slide.\n * When there is more than one slide, the aria-live region is set to off to avoid announcing the whole list of slides.\n * This is not ideal but we keep it for backwards compatibility.\n *\n * @see https://www.w3.org/WAI/ARIA/apg/patterns/carousel/#wai-aria-attributes\n */\n 'aria-live': slidesPerPage > 1 ? 'off' : 'polite',\n 'data-scope': DATA_SCOPE,\n 'data-part': 'item-group',\n 'data-orientation': 'horizontal',\n dir: DIRECTION,\n tabIndex: 0,\n style: {\n display: 'grid',\n gap: 'var(--slide-spacing)',\n scrollSnapType: `x ${snapType}`,\n gridAutoFlow: 'column',\n scrollbarWidth: 'none',\n overscrollBehavior: 'contain',\n gridAutoColumns: 'var(--slide-item-size)',\n overflowX: 'auto',\n },\n ref: carouselRef,\n }),\n\n getSlideProps: ({ index }): ComputedSlideProps => {\n const isStopPoint = isSnapPoint(index, {\n container: carouselRef.current,\n slidesPerMove,\n slidesPerPage,\n })\n\n return {\n id: `carousel::${carouselId}::item:${index}`,\n role: 'group',\n 'aria-roledescription': 'slide',\n 'data-scope': DATA_SCOPE,\n 'data-part': 'item',\n 'data-index': index,\n 'data-orientation': 'horizontal',\n dir: DIRECTION,\n style: {\n ...(isStopPoint && {\n scrollSnapAlign: 'start',\n scrollSnapStop: snapStop,\n }),\n },\n }\n },\n\n getIndicatorGroupProps: (): ComputedIndicatorGroupProps => ({\n role: 'radiogroup',\n id: `carousel::${carouselId}::indicator-group`,\n 'data-scope': DATA_SCOPE,\n 'data-part': 'indicator-group',\n 'data-orientation': 'horizontal',\n dir: DIRECTION,\n }),\n\n getIndicatorProps: ({ index }): ComputedIndicatorProps => {\n const isActivePage = index === pageState\n\n return {\n role: 'radio',\n id: `carousel::${carouselId}::indicator:${index}`,\n 'aria-checked': isActivePage,\n 'data-scope': DATA_SCOPE,\n 'data-part': 'indicator',\n 'data-orientation': 'horizontal',\n 'data-index': index,\n 'data-state': isActivePage ? 'active' : 'inactive',\n tabIndex: isActivePage ? 0 : -1,\n onClick: () => {\n scrollTo(index, scrollBehavior)\n },\n onKeyDown: (event: KeyboardEvent) => {\n const focusActiveIndicator = (page: number) => {\n pageIndicatorsRefs.current[page]?.focus()\n }\n\n if (event.key === 'ArrowRight' && canScrollNext) {\n scrollNext(focusActiveIndicator)\n } else if (event.key === 'ArrowLeft' && canScrollPrev) {\n scrollPrev(focusActiveIndicator)\n }\n },\n }\n },\n }\n\n return contextValue\n}\n","import { useCallback, useLayoutEffect, useRef } from 'react'\n\ntype AnyFunction = (...args: any[]) => any\n\n/**\n * Directly from this gist: https://gist.github.com/diegohaz/695097a06f038a707c3a1b11e4e40195\n * Until React releases a native `useEvent` hook.\n */\nexport function useEvent<T extends AnyFunction>(callback?: T) {\n const ref = useRef<AnyFunction | undefined>(() => {\n throw new Error('Cannot call an event handler while rendering.')\n })\n\n useLayoutEffect(() => {\n ref.current = callback\n })\n\n return useCallback<AnyFunction>((...args) => ref.current?.(...args), []) as T\n}\n","import { useEffect, useRef } from 'react'\n\nexport const useIsMounted = () => {\n const isMounted = useRef(false)\n\n useEffect(() => {\n isMounted.current = true\n\n return () => {\n isMounted.current = false\n }\n }, [])\n\n return isMounted\n}\n","import { useEffect, useRef, RefObject } from 'react'\n\nexport function useScrollEnd(scrollRef: RefObject<HTMLDivElement | null>, callback: () => void) {\n const scrollLeft = useRef(0)\n\n /**\n * Safari (and some smaller browsers) to not yet support the `scrollend` event.\n * For those we must rely on the `scroll` event and and an idle state delay to trigger the \"scroll end\".\n *\n * Caveats:\n * - when using a trackpad or your fingers on a touch device, scrolling then holding the position might trigger the \"scrollend\" callback too early.\n */\n const safariTimeout = useRef<NodeJS.Timeout | null>(null)\n\n useEffect(() => {\n const element = scrollRef.current\n if (!element) return\n\n const supportsScrollend = 'onscrollend' in window\n\n const handleScrollEnd = () => {\n callback()\n }\n\n const handleSafariScroll = () => {\n if (safariTimeout.current) {\n clearTimeout(safariTimeout.current)\n }\n\n if (scrollRef.current) {\n scrollLeft.current = scrollRef.current.scrollLeft\n\n safariTimeout.current = setTimeout(() => {\n if (scrollRef.current) {\n handleScrollEnd()\n }\n }, 150)\n }\n }\n\n if (supportsScrollend) {\n element.addEventListener('scrollend', handleScrollEnd)\n } else {\n element.addEventListener('scroll', handleSafariScroll)\n }\n\n return () => {\n if (safariTimeout.current) {\n clearTimeout(safariTimeout.current)\n }\n\n if (supportsScrollend) {\n element.removeEventListener('scrollend', handleScrollEnd)\n } else {\n element.removeEventListener('scroll', handleSafariScroll)\n }\n }\n }, [callback, scrollRef])\n}\n\nexport default useScrollEnd\n","import { useMemo, useState, RefObject } from 'react'\n\nimport { useResizeObserver } from './useResizeObserver'\nimport { getSnapPositions } from './utils'\n\n/**\n * Get the scroll value of each slides that serves as the start of a page\n * The array is updated when resize event are caught in the carousel.\n */\nexport function useSnapPoints<T extends HTMLDivElement | null>(\n initialSnapPoints: number[] = [],\n {\n carouselRef,\n slidesPerMove,\n slidesPerPage,\n }: {\n carouselRef: RefObject<T>\n slidesPerMove: 'auto' | number\n slidesPerPage: number\n }\n) {\n const [pageSnapPoints, setPageSnapPoints] = useState(initialSnapPoints)\n\n const stableSnapPoints = useMemo(() => pageSnapPoints, [pageSnapPoints])\n\n /**\n * On resize, dimensions of the carousel might changes, which requires to update the snap points positions in the state.\n */\n useResizeObserver(carouselRef, () => {\n const newSnapPoints = getSnapPositions({\n slidesPerMove,\n slidesPerPage,\n container: carouselRef.current,\n })\n\n if (JSON.stringify(pageSnapPoints) !== JSON.stringify(newSnapPoints)) {\n setPageSnapPoints(newSnapPoints)\n }\n })\n\n return [stableSnapPoints, setPageSnapPoints] as const\n}\n","import { useLayoutEffect, RefObject } from 'react'\n\nexport function useResizeObserver<T extends HTMLElement | null>(\n ref: RefObject<T>,\n callback: (width: number) => void\n) {\n useLayoutEffect(() => {\n const element = ref.current\n if (!element) return\n\n const observer = new ResizeObserver(entries => {\n for (const entry of entries) {\n callback(entry.contentRect.width)\n }\n })\n\n observer.observe(element)\n\n return () => observer.disconnect() // Cleanup on unmount\n }, [ref, callback])\n}\n","/**\n * Get the indices of each slides that serves as the start of a page\n * @returns number[] (ex: [0, 2, 4])\n */\nfunction getSnapIndices({\n totalSlides,\n slidesPerMove,\n slidesPerPage,\n}: {\n totalSlides: number\n slidesPerMove: number | 'auto'\n slidesPerPage: number\n}) {\n const slideBy = slidesPerMove === 'auto' ? slidesPerPage : slidesPerMove\n const snapPoints: number[] = []\n\n const lastSnapIndex = Math.floor((totalSlides - slidesPerPage) / slideBy) * slideBy\n\n for (let i = 0; i <= lastSnapIndex; i += slideBy) {\n snapPoints.push(i)\n }\n\n // Adding final snap point if necessary\n if (snapPoints[snapPoints.length - 1] !== totalSlides - slidesPerPage) {\n snapPoints.push(totalSlides - slidesPerPage)\n }\n\n return snapPoints\n}\n\nexport function getSlideElements(container: HTMLDivElement | null): Element[] {\n return container ? Array.from(container.querySelectorAll('[data-part=\"item\"]')) : []\n}\n\nexport function isSnapPoint(\n slideIndex: number,\n {\n container,\n slidesPerMove,\n slidesPerPage,\n }: {\n container: HTMLDivElement | null\n slidesPerMove: number | 'auto'\n slidesPerPage: number\n }\n) {\n return getSnapIndices({\n totalSlides: getSlideElements(container).length,\n slidesPerPage,\n slidesPerMove,\n }).includes(slideIndex)\n}\n\n/**\n * Get the scroll value of each slides that serves as the start of a page\n * @returns number[] (ex for a 400px carousel with no gap: [400, 800, 1200])\n */\nexport function getSnapPositions({\n container,\n slidesPerMove,\n slidesPerPage,\n}: {\n container: HTMLDivElement | null\n slidesPerMove: number | 'auto'\n slidesPerPage: number\n}) {\n if (!container) return []\n\n return getSlideElements(container)\n .filter((_, index) => {\n return isSnapPoint(index, {\n slidesPerMove,\n slidesPerPage,\n container,\n })\n })\n .map(slide => (slide as HTMLElement).offsetLeft)\n}\n","import { cx } from 'class-variance-authority'\nimport { HTMLAttributes, ReactNode } from 'react'\n\nimport { useCarouselContext } from './Carousel'\n\ninterface ControlsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport const CarouselControls = ({ children, className, ...props }: ControlsProps) => {\n const ctx = useCarouselContext()\n\n return (\n <div\n className={cx(\n 'default:px-lg pointer-events-none absolute inset-0 flex flex-row items-center justify-between',\n className\n )}\n {...ctx.getControlProps()}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nCarouselControls.displayName = 'Carousel.Controls'\n","import { ArrowVerticalRight } from '@spark-ui/icons/ArrowVerticalRight'\n\nimport { Icon } from '../icon'\nimport { IconButton, IconButtonProps } from '../icon-button'\nimport { useCarouselContext } from './Carousel'\n\nexport const CarouselNextButton = ({\n 'aria-label': ariaLabel,\n ...buttonProps\n}: IconButtonProps) => {\n const ctx = useCarouselContext()\n\n return (\n <IconButton\n {...ctx.getNextTriggerProps()}\n intent=\"surface\"\n design=\"filled\"\n className=\"pointer-events-auto cursor-pointer shadow-sm disabled:invisible\"\n aria-label={ariaLabel}\n {...buttonProps}\n >\n <Icon>\n <ArrowVerticalRight />\n </Icon>\n </IconButton>\n )\n}\n\nCarouselNextButton.displayName = 'Carousel.NextButton'\n","import { Children, cloneElement, ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { iconStyles, IconVariantsProps } from './Icon.styles'\n\nexport interface IconProps extends IconVariantsProps, ComponentPropsWithoutRef<'svg'> {\n /**\n * The svg icon that will be wrapped\n */\n children: ReactNode\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label?: string\n}\n\nexport const Icon = ({\n label,\n className,\n size = 'current',\n intent = 'current',\n children,\n ...others\n}: IconProps) => {\n const child = Children.only(children)\n\n return (\n <>\n {cloneElement(child as ReactElement<Record<string, any>>, {\n className: iconStyles({ className, size, intent }),\n 'data-spark-component': 'icon',\n 'aria-hidden': 'true',\n focusable: 'false',\n ...others,\n })}\n\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </>\n )\n}\n\nIcon.displayName = 'Icon'\n","import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n","import { HTMLAttributes, PropsWithChildren, Ref } from 'react'\n\nimport { Slot } from '../slot'\n\nexport type VisuallyHiddenProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLElement>\n}\n\nexport const VisuallyHidden = ({ asChild = false, ref, ...props }: VisuallyHiddenProps) => {\n const Component = asChild ? Slot : 'span'\n\n return (\n <Component\n {...props}\n ref={ref}\n style={{\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n ...props.style,\n }}\n />\n )\n}\n\nVisuallyHidden.displayName = 'VisuallyHidden'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const iconStyles = cva(['fill-current shrink-0'], {\n variants: {\n /**\n * Color scheme of the icon.\n */\n intent: makeVariants<\n 'intent',\n [\n 'current',\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'error',\n 'info',\n 'neutral',\n ]\n >({\n current: ['text-current'],\n main: ['text-main'],\n support: ['text-support'],\n accent: ['text-accent'],\n basic: ['text-basic'],\n success: ['text-success'],\n alert: ['text-alert'],\n error: ['text-error'],\n info: ['text-info'],\n neutral: ['text-neutral'],\n }),\n /**\n * Sets the size of the icon.\n */\n size: makeVariants<'size', ['current', 'sm', 'md', 'lg', 'xl']>({\n current: ['u-current-font-size'],\n sm: ['w-sz-16', 'h-sz-16'],\n md: ['w-sz-24', 'h-sz-24'],\n lg: ['w-sz-32', 'h-sz-32'],\n xl: ['w-sz-40', 'h-sz-40'],\n }),\n },\n})\n\nexport type IconVariantsProps = VariantProps<typeof iconStyles>\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, type DOMAttributes, Ref, useMemo } from 'react'\n\nimport { Slot, wrapPolymorphicSlot } from '../slot'\nimport { Spinner, type SpinnerProps } from '../spinner'\nimport { buttonStyles, type ButtonStylesProps } from './Button.styles'\n\nexport interface ButtonProps\n extends Omit<ComponentPropsWithoutRef<'button'>, 'disabled'>,\n ButtonStylesProps {\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild?: boolean\n /**\n * Display a spinner to indicate to the user that the button is loading something after they interacted with it.\n */\n isLoading?: boolean\n /**\n * If your loading state should only display a spinner, it's better to specify a label for it (a11y).\n */\n loadingLabel?: string\n /**\n * If your loading state should also display a label, you can use this prop instead of `loadingLabel`.\n * **Please note that using this can result in layout shifting when the Button goes from loading state to normal state.**\n */\n loadingText?: string\n ref?: Ref<HTMLButtonElement>\n}\n\ntype DOMAttributesEventHandler = keyof Omit<\n DOMAttributes<HTMLButtonElement>,\n 'children' | 'dangerouslySetInnerHTML'\n>\n\nconst blockedEventHandlers: DOMAttributesEventHandler[] = [\n 'onClick',\n 'onMouseDown',\n 'onMouseUp',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseOver',\n 'onMouseOut',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'onSubmit',\n]\n\nexport const Button = ({\n children,\n design = 'filled',\n disabled = false,\n intent = 'main',\n isLoading = false,\n loadingLabel,\n loadingText,\n shape = 'rounded',\n size = 'md',\n asChild,\n className,\n ref,\n ...others\n}: ButtonProps) => {\n const Component = asChild ? Slot : 'button'\n\n const shouldNotInteract = !!disabled || isLoading\n\n const disabledEventHandlers = useMemo(() => {\n const result: Partial<Record<DOMAttributesEventHandler, () => void>> = {}\n\n if (shouldNotInteract) {\n blockedEventHandlers.forEach(eventHandler => (result[eventHandler] = undefined))\n }\n\n return result\n }, [shouldNotInteract])\n\n const spinnerProps = {\n size: 'current' as SpinnerProps['size'],\n className: loadingText ? 'inline-block' : 'absolute',\n ...(loadingLabel && { 'aria-label': loadingLabel }),\n }\n\n return (\n <Component\n data-spark-component=\"button\"\n {...(Component === 'button' && { type: 'button' })}\n ref={ref}\n className={buttonStyles({\n className,\n design,\n disabled: shouldNotInteract,\n intent,\n shape,\n size,\n })}\n disabled={!!disabled}\n aria-busy={isLoading}\n aria-live={isLoading ? 'assertive' : 'off'}\n {...others}\n {...disabledEventHandlers}\n >\n {wrapPolymorphicSlot(asChild, children, slotted =>\n isLoading ? (\n <>\n <Spinner {...spinnerProps} />\n {loadingText && loadingText}\n\n <div\n aria-hidden\n className={cx('gap-md', loadingText ? 'hidden' : 'inline-flex opacity-0')}\n >\n {slotted}\n </div>\n </>\n ) : (\n slotted\n )\n )}\n </Component>\n )\n}\n\nButton.displayName = 'Button'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nconst defaultVariants = {\n intent: 'current',\n size: 'current',\n isBackgroundVisible: false,\n} as const\n\nexport const spinnerStyles = cva(\n ['inline-block', 'border-solid', 'rounded-full', 'border-md', 'animate-spin'],\n {\n variants: {\n /**\n * Use `size` prop to set the size of the spinner. If you want to set the full size for the spinner, don't forget to add a wrapping container with its own size.\n */\n size: {\n current: ['u-current-font-size'],\n sm: ['w-sz-20', 'h-sz-20'],\n md: ['w-sz-28', 'h-sz-28'],\n full: ['w-full', 'h-full'],\n },\n /**\n * Color scheme of the spinner.\n */\n intent: makeVariants<\n 'intent',\n [\n 'current',\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'error',\n 'info',\n 'neutral',\n ]\n >({\n current: ['border-current'],\n main: ['border-main'],\n support: ['border-support'],\n accent: ['border-accent'],\n basic: ['border-basic'],\n success: ['border-success'],\n alert: ['border-alert'],\n error: ['border-error'],\n info: ['border-info'],\n neutral: ['border-neutral'],\n }),\n /**\n * Size of the button.\n */\n isBackgroundVisible: {\n true: ['border-b-neutral-container', 'border-l-neutral-container'],\n false: ['border-b-transparent', 'border-l-transparent'],\n },\n },\n defaultVariants,\n }\n)\n\nexport type SpinnerStylesProps = VariantProps<typeof spinnerStyles>\n","import { ComponentPropsWithRef, PropsWithChildren } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { spinnerStyles, SpinnerStylesProps } from './Spinner.styles'\n\nexport interface SpinnerProps extends ComponentPropsWithRef<'div'>, SpinnerStylesProps {\n /**\n * Use `label` prop for accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.\n */\n label?: string\n}\n\nexport const Spinner = ({\n className,\n size = 'current',\n intent = 'current',\n label,\n isBackgroundVisible,\n ref,\n ...others\n}: PropsWithChildren<SpinnerProps>) => {\n return (\n <span\n role=\"status\"\n data-spark-component=\"spinner\"\n ref={ref}\n className={spinnerStyles({ className, size, intent, isBackgroundVisible })}\n {...others}\n >\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </span>\n )\n}\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nimport {\n contrastVariants,\n filledVariants,\n ghostVariants,\n outlinedVariants,\n tintedVariants,\n} from './variants'\n\nexport const buttonStyles = cva(\n [\n 'u-shadow-border-transition',\n 'box-border inline-flex items-center justify-center gap-md whitespace-nowrap',\n 'px-lg',\n 'text-body-1 font-bold',\n 'focus-visible:u-outline',\n ],\n {\n variants: {\n /**\n * Main style of the button.\n *\n * - `filled`: Button will be plain.\n *\n * - `outlined`: Button will be transparent with an outline.\n *\n * - `tinted`: Button will be filled but using a lighter color scheme.\n *\n * - `ghost`: Button will look like a link. No borders, plain text.\n *\n * - `contrast`: Button will be surface filled. No borders, plain text.\n *\n */\n design: makeVariants<'design', ['filled', 'outlined', 'tinted', 'ghost', 'contrast']>({\n filled: [],\n outlined: ['bg-transparent', 'border-sm', 'border-current'],\n tinted: [],\n ghost: [],\n contrast: ['bg-surface'],\n }),\n /**\n * Color scheme of the button.\n */\n intent: makeVariants<\n 'intent',\n [\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'danger',\n 'info',\n 'neutral',\n 'surface',\n ]\n >({\n main: [],\n support: [],\n accent: [],\n basic: [],\n success: [],\n alert: [],\n danger: [],\n info: [],\n neutral: [],\n surface: [],\n }),\n /**\n * Size of the button.\n */\n size: makeVariants<'size', ['sm', 'md', 'lg']>({\n sm: ['min-w-sz-32', 'h-sz-32'],\n md: ['min-w-sz-44', 'h-sz-44'],\n lg: ['min-w-sz-56', 'h-sz-56'],\n }),\n /**\n * Shape of the button.\n */\n shape: makeVariants<'shape', ['rounded', 'square', 'pill']>({\n rounded: ['rounded-lg'],\n square: ['rounded-0'],\n pill: ['rounded-full'],\n }),\n /**\n * Disable the button, preventing user interaction and adding opacity.\n */\n disabled: {\n true: ['cursor-not-allowed', 'opacity-dim-3'],\n false: ['cursor-pointer'],\n },\n },\n compoundVariants: [\n ...filledVariants,\n ...outlinedVariants,\n ...tintedVariants,\n ...ghostVariants,\n ...contrastVariants,\n ],\n defaultVariants: {\n design: 'filled',\n intent: 'main',\n size: 'md',\n shape: 'rounded',\n },\n }\n)\n\nexport type ButtonStylesProps = VariantProps<typeof buttonStyles>\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const filledVariants = [\n // Main\n {\n intent: 'main',\n design: 'filled',\n class: tw([\n 'bg-main',\n 'text-on-main',\n 'hover:bg-main-hovered',\n 'enabled:active:bg-main-hovered',\n 'focus-visible:bg-main-hovered',\n ]),\n },\n // Support\n {\n intent: 'support',\n design: 'filled',\n class: tw([\n 'bg-support',\n 'text-on-support',\n 'hover:bg-support-hovered',\n 'enabled:active:bg-support-hovered',\n 'focus-visible:bg-support-hovered',\n ]),\n },\n // Accent\n {\n intent: 'accent',\n design: 'filled',\n class: tw([\n 'bg-accent',\n 'text-on-accent',\n 'hover:bg-accent-hovered',\n 'enabled:active:bg-accent-hovered',\n 'focus-visible:bg-accent-hovered',\n ]),\n },\n // Basic\n {\n intent: 'basic',\n design: 'filled',\n class: tw([\n 'bg-basic',\n 'text-on-basic',\n 'hover:bg-basic-hovered',\n 'enabled:active:bg-basic-hovered',\n 'focus-visible:bg-basic-hovered',\n ]),\n },\n // Success\n {\n intent: 'success',\n design: 'filled',\n class: tw([\n 'bg-success',\n 'text-on-success',\n 'hover:bg-success-hovered',\n 'enabled:active:bg-success-hovered',\n 'focus-visible:bg-success-hovered',\n ]),\n },\n // Alert\n {\n intent: 'alert',\n design: 'filled',\n class: tw([\n 'bg-alert',\n 'text-on-alert',\n 'hover:bg-alert-hovered',\n 'enabled:active:bg-alert-hovered',\n 'focus-visible:bg-alert-hovered',\n ]),\n },\n // Danger\n {\n intent: 'danger',\n design: 'filled',\n class: tw([\n 'text-on-error bg-error',\n 'hover:bg-error-hovered enabled:active:bg-error-hovered',\n 'focus-visible:bg-error-hovered',\n ]),\n },\n // Info\n {\n intent: 'info',\n design: 'filled',\n class: tw([\n 'text-on-error bg-info',\n 'hover:bg-info-hovered enabled:active:bg-info-hovered',\n 'focus-visible:bg-info-hovered',\n ]),\n },\n // Neutral\n {\n intent: 'neutral',\n design: 'filled',\n class: tw([\n 'bg-neutral',\n 'text-on-neutral',\n 'hover:bg-neutral-hovered',\n 'enabled:active:bg-neutral-hovered',\n 'focus-visible:bg-neutral-hovered',\n ]),\n },\n // Surface\n {\n intent: 'surface',\n design: 'filled',\n class: tw([\n 'bg-surface',\n 'text-on-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const ghostVariants = [\n {\n intent: 'main',\n design: 'ghost',\n class: tw([\n 'text-main',\n 'hover:bg-main/dim-5',\n 'enabled:active:bg-main/dim-5',\n 'focus-visible:bg-main/dim-5',\n ]),\n },\n {\n intent: 'support',\n design: 'ghost',\n class: tw([\n 'text-support',\n 'hover:bg-support/dim-5',\n 'enabled:active:bg-support/dim-5',\n 'focus-visible:bg-support/dim-5',\n ]),\n },\n {\n intent: 'accent',\n design: 'ghost',\n class: tw([\n 'text-accent',\n 'hover:bg-accent/dim-5',\n 'enabled:active:bg-accent/dim-5',\n 'focus-visible:bg-accent/dim-5',\n ]),\n },\n {\n intent: 'basic',\n design: 'ghost',\n class: tw([\n 'text-basic',\n 'hover:bg-basic/dim-5',\n 'enabled:active:bg-basic/dim-5',\n 'focus-visible:bg-basic/dim-5',\n ]),\n },\n {\n intent: 'success',\n design: 'ghost',\n class: tw([\n 'text-success',\n 'hover:bg-success/dim-5',\n 'enabled:active:bg-success/dim-5',\n 'focus-visible:bg-success/dim-5',\n ]),\n },\n {\n intent: 'alert',\n design: 'ghost',\n class: tw([\n 'text-alert',\n 'hover:bg-alert/dim-5',\n 'enabled:active:bg-alert/dim-5',\n 'focus-visible:bg-alert/dim-5',\n ]),\n },\n {\n intent: 'danger',\n design: 'ghost',\n class: tw([\n 'text-error',\n 'hover:bg-error/dim-5',\n 'enabled:active:bg-error/dim-5',\n 'focus-visible:bg-error/dim-5',\n ]),\n },\n {\n intent: 'info',\n design: 'ghost',\n class: tw([\n 'text-info',\n 'hover:bg-info/dim-5',\n 'enabled:active:bg-info/dim-5',\n 'focus-visible:bg-info/dim-5',\n ]),\n },\n {\n intent: 'neutral',\n design: 'ghost',\n class: tw([\n 'text-neutral',\n 'hover:bg-neutral/dim-5',\n 'enabled:active:bg-neutral/dim-5',\n 'focus-visible:bg-neutral/dim-5',\n ]),\n },\n {\n intent: 'surface',\n design: 'ghost',\n class: tw([\n 'text-surface',\n 'hover:bg-surface/dim-5',\n 'enabled:active:bg-surface/dim-5',\n 'focus-visible:bg-surface/dim-5',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const outlinedVariants = [\n {\n intent: 'main',\n design: 'outlined',\n class: tw([\n 'hover:bg-main/dim-5',\n 'enabled:active:bg-main/dim-5',\n 'focus-visible:bg-main/dim-5',\n 'text-main',\n ]),\n },\n {\n intent: 'support',\n design: 'outlined',\n class: tw([\n 'hover:bg-support/dim-5',\n 'enabled:active:bg-support/dim-5',\n 'focus-visible:bg-support/dim-5',\n 'text-support',\n ]),\n },\n {\n intent: 'accent',\n design: 'outlined',\n class: tw([\n 'hover:bg-accent/dim-5',\n 'enabled:active:bg-accent/dim-5',\n 'focus-visible:bg-accent/dim-5',\n 'text-accent',\n ]),\n },\n {\n intent: 'basic',\n design: 'outlined',\n class: tw([\n 'hover:bg-basic/dim-5',\n 'enabled:active:bg-basic/dim-5',\n 'focus-visible:bg-basic/dim-5',\n 'text-basic',\n ]),\n },\n {\n intent: 'success',\n design: 'outlined',\n class: tw([\n 'hover:bg-success/dim-5',\n 'enabled:active:bg-success/dim-5',\n 'focus-visible:bg-success/dim-5',\n 'text-success',\n ]),\n },\n {\n intent: 'alert',\n design: 'outlined',\n class: tw([\n 'hover:bg-alert/dim-5',\n 'enabled:active:bg-alert/dim-5',\n 'focus-visible:bg-alert/dim-5',\n 'text-alert',\n ]),\n },\n {\n intent: 'danger',\n design: 'outlined',\n class: tw([\n 'hover:bg-error/dim-5',\n 'enabled:active:bg-error/dim-5',\n 'focus-visible:bg-error/dim-5',\n 'text-error',\n ]),\n },\n {\n intent: 'info',\n design: 'outlined',\n class: tw([\n 'hover:bg-info/dim-5',\n 'enabled:active:bg-info/dim-5',\n 'focus-visible:bg-info/dim-5',\n 'text-info',\n ]),\n },\n {\n intent: 'neutral',\n design: 'outlined',\n class: tw([\n 'hover:bg-neutral/dim-5',\n 'enabled:active:bg-neutral/dim-5',\n 'focus-visible:bg-neutral/dim-5',\n 'text-neutral',\n ]),\n },\n {\n intent: 'surface',\n design: 'outlined',\n class: tw([\n 'hover:bg-surface/dim-5',\n 'enabled:active:bg-surface/dim-5',\n 'focus-visible:bg-surface/dim-5',\n 'text-surface',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const tintedVariants = [\n {\n intent: 'main',\n design: 'tinted',\n class: tw([\n 'bg-main-container',\n 'text-on-main-container',\n 'hover:bg-main-container-hovered',\n 'enabled:active:bg-main-container-hovered',\n 'focus-visible:bg-main-container-hovered',\n ]),\n },\n {\n intent: 'support',\n design: 'tinted',\n class: tw([\n 'bg-support-container',\n 'text-on-support-container',\n 'hover:bg-support-container-hovered',\n 'enabled:active:bg-support-container-hovered',\n 'focus-visible:bg-support-container-hovered',\n ]),\n },\n {\n intent: 'accent',\n design: 'tinted',\n class: tw([\n 'bg-accent-container',\n 'text-on-accent-container',\n 'hover:bg-accent-container-hovered',\n 'enabled:active:bg-accent-container-hovered',\n 'focus-visible:bg-accent-container-hovered',\n ]),\n },\n {\n intent: 'basic',\n design: 'tinted',\n class: tw([\n 'bg-basic-container',\n 'text-on-basic-container',\n 'hover:bg-basic-container-hovered',\n 'enabled:active:bg-basic-container-hovered',\n 'focus-visible:bg-basic-container-hovered',\n ]),\n },\n {\n intent: 'success',\n design: 'tinted',\n class: tw([\n 'bg-success-container',\n 'text-on-success-container',\n 'hover:bg-success-container-hovered',\n 'enabled:active:bg-success-container-hovered',\n 'focus-visible:bg-success-container-hovered',\n ]),\n },\n {\n intent: 'alert',\n design: 'tinted',\n class: tw([\n 'bg-alert-container',\n 'text-on-alert-container',\n 'hover:bg-alert-container-hovered',\n 'enabled:active:bg-alert-container-hovered',\n 'focus-visible:bg-alert-container-hovered',\n ]),\n },\n {\n intent: 'danger',\n design: 'tinted',\n class: tw([\n 'bg-error-container',\n 'text-on-error-container',\n 'hover:bg-error-container-hovered',\n 'enabled:active:bg-error-container-hovered',\n 'focus-visible:bg-error-container-hovered',\n ]),\n },\n {\n intent: 'info',\n design: 'tinted',\n class: tw([\n 'bg-info-container',\n 'text-on-info-container',\n 'hover:bg-info-container-hovered',\n 'enabled:active:bg-info-container-hovered',\n 'focus-visible:bg-info-container-hovered',\n ]),\n },\n {\n intent: 'neutral',\n design: 'tinted',\n class: tw([\n 'bg-neutral-container',\n 'text-on-neutral-container',\n 'hover:bg-neutral-container-hovered',\n 'enabled:active:bg-neutral-container-hovered',\n 'focus-visible:bg-neutral-container-hovered',\n ]),\n },\n {\n intent: 'surface',\n design: 'tinted',\n class: tw([\n 'bg-surface',\n 'text-on-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const contrastVariants = [\n {\n intent: 'main',\n design: 'contrast',\n class: tw([\n 'text-main',\n 'hover:bg-main-container-hovered',\n 'enabled:active:bg-main-container-hovered',\n 'focus-visible:bg-main-container-hovered',\n ]),\n },\n {\n intent: 'support',\n design: 'contrast',\n class: tw([\n 'text-support',\n 'hover:bg-support-container-hovered',\n 'enabled:active:bg-support-container-hovered',\n 'focus-visible:bg-support-container-hovered',\n ]),\n },\n {\n intent: 'accent',\n design: 'contrast',\n class: tw([\n 'text-accent',\n 'hover:bg-accent-container-hovered',\n 'enabled:active:bg-accent-container-hovered',\n 'focus-visible:bg-accent-container-hovered',\n ]),\n },\n {\n intent: 'basic',\n design: 'contrast',\n class: tw([\n 'text-basic',\n 'hover:bg-basic-container-hovered',\n 'enabled:active:bg-basic-container-hovered',\n 'focus-visible:bg-basic-container-hovered',\n ]),\n },\n {\n intent: 'success',\n design: 'contrast',\n class: tw([\n 'text-success',\n 'hover:bg-success-container-hovered',\n 'enabled:active:bg-success-container-hovered',\n 'focus-visible:bg-success-container-hovered',\n ]),\n },\n {\n intent: 'alert',\n design: 'contrast',\n class: tw([\n 'text-alert',\n 'hover:bg-alert-container-hovered',\n 'enabled:active:bg-alert-container-hovered',\n 'focus-visible:bg-alert-container-hovered',\n ]),\n },\n {\n intent: 'danger',\n design: 'contrast',\n class: tw([\n 'text-error',\n 'hover:bg-error-container-hovered',\n 'enabled:active:bg-error-container-hovered',\n 'focus-visible:bg-error-container-hovered',\n ]),\n },\n {\n intent: 'info',\n design: 'contrast',\n class: tw([\n 'text-info',\n 'hover:bg-info-container-hovered',\n 'enabled:active:bg-info-container-hovered',\n 'focus-visible:bg-info-container-hovered',\n ]),\n },\n {\n intent: 'neutral',\n design: 'contrast',\n class: tw([\n 'text-neutral',\n 'hover:bg-neutral-container-hovered',\n 'enabled:active:bg-neutral-container-hovered',\n 'focus-visible:bg-neutral-container-hovered',\n ]),\n },\n {\n intent: 'surface',\n design: 'contrast',\n class: tw([\n 'text-on-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n] as const\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\n// override the Button component's px-lg padding by using a more specific class selector (pl-0 pr-0)\nexport const iconButtonStyles = cva(['pl-0 pr-0'], {\n variants: {\n /**\n * Sets the size of the icon.\n */\n size: makeVariants<'size', ['sm', 'md', 'lg']>({\n sm: ['text-body-1'],\n md: ['text-body-1'],\n lg: ['text-display-3'],\n }),\n },\n})\n\nexport type IconButtonStylesProps = VariantProps<typeof iconButtonStyles>\n","import { Ref } from 'react'\n\nimport { Button, ButtonProps } from '../button'\nimport { iconButtonStyles } from './IconButton.styles'\n\nexport interface IconButtonProps extends Omit<ButtonProps, 'loadingText'> {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const IconButton = ({\n design = 'filled',\n disabled = false,\n intent = 'main',\n shape = 'rounded',\n size = 'md',\n className,\n ref,\n ...others\n}: IconButtonProps) => {\n return (\n <Button\n ref={ref}\n className={iconButtonStyles({ size, className })}\n design={design}\n disabled={disabled}\n intent={intent}\n shape={shape}\n size={size}\n {...others}\n />\n )\n}\n\nIconButton.displayName = 'IconButton'\n","import { cx } from 'class-variance-authority'\nimport { ReactNode, useEffect, useRef } from 'react'\n\nimport { useCarouselContext } from './Carousel'\n\ninterface Props {\n children?: ReactNode\n 'aria-label': string\n index: number\n className?: string\n unstyled?: boolean\n}\n\nexport const CarouselPageIndicator = ({\n children,\n unstyled = false,\n index,\n 'aria-label': ariaLabel,\n className,\n}: Props) => {\n const ctx = useCarouselContext()\n\n const ref = useRef<HTMLButtonElement | null>(null)\n\n useEffect(() => {\n if (ctx.pageIndicatorsRefs.current) {\n ctx.pageIndicatorsRefs.current[index] = ref.current\n }\n })\n\n const styles = cx(\n 'group h-sz-16 relative flex',\n 'hover:cursor-pointer',\n 'w-sz-16 data-[state=active]:w-sz-44'\n )\n\n const dotsStyles = cx(\n 'before:rounded-sm before:block before:size-md',\n 'before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2',\n 'data-[state=active]:before:w-sz-32 data-[state=active]:before:bg-basic',\n 'data-[state=inactive]:before:bg-on-surface/dim-3'\n )\n\n return (\n <button\n ref={ref}\n key={index}\n {...ctx.getIndicatorProps({ index })}\n aria-label={ariaLabel}\n className={cx(\n {\n [styles]: !unstyled,\n [dotsStyles]: !unstyled,\n },\n className\n )}\n >\n {children}\n </button>\n )\n}\n\nCarouselPageIndicator.displayName = 'Carousel.PageIndicator'\n","import { cx } from 'class-variance-authority'\nimport { ReactNode } from 'react'\n\nimport { useCarouselContext } from './Carousel'\nimport { CarouselAPI } from './types'\n\ninterface RenderProps extends CarouselAPI {\n pages: number[]\n}\n\ninterface Props {\n children: (renderProps: RenderProps) => ReactNode\n className?: string\n}\n\nexport const CarouselPagePicker = ({ children, className }: Props) => {\n const ctx = useCarouselContext()\n\n return (\n <>\n <div\n {...ctx.getIndicatorGroupProps()}\n className={cx(\n 'default:min-h-sz-16 flex w-full flex-wrap items-center justify-center',\n className\n )}\n >\n {ctx.pageSnapPoints.length <= 1\n ? null\n : children({\n ...ctx,\n pages: Array.from({ length: ctx.pageSnapPoints.length }, (_, i) => i),\n })}\n </div>\n </>\n )\n}\n\nCarouselPagePicker.displayName = 'Carousel.PagePicker'\n","import { ArrowVerticalLeft } from '@spark-ui/icons/ArrowVerticalLeft'\n\nimport { Icon } from '../icon'\nimport { IconButton, IconButtonProps } from '../icon-button'\nimport { useCarouselContext } from './Carousel'\n\nexport const CarouselPrevButton = ({\n 'aria-label': ariaLabel,\n ...buttonProps\n}: IconButtonProps) => {\n const ctx = useCarouselContext()\n\n return (\n <IconButton\n {...ctx.getPrevTriggerProps()}\n intent=\"surface\"\n design=\"filled\"\n className=\"pointer-events-auto cursor-pointer shadow-sm disabled:invisible\"\n aria-label={ariaLabel}\n {...buttonProps}\n >\n <Icon>\n <ArrowVerticalLeft />\n </Icon>\n </IconButton>\n )\n}\n\nCarouselPrevButton.displayName = 'Carousel.PrevButton'\n","import { cx } from 'class-variance-authority'\nimport { ComponentProps, ReactNode, useRef } from 'react'\n\nimport { useCarouselContext } from './Carousel'\nimport { useIsVisible } from './useIsVisible'\n\nexport interface CarouselSlideProps extends ComponentProps<'div'> {\n isSnapPoint?: boolean\n children?: ReactNode\n index?: number\n totalSlides?: number\n className?: string\n}\n\nexport const CarouselSlide = ({\n children,\n index = 0,\n totalSlides,\n className = '',\n ...props\n}: CarouselSlideProps) => {\n const itemRef = useRef<HTMLDivElement>(null)\n const ctx = useCarouselContext()\n\n const isVisible = useIsVisible(itemRef, ctx.ref)\n\n return (\n <div\n ref={itemRef}\n {...ctx.getSlideProps({ index, totalSlides: totalSlides as number })}\n className={cx('default:bg-surface relative overflow-hidden', className)}\n aria-hidden={!isVisible}\n inert={!isVisible}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nCarouselSlide.displayName = 'Carousel.Slide'\n","import { useLayoutEffect, useState, RefObject } from 'react'\n\nexport function useIsVisible(\n elementRef: RefObject<HTMLElement | null>,\n parentRef: RefObject<HTMLElement | null>\n) {\n const [isVisible, setIsVisible] = useState(true)\n\n useLayoutEffect(() => {\n const el = elementRef.current\n const parent = parentRef.current\n\n if (!parent || !el) return\n\n const observer = new IntersectionObserver(\n ([entry]) => {\n if (entry) {\n setIsVisible(entry.isIntersecting)\n }\n },\n { root: parent, threshold: 0.2 }\n )\n\n observer.observe(el)\n\n return () => observer.disconnect()\n })\n\n return isVisible\n}\n","import { cx } from 'class-variance-authority'\nimport { Children, cloneElement, ComponentProps, isValidElement, ReactNode } from 'react'\n\nimport { useCarouselContext } from './Carousel'\nimport { CarouselSlideProps } from './CarouselSlide'\n\ninterface Props extends ComponentProps<'div'> {\n children?: ReactNode\n className?: string\n}\n\nexport const CarouselSlides = ({ children, className = '' }: Props) => {\n const ctx = useCarouselContext()\n\n const childrenElements = Children.toArray(children)\n\n return (\n <div\n {...ctx.getSlidesContainerProps()}\n className={cx(\n 'focus-visible:u-outline relative w-full',\n '[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',\n className\n )}\n >\n {childrenElements.map((child, index) =>\n isValidElement<CarouselSlideProps>(child)\n ? cloneElement(child, {\n index,\n totalSlides: childrenElements.length,\n })\n : child\n )}\n </div>\n )\n}\n\nCarouselSlides.displayName = 'Carousel.Slides'\n","import { ReactNode } from 'react'\n\ninterface Props {\n children: ReactNode\n}\n\nexport const CarouselViewport = ({ children }: Props) => {\n return <div className=\"relative flex items-center justify-around p-0\">{children}</div>\n}\n\nCarouselViewport.displayName = 'Carousel.Viewport'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,kBAAAA;AAAA;AAAA;;;ACAA,sCAAmB;AACnB,IAAAC,gBAAqD;;;ACArD,IAAAC,gBAQO;;;ACTP,mBAAqD;AAQ9C,SAAS,SAAgC,UAAc;AAC5D,QAAM,UAAM,qBAAgC,MAAM;AAChD,UAAM,IAAI,MAAM,+CAA+C;AAAA,EACjE,CAAC;AAED,oCAAgB,MAAM;AACpB,QAAI,UAAU;AAAA,EAChB,CAAC;AAED,aAAO,0BAAyB,IAAI,SAAS,IAAI,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC;AACzE;;;AClBA,IAAAC,gBAAkC;AAE3B,IAAM,eAAe,MAAM;AAChC,QAAM,gBAAY,sBAAO,KAAK;AAE9B,+BAAU,MAAM;AACd,cAAU,UAAU;AAEpB,WAAO,MAAM;AACX,gBAAU,UAAU;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;;;ACdA,IAAAC,gBAA6C;AAEtC,SAAS,aAAa,WAA6C,UAAsB;AAC9F,QAAM,iBAAa,sBAAO,CAAC;AAS3B,QAAM,oBAAgB,sBAA8B,IAAI;AAExD,+BAAU,MAAM;AACd,UAAM,UAAU,UAAU;AAC1B,QAAI,CAAC,QAAS;AAEd,UAAM,oBAAoB,iBAAiB;AAE3C,UAAM,kBAAkB,MAAM;AAC5B,eAAS;AAAA,IACX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A;AAAA,MACE,GAAG,IAAI,wBAAwB;AAAA,MAChC,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC,2BAAiB;AAAA,QAAI,CAAC,OAAO,cAC5B,+BAAmC,KAAK,QACpC,6BAAa,OAAO;AAAA,UAClB;AAAA,UACA,aAAa,iBAAiB;AAAA,QAChC,CAAC,IACD;AAAA,MACN;AAAA;AAAA,EACF;AAEJ;AAEA,eAAe,cAAc;;;AC9BpB,IAAAC,uBAAA;AADF,IAAM,mBAAmB,CAAC,EAAE,SAAS,MAAa;AACvD,SAAO,8CAAC,SAAI,WAAU,iDAAiD,UAAS;AAClF;AAEA,iBAAiB,cAAc;;;AhCAxB,IAAMC,YAST,OAAO,OAAO,UAAM;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,UAAS,cAAc;","names":["Carousel","import_react","import_react","import_react","import_react","import_react","import_react","import_class_variance_authority","import_jsx_runtime","import_react","import_react","import_jsx_runtime","RadixSlot","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_class_variance_authority","import_react","import_internal_utils","import_class_variance_authority","import_jsx_runtime","import_internal_utils","import_class_variance_authority","import_internal_utils","import_internal_utils","import_internal_utils","import_internal_utils","import_internal_utils","import_jsx_runtime","import_internal_utils","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","import_class_variance_authority","import_react","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","import_class_variance_authority","import_react","import_react","import_jsx_runtime","import_class_variance_authority","import_react","import_jsx_runtime","import_jsx_runtime","Carousel"]}
|
|
1
|
+
{"version":3,"sources":["../../src/carousel/index.ts","../../src/carousel/Carousel.tsx","../../src/carousel/useCarousel.ts","../../src/carousel/useEvent.ts","../../src/carousel/useIsMounted.ts","../../src/carousel/useScrollEnd.ts","../../src/carousel/useSnapPoints.ts","../../src/carousel/useResizeObserver.ts","../../src/carousel/utils.ts","../../src/carousel/CarouselControls.tsx","../../src/carousel/CarouselNextButton.tsx","../../src/icon/Icon.tsx","../../src/slot/Slot.tsx","../../src/visually-hidden/VisuallyHidden.tsx","../../src/icon/Icon.styles.tsx","../../src/button/Button.tsx","../../src/spinner/Spinner.styles.tsx","../../src/spinner/Spinner.tsx","../../src/button/Button.styles.tsx","../../src/button/variants/filled.ts","../../src/button/variants/ghost.ts","../../src/button/variants/outlined.ts","../../src/button/variants/tinted.ts","../../src/button/variants/contrast.ts","../../src/icon-button/IconButton.styles.tsx","../../src/icon-button/IconButton.tsx","../../src/carousel/CarouselPageIndicator.tsx","../../src/carousel/CarouselPagePicker.tsx","../../src/carousel/CarouselPrevButton.tsx","../../src/carousel/CarouselSlide.tsx","../../src/carousel/useIsVisible.ts","../../src/carousel/CarouselSlides.tsx","../../src/carousel/CarouselViewport.tsx"],"sourcesContent":["import { Carousel as Root } from './Carousel'\nimport { CarouselControls as Controls } from './CarouselControls'\nimport { CarouselNextButton as NextButton } from './CarouselNextButton'\nimport { CarouselPageIndicator as PageIndicator } from './CarouselPageIndicator'\nimport { CarouselPagePicker as PagePicker } from './CarouselPagePicker'\nimport { CarouselPrevButton as PrevButton } from './CarouselPrevButton'\nimport { CarouselSlide as Slide } from './CarouselSlide'\nimport { CarouselSlides as Slides } from './CarouselSlides'\nimport { CarouselViewport as Viewport } from './CarouselViewport'\n\nexport const Carousel: typeof Root & {\n Controls: typeof Controls\n NextButton: typeof NextButton\n PrevButton: typeof PrevButton\n Slide: typeof Slide\n Slides: typeof Slides\n Viewport: typeof Viewport\n PagePicker: typeof PagePicker\n PageIndicator: typeof PageIndicator\n} = Object.assign(Root, {\n Controls,\n NextButton,\n PrevButton,\n Slide,\n Slides,\n Viewport,\n PagePicker,\n PageIndicator,\n})\n\nCarousel.displayName = 'Carousel'\n","import { cx } from 'class-variance-authority'\nimport { createContext, ReactNode, useContext } from 'react'\n\nimport { CarouselAPI, UseCarouselProps } from './types'\nimport { useCarousel } from './useCarousel'\n\ninterface Props extends UseCarouselProps {\n children?: ReactNode\n className?: string\n}\n\nconst CarouselContext = createContext<CarouselAPI | null>(null)\n\nexport const Carousel = ({\n className,\n snapType = 'mandatory',\n snapStop = 'always',\n scrollBehavior = 'smooth',\n slidesPerMove = 'auto',\n slidesPerPage = 1,\n loop = false,\n children,\n gap = 16,\n defaultPage,\n page,\n onPageChange,\n}: Props) => {\n const carouselApi = useCarousel({\n defaultPage,\n slidesPerPage,\n slidesPerMove,\n loop,\n gap,\n scrollBehavior,\n snapStop,\n snapType,\n page,\n onPageChange,\n })\n\n return (\n <CarouselContext.Provider\n value={{\n ...carouselApi,\n scrollBehavior,\n }}\n >\n <div\n className={cx('gap-lg relative box-border flex flex-col', className)}\n {...carouselApi.getRootProps()}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n )\n}\n\nCarousel.displayName = 'Carousel'\n\nexport const useCarouselContext = () => {\n const context = useContext(CarouselContext)\n\n if (!context) {\n throw Error('useCarouselContext must be used within a Carousel provider')\n }\n\n return context\n}\n","/* eslint-disable max-lines-per-function */\nimport {\n KeyboardEvent,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react'\n\nimport {\n CarouselAPI,\n ComputedControlProps,\n ComputedIndicatorGroupProps,\n ComputedIndicatorProps,\n ComputedRootProps,\n ComputedSlideGroupProps,\n ComputedSlideProps,\n ComputedTriggerProps,\n UseCarouselProps,\n} from './types'\nimport { useEvent } from './useEvent'\nimport { useIsMounted } from './useIsMounted'\nimport { useScrollEnd } from './useScrollEnd'\nimport { useSnapPoints } from './useSnapPoints'\nimport { getSnapPositions, isSnapPoint } from './utils'\n\nconst DATA_SCOPE = 'carousel' as const\nconst DIRECTION = 'ltr' as const\n\nexport const useCarousel = ({\n defaultPage,\n gap = 16,\n snapType = 'mandatory',\n snapStop = 'always',\n scrollPadding = 0,\n slidesPerPage = 1,\n slidesPerMove = 'auto',\n scrollBehavior = 'smooth',\n loop = false,\n // state control\n page: controlledPage,\n onPageChange: onPageChangeProp,\n}: UseCarouselProps): CarouselAPI => {\n const carouselId = useId()\n const [pageState, setPageState] = useState(defaultPage || controlledPage || 0)\n\n const carouselRef = useRef<HTMLDivElement>(null)\n const pageIndicatorsRefs = useRef<(HTMLElement | null)[]>([])\n const isMountedRef = useIsMounted()\n const isMounted = isMountedRef.current\n const onPageChange = useEvent(onPageChangeProp)\n\n const [pageSnapPoints] = useSnapPoints([], {\n carouselRef,\n slidesPerMove,\n slidesPerPage,\n })\n\n const canScrollPrev = useRef(loop || pageState > 0)\n const canScrollNext = useRef(loop || pageState < pageSnapPoints.length - 1)\n canScrollPrev.current = loop || pageState > 0\n canScrollNext.current = loop || pageState < pageSnapPoints.length - 1\n\n const handlePageChange = useCallback(\n (page: number) => {\n if (page !== pageState) {\n setPageState(page)\n onPageChange?.(page)\n }\n },\n [onPageChange, pageState]\n )\n\n const scrollTo = useCallback(\n (page: number, behavior: 'instant' | 'smooth') => {\n if (carouselRef.current) {\n carouselRef.current.scrollTo({\n left: pageSnapPoints[page],\n behavior: behavior === 'instant' ? 'auto' : 'smooth',\n })\n handlePageChange(page)\n }\n },\n [handlePageChange, pageSnapPoints]\n )\n\n const scrollPrev = useCallback(\n (cb?: (pageIndex: number) => void) => {\n if (canScrollPrev) {\n const targetPage =\n loop && pageState === 0 ? pageSnapPoints.length - 1 : Math.max(pageState - 1, 0)\n\n scrollTo(targetPage, scrollBehavior)\n cb?.(targetPage)\n }\n },\n [loop, pageSnapPoints, pageState, scrollBehavior, scrollTo]\n )\n\n const scrollNext = useCallback(\n (cb?: (pageIndex: number) => void) => {\n if (canScrollNext) {\n const targetPage =\n loop && pageState === pageSnapPoints.length - 1\n ? 0\n : Math.min(pageState + 1, pageSnapPoints.length - 1)\n\n scrollTo(targetPage, scrollBehavior)\n cb?.(targetPage)\n }\n },\n [loop, pageSnapPoints, pageState, scrollBehavior, scrollTo]\n )\n\n useEffect(() => {\n if (controlledPage != null) {\n scrollTo(controlledPage, scrollBehavior)\n }\n }, [controlledPage, scrollBehavior, scrollTo])\n\n /**\n * Set the default scroll position of the carousel based on `defaultPage`.\n * As this operation is done before the snap points are set in the state, we have to get them from the ref directly.\n */\n useLayoutEffect(() => {\n if (defaultPage != null && !isMounted && carouselRef.current) {\n const snapPositions = getSnapPositions({\n container: carouselRef.current,\n slidesPerMove,\n slidesPerPage,\n })\n\n carouselRef.current.scrollTo({\n left: snapPositions[defaultPage],\n behavior: 'instant',\n })\n }\n }, [defaultPage, isMounted, slidesPerMove, slidesPerPage])\n\n /**\n * Monitoring scrollend events inside the scrollable area to sync the carousel active page with current scroll position.\n * Scrollend has been chosen over \"scroll\" for performance reason.\n */\n const syncPageStateWithScrollPosition = useCallback(() => {\n if (!carouselRef.current || pageSnapPoints.length === 0) return\n\n const { scrollLeft } = carouselRef.current\n\n const distances = pageSnapPoints.map(pagePosition => Math.abs(scrollLeft - pagePosition))\n const pageInViewport = distances.indexOf(Math.min(...distances))\n\n if (pageInViewport !== -1) {\n handlePageChange(pageInViewport)\n }\n }, [pageSnapPoints, handlePageChange])\n\n useScrollEnd(carouselRef, syncPageStateWithScrollPosition)\n\n const contextValue: CarouselAPI = {\n ref: carouselRef,\n pageIndicatorsRefs,\n // props\n gap,\n snapType,\n snapStop,\n scrollPadding,\n slidesPerPage,\n slidesPerMove,\n scrollBehavior,\n loop,\n // computed state\n page: pageState,\n pageSnapPoints,\n canScrollNext: canScrollNext.current,\n canScrollPrev: canScrollPrev.current,\n scrollTo,\n scrollPrev,\n scrollNext,\n // anatomy\n getRootProps: (): ComputedRootProps => ({\n id: `carousel::${carouselId}:`,\n role: 'region',\n 'aria-roledescription': 'carousel',\n 'data-scope': DATA_SCOPE,\n 'data-part': 'root',\n 'data-orientation': 'horizontal',\n dir: DIRECTION,\n style: {\n '--slides-per-page': slidesPerPage,\n '--slide-spacing': `${gap}px`,\n '--slide-item-size':\n 'calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))',\n },\n }),\n\n getControlProps: (): ComputedControlProps => ({\n 'data-scope': DATA_SCOPE,\n 'data-part': 'control',\n 'data-orientation': 'horizontal',\n }),\n\n getPrevTriggerProps: (): ComputedTriggerProps<'prev-trigger'> => ({\n id: `carousel::${carouselId}::prev-trigger`,\n 'aria-controls': `carousel::${carouselId}::item-group`,\n 'data-scope': DATA_SCOPE,\n 'data-part': 'prev-trigger',\n 'data-orientation': 'horizontal',\n type: 'button',\n dir: DIRECTION,\n disabled: !canScrollPrev.current,\n onClick: () => scrollPrev(),\n }),\n\n getNextTriggerProps: (): ComputedTriggerProps<'next-trigger'> => ({\n id: `carousel::${carouselId}::next-trigger`,\n 'aria-controls': `carousel::${carouselId}::item-group`,\n 'data-scope': DATA_SCOPE,\n 'data-part': 'next-trigger',\n 'data-orientation': 'horizontal',\n type: 'button',\n dir: DIRECTION,\n disabled: !canScrollNext.current,\n onClick: () => scrollNext(),\n }),\n\n getSlidesContainerProps: (): ComputedSlideGroupProps => ({\n id: `carousel::${carouselId}::item-group`,\n /**\n * The carousel pattern was originally designed for a single slide.\n * When there is more than one slide, the aria-live region is set to off to avoid announcing the whole list of slides.\n * This is not ideal but we keep it for backwards compatibility.\n *\n * @see https://www.w3.org/WAI/ARIA/apg/patterns/carousel/#wai-aria-attributes\n */\n 'aria-live': slidesPerPage > 1 ? 'off' : 'polite',\n 'data-scope': DATA_SCOPE,\n 'data-part': 'item-group',\n 'data-orientation': 'horizontal',\n dir: DIRECTION,\n tabIndex: 0,\n style: {\n display: 'grid',\n gap: 'var(--slide-spacing)',\n scrollSnapType: `x ${snapType}`,\n gridAutoFlow: 'column',\n scrollbarWidth: 'none',\n overscrollBehavior: 'contain',\n gridAutoColumns: 'var(--slide-item-size)',\n overflowX: 'auto',\n },\n ref: carouselRef,\n }),\n\n getSlideProps: ({ index }): ComputedSlideProps => {\n const isStopPoint = isSnapPoint(index, {\n container: carouselRef.current,\n slidesPerMove,\n slidesPerPage,\n })\n\n return {\n id: `carousel::${carouselId}::item:${index}`,\n role: 'group',\n 'aria-roledescription': 'slide',\n 'data-scope': DATA_SCOPE,\n 'data-part': 'item',\n 'data-index': index,\n 'data-orientation': 'horizontal',\n dir: DIRECTION,\n style: {\n ...(isStopPoint && {\n scrollSnapAlign: 'start',\n scrollSnapStop: snapStop,\n }),\n },\n }\n },\n\n getIndicatorGroupProps: (): ComputedIndicatorGroupProps => ({\n role: 'radiogroup',\n id: `carousel::${carouselId}::indicator-group`,\n 'data-scope': DATA_SCOPE,\n 'data-part': 'indicator-group',\n 'data-orientation': 'horizontal',\n dir: DIRECTION,\n }),\n\n getIndicatorProps: ({ index }): ComputedIndicatorProps => {\n const isActivePage = index === pageState\n\n return {\n role: 'radio',\n id: `carousel::${carouselId}::indicator:${index}`,\n 'aria-checked': isActivePage,\n 'data-scope': DATA_SCOPE,\n 'data-part': 'indicator',\n 'data-orientation': 'horizontal',\n 'data-index': index,\n 'data-state': isActivePage ? 'active' : 'inactive',\n tabIndex: isActivePage ? 0 : -1,\n onClick: () => {\n scrollTo(index, scrollBehavior)\n },\n onKeyDown: (event: KeyboardEvent) => {\n const focusActiveIndicator = (page: number) => {\n pageIndicatorsRefs.current[page]?.focus()\n }\n\n if (event.key === 'ArrowRight' && canScrollNext) {\n scrollNext(focusActiveIndicator)\n } else if (event.key === 'ArrowLeft' && canScrollPrev) {\n scrollPrev(focusActiveIndicator)\n }\n },\n }\n },\n }\n\n return contextValue\n}\n","import { useCallback, useLayoutEffect, useRef } from 'react'\n\ntype AnyFunction = (...args: any[]) => any\n\n/**\n * Directly from this gist: https://gist.github.com/diegohaz/695097a06f038a707c3a1b11e4e40195\n * Until React releases a native `useEvent` hook.\n */\nexport function useEvent<T extends AnyFunction>(callback?: T) {\n const ref = useRef<AnyFunction | undefined>(() => {\n throw new Error('Cannot call an event handler while rendering.')\n })\n\n useLayoutEffect(() => {\n ref.current = callback\n })\n\n return useCallback<AnyFunction>((...args) => ref.current?.(...args), []) as T\n}\n","import { useEffect, useRef } from 'react'\n\nexport const useIsMounted = () => {\n const isMounted = useRef(false)\n\n useEffect(() => {\n isMounted.current = true\n\n return () => {\n isMounted.current = false\n }\n }, [])\n\n return isMounted\n}\n","import { useEffect, useRef, RefObject } from 'react'\n\nexport function useScrollEnd(scrollRef: RefObject<HTMLDivElement | null>, callback: () => void) {\n const scrollLeft = useRef(0)\n\n /**\n * Safari (and some smaller browsers) to not yet support the `scrollend` event.\n * For those we must rely on the `scroll` event and and an idle state delay to trigger the \"scroll end\".\n *\n * Caveats:\n * - when using a trackpad or your fingers on a touch device, scrolling then holding the position might trigger the \"scrollend\" callback too early.\n */\n const safariTimeout = useRef<NodeJS.Timeout | null>(null)\n\n useEffect(() => {\n const element = scrollRef.current\n if (!element) return\n\n const supportsScrollend = 'onscrollend' in window\n\n const handleScrollEnd = () => {\n callback()\n }\n\n const handleSafariScroll = () => {\n if (safariTimeout.current) {\n clearTimeout(safariTimeout.current)\n }\n\n if (scrollRef.current) {\n scrollLeft.current = scrollRef.current.scrollLeft\n\n safariTimeout.current = setTimeout(() => {\n if (scrollRef.current) {\n handleScrollEnd()\n }\n }, 150)\n }\n }\n\n if (supportsScrollend) {\n element.addEventListener('scrollend', handleScrollEnd)\n } else {\n element.addEventListener('scroll', handleSafariScroll)\n }\n\n return () => {\n if (safariTimeout.current) {\n clearTimeout(safariTimeout.current)\n }\n\n if (supportsScrollend) {\n element.removeEventListener('scrollend', handleScrollEnd)\n } else {\n element.removeEventListener('scroll', handleSafariScroll)\n }\n }\n }, [callback, scrollRef])\n}\n\nexport default useScrollEnd\n","import { useMemo, useState, RefObject } from 'react'\n\nimport { useResizeObserver } from './useResizeObserver'\nimport { getSnapPositions } from './utils'\n\n/**\n * Get the scroll value of each slides that serves as the start of a page\n * The array is updated when resize event are caught in the carousel.\n */\nexport function useSnapPoints<T extends HTMLDivElement | null>(\n initialSnapPoints: number[] = [],\n {\n carouselRef,\n slidesPerMove,\n slidesPerPage,\n }: {\n carouselRef: RefObject<T>\n slidesPerMove: 'auto' | number\n slidesPerPage: number\n }\n) {\n const [pageSnapPoints, setPageSnapPoints] = useState(initialSnapPoints)\n\n const stableSnapPoints = useMemo(() => pageSnapPoints, [pageSnapPoints])\n\n /**\n * On resize, dimensions of the carousel might changes, which requires to update the snap points positions in the state.\n */\n useResizeObserver(carouselRef, () => {\n const newSnapPoints = getSnapPositions({\n slidesPerMove,\n slidesPerPage,\n container: carouselRef.current,\n })\n\n if (JSON.stringify(pageSnapPoints) !== JSON.stringify(newSnapPoints)) {\n setPageSnapPoints(newSnapPoints)\n }\n })\n\n return [stableSnapPoints, setPageSnapPoints] as const\n}\n","import { useLayoutEffect, RefObject } from 'react'\n\nexport function useResizeObserver<T extends HTMLElement | null>(\n ref: RefObject<T>,\n callback: (width: number) => void\n) {\n useLayoutEffect(() => {\n const element = ref.current\n if (!element) return\n\n const observer = new ResizeObserver(entries => {\n for (const entry of entries) {\n callback(entry.contentRect.width)\n }\n })\n\n observer.observe(element)\n\n return () => observer.disconnect() // Cleanup on unmount\n }, [ref, callback])\n}\n","/**\n * Get the indices of each slides that serves as the start of a page\n * @returns number[] (ex: [0, 2, 4])\n */\nfunction getSnapIndices({\n totalSlides,\n slidesPerMove,\n slidesPerPage,\n}: {\n totalSlides: number\n slidesPerMove: number | 'auto'\n slidesPerPage: number\n}) {\n const slideBy = slidesPerMove === 'auto' ? slidesPerPage : slidesPerMove\n const snapPoints: number[] = []\n\n const lastSnapIndex = Math.floor((totalSlides - slidesPerPage) / slideBy) * slideBy\n\n for (let i = 0; i <= lastSnapIndex; i += slideBy) {\n snapPoints.push(i)\n }\n\n // Adding final snap point if necessary\n if (snapPoints[snapPoints.length - 1] !== totalSlides - slidesPerPage) {\n snapPoints.push(totalSlides - slidesPerPage)\n }\n\n return snapPoints\n}\n\nexport function getSlideElements(container: HTMLDivElement | null): Element[] {\n return container ? Array.from(container.querySelectorAll('[data-part=\"item\"]')) : []\n}\n\nexport function isSnapPoint(\n slideIndex: number,\n {\n container,\n slidesPerMove,\n slidesPerPage,\n }: {\n container: HTMLDivElement | null\n slidesPerMove: number | 'auto'\n slidesPerPage: number\n }\n) {\n return getSnapIndices({\n totalSlides: getSlideElements(container).length,\n slidesPerPage,\n slidesPerMove,\n }).includes(slideIndex)\n}\n\n/**\n * Get the scroll value of each slides that serves as the start of a page\n * @returns number[] (ex for a 400px carousel with no gap: [400, 800, 1200])\n */\nexport function getSnapPositions({\n container,\n slidesPerMove,\n slidesPerPage,\n}: {\n container: HTMLDivElement | null\n slidesPerMove: number | 'auto'\n slidesPerPage: number\n}) {\n if (!container) return []\n\n return getSlideElements(container)\n .filter((_, index) => {\n return isSnapPoint(index, {\n slidesPerMove,\n slidesPerPage,\n container,\n })\n })\n .map(slide => (slide as HTMLElement).offsetLeft)\n}\n","import { cx } from 'class-variance-authority'\nimport { HTMLAttributes, ReactNode } from 'react'\n\nimport { useCarouselContext } from './Carousel'\n\ninterface ControlsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport const CarouselControls = ({ children, className, ...props }: ControlsProps) => {\n const ctx = useCarouselContext()\n\n return (\n <div\n className={cx(\n 'default:px-lg pointer-events-none absolute inset-0 flex flex-row items-center justify-between',\n className\n )}\n {...ctx.getControlProps()}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nCarouselControls.displayName = 'Carousel.Controls'\n","import { ArrowVerticalRight } from '@spark-ui/icons/ArrowVerticalRight'\n\nimport { Icon } from '../icon'\nimport { IconButton, IconButtonProps } from '../icon-button'\nimport { useCarouselContext } from './Carousel'\n\nexport const CarouselNextButton = ({\n 'aria-label': ariaLabel,\n ...buttonProps\n}: IconButtonProps) => {\n const ctx = useCarouselContext()\n\n return (\n <IconButton\n {...ctx.getNextTriggerProps()}\n intent=\"surface\"\n design=\"filled\"\n className=\"pointer-events-auto cursor-pointer shadow-sm disabled:invisible\"\n aria-label={ariaLabel}\n {...buttonProps}\n >\n <Icon>\n <ArrowVerticalRight />\n </Icon>\n </IconButton>\n )\n}\n\nCarouselNextButton.displayName = 'Carousel.NextButton'\n","import { Children, cloneElement, ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { iconStyles, IconVariantsProps } from './Icon.styles'\n\nexport interface IconProps extends IconVariantsProps, ComponentPropsWithoutRef<'svg'> {\n /**\n * The svg icon that will be wrapped\n */\n children: ReactNode\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label?: string\n}\n\nexport const Icon = ({\n label,\n className,\n size = 'current',\n intent = 'current',\n children,\n ...others\n}: IconProps) => {\n const child = Children.only(children)\n\n return (\n <>\n {cloneElement(child as ReactElement<Record<string, any>>, {\n className: iconStyles({ className, size, intent }),\n 'data-spark-component': 'icon',\n 'aria-hidden': 'true',\n focusable: 'false',\n ...others,\n })}\n\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </>\n )\n}\n\nIcon.displayName = 'Icon'\n","import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n","import { HTMLAttributes, PropsWithChildren, Ref } from 'react'\n\nimport { Slot } from '../slot'\n\nexport type VisuallyHiddenProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLElement>\n}\n\nexport const VisuallyHidden = ({ asChild = false, ref, ...props }: VisuallyHiddenProps) => {\n const Component = asChild ? Slot : 'span'\n\n return (\n <Component\n {...props}\n ref={ref}\n style={{\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n ...props.style,\n }}\n />\n )\n}\n\nVisuallyHidden.displayName = 'VisuallyHidden'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const iconStyles = cva(['fill-current shrink-0'], {\n variants: {\n /**\n * Color scheme of the icon.\n */\n intent: makeVariants<\n 'intent',\n [\n 'current',\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'error',\n 'info',\n 'neutral',\n ]\n >({\n current: ['text-current'],\n main: ['text-main'],\n support: ['text-support'],\n accent: ['text-accent'],\n basic: ['text-basic'],\n success: ['text-success'],\n alert: ['text-alert'],\n error: ['text-error'],\n info: ['text-info'],\n neutral: ['text-neutral'],\n }),\n /**\n * Sets the size of the icon.\n */\n size: makeVariants<'size', ['current', 'sm', 'md', 'lg', 'xl']>({\n current: ['u-current-font-size'],\n sm: ['w-sz-16', 'h-sz-16'],\n md: ['w-sz-24', 'h-sz-24'],\n lg: ['w-sz-32', 'h-sz-32'],\n xl: ['w-sz-40', 'h-sz-40'],\n }),\n },\n})\n\nexport type IconVariantsProps = VariantProps<typeof iconStyles>\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, type DOMAttributes, Ref, useMemo } from 'react'\n\nimport { Slot, wrapPolymorphicSlot } from '../slot'\nimport { Spinner, type SpinnerProps } from '../spinner'\nimport { buttonStyles, type ButtonStylesProps } from './Button.styles'\n\nexport interface ButtonProps\n extends Omit<ComponentPropsWithoutRef<'button'>, 'disabled'>,\n ButtonStylesProps {\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild?: boolean\n /**\n * Display a spinner to indicate to the user that the button is loading something after they interacted with it.\n */\n isLoading?: boolean\n /**\n * If your loading state should only display a spinner, it's better to specify a label for it (a11y).\n */\n loadingLabel?: string\n /**\n * If your loading state should also display a label, you can use this prop instead of `loadingLabel`.\n * **Please note that using this can result in layout shifting when the Button goes from loading state to normal state.**\n */\n loadingText?: string\n ref?: Ref<HTMLButtonElement>\n}\n\ntype DOMAttributesEventHandler = keyof Omit<\n DOMAttributes<HTMLButtonElement>,\n 'children' | 'dangerouslySetInnerHTML'\n>\n\nconst blockedEventHandlers: DOMAttributesEventHandler[] = [\n 'onClick',\n 'onMouseDown',\n 'onMouseUp',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseOver',\n 'onMouseOut',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'onSubmit',\n]\n\nexport const Button = ({\n children,\n design = 'filled',\n disabled = false,\n intent = 'main',\n isLoading = false,\n loadingLabel,\n loadingText,\n shape = 'rounded',\n size = 'md',\n asChild,\n className,\n underline = false,\n ref,\n ...others\n}: ButtonProps) => {\n const Component = asChild ? Slot : 'button'\n\n const shouldNotInteract = !!disabled || isLoading\n\n const disabledEventHandlers = useMemo(() => {\n const result: Partial<Record<DOMAttributesEventHandler, () => void>> = {}\n\n if (shouldNotInteract) {\n blockedEventHandlers.forEach(eventHandler => (result[eventHandler] = undefined))\n }\n\n return result\n }, [shouldNotInteract])\n\n const spinnerProps = {\n size: 'current' as SpinnerProps['size'],\n className: loadingText ? 'inline-block' : 'absolute',\n ...(loadingLabel && { 'aria-label': loadingLabel }),\n }\n\n return (\n <Component\n data-spark-component=\"button\"\n {...(Component === 'button' && { type: 'button' })}\n ref={ref}\n className={buttonStyles({\n className,\n design,\n disabled: shouldNotInteract,\n intent,\n shape,\n size,\n underline,\n })}\n disabled={!!disabled}\n aria-busy={isLoading}\n aria-live={isLoading ? 'assertive' : 'off'}\n {...others}\n {...disabledEventHandlers}\n >\n {wrapPolymorphicSlot(asChild, children, slotted =>\n isLoading ? (\n <>\n <Spinner {...spinnerProps} />\n {loadingText && loadingText}\n\n <div\n aria-hidden\n className={cx('gap-md', loadingText ? 'hidden' : 'inline-flex opacity-0')}\n >\n {slotted}\n </div>\n </>\n ) : (\n slotted\n )\n )}\n </Component>\n )\n}\n\nButton.displayName = 'Button'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nconst defaultVariants = {\n intent: 'current',\n size: 'current',\n isBackgroundVisible: false,\n} as const\n\nexport const spinnerStyles = cva(\n ['inline-block', 'border-solid', 'rounded-full', 'border-md', 'animate-spin'],\n {\n variants: {\n /**\n * Use `size` prop to set the size of the spinner. If you want to set the full size for the spinner, don't forget to add a wrapping container with its own size.\n */\n size: {\n current: ['u-current-font-size'],\n sm: ['w-sz-20', 'h-sz-20'],\n md: ['w-sz-28', 'h-sz-28'],\n full: ['w-full', 'h-full'],\n },\n /**\n * Color scheme of the spinner.\n */\n intent: makeVariants<\n 'intent',\n [\n 'current',\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'error',\n 'info',\n 'neutral',\n ]\n >({\n current: ['border-current'],\n main: ['border-main'],\n support: ['border-support'],\n accent: ['border-accent'],\n basic: ['border-basic'],\n success: ['border-success'],\n alert: ['border-alert'],\n error: ['border-error'],\n info: ['border-info'],\n neutral: ['border-neutral'],\n }),\n /**\n * Size of the button.\n */\n isBackgroundVisible: {\n true: ['border-b-neutral-container', 'border-l-neutral-container'],\n false: ['border-b-transparent', 'border-l-transparent'],\n },\n },\n defaultVariants,\n }\n)\n\nexport type SpinnerStylesProps = VariantProps<typeof spinnerStyles>\n","import { ComponentPropsWithRef, PropsWithChildren } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { spinnerStyles, SpinnerStylesProps } from './Spinner.styles'\n\nexport interface SpinnerProps extends ComponentPropsWithRef<'div'>, SpinnerStylesProps {\n /**\n * Use `label` prop for accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.\n */\n label?: string\n}\n\nexport const Spinner = ({\n className,\n size = 'current',\n intent = 'current',\n label,\n isBackgroundVisible,\n ref,\n ...others\n}: PropsWithChildren<SpinnerProps>) => {\n return (\n <span\n role=\"status\"\n data-spark-component=\"spinner\"\n ref={ref}\n className={spinnerStyles({ className, size, intent, isBackgroundVisible })}\n {...others}\n >\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </span>\n )\n}\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nimport {\n contrastVariants,\n filledVariants,\n ghostVariants,\n outlinedVariants,\n tintedVariants,\n} from './variants'\n\nexport const buttonStyles = cva(\n [\n 'u-shadow-border-transition',\n 'box-border inline-flex items-center justify-center gap-md whitespace-nowrap',\n 'default:px-lg',\n 'text-body-1 font-bold',\n 'focus-visible:u-outline',\n ],\n {\n variants: {\n /**\n * Main style of the button.\n *\n * - `filled`: Button will be plain.\n *\n * - `outlined`: Button will be transparent with an outline.\n *\n * - `tinted`: Button will be filled but using a lighter color scheme.\n *\n * - `ghost`: Button will look like a link. No borders, plain text.\n *\n * - `contrast`: Button will be surface filled. No borders, plain text.\n *\n */\n design: makeVariants<'design', ['filled', 'outlined', 'tinted', 'ghost', 'contrast']>({\n filled: [],\n outlined: ['bg-transparent', 'border-sm', 'border-current'],\n tinted: [],\n ghost: ['default:-mx-md px-md hover:bg-main/dim-5'],\n contrast: ['bg-surface'],\n }),\n underline: {\n true: ['underline'],\n },\n /**\n * Color scheme of the button.\n */\n intent: makeVariants<\n 'intent',\n [\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'danger',\n 'info',\n 'neutral',\n 'surface',\n ]\n >({\n main: [],\n support: [],\n accent: [],\n basic: [],\n success: [],\n alert: [],\n danger: [],\n info: [],\n neutral: [],\n surface: [],\n }),\n /**\n * Size of the button.\n */\n size: makeVariants<'size', ['sm', 'md', 'lg']>({\n sm: ['min-w-sz-32', 'h-sz-32'],\n md: ['min-w-sz-44', 'h-sz-44'],\n lg: ['min-w-sz-56', 'h-sz-56'],\n }),\n /**\n * Shape of the button.\n */\n shape: makeVariants<'shape', ['rounded', 'square', 'pill']>({\n rounded: ['rounded-lg'],\n square: ['rounded-0'],\n pill: ['rounded-full'],\n }),\n /**\n * Disable the button, preventing user interaction and adding opacity.\n */\n disabled: {\n true: ['cursor-not-allowed', 'opacity-dim-3'],\n false: ['cursor-pointer'],\n },\n },\n compoundVariants: [\n ...filledVariants,\n ...outlinedVariants,\n ...tintedVariants,\n ...ghostVariants,\n ...contrastVariants,\n ],\n defaultVariants: {\n design: 'filled',\n intent: 'main',\n size: 'md',\n shape: 'rounded',\n },\n }\n)\n\nexport type ButtonStylesProps = VariantProps<typeof buttonStyles>\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const filledVariants = [\n // Main\n {\n intent: 'main',\n design: 'filled',\n class: tw([\n 'bg-main',\n 'text-on-main',\n 'hover:bg-main-hovered',\n 'enabled:active:bg-main-hovered',\n 'focus-visible:bg-main-hovered',\n ]),\n },\n // Support\n {\n intent: 'support',\n design: 'filled',\n class: tw([\n 'bg-support',\n 'text-on-support',\n 'hover:bg-support-hovered',\n 'enabled:active:bg-support-hovered',\n 'focus-visible:bg-support-hovered',\n ]),\n },\n // Accent\n {\n intent: 'accent',\n design: 'filled',\n class: tw([\n 'bg-accent',\n 'text-on-accent',\n 'hover:bg-accent-hovered',\n 'enabled:active:bg-accent-hovered',\n 'focus-visible:bg-accent-hovered',\n ]),\n },\n // Basic\n {\n intent: 'basic',\n design: 'filled',\n class: tw([\n 'bg-basic',\n 'text-on-basic',\n 'hover:bg-basic-hovered',\n 'enabled:active:bg-basic-hovered',\n 'focus-visible:bg-basic-hovered',\n ]),\n },\n // Success\n {\n intent: 'success',\n design: 'filled',\n class: tw([\n 'bg-success',\n 'text-on-success',\n 'hover:bg-success-hovered',\n 'enabled:active:bg-success-hovered',\n 'focus-visible:bg-success-hovered',\n ]),\n },\n // Alert\n {\n intent: 'alert',\n design: 'filled',\n class: tw([\n 'bg-alert',\n 'text-on-alert',\n 'hover:bg-alert-hovered',\n 'enabled:active:bg-alert-hovered',\n 'focus-visible:bg-alert-hovered',\n ]),\n },\n // Danger\n {\n intent: 'danger',\n design: 'filled',\n class: tw([\n 'text-on-error bg-error',\n 'hover:bg-error-hovered enabled:active:bg-error-hovered',\n 'focus-visible:bg-error-hovered',\n ]),\n },\n // Info\n {\n intent: 'info',\n design: 'filled',\n class: tw([\n 'text-on-error bg-info',\n 'hover:bg-info-hovered enabled:active:bg-info-hovered',\n 'focus-visible:bg-info-hovered',\n ]),\n },\n // Neutral\n {\n intent: 'neutral',\n design: 'filled',\n class: tw([\n 'bg-neutral',\n 'text-on-neutral',\n 'hover:bg-neutral-hovered',\n 'enabled:active:bg-neutral-hovered',\n 'focus-visible:bg-neutral-hovered',\n ]),\n },\n // Surface\n {\n intent: 'surface',\n design: 'filled',\n class: tw([\n 'bg-surface',\n 'text-on-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const ghostVariants = [\n {\n intent: 'main',\n design: 'ghost',\n class: tw([\n 'text-main',\n 'hover:bg-main/dim-5',\n 'enabled:active:bg-main/dim-5',\n 'focus-visible:bg-main/dim-5',\n ]),\n },\n {\n intent: 'support',\n design: 'ghost',\n class: tw([\n 'text-support',\n 'hover:bg-support/dim-5',\n 'enabled:active:bg-support/dim-5',\n 'focus-visible:bg-support/dim-5',\n ]),\n },\n {\n intent: 'accent',\n design: 'ghost',\n class: tw([\n 'text-accent',\n 'hover:bg-accent/dim-5',\n 'enabled:active:bg-accent/dim-5',\n 'focus-visible:bg-accent/dim-5',\n ]),\n },\n {\n intent: 'basic',\n design: 'ghost',\n class: tw([\n 'text-basic',\n 'hover:bg-basic/dim-5',\n 'enabled:active:bg-basic/dim-5',\n 'focus-visible:bg-basic/dim-5',\n ]),\n },\n {\n intent: 'success',\n design: 'ghost',\n class: tw([\n 'text-success',\n 'hover:bg-success/dim-5',\n 'enabled:active:bg-success/dim-5',\n 'focus-visible:bg-success/dim-5',\n ]),\n },\n {\n intent: 'alert',\n design: 'ghost',\n class: tw([\n 'text-alert',\n 'hover:bg-alert/dim-5',\n 'enabled:active:bg-alert/dim-5',\n 'focus-visible:bg-alert/dim-5',\n ]),\n },\n {\n intent: 'danger',\n design: 'ghost',\n class: tw([\n 'text-error',\n 'hover:bg-error/dim-5',\n 'enabled:active:bg-error/dim-5',\n 'focus-visible:bg-error/dim-5',\n ]),\n },\n {\n intent: 'info',\n design: 'ghost',\n class: tw([\n 'text-info',\n 'hover:bg-info/dim-5',\n 'enabled:active:bg-info/dim-5',\n 'focus-visible:bg-info/dim-5',\n ]),\n },\n {\n intent: 'neutral',\n design: 'ghost',\n class: tw([\n 'text-neutral',\n 'hover:bg-neutral/dim-5',\n 'enabled:active:bg-neutral/dim-5',\n 'focus-visible:bg-neutral/dim-5',\n ]),\n },\n {\n intent: 'surface',\n design: 'ghost',\n class: tw([\n 'text-surface',\n 'hover:bg-surface/dim-5',\n 'enabled:active:bg-surface/dim-5',\n 'focus-visible:bg-surface/dim-5',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const outlinedVariants = [\n {\n intent: 'main',\n design: 'outlined',\n class: tw([\n 'hover:bg-main/dim-5',\n 'enabled:active:bg-main/dim-5',\n 'focus-visible:bg-main/dim-5',\n 'text-main',\n ]),\n },\n {\n intent: 'support',\n design: 'outlined',\n class: tw([\n 'hover:bg-support/dim-5',\n 'enabled:active:bg-support/dim-5',\n 'focus-visible:bg-support/dim-5',\n 'text-support',\n ]),\n },\n {\n intent: 'accent',\n design: 'outlined',\n class: tw([\n 'hover:bg-accent/dim-5',\n 'enabled:active:bg-accent/dim-5',\n 'focus-visible:bg-accent/dim-5',\n 'text-accent',\n ]),\n },\n {\n intent: 'basic',\n design: 'outlined',\n class: tw([\n 'hover:bg-basic/dim-5',\n 'enabled:active:bg-basic/dim-5',\n 'focus-visible:bg-basic/dim-5',\n 'text-basic',\n ]),\n },\n {\n intent: 'success',\n design: 'outlined',\n class: tw([\n 'hover:bg-success/dim-5',\n 'enabled:active:bg-success/dim-5',\n 'focus-visible:bg-success/dim-5',\n 'text-success',\n ]),\n },\n {\n intent: 'alert',\n design: 'outlined',\n class: tw([\n 'hover:bg-alert/dim-5',\n 'enabled:active:bg-alert/dim-5',\n 'focus-visible:bg-alert/dim-5',\n 'text-alert',\n ]),\n },\n {\n intent: 'danger',\n design: 'outlined',\n class: tw([\n 'hover:bg-error/dim-5',\n 'enabled:active:bg-error/dim-5',\n 'focus-visible:bg-error/dim-5',\n 'text-error',\n ]),\n },\n {\n intent: 'info',\n design: 'outlined',\n class: tw([\n 'hover:bg-info/dim-5',\n 'enabled:active:bg-info/dim-5',\n 'focus-visible:bg-info/dim-5',\n 'text-info',\n ]),\n },\n {\n intent: 'neutral',\n design: 'outlined',\n class: tw([\n 'hover:bg-neutral/dim-5',\n 'enabled:active:bg-neutral/dim-5',\n 'focus-visible:bg-neutral/dim-5',\n 'text-neutral',\n ]),\n },\n {\n intent: 'surface',\n design: 'outlined',\n class: tw([\n 'hover:bg-surface/dim-5',\n 'enabled:active:bg-surface/dim-5',\n 'focus-visible:bg-surface/dim-5',\n 'text-surface',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const tintedVariants = [\n {\n intent: 'main',\n design: 'tinted',\n class: tw([\n 'bg-main-container',\n 'text-on-main-container',\n 'hover:bg-main-container-hovered',\n 'enabled:active:bg-main-container-hovered',\n 'focus-visible:bg-main-container-hovered',\n ]),\n },\n {\n intent: 'support',\n design: 'tinted',\n class: tw([\n 'bg-support-container',\n 'text-on-support-container',\n 'hover:bg-support-container-hovered',\n 'enabled:active:bg-support-container-hovered',\n 'focus-visible:bg-support-container-hovered',\n ]),\n },\n {\n intent: 'accent',\n design: 'tinted',\n class: tw([\n 'bg-accent-container',\n 'text-on-accent-container',\n 'hover:bg-accent-container-hovered',\n 'enabled:active:bg-accent-container-hovered',\n 'focus-visible:bg-accent-container-hovered',\n ]),\n },\n {\n intent: 'basic',\n design: 'tinted',\n class: tw([\n 'bg-basic-container',\n 'text-on-basic-container',\n 'hover:bg-basic-container-hovered',\n 'enabled:active:bg-basic-container-hovered',\n 'focus-visible:bg-basic-container-hovered',\n ]),\n },\n {\n intent: 'success',\n design: 'tinted',\n class: tw([\n 'bg-success-container',\n 'text-on-success-container',\n 'hover:bg-success-container-hovered',\n 'enabled:active:bg-success-container-hovered',\n 'focus-visible:bg-success-container-hovered',\n ]),\n },\n {\n intent: 'alert',\n design: 'tinted',\n class: tw([\n 'bg-alert-container',\n 'text-on-alert-container',\n 'hover:bg-alert-container-hovered',\n 'enabled:active:bg-alert-container-hovered',\n 'focus-visible:bg-alert-container-hovered',\n ]),\n },\n {\n intent: 'danger',\n design: 'tinted',\n class: tw([\n 'bg-error-container',\n 'text-on-error-container',\n 'hover:bg-error-container-hovered',\n 'enabled:active:bg-error-container-hovered',\n 'focus-visible:bg-error-container-hovered',\n ]),\n },\n {\n intent: 'info',\n design: 'tinted',\n class: tw([\n 'bg-info-container',\n 'text-on-info-container',\n 'hover:bg-info-container-hovered',\n 'enabled:active:bg-info-container-hovered',\n 'focus-visible:bg-info-container-hovered',\n ]),\n },\n {\n intent: 'neutral',\n design: 'tinted',\n class: tw([\n 'bg-neutral-container',\n 'text-on-neutral-container',\n 'hover:bg-neutral-container-hovered',\n 'enabled:active:bg-neutral-container-hovered',\n 'focus-visible:bg-neutral-container-hovered',\n ]),\n },\n {\n intent: 'surface',\n design: 'tinted',\n class: tw([\n 'bg-surface',\n 'text-on-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const contrastVariants = [\n {\n intent: 'main',\n design: 'contrast',\n class: tw([\n 'text-main',\n 'hover:bg-main-container-hovered',\n 'enabled:active:bg-main-container-hovered',\n 'focus-visible:bg-main-container-hovered',\n ]),\n },\n {\n intent: 'support',\n design: 'contrast',\n class: tw([\n 'text-support',\n 'hover:bg-support-container-hovered',\n 'enabled:active:bg-support-container-hovered',\n 'focus-visible:bg-support-container-hovered',\n ]),\n },\n {\n intent: 'accent',\n design: 'contrast',\n class: tw([\n 'text-accent',\n 'hover:bg-accent-container-hovered',\n 'enabled:active:bg-accent-container-hovered',\n 'focus-visible:bg-accent-container-hovered',\n ]),\n },\n {\n intent: 'basic',\n design: 'contrast',\n class: tw([\n 'text-basic',\n 'hover:bg-basic-container-hovered',\n 'enabled:active:bg-basic-container-hovered',\n 'focus-visible:bg-basic-container-hovered',\n ]),\n },\n {\n intent: 'success',\n design: 'contrast',\n class: tw([\n 'text-success',\n 'hover:bg-success-container-hovered',\n 'enabled:active:bg-success-container-hovered',\n 'focus-visible:bg-success-container-hovered',\n ]),\n },\n {\n intent: 'alert',\n design: 'contrast',\n class: tw([\n 'text-alert',\n 'hover:bg-alert-container-hovered',\n 'enabled:active:bg-alert-container-hovered',\n 'focus-visible:bg-alert-container-hovered',\n ]),\n },\n {\n intent: 'danger',\n design: 'contrast',\n class: tw([\n 'text-error',\n 'hover:bg-error-container-hovered',\n 'enabled:active:bg-error-container-hovered',\n 'focus-visible:bg-error-container-hovered',\n ]),\n },\n {\n intent: 'info',\n design: 'contrast',\n class: tw([\n 'text-info',\n 'hover:bg-info-container-hovered',\n 'enabled:active:bg-info-container-hovered',\n 'focus-visible:bg-info-container-hovered',\n ]),\n },\n {\n intent: 'neutral',\n design: 'contrast',\n class: tw([\n 'text-neutral',\n 'hover:bg-neutral-container-hovered',\n 'enabled:active:bg-neutral-container-hovered',\n 'focus-visible:bg-neutral-container-hovered',\n ]),\n },\n {\n intent: 'surface',\n design: 'contrast',\n class: tw([\n 'text-on-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n] as const\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\n// override the Button component's px-lg padding by using a more specific class selector (pl-0 pr-0)\nexport const iconButtonStyles = cva(['pl-0 pr-0'], {\n variants: {\n /**\n * Sets the size of the icon.\n */\n size: makeVariants<'size', ['sm', 'md', 'lg']>({\n sm: ['text-body-1'],\n md: ['text-body-1'],\n lg: ['text-display-3'],\n }),\n },\n})\n\nexport type IconButtonStylesProps = VariantProps<typeof iconButtonStyles>\n","import { Ref } from 'react'\n\nimport { Button, ButtonProps } from '../button'\nimport { iconButtonStyles } from './IconButton.styles'\n\nexport interface IconButtonProps extends Omit<ButtonProps, 'loadingText'> {\n 'aria-label': string\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const IconButton = ({\n design = 'filled',\n disabled = false,\n intent = 'main',\n shape = 'rounded',\n size = 'md',\n className,\n ref,\n ...others\n}: IconButtonProps) => {\n return (\n <Button\n ref={ref}\n className={iconButtonStyles({ size, className })}\n design={design}\n disabled={disabled}\n intent={intent}\n shape={shape}\n size={size}\n {...others}\n />\n )\n}\n\nIconButton.displayName = 'IconButton'\n","import { cx } from 'class-variance-authority'\nimport { ReactNode, useEffect, useRef } from 'react'\n\nimport { useCarouselContext } from './Carousel'\n\ninterface Props {\n children?: ReactNode\n 'aria-label': string\n index: number\n className?: string\n unstyled?: boolean\n}\n\nexport const CarouselPageIndicator = ({\n children,\n unstyled = false,\n index,\n 'aria-label': ariaLabel,\n className,\n}: Props) => {\n const ctx = useCarouselContext()\n\n const ref = useRef<HTMLButtonElement | null>(null)\n\n useEffect(() => {\n if (ctx.pageIndicatorsRefs.current) {\n ctx.pageIndicatorsRefs.current[index] = ref.current\n }\n })\n\n const styles = cx(\n 'group h-sz-16 relative flex',\n 'hover:cursor-pointer',\n 'w-sz-16 data-[state=active]:w-sz-44'\n )\n\n const dotsStyles = cx(\n 'before:rounded-sm before:block before:size-md',\n 'before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2',\n 'data-[state=active]:before:w-sz-32 data-[state=active]:before:bg-basic',\n 'data-[state=inactive]:before:bg-on-surface/dim-3'\n )\n\n return (\n <button\n ref={ref}\n key={index}\n {...ctx.getIndicatorProps({ index })}\n aria-label={ariaLabel}\n className={cx(\n {\n [styles]: !unstyled,\n [dotsStyles]: !unstyled,\n },\n className\n )}\n >\n {children}\n </button>\n )\n}\n\nCarouselPageIndicator.displayName = 'Carousel.PageIndicator'\n","import { cx } from 'class-variance-authority'\nimport { ReactNode } from 'react'\n\nimport { useCarouselContext } from './Carousel'\nimport { CarouselAPI } from './types'\n\ninterface RenderProps extends CarouselAPI {\n pages: number[]\n}\n\ninterface Props {\n children: (renderProps: RenderProps) => ReactNode\n className?: string\n}\n\nexport const CarouselPagePicker = ({ children, className }: Props) => {\n const ctx = useCarouselContext()\n\n return (\n <>\n <div\n {...ctx.getIndicatorGroupProps()}\n className={cx(\n 'default:min-h-sz-16 flex w-full flex-wrap items-center justify-center',\n className\n )}\n >\n {ctx.pageSnapPoints.length <= 1\n ? null\n : children({\n ...ctx,\n pages: Array.from({ length: ctx.pageSnapPoints.length }, (_, i) => i),\n })}\n </div>\n </>\n )\n}\n\nCarouselPagePicker.displayName = 'Carousel.PagePicker'\n","import { ArrowVerticalLeft } from '@spark-ui/icons/ArrowVerticalLeft'\n\nimport { Icon } from '../icon'\nimport { IconButton, IconButtonProps } from '../icon-button'\nimport { useCarouselContext } from './Carousel'\n\nexport const CarouselPrevButton = ({\n 'aria-label': ariaLabel,\n ...buttonProps\n}: IconButtonProps) => {\n const ctx = useCarouselContext()\n\n return (\n <IconButton\n {...ctx.getPrevTriggerProps()}\n intent=\"surface\"\n design=\"filled\"\n className=\"pointer-events-auto cursor-pointer shadow-sm disabled:invisible\"\n aria-label={ariaLabel}\n {...buttonProps}\n >\n <Icon>\n <ArrowVerticalLeft />\n </Icon>\n </IconButton>\n )\n}\n\nCarouselPrevButton.displayName = 'Carousel.PrevButton'\n","import { cx } from 'class-variance-authority'\nimport { ComponentProps, ReactNode, useRef } from 'react'\n\nimport { useCarouselContext } from './Carousel'\nimport { useIsVisible } from './useIsVisible'\n\nexport interface CarouselSlideProps extends ComponentProps<'div'> {\n isSnapPoint?: boolean\n children?: ReactNode\n index?: number\n totalSlides?: number\n className?: string\n}\n\nexport const CarouselSlide = ({\n children,\n index = 0,\n totalSlides,\n className = '',\n ...props\n}: CarouselSlideProps) => {\n const itemRef = useRef<HTMLDivElement>(null)\n const ctx = useCarouselContext()\n\n const isVisible = useIsVisible(itemRef, ctx.ref)\n\n return (\n <div\n ref={itemRef}\n {...ctx.getSlideProps({ index, totalSlides: totalSlides as number })}\n className={cx('default:bg-surface relative overflow-hidden', className)}\n aria-hidden={!isVisible}\n inert={!isVisible}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nCarouselSlide.displayName = 'Carousel.Slide'\n","import { useLayoutEffect, useState, RefObject } from 'react'\n\nexport function useIsVisible(\n elementRef: RefObject<HTMLElement | null>,\n parentRef: RefObject<HTMLElement | null>\n) {\n const [isVisible, setIsVisible] = useState(true)\n\n useLayoutEffect(() => {\n const el = elementRef.current\n const parent = parentRef.current\n\n if (!parent || !el) return\n\n const observer = new IntersectionObserver(\n ([entry]) => {\n if (entry) {\n setIsVisible(entry.isIntersecting)\n }\n },\n { root: parent, threshold: 0.2 }\n )\n\n observer.observe(el)\n\n return () => observer.disconnect()\n })\n\n return isVisible\n}\n","import { cx } from 'class-variance-authority'\nimport { Children, cloneElement, ComponentProps, isValidElement, ReactNode } from 'react'\n\nimport { useCarouselContext } from './Carousel'\nimport { CarouselSlideProps } from './CarouselSlide'\n\ninterface Props extends ComponentProps<'div'> {\n children?: ReactNode\n className?: string\n}\n\nexport const CarouselSlides = ({ children, className = '' }: Props) => {\n const ctx = useCarouselContext()\n\n const childrenElements = Children.toArray(children)\n\n return (\n <div\n {...ctx.getSlidesContainerProps()}\n className={cx(\n 'focus-visible:u-outline relative w-full',\n '[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',\n className\n )}\n >\n {childrenElements.map((child, index) =>\n isValidElement<CarouselSlideProps>(child)\n ? cloneElement(child, {\n index,\n totalSlides: childrenElements.length,\n })\n : child\n )}\n </div>\n )\n}\n\nCarouselSlides.displayName = 'Carousel.Slides'\n","import { ReactNode } from 'react'\n\ninterface Props {\n children: ReactNode\n}\n\nexport const CarouselViewport = ({ children }: Props) => {\n return <div className=\"relative flex items-center justify-around p-0\">{children}</div>\n}\n\nCarouselViewport.displayName = 'Carousel.Viewport'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,kBAAAA;AAAA;AAAA;;;ACAA,sCAAmB;AACnB,IAAAC,gBAAqD;;;ACArD,IAAAC,gBAQO;;;ACTP,mBAAqD;AAQ9C,SAAS,SAAgC,UAAc;AAC5D,QAAM,UAAM,qBAAgC,MAAM;AAChD,UAAM,IAAI,MAAM,+CAA+C;AAAA,EACjE,CAAC;AAED,oCAAgB,MAAM;AACpB,QAAI,UAAU;AAAA,EAChB,CAAC;AAED,aAAO,0BAAyB,IAAI,SAAS,IAAI,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC;AACzE;;;AClBA,IAAAC,gBAAkC;AAE3B,IAAM,eAAe,MAAM;AAChC,QAAM,gBAAY,sBAAO,KAAK;AAE9B,+BAAU,MAAM;AACd,cAAU,UAAU;AAEpB,WAAO,MAAM;AACX,gBAAU,UAAU;AAAA,IACtB;AAAA,EACF,GAAG,C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,OAAO,YAAmC,CAAC;AAAA,MACnE,eAAW,sCAAG,+CAA+C,SAAS;AAAA,MACtE,eAAa,CAAC;AAAA,MACd,OAAO,CAAC;AAAA,MACP,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,cAAc,cAAc;;;AExC5B,IAAAC,oCAAmB;AACnB,IAAAC,iBAAkF;AAgB9E,IAAAC,uBAAA;AANG,IAAM,iBAAiB,CAAC,EAAE,UAAU,YAAY,GAAG,MAAa;AACrE,QAAM,MAAM,mBAAmB;AAE/B,QAAM,mBAAmB,wBAAS,QAAQ,QAAQ;AAElD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG,IAAI,wBAAwB;AAAA,MAChC,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC,2BAAiB;AAAA,QAAI,CAAC,OAAO,cAC5B,+BAAmC,KAAK,QACpC,6BAAa,OAAO;AAAA,UAClB;AAAA,UACA,aAAa,iBAAiB;AAAA,QAChC,CAAC,IACD;AAAA,MACN;AAAA;AAAA,EACF;AAEJ;AAEA,eAAe,cAAc;;;AC9BpB,IAAAC,uBAAA;AADF,IAAM,mBAAmB,CAAC,EAAE,SAAS,MAAa;AACvD,SAAO,8CAAC,SAAI,WAAU,iDAAiD,UAAS;AAClF;AAEA,iBAAiB,cAAc;;;AhCAxB,IAAMC,YAST,OAAO,OAAO,UAAM;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,UAAS,cAAc;","names":["Carousel","import_react","import_react","import_react","import_react","import_react","import_react","import_class_variance_authority","import_jsx_runtime","import_react","import_react","import_jsx_runtime","RadixSlot","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_class_variance_authority","import_react","import_internal_utils","import_class_variance_authority","import_jsx_runtime","import_internal_utils","import_class_variance_authority","import_internal_utils","import_internal_utils","import_internal_utils","import_internal_utils","import_internal_utils","import_jsx_runtime","import_internal_utils","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","import_class_variance_authority","import_react","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","import_class_variance_authority","import_react","import_react","import_jsx_runtime","import_class_variance_authority","import_react","import_jsx_runtime","import_jsx_runtime","Carousel"]}
|
package/dist/carousel/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IconButton
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SBJNVOF7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Icon
|
|
6
6
|
} from "./chunk-UMUMFMFB.mjs";
|
|
@@ -311,4 +311,4 @@ Description.displayName = "Dialog.Description";
|
|
|
311
311
|
export {
|
|
312
312
|
Dialog2 as Dialog
|
|
313
313
|
};
|
|
314
|
-
//# sourceMappingURL=chunk-
|
|
314
|
+
//# sourceMappingURL=chunk-3PRCMWLU.mjs.map
|
|
@@ -235,7 +235,8 @@ var inputAddonStyles = cva2(
|
|
|
235
235
|
"border-sm",
|
|
236
236
|
"shrink-0",
|
|
237
237
|
"h-full",
|
|
238
|
-
"focus-visible:relative focus-visible:z-raised"
|
|
238
|
+
"focus-visible:relative focus-visible:z-raised",
|
|
239
|
+
"mx-0"
|
|
239
240
|
],
|
|
240
241
|
{
|
|
241
242
|
variants: {
|
|
@@ -608,4 +609,4 @@ export {
|
|
|
608
609
|
Input,
|
|
609
610
|
InputGroup2 as InputGroup
|
|
610
611
|
};
|
|
611
|
-
//# sourceMappingURL=chunk-
|
|
612
|
+
//# sourceMappingURL=chunk-73YYIDSP.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/input/InputClearButton.tsx","../src/input/InputGroupContext.ts","../src/input/InputGroup.tsx","../src/input/InputGroup.styles.ts","../src/input/InputLeadingAddon.tsx","../src/input/InputAddon.tsx","../src/input/InputAddon.styles.ts","../src/input/InputLeadingIcon.tsx","../src/input/InputIcon.tsx","../src/input/InputTrailingAddon.tsx","../src/input/InputTrailingIcon.tsx","../src/input/Input.tsx","../src/input/Input.styles.ts","../src/input/index.ts"],"sourcesContent":["import { DeleteOutline } from '@spark-ui/icons/DeleteOutline'\nimport { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, MouseEventHandler, Ref } from 'react'\n\nimport { Icon } from '../icon'\nimport { useInputGroup } from './InputGroupContext'\n\nexport interface InputClearButtonProps extends ComponentPropsWithoutRef<'button'> {\n 'aria-label': string\n inline?: boolean\n ref?: Ref<HTMLButtonElement>\n}\n\nconst Root = ({\n className,\n tabIndex = -1,\n onClick,\n inline = false,\n ref,\n ...others\n}: InputClearButtonProps) => {\n const { onClear, hasTrailingIcon } = useInputGroup()\n\n const handleClick: MouseEventHandler<HTMLButtonElement> = event => {\n if (onClick) {\n onClick(event)\n }\n\n if (onClear) {\n onClear()\n }\n }\n\n return (\n <button\n ref={ref}\n className={cx(\n className,\n 'pointer-events-auto absolute',\n inline ? 'h-sz-44 top-0 -translate-y-0' : 'top-1/2 -translate-y-1/2',\n 'inline-flex h-full items-center justify-center outline-hidden',\n 'text-neutral hover:text-neutral-hovered',\n hasTrailingIcon ? 'right-3xl px-sz-12' : 'pl-md pr-lg right-0'\n )}\n tabIndex={tabIndex}\n onClick={handleClick}\n type=\"button\"\n {...others}\n >\n <Icon size=\"sm\">\n <DeleteOutline />\n </Icon>\n </button>\n )\n}\n\nexport const InputClearButton = Object.assign(Root, {\n id: 'ClearButton',\n})\n\nRoot.displayName = 'InputGroup.ClearButton'\n","import { createContext, useContext } from 'react'\n\nexport interface InputGroupContextValue {\n disabled?: boolean\n readOnly?: boolean\n hasLeadingIcon: boolean\n hasTrailingIcon: boolean\n hasLeadingAddon: boolean\n hasTrailingAddon: boolean\n hasClearButton: boolean\n state: null | undefined | 'error' | 'alert' | 'success'\n isStandalone?: boolean\n onClear: () => void\n}\n\nexport const InputGroupContext = createContext<Partial<InputGroupContextValue> | null>(null)\n\nexport const useInputGroup = () => {\n const context = useContext(InputGroupContext)\n\n return context || { isStandalone: true }\n}\n","/* eslint-disable complexity */\n\nimport { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { useCombinedState } from '@spark-ui/hooks/use-combined-state'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport {\n ChangeEventHandler,\n Children,\n cloneElement,\n ComponentPropsWithoutRef,\n DetailedReactHTMLElement,\n FC,\n isValidElement,\n PropsWithChildren,\n ReactElement,\n Ref,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react'\n\nimport { InputProps } from './Input'\nimport { inputGroupStyles, InputGroupStylesProps } from './InputGroup.styles'\nimport { InputGroupContext } from './InputGroupContext'\n\nexport interface InputGroupProps extends ComponentPropsWithoutRef<'div'>, InputGroupStylesProps {\n /**\n * Use `state` prop to assign a specific state to the group, choosing from: `error`, `alert` and `success`. By doing so, the outline styles will be updated.\n */\n state?: 'error' | 'alert' | 'success'\n /**\n * Function handler to be executed after the input has been cleared.\n */\n onClear?: () => void\n ref?: Ref<HTMLDivElement>\n}\n\nexport const InputGroup = ({\n className,\n children: childrenProp,\n state: stateProp,\n disabled: disabledProp,\n readOnly: readOnlyProp,\n onClear,\n ref: forwardedRef,\n ...others\n}: PropsWithChildren<InputGroupProps>) => {\n const getElementId = (element?: ReactElement) => {\n return element ? (element.type as FC & { id?: string }).id : ''\n }\n\n const findElement = (...values: string[]) => {\n return children.find(child => values.includes(getElementId(child) || ''))\n }\n\n const children = Children.toArray(childrenProp).filter(isValidElement)\n const input = findElement('Input') as\n | DetailedReactHTMLElement<InputProps, HTMLInputElement>\n | undefined\n const props = input?.props || {}\n\n const inputRef = useRef<HTMLInputElement>(null!)\n const onClearRef = useRef(onClear)\n const ref = useMergeRefs<HTMLInputElement>(input?.ref, inputRef)\n const [value, onChange] = useCombinedState(\n props.value as string,\n props.defaultValue as string,\n props.onValueChange\n )\n\n // Data derivated from FormField context\n const field = useFormFieldControl()\n const state = field.state ?? stateProp\n const disabled = field.disabled || !!disabledProp\n const readOnly = field.readOnly || !!readOnlyProp\n\n // InputGroup elements (in visual order)\n const leadingAddon = findElement('LeadingAddon')\n const leadingIcon = findElement('LeadingIcon')\n const clearButton = findElement('ClearButton')\n const trailingIcon = findElement('TrailingIcon')\n const trailingAddon = findElement('TrailingAddon')\n\n // Acknowledge which subComponents are used in the compound context\n const hasLeadingAddon = !!leadingAddon\n const hasTrailingAddon = !!trailingAddon\n const hasLeadingIcon = !!leadingIcon\n const hasTrailingIcon = !!trailingIcon\n const hasClearButton = !!value && !!clearButton && !disabled && !readOnly\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = event => {\n if (props.onChange) {\n props.onChange(event)\n }\n\n onChange(event.target.value)\n }\n\n const handleClear = useCallback(() => {\n if (onClearRef.current) {\n onClearRef.current()\n }\n\n onChange('')\n\n inputRef.current.focus()\n }, [onChange])\n\n const current = useMemo(() => {\n return {\n state,\n disabled,\n readOnly,\n hasLeadingIcon,\n hasTrailingIcon,\n hasLeadingAddon,\n hasTrailingAddon,\n hasClearButton,\n onClear: handleClear,\n }\n }, [\n state,\n disabled,\n readOnly,\n hasLeadingIcon,\n hasTrailingIcon,\n hasLeadingAddon,\n hasTrailingAddon,\n hasClearButton,\n handleClear,\n ])\n\n useEffect(() => {\n onClearRef.current = onClear\n }, [onClear])\n\n return (\n <InputGroupContext.Provider value={current}>\n <div\n ref={forwardedRef}\n className={inputGroupStyles({ disabled, readOnly, className })}\n {...others}\n >\n {hasLeadingAddon && leadingAddon}\n\n <div className=\"relative inline-flex w-full\">\n {input &&\n cloneElement(input, {\n ref,\n defaultValue: undefined,\n value: value ?? '',\n onChange: handleChange,\n })}\n\n {leadingIcon}\n\n {hasClearButton && clearButton}\n\n {trailingIcon}\n </div>\n\n {hasTrailingAddon && trailingAddon}\n </div>\n </InputGroupContext.Provider>\n )\n}\n\nInputGroup.displayName = 'InputGroup'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const inputGroupStyles = cva(['relative inline-flex w-full'], {\n variants: {\n /**\n * When `true`, prevents the user from interacting.\n */\n disabled: {\n true: [\n 'cursor-not-allowed',\n 'relative',\n 'after:absolute',\n 'after:top-0',\n 'after:h-full',\n 'after:w-full',\n 'after:border-sm after:border-outline',\n 'after:rounded-lg',\n ],\n false: 'after:hidden',\n },\n /**\n * Sets the component as interactive or not.\n */\n readOnly: {\n true: [\n 'relative',\n 'after:absolute',\n 'after:top-0',\n 'after:h-full',\n 'after:w-full',\n 'after:border-sm after:border-outline',\n 'after:rounded-lg',\n ],\n false: 'after:hidden',\n },\n },\n})\n\nexport type InputGroupStylesProps = VariantProps<typeof inputGroupStyles>\n","import { cx } from 'class-variance-authority'\nimport { Ref } from 'react'\n\nimport { InputAddon, InputAddonProps } from './InputAddon'\nimport { useInputGroup } from './InputGroupContext'\n\nexport type InputLeadingAddonProps = InputAddonProps & {\n ref?: Ref<HTMLDivElement>\n}\n\nconst Root = ({ className, ref, ...others }: InputLeadingAddonProps) => {\n const { disabled, readOnly } = useInputGroup()\n const isInactive = disabled || readOnly\n\n return (\n <div className={cx('rounded-l-lg', isInactive ? 'bg-on-surface/dim-5' : null)}>\n <InputAddon\n ref={ref}\n className={cx(className, 'rounded-r-0! mr-[-1px] rounded-l-lg')}\n {...others}\n />\n </div>\n )\n}\n\nexport const InputLeadingAddon = Object.assign(Root, {\n id: 'LeadingAddon',\n})\n\nRoot.displayName = 'InputGroup.LeadingAddon'\n","import { Children, type ComponentPropsWithoutRef, type PropsWithChildren, Ref } from 'react'\n\nimport { Slot } from '../slot'\nimport { inputAddonStyles, type InputAddonStylesProps } from './InputAddon.styles'\nimport { useInputGroup } from './InputGroupContext'\n\nexport interface InputAddonProps\n extends ComponentPropsWithoutRef<'div'>,\n Omit<InputAddonStylesProps, 'intent' | 'disabled'> {\n ref?: Ref<HTMLDivElement>\n}\n\nexport const InputAddon = ({\n asChild: asChildProp,\n className,\n children,\n ref,\n ...others\n}: PropsWithChildren<InputAddonProps>) => {\n const { state, disabled, readOnly } = useInputGroup()\n\n const isRawText = typeof children === 'string'\n const asChild = !!(isRawText ? false : asChildProp)\n const child = isRawText ? children : Children.only(children)\n const Component = asChild && !isRawText ? Slot : 'div'\n\n const getDesign = (): InputAddonStylesProps['design'] => {\n if (isRawText) return 'text'\n\n return asChild ? 'solid' : 'inline'\n }\n\n const design = getDesign()\n\n return (\n <Component\n ref={ref}\n className={inputAddonStyles({\n className,\n intent: state,\n disabled,\n readOnly,\n asChild,\n design,\n })}\n {...(disabled && { tabIndex: -1 })}\n {...others}\n >\n {child}\n </Component>\n )\n}\n\nInputAddon.displayName = 'InputGroup.Addon'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const inputAddonStyles = cva(\n [\n 'overflow-hidden',\n 'border-sm',\n 'shrink-0',\n 'h-full',\n 'focus-visible:relative focus-visible:z-raised',\n 'mx-0',\n ],\n {\n variants: {\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild: { false: ['flex', 'items-center', 'px-lg'] },\n intent: {\n neutral: 'border-outline',\n error: 'border-error',\n alert: 'border-alert',\n success: 'border-success',\n },\n /**\n * Disable the input addon, preventing user interaction and adding opacity.\n */\n disabled: {\n true: ['pointer-events-none border-outline!'],\n },\n /**\n * Changes input addon styles based on the read only status from the input.\n */\n readOnly: {\n true: ['pointer-events-none'],\n },\n /**\n * Main style of the input addon.\n */\n design: {\n text: '',\n solid: '',\n inline: '',\n },\n },\n compoundVariants: [\n {\n disabled: false,\n readOnly: false,\n design: 'text',\n class: ['bg-surface', 'text-on-surface'],\n },\n {\n disabled: true,\n design: 'text',\n class: ['text-on-surface/dim-3'],\n },\n {\n disabled: true,\n design: ['solid', 'inline'],\n class: ['opacity-dim-3'],\n },\n ],\n defaultVariants: {\n intent: 'neutral',\n },\n }\n)\n\nexport type InputAddonStylesProps = VariantProps<typeof inputAddonStyles>\n","import { cx } from 'class-variance-authority'\n\nimport { InputIcon, InputIconProps } from './InputIcon'\n\nexport type InputLeadingIconProps = InputIconProps\n\nexport const InputLeadingIcon = ({ className, ...others }: InputLeadingIconProps) => (\n <InputIcon className={cx(className, 'left-lg text-body-1')} {...others} />\n)\n\nInputLeadingIcon.id = 'LeadingIcon'\nInputLeadingIcon.displayName = 'InputGroup.LeadingIcon'\n","import { cx } from 'class-variance-authority'\n\nimport { Icon, type IconProps } from '../icon'\nimport { useInputGroup } from './InputGroupContext'\n\nexport type InputIconProps = IconProps\n\nexport const InputIcon = ({ className, intent, children, ...others }: InputIconProps) => {\n const { disabled, readOnly } = useInputGroup()\n const isInactive = disabled || readOnly\n\n return (\n <Icon\n intent={intent}\n className={cx(\n className,\n 'pointer-events-none absolute top-[calc(var(--spacing-sz-44)/2)] -translate-y-1/2',\n intent ? undefined : 'text-neutral peer-focus:text-outline-high',\n isInactive ? 'opacity-dim-3' : undefined\n )}\n {...others}\n >\n {children}\n </Icon>\n )\n}\n\nInputIcon.displayName = 'InputGroup.Icon'\n","import { cx } from 'class-variance-authority'\nimport { Ref } from 'react'\n\nimport { InputAddon, InputAddonProps } from './InputAddon'\nimport { useInputGroup } from './InputGroupContext'\n\nexport type InputTrailingAddonProps = InputAddonProps & {\n ref?: Ref<HTMLDivElement>\n}\n\nconst Root = ({ className, ref, ...others }: InputTrailingAddonProps) => {\n const { disabled, readOnly } = useInputGroup()\n const isInactive = disabled || readOnly\n\n return (\n <div className={cx('rounded-r-lg', isInactive ? 'bg-on-surface/dim-5' : null)}>\n <InputAddon\n ref={ref}\n className={cx(className, 'rounded-l-0! ml-[-1px] rounded-r-lg')}\n {...others}\n />\n </div>\n )\n}\n\nexport const InputTrailingAddon = Object.assign(Root, {\n id: 'TrailingAddon',\n})\n\nRoot.displayName = 'InputGroup.TrailingAddon'\n","import { cx } from 'class-variance-authority'\n\nimport { InputIcon, InputIconProps } from './InputIcon'\n\nexport type InputTrailingIconProps = InputIconProps\n\nexport const InputTrailingIcon = ({ className, ...others }: InputTrailingIconProps) => (\n <InputIcon className={cx(className, 'right-lg text-body-1')} {...others} />\n)\n\nInputTrailingIcon.id = 'TrailingIcon'\nInputTrailingIcon.displayName = 'InputGroup.TrailingIcon'\n","import { useFormFieldControl } from '@spark-ui/components/form-field'\nimport { ChangeEventHandler, ComponentPropsWithoutRef, KeyboardEventHandler, Ref } from 'react'\n\nimport { Slot } from '../slot'\nimport { inputStyles } from './Input.styles'\nimport { useInputGroup } from './InputGroupContext'\n\ntype InputPrimitiveProps = ComponentPropsWithoutRef<'input'>\n\nexport interface InputProps extends InputPrimitiveProps {\n asChild?: boolean\n onValueChange?: (value: string) => void\n ref?: Ref<HTMLInputElement>\n}\n\nconst Root = ({\n className,\n asChild = false,\n onValueChange,\n onChange,\n onKeyDown,\n disabled: disabledProp,\n readOnly: readOnlyProp,\n ref,\n ...others\n}: InputProps) => {\n const field = useFormFieldControl()\n const group = useInputGroup()\n\n const { id, name, isInvalid, isRequired, description } = field\n const {\n hasLeadingAddon,\n hasTrailingAddon,\n hasLeadingIcon,\n hasTrailingIcon,\n hasClearButton,\n onClear,\n } = group\n const Component = asChild ? Slot : 'input'\n const state = field.state || group.state\n const disabled = field.disabled || group.disabled || disabledProp\n const readOnly = field.readOnly || group.readOnly || readOnlyProp\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = event => {\n if (onChange) {\n onChange(event)\n }\n\n if (onValueChange) {\n onValueChange(event.target.value)\n }\n }\n\n const handleKeyDown: KeyboardEventHandler<HTMLInputElement> = event => {\n if (onKeyDown) {\n onKeyDown(event)\n }\n\n if (hasClearButton && onClear && event.key === 'Escape') {\n onClear()\n }\n }\n\n return (\n <Component\n ref={ref}\n id={id}\n name={name}\n className={inputStyles({\n asChild,\n className,\n intent: state,\n hasLeadingAddon: !!hasLeadingAddon,\n hasTrailingAddon: !!hasTrailingAddon,\n hasLeadingIcon: !!hasLeadingIcon,\n hasTrailingIcon: !!hasTrailingIcon,\n hasClearButton: !!hasClearButton,\n })}\n disabled={disabled}\n readOnly={readOnly}\n required={isRequired}\n aria-describedby={description}\n aria-invalid={isInvalid}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n {...others}\n />\n )\n}\n\nexport const Input = Object.assign(Root, {\n id: 'Input',\n})\n\nRoot.displayName = 'Input'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const inputStyles = cva(\n [\n 'relative',\n 'border-sm',\n 'peer',\n 'w-full',\n 'appearance-none outline-hidden',\n 'bg-surface',\n 'text-ellipsis text-body-1 text-on-surface',\n 'caret-neutral',\n '[&:-webkit-autofill]:[-webkit-text-fill-color:var(--color-on-surface)]',\n 'autofill:shadow-surface autofill:shadow-[inset_0_0_0px_1000px]',\n 'disabled:cursor-not-allowed disabled:border-outline disabled:bg-on-surface/dim-5 disabled:text-on-surface/dim-3',\n 'read-only:cursor-default read-only:pointer-events-none read-only:bg-on-surface/dim-5',\n 'focus:ring-1 focus:ring-inset',\n ],\n {\n variants: {\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild: {\n true: ['min-h-sz-44'],\n false: ['h-sz-44'],\n },\n /**\n * Color scheme of the button.\n */\n intent: {\n neutral: [\n 'border-outline',\n 'hover:border-outline-high',\n 'focus:ring-outline-high focus:border-outline-high',\n ],\n success: ['border-success', 'focus:ring-success'],\n alert: ['border-alert', 'focus:ring-alert'],\n error: ['border-error', 'focus:ring-error'],\n },\n /**\n * Sets if there is an addon before the input text.\n */\n hasLeadingAddon: {\n true: ['rounded-l-0'],\n false: ['rounded-l-lg'],\n },\n /**\n * Sets if there is an addon after the input text.\n */\n hasTrailingAddon: {\n true: ['rounded-r-0'],\n false: ['rounded-r-lg'],\n },\n /**\n * Sets if there is an icon before the input text.\n */\n hasLeadingIcon: {\n true: ['pl-3xl'],\n false: ['pl-lg'],\n },\n /**\n * Sets if there is an icon after the input text.\n */\n hasTrailingIcon: { true: '' },\n /**\n * Sets if there is a button to clear the input text.\n */\n hasClearButton: { true: '' },\n },\n compoundVariants: [\n {\n hasTrailingIcon: false,\n hasClearButton: false,\n class: 'pr-lg',\n },\n {\n hasTrailingIcon: true,\n hasClearButton: false,\n class: 'pr-3xl',\n },\n {\n hasTrailingIcon: false,\n hasClearButton: true,\n class: 'pr-3xl',\n },\n {\n hasTrailingIcon: true,\n hasClearButton: true,\n class: 'pr-[calc(var(--spacing-3xl)*2)]',\n },\n ],\n defaultVariants: {\n intent: 'neutral',\n },\n }\n)\n\nexport type InputStylesProps = VariantProps<typeof inputStyles>\n","import { InputClearButton } from './InputClearButton'\nimport { InputGroup as Root } from './InputGroup'\nimport { InputLeadingAddon } from './InputLeadingAddon'\nimport { InputLeadingIcon } from './InputLeadingIcon'\nimport { InputTrailingAddon } from './InputTrailingAddon'\nimport { InputTrailingIcon } from './InputTrailingIcon'\n\nexport * from './Input'\n\nexport const InputGroup: typeof Root & {\n LeadingAddon: typeof InputLeadingAddon\n TrailingAddon: typeof InputTrailingAddon\n LeadingIcon: typeof InputLeadingIcon\n TrailingIcon: typeof InputTrailingIcon\n ClearButton: typeof InputClearButton\n} = Object.assign(Root, {\n LeadingAddon: InputLeadingAddon,\n TrailingAddon: InputTrailingAddon,\n LeadingIcon: InputLeadingIcon,\n TrailingIcon: InputTrailingIcon,\n ClearButton: InputClearButton,\n})\n\nInputGroup.displayName = 'InputGroup'\nInputLeadingAddon.displayName = 'InputGroup.LeadingAddon'\nInputTrailingAddon.displayName = 'InputGroup.TrailingAddon'\nInputLeadingIcon.displayName = 'InputGroup.LeadingIcon'\nInputTrailingIcon.displayName = 'InputGroup.TrailingIcon'\nInputClearButton.displayName = 'InputGroup.ClearButton'\n\nexport { useInputGroup } from './InputGroupContext'\nexport { type InputGroupProps } from './InputGroup'\nexport { type InputLeadingIconProps } from './InputLeadingIcon'\nexport { type InputTrailingIconProps } from './InputTrailingIcon'\nexport { type InputLeadingAddonProps } from './InputLeadingAddon'\nexport { type InputTrailingAddonProps } from './InputTrailingAddon'\nexport { type InputClearButtonProps } from './InputClearButton'\n"],"mappings":";;;;;;;;AAAA,SAAS,qBAAqB;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AA,MACA;AAAA,MACA,WAAW,YAAY;AAAA,QACrB;AAAA,QACA;AAAA,QACA,QAAQ;AAAA,QACR,iBAAiB,CAAC,CAAC;AAAA,QACnB,kBAAkB,CAAC,CAAC;AAAA,QACpB,gBAAgB,CAAC,CAAC;AAAA,QAClB,iBAAiB,CAAC,CAAC;AAAA,QACnB,gBAAgB,CAAC,CAAC;AAAA,MACpB,CAAC;AAAA,MACD;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,oBAAkB;AAAA,MAClB,gBAAc;AAAA,MACd,UAAU;AAAA,MACV,WAAW;AAAA,MACV,GAAG;AAAA;AAAA,EACN;AAEJ;AAEO,IAAM,QAAQ,OAAO,OAAOC,OAAM;AAAA,EACvC,IAAI;AACN,CAAC;AAEDA,MAAK,cAAc;;;AErFZ,IAAME,cAMT,OAAO,OAAO,YAAM;AAAA,EACtB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AAAA,EACb,cAAc;AAAA,EACd,aAAa;AACf,CAAC;AAEDA,YAAW,cAAc;AACzB,kBAAkB,cAAc;AAChC,mBAAmB,cAAc;AACjC,iBAAiB,cAAc;AAC/B,kBAAkB,cAAc;AAChC,iBAAiB,cAAc;","names":["jsx","cx","Children","cva","jsx","Children","jsx","Root","cx","cx","cx","jsx","cx","jsx","cx","cx","jsx","Root","cx","cx","jsx","cx","useFormFieldControl","cva","jsx","Root","useFormFieldControl","InputGroup"]}
|