@spark-ui/components 10.11.2 → 10.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/snackbar/index.d.mts +1 -46
- package/dist/snackbar/index.d.ts +1 -46
- package/dist/snackbar/index.js +37 -185
- package/dist/snackbar/index.js.map +1 -1
- package/dist/snackbar/index.mjs +12 -157
- package/dist/snackbar/index.mjs.map +1 -1
- package/package.json +7 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/snackbar/index.ts","../../src/snackbar/Snackbar.tsx","../../src/snackbar/local-toast/useToastState.ts","../../src/snackbar/SnackbarRegion.tsx","../../src/snackbar/SnackbarItem.tsx","../../src/snackbar/SnackbarItem.styles.ts","../../src/snackbar/snackbarVariants.ts","../../src/snackbar/SnackbarItemAction.tsx","../../src/button/Button.tsx","../../src/slot/Slot.tsx","../../src/visually-hidden/VisuallyHidden.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/snackbar/SnackbarItemContext.tsx","../../src/snackbar/SnackbarItemClose.tsx","../../src/icon/Icon.tsx","../../src/icon/Icon.styles.tsx","../../src/icon-button/IconButton.styles.tsx","../../src/icon-button/IconButton.tsx","../../src/snackbar/SnackbarItemIcon.tsx","../../src/snackbar/useSwipe.ts","../../src/snackbar/SnackbarRegion.styles.ts","../../src/snackbar/useSnackbarGlobalStore.ts"],"sourcesContent":["import {\n addSnackbar,\n type AddSnackbarArgs,\n clearSnackbarQueue,\n Snackbar as Root,\n type SnackbarProps,\n} from './Snackbar'\nimport { SnackbarItem as Item, type SnackbarItemProps } from './SnackbarItem'\nimport {\n SnackbarItemAction as ItemAction,\n type SnackbarItemActionProps,\n} from './SnackbarItemAction'\nimport { SnackbarItemClose as ItemClose, type SnackbarItemCloseProps } from './SnackbarItemClose'\nimport { SnackbarItemIcon as ItemIcon, type SnackbarItemIconProps } from './SnackbarItemIcon'\n\nexport const Snackbar: typeof Root & {\n Item: typeof Item\n ItemAction: typeof ItemAction\n ItemClose: typeof ItemClose\n ItemIcon: typeof ItemIcon\n} = Object.assign(Root, {\n Item,\n ItemAction,\n ItemClose,\n ItemIcon,\n})\n\nSnackbar.displayName = 'Snackbar'\nItem.displayName = 'Snackbar.Item'\nItemAction.displayName = 'Snackbar.ItemAction'\nItemClose.displayName = 'Snackbar.ItemClose'\nItemIcon.displayName = 'Snackbar.ItemIcon'\n\nexport type {\n SnackbarProps,\n SnackbarItemProps,\n SnackbarItemActionProps,\n SnackbarItemCloseProps,\n SnackbarItemIconProps,\n AddSnackbarArgs,\n}\nexport { addSnackbar, clearSnackbarQueue }\n","import { type ReactElement, Ref, type RefObject, useEffect, useRef } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { type ToastOptions as SnackBarItemOptions, ToastQueue, useToastQueue } from './local-toast'\nimport { type SnackbarItemValue } from './SnackbarItem'\nimport { SnackbarRegion, type SnackbarRegionProps } from './SnackbarRegion'\nimport { useSnackbarGlobalStore } from './useSnackbarGlobalStore'\n\n/**\n * We define here a global queue thanks to dedicated util from React Spectrum.\n * It is based on React `useSyncExternalStore` and allows us to consume data from\n * an external data store, and thus preventing use of React context that could\n * lead to unwanted rerenderings. It also simplifies initial implementation.\n */\nlet GLOBAL_SNACKBAR_QUEUE: ToastQueue<SnackbarItemValue> | null = null\n\nconst getGlobalSnackBarQueue = () => {\n if (!GLOBAL_SNACKBAR_QUEUE) {\n GLOBAL_SNACKBAR_QUEUE = new ToastQueue({\n maxVisibleToasts: 1,\n hasExitAnimation: true,\n })\n }\n\n return GLOBAL_SNACKBAR_QUEUE\n}\n\nexport const clearSnackbarQueue = () => {\n GLOBAL_SNACKBAR_QUEUE = null\n}\n\n/**\n * We define a global store to keep track of all providers instances, to ensure\n * we always have a single Snackbar container.\n */\nconst GLOBAL_SNACKBAR_STORE = {\n providers: new Set<RefObject<HTMLDivElement | null>>(),\n subscriptions: new Set<() => void>(),\n}\n\nexport type SnackbarProps = Omit<SnackbarRegionProps, 'state'> & {\n ref?: Ref<HTMLDivElement>\n}\n\nexport const Snackbar = ({ ref: forwardedRef, ...props }: SnackbarProps): ReactElement | null => {\n const ref = useRef<HTMLDivElement>(null)\n\n const state = useToastQueue(getGlobalSnackBarQueue())\n\n const { provider, addProvider, deleteProvider } = useSnackbarGlobalStore(GLOBAL_SNACKBAR_STORE)\n\n useEffect(() => {\n addProvider(ref)\n\n return () => {\n for (const toast of getGlobalSnackBarQueue().visibleToasts) {\n toast.animation = undefined\n }\n\n deleteProvider(ref)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return ref === provider && state.visibleToasts.length > 0\n ? createPortal(<SnackbarRegion ref={forwardedRef} state={state} {...props} />, document.body)\n : null\n}\n\nSnackbar.displayName = 'Snackbar'\n\nexport interface AddSnackbarArgs extends SnackbarItemValue, Omit<SnackBarItemOptions, 'timeout'> {\n /**\n * Handler that is called when the snackbar is closed, either by the user\n * or after a timeout.\n */\n onClose?: () => void\n /**\n * A timeout to automatically close the snackbar after, in milliseconds.\n * @default 5000\n */\n timeout?: number | null\n /**\n * The priority of the snackbar relative to other snackbars. Larger numbers indicate higher priority.\n */\n priority?: number\n}\n\nexport const addSnackbar = ({ onClose, timeout = 5000, priority, ...content }: AddSnackbarArgs) => {\n const queue = getGlobalSnackBarQueue()\n\n queue.add(content, {\n onClose,\n timeout: timeout && !content.onAction ? Math.max(timeout, 5000) : undefined,\n priority,\n })\n}\n","/* eslint-disable @typescript-eslint/no-use-before-define */\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useCallback, useMemo } from 'react'\n// Shim to support React 17 and below.\nimport { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'\n\nexport interface ToastStateProps {\n /** The maximum number of toasts to display at a time. */\n maxVisibleToasts?: number\n /**\n * Whether toasts have an exit animation. If true, toasts are not\n * removed immediately but transition into an \"exiting\" state instead.\n * Once the animation is complete, call the `remove` function.\n */\n hasExitAnimation?: boolean\n}\n\nexport interface ToastOptions {\n /** Handler that is called when the toast is closed, either by the user or after a timeout. */\n onClose?: () => void\n /** A timeout to automatically close the toast after, in milliseconds. */\n timeout?: number\n /** The priority of the toast relative to other toasts. Larger numbers indicate higher priority. */\n priority?: number\n}\n\nexport interface QueuedToast<T> extends ToastOptions {\n /** The content of the toast. */\n content: T\n /** A unique key for the toast. */\n key: string\n /** A timer for the toast, if a timeout was set. */\n timer?: Timer\n /** The current animation state for the toast. */\n animation?: 'entering' | 'queued' | 'exiting' | null\n}\n\nexport interface ToastState<T> {\n /** Adds a new toast to the queue. */\n add(content: T, options?: ToastOptions): string\n /**\n * Closes a toast. If `hasExitAnimation` is true, the toast\n * transitions to an \"exiting\" state instead of being removed immediately.\n */\n close(key: string): void\n /** Removes a toast from the visible toasts after an exiting animation. */\n remove(key: string): void\n /** Pauses the timers for all visible toasts. */\n pauseAll(): void\n /** Resumes the timers for all visible toasts. */\n resumeAll(): void\n /** The visible toasts. */\n visibleToasts: QueuedToast<T>[]\n}\n\n/**\n * Provides state management for a toast queue. Toasts display brief, temporary notifications\n * of actions, errors, or other events in an application.\n */\nexport function useToastState<T>(props: ToastStateProps = {}): ToastState<T> {\n let { maxVisibleToasts = 1, hasExitAnimation = false } = props\n let queue = useMemo(\n () => new ToastQueue<T>({ maxVisibleToasts, hasExitAnimation }),\n [maxVisibleToasts, hasExitAnimation]\n )\n\n return useToastQueue(queue)\n}\n\n/**\n * Subscribes to a provided toast queue and provides methods to update it.\n */\nexport function useToastQueue<T>(queue: ToastQueue<T>): ToastState<T> {\n let subscribe = useCallback((fn: any) => queue.subscribe(fn), [queue])\n let getSnapshot = useCallback(() => queue.visibleToasts, [queue])\n let visibleToasts = useSyncExternalStore(subscribe, getSnapshot, getSnapshot)\n\n return {\n visibleToasts,\n add: (content, options) => queue.add(content, options),\n close: key => queue.close(key),\n remove: key => queue.remove(key),\n pauseAll: () => queue.pauseAll(),\n resumeAll: () => queue.resumeAll(),\n }\n}\n\n/**\n * A ToastQueue is a priority queue of toasts.\n */\nexport class ToastQueue<T> {\n private queue: QueuedToast<T>[] = []\n private subscriptions: Set<() => void> = new Set()\n private maxVisibleToasts: number\n private hasExitAnimation: boolean\n /** The currently visible toasts. */\n visibleToasts: QueuedToast<T>[] = []\n\n constructor(options?: ToastStateProps) {\n this.maxVisibleToasts = options?.maxVisibleToasts ?? 1\n this.hasExitAnimation = options?.hasExitAnimation ?? false\n }\n\n /** Subscribes to updates to the visible toasts. */\n subscribe(fn: () => void) {\n this.subscriptions.add(fn)\n\n return () => this.subscriptions.delete(fn)\n }\n\n /** Adds a new toast to the queue. */\n add(content: T, options: ToastOptions = {}) {\n let toastKey = Math.random().toString(36)\n let toast: QueuedToast<T> = {\n ...options,\n content,\n key: toastKey,\n timer: options.timeout ? new Timer(() => this.close(toastKey), options.timeout) : undefined,\n }\n\n let low = 0\n let high = this.queue.length\n while (low < high) {\n let mid = Math.floor((low + high) / 2)\n if ((toast.priority || 0) > (this.queue[mid]?.priority || 0)) {\n high = mid\n } else {\n low = mid + 1\n }\n }\n\n this.queue.splice(low, 0, toast)\n\n toast.animation = low < this.maxVisibleToasts ? 'entering' : 'queued'\n let i = this.maxVisibleToasts\n while (i < this.queue.length) {\n ;(this.queue[i++] as unknown as any).animation = 'queued'\n }\n\n this.updateVisibleToasts({ action: 'add' })\n\n return toastKey\n }\n\n /**\n * Closes a toast. If `hasExitAnimation` is true, the toast\n * transitions to an \"exiting\" state instead of being removed immediately.\n */\n close(key: string) {\n let index = this.queue.findIndex(t => t.key === key)\n if (index >= 0) {\n this.queue[index]?.onClose?.()\n this.queue.splice(index, 1)\n }\n\n this.updateVisibleToasts({ action: 'close', key })\n }\n\n /** Removes a toast from the visible toasts after an exiting animation. */\n remove(key: string) {\n this.updateVisibleToasts({ action: 'remove', key })\n }\n\n private updateVisibleToasts(options: { action: 'add' | 'close' | 'remove'; key?: string }) {\n let { action, key } = options\n let toasts = this.queue.slice(0, this.maxVisibleToasts)\n\n if (action === 'add' && this.hasExitAnimation) {\n let prevToasts: QueuedToast<T>[] = this.visibleToasts\n .filter(t => !toasts.some(t2 => t.key === t2.key))\n .map(t => ({ ...t, animation: 'exiting' }))\n this.visibleToasts = prevToasts\n .concat(toasts)\n .sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0))\n } else if (action === 'close' && this.hasExitAnimation) {\n // Cause a rerender to happen for exit animation\n this.visibleToasts = this.visibleToasts.map(t => {\n if (t.key !== key) {\n return t\n } else {\n return { ...t, animation: 'exiting' }\n }\n })\n } else {\n this.visibleToasts = toasts\n }\n\n for (let fn of this.subscriptions) {\n fn()\n }\n }\n\n /** Pauses the timers for all visible toasts. */\n pauseAll() {\n for (let toast of this.visibleToasts) {\n if (toast.timer) {\n toast.timer.pause()\n }\n }\n }\n\n /** Resumes the timers for all visible toasts. */\n resumeAll() {\n for (let toast of this.visibleToasts) {\n if (toast.timer) {\n toast.timer.resume()\n }\n }\n }\n}\n\nclass Timer {\n private timerId: any\n private startTime: number | null = null\n private remaining: number\n private callback: () => void\n\n constructor(callback: () => void, delay: number) {\n this.remaining = delay\n this.callback = callback\n }\n\n reset(delay: number) {\n this.remaining = delay\n this.resume()\n }\n\n pause() {\n if (this.timerId == null) {\n return\n }\n\n clearTimeout(this.timerId)\n this.timerId = null\n this.remaining -= Date.now() - this.startTime!\n }\n\n resume() {\n if (this.remaining <= 0) {\n return\n }\n\n this.startTime = Date.now()\n this.timerId = setTimeout(() => {\n this.timerId = null\n this.remaining = 0\n this.callback()\n }, this.remaining)\n }\n}\n","import { type AriaToastRegionProps, useToastRegion } from '@react-aria/toast'\nimport { cloneElement, type ComponentPropsWithRef, type ReactElement, useRef } from 'react'\n\nimport { SnackbarItem, type SnackbarItemProps } from './SnackbarItem'\nimport { SnackbarItemContext, type SnackbarItemState } from './SnackbarItemContext'\nimport { snackbarRegionVariant, type SnackbarRegionVariantProps } from './SnackbarRegion.styles'\n\nexport interface SnackbarRegionProps\n extends ComponentPropsWithRef<'div'>,\n AriaToastRegionProps,\n SnackbarRegionVariantProps,\n Pick<SnackbarItemState, 'state'> {\n /**\n * An accessibility label for the snackbar region.\n * @default 'Notifications'\n */\n 'aria-label'?: string\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string\n /**\n * The component/template used to display each snackbar from the queue\n * @default 'Snackbar.Item'\n */\n children?: ReactElement<SnackbarItemProps, typeof SnackbarItem>\n}\n\nexport const SnackbarRegion = ({\n children = <SnackbarItem />,\n state,\n position = 'bottom',\n className,\n ref: forwardedRef,\n ...rest\n}: SnackbarRegionProps): ReactElement => {\n const innerRef = useRef<HTMLDivElement>(null)\n const ref = forwardedRef && typeof forwardedRef !== 'function' ? forwardedRef : innerRef\n\n const { regionProps } = useToastRegion(rest, state, ref)\n\n return (\n <div\n {...regionProps}\n ref={ref}\n data-position={position}\n className={snackbarRegionVariant({ position, className })}\n >\n {state.visibleToasts.map(toast => (\n <SnackbarItemContext.Provider key={toast.key} value={{ toast, state }}>\n {cloneElement(children, { key: toast.key })}\n </SnackbarItemContext.Provider>\n ))}\n </div>\n )\n}\n","/* eslint-disable max-lines-per-function */\n\nimport { useToast } from '@react-aria/toast'\nimport {\n Children,\n cloneElement,\n type ComponentPropsWithRef,\n type FC,\n isValidElement,\n type PropsWithChildren,\n type ReactElement,\n type ReactNode,\n useCallback,\n useRef,\n} from 'react'\n\nimport {\n snackbarItemVariant,\n snackbarItemVariantContent,\n type SnackbarItemVariantContentProps,\n type SnackbarItemVariantProps,\n} from './SnackbarItem.styles'\nimport { SnackbarItemAction, SnackbarItemActionProps } from './SnackbarItemAction'\nimport { SnackbarItemClose, SnackbarItemCloseProps } from './SnackbarItemClose'\nimport { useSnackbarItemContext } from './SnackbarItemContext'\nimport { SnackbarItemIcon, SnackbarItemIconProps } from './SnackbarItemIcon'\nimport { useSwipe } from './useSwipe'\n\nexport interface SnackbarItemValue extends SnackbarItemVariantProps {\n /**\n * Icon that will be prepended before snackbar message\n */\n icon?: ReactNode\n message: ReactNode\n /**\n * If `true` snackbar will display a close button\n * @default false\n */\n isClosable?: boolean\n /**\n * A label for the action button within the toast.\n */\n actionLabel?: string\n /**\n * Handler that is called when the action button is pressed.\n */\n onAction?: () => void\n /**\n * If `true` the action button will be displayed on a new line.\n * @default false\n */\n actionOnNewline?: boolean\n}\n\nexport interface SnackbarItemProps\n extends ComponentPropsWithRef<'div'>,\n SnackbarItemVariantProps,\n SnackbarItemVariantContentProps {\n /**\n * Defines a string value that labels the current element.\n */\n 'aria-label'?: string\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string\n}\n\nexport const SnackbarItem = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n design: designProp,\n intent: intentProp,\n actionOnNewline: actionOnNewlineProp,\n className,\n children,\n ref: forwardedRef,\n ...rest\n}: PropsWithChildren<SnackbarItemProps>) => {\n const innerRef = useRef(null)\n const ref = typeof forwardedRef !== 'function' ? forwardedRef || innerRef : innerRef\n\n const { toast, state } = useSnackbarItemContext()\n\n const { state: swipeState, direction: swipeDirection } = useSwipe({\n swipeRef: ref,\n onSwipeStart: state.pauseAll,\n onSwipeCancel: state.resumeAll,\n onSwipeEnd: ({ direction }) => {\n ;['left', 'right'].includes(`${direction}`) && state.close(toast.key)\n },\n })\n\n const { message, icon, isClosable, onAction, actionLabel } = toast.content\n const intent = intentProp ?? toast.content.intent\n const design = designProp ?? toast.content.design\n const actionOnNewline = actionOnNewlineProp ?? toast.content.actionOnNewline\n\n const ariaProps = {\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n ariaDetails,\n }\n\n const { toastProps, titleProps, closeButtonProps, contentProps } = useToast(\n { toast, ...ariaProps },\n state,\n ref\n )\n\n const findElement = useCallback(\n <P extends object>(elementDisplayName: string): ReactElement<P> | undefined => {\n const childrenArray = Children.toArray(children)\n\n const match = childrenArray\n .filter(isValidElement)\n .find(\n (child): child is ReactElement<P> =>\n !!(child.type as FC<P> & { displayName?: string }).displayName?.includes(\n elementDisplayName\n )\n )\n\n return match as ReactElement<P> | undefined\n },\n [children]\n )\n\n const iconFromChildren = findElement<SnackbarItemIconProps>('Snackbar.ItemIcon')\n const actionBtnFromChildren = findElement<SnackbarItemActionProps>('Snackbar.ItemAction')\n const closeBtnFromChildren = findElement<SnackbarItemCloseProps>('Snackbar.ItemClose')\n\n return (\n <div\n data-spark-component=\"snackbar-item\"\n className={snackbarItemVariant({ design, intent, className })}\n data-animation={toast.animation}\n {...(!(swipeState === 'cancel' && toast.animation === 'exiting') && {\n 'data-swipe': swipeState,\n 'data-swipe-direction': swipeDirection,\n })}\n {...(toast.animation === 'exiting' && {\n // Remove snackbar when the exiting animation completes\n onAnimationEnd: () => state.remove(toast.key),\n })}\n ref={ref}\n {...toastProps}\n {...rest}\n >\n <div className={snackbarItemVariantContent({ actionOnNewline })} {...contentProps}>\n {/* 1. ICON */}\n {renderSubComponent(iconFromChildren, icon ? SnackbarItemIcon : null, {\n children: icon,\n })}\n\n {/* 2. MESSAGE */}\n <p\n className=\"px-md py-lg text-body-2 row-span-3\"\n style={{ gridArea: 'message' }}\n {...titleProps}\n >\n {message}\n </p>\n\n {/* 3. ACTION BUTTON */}\n {renderSubComponent(\n actionBtnFromChildren,\n actionLabel && onAction ? SnackbarItemAction : null,\n { intent, design, onClick: onAction, children: actionLabel }\n )}\n\n {/* 4. CLOSE BUTTON */}\n {renderSubComponent(closeBtnFromChildren, isClosable ? SnackbarItemClose : null, {\n intent,\n design,\n /**\n * React Spectrum typing of aria-label is inaccurate, and aria-label value should never be undefined.\n * See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/i18n/src/useLocalizedStringFormatter.ts#L40\n */\n 'aria-label': closeButtonProps['aria-label'] as string,\n })}\n </div>\n </div>\n )\n}\n\nSnackbarItem.displayName = 'Snackbar.Item'\n\n/**\n * Returns compound item if found in children prop.\n * If not fallbacks to default item, conditionned by addSnackbar options.\n */\nconst renderSubComponent = <P extends object>(\n childItem?: ReactElement<P>,\n defaultItem?: FC<P> | null,\n props?: P\n) => {\n if (childItem) {\n return cloneElement(childItem, { ...props, ...childItem.props })\n } else if (defaultItem) {\n const Item = defaultItem\n\n return <Item {...(props as P)} />\n } else {\n return null\n }\n}\n","import { cva, VariantProps } from 'class-variance-authority'\n\nimport { filledVariants, tintedVariants } from './snackbarVariants'\n\nexport const snackbarItemVariant = cva(\n [\n 'rounded-md shadow-sm',\n 'max-w-[600px]',\n 'cursor-default pointer-events-auto touch-none select-none',\n 'absolute',\n /**\n * Focus\n */\n 'group-focus-visible:outline-hidden group-focus-visible:u-outline group-not-focus-visible:ring-inset',\n /**\n * Positionning\n */\n 'group-data-[position=bottom]:bottom-0 group-data-[position=bottom-left]:bottom-0 group-data-[position=bottom-right]:bottom-0',\n 'group-data-[position=top]:top-0 group-data-[position=top-left]:top-0 group-data-[position=top-right]:top-0',\n /**\n * Animation and opacity\n */\n '[animation-fill-mode: forwards]!',\n 'data-[animation=queued]:animate-fade-in',\n 'data-[animation=entering]:easing-decelerate-back',\n 'data-[animation=exiting]:easing-standard',\n // Parent position bottom|bottom-left|bottom-right\n 'data-[animation=entering]:group-data-[position=bottom]:[&:not([data-swipe])]:animate-slide-in-bottom',\n 'data-[animation=exiting]:opacity-0 data-[animation=exiting]:transition-opacity',\n 'data-[animation=exiting]:group-data-[position=bottom]:[&:not([data-swipe])]:animate-slide-out-bottom',\n 'data-[animation=entering]:group-data-[position=bottom-left]:[&:not([data-swipe])]:animate-slide-in-bottom',\n 'data-[animation=exiting]:group-data-[position=bottom-left]:[&:not([data-swipe])]:animate-slide-out-bottom',\n 'data-[animation=entering]:group-data-[position=bottom-right]:[&:not([data-swipe])]:animate-slide-in-bottom',\n 'data-[animation=exiting]:group-data-[position=bottom-right]:[&:not([data-swipe])]:animate-slide-out-bottom',\n // Parent position top|top-left|top-right\n 'data-[animation=entering]:group-data-[position=top]:[&:not([data-swipe])]:animate-slide-in-top',\n 'data-[animation=exiting]:group-data-[position=top]:[&:not([data-swipe])]:animate-slide-out-top',\n 'data-[animation=entering]:group-data-[position=top-left]:[&:not([data-swipe])]:animate-slide-in-top',\n 'data-[animation=exiting]:group-data-[position=top-left]:[&:not([data-swipe])]:animate-slide-out-top',\n 'data-[animation=entering]:group-data-[position=top-right]:[&:not([data-swipe])]:animate-slide-in-top',\n 'data-[animation=exiting]:group-data-[position=top-right]:[&:not([data-swipe])]:animate-slide-out-top',\n /**\n * Swipe\n */\n 'data-[swipe=move]:data-[swipe-direction=right]:translate-x-(--swipe-position-x)',\n 'data-[swipe=move]:data-[swipe-direction=left]:translate-x-(--swipe-position-x)',\n 'data-[swipe=cancel]:translate-x-0',\n 'data-[swipe=end]:data-[swipe-direction=right]:animate-standalone-swipe-out-right',\n 'data-[swipe=end]:data-[swipe-direction=left]:animate-standalone-swipe-out-left',\n ],\n {\n variants: {\n /**\n * Set different look and feel\n * @default 'filled'\n */\n design: {\n filled: '',\n tinted: '',\n },\n /**\n * Set color intent\n * @default 'neutral'\n */\n intent: {\n success: '',\n alert: '',\n error: '',\n info: '',\n neutral: '',\n main: '',\n basic: '',\n support: '',\n accent: '',\n inverse: '',\n },\n },\n compoundVariants: [...filledVariants, ...tintedVariants],\n defaultVariants: {\n design: 'filled',\n intent: 'neutral',\n },\n }\n)\n\nexport const snackbarItemVariantContent = cva(\n [\n 'inline-grid items-center',\n 'col-start-1 row-start-1',\n 'pl-md pr-lg', // applying padding on the parent prevents VoiceOver on Safari from reading snackbar content 🤷\n ],\n {\n variants: {\n /**\n * Force action button displaying on a new line\n * @default false\n */\n actionOnNewline: {\n true: [\n 'grid-rows-[52px_1fr_52px]',\n 'grid-cols-[min-content_1fr_min-content]',\n \"[grid-template-areas:'icon_message_close'_'._message_.'_'action_action_action']\",\n ],\n false: [\n 'grid-cols-[min-content_1fr_min-content_min-content]',\n \"[grid-template-areas:'icon_message_action_close']\",\n ],\n },\n },\n defaultVariants: {\n actionOnNewline: false,\n },\n }\n)\n\nexport type SnackbarItemVariantProps = VariantProps<typeof snackbarItemVariant>\nexport type SnackbarItemVariantContentProps = VariantProps<typeof snackbarItemVariantContent>\n","export const filledVariants = [\n {\n design: 'filled',\n intent: 'success',\n class: ['bg-success text-on-success'],\n },\n {\n design: 'filled',\n intent: 'alert',\n class: ['bg-alert text-on-alert'],\n },\n {\n design: 'filled',\n intent: 'error',\n class: ['bg-error text-on-error'],\n },\n {\n design: 'filled',\n intent: 'info',\n class: ['bg-info text-on-info'],\n },\n {\n design: 'filled',\n intent: 'neutral',\n class: ['bg-neutral text-on-neutral'],\n },\n {\n design: 'filled',\n intent: 'main',\n class: ['bg-main text-on-main'],\n },\n {\n design: 'filled',\n intent: 'basic',\n class: ['bg-basic text-on-basic'],\n },\n {\n design: 'filled',\n intent: 'support',\n class: ['bg-support text-on-support'],\n },\n {\n design: 'filled',\n intent: 'accent',\n class: ['bg-accent text-on-accent'],\n },\n {\n design: 'filled',\n intent: 'inverse',\n class: ['bg-surface-inverse text-on-surface-inverse'],\n },\n] as const\n\nexport const tintedVariants = [\n {\n design: 'tinted',\n intent: 'success',\n class: ['bg-success-container text-on-success-container'],\n },\n {\n design: 'tinted',\n intent: 'alert',\n class: ['bg-alert-container text-on-alert-container'],\n },\n {\n design: 'tinted',\n intent: 'error',\n class: ['bg-error-container text-on-error-container'],\n },\n {\n design: 'tinted',\n intent: 'info',\n class: ['bg-info-container text-on-info-container'],\n },\n {\n design: 'tinted',\n intent: 'neutral',\n class: ['bg-neutral-container text-on-neutral-container'],\n },\n {\n design: 'tinted',\n intent: 'main',\n class: ['bg-main-container text-on-main-container'],\n },\n {\n design: 'tinted',\n intent: 'basic',\n class: ['bg-basic-container text-on-basic-container'],\n },\n {\n design: 'tinted',\n intent: 'support',\n class: ['bg-support-container text-on-support-container'],\n },\n {\n design: 'tinted',\n intent: 'accent',\n class: ['bg-accent-container text-on-accent-container'],\n },\n {\n design: 'tinted',\n intent: 'inverse',\n class: ['bg-surface-inverse text-on-surface-inverse'],\n },\n] as const\n","import { cx } from 'class-variance-authority'\nimport { Ref } from 'react'\n\nimport { Button, type ButtonProps } from '../button'\nimport type { SnackbarItemVariantProps } from './SnackbarItem.styles'\nimport { useSnackbarItemContext } from './SnackbarItemContext'\n\nexport type SnackbarItemActionProps = Omit<ButtonProps, 'size' | 'shape' | 'intent'> &\n SnackbarItemVariantProps & {\n ref?: Ref<HTMLButtonElement>\n }\n\nexport const SnackbarItemAction = ({\n design: designProp = 'filled',\n intent: intentProp = 'neutral',\n onClick,\n children,\n className,\n ref,\n ...rest\n}: SnackbarItemActionProps) => {\n const { toast, state } = useSnackbarItemContext()\n\n const intent = intentProp ?? toast.content.intent\n const design = designProp ?? toast.content.design\n\n return (\n <Button\n data-spark-component=\"snackbar-item-action\"\n ref={ref}\n size=\"md\"\n shape=\"rounded\"\n {...(intent === 'inverse'\n ? {\n design: 'ghost',\n intent: 'surface',\n }\n : {\n design,\n intent: intent === 'error' ? 'danger' : intent,\n })}\n onClick={e => {\n onClick?.(e)\n state.close(toast.key)\n }}\n style={{ gridArea: 'action', ...rest.style }}\n className={cx('ml-md justify-self-end', className)}\n {...rest}\n >\n {children}\n </Button>\n )\n}\n\nSnackbarItemAction.displayName = 'Snackbar.ItemAction'\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 { 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\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: [],\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 'surfaceInverse',\n ]\n >({\n main: [],\n support: [],\n accent: [],\n basic: [],\n success: [],\n alert: [],\n danger: [],\n info: [],\n neutral: [],\n surface: [],\n surfaceInverse: [],\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 {\n intent: 'surfaceInverse',\n design: 'filled',\n class: tw([\n 'bg-surface-inverse',\n 'text-on-surface-inverse',\n 'hover:bg-surface-inverse-hovered',\n 'enabled:active:bg-surface-inverse-hovered',\n 'focus-visible:bg-surface-inverse-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 {\n intent: 'surfaceInverse',\n design: 'ghost',\n class: tw([\n 'text-surface-inverse',\n 'hover:bg-surface-inverse/dim-5',\n 'enabled:active:bg-surface-inverse/dim-5',\n 'focus-visible:bg-surface-inverse/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 {\n intent: 'surfaceInverse',\n design: 'outlined',\n class: tw([\n 'hover:bg-surface-inverse/dim-5',\n 'enabled:active:bg-surface-inverse/dim-5',\n 'focus-visible:bg-surface-inverse/dim-5',\n 'text-surface-inverse',\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 {\n intent: 'surfaceInverse',\n design: 'tinted',\n class: tw([\n 'bg-surface-inverse',\n 'text-on-surface-inverse',\n 'hover:bg-surface-inverse-hovered',\n 'enabled:active:bg-surface-inverse-hovered',\n 'focus-visible:bg-surface-inverse-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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n {\n intent: 'surfaceInverse',\n design: 'contrast',\n class: tw([\n 'text-on-surface-inverse bg-surface-inverse',\n 'hover:bg-surface-inverse-hovered',\n 'enabled:active:bg-surface-inverse-hovered',\n 'focus-visible:bg-surface-inverse-hovered',\n ]),\n },\n] as const\n","import { createContext, useContext } from 'react'\n\nimport { QueuedToast, ToastState } from './local-toast'\nimport type { SnackbarItemValue } from './SnackbarItem'\n\nexport interface SnackbarItemState<T = SnackbarItemValue> {\n toast: QueuedToast<T>\n state: ToastState<T>\n}\n\nexport const SnackbarItemContext = createContext<SnackbarItemState>({} as SnackbarItemState)\n\nexport const useSnackbarItemContext = () => useContext(SnackbarItemContext)\n","import { Close } from '@spark-ui/icons/Close'\nimport { cx } from 'class-variance-authority'\nimport { type ComponentPropsWithRef } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton, type IconButtonProps } from '../icon-button'\nimport type { SnackbarItemVariantProps } from './SnackbarItem.styles'\nimport { useSnackbarItemContext } from './SnackbarItemContext'\n\nexport interface SnackbarItemCloseProps\n extends Omit<ComponentPropsWithRef<'button'>, 'aria-label' | 'disabled'>,\n Pick<IconButtonProps, 'aria-label'>,\n SnackbarItemVariantProps {}\n\nexport const SnackbarItemClose = ({\n design: designProp = 'filled',\n intent: intentProp = 'neutral',\n 'aria-label': ariaLabel,\n onClick,\n className,\n ref,\n ...rest\n}: SnackbarItemCloseProps) => {\n const { toast, state } = useSnackbarItemContext()\n\n const intent = intentProp ?? toast.content.intent\n const design = designProp ?? toast.content.design\n\n return (\n <IconButton\n data-spark-component=\"snackbar-item-close\"\n ref={ref}\n size=\"md\"\n shape=\"rounded\"\n {...(intent === 'inverse'\n ? {\n design: 'ghost',\n intent: 'surface',\n }\n : {\n design,\n intent: intent === 'error' ? 'danger' : intent,\n })}\n aria-label={ariaLabel}\n onClick={e => {\n onClick?.(e)\n state.close(toast.key)\n }}\n style={{ gridArea: 'close', ...rest.style }}\n className={cx('ml-md justify-self-end', className)}\n {...rest}\n >\n <Icon size=\"sm\">\n <Close />\n </Icon>\n </IconButton>\n )\n}\n\nSnackbarItemClose.displayName = 'Snackbar.ItemClose'\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 { 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 { 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 data-spark-component=\"icon-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 type { ReactElement } from 'react'\n\nimport { Icon, type IconProps } from '../icon'\n\nexport type SnackbarItemIconProps = IconProps\n\nexport const SnackbarItemIcon = ({\n children,\n className,\n ...rest\n}: SnackbarItemIconProps): ReactElement => (\n <Icon\n size=\"md\"\n className={cx('mx-md', className)}\n style={{ gridArea: 'icon', ...rest.style }}\n {...rest}\n >\n {children}\n </Icon>\n)\n\nSnackbarItemIcon.displayName = 'Snackbar.ItemIcon'\n","/* eslint-disable complexity */\nimport { type RefObject, useEffect, useRef, useState } from 'react'\n\ninterface SwipeArgs<T> {\n swipeRef: RefObject<T | null>\n onSwipeStart?: ({ state, direction }: SwipeReturn) => void\n onSwipeMove?: ({ state, direction }: SwipeReturn) => void\n onSwipeCancel?: ({ state, direction }: SwipeReturn) => void\n onSwipeEnd?: ({ state, direction }: SwipeReturn) => void\n threshold?: number\n}\n\ninterface SwipeReturn {\n state?: 'start' | 'move' | 'cancel' | 'end'\n direction?: 'up' | 'down' | 'right' | 'left' | null\n}\n\nconst SWIPE_THRESHOLD = 75\n\nexport const useSwipe = <T extends HTMLElement>({\n swipeRef,\n onSwipeStart,\n onSwipeMove,\n onSwipeCancel,\n onSwipeEnd,\n threshold = 10,\n}: SwipeArgs<T>): SwipeReturn => {\n const [state, setState] = useState<SwipeReturn['state']>()\n\n const direction = useRef<SwipeReturn['direction']>(null)\n const origin = useRef<Record<'x' | 'y', number> | null>(null)\n const delta = useRef<Record<'x' | 'y', number> | null>(null)\n\n const handleSwipeStart = (evt: PointerEvent) => {\n origin.current = { x: evt.clientX, y: evt.clientY }\n\n /**\n * Prevents unwanted text selection in Safari browser (longpress)\n */\n document.addEventListener('selectstart', e => e.preventDefault())\n }\n\n const handleSwipeMove = (evt: PointerEvent) => {\n if (!origin.current) return\n\n const deltaX = Math.abs(evt.clientX - origin.current.x)\n const deltaY = Math.abs(evt.clientY - origin.current.y)\n\n let moveState: SwipeReturn['state']\n\n if (deltaX > deltaY && deltaX > threshold) {\n direction.current = evt.clientX > origin.current.x ? 'right' : 'left'\n } else if (deltaY > threshold) {\n direction.current = evt.clientY > origin.current.y ? 'down' : 'up'\n }\n\n /**\n * If no direction could be defined, then no move should be handled.\n * This is particularly true with trackpads working with MacOS/Windows.\n */\n if (!direction.current) return\n\n if (!delta.current) {\n moveState = 'start'\n delta.current = { x: deltaX, y: deltaY }\n onSwipeStart?.({ state: moveState, direction: direction.current })\n } else {\n moveState = 'move'\n delta.current = { x: deltaX, y: deltaY }\n ;(swipeRef.current as T).style.setProperty(\n '--swipe-position-x',\n `${deltaX > deltaY ? evt.clientX - origin.current.x : 0}px`\n )\n ;(swipeRef.current as T).style.setProperty(\n '--swipe-position-y',\n `${!(deltaX > deltaY) ? evt.clientY - origin.current.y : 0}px`\n )\n onSwipeMove?.({ state: moveState, direction: direction.current })\n }\n\n setState(moveState)\n }\n\n const handleSwipeEnd = () => {\n const proxyDelta = delta.current\n\n origin.current = null\n delta.current = null\n\n if (proxyDelta) {\n const { x: deltaX, y: deltaY } = proxyDelta\n\n let endState: SwipeReturn['state']\n\n if (deltaX > deltaY) {\n if (deltaX > SWIPE_THRESHOLD) {\n endState = 'end'\n onSwipeEnd?.({ state: endState, direction: direction.current })\n } else {\n endState = 'cancel'\n onSwipeCancel?.({ state: endState, direction: direction.current })\n }\n } else {\n if (deltaY > SWIPE_THRESHOLD) {\n endState = 'end'\n onSwipeEnd?.({ state: endState, direction: direction.current })\n } else {\n endState = 'cancel'\n onSwipeCancel?.({ state: endState, direction: direction.current })\n }\n }\n\n setState(endState)\n\n /**\n * Prevents unwanted text selection in Safari browser (longpress)\n */\n document.removeEventListener('selectstart', e => e.preventDefault())\n }\n }\n\n useEffect(() => {\n if (!swipeRef.current) return\n\n const swipeElement = swipeRef.current\n\n swipeElement.addEventListener('pointerdown', handleSwipeStart)\n document.addEventListener('pointermove', handleSwipeMove)\n document.addEventListener('pointerup', handleSwipeEnd)\n\n return () => {\n swipeElement.removeEventListener('pointerdown', handleSwipeStart)\n document.removeEventListener('pointermove', handleSwipeMove)\n document.removeEventListener('pointerup', handleSwipeEnd)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return {\n state,\n direction: direction.current,\n }\n}\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const snackbarRegionVariant = cva(\n [\n 'fixed inset-x-lg z-toast group',\n 'outline-hidden pointer-events-none',\n 'grid grid-rows-1 grid-cols-1 gap-lg',\n ],\n {\n variants: {\n /**\n * Set snackbar item position\n * @default 'bottom'\n */\n position: {\n top: 'top-lg justify-items-center',\n 'top-right': 'top-lg justify-items-end',\n 'top-left': 'top-lg justify-items-start',\n bottom: 'bottom-lg justify-items-center',\n 'bottom-right': 'bottom-lg justify-items-end',\n 'bottom-left': 'bottom-lg justify-items-start',\n },\n },\n defaultVariants: {\n position: 'bottom',\n },\n }\n)\n\nexport type SnackbarRegionVariantProps = VariantProps<typeof snackbarRegionVariant>\n","import { type RefObject, useCallback, useSyncExternalStore } from 'react'\n\ninterface UseSnackbarGlobalStoreArgs<T> {\n providers: Set<T>\n subscriptions: Set<() => void>\n}\n\ninterface UseSnackbarGlobalStoreReturn<T> {\n provider: T\n addProvider: (ref: T) => void\n deleteProvider: (ref: T) => void\n}\n\n/**\n * This hook is a basic abstraction of useSyncExternalStore hook which allows us\n * to consume data from an external data store.\n *\n * Cf. https://react.dev/reference/react/useSyncExternalStore#subscribing-to-an-external-store\n */\n\nexport const useSnackbarGlobalStore = <T = RefObject<HTMLDivElement | null>>({\n providers,\n subscriptions,\n}: UseSnackbarGlobalStoreArgs<T>): UseSnackbarGlobalStoreReturn<T> => {\n const subscribe = useCallback(\n (listener: () => void) => {\n subscriptions.add(listener)\n\n return () => subscriptions.delete(listener)\n },\n [subscriptions]\n )\n\n const getLastSnackbarProvider = useCallback(() => [...providers].reverse()[0] as T, [providers])\n\n const addProvider = useCallback(\n (provider: T) => {\n providers.add(provider)\n\n for (const subscribeFn of subscriptions) {\n subscribeFn()\n }\n },\n [providers, subscriptions]\n )\n\n const deleteProvider = useCallback(\n (provider: T) => {\n providers.delete(provider)\n\n for (const subscribeFn of subscriptions) {\n subscribeFn()\n }\n },\n [providers, subscriptions]\n )\n\n const provider = useSyncExternalStore(subscribe, getLastSnackbarProvider, getLastSnackbarProvider)\n\n return {\n provider,\n addProvider,\n deleteProvider,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,kBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAC,iBAA0E;AAC1E,uBAA6B;;;ACY7B,mBAAqC;AAErC,kBAAqC;AAoE9B,SAAS,cAAiB,OAAqC;AACpE,MAAI,gBAAY,0BAAY,CAAC,OAAY,MAAM,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC;AACrE,MAAI,kBAAc,0BAAY,MAAM,MAAM,eAAe,CAAC,K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AAqB;AAE9F,gCAAU,MAAM;AACd,gBAAY,GAAG;AAEf,WAAO,MAAM;AACX,iBAAW,SAAS,uBAAuB,EAAE,eAAe;AAC1D,cAAM,YAAY;AAAA,MACpB;AAEA,qBAAe,GAAG;AAAA,IACpB;AAAA,EAEF,GAAG,CAAC,CAAC;AAEL,SAAO,QAAQ,YAAY,MAAM,cAAc,SAAS,QACpD,+BAAa,8CAAC,kBAAe,KAAK,cAAc,OAAe,GAAG,OAAO,GAAI,SAAS,IAAI,IAC1F;AACN;AAEA,SAAS,cAAc;AAmBhB,IAAM,cAAc,CAAC,EAAE,SAAS,UAAU,KAAM,UAAU,GAAG,QAAQ,MAAuB;AACjG,QAAM,QAAQ,uBAAuB;AAErC,QAAM,IAAI,SAAS;AAAA,IACjB;AAAA,IACA,SAAS,WAAW,CAAC,QAAQ,WAAW,KAAK,IAAI,SAAS,GAAI,IAAI;AAAA,IAClE;AAAA,EACF,CAAC;AACH;;;ADjFO,IAAMC,YAKT,OAAO,OAAO,UAAM;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,UAAS,cAAc;AACvB,aAAK,cAAc;AACnB,mBAAW,cAAc;AACzB,kBAAU,cAAc;AACxB,iBAAS,cAAc;","names":["Snackbar","import_react","import_toast","import_react","import_react","import_class_variance_authority","import_class_variance_authority","import_react","import_react","RadixSlot","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_internal_utils","import_class_variance_authority","import_internal_utils","filledVariants","import_internal_utils","import_internal_utils","import_internal_utils","tintedVariants","import_internal_utils","filledVariants","tintedVariants","import_jsx_runtime","import_react","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_jsx_runtime","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_react","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_react","provider","import_jsx_runtime","Snackbar"]}
|
|
1
|
+
{"version":3,"sources":["../../src/snackbar/index.ts","../../src/snackbar/Snackbar.tsx","../../src/snackbar/SnackbarRegion.tsx","../../src/snackbar/SnackbarItem.tsx","../../src/snackbar/SnackbarItem.styles.ts","../../src/snackbar/snackbarVariants.ts","../../src/snackbar/SnackbarItemAction.tsx","../../src/button/Button.tsx","../../src/slot/Slot.tsx","../../src/visually-hidden/VisuallyHidden.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/snackbar/SnackbarItemContext.tsx","../../src/snackbar/SnackbarItemClose.tsx","../../src/icon/Icon.tsx","../../src/icon/Icon.styles.tsx","../../src/icon-button/IconButton.styles.tsx","../../src/icon-button/IconButton.tsx","../../src/snackbar/SnackbarItemIcon.tsx","../../src/snackbar/useSwipe.ts","../../src/snackbar/SnackbarRegion.styles.ts","../../src/snackbar/useSnackbarGlobalStore.ts"],"sourcesContent":["import {\n addSnackbar,\n type AddSnackbarArgs,\n clearSnackbarQueue,\n Snackbar as Root,\n type SnackbarProps,\n} from './Snackbar'\nimport { SnackbarItem as Item, type SnackbarItemProps } from './SnackbarItem'\nimport {\n SnackbarItemAction as ItemAction,\n type SnackbarItemActionProps,\n} from './SnackbarItemAction'\nimport { SnackbarItemClose as ItemClose, type SnackbarItemCloseProps } from './SnackbarItemClose'\nimport { SnackbarItemIcon as ItemIcon, type SnackbarItemIconProps } from './SnackbarItemIcon'\n\nexport const Snackbar: typeof Root & {\n Item: typeof Item\n ItemAction: typeof ItemAction\n ItemClose: typeof ItemClose\n ItemIcon: typeof ItemIcon\n} = Object.assign(Root, {\n Item,\n ItemAction,\n ItemClose,\n ItemIcon,\n})\n\nSnackbar.displayName = 'Snackbar'\nItem.displayName = 'Snackbar.Item'\nItemAction.displayName = 'Snackbar.ItemAction'\nItemClose.displayName = 'Snackbar.ItemClose'\nItemIcon.displayName = 'Snackbar.ItemIcon'\n\nexport type {\n SnackbarProps,\n SnackbarItemProps,\n SnackbarItemActionProps,\n SnackbarItemCloseProps,\n SnackbarItemIconProps,\n AddSnackbarArgs,\n}\nexport { addSnackbar, clearSnackbarQueue }\n","import {\n type ToastOptions as SnackBarItemOptions,\n ToastQueue,\n useToastQueue,\n} from '@react-stately/toast'\nimport { type ReactElement, Ref, type RefObject, useEffect, useRef } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { type SnackbarItemValue } from './SnackbarItem'\nimport { SnackbarRegion, type SnackbarRegionProps } from './SnackbarRegion'\nimport { useSnackbarGlobalStore } from './useSnackbarGlobalStore'\n\n/**\n * We define here a global queue thanks to dedicated util from React Spectrum.\n * It is based on React `useSyncExternalStore` and allows us to consume data from\n * an external data store, and thus preventing use of React context that could\n * lead to unwanted rerenderings. It also simplifies initial implementation.\n */\nlet GLOBAL_SNACKBAR_QUEUE: ToastQueue<SnackbarItemValue> | null = null\n\nconst getGlobalSnackBarQueue = () => {\n if (!GLOBAL_SNACKBAR_QUEUE) {\n GLOBAL_SNACKBAR_QUEUE = new ToastQueue({\n maxVisibleToasts: 1,\n hasExitAnimation: true,\n })\n }\n\n return GLOBAL_SNACKBAR_QUEUE\n}\n\nexport const clearSnackbarQueue = () => {\n GLOBAL_SNACKBAR_QUEUE = null\n}\n\n/**\n * We define a global store to keep track of all providers instances, to ensure\n * we always have a single Snackbar container.\n */\nconst GLOBAL_SNACKBAR_STORE = {\n providers: new Set<RefObject<HTMLDivElement | null>>(),\n subscriptions: new Set<() => void>(),\n}\n\nexport type SnackbarProps = Omit<SnackbarRegionProps, 'state'> & {\n ref?: Ref<HTMLDivElement>\n}\n\nexport const Snackbar = ({ ref: forwardedRef, ...props }: SnackbarProps): ReactElement | null => {\n const ref = useRef<HTMLDivElement>(null)\n\n const state = useToastQueue(getGlobalSnackBarQueue())\n\n const { provider, addProvider, deleteProvider } = useSnackbarGlobalStore(GLOBAL_SNACKBAR_STORE)\n\n useEffect(() => {\n addProvider(ref)\n\n return () => {\n for (const toast of getGlobalSnackBarQueue().visibleToasts) {\n toast.animation = undefined\n }\n\n deleteProvider(ref)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return ref === provider && state.visibleToasts.length > 0\n ? createPortal(<SnackbarRegion ref={forwardedRef} state={state} {...props} />, document.body)\n : null\n}\n\nSnackbar.displayName = 'Snackbar'\n\nexport interface AddSnackbarArgs extends SnackbarItemValue, Omit<SnackBarItemOptions, 'timeout'> {\n /**\n * Handler that is called when the snackbar is closed, either by the user\n * or after a timeout.\n */\n onClose?: () => void\n /**\n * A timeout to automatically close the snackbar after, in milliseconds.\n * @default 5000\n */\n timeout?: number | null\n /**\n * The priority of the snackbar relative to other snackbars. Larger numbers indicate higher priority.\n */\n priority?: number\n}\n\nexport const addSnackbar = ({ onClose, timeout = 5000, priority, ...content }: AddSnackbarArgs) => {\n const queue = getGlobalSnackBarQueue()\n\n queue.add(content, {\n onClose,\n timeout: timeout && !content.onAction ? Math.max(timeout, 5000) : undefined,\n priority,\n })\n}\n","import { type AriaToastRegionProps, useToastRegion } from '@react-aria/toast'\nimport { cloneElement, type ComponentPropsWithRef, type ReactElement, useRef } from 'react'\n\nimport { SnackbarItem, type SnackbarItemProps } from './SnackbarItem'\nimport { SnackbarItemContext, type SnackbarItemState } from './SnackbarItemContext'\nimport { snackbarRegionVariant, type SnackbarRegionVariantProps } from './SnackbarRegion.styles'\n\nexport interface SnackbarRegionProps\n extends ComponentPropsWithRef<'div'>,\n AriaToastRegionProps,\n SnackbarRegionVariantProps,\n Pick<SnackbarItemState, 'state'> {\n /**\n * An accessibility label for the snackbar region.\n * @default 'Notifications'\n */\n 'aria-label'?: string\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string\n /**\n * The component/template used to display each snackbar from the queue\n * @default 'Snackbar.Item'\n */\n children?: ReactElement<SnackbarItemProps, typeof SnackbarItem>\n}\n\nexport const SnackbarRegion = ({\n children = <SnackbarItem />,\n state,\n position = 'bottom',\n className,\n ref: forwardedRef,\n ...rest\n}: SnackbarRegionProps): ReactElement => {\n const innerRef = useRef<HTMLDivElement>(null)\n const ref = forwardedRef && typeof forwardedRef !== 'function' ? forwardedRef : innerRef\n\n const { regionProps } = useToastRegion(rest, state, ref)\n\n return (\n <div\n {...regionProps}\n ref={ref}\n data-position={position}\n className={snackbarRegionVariant({ position, className })}\n >\n {state.visibleToasts.map(toast => (\n <SnackbarItemContext.Provider key={toast.key} value={{ toast, state }}>\n {cloneElement(children, { key: toast.key })}\n </SnackbarItemContext.Provider>\n ))}\n </div>\n )\n}\n","/* eslint-disable max-lines-per-function */\n\nimport { useToast } from '@react-aria/toast'\nimport {\n Children,\n cloneElement,\n type ComponentPropsWithRef,\n type FC,\n isValidElement,\n type PropsWithChildren,\n type ReactElement,\n type ReactNode,\n useCallback,\n useRef,\n} from 'react'\n\nimport {\n snackbarItemVariant,\n snackbarItemVariantContent,\n type SnackbarItemVariantContentProps,\n type SnackbarItemVariantProps,\n} from './SnackbarItem.styles'\nimport { SnackbarItemAction, SnackbarItemActionProps } from './SnackbarItemAction'\nimport { SnackbarItemClose, SnackbarItemCloseProps } from './SnackbarItemClose'\nimport { useSnackbarItemContext } from './SnackbarItemContext'\nimport { SnackbarItemIcon, SnackbarItemIconProps } from './SnackbarItemIcon'\nimport { useSwipe } from './useSwipe'\n\nexport interface SnackbarItemValue extends SnackbarItemVariantProps {\n /**\n * Icon that will be prepended before snackbar message\n */\n icon?: ReactNode\n message: ReactNode\n /**\n * If `true` snackbar will display a close button\n * @default false\n */\n isClosable?: boolean\n /**\n * A label for the action button within the toast.\n */\n actionLabel?: string\n /**\n * Handler that is called when the action button is pressed.\n */\n onAction?: () => void\n /**\n * If `true` the action button will be displayed on a new line.\n * @default false\n */\n actionOnNewline?: boolean\n}\n\nexport interface SnackbarItemProps\n extends ComponentPropsWithRef<'div'>,\n SnackbarItemVariantProps,\n SnackbarItemVariantContentProps {\n /**\n * Defines a string value that labels the current element.\n */\n 'aria-label'?: string\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string\n}\n\nexport const SnackbarItem = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n design: designProp,\n intent: intentProp,\n actionOnNewline: actionOnNewlineProp,\n className,\n children,\n ref: forwardedRef,\n ...rest\n}: PropsWithChildren<SnackbarItemProps>) => {\n const innerRef = useRef(null)\n const ref = typeof forwardedRef !== 'function' ? forwardedRef || innerRef : innerRef\n\n const { toast, state } = useSnackbarItemContext()\n\n const { state: swipeState, direction: swipeDirection } = useSwipe({\n swipeRef: ref,\n onSwipeStart: state.pauseAll,\n onSwipeCancel: state.resumeAll,\n onSwipeEnd: ({ direction }) => {\n ;['left', 'right'].includes(`${direction}`) && state.close(toast.key)\n },\n })\n\n const { message, icon, isClosable, onAction, actionLabel } = toast.content\n const intent = intentProp ?? toast.content.intent\n const design = designProp ?? toast.content.design\n const actionOnNewline = actionOnNewlineProp ?? toast.content.actionOnNewline\n\n const ariaProps = {\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n ariaDetails,\n }\n\n const { toastProps, titleProps, closeButtonProps, contentProps } = useToast(\n { toast, ...ariaProps },\n state,\n ref\n )\n\n const findElement = useCallback(\n <P extends object>(elementDisplayName: string): ReactElement<P> | undefined => {\n const childrenArray = Children.toArray(children)\n\n const match = childrenArray\n .filter(isValidElement)\n .find(\n (child): child is ReactElement<P> =>\n !!(child.type as FC<P> & { displayName?: string }).displayName?.includes(\n elementDisplayName\n )\n )\n\n return match as ReactElement<P> | undefined\n },\n [children]\n )\n\n const iconFromChildren = findElement<SnackbarItemIconProps>('Snackbar.ItemIcon')\n const actionBtnFromChildren = findElement<SnackbarItemActionProps>('Snackbar.ItemAction')\n const closeBtnFromChildren = findElement<SnackbarItemCloseProps>('Snackbar.ItemClose')\n\n return (\n <div\n data-spark-component=\"snackbar-item\"\n className={snackbarItemVariant({ design, intent, className })}\n data-animation={toast.animation}\n {...(!(swipeState === 'cancel' && toast.animation === 'exiting') && {\n 'data-swipe': swipeState,\n 'data-swipe-direction': swipeDirection,\n })}\n {...(toast.animation === 'exiting' && {\n // Remove snackbar when the exiting animation completes\n onAnimationEnd: () => state.remove(toast.key),\n })}\n ref={ref}\n {...toastProps}\n {...rest}\n >\n <div className={snackbarItemVariantContent({ actionOnNewline })} {...contentProps}>\n {/* 1. ICON */}\n {renderSubComponent(iconFromChildren, icon ? SnackbarItemIcon : null, {\n children: icon,\n })}\n\n {/* 2. MESSAGE */}\n <p\n className=\"px-md py-lg text-body-2 row-span-3\"\n style={{ gridArea: 'message' }}\n {...titleProps}\n >\n {message}\n </p>\n\n {/* 3. ACTION BUTTON */}\n {renderSubComponent(\n actionBtnFromChildren,\n actionLabel && onAction ? SnackbarItemAction : null,\n { intent, design, onClick: onAction, children: actionLabel }\n )}\n\n {/* 4. CLOSE BUTTON */}\n {renderSubComponent(closeBtnFromChildren, isClosable ? SnackbarItemClose : null, {\n intent,\n design,\n /**\n * React Spectrum typing of aria-label is inaccurate, and aria-label value should never be undefined.\n * See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/i18n/src/useLocalizedStringFormatter.ts#L40\n */\n 'aria-label': closeButtonProps['aria-label'] as string,\n })}\n </div>\n </div>\n )\n}\n\nSnackbarItem.displayName = 'Snackbar.Item'\n\n/**\n * Returns compound item if found in children prop.\n * If not fallbacks to default item, conditionned by addSnackbar options.\n */\nconst renderSubComponent = <P extends object>(\n childItem?: ReactElement<P>,\n defaultItem?: FC<P> | null,\n props?: P\n) => {\n if (childItem) {\n return cloneElement(childItem, { ...props, ...childItem.props })\n } else if (defaultItem) {\n const Item = defaultItem\n\n return <Item {...(props as P)} />\n } else {\n return null\n }\n}\n","import { cva, VariantProps } from 'class-variance-authority'\n\nimport { filledVariants, tintedVariants } from './snackbarVariants'\n\nexport const snackbarItemVariant = cva(\n [\n 'rounded-md shadow-sm',\n 'max-w-[600px]',\n 'cursor-default pointer-events-auto touch-none select-none',\n 'absolute',\n /**\n * Focus\n */\n 'group-focus-visible:outline-hidden group-focus-visible:u-outline group-not-focus-visible:ring-inset',\n /**\n * Positionning\n */\n 'group-data-[position=bottom]:bottom-0 group-data-[position=bottom-left]:bottom-0 group-data-[position=bottom-right]:bottom-0',\n 'group-data-[position=top]:top-0 group-data-[position=top-left]:top-0 group-data-[position=top-right]:top-0',\n /**\n * Animation and opacity\n */\n '[animation-fill-mode: forwards]!',\n 'data-[animation=queued]:animate-fade-in',\n 'data-[animation=entering]:easing-decelerate-back',\n 'data-[animation=exiting]:easing-standard',\n // Parent position bottom|bottom-left|bottom-right\n 'data-[animation=entering]:group-data-[position=bottom]:[&:not([data-swipe])]:animate-slide-in-bottom',\n 'data-[animation=exiting]:opacity-0 data-[animation=exiting]:transition-opacity',\n 'data-[animation=exiting]:group-data-[position=bottom]:[&:not([data-swipe])]:animate-slide-out-bottom',\n 'data-[animation=entering]:group-data-[position=bottom-left]:[&:not([data-swipe])]:animate-slide-in-bottom',\n 'data-[animation=exiting]:group-data-[position=bottom-left]:[&:not([data-swipe])]:animate-slide-out-bottom',\n 'data-[animation=entering]:group-data-[position=bottom-right]:[&:not([data-swipe])]:animate-slide-in-bottom',\n 'data-[animation=exiting]:group-data-[position=bottom-right]:[&:not([data-swipe])]:animate-slide-out-bottom',\n // Parent position top|top-left|top-right\n 'data-[animation=entering]:group-data-[position=top]:[&:not([data-swipe])]:animate-slide-in-top',\n 'data-[animation=exiting]:group-data-[position=top]:[&:not([data-swipe])]:animate-slide-out-top',\n 'data-[animation=entering]:group-data-[position=top-left]:[&:not([data-swipe])]:animate-slide-in-top',\n 'data-[animation=exiting]:group-data-[position=top-left]:[&:not([data-swipe])]:animate-slide-out-top',\n 'data-[animation=entering]:group-data-[position=top-right]:[&:not([data-swipe])]:animate-slide-in-top',\n 'data-[animation=exiting]:group-data-[position=top-right]:[&:not([data-swipe])]:animate-slide-out-top',\n /**\n * Swipe\n */\n 'data-[swipe=move]:data-[swipe-direction=right]:translate-x-(--swipe-position-x)',\n 'data-[swipe=move]:data-[swipe-direction=left]:translate-x-(--swipe-position-x)',\n 'data-[swipe=cancel]:translate-x-0',\n 'data-[swipe=end]:data-[swipe-direction=right]:animate-standalone-swipe-out-right',\n 'data-[swipe=end]:data-[swipe-direction=left]:animate-standalone-swipe-out-left',\n ],\n {\n variants: {\n /**\n * Set different look and feel\n * @default 'filled'\n */\n design: {\n filled: '',\n tinted: '',\n },\n /**\n * Set color intent\n * @default 'neutral'\n */\n intent: {\n success: '',\n alert: '',\n error: '',\n info: '',\n neutral: '',\n main: '',\n basic: '',\n support: '',\n accent: '',\n inverse: '',\n },\n },\n compoundVariants: [...filledVariants, ...tintedVariants],\n defaultVariants: {\n design: 'filled',\n intent: 'neutral',\n },\n }\n)\n\nexport const snackbarItemVariantContent = cva(\n [\n 'inline-grid items-center',\n 'col-start-1 row-start-1',\n 'pl-md pr-lg', // applying padding on the parent prevents VoiceOver on Safari from reading snackbar content 🤷\n ],\n {\n variants: {\n /**\n * Force action button displaying on a new line\n * @default false\n */\n actionOnNewline: {\n true: [\n 'grid-rows-[52px_1fr_52px]',\n 'grid-cols-[min-content_1fr_min-content]',\n \"[grid-template-areas:'icon_message_close'_'._message_.'_'action_action_action']\",\n ],\n false: [\n 'grid-cols-[min-content_1fr_min-content_min-content]',\n \"[grid-template-areas:'icon_message_action_close']\",\n ],\n },\n },\n defaultVariants: {\n actionOnNewline: false,\n },\n }\n)\n\nexport type SnackbarItemVariantProps = VariantProps<typeof snackbarItemVariant>\nexport type SnackbarItemVariantContentProps = VariantProps<typeof snackbarItemVariantContent>\n","export const filledVariants = [\n {\n design: 'filled',\n intent: 'success',\n class: ['bg-success text-on-success'],\n },\n {\n design: 'filled',\n intent: 'alert',\n class: ['bg-alert text-on-alert'],\n },\n {\n design: 'filled',\n intent: 'error',\n class: ['bg-error text-on-error'],\n },\n {\n design: 'filled',\n intent: 'info',\n class: ['bg-info text-on-info'],\n },\n {\n design: 'filled',\n intent: 'neutral',\n class: ['bg-neutral text-on-neutral'],\n },\n {\n design: 'filled',\n intent: 'main',\n class: ['bg-main text-on-main'],\n },\n {\n design: 'filled',\n intent: 'basic',\n class: ['bg-basic text-on-basic'],\n },\n {\n design: 'filled',\n intent: 'support',\n class: ['bg-support text-on-support'],\n },\n {\n design: 'filled',\n intent: 'accent',\n class: ['bg-accent text-on-accent'],\n },\n {\n design: 'filled',\n intent: 'inverse',\n class: ['bg-surface-inverse text-on-surface-inverse'],\n },\n] as const\n\nexport const tintedVariants = [\n {\n design: 'tinted',\n intent: 'success',\n class: ['bg-success-container text-on-success-container'],\n },\n {\n design: 'tinted',\n intent: 'alert',\n class: ['bg-alert-container text-on-alert-container'],\n },\n {\n design: 'tinted',\n intent: 'error',\n class: ['bg-error-container text-on-error-container'],\n },\n {\n design: 'tinted',\n intent: 'info',\n class: ['bg-info-container text-on-info-container'],\n },\n {\n design: 'tinted',\n intent: 'neutral',\n class: ['bg-neutral-container text-on-neutral-container'],\n },\n {\n design: 'tinted',\n intent: 'main',\n class: ['bg-main-container text-on-main-container'],\n },\n {\n design: 'tinted',\n intent: 'basic',\n class: ['bg-basic-container text-on-basic-container'],\n },\n {\n design: 'tinted',\n intent: 'support',\n class: ['bg-support-container text-on-support-container'],\n },\n {\n design: 'tinted',\n intent: 'accent',\n class: ['bg-accent-container text-on-accent-container'],\n },\n {\n design: 'tinted',\n intent: 'inverse',\n class: ['bg-surface-inverse text-on-surface-inverse'],\n },\n] as const\n","import { cx } from 'class-variance-authority'\nimport { Ref } from 'react'\n\nimport { Button, type ButtonProps } from '../button'\nimport type { SnackbarItemVariantProps } from './SnackbarItem.styles'\nimport { useSnackbarItemContext } from './SnackbarItemContext'\n\nexport type SnackbarItemActionProps = Omit<ButtonProps, 'size' | 'shape' | 'intent'> &\n SnackbarItemVariantProps & {\n ref?: Ref<HTMLButtonElement>\n }\n\nexport const SnackbarItemAction = ({\n design: designProp = 'filled',\n intent: intentProp = 'neutral',\n onClick,\n children,\n className,\n ref,\n ...rest\n}: SnackbarItemActionProps) => {\n const { toast, state } = useSnackbarItemContext()\n\n const intent = intentProp ?? toast.content.intent\n const design = designProp ?? toast.content.design\n\n return (\n <Button\n data-spark-component=\"snackbar-item-action\"\n ref={ref}\n size=\"md\"\n shape=\"rounded\"\n {...(intent === 'inverse'\n ? {\n design: 'ghost',\n intent: 'surface',\n }\n : {\n design,\n intent: intent === 'error' ? 'danger' : intent,\n })}\n onClick={e => {\n onClick?.(e)\n state.close(toast.key)\n }}\n style={{ gridArea: 'action', ...rest.style }}\n className={cx('ml-md justify-self-end', className)}\n {...rest}\n >\n {children}\n </Button>\n )\n}\n\nSnackbarItemAction.displayName = 'Snackbar.ItemAction'\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 { 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\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: [],\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 'surfaceInverse',\n ]\n >({\n main: [],\n support: [],\n accent: [],\n basic: [],\n success: [],\n alert: [],\n danger: [],\n info: [],\n neutral: [],\n surface: [],\n surfaceInverse: [],\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 {\n intent: 'surfaceInverse',\n design: 'filled',\n class: tw([\n 'bg-surface-inverse',\n 'text-on-surface-inverse',\n 'hover:bg-surface-inverse-hovered',\n 'enabled:active:bg-surface-inverse-hovered',\n 'focus-visible:bg-surface-inverse-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 {\n intent: 'surfaceInverse',\n design: 'ghost',\n class: tw([\n 'text-surface-inverse',\n 'hover:bg-surface-inverse/dim-5',\n 'enabled:active:bg-surface-inverse/dim-5',\n 'focus-visible:bg-surface-inverse/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 {\n intent: 'surfaceInverse',\n design: 'outlined',\n class: tw([\n 'hover:bg-surface-inverse/dim-5',\n 'enabled:active:bg-surface-inverse/dim-5',\n 'focus-visible:bg-surface-inverse/dim-5',\n 'text-surface-inverse',\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 {\n intent: 'surfaceInverse',\n design: 'tinted',\n class: tw([\n 'bg-surface-inverse',\n 'text-on-surface-inverse',\n 'hover:bg-surface-inverse-hovered',\n 'enabled:active:bg-surface-inverse-hovered',\n 'focus-visible:bg-surface-inverse-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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\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 bg-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n {\n intent: 'surfaceInverse',\n design: 'contrast',\n class: tw([\n 'text-on-surface-inverse bg-surface-inverse',\n 'hover:bg-surface-inverse-hovered',\n 'enabled:active:bg-surface-inverse-hovered',\n 'focus-visible:bg-surface-inverse-hovered',\n ]),\n },\n] as const\n","import { QueuedToast, ToastState } from '@react-stately/toast'\nimport { createContext, useContext } from 'react'\n\nimport type { SnackbarItemValue } from './SnackbarItem'\n\nexport interface SnackbarItemState<T = SnackbarItemValue> {\n toast: QueuedToast<T>\n state: ToastState<T>\n}\n\nexport const SnackbarItemContext = createContext<SnackbarItemState>({} as SnackbarItemState)\n\nexport const useSnackbarItemContext = () => useContext(SnackbarItemContext)\n","import { Close } from '@spark-ui/icons/Close'\nimport { cx } from 'class-variance-authority'\nimport { type ComponentPropsWithRef } from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton, type IconButtonProps } from '../icon-button'\nimport type { SnackbarItemVariantProps } from './SnackbarItem.styles'\nimport { useSnackbarItemContext } from './SnackbarItemContext'\n\nexport interface SnackbarItemCloseProps\n extends Omit<ComponentPropsWithRef<'button'>, 'aria-label' | 'disabled'>,\n Pick<IconButtonProps, 'aria-label'>,\n SnackbarItemVariantProps {}\n\nexport const SnackbarItemClose = ({\n design: designProp = 'filled',\n intent: intentProp = 'neutral',\n 'aria-label': ariaLabel,\n onClick,\n className,\n ref,\n ...rest\n}: SnackbarItemCloseProps) => {\n const { toast, state } = useSnackbarItemContext()\n\n const intent = intentProp ?? toast.content.intent\n const design = designProp ?? toast.content.design\n\n return (\n <IconButton\n data-spark-component=\"snackbar-item-close\"\n ref={ref}\n size=\"md\"\n shape=\"rounded\"\n {...(intent === 'inverse'\n ? {\n design: 'ghost',\n intent: 'surface',\n }\n : {\n design,\n intent: intent === 'error' ? 'danger' : intent,\n })}\n aria-label={ariaLabel}\n onClick={e => {\n onClick?.(e)\n state.close(toast.key)\n }}\n style={{ gridArea: 'close', ...rest.style }}\n className={cx('ml-md justify-self-end', className)}\n {...rest}\n >\n <Icon size=\"sm\">\n <Close />\n </Icon>\n </IconButton>\n )\n}\n\nSnackbarItemClose.displayName = 'Snackbar.ItemClose'\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 { 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 { 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 data-spark-component=\"icon-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 type { ReactElement } from 'react'\n\nimport { Icon, type IconProps } from '../icon'\n\nexport type SnackbarItemIconProps = IconProps\n\nexport const SnackbarItemIcon = ({\n children,\n className,\n ...rest\n}: SnackbarItemIconProps): ReactElement => (\n <Icon\n size=\"md\"\n className={cx('mx-md', className)}\n style={{ gridArea: 'icon', ...rest.style }}\n {...rest}\n >\n {children}\n </Icon>\n)\n\nSnackbarItemIcon.displayName = 'Snackbar.ItemIcon'\n","/* eslint-disable complexity */\nimport { type RefObject, useEffect, useRef, useState } from 'react'\n\ninterface SwipeArgs<T> {\n swipeRef: RefObject<T | null>\n onSwipeStart?: ({ state, direction }: SwipeReturn) => void\n onSwipeMove?: ({ state, direction }: SwipeReturn) => void\n onSwipeCancel?: ({ state, direction }: SwipeReturn) => void\n onSwipeEnd?: ({ state, direction }: SwipeReturn) => void\n threshold?: number\n}\n\ninterface SwipeReturn {\n state?: 'start' | 'move' | 'cancel' | 'end'\n direction?: 'up' | 'down' | 'right' | 'left' | null\n}\n\nconst SWIPE_THRESHOLD = 75\n\nexport const useSwipe = <T extends HTMLElement>({\n swipeRef,\n onSwipeStart,\n onSwipeMove,\n onSwipeCancel,\n onSwipeEnd,\n threshold = 10,\n}: SwipeArgs<T>): SwipeReturn => {\n const [state, setState] = useState<SwipeReturn['state']>()\n\n const direction = useRef<SwipeReturn['direction']>(null)\n const origin = useRef<Record<'x' | 'y', number> | null>(null)\n const delta = useRef<Record<'x' | 'y', number> | null>(null)\n\n const handleSwipeStart = (evt: PointerEvent) => {\n origin.current = { x: evt.clientX, y: evt.clientY }\n\n /**\n * Prevents unwanted text selection in Safari browser (longpress)\n */\n document.addEventListener('selectstart', e => e.preventDefault())\n }\n\n const handleSwipeMove = (evt: PointerEvent) => {\n if (!origin.current) return\n\n const deltaX = Math.abs(evt.clientX - origin.current.x)\n const deltaY = Math.abs(evt.clientY - origin.current.y)\n\n let moveState: SwipeReturn['state']\n\n if (deltaX > deltaY && deltaX > threshold) {\n direction.current = evt.clientX > origin.current.x ? 'right' : 'left'\n } else if (deltaY > threshold) {\n direction.current = evt.clientY > origin.current.y ? 'down' : 'up'\n }\n\n /**\n * If no direction could be defined, then no move should be handled.\n * This is particularly true with trackpads working with MacOS/Windows.\n */\n if (!direction.current) return\n\n if (!delta.current) {\n moveState = 'start'\n delta.current = { x: deltaX, y: deltaY }\n onSwipeStart?.({ state: moveState, direction: direction.current })\n } else {\n moveState = 'move'\n delta.current = { x: deltaX, y: deltaY }\n ;(swipeRef.current as T).style.setProperty(\n '--swipe-position-x',\n `${deltaX > deltaY ? evt.clientX - origin.current.x : 0}px`\n )\n ;(swipeRef.current as T).style.setProperty(\n '--swipe-position-y',\n `${!(deltaX > deltaY) ? evt.clientY - origin.current.y : 0}px`\n )\n onSwipeMove?.({ state: moveState, direction: direction.current })\n }\n\n setState(moveState)\n }\n\n const handleSwipeEnd = () => {\n const proxyDelta = delta.current\n\n origin.current = null\n delta.current = null\n\n if (proxyDelta) {\n const { x: deltaX, y: deltaY } = proxyDelta\n\n let endState: SwipeReturn['state']\n\n if (deltaX > deltaY) {\n if (deltaX > SWIPE_THRESHOLD) {\n endState = 'end'\n onSwipeEnd?.({ state: endState, direction: direction.current })\n } else {\n endState = 'cancel'\n onSwipeCancel?.({ state: endState, direction: direction.current })\n }\n } else {\n if (deltaY > SWIPE_THRESHOLD) {\n endState = 'end'\n onSwipeEnd?.({ state: endState, direction: direction.current })\n } else {\n endState = 'cancel'\n onSwipeCancel?.({ state: endState, direction: direction.current })\n }\n }\n\n setState(endState)\n\n /**\n * Prevents unwanted text selection in Safari browser (longpress)\n */\n document.removeEventListener('selectstart', e => e.preventDefault())\n }\n }\n\n useEffect(() => {\n if (!swipeRef.current) return\n\n const swipeElement = swipeRef.current\n\n swipeElement.addEventListener('pointerdown', handleSwipeStart)\n document.addEventListener('pointermove', handleSwipeMove)\n document.addEventListener('pointerup', handleSwipeEnd)\n\n return () => {\n swipeElement.removeEventListener('pointerdown', handleSwipeStart)\n document.removeEventListener('pointermove', handleSwipeMove)\n document.removeEventListener('pointerup', handleSwipeEnd)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return {\n state,\n direction: direction.current,\n }\n}\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const snackbarRegionVariant = cva(\n [\n 'fixed inset-x-lg z-toast group',\n 'outline-hidden pointer-events-none',\n 'grid grid-rows-1 grid-cols-1 gap-lg',\n ],\n {\n variants: {\n /**\n * Set snackbar item position\n * @default 'bottom'\n */\n position: {\n top: 'top-lg justify-items-center',\n 'top-right': 'top-lg justify-items-end',\n 'top-left': 'top-lg justify-items-start',\n bottom: 'bottom-lg justify-items-center',\n 'bottom-right': 'bottom-lg justify-items-end',\n 'bottom-left': 'bottom-lg justify-items-start',\n },\n },\n defaultVariants: {\n position: 'bottom',\n },\n }\n)\n\nexport type SnackbarRegionVariantProps = VariantProps<typeof snackbarRegionVariant>\n","import { type RefObject, useCallback, useSyncExternalStore } from 'react'\n\ninterface UseSnackbarGlobalStoreArgs<T> {\n providers: Set<T>\n subscriptions: Set<() => void>\n}\n\ninterface UseSnackbarGlobalStoreReturn<T> {\n provider: T\n addProvider: (ref: T) => void\n deleteProvider: (ref: T) => void\n}\n\n/**\n * This hook is a basic abstraction of useSyncExternalStore hook which allows us\n * to consume data from an external data store.\n *\n * Cf. https://react.dev/reference/react/useSyncExternalStore#subscribing-to-an-external-store\n */\n\nexport const useSnackbarGlobalStore = <T = RefObject<HTMLDivElement | null>>({\n providers,\n subscriptions,\n}: UseSnackbarGlobalStoreArgs<T>): UseSnackbarGlobalStoreReturn<T> => {\n const subscribe = useCallback(\n (listener: () => void) => {\n subscriptions.add(listener)\n\n return () => subscriptions.delete(listener)\n },\n [subscriptions]\n )\n\n const getLastSnackbarProvider = useCallback(() => [...providers].reverse()[0] as T, [providers])\n\n const addProvider = useCallback(\n (provider: T) => {\n providers.add(provider)\n\n for (const subscribeFn of subscriptions) {\n subscribeFn()\n }\n },\n [providers, subscriptions]\n )\n\n const deleteProvider = useCallback(\n (provider: T) => {\n providers.delete(provider)\n\n for (const subscribeFn of subscriptions) {\n subscribeFn()\n }\n },\n [providers, subscriptions]\n )\n\n const provider = useSyncExternalStore(subscribe, getLastSnackbarProvider, getLastSnackbarProvider)\n\n return {\n provider,\n addProvider,\n deleteProvider,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,kBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAC,gBAIO;AACP,IAAAC,gBAA0E;AAC1E,uBAA6B;;;ACN7B,IAAAC,gBAA0D;AAC1D,IAAAC,gBAAoF;;;ACCpF,mBAAyB;AACzB,IAAAC,gBAWO;;;ACdP,sCAAkC;;;ACA3B,IAAM,iBAAiB;AAAA,EAC5B;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,CAAC,4BAA4B;AAAA,EACtC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,CAAC,wBAAwB;AAAA,EAClC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,CAAC,wBAAwB;AAAA,EAClC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,CAAC,sBAAsB;AAAA,EAChC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,CAAC,4BAA4B;AAAA,EACtC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,CAAC,sBAAsB;AAAA,EAChC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,CAAC,wBAAwB;AAAA,EAClC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA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,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,UAAS,cAAc;AACvB,aAAK,cAAc;AACnB,mBAAW,cAAc;AACzB,kBAAU,cAAc;AACxB,iBAAS,cAAc;","names":["Snackbar","import_toast","import_react","import_toast","import_react","import_react","import_class_variance_authority","import_class_variance_authority","import_react","RadixSlot","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_internal_utils","import_class_variance_authority","import_internal_utils","filledVariants","import_internal_utils","import_internal_utils","import_internal_utils","tintedVariants","import_internal_utils","filledVariants","tintedVariants","import_jsx_runtime","import_react","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_jsx_runtime","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_react","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_react","provider","import_jsx_runtime","Snackbar"]}
|