@spark-ui/components 11.1.0 → 11.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DialogTrigger-woU7vsJi.d.ts +142 -0
- package/dist/Input-N8AWWSmt.d.ts +41 -0
- package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +20 -0
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +19 -0
- package/dist/accordion/index.d.ts +73 -0
- package/dist/accordion/index.js +325 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/alert-dialog/index.d.ts +119 -0
- package/dist/alert-dialog/index.js +1554 -0
- package/dist/alert-dialog/index.js.map +1 -0
- package/dist/avatar/index.d.ts +66 -0
- package/dist/avatar/index.js +1303 -0
- package/dist/avatar/index.js.map +1 -0
- package/dist/badge/index.d.ts +47 -0
- package/dist/badge/index.js +122 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/breadcrumb/index.d.ts +64 -0
- package/dist/breadcrumb/index.js +327 -0
- package/dist/breadcrumb/index.js.map +1 -0
- package/dist/button/index.d.ts +41 -0
- package/dist/button/index.js +935 -0
- package/dist/button/index.js.map +1 -0
- package/dist/card/index.d.ts +61 -0
- package/dist/card/index.js +502 -0
- package/dist/card/index.js.map +1 -0
- package/dist/carousel/index.d.ts +261 -0
- package/dist/carousel/index.js +1801 -0
- package/dist/carousel/index.js.map +1 -0
- package/dist/checkbox/index.d.ts +120 -0
- package/dist/checkbox/index.js +511 -0
- package/dist/checkbox/index.js.map +1 -0
- package/dist/chip/index.d.ts +97 -0
- package/dist/chip/index.js +908 -0
- package/dist/chip/index.js.map +1 -0
- package/dist/collapsible/index.d.ts +43 -0
- package/dist/collapsible/index.js +109 -0
- package/dist/collapsible/index.js.map +1 -0
- package/dist/combobox/index.d.ts +287 -0
- package/dist/combobox/index.js +2588 -0
- package/dist/combobox/index.js.map +1 -0
- package/dist/dialog/index.d.ts +33 -0
- package/dist/dialog/index.js +1389 -0
- package/dist/dialog/index.js.map +1 -0
- package/dist/divider/index.d.ts +61 -0
- package/dist/divider/index.js +224 -0
- package/dist/divider/index.js.map +1 -0
- package/dist/drawer/index.d.ts +152 -0
- package/dist/drawer/index.js +1400 -0
- package/dist/drawer/index.js.map +1 -0
- package/dist/dropdown/index.d.ts +233 -0
- package/dist/dropdown/index.js +2051 -0
- package/dist/dropdown/index.js.map +1 -0
- package/dist/form-field/index.d.ts +186 -0
- package/dist/form-field/index.js +553 -0
- package/dist/form-field/index.js.map +1 -0
- package/dist/icon/index.d.ts +28 -0
- package/dist/icon/index.js +127 -0
- package/dist/icon/index.js.map +1 -0
- package/dist/icon-button/index.d.ts +16 -0
- package/dist/icon-button/index.js +980 -0
- package/dist/icon-button/index.js.map +1 -0
- package/dist/input/index.d.ts +78 -0
- package/dist/input/index.js +724 -0
- package/dist/input/index.js.map +1 -0
- package/dist/kbd/index.d.ts +9 -0
- package/dist/kbd/index.js +47 -0
- package/dist/kbd/index.js.map +1 -0
- package/dist/label/index.d.ts +11 -0
- package/dist/label/index.js +78 -0
- package/dist/label/index.js.map +1 -0
- package/dist/link-box/index.d.ts +34 -0
- package/dist/link-box/index.js +92 -0
- package/dist/link-box/index.js.map +1 -0
- package/dist/pagination/index.d.ts +143 -0
- package/dist/pagination/index.js +1353 -0
- package/dist/pagination/index.js.map +1 -0
- package/dist/popover/index.d.ts +93 -0
- package/dist/popover/index.js +1339 -0
- package/dist/popover/index.js.map +1 -0
- package/dist/portal/index.d.ts +13 -0
- package/dist/portal/index.js +37 -0
- package/dist/portal/index.js.map +1 -0
- package/dist/progress/index.d.ts +48 -0
- package/dist/progress/index.js +223 -0
- package/dist/progress/index.js.map +1 -0
- package/dist/progress-tracker/index.d.ts +80 -0
- package/dist/progress-tracker/index.js +571 -0
- package/dist/progress-tracker/index.js.map +1 -0
- package/dist/radio-group/index.d.ts +100 -0
- package/dist/radio-group/index.js +318 -0
- package/dist/radio-group/index.js.map +1 -0
- package/dist/rating/index.d.ts +78 -0
- package/dist/rating/index.js +363 -0
- package/dist/rating/index.js.map +1 -0
- package/dist/scrolling-list/index.d.ts +118 -0
- package/dist/scrolling-list/index.js +1426 -0
- package/dist/scrolling-list/index.js.map +1 -0
- package/dist/segmented-gauge/index.d.ts +100 -0
- package/dist/segmented-gauge/index.js +277 -0
- package/dist/segmented-gauge/index.js.map +1 -0
- package/dist/select/index.d.ts +167 -0
- package/dist/select/index.js +581 -0
- package/dist/select/index.js.map +1 -0
- package/dist/skeleton/index.d.ts +67 -0
- package/dist/skeleton/index.js +206 -0
- package/dist/skeleton/index.js.map +1 -0
- package/dist/slider/index.d.ts +97 -0
- package/dist/slider/index.js +220 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/slot/index.d.ts +16 -0
- package/dist/slot/index.js +51 -0
- package/dist/slot/index.js.map +1 -0
- package/dist/snackbar/index.d.ts +158 -0
- package/dist/snackbar/index.js +1756 -0
- package/dist/snackbar/index.js.map +1 -0
- package/dist/spinner/index.d.mts +1 -1
- package/dist/spinner/index.d.ts +21 -0
- package/dist/spinner/index.js +139 -0
- package/dist/spinner/index.js.map +1 -0
- package/dist/stepper/index.d.ts +81 -0
- package/dist/stepper/index.js +1847 -0
- package/dist/stepper/index.js.map +1 -0
- package/dist/switch/index.d.ts +64 -0
- package/dist/switch/index.js +327 -0
- package/dist/switch/index.js.map +1 -0
- package/dist/tabs/index.d.ts +103 -0
- package/dist/tabs/index.js +1376 -0
- package/dist/tabs/index.js.map +1 -0
- package/dist/tag/index.d.ts +29 -0
- package/dist/tag/index.js +283 -0
- package/dist/tag/index.js.map +1 -0
- package/dist/text-link/index.d.ts +20 -0
- package/dist/text-link/index.js +100 -0
- package/dist/text-link/index.js.map +1 -0
- package/dist/textarea/index.d.ts +57 -0
- package/dist/textarea/index.js +797 -0
- package/dist/textarea/index.js.map +1 -0
- package/dist/toast/index.d.ts +56 -0
- package/dist/toast/index.js +1412 -0
- package/dist/toast/index.js.map +1 -0
- package/dist/toast/index.mjs +1 -1
- package/dist/toast/index.mjs.map +1 -1
- package/dist/visually-hidden/index.d.ts +16 -0
- package/dist/visually-hidden/index.js +67 -0
- package/dist/visually-hidden/index.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/dialog/index.ts","../../src/dialog/Dialog.tsx","../../src/dialog/DialogContext.tsx","../../src/dialog/DialogBody.tsx","../../src/dialog/DialogClose.tsx","../../src/dialog/DialogCloseButton.tsx","../../src/icon/Icon.tsx","../../src/slot/Slot.tsx","../../src/visually-hidden/VisuallyHidden.tsx","../../src/icon/Icon.styles.tsx","../../src/button/Button.tsx","../../src/spinner/Spinner.styles.tsx","../../src/spinner/Spinner.tsx","../../src/button/Button.styles.tsx","../../src/button/variants/filled.ts","../../src/button/variants/ghost.ts","../../src/button/variants/outlined.ts","../../src/button/variants/tinted.ts","../../src/button/variants/contrast.ts","../../src/icon-button/IconButton.styles.tsx","../../src/icon-button/IconButton.tsx","../../src/dialog/DialogContent.tsx","../../src/dialog/DialogContent.styles.tsx","../../src/dialog/DialogDescription.tsx","../../src/dialog/DialogFooter.tsx","../../src/dialog/DialogHeader.tsx","../../src/dialog/DialogOverlay.tsx","../../src/dialog/DialogPortal.tsx","../../src/dialog/DialogTitle.tsx","../../src/dialog/DialogTrigger.tsx"],"sourcesContent":["import { Dialog as Root } from './Dialog'\nimport { Body } from './DialogBody'\nimport { Close } from './DialogClose'\nimport { CloseButton } from './DialogCloseButton'\nimport { Content } from './DialogContent'\nimport { Description } from './DialogDescription' // aria-describedby\nimport { Footer } from './DialogFooter'\nimport { Header } from './DialogHeader'\nimport { Overlay } from './DialogOverlay'\nimport { Portal } from './DialogPortal'\nimport { Title } from './DialogTitle' // aria-labelledby\nimport { Trigger } from './DialogTrigger'\n\nexport const Dialog: typeof Root & {\n Trigger: typeof Trigger\n Portal: typeof Portal\n Overlay: typeof Overlay\n Content: typeof Content\n Header: typeof Header\n Body: typeof Body\n Footer: typeof Footer\n Close: typeof Close\n CloseButton: typeof CloseButton\n Title: typeof Title\n Description: typeof Description\n} = Object.assign(Root, {\n Trigger,\n Portal,\n Overlay,\n Content,\n Header,\n Body,\n Footer,\n Close,\n CloseButton,\n Title,\n Description,\n})\n\nDialog.displayName = 'Dialog'\nDialog.Trigger.displayName = 'Dialog.Trigger'\nTrigger.displayName = 'Dialog.Trigger'\nPortal.displayName = 'Dialog.Portal'\nOverlay.displayName = 'Dialog.Overlay'\nContent.displayName = 'Dialog.Content'\nHeader.displayName = 'Dialog.Header'\nBody.displayName = 'Dialog.Body'\nFooter.displayName = 'Dialog.Footer'\nCloseButton.displayName = 'Dialog.CloseButton'\nTitle.displayName = 'Dialog.Title'\nDescription.displayName = 'Dialog.Description'\n\nexport { type DialogProps } from './Dialog'\nexport { type ContentProps as DialogContentProps } from './DialogContent'\nexport { type HeaderProps as DialogHeaderProps } from './DialogHeader'\nexport { type BodyProps as DialogBodyProps } from './DialogBody'\nexport { type FooterProps as DialogFooterProps } from './DialogFooter'\nexport { type TriggerProps as DialogTriggerProps } from './DialogTrigger'\nexport { type OverlayProps as DialogOverlayProps } from './DialogOverlay'\nexport { type PortalProps as DialogPortalProps } from './DialogPortal'\nexport { type TitleProps as DialogTitleProps } from './DialogTitle'\nexport { type DescriptionProps as DialogDescriptionProps } from './DialogDescription'\nexport { type CloseProps as DialogCloseProps } from './DialogClose'\nexport { type CloseButtonProps as DialogCloseButtonProps } from './DialogCloseButton'\n","import { Dialog as RadixDialog } from 'radix-ui'\nimport { type ReactElement, useEffect, useRef } from 'react'\n\nimport { DialogProvider } from './DialogContext'\n\nexport interface DialogProps {\n /**\n * Children of the component.\n */\n children?: RadixDialog.DialogProps['children']\n /**\n * Specifies if the dialog is open or not.\n */\n open?: RadixDialog.DialogProps['open']\n /**\n * Default open state.\n */\n defaultOpen?: RadixDialog.DialogProps['defaultOpen']\n /**\n * Handler executen on every dialog open state change.\n */\n onOpenChange?: RadixDialog.DialogProps['onOpenChange']\n /**\n * Specifies if the dialog is a modal.\n */\n modal?: RadixDialog.DialogProps['modal']\n /**\n * Specifies if the dialog should have a fade animation on its body (in case it is scrollable).\n */\n withFade?: boolean\n}\n\nexport const Dialog = ({ children, withFade = false, ...rest }: DialogProps): ReactElement => {\n const open = rest.open\n const activeElementRef = useRef<Element>(null)\n\n /**\n * This function captures the active element when the Dialog is opened\n * and sets focus back to it when the Dialog is closed.\n */\n function handleActiveElementFocus() {\n if (open && document.activeElement) {\n activeElementRef.current = document.activeElement\n }\n\n if (!open) {\n setTimeout(() => {\n if (!(activeElementRef.current instanceof HTMLElement)) return\n activeElementRef.current.focus()\n }, 0)\n }\n }\n\n useEffect(handleActiveElementFocus, [open])\n\n return (\n <DialogProvider withFade={withFade}>\n <RadixDialog.Root {...rest}>{children}</RadixDialog.Root>\n </DialogProvider>\n )\n}\n\nDialog.displayName = 'Dialog.Root'\n","import { createContext, type ReactNode, useContext, useState } from 'react'\n\nexport interface DialogContextState {\n isFullScreen: boolean\n setIsFullScreen: (value: boolean) => void\n withFade: boolean\n}\n\nconst DialogContext = createContext<DialogContextState | null>(null)\n\nexport const DialogProvider = ({\n children: childrenProp,\n withFade = false,\n}: {\n children: ReactNode\n withFade?: boolean\n}) => {\n const [isFullScreen, setIsFullScreen] = useState(false)\n\n return (\n <DialogContext.Provider\n value={{\n isFullScreen,\n setIsFullScreen,\n withFade,\n }}\n >\n {childrenProp}\n </DialogContext.Provider>\n )\n}\n\nexport const useDialog = () => {\n const context = useContext(DialogContext)\n\n if (!context) {\n throw Error('useDialog must be used within a Dialog provider')\n }\n\n return context\n}\n","import { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { useScrollOverflow } from '@spark-ui/hooks/use-scroll-overflow'\nimport { cx } from 'class-variance-authority'\nimport { type ReactElement, type ReactNode, Ref, useRef } from 'react'\n\nimport { useDialog } from './DialogContext'\n\nexport interface BodyProps {\n children: ReactNode\n className?: string\n tabIndex?: number\n ref?: Ref<HTMLDivElement>\n inset?: boolean\n}\n\nexport const Body = ({\n children,\n className,\n inset = false,\n ref: forwardedRef,\n ...rest\n}: BodyProps): ReactElement => {\n const scrollAreaRef = useRef<HTMLDivElement>(null)\n const ref = useMergeRefs(forwardedRef, scrollAreaRef)\n\n const { withFade } = useDialog()\n\n const overflow = useScrollOverflow(scrollAreaRef)\n\n return (\n <div\n data-spark-component=\"dialog-body\"\n ref={ref}\n className={cx(\n 'focus-visible:u-outline relative grow overflow-y-auto outline-hidden',\n 'transition-all duration-300',\n {\n ['px-xl py-lg']: !inset,\n },\n className\n )}\n style={{\n ...(withFade && {\n maskImage:\n 'linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 44px, rgba(0, 0, 0, 1) calc(100% - 44px), rgba(0, 0, 0, 0))',\n maskSize: `100% calc(100% + ${overflow.top ? '0px' : '44px'} + ${overflow.bottom ? '0px' : '44px'})`,\n maskPosition: `0 ${overflow.top ? '0px' : '-44px'}`,\n }),\n }}\n {...rest}\n >\n {children}\n </div>\n )\n}\n\nBody.displayName = 'Dialog.Body'\n","import { Dialog as RadixDialog } from 'radix-ui'\nimport { Ref } from 'react'\n\nexport type CloseProps = RadixDialog.DialogCloseProps & {\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const Close = (props: CloseProps) => <RadixDialog.Close {...props} />\n\nClose.displayName = 'Dialog.Close'\n","import { Close as CloseSVG } from '@spark-ui/icons/Close'\nimport { cx } from 'class-variance-authority'\n\nimport { Icon } from '../icon'\nimport { IconButton, type IconButtonProps } from '../icon-button'\nimport { Close, CloseProps } from './DialogClose'\n\nexport type CloseButtonProps = CloseProps &\n Pick<IconButtonProps, 'size' | 'intent' | 'design' | 'aria-label'>\n\nconst Root = ({\n 'aria-label': ariaLabel,\n className,\n size = 'md',\n intent = 'neutral',\n design = 'ghost',\n children = <CloseSVG />,\n ref,\n ...rest\n}: CloseButtonProps) => {\n return (\n <Close\n data-spark-component=\"dialog-close-button\"\n data-part=\"close\"\n ref={ref}\n className={cx(['absolute', 'top-md', 'right-xl'], className)}\n asChild\n {...rest}\n >\n <IconButton intent={intent} size={size} design={design} aria-label={ariaLabel}>\n <Icon>{children}</Icon>\n </IconButton>\n </Close>\n )\n}\n\nexport const CloseButton = Object.assign(Root, {\n id: 'CloseButton',\n})\n\nRoot.displayName = 'Dialog.CloseButton'\n","import { Children, cloneElement, ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { iconStyles, IconVariantsProps } from './Icon.styles'\n\nexport interface IconProps extends IconVariantsProps, ComponentPropsWithoutRef<'svg'> {\n /**\n * The svg icon that will be wrapped\n */\n children: ReactNode\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label?: string\n}\n\nexport const Icon = ({\n label,\n className,\n size = 'current',\n intent = 'current',\n children,\n ...others\n}: IconProps) => {\n const child = Children.only(children)\n\n return (\n <>\n {cloneElement(child as ReactElement<Record<string, any>>, {\n className: iconStyles({ className, size, intent }),\n 'data-spark-component': 'icon',\n 'aria-hidden': 'true',\n focusable: 'false',\n ...others,\n })}\n\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </>\n )\n}\n\nIcon.displayName = 'Icon'\n","import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n","import { HTMLAttributes, PropsWithChildren, Ref } from 'react'\n\nimport { Slot } from '../slot'\n\nexport type VisuallyHiddenProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLElement>\n}\n\nexport const VisuallyHidden = ({ asChild = false, ref, ...props }: VisuallyHiddenProps) => {\n const Component = asChild ? Slot : 'span'\n\n return (\n <Component\n {...props}\n ref={ref}\n style={{\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n ...props.style,\n }}\n />\n )\n}\n\nVisuallyHidden.displayName = 'VisuallyHidden'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const iconStyles = cva(['fill-current shrink-0'], {\n variants: {\n /**\n * Color scheme of the icon.\n */\n intent: makeVariants<\n 'intent',\n [\n 'current',\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'error',\n 'info',\n 'neutral',\n ]\n >({\n current: ['text-current'],\n main: ['text-main'],\n support: ['text-support'],\n accent: ['text-accent'],\n basic: ['text-basic'],\n success: ['text-success'],\n alert: ['text-alert'],\n error: ['text-error'],\n info: ['text-info'],\n neutral: ['text-neutral'],\n }),\n /**\n * Sets the size of the icon.\n */\n size: makeVariants<'size', ['current', 'sm', 'md', 'lg', 'xl']>({\n current: ['u-current-font-size'],\n sm: ['w-sz-16', 'h-sz-16'],\n md: ['w-sz-24', 'h-sz-24'],\n lg: ['w-sz-32', 'h-sz-32'],\n xl: ['w-sz-40', 'h-sz-40'],\n }),\n },\n})\n\nexport type IconVariantsProps = VariantProps<typeof iconStyles>\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, type DOMAttributes, Ref, useMemo } from 'react'\n\nimport { Slot, wrapPolymorphicSlot } from '../slot'\nimport { Spinner, type SpinnerProps } from '../spinner'\nimport { buttonStyles, type ButtonStylesProps } from './Button.styles'\n\nexport interface ButtonProps\n extends Omit<ComponentPropsWithoutRef<'button'>, 'disabled'>,\n ButtonStylesProps {\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild?: boolean\n /**\n * Display a spinner to indicate to the user that the button is loading something after they interacted with it.\n */\n isLoading?: boolean\n /**\n * If your loading state should only display a spinner, it's better to specify a label for it (a11y).\n */\n loadingLabel?: string\n /**\n * If your loading state should also display a label, you can use this prop instead of `loadingLabel`.\n * **Please note that using this can result in layout shifting when the Button goes from loading state to normal state.**\n */\n loadingText?: string\n ref?: Ref<HTMLButtonElement>\n}\n\ntype DOMAttributesEventHandler = keyof Omit<\n DOMAttributes<HTMLButtonElement>,\n 'children' | 'dangerouslySetInnerHTML'\n>\n\nconst blockedEventHandlers: DOMAttributesEventHandler[] = [\n 'onClick',\n 'onMouseDown',\n 'onMouseUp',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseOver',\n 'onMouseOut',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'onSubmit',\n]\n\nexport const Button = ({\n children,\n design = 'filled',\n disabled = false,\n intent = 'main',\n isLoading = false,\n loadingLabel,\n loadingText,\n shape = 'rounded',\n size = 'md',\n asChild,\n className,\n underline = false,\n ref,\n ...others\n}: ButtonProps) => {\n const Component = asChild ? Slot : 'button'\n\n const shouldNotInteract = !!disabled || isLoading\n\n const disabledEventHandlers = useMemo(() => {\n const result: Partial<Record<DOMAttributesEventHandler, () => void>> = {}\n\n if (shouldNotInteract) {\n blockedEventHandlers.forEach(eventHandler => (result[eventHandler] = undefined))\n }\n\n return result\n }, [shouldNotInteract])\n\n const spinnerProps = {\n size: 'current' as SpinnerProps['size'],\n className: loadingText ? 'inline-block' : 'absolute',\n ...(loadingLabel && { 'aria-label': loadingLabel }),\n }\n\n return (\n <Component\n data-spark-component=\"button\"\n {...(Component === 'button' && { type: 'button' })}\n ref={ref}\n className={buttonStyles({\n className,\n design,\n disabled: shouldNotInteract,\n intent,\n shape,\n size,\n underline,\n })}\n disabled={!!disabled}\n aria-busy={isLoading}\n aria-live={isLoading ? 'assertive' : 'off'}\n {...others}\n {...disabledEventHandlers}\n >\n {wrapPolymorphicSlot(asChild, children, slotted =>\n isLoading ? (\n <>\n <Spinner {...spinnerProps} />\n {loadingText && loadingText}\n\n <div\n aria-hidden\n className={cx('gap-md', loadingText ? 'hidden' : 'inline-flex opacity-0')}\n >\n {slotted}\n </div>\n </>\n ) : (\n slotted\n )\n )}\n </Component>\n )\n}\n\nButton.displayName = 'Button'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nconst defaultVariants = {\n intent: 'current',\n size: 'current',\n isBackgroundVisible: false,\n} as const\n\nexport const spinnerStyles = cva(\n ['inline-block', 'border-solid', 'rounded-full', 'border-md', 'animate-spin'],\n {\n variants: {\n /**\n * Use `size` prop to set the size of the spinner. If you want to set the full size for the spinner, don't forget to add a wrapping container with its own size.\n */\n size: {\n current: ['u-current-font-size'],\n sm: ['w-sz-20', 'h-sz-20'],\n md: ['w-sz-28', 'h-sz-28'],\n full: ['w-full', 'h-full'],\n },\n /**\n * Color scheme of the spinner.\n */\n intent: makeVariants<\n 'intent',\n [\n 'current',\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'error',\n 'info',\n 'neutral',\n ]\n >({\n current: ['border-current'],\n main: ['border-main'],\n support: ['border-support'],\n accent: ['border-accent'],\n basic: ['border-basic'],\n success: ['border-success'],\n alert: ['border-alert'],\n error: ['border-error'],\n info: ['border-info'],\n neutral: ['border-neutral'],\n }),\n /**\n * Size of the button.\n */\n isBackgroundVisible: {\n true: ['border-b-neutral-container', 'border-l-neutral-container'],\n false: ['border-b-transparent', 'border-l-transparent'],\n },\n },\n defaultVariants,\n }\n)\n\nexport type SpinnerStylesProps = VariantProps<typeof spinnerStyles>\n","import { ComponentPropsWithRef, PropsWithChildren } from 'react'\n\nimport { VisuallyHidden } from '../visually-hidden'\nimport { spinnerStyles, SpinnerStylesProps } from './Spinner.styles'\n\nexport interface SpinnerProps extends ComponentPropsWithRef<'div'>, SpinnerStylesProps {\n /**\n * Use `label` prop for accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.\n */\n label?: string\n}\n\nexport const Spinner = ({\n className,\n size = 'current',\n intent = 'current',\n label,\n isBackgroundVisible,\n ref,\n ...others\n}: PropsWithChildren<SpinnerProps>) => {\n return (\n <span\n role=\"status\"\n data-spark-component=\"spinner\"\n ref={ref}\n className={spinnerStyles({ className, size, intent, isBackgroundVisible })}\n {...others}\n >\n {label && <VisuallyHidden>{label}</VisuallyHidden>}\n </span>\n )\n}\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nimport {\n contrastVariants,\n filledVariants,\n ghostVariants,\n outlinedVariants,\n tintedVariants,\n} from './variants'\n\nexport const buttonStyles = cva(\n [\n 'u-shadow-border-transition',\n 'box-border inline-flex items-center justify-center gap-md whitespace-nowrap',\n 'default:px-lg',\n 'text-body-1 font-bold',\n 'focus-visible:u-outline',\n ],\n {\n variants: {\n /**\n * Main style of the button.\n *\n * - `filled`: Button will be plain.\n *\n * - `outlined`: Button will be transparent with an outline.\n *\n * - `tinted`: Button will be filled but using a lighter color scheme.\n *\n * - `ghost`: Button will look like a link. No borders, plain text.\n *\n * - `contrast`: Button will be surface filled. No borders, plain text.\n *\n */\n design: makeVariants<'design', ['filled', 'outlined', 'tinted', 'ghost', 'contrast']>({\n filled: [],\n outlined: ['bg-transparent', 'border-sm', 'border-current'],\n tinted: [],\n ghost: ['default:-mx-md px-md hover:bg-main/dim-5'],\n contrast: [],\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-on-main-container',\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-on-support-container',\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-on-accent-container',\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-on-basic-container',\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-on-success-container',\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-on-alert-container',\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-on-error-container',\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-on-info-container',\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-on-neutral-container',\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-on-main-contaier 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-on-support-container 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-on-accent-container 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-on-basic-container 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-on-success-container 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-on-alert-container 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-on-error-container 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-on-info-container 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-on-neutral-container 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 { 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 { Dialog as RadixDialog } from 'radix-ui'\nimport { type ReactElement, Ref, useEffect } from 'react'\n\nimport { dialogContentStyles, type DialogContentStylesProps } from './DialogContent.styles'\nimport { useDialog } from './DialogContext'\n\nexport interface ContentProps extends RadixDialog.DialogContentProps, DialogContentStylesProps {\n /**\n * When set to true, the content will adjust its width to fit the content rather than taking up the full available width.\n */\n isNarrow?: boolean\n ref?: Ref<HTMLDivElement>\n}\n\nexport const Content = ({\n children,\n className,\n isNarrow = false,\n size = 'md',\n onInteractOutside,\n ref,\n ...rest\n}: ContentProps): ReactElement => {\n const { setIsFullScreen } = useDialog()\n\n useEffect(() => {\n if (size === 'fullscreen') setIsFullScreen(true)\n\n return () => setIsFullScreen(false)\n }, [setIsFullScreen, size])\n\n return (\n <RadixDialog.Content\n data-spark-component=\"dialog-content\"\n ref={ref}\n className={dialogContentStyles({\n className,\n isNarrow,\n size,\n })}\n onInteractOutside={e => {\n const isForegroundElement = (e.target as HTMLElement).closest('.z-toast, .z-popover')\n\n /**\n * The focus trap of the dialog applies `pointer-events-none` on the body of the page in the background, but\n * some components with an higher z-index have `pointer-events-auto` applied on them to remain interactive and ignore the focust trap (ex: a Snackbar with actions).\n *\n * Clicking on the snackbar will be considered as an \"outside click\" and close the dialog. We want to prevent this.\n */\n if (isForegroundElement) {\n e.preventDefault()\n }\n\n onInteractOutside?.(e)\n }}\n {...rest}\n >\n {children}\n </RadixDialog.Content>\n )\n}\n\nContent.displayName = 'Dialog.Content'\n","import { cva, VariantProps } from 'class-variance-authority'\n\nexport const dialogContentStyles = cva(\n [\n 'z-modal flex flex-col bg-surface group',\n 'focus-visible:outline-hidden focus-visible:u-outline',\n '[&:not(:has(footer))]:pb-lg',\n '[&:not(:has(header))]:pt-lg',\n ],\n {\n variants: {\n size: {\n fullscreen: 'fixed size-full top-0 left-0',\n sm: 'max-w-sz-480',\n md: 'max-w-sz-672',\n lg: 'max-w-sz-864',\n },\n isNarrow: {\n true: [],\n false: [],\n },\n },\n compoundVariants: [\n {\n size: ['sm', 'md', 'lg'],\n class: [\n 'fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2',\n 'max-h-[80%]',\n 'shadow-md rounded-lg',\n 'data-[state=open]:animate-fade-in',\n 'data-[state=closed]:animate-fade-out',\n ],\n },\n {\n size: ['sm', 'md', 'lg'],\n isNarrow: false,\n class: ['w-full'],\n },\n ],\n defaultVariants: {\n size: 'md',\n isNarrow: false,\n },\n }\n)\n\nexport type DialogContentStylesProps = VariantProps<typeof dialogContentStyles>\n","import { Dialog as RadixDialog } from 'radix-ui'\nimport { Ref } from 'react'\n\nexport type DescriptionProps = RadixDialog.DialogDescriptionProps & {\n ref?: Ref<HTMLParagraphElement>\n}\n\nexport const Description = (props: DescriptionProps) => (\n <RadixDialog.Description data-spark-component=\"dialog-description\" {...props} />\n)\n\nDescription.displayName = 'Dialog.Description'\n","import { cx } from 'class-variance-authority'\nimport { type ReactElement, type ReactNode, Ref } from 'react'\n\nexport interface FooterProps {\n children: ReactNode\n className?: string\n ref?: Ref<HTMLDivElement>\n}\n\nexport const Footer = ({ children, className, ref, ...rest }: FooterProps): ReactElement => (\n <footer\n data-spark-component=\"dialog-footer\"\n ref={ref}\n className={cx(className, ['px-xl', 'py-lg'])}\n {...rest}\n >\n {children}\n </footer>\n)\n\nFooter.displayName = 'Dialog.Footer'\n","import { cx } from 'class-variance-authority'\nimport { type ReactElement, type ReactNode, Ref } from 'react'\n\nexport interface HeaderProps {\n children: ReactNode\n className?: string\n ref?: Ref<HTMLDivElement>\n}\n\nexport const Header = ({ children, className, ref, ...rest }: HeaderProps): ReactElement => (\n <header\n data-spark-component=\"dialog-header\"\n ref={ref}\n className={cx(className, ['px-xl', 'py-lg'])}\n {...rest}\n >\n {children}\n </header>\n)\n\nHeader.displayName = 'Dialog.Header'\n","import { cx } from 'class-variance-authority'\nimport { Dialog as RadixDialog } from 'radix-ui'\nimport { type ReactElement, Ref } from 'react'\n\nimport { useDialog } from './DialogContext'\n\nexport type OverlayProps = RadixDialog.DialogOverlayProps & {\n ref?: Ref<HTMLDivElement>\n}\n\nexport const Overlay = ({ className, ref, ...rest }: OverlayProps): ReactElement | null => {\n const { isFullScreen } = useDialog()\n\n return (\n <RadixDialog.Overlay\n data-spark-component=\"dialog-overlay\"\n ref={ref}\n className={cx(\n isFullScreen ? 'hidden' : 'fixed',\n ['top-0', 'left-0', 'w-screen', 'h-screen', 'z-overlay'],\n ['bg-overlay/dim-1'],\n ['data-[state=open]:animate-fade-in'],\n ['data-[state=closed]:animate-fade-out'],\n className\n )}\n {...rest}\n />\n )\n}\n\nOverlay.displayName = 'Dialog.Overlay'\n","import { Dialog as RadixDialog } from 'radix-ui'\nimport { type ReactElement } from 'react'\n\nexport type PortalProps = RadixDialog.DialogPortalProps\n\nexport const Portal = ({ children, ...rest }: PortalProps): ReactElement => (\n <RadixDialog.Portal {...rest}>{children}</RadixDialog.Portal>\n)\n\nPortal.displayName = 'Dialog.Portal'\n","import { cx } from 'class-variance-authority'\nimport { Dialog as RadixDialog } from 'radix-ui'\nimport { Ref } from 'react'\n\nexport type TitleProps = RadixDialog.DialogTitleProps & {\n ref?: Ref<HTMLHeadingElement>\n}\n\nexport const Title = ({ className, ref, ...others }: TitleProps) => {\n return (\n <RadixDialog.Title\n data-spark-component=\"dialog-title\"\n ref={ref}\n className={cx(\n 'text-headline-1 text-on-surface',\n 'group-has-data-[part=close]:pr-3xl',\n className\n )}\n {...others}\n />\n )\n}\n\nTitle.displayName = 'Dialog.Title'\n","import { Dialog as RadixDialog } from 'radix-ui'\nimport { type ReactElement, ReactNode, Ref } from 'react'\n\nexport interface TriggerProps {\n /**\n * Children of the component.\n */\n children?: ReactNode\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild?: RadixDialog.DialogTriggerProps['asChild']\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const Trigger = (props: TriggerProps): ReactElement => (\n <RadixDialog.Trigger data-spark-component=\"dialog-trigger\" {...props} />\n)\n\nTrigger.displayName = 'Dialog.Trigger'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gBAAAA;AAAA;AAAA;;;ACAA,sBAAsC;AACtC,IAAAC,gBAAqD;;;ACDrD,mBAAoE;AAoBhE;AAZJ,IAAM,oBAAgB,4BAAyC,IAAI;AAE5D,IAAM,iBAAiB,CAAC;AAAA,EAC7B,UAAU;AAAA,EACV,WAAW;AACb,MAGM;AACJ,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAS,KAAK;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Y;AAAA,IAAZ;AAAA,MACC,wBAAqB;AAAA,MACrB;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,MAAM,cAAc;;;ACvBpB,IAAAC,mBAAsC;AAgBpC,IAAAC,uBAAA;AADK,IAAM,UAAU,CAAC,UACtB,8CAAC,iBAAAC,OAAY,SAAZ,EAAoB,wBAAqB,kBAAkB,GAAG,OAAO;AAGxE,QAAQ,cAAc;;;A7BNf,IAAMC,UAYT,OAAO,OAAO,QAAM;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,QAAO,cAAc;AACrBA,QAAO,QAAQ,cAAc;AAC7B,QAAQ,cAAc;AACtB,OAAO,cAAc;AACrB,QAAQ,cAAc;AACtB,QAAQ,cAAc;AACtB,OAAO,cAAc;AACrB,KAAK,cAAc;AACnB,OAAO,cAAc;AACrB,YAAY,cAAc;AAC1B,MAAM,cAAc;AACpB,YAAY,cAAc;","names":["Dialog","import_react","import_jsx_runtime","RadixDialog","import_react","import_jsx_runtime","import_radix_ui","import_jsx_runtime","RadixDialog","import_class_variance_authority","import_react","import_radix_ui","import_react","import_jsx_runtime","RadixSlot","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_class_variance_authority","import_react","import_internal_utils","import_class_variance_authority","import_jsx_runtime","import_internal_utils","import_class_variance_authority","import_internal_utils","import_internal_utils","import_internal_utils","import_internal_utils","import_internal_utils","import_jsx_runtime","import_internal_utils","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","CloseSVG","import_radix_ui","import_react","import_class_variance_authority","import_jsx_runtime","RadixDialog","import_radix_ui","import_jsx_runtime","RadixDialog","import_class_variance_authority","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_class_variance_authority","import_radix_ui","import_jsx_runtime","RadixDialog","import_radix_ui","import_jsx_runtime","RadixDialog","import_class_variance_authority","import_radix_ui","import_jsx_runtime","RadixDialog","import_radix_ui","import_jsx_runtime","RadixDialog","Dialog"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { HTMLAttributes, ReactElement, Ref, ReactNode } from 'react';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const dividerStyles: (props?: ({
|
|
7
|
+
isEmpty?: boolean | null | undefined;
|
|
8
|
+
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
9
|
+
writingMode?: "horizontal-tb" | "vertical-lr" | null | undefined;
|
|
10
|
+
alignment?: "start" | "end" | "center" | null | undefined;
|
|
11
|
+
intent?: "current" | "outline" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
13
|
+
type DividerStylesProps = VariantProps<typeof dividerStyles>;
|
|
14
|
+
|
|
15
|
+
interface DividerProps extends HTMLAttributes<HTMLDivElement>, Omit<DividerStylesProps, 'isEmpty'> {
|
|
16
|
+
/**
|
|
17
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
18
|
+
*/
|
|
19
|
+
asChild?: boolean;
|
|
20
|
+
children?: ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* The orientation of the inner content.
|
|
23
|
+
*/
|
|
24
|
+
alignment?: 'start' | 'end' | 'center';
|
|
25
|
+
/**
|
|
26
|
+
* The orientation of the separator.
|
|
27
|
+
*/
|
|
28
|
+
orientation?: 'vertical' | 'horizontal';
|
|
29
|
+
/**
|
|
30
|
+
* When true, signifies that it is purely visual, carries no semantic meaning, and ensures it is not present in the accessibility tree.
|
|
31
|
+
*/
|
|
32
|
+
isDecorative?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Color scheme of the divider.
|
|
35
|
+
*/
|
|
36
|
+
intent?: 'outline' | 'current';
|
|
37
|
+
ref?: Ref<HTMLDivElement>;
|
|
38
|
+
}
|
|
39
|
+
declare const Divider$1: {
|
|
40
|
+
({ asChild, className, isDecorative, children, orientation, writingMode, alignment, intent, ref, ...props }: DividerProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
interface DividerContentProps extends HTMLAttributes<HTMLSpanElement> {
|
|
45
|
+
/**
|
|
46
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
47
|
+
*/
|
|
48
|
+
asChild?: boolean;
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
ref?: Ref<HTMLSpanElement>;
|
|
51
|
+
}
|
|
52
|
+
declare const DividerContent: {
|
|
53
|
+
({ children, ref, className, ...props }: DividerContentProps): react_jsx_runtime.JSX.Element | null;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
declare const Divider: typeof Divider$1 & {
|
|
58
|
+
Content: typeof DividerContent;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { Divider, type DividerContentProps };
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/divider/index.ts
|
|
21
|
+
var divider_exports = {};
|
|
22
|
+
__export(divider_exports, {
|
|
23
|
+
Divider: () => Divider2
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(divider_exports);
|
|
26
|
+
|
|
27
|
+
// src/divider/Divider.tsx
|
|
28
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
29
|
+
var import_radix_ui = require("radix-ui");
|
|
30
|
+
|
|
31
|
+
// src/divider/Divider.styles.ts
|
|
32
|
+
var import_internal_utils2 = require("@spark-ui/internal-utils");
|
|
33
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
34
|
+
|
|
35
|
+
// src/divider/variants/intents.tsx
|
|
36
|
+
var import_internal_utils = require("@spark-ui/internal-utils");
|
|
37
|
+
var intentVariants = [
|
|
38
|
+
// current
|
|
39
|
+
{
|
|
40
|
+
intent: "current",
|
|
41
|
+
isEmpty: true,
|
|
42
|
+
class: (0, import_internal_utils.tw)(["border-current"])
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
intent: "current",
|
|
46
|
+
isEmpty: false,
|
|
47
|
+
class: (0, import_internal_utils.tw)(["before:border-current after:border-current"])
|
|
48
|
+
},
|
|
49
|
+
// outline
|
|
50
|
+
{
|
|
51
|
+
intent: "outline",
|
|
52
|
+
isEmpty: true,
|
|
53
|
+
class: (0, import_internal_utils.tw)(["border-outline"])
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
intent: "outline",
|
|
57
|
+
isEmpty: false,
|
|
58
|
+
class: (0, import_internal_utils.tw)(["before:border-outline after:border-outline"])
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
// src/divider/Divider.styles.ts
|
|
63
|
+
var dividerStyles = (0, import_class_variance_authority.cva)(["overflow-hidden group"], {
|
|
64
|
+
variants: {
|
|
65
|
+
isEmpty: {
|
|
66
|
+
true: ["border-solid"],
|
|
67
|
+
false: ["inline-flex items-center", "after:border-solid before:border-solid"]
|
|
68
|
+
},
|
|
69
|
+
orientation: {
|
|
70
|
+
vertical: ["w-fit inline-flex"],
|
|
71
|
+
horizontal: ["w-full"]
|
|
72
|
+
},
|
|
73
|
+
writingMode: {
|
|
74
|
+
"horizontal-tb": [],
|
|
75
|
+
"vertical-lr": []
|
|
76
|
+
},
|
|
77
|
+
alignment: {
|
|
78
|
+
start: [],
|
|
79
|
+
end: [],
|
|
80
|
+
center: []
|
|
81
|
+
},
|
|
82
|
+
intent: {
|
|
83
|
+
current: [],
|
|
84
|
+
outline: []
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
defaultVariants: {
|
|
88
|
+
orientation: "horizontal",
|
|
89
|
+
writingMode: "horizontal-tb",
|
|
90
|
+
alignment: "center",
|
|
91
|
+
intent: "outline"
|
|
92
|
+
},
|
|
93
|
+
compoundVariants: [
|
|
94
|
+
{
|
|
95
|
+
isEmpty: true,
|
|
96
|
+
orientation: "horizontal",
|
|
97
|
+
class: (0, import_internal_utils2.tw)(["my-lg border-t-sm"])
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
isEmpty: true,
|
|
101
|
+
orientation: "vertical",
|
|
102
|
+
class: (0, import_internal_utils2.tw)(["mx-lg min-h-sz-24 border-l-sm"])
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
isEmpty: false,
|
|
106
|
+
orientation: "horizontal",
|
|
107
|
+
writingMode: "horizontal-tb",
|
|
108
|
+
class: (0, import_internal_utils2.tw)(["flex-row my-sm grow-0", "before:border-t-sm", "after:border-t-sm", "*:px-lg"])
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
isEmpty: false,
|
|
112
|
+
orientation: "vertical",
|
|
113
|
+
writingMode: "horizontal-tb",
|
|
114
|
+
class: (0, import_internal_utils2.tw)(["flex-col mx-sm", "before:border-l-sm", "after:border-l-sm", "*:py-lg"])
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
isEmpty: false,
|
|
118
|
+
orientation: "vertical",
|
|
119
|
+
writingMode: "vertical-lr",
|
|
120
|
+
class: (0, import_internal_utils2.tw)(["flex-col mx-sm", "before:border-l-sm", "after:border-l-sm", "*:px-lg"])
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
isEmpty: false,
|
|
124
|
+
orientation: "horizontal",
|
|
125
|
+
alignment: "end",
|
|
126
|
+
class: (0, import_internal_utils2.tw)(["after:w-sz-40 before:grow after:grow-0"])
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
isEmpty: false,
|
|
130
|
+
orientation: "horizontal",
|
|
131
|
+
alignment: "start",
|
|
132
|
+
class: (0, import_internal_utils2.tw)(["before:w-sz-40 before:grow-0 after:grow"])
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
isEmpty: false,
|
|
136
|
+
orientation: "horizontal",
|
|
137
|
+
alignment: "center",
|
|
138
|
+
class: (0, import_internal_utils2.tw)(["justify-center before:grow after:grow"])
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
isEmpty: false,
|
|
142
|
+
orientation: "vertical",
|
|
143
|
+
alignment: "end",
|
|
144
|
+
class: (0, import_internal_utils2.tw)(["after:h-sz-40 before:grow after:grow-0 before:min-h-sz-40"])
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
isEmpty: false,
|
|
148
|
+
orientation: "vertical",
|
|
149
|
+
alignment: "start",
|
|
150
|
+
class: (0, import_internal_utils2.tw)(["before:h-sz-40 before:grow-0 after:grow after:min-h-sz-40"])
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
isEmpty: false,
|
|
154
|
+
orientation: "vertical",
|
|
155
|
+
alignment: "center",
|
|
156
|
+
class: (0, import_internal_utils2.tw)(["justify-center before:grow after:grow before:min-h-sz-40 after:min-h-sz-40"])
|
|
157
|
+
},
|
|
158
|
+
...intentVariants
|
|
159
|
+
]
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
// src/divider/Divider.tsx
|
|
163
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
164
|
+
var Divider = ({
|
|
165
|
+
asChild,
|
|
166
|
+
className,
|
|
167
|
+
isDecorative = false,
|
|
168
|
+
children,
|
|
169
|
+
orientation = "horizontal",
|
|
170
|
+
writingMode = "horizontal-tb",
|
|
171
|
+
alignment = "center",
|
|
172
|
+
intent = "outline",
|
|
173
|
+
ref,
|
|
174
|
+
...props
|
|
175
|
+
}) => {
|
|
176
|
+
const isEmpty = asChild ? !children?.props?.children : !children;
|
|
177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
178
|
+
import_radix_ui.Separator.Root,
|
|
179
|
+
{
|
|
180
|
+
"data-spark-component": "divider",
|
|
181
|
+
asChild,
|
|
182
|
+
className: (0, import_class_variance_authority2.cx)(
|
|
183
|
+
dividerStyles({ isEmpty, orientation, alignment, intent, writingMode }),
|
|
184
|
+
className
|
|
185
|
+
),
|
|
186
|
+
orientation,
|
|
187
|
+
ref,
|
|
188
|
+
decorative: isDecorative,
|
|
189
|
+
...props,
|
|
190
|
+
"data-writing-mode": writingMode,
|
|
191
|
+
children
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
};
|
|
195
|
+
Divider.displayName = "Divider";
|
|
196
|
+
|
|
197
|
+
// src/divider/DividerContent.tsx
|
|
198
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
199
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
200
|
+
var DividerContent = ({ children, ref, className, ...props }) => {
|
|
201
|
+
return children ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
202
|
+
"span",
|
|
203
|
+
{
|
|
204
|
+
"data-spark-component": "divider-content",
|
|
205
|
+
ref,
|
|
206
|
+
...props,
|
|
207
|
+
className: (0, import_class_variance_authority3.cx)("group-data-[writing-mode=vertical-lr]:[writing-mode:vertical-lr]", className),
|
|
208
|
+
children
|
|
209
|
+
}
|
|
210
|
+
) : null;
|
|
211
|
+
};
|
|
212
|
+
DividerContent.displayName = "Divider.Content";
|
|
213
|
+
|
|
214
|
+
// src/divider/index.ts
|
|
215
|
+
var Divider2 = Object.assign(Divider, {
|
|
216
|
+
Content: DividerContent
|
|
217
|
+
});
|
|
218
|
+
Divider2.displayName = "Divider";
|
|
219
|
+
Divider2.Content.displayName = "Divider.Content";
|
|
220
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
221
|
+
0 && (module.exports = {
|
|
222
|
+
Divider
|
|
223
|
+
});
|
|
224
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/divider/index.ts","../../src/divider/Divider.tsx","../../src/divider/Divider.styles.ts","../../src/divider/variants/intents.tsx","../../src/divider/DividerContent.tsx"],"sourcesContent":["import { Divider as Root } from './Divider'\nimport { DividerContent } from './DividerContent'\n\nexport { type DividerContentProps } from './DividerContent'\n\nexport const Divider: typeof Root & {\n Content: typeof DividerContent\n} = Object.assign(Root, {\n Content: DividerContent,\n})\n\nDivider.displayName = 'Divider'\nDivider.Content.displayName = 'Divider.Content'\n","import { cx } from 'class-variance-authority'\nimport { Separator } from 'radix-ui'\nimport { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react'\n\nimport { dividerStyles, type DividerStylesProps } from './Divider.styles'\n\nexport interface DividerProps\n extends HTMLAttributes<HTMLDivElement>,\n Omit<DividerStylesProps, 'isEmpty'> {\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild?: boolean\n children?: ReactElement\n /**\n * The orientation of the inner content.\n */\n alignment?: 'start' | 'end' | 'center'\n /**\n * The orientation of the separator.\n */\n orientation?: 'vertical' | 'horizontal'\n /**\n * When true, signifies that it is purely visual, carries no semantic meaning, and ensures it is not present in the accessibility tree.\n */\n isDecorative?: boolean\n /**\n * Color scheme of the divider.\n */\n intent?: 'outline' | 'current'\n ref?: Ref<HTMLDivElement>\n}\n\nexport const Divider = ({\n asChild,\n className,\n isDecorative = false,\n children,\n orientation = 'horizontal',\n writingMode = 'horizontal-tb',\n alignment = 'center',\n intent = 'outline',\n ref,\n ...props\n}: DividerProps) => {\n const isEmpty = asChild ? !(children?.props as { children: ReactNode })?.children : !children\n\n return (\n <Separator.Root\n data-spark-component=\"divider\"\n asChild={asChild}\n className={cx(\n dividerStyles({ isEmpty, orientation, alignment, intent, writingMode }),\n className\n )}\n orientation={orientation}\n ref={ref}\n decorative={isDecorative}\n {...props}\n data-writing-mode={writingMode}\n >\n {children}\n </Separator.Root>\n )\n}\n\nDivider.displayName = 'Divider'\n","import { tw } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nimport { intentVariants } from './variants/intents'\n\nexport const dividerStyles = cva(['overflow-hidden group'], {\n variants: {\n isEmpty: {\n true: ['border-solid'],\n false: ['inline-flex items-center', 'after:border-solid before:border-solid'],\n },\n orientation: {\n vertical: ['w-fit inline-flex'],\n horizontal: ['w-full'],\n },\n writingMode: {\n 'horizontal-tb': [],\n 'vertical-lr': [],\n },\n alignment: {\n start: [],\n end: [],\n center: [],\n },\n intent: {\n current: [],\n outline: [],\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n writingMode: 'horizontal-tb',\n alignment: 'center',\n intent: 'outline',\n },\n compoundVariants: [\n {\n isEmpty: true,\n orientation: 'horizontal',\n class: tw(['my-lg border-t-sm']),\n },\n {\n isEmpty: true,\n orientation: 'vertical',\n class: tw(['mx-lg min-h-sz-24 border-l-sm']),\n },\n {\n isEmpty: false,\n orientation: 'horizontal',\n writingMode: 'horizontal-tb',\n class: tw(['flex-row my-sm grow-0', 'before:border-t-sm', 'after:border-t-sm', '*:px-lg']),\n },\n {\n isEmpty: false,\n orientation: 'vertical',\n writingMode: 'horizontal-tb',\n class: tw(['flex-col mx-sm', 'before:border-l-sm', 'after:border-l-sm', '*:py-lg']),\n },\n {\n isEmpty: false,\n orientation: 'vertical',\n writingMode: 'vertical-lr',\n class: tw(['flex-col mx-sm', 'before:border-l-sm', 'after:border-l-sm', '*:px-lg']),\n },\n {\n isEmpty: false,\n orientation: 'horizontal',\n alignment: 'end',\n class: tw(['after:w-sz-40 before:grow after:grow-0']),\n },\n {\n isEmpty: false,\n orientation: 'horizontal',\n alignment: 'start',\n class: tw(['before:w-sz-40 before:grow-0 after:grow']),\n },\n {\n isEmpty: false,\n orientation: 'horizontal',\n alignment: 'center',\n class: tw(['justify-center before:grow after:grow']),\n },\n {\n isEmpty: false,\n orientation: 'vertical',\n alignment: 'end',\n class: tw(['after:h-sz-40 before:grow after:grow-0 before:min-h-sz-40']),\n },\n {\n isEmpty: false,\n orientation: 'vertical',\n alignment: 'start',\n class: tw(['before:h-sz-40 before:grow-0 after:grow after:min-h-sz-40']),\n },\n {\n isEmpty: false,\n orientation: 'vertical',\n alignment: 'center',\n class: tw(['justify-center before:grow after:grow before:min-h-sz-40 after:min-h-sz-40']),\n },\n ...intentVariants,\n ],\n})\n\nexport type DividerStylesProps = VariantProps<typeof dividerStyles>\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const intentVariants = [\n // current\n {\n intent: 'current',\n isEmpty: true,\n class: tw(['border-current']),\n },\n {\n intent: 'current',\n isEmpty: false,\n class: tw(['before:border-current after:border-current']),\n },\n // outline\n {\n intent: 'outline',\n isEmpty: true,\n class: tw(['border-outline']),\n },\n {\n intent: 'outline',\n isEmpty: false,\n class: tw(['before:border-outline after:border-outline']),\n },\n] as const\n","import { cx } from 'class-variance-authority'\nimport { HTMLAttributes, ReactNode, Ref } from 'react'\n\nexport interface DividerContentProps extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild?: boolean\n children?: ReactNode\n ref?: Ref<HTMLSpanElement>\n}\n\nexport const DividerContent = ({ children, ref, className, ...props }: DividerContentProps) => {\n return children ? (\n <span\n data-spark-component=\"divider-content\"\n ref={ref}\n {...props}\n className={cx('group-data-[writing-mode=vertical-lr]:[writing-mode:vertical-lr]', className)}\n >\n {children}\n </span>\n ) : null\n}\n\nDividerContent.displayName = 'Divider.Content'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;;;ACAA,IAAAC,mCAAmB;AACnB,sBAA0B;;;ACD1B,IAAAC,yBAAmB;AACnB,sCAAkC;;;ACDlC,4BAAmB;AAEZ,IAAM,iBAAiB;AAAA;AAAA,EAE5B;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,WAAO,0BAAG,CAAC,gBAAgB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,WAAO,0BAAG,CAAC,4CAA4C,CAAC;AAAA,EAC1D;AAAA;AAAA,EAEA;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,WAAO,0BAAG,CAAC,gBAAgB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,WAAO,0BAAG,CAAC,4CAA4C,CAAC;AAAA,EAC1D;AACF;;;ADpBO,IAAM,oBAAgB,qCAAI,CAAC,uBAAuB,GAAG;AAAA,EAC1D,UAAU;AAAA,IACR,SAAS;AAAA,MACP,MAAM,CAAC,cAAc;AAAA,MACrB,OAAO,CAAC,4BAA4B,wCAAwC;AAAA,IAC9E;AAAA,IACA,aAAa;AAAA,MACX,UAAU,CAAC,mBAAmB;AAAA,MAC9B,YAAY,CAAC,QAAQ;AAAA,IACvB;AAAA,IACA,aAAa;AAAA,MACX,iBAAiB,CAAC;AAAA,MAClB,eAAe,CAAC;AAAA,IAClB;AAAA,IACA,WAAW;AAAA,MACT,OAAO,CAAC;AAAA,MACR,KAAK,CAAC;AAAA,MACN,QA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AAMC,WAET,OAAO,OAAO,SAAM;AAAA,EACtB,SAAS;AACX,CAAC;AAEDA,SAAQ,cAAc;AACtBA,SAAQ,QAAQ,cAAc;","names":["Divider","import_class_variance_authority","import_internal_utils","import_class_variance_authority","import_jsx_runtime","Divider"]}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { Dialog } from 'radix-ui';
|
|
2
|
+
import { ReactElement, ReactNode, Ref, ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
import { IconButtonProps } from '../icon-button/index.js';
|
|
7
|
+
import '../button/index.js';
|
|
8
|
+
|
|
9
|
+
interface DrawerProps {
|
|
10
|
+
/**
|
|
11
|
+
* Children of the component.
|
|
12
|
+
*/
|
|
13
|
+
children?: Dialog.DialogProps['children'];
|
|
14
|
+
/**
|
|
15
|
+
* Specifies if the dialog is open or not.
|
|
16
|
+
*/
|
|
17
|
+
open?: Dialog.DialogProps['open'];
|
|
18
|
+
/**
|
|
19
|
+
* Default open state.
|
|
20
|
+
*/
|
|
21
|
+
defaultOpen?: Dialog.DialogProps['defaultOpen'];
|
|
22
|
+
/**
|
|
23
|
+
* Handler executed on every dialog open state change.
|
|
24
|
+
*/
|
|
25
|
+
onOpenChange?: Dialog.DialogProps['onOpenChange'];
|
|
26
|
+
/**
|
|
27
|
+
* Specifies if the dialog is a modal.
|
|
28
|
+
*/
|
|
29
|
+
modal?: Dialog.DialogProps['modal'];
|
|
30
|
+
/**
|
|
31
|
+
* Specifies if the drawer should have a fade animation on its body (in case it is scrollable).
|
|
32
|
+
*/
|
|
33
|
+
withFade?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const Drawer$1: {
|
|
36
|
+
({ children, withFade, ...rest }: DrawerProps): ReactElement;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
declare const drawerBodyStyles: (props?: ({
|
|
41
|
+
inset?: boolean | null | undefined;
|
|
42
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
43
|
+
type DrawerBodyStylesProps = VariantProps<typeof drawerBodyStyles>;
|
|
44
|
+
|
|
45
|
+
interface DrawerBodyProps extends DrawerBodyStylesProps {
|
|
46
|
+
children: ReactNode;
|
|
47
|
+
className?: string;
|
|
48
|
+
ref?: Ref<HTMLDivElement>;
|
|
49
|
+
}
|
|
50
|
+
declare const DrawerBody: {
|
|
51
|
+
({ children, inset, className, ref: forwardedRef, ...rest }: DrawerBodyProps): react_jsx_runtime.JSX.Element;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
type DrawerCloseProps = Dialog.DialogCloseProps & {
|
|
56
|
+
ref?: Ref<HTMLButtonElement>;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
type DrawerCloseButtonProps = DrawerCloseProps & Pick<IconButtonProps, 'size' | 'intent' | 'design' | 'aria-label'>;
|
|
60
|
+
declare const DrawerCloseButton: {
|
|
61
|
+
({ "aria-label": ariaLabel, className, size, intent, design, children, ref, ...rest }: DrawerCloseButtonProps): react_jsx_runtime.JSX.Element;
|
|
62
|
+
displayName: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
declare const drawerContentStyles: (props?: ({
|
|
66
|
+
size?: "sm" | "md" | "lg" | "fluid" | "fullscreen" | null | undefined;
|
|
67
|
+
side?: "right" | "left" | "top" | "bottom" | null | undefined;
|
|
68
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
69
|
+
type DrawerContentStylesProps = VariantProps<typeof drawerContentStyles>;
|
|
70
|
+
|
|
71
|
+
type DrawerContentProps = Dialog.DialogContentProps & DrawerContentStylesProps & {
|
|
72
|
+
ref?: Ref<HTMLDivElement>;
|
|
73
|
+
};
|
|
74
|
+
declare const DrawerContent: {
|
|
75
|
+
({ className, size, side, onInteractOutside, ref, ...rest }: DrawerContentProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
displayName: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
type DrawerDescriptionProps = Dialog.DialogDescriptionProps & {
|
|
80
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
81
|
+
};
|
|
82
|
+
declare const DrawerDescription: {
|
|
83
|
+
(props: DrawerDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
84
|
+
displayName: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
type DrawerFooterProps = ComponentPropsWithoutRef<'footer'> & {
|
|
88
|
+
ref?: Ref<HTMLDivElement>;
|
|
89
|
+
};
|
|
90
|
+
declare const DrawerFooter: {
|
|
91
|
+
({ className, ref, ...rest }: DrawerFooterProps): ReactElement;
|
|
92
|
+
displayName: string;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
interface DrawerHeaderProps {
|
|
96
|
+
children: ReactNode;
|
|
97
|
+
className?: string;
|
|
98
|
+
ref?: Ref<HTMLDivElement>;
|
|
99
|
+
}
|
|
100
|
+
declare const DrawerHeader: {
|
|
101
|
+
({ children, className, ref, ...rest }: DrawerHeaderProps): ReactElement;
|
|
102
|
+
displayName: string;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
type DrawerOverlayProps = Dialog.DialogOverlayProps & {
|
|
106
|
+
ref?: Ref<HTMLDivElement>;
|
|
107
|
+
};
|
|
108
|
+
declare const DrawerOverlay: {
|
|
109
|
+
({ className, ref, ...rest }: DrawerOverlayProps): ReactElement;
|
|
110
|
+
displayName: string;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
type DrawerPortalProps = Dialog.DialogPortalProps;
|
|
114
|
+
declare const DrawerPortal: {
|
|
115
|
+
({ children, ...rest }: DrawerPortalProps): ReactElement;
|
|
116
|
+
displayName: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
type DrawerTitleProps = Dialog.DialogTitleProps & {
|
|
120
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
121
|
+
};
|
|
122
|
+
declare const DrawerTitle: {
|
|
123
|
+
({ className, ref, ...others }: DrawerTitleProps): react_jsx_runtime.JSX.Element;
|
|
124
|
+
displayName: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
interface DrawerTriggerProps extends Dialog.DialogTriggerProps {
|
|
128
|
+
/**
|
|
129
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.
|
|
130
|
+
*/
|
|
131
|
+
asChild?: boolean;
|
|
132
|
+
ref?: Ref<HTMLButtonElement>;
|
|
133
|
+
}
|
|
134
|
+
declare const DrawerTrigger: {
|
|
135
|
+
(props: DrawerTriggerProps): ReactElement;
|
|
136
|
+
displayName: string;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
declare const Drawer: typeof Drawer$1 & {
|
|
140
|
+
Trigger: typeof DrawerTrigger;
|
|
141
|
+
Portal: typeof DrawerPortal;
|
|
142
|
+
Overlay: typeof DrawerOverlay;
|
|
143
|
+
Content: typeof DrawerContent;
|
|
144
|
+
Header: typeof DrawerHeader;
|
|
145
|
+
Body: typeof DrawerBody;
|
|
146
|
+
Footer: typeof DrawerFooter;
|
|
147
|
+
CloseButton: typeof DrawerCloseButton;
|
|
148
|
+
Title: typeof DrawerTitle;
|
|
149
|
+
Description: typeof DrawerDescription;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export { Drawer, type DrawerBodyProps, type DrawerCloseButtonProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerHeaderProps, type DrawerOverlayProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps };
|