@spark-ui/components 10.14.4 → 10.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/progress-tracker/index.ts","../../src/progress-tracker/ProgressTracker.tsx","../../src/progress-tracker/ProgressTracker.styles.ts","../../src/progress-tracker/ProgressTrackerContext.ts","../../src/progress-tracker/ProgressTrackerStep.tsx","../../src/progress-tracker/ProgressTrackerStep.styles.ts","../../src/progress-tracker/ProgressTrackerStepIndicator.tsx","../../src/icon/Icon.tsx","../../src/slot/Slot.tsx","../../src/visually-hidden/VisuallyHidden.tsx","../../src/icon/Icon.styles.tsx","../../src/progress-tracker/ProgressTrackerStepIndicator.styles.ts","../../src/progress-tracker/stepIndicatorVariants/outline.ts","../../src/progress-tracker/stepIndicatorVariants/tinted.ts","../../src/progress-tracker/ProgressTrackerStepLabel.tsx"],"sourcesContent":["import { ProgressTracker as Root, type ProgressTrackerProps } from './ProgressTracker'\nimport { ProgressTrackerStep as Step, type ProgressTrackerStepProps } from './ProgressTrackerStep'\nimport {\n ProgressTrackerStepIndicator as StepIndicator,\n type ProgressTrackerStepIndicatorProps,\n} from './ProgressTrackerStepIndicator'\nimport { ProgressTrackerStepLabel as StepLabel } from './ProgressTrackerStepLabel'\n\nexport const ProgressTracker: typeof Root & {\n Step: typeof Step\n StepLabel: typeof StepLabel\n StepIndicator: typeof StepIndicator\n} = Object.assign(Root, {\n Step,\n StepLabel,\n StepIndicator,\n})\n\nProgressTracker.displayName = 'ProgressTracker'\nStep.displayName = 'ProgressTracker.Step'\nStepLabel.displayName = 'ProgressTracker.StepLabel'\nStepIndicator.displayName = 'ProgressTracker.StepIndicator'\n\nexport type { ProgressTrackerProps, ProgressTrackerStepProps, ProgressTrackerStepIndicatorProps }\n","import { cx } from 'class-variance-authority'\nimport { type ComponentPropsWithRef, type PropsWithChildren, useState } from 'react'\n\nimport { progressList } from './ProgressTracker.styles'\nimport {\n ProgressTrackerContext,\n type ProgressTrackerContextInterface,\n} from './ProgressTrackerContext'\nimport type { StepIndicatorVariantProps } from './ProgressTrackerStepIndicator.styles'\n\nexport interface ProgressTrackerProps\n extends ComponentPropsWithRef<'div'>,\n Pick<StepIndicatorVariantProps, 'size' | 'intent' | 'design'> {\n /**\n * The orientation of the progress tracker\n * @default 'horizontal\"\n */\n orientation?: 'horizontal' | 'vertical'\n /**\n * The index of the current step.\n * @default 0\n */\n stepIndex?: number\n /**\n * Event handler called when clicking on a step.\n */\n onStepClick?: (stepIndex: number) => void\n /**\n * Sets the component as interactive or not.\n * @default false\n */\n readOnly?: boolean\n}\n\nexport const ProgressTracker = ({\n stepIndex = 0,\n onStepClick,\n readOnly = false,\n intent = 'basic',\n size = 'lg',\n design = 'outline',\n orientation = 'horizontal',\n children,\n className,\n ref,\n ...rest\n}: PropsWithChildren<ProgressTrackerProps>) => {\n const [steps, setSteps] = useState<ProgressTrackerContextInterface['steps']>(new Map())\n\n const Component = readOnly ? 'div' : 'nav'\n\n return (\n <ProgressTrackerContext.Provider\n value={{ stepIndex, onStepClick, steps, setSteps, size, intent, design, readOnly }}\n >\n <Component\n ref={ref}\n data-spark-component=\"progress-tracker\"\n className={cx('inline-flex', className)}\n {...rest}\n >\n <ol\n data-orientation={orientation}\n className={progressList}\n style={{ counterReset: 'step' }}\n >\n {children}\n </ol>\n </Component>\n </ProgressTrackerContext.Provider>\n )\n}\n\nProgressTracker.displayName = 'ProgressTracker'\n","import { cx } from 'class-variance-authority'\n\nexport const progressList = cx([\n 'flex flex-nowrap items-start group/list',\n 'data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:w-full',\n 'data-[orientation=vertical]:flex-col',\n])\n","import { createContext, type Dispatch, type SetStateAction, useContext } from 'react'\n\nimport type { ProgressTrackerProps } from './ProgressTracker'\n\n// Interfaces\nexport type ProgressTrackerContextInterface = Required<\n Pick<ProgressTrackerProps, 'stepIndex' | 'size' | 'intent' | 'design' | 'readOnly'>\n> &\n Pick<ProgressTrackerProps, 'onStepClick'> & {\n steps: Map<string, string[]>\n setSteps: Dispatch<SetStateAction<Map<string, string[]>>>\n }\n\nexport interface ProgressTrackerStepContextInterface {\n index: number\n state: 'active' | 'complete' | 'incomplete'\n}\n\n// Contexts\nexport const ProgressTrackerContext = createContext<ProgressTrackerContextInterface>(\n {} as ProgressTrackerContextInterface\n)\n\nexport const ProgressTrackerStepContext = createContext<ProgressTrackerStepContextInterface>(\n {} as ProgressTrackerStepContextInterface\n)\n\n// Hooks\nexport const useProgressTrackerContext = () => useContext(ProgressTrackerContext)\n\nexport const useProgressTrackerStepContext = () => useContext(ProgressTrackerStepContext)\n\nexport const ID_PREFIX = ':progress-tracker'\n","import { type ComponentPropsWithRef, type ReactNode, useEffect, useId } from 'react'\n\nimport {\n ID_PREFIX,\n ProgressTrackerStepContext,\n useProgressTrackerContext,\n} from './ProgressTrackerContext'\nimport { stepButtonVariant, stepItemVariant } from './ProgressTrackerStep.styles'\nimport { ProgressTrackerStepIndicator } from './ProgressTrackerStepIndicator'\n\nexport type ProgressTrackerStepProps = ComponentPropsWithRef<'li'> &\n (\n | {\n disabled?: boolean\n children: ReactNode\n }\n | {\n disabled?: boolean\n 'aria-label': string\n }\n )\n\nexport const ProgressTrackerStep = ({\n disabled = false,\n children,\n 'aria-label': ariaLabel,\n className,\n ref,\n ...rest\n}: ProgressTrackerStepProps) => {\n const {\n stepIndex: currentStepIndex,\n steps,\n onStepClick,\n setSteps,\n size,\n intent,\n readOnly,\n } = useProgressTrackerContext()\n\n const stepId = `${ID_PREFIX}-step-${useId()}`\n const stepIndex = [...steps.keys()].indexOf(stepId)\n\n const disabledAfter = (() => {\n const nextStepId = [...steps.keys()][stepIndex + 1]\n\n return !!(nextStepId && steps.get(nextStepId)?.includes('disabled'))\n })()\n\n const progressState = (() => {\n if (stepIndex === currentStepIndex) return 'active'\n else if (stepIndex < currentStepIndex) return 'complete'\n else return 'incomplete'\n })()\n\n useEffect(() => {\n setSteps(steps => {\n const newSteps = new Map(steps)\n\n return newSteps.set(\n stepId,\n [progressState, disabled ? 'disabled' : ''].filter(v => !!v)\n )\n })\n\n return () => {\n setSteps(steps => {\n steps.delete(stepId)\n\n return steps\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return (\n <li\n data-spark-component=\"progress-tracker-step\"\n id={stepId}\n ref={ref}\n data-state={progressState}\n {...(progressState === 'active' && {\n 'aria-current': 'step',\n })}\n className={stepItemVariant({\n size,\n intent,\n disabled,\n disabledAfter,\n })}\n {...rest}\n >\n <button\n type=\"button\"\n aria-label={ariaLabel}\n data-interactive={!disabled && !readOnly}\n {...(!disabled &&\n !readOnly && {\n onClick: () => onStepClick?.(stepIndex),\n })}\n disabled={disabled}\n className={stepButtonVariant({\n size,\n readOnly,\n className,\n })}\n >\n <ProgressTrackerStepContext.Provider\n value={{\n index: stepIndex,\n state: progressState,\n }}\n >\n {children || <ProgressTrackerStepIndicator />}\n </ProgressTrackerStepContext.Provider>\n </button>\n </li>\n )\n}\n\nProgressTrackerStep.displayName = 'ProgressTracker.Step'\n","import { cva } from 'class-variance-authority'\n\nexport const stepItemVariant = cva(\n [\n 'relative inline-flex items-start flex-auto first:grow-0 justify-center group/item',\n // Progress Track\n 'after:absolute after:z-base',\n 'last:after:content-none',\n 'after:bg-outline',\n 'group-data-[orientation=horizontal]/list:before:bg-outline',\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:px-[1px]',\n 'group-data-[orientation=horizontal]/list:before:absolute group-data-[orientation=horizontal]/list:before:z-base',\n 'group-data-[orientation=horizontal]/list:before:left-0 group-data-[orientation=horizontal]/list:after:right-0',\n 'group-data-[orientation=horizontal]/list:before:h-[1px] group-data-[orientation=horizontal]/list:after:h-[1px]',\n 'first:group-data-[orientation=horizontal]/list:before:content-none',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:py-[1px]',\n 'group-data-[orientation=vertical]/list:items-start',\n 'group-data-[orientation=vertical]/list:after:w-[1px] group-data-[orientation=vertical]/list:after:bottom-[-1px]',\n ],\n {\n variants: {\n size: {\n sm: [\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:before:top-[8px] group-data-[orientation=horizontal]/list:after:top-[8px]',\n 'group-data-[orientation=horizontal]/list:before:right-[calc(50%+12px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+12px)]',\n 'first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+10px)]',\n 'last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+10px)]',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:after:left-[8px]',\n 'group-data-[orientation=vertical]/list:after:top-[25px]',\n 'first:group-data-[orientation=vertical]/list:after:top-[21px]',\n ],\n md: [\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:before:top-[12px] group-data-[orientation=horizontal]/list:after:top-[12px]',\n 'group-data-[orientation=horizontal]/list:before:right-[calc(50%+16px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+16px)]',\n 'first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+14px)]',\n 'last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+14px)]',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:after:left-[12px]',\n 'group-data-[orientation=vertical]/list:after:top-[33px]',\n 'first:group-data-[orientation=vertical]/list:after:top-[29px]',\n ],\n lg: [\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:before:top-[16px] group-data-[orientation=horizontal]/list:after:top-[16px]',\n 'group-data-[orientation=horizontal]/list:before:right-[calc(50%+20px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+20px)]',\n 'first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+18px)]',\n 'last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+18px)]',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:after:left-[16px]',\n 'group-data-[orientation=vertical]/list:after:top-[41px]',\n 'first:group-data-[orientation=vertical]/list:after:top-[37px]',\n ],\n },\n intent: {\n basic: '',\n support: '',\n main: '',\n neutral: '',\n info: '',\n accent: '',\n danger: '',\n alert: '',\n success: '',\n },\n disabled: {\n true: 'before:opacity-dim-3',\n false: '',\n },\n disabledAfter: {\n true: 'after:opacity-dim-3',\n false: '',\n },\n },\n defaultVariants: {\n disabled: false,\n disabledAfter: false,\n size: 'lg',\n intent: 'basic',\n },\n }\n)\n\nexport const stepButtonVariant = cva(\n [\n 'relative flex group/btn disabled:cursor-default',\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:flex-col group-data-[orientation=horizontal]/list:items-center',\n 'group-data-[orientation=horizontal]/list:text-center group-data-[orientation=horizontal]/list:mx-sm',\n 'group-first/item:group-data-[orientation=horizontal]/list:ml-0 group-last/item:group-data-[orientation=horizontal]/list:mr-0',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:flex-row group-data-[orientation=vertical]/list:items-start',\n 'group-data-[orientation=vertical]/list:text-left group-data-[orientation=vertical]/list:my-sm',\n 'group-first/item:group-data-[orientation=vertical]/list:mt-0 group-last/item:group-data-[orientation=vertical]/list:mb-0',\n ],\n {\n variants: {\n size: {\n sm: [\n 'group-data-[orientation=horizontal]/list:min-w-sz-16 group-data-[orientation=horizontal]/list:mt-[16px]',\n 'group-data-[orientation=vertical]/list:min-h-sz-16 group-data-[orientation=vertical]/list:ml-[16px]',\n ],\n md: [\n 'group-data-[orientation=horizontal]/list:min-w-sz-24 group-data-[orientation=horizontal]/list:mt-[24px]',\n 'group-data-[orientation=vertical]/list:min-h-sz-24 group-data-[orientation=vertical]/list:ml-[24px]',\n ],\n lg: [\n 'group-data-[orientation=horizontal]/list:min-w-sz-32 group-data-[orientation=horizontal]/list:mt-[32px]',\n 'group-data-[orientation=vertical]/list:min-h-sz-32 group-data-[orientation=vertical]/list:ml-[32px]',\n ],\n },\n readOnly: {\n true: 'cursor-default',\n false: 'cursor-pointer',\n },\n },\n defaultVariants: {\n size: 'lg',\n readOnly: false,\n },\n }\n)\n","import { Check } from '@spark-ui/icons/Check'\nimport type { ComponentPropsWithoutRef, ReactNode } from 'react'\n\nimport { Icon } from '../icon'\nimport { useProgressTrackerContext, useProgressTrackerStepContext } from './ProgressTrackerContext'\nimport { stepIndicatorVariant } from './ProgressTrackerStepIndicator.styles'\n\nexport type ProgressTrackerStepIndicatorProps = ComponentPropsWithoutRef<'span'> & {\n /**\n * The content to be rendered when step status is complete (checkmark icon by default)\n */\n complete?: ReactNode\n /**\n * The content to be rendered when step status is incomplete (step index by default)\n */\n incomplete?: ReactNode\n}\n\nconst CompleteIndicator = () => (\n <Icon size=\"sm\">\n <Check />\n </Icon>\n)\n\nexport const ProgressTrackerStepIndicator = ({\n complete,\n incomplete,\n className,\n}: ProgressTrackerStepIndicatorProps) => {\n const { size, intent, design } = useProgressTrackerContext()\n const { index, state } = useProgressTrackerStepContext()\n\n return (\n <span\n className={stepIndicatorVariant({ size, intent, design, state, className })}\n aria-hidden=\"true\"\n >\n {size !== 'sm' && (\n <>\n {state === 'complete' && (complete === undefined ? <CompleteIndicator /> : complete)}\n {state !== 'complete' && (incomplete === undefined ? `${index + 1}` : incomplete)}\n </>\n )}\n </span>\n )\n}\n\nProgressTrackerStepIndicator.displayName = 'ProgressTracker.StepIndicator'\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 { cva, VariantProps } from 'class-variance-authority'\n\nimport { outlineVariants, tintedVariants } from './stepIndicatorVariants'\n\nexport const stepIndicatorVariant = cva(\n [\n 'relative flex shrink-0 justify-center items-center',\n 'rounded-full',\n 'text-body-2 font-bold',\n 'group-disabled/btn:opacity-dim-3',\n ],\n {\n variants: {\n size: {\n sm: [\n 'w-sz-16 h-sz-16',\n 'group-data-[orientation=horizontal]/list:mt-[-16px]',\n 'group-data-[orientation=vertical]/list:ml-[-16px]',\n ],\n md: [\n 'w-sz-24 h-sz-24',\n 'group-data-[orientation=horizontal]/list:mt-[-24px]',\n 'group-data-[orientation=vertical]/list:ml-[-24px]',\n ],\n lg: [\n 'w-sz-32 h-sz-32',\n 'group-data-[orientation=horizontal]/list:mt-[-32px]',\n 'group-data-[orientation=vertical]/list:ml-[-32px]',\n ],\n },\n intent: {\n basic: '',\n support: '',\n main: '',\n neutral: '',\n info: '',\n accent: '',\n danger: '',\n alert: '',\n success: '',\n },\n design: {\n outline: 'border-sm',\n tinted: '',\n },\n state: {\n complete: '',\n incomplete: '',\n active: '',\n },\n },\n /**\n * Known type issue with CVA compoundVariants and VS Code/Intellisense:\n * https://github.com/joe-bell/cva/discussions/195#discussioncomment-6750163\n * */\n /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */\n /* @ts-ignore */\n compoundVariants: [...outlineVariants, ...tintedVariants],\n defaultVariants: {\n size: 'lg',\n state: 'incomplete',\n intent: 'basic',\n design: 'outline',\n },\n }\n)\n\nexport type StepIndicatorVariantProps = VariantProps<typeof stepIndicatorVariant>\n","export const outlineVariants = [\n {\n design: 'outline',\n intent: 'basic',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-basic-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-basic-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'basic',\n state: 'active',\n class: 'text-on-basic bg-basic',\n },\n {\n design: 'outline',\n intent: 'support',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-support-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-support-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'support',\n state: 'active',\n class: 'text-on-support bg-support',\n },\n {\n design: 'outline',\n intent: 'main',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-main-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-main-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'main',\n state: 'active',\n class: 'text-on-main bg-main',\n },\n {\n design: 'outline',\n intent: 'neutral',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-neutral-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'neutral',\n state: 'active',\n class: 'text-on-neutral bg-neutral',\n },\n {\n design: 'outline',\n intent: 'info',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-info-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-info-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'info',\n state: 'active',\n class: 'text-on-info bg-info',\n },\n {\n design: 'outline',\n intent: 'accent',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-accent-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-accent-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'accent',\n state: 'active',\n class: 'text-on-accent bg-accent',\n },\n {\n design: 'outline',\n intent: 'danger',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-error-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-error-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'danger',\n state: 'active',\n class: 'text-on-error bg-error',\n },\n {\n design: 'outline',\n intent: 'alert',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-alert-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-alert-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'alert',\n state: 'active',\n class: 'text-on-alert bg-alert',\n },\n {\n design: 'outline',\n intent: 'success',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-success-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'success',\n state: 'active',\n class: 'text-on-success bg-success',\n },\n] as const\n","export const tintedVariants = [\n {\n design: 'tinted',\n intent: 'basic',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-basic-container bg-basic-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-basic-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-basic-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'basic',\n state: 'active',\n class: 'text-on-basic bg-basic',\n },\n {\n design: 'tinted',\n intent: 'support',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-support-container bg-support-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-support-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-support-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'support',\n state: 'active',\n class: 'text-on-support bg-support',\n },\n {\n design: 'tinted',\n intent: 'main',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-main-container bg-main-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-main-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-main-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'main',\n state: 'active',\n class: 'text-on-main bg-main',\n },\n {\n design: 'tinted',\n intent: 'neutral',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-neutral-container bg-neutral-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-neutral-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'neutral',\n state: 'active',\n class: 'text-on-neutral bg-neutral',\n },\n {\n design: 'tinted',\n intent: 'info',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-info-container bg-info-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-info-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-info-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'info',\n state: 'active',\n class: 'text-on-info bg-info',\n },\n {\n design: 'tinted',\n intent: 'accent',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-accent-container bg-accent-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-accent-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-accent-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'accent',\n state: 'active',\n class: 'text-on-accent bg-accent',\n },\n {\n design: 'tinted',\n intent: 'danger',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-error-container bg-error-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-error-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-error-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'danger',\n state: 'active',\n class: 'text-on-error bg-error',\n },\n {\n design: 'tinted',\n intent: 'alert',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-alert-container bg-alert-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-alert-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-alert-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'alert',\n state: 'active',\n class: 'text-on-alert bg-alert',\n },\n {\n design: 'tinted',\n intent: 'success',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-success-container bg-success-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-success-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'success',\n state: 'active',\n class: 'text-on-success bg-success',\n },\n] as const\n","import { cva } from 'class-variance-authority'\nimport type { ComponentPropsWithoutRef, ReactNode } from 'react'\n\nimport { useProgressTrackerStepContext } from './ProgressTrackerContext'\n\ntype ProgressTrackerStepLabelProps = ComponentPropsWithoutRef<'span'> & {\n children: ReactNode\n}\n\nconst stepLabel = cva(\n [\n 'flex text-body-2 ',\n 'text-on-surface group-disabled/btn:text-on-surface/dim-1',\n 'group-data-[orientation=horizontal]/list:mt-md',\n 'group-data-[orientation=vertical]/list:ml-md',\n 'group-data-[orientation=vertical]/list:my-auto',\n ],\n {\n variants: {\n state: {\n complete: '',\n incomplete: '',\n active: 'font-bold',\n },\n },\n }\n)\n\nexport const ProgressTrackerStepLabel = ({\n className,\n children,\n}: ProgressTrackerStepLabelProps) => {\n const { state } = useProgressTrackerStepContext()\n\n return <span className={stepLabel({ state, className })}>{children}</span>\n}\n\nProgressTrackerStepLabel.displayName = 'ProgressTracker.StepLabel'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,yBAAAA;AAAA;AAAA;;;ACAA,IAAAC,mCAAmB;AACnB,IAAAC,gBAA6E;;;ACD7E,sCAAmB;AAEZ,IAAM,mBAAe,oCAAG;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AACF,CAAC;;;ACND,mBAA8E;AAmBvE,IAAM,6BAAyB;AAAA,EACpC,CAAC;AACH;AAEO,IAAM,iCAA6B;AAAA,EACxC,CAAC;AACH;AAGO,IAAM,4BAA4B,UAAM,yBAAW,sBAAsB;AAEzE,IAAM,gCAAgC,UAAM,yBAAW,0BAA0B;AAEjF,IAAM,YAAY;;;AF6BjB;AA3BD,IAAM,kBAAkB,CAAC;AAAA,EAC9B,YAAY;AAAA,EACZ;AAAA,EACA,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA+C;AAC7C,QAAM,CAAC,OAAO,QAAQ,QAAI,wBAAmD,oBAAI,IAAI,CAAC;AAEtF,QAAM,YAAY,WAAW,QAAQ;AAErC,SACE;AAAA,IAAC,uBAAuB;AAAA,IAAvB;AAAA,MACC,OAAO,EAAE,WAAW,aAAa,OAAO,UAAU,MAAM,QAAQ,QAAQ,SAAS;AAAA,MAEjF;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,wBAAqB;AAAA,UACrB,eAAW,qCAAG,eAAe,SAAS;AAAA,UACrC,GAAG;AAAA,UAEJ;AA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,CAAC,YAAY;AAAA,YACX,SAAS,MAAM,cAAc,SAAS;AAAA,UACxC;AAAA,UACF;AAAA,UACA,WAAW,kBAAkB;AAAA,YAC3B;AAAA,YACA;AAAA,YACA;AAAA,UACF,CAAC;AAAA,UAED;AAAA,YAAC,2BAA2B;AAAA,YAA3B;AAAA,cACC,OAAO;AAAA,gBACL,OAAO;AAAA,gBACP,OAAO;AAAA,cACT;AAAA,cAEC,sBAAY,6CAAC,gCAA6B;AAAA;AAAA,UAC7C;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,oBAAoB,cAAc;;;AUxHlC,IAAAC,mCAAoB;AAkCX,IAAAC,sBAAA;AAzBT,IAAM,gBAAY;AAAA,EAChB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,UAAU;AAAA,QACV,YAAY;AAAA,QACZ,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,2BAA2B,CAAC;AAAA,EACvC;AAAA,EACA;AACF,MAAqC;AACnC,QAAM,EAAE,MAAM,IAAI,8BAA8B;AAEhD,SAAO,6CAAC,UAAK,WAAW,UAAU,EAAE,OAAO,UAAU,CAAC,GAAI,UAAS;AACrE;AAEA,yBAAyB,cAAc;;;Ad7BhC,IAAMC,mBAIT,OAAO,OAAO,iBAAM;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,iBAAgB,cAAc;AAC9B,oBAAK,cAAc;AACnB,yBAAU,cAAc;AACxB,6BAAc,cAAc;","names":["ProgressTracker","import_class_variance_authority","import_react","import_react","import_class_variance_authority","import_react","import_react","import_jsx_runtime","RadixSlot","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","steps","import_class_variance_authority","import_jsx_runtime","ProgressTracker"]}
1
+ {"version":3,"sources":["../../src/progress-tracker/index.ts","../../src/progress-tracker/ProgressTracker.tsx","../../src/progress-tracker/ProgressTracker.styles.ts","../../src/progress-tracker/ProgressTrackerContext.ts","../../src/progress-tracker/ProgressTrackerStep.tsx","../../src/progress-tracker/ProgressTrackerStep.styles.ts","../../src/progress-tracker/ProgressTrackerStepIndicator.tsx","../../src/icon/Icon.tsx","../../src/slot/Slot.tsx","../../src/visually-hidden/VisuallyHidden.tsx","../../src/icon/Icon.styles.tsx","../../src/progress-tracker/ProgressTrackerStepIndicator.styles.ts","../../src/progress-tracker/ProgressTrackerStepLabel.tsx"],"sourcesContent":["import { ProgressTracker as Root, type ProgressTrackerProps } from './ProgressTracker'\nimport { ProgressTrackerStep as Step, type ProgressTrackerStepProps } from './ProgressTrackerStep'\nimport {\n ProgressTrackerStepIndicator as StepIndicator,\n type ProgressTrackerStepIndicatorProps,\n} from './ProgressTrackerStepIndicator'\nimport { ProgressTrackerStepLabel as StepLabel } from './ProgressTrackerStepLabel'\n\nexport const ProgressTracker: typeof Root & {\n Step: typeof Step\n StepLabel: typeof StepLabel\n StepIndicator: typeof StepIndicator\n} = Object.assign(Root, {\n Step,\n StepLabel,\n StepIndicator,\n})\n\nProgressTracker.displayName = 'ProgressTracker'\nStep.displayName = 'ProgressTracker.Step'\nStepLabel.displayName = 'ProgressTracker.StepLabel'\nStepIndicator.displayName = 'ProgressTracker.StepIndicator'\n\nexport type { ProgressTrackerProps, ProgressTrackerStepProps, ProgressTrackerStepIndicatorProps }\n","import { cx } from 'class-variance-authority'\nimport { type ComponentPropsWithRef, type PropsWithChildren, useState } from 'react'\n\nimport { progressList } from './ProgressTracker.styles'\nimport {\n ProgressTrackerContext,\n type ProgressTrackerContextInterface,\n} from './ProgressTrackerContext'\nimport type { StepIndicatorVariantProps } from './ProgressTrackerStepIndicator.styles'\n\nexport interface ProgressTrackerProps\n extends ComponentPropsWithRef<'div'>,\n Pick<StepIndicatorVariantProps, 'size' | 'intent'> {\n /**\n * The orientation of the progress tracker\n * @default 'horizontal\"\n */\n orientation?: 'horizontal' | 'vertical'\n /**\n * The index of the current step.\n * @default 0\n */\n stepIndex?: number\n /**\n * Event handler called when clicking on a step.\n */\n onStepClick?: (stepIndex: number) => void\n /**\n * Sets the component as interactive or not.\n * @default false\n */\n readOnly?: boolean\n}\n\nexport const ProgressTracker = ({\n stepIndex = 0,\n onStepClick,\n readOnly = false,\n intent = 'basic',\n size = 'lg',\n orientation = 'horizontal',\n children,\n className,\n ref,\n ...rest\n}: PropsWithChildren<ProgressTrackerProps>) => {\n const [steps, setSteps] = useState<ProgressTrackerContextInterface['steps']>(new Map())\n\n const Component = readOnly ? 'div' : 'nav'\n\n return (\n <ProgressTrackerContext.Provider\n value={{ stepIndex, onStepClick, steps, setSteps, size, intent, readOnly }}\n >\n <Component\n ref={ref}\n data-spark-component=\"progress-tracker\"\n className={cx('inline-flex', className)}\n {...rest}\n >\n <ol\n data-orientation={orientation}\n className={progressList}\n style={{ counterReset: 'step' }}\n >\n {children}\n </ol>\n </Component>\n </ProgressTrackerContext.Provider>\n )\n}\n\nProgressTracker.displayName = 'ProgressTracker'\n","import { cx } from 'class-variance-authority'\n\nexport const progressList = cx([\n 'flex flex-nowrap items-start group/list',\n 'data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:w-full',\n 'data-[orientation=vertical]:flex-col',\n])\n","import { createContext, type Dispatch, type SetStateAction, useContext } from 'react'\n\nimport type { ProgressTrackerProps } from './ProgressTracker'\n\n// Interfaces\nexport type ProgressTrackerContextInterface = Required<\n Pick<ProgressTrackerProps, 'stepIndex' | 'size' | 'intent' | 'readOnly'>\n> &\n Pick<ProgressTrackerProps, 'onStepClick'> & {\n steps: Map<string, string[]>\n setSteps: Dispatch<SetStateAction<Map<string, string[]>>>\n }\n\nexport interface ProgressTrackerStepContextInterface {\n index: number\n state: 'active' | 'complete' | 'incomplete'\n}\n\n// Contexts\nexport const ProgressTrackerContext = createContext<ProgressTrackerContextInterface>(\n {} as ProgressTrackerContextInterface\n)\n\nexport const ProgressTrackerStepContext = createContext<ProgressTrackerStepContextInterface>(\n {} as ProgressTrackerStepContextInterface\n)\n\n// Hooks\nexport const useProgressTrackerContext = () => useContext(ProgressTrackerContext)\n\nexport const useProgressTrackerStepContext = () => useContext(ProgressTrackerStepContext)\n\nexport const ID_PREFIX = ':progress-tracker'\n","import { type ComponentPropsWithRef, type ReactNode, useEffect, useId } from 'react'\n\nimport {\n ID_PREFIX,\n ProgressTrackerStepContext,\n useProgressTrackerContext,\n} from './ProgressTrackerContext'\nimport { stepButtonVariant, stepItemVariant } from './ProgressTrackerStep.styles'\nimport { ProgressTrackerStepIndicator } from './ProgressTrackerStepIndicator'\n\nexport type ProgressTrackerStepProps = ComponentPropsWithRef<'li'> &\n (\n | {\n disabled?: boolean\n children: ReactNode\n }\n | {\n disabled?: boolean\n 'aria-label': string\n }\n )\n\nexport const ProgressTrackerStep = ({\n disabled = false,\n children,\n 'aria-label': ariaLabel,\n className,\n ref,\n ...rest\n}: ProgressTrackerStepProps) => {\n const {\n stepIndex: currentStepIndex,\n steps,\n onStepClick,\n setSteps,\n size,\n intent,\n readOnly,\n } = useProgressTrackerContext()\n\n const stepId = `${ID_PREFIX}-step-${useId()}`\n const stepIndex = [...steps.keys()].indexOf(stepId)\n\n const disabledAfter = (() => {\n const nextStepId = [...steps.keys()][stepIndex + 1]\n\n return !!(nextStepId && steps.get(nextStepId)?.includes('disabled'))\n })()\n\n const progressState = (() => {\n if (stepIndex === currentStepIndex) return 'active'\n else if (stepIndex < currentStepIndex) return 'complete'\n else return 'incomplete'\n })()\n\n useEffect(() => {\n setSteps(steps => {\n const newSteps = new Map(steps)\n\n return newSteps.set(\n stepId,\n [progressState, disabled ? 'disabled' : ''].filter(v => !!v)\n )\n })\n\n return () => {\n setSteps(steps => {\n steps.delete(stepId)\n\n return steps\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return (\n <li\n data-spark-component=\"progress-tracker-step\"\n id={stepId}\n ref={ref}\n data-state={progressState}\n {...(progressState === 'active' && {\n 'aria-current': 'step',\n })}\n className={stepItemVariant({\n size,\n intent,\n disabled,\n disabledAfter,\n })}\n {...rest}\n >\n <button\n type=\"button\"\n aria-label={ariaLabel}\n data-interactive={!disabled && !readOnly}\n {...(!disabled &&\n !readOnly && {\n onClick: () => onStepClick?.(stepIndex),\n })}\n disabled={disabled}\n className={stepButtonVariant({\n size,\n readOnly,\n className,\n })}\n >\n <ProgressTrackerStepContext.Provider\n value={{\n index: stepIndex,\n state: progressState,\n }}\n >\n {children || <ProgressTrackerStepIndicator />}\n </ProgressTrackerStepContext.Provider>\n </button>\n </li>\n )\n}\n\nProgressTrackerStep.displayName = 'ProgressTracker.Step'\n","import { cva } from 'class-variance-authority'\n\nexport const stepItemVariant = cva(\n [\n 'relative inline-flex items-start flex-auto first:grow-0 justify-center group/item',\n // Progress Track\n 'after:absolute after:z-base',\n 'last:after:content-none',\n 'after:bg-outline',\n 'group-data-[orientation=horizontal]/list:before:bg-outline',\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:px-[1px]',\n 'group-data-[orientation=horizontal]/list:before:absolute group-data-[orientation=horizontal]/list:before:z-base',\n 'group-data-[orientation=horizontal]/list:before:left-0 group-data-[orientation=horizontal]/list:after:right-0',\n 'group-data-[orientation=horizontal]/list:before:h-[1px] group-data-[orientation=horizontal]/list:after:h-[1px]',\n 'first:group-data-[orientation=horizontal]/list:before:content-none',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:py-[1px]',\n 'group-data-[orientation=vertical]/list:items-start',\n 'group-data-[orientation=vertical]/list:after:w-[1px] group-data-[orientation=vertical]/list:after:bottom-[-1px]',\n ],\n {\n variants: {\n size: {\n sm: [\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:before:top-[8px] group-data-[orientation=horizontal]/list:after:top-[8px]',\n 'group-data-[orientation=horizontal]/list:before:right-[calc(50%+12px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+12px)]',\n 'first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+10px)]',\n 'last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+10px)]',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:after:left-[8px]',\n 'group-data-[orientation=vertical]/list:after:top-[25px]',\n 'first:group-data-[orientation=vertical]/list:after:top-[21px]',\n ],\n md: [\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:before:top-[12px] group-data-[orientation=horizontal]/list:after:top-[12px]',\n 'group-data-[orientation=horizontal]/list:before:right-[calc(50%+16px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+16px)]',\n 'first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+14px)]',\n 'last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+14px)]',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:after:left-[12px]',\n 'group-data-[orientation=vertical]/list:after:top-[33px]',\n 'first:group-data-[orientation=vertical]/list:after:top-[29px]',\n ],\n lg: [\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:before:top-[16px] group-data-[orientation=horizontal]/list:after:top-[16px]',\n 'group-data-[orientation=horizontal]/list:before:right-[calc(50%+20px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+20px)]',\n 'first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+18px)]',\n 'last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+18px)]',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:after:left-[16px]',\n 'group-data-[orientation=vertical]/list:after:top-[41px]',\n 'first:group-data-[orientation=vertical]/list:after:top-[37px]',\n ],\n },\n intent: {\n basic: '',\n neutral: '',\n success: '',\n },\n disabled: {\n true: 'before:opacity-dim-3',\n false: '',\n },\n disabledAfter: {\n true: 'after:opacity-dim-3',\n false: '',\n },\n },\n defaultVariants: {\n disabled: false,\n disabledAfter: false,\n size: 'lg',\n intent: 'basic',\n },\n }\n)\n\nexport const stepButtonVariant = cva(\n [\n 'relative flex group/btn disabled:cursor-default',\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:flex-col group-data-[orientation=horizontal]/list:items-center',\n 'group-data-[orientation=horizontal]/list:text-center group-data-[orientation=horizontal]/list:mx-sm',\n 'group-first/item:group-data-[orientation=horizontal]/list:ml-0 group-last/item:group-data-[orientation=horizontal]/list:mr-0',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:flex-row group-data-[orientation=vertical]/list:items-start',\n 'group-data-[orientation=vertical]/list:text-left group-data-[orientation=vertical]/list:my-sm',\n 'group-first/item:group-data-[orientation=vertical]/list:mt-0 group-last/item:group-data-[orientation=vertical]/list:mb-0',\n ],\n {\n variants: {\n size: {\n sm: [\n 'group-data-[orientation=horizontal]/list:min-w-sz-16 group-data-[orientation=horizontal]/list:mt-[16px]',\n 'group-data-[orientation=vertical]/list:min-h-sz-16 group-data-[orientation=vertical]/list:ml-[16px]',\n ],\n md: [\n 'group-data-[orientation=horizontal]/list:min-w-sz-24 group-data-[orientation=horizontal]/list:mt-[24px]',\n 'group-data-[orientation=vertical]/list:min-h-sz-24 group-data-[orientation=vertical]/list:ml-[24px]',\n ],\n lg: [\n 'group-data-[orientation=horizontal]/list:min-w-sz-32 group-data-[orientation=horizontal]/list:mt-[32px]',\n 'group-data-[orientation=vertical]/list:min-h-sz-32 group-data-[orientation=vertical]/list:ml-[32px]',\n ],\n },\n readOnly: {\n true: 'cursor-default',\n false: 'cursor-pointer',\n },\n },\n defaultVariants: {\n size: 'lg',\n readOnly: false,\n },\n }\n)\n","import { Check } from '@spark-ui/icons/Check'\nimport type { ComponentPropsWithoutRef, ReactNode } from 'react'\n\nimport { Icon } from '../icon'\nimport { useProgressTrackerContext, useProgressTrackerStepContext } from './ProgressTrackerContext'\nimport { stepIndicatorVariant } from './ProgressTrackerStepIndicator.styles'\n\nexport type ProgressTrackerStepIndicatorProps = ComponentPropsWithoutRef<'span'> & {\n /**\n * The content to be rendered when step status is complete (checkmark icon by default)\n */\n complete?: ReactNode\n /**\n * The content to be rendered when step status is incomplete (step index by default)\n */\n incomplete?: ReactNode\n}\n\nconst CompleteIndicator = () => (\n <Icon size=\"sm\">\n <Check />\n </Icon>\n)\n\nexport const ProgressTrackerStepIndicator = ({\n complete,\n incomplete,\n className,\n}: ProgressTrackerStepIndicatorProps) => {\n const { size, intent } = useProgressTrackerContext()\n const { index, state } = useProgressTrackerStepContext()\n\n return (\n <span className={stepIndicatorVariant({ size, intent, state, className })} aria-hidden=\"true\">\n {size !== 'sm' && (\n <>\n {state === 'complete' && (complete === undefined ? <CompleteIndicator /> : complete)}\n {state !== 'complete' && (incomplete === undefined ? `${index + 1}` : incomplete)}\n </>\n )}\n </span>\n )\n}\n\nProgressTrackerStepIndicator.displayName = 'ProgressTracker.StepIndicator'\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 { cva, VariantProps } from 'class-variance-authority'\n\nexport const stepIndicatorVariant = cva(\n [\n 'relative flex shrink-0 justify-center items-center',\n 'rounded-full',\n 'text-body-2 font-bold',\n 'group-disabled/btn:opacity-dim-3',\n ],\n {\n variants: {\n size: {\n sm: [\n 'w-sz-16 h-sz-16',\n 'group-data-[orientation=horizontal]/list:mt-[-16px]',\n 'group-data-[orientation=vertical]/list:ml-[-16px]',\n ],\n md: [\n 'w-sz-24 h-sz-24',\n 'group-data-[orientation=horizontal]/list:mt-[-24px]',\n 'group-data-[orientation=vertical]/list:ml-[-24px]',\n ],\n lg: [\n 'w-sz-32 h-sz-32',\n 'group-data-[orientation=horizontal]/list:mt-[-32px]',\n 'group-data-[orientation=vertical]/list:ml-[-32px]',\n ],\n },\n intent: {\n basic: '',\n neutral: '',\n success: '',\n },\n state: {\n complete: '',\n incomplete: '',\n active: '',\n },\n },\n /**\n * Known type issue with CVA compoundVariants and VS Code/Intellisense:\n * https://github.com/joe-bell/cva/discussions/195#discussioncomment-6750163\n * */\n /* @ts-ignore */\n compoundVariants: [\n // Basic\n {\n intent: 'basic',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-basic-container bg-basic-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-basic-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-basic-container',\n ],\n },\n {\n intent: 'basic',\n state: 'active',\n class: 'text-on-basic bg-basic',\n },\n // Neutral\n {\n intent: 'neutral',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-neutral-container bg-neutral-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-neutral-container',\n ],\n },\n {\n intent: 'neutral',\n state: 'active',\n class: 'text-on-neutral bg-neutral',\n },\n // Success\n {\n intent: 'success',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-success-container bg-success-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-success-container',\n ],\n },\n {\n intent: 'success',\n state: 'active',\n class: 'text-on-success bg-success',\n },\n ],\n defaultVariants: {\n size: 'lg',\n state: 'incomplete',\n intent: 'basic',\n },\n }\n)\n\nexport type StepIndicatorVariantProps = VariantProps<typeof stepIndicatorVariant>\n","import { cva } from 'class-variance-authority'\nimport type { ComponentPropsWithoutRef, ReactNode } from 'react'\n\nimport { useProgressTrackerStepContext } from './ProgressTrackerContext'\n\ntype ProgressTrackerStepLabelProps = ComponentPropsWithoutRef<'span'> & {\n children: ReactNode\n}\n\nconst stepLabel = cva(\n [\n 'flex text-body-2 ',\n 'text-on-surface group-disabled/btn:text-on-surface/dim-1',\n 'group-data-[orientation=horizontal]/list:mt-md',\n 'group-data-[orientation=vertical]/list:ml-md',\n 'group-data-[orientation=vertical]/list:my-auto',\n ],\n {\n variants: {\n state: {\n complete: '',\n incomplete: '',\n active: 'font-bold',\n },\n },\n }\n)\n\nexport const ProgressTrackerStepLabel = ({\n className,\n children,\n}: ProgressTrackerStepLabelProps) => {\n const { state } = useProgressTrackerStepContext()\n\n return <span className={stepLabel({ state, className })}>{children}</span>\n}\n\nProgressTrackerStepLabel.displayName = 'ProgressTracker.StepLabel'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,yBAAAA;AAAA;AAAA;;;ACAA,IAAAC,mCAAmB;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OAAO,OAAO,iBAAM;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEDA,iBAAgB,cAAc;AAC9B,oBAAK,cAAc;AACnB,yBAAU,cAAc;AACxB,6BAAc,cAAc;","names":["ProgressTracker","import_class_variance_authority","import_react","import_react","import_class_variance_authority","import_react","import_react","import_jsx_runtime","RadixSlot","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_class_variance_authority","import_jsx_runtime","import_jsx_runtime","steps","import_class_variance_authority","import_jsx_runtime","ProgressTracker"]}
@@ -36,7 +36,6 @@ var ProgressTracker = ({
36
36
  readOnly = false,
37
37
  intent = "basic",
38
38
  size = "lg",
39
- design = "outline",
40
39
  orientation = "horizontal",
41
40
  children,
42
41
  className,
@@ -48,7 +47,7 @@ var ProgressTracker = ({
48
47
  return /* @__PURE__ */ jsx(
49
48
  ProgressTrackerContext.Provider,
50
49
  {
51
- value: { stepIndex, onStepClick, steps, setSteps, size, intent, design, readOnly },
50
+ value: { stepIndex, onStepClick, steps, setSteps, size, intent, readOnly },
52
51
  children: /* @__PURE__ */ jsx(
53
52
  Component,
54
53
  {
@@ -135,13 +134,7 @@ var stepItemVariant = cva(
135
134
  },
136
135
  intent: {
137
136
  basic: "",
138
- support: "",
139
- main: "",
140
137
  neutral: "",
141
- info: "",
142
- accent: "",
143
- danger: "",
144
- alert: "",
145
138
  success: ""
146
139
  },
147
140
  disabled: {
@@ -206,304 +199,6 @@ import { Check } from "@spark-ui/icons/Check";
206
199
 
207
200
  // src/progress-tracker/ProgressTrackerStepIndicator.styles.ts
208
201
  import { cva as cva2 } from "class-variance-authority";
209
-
210
- // src/progress-tracker/stepIndicatorVariants/outline.ts
211
- var outlineVariants = [
212
- {
213
- design: "outline",
214
- intent: "basic",
215
- state: ["complete", "incomplete"],
216
- class: [
217
- "text-on-basic-container bg-transparent",
218
- "group-hover/btn:group-data-[interactive=true]/btn:bg-basic-container-hovered",
219
- "group-hover/btn:group-data-[interactive=false]/btn:bg-transparent"
220
- ]
221
- },
222
- {
223
- design: "outline",
224
- intent: "basic",
225
- state: "active",
226
- class: "text-on-basic bg-basic"
227
- },
228
- {
229
- design: "outline",
230
- intent: "support",
231
- state: ["complete", "incomplete"],
232
- class: [
233
- "text-on-support-container bg-transparent",
234
- "group-hover/btn:group-data-[interactive=true]/btn:bg-support-container-hovered",
235
- "group-hover/btn:group-data-[interactive=false]/btn:bg-transparent"
236
- ]
237
- },
238
- {
239
- design: "outline",
240
- intent: "support",
241
- state: "active",
242
- class: "text-on-support bg-support"
243
- },
244
- {
245
- design: "outline",
246
- intent: "main",
247
- state: ["complete", "incomplete"],
248
- class: [
249
- "text-on-main-container bg-transparent",
250
- "group-hover/btn:group-data-[interactive=true]/btn:bg-main-container-hovered",
251
- "group-hover/btn:group-data-[interactive=false]/btn:bg-transparent"
252
- ]
253
- },
254
- {
255
- design: "outline",
256
- intent: "main",
257
- state: "active",
258
- class: "text-on-main bg-main"
259
- },
260
- {
261
- design: "outline",
262
- intent: "neutral",
263
- state: ["complete", "incomplete"],
264
- class: [
265
- "text-on-neutral-container bg-transparent",
266
- "group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered",
267
- "group-hover/btn:group-data-[interactive=false]/btn:bg-transparent"
268
- ]
269
- },
270
- {
271
- design: "outline",
272
- intent: "neutral",
273
- state: "active",
274
- class: "text-on-neutral bg-neutral"
275
- },
276
- {
277
- design: "outline",
278
- intent: "info",
279
- state: ["complete", "incomplete"],
280
- class: [
281
- "text-on-info-container bg-transparent",
282
- "group-hover/btn:group-data-[interactive=true]/btn:bg-info-container-hovered",
283
- "group-hover/btn:group-data-[interactive=false]/btn:bg-transparent"
284
- ]
285
- },
286
- {
287
- design: "outline",
288
- intent: "info",
289
- state: "active",
290
- class: "text-on-info bg-info"
291
- },
292
- {
293
- design: "outline",
294
- intent: "accent",
295
- state: ["complete", "incomplete"],
296
- class: [
297
- "text-on-accent-container bg-transparent",
298
- "group-hover/btn:group-data-[interactive=true]/btn:bg-accent-container-hovered",
299
- "group-hover/btn:group-data-[interactive=false]/btn:bg-transparent"
300
- ]
301
- },
302
- {
303
- design: "outline",
304
- intent: "accent",
305
- state: "active",
306
- class: "text-on-accent bg-accent"
307
- },
308
- {
309
- design: "outline",
310
- intent: "danger",
311
- state: ["complete", "incomplete"],
312
- class: [
313
- "text-on-error-container bg-transparent",
314
- "group-hover/btn:group-data-[interactive=true]/btn:bg-error-container-hovered",
315
- "group-hover/btn:group-data-[interactive=false]/btn:bg-transparent"
316
- ]
317
- },
318
- {
319
- design: "outline",
320
- intent: "danger",
321
- state: "active",
322
- class: "text-on-error bg-error"
323
- },
324
- {
325
- design: "outline",
326
- intent: "alert",
327
- state: ["complete", "incomplete"],
328
- class: [
329
- "text-on-alert-container bg-transparent",
330
- "group-hover/btn:group-data-[interactive=true]/btn:bg-alert-container-hovered",
331
- "group-hover/btn:group-data-[interactive=false]/btn:bg-transparent"
332
- ]
333
- },
334
- {
335
- design: "outline",
336
- intent: "alert",
337
- state: "active",
338
- class: "text-on-alert bg-alert"
339
- },
340
- {
341
- design: "outline",
342
- intent: "success",
343
- state: ["complete", "incomplete"],
344
- class: [
345
- "text-on-success-container bg-transparent",
346
- "group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered",
347
- "group-hover/btn:group-data-[interactive=false]/btn:bg-transparent"
348
- ]
349
- },
350
- {
351
- design: "outline",
352
- intent: "success",
353
- state: "active",
354
- class: "text-on-success bg-success"
355
- }
356
- ];
357
-
358
- // src/progress-tracker/stepIndicatorVariants/tinted.ts
359
- var tintedVariants = [
360
- {
361
- design: "tinted",
362
- intent: "basic",
363
- state: ["complete", "incomplete"],
364
- class: [
365
- "text-on-basic-container bg-basic-container",
366
- "group-hover/btn:group-data-[interactive=true]/btn:bg-basic-container-hovered",
367
- "group-hover/btn:group-data-[interactive=false]/btn:bg-basic-container"
368
- ]
369
- },
370
- {
371
- design: "tinted",
372
- intent: "basic",
373
- state: "active",
374
- class: "text-on-basic bg-basic"
375
- },
376
- {
377
- design: "tinted",
378
- intent: "support",
379
- state: ["complete", "incomplete"],
380
- class: [
381
- "text-on-support-container bg-support-container",
382
- "group-hover/btn:group-data-[interactive=true]/btn:bg-support-container-hovered",
383
- "group-hover/btn:group-data-[interactive=false]/btn:bg-support-container"
384
- ]
385
- },
386
- {
387
- design: "tinted",
388
- intent: "support",
389
- state: "active",
390
- class: "text-on-support bg-support"
391
- },
392
- {
393
- design: "tinted",
394
- intent: "main",
395
- state: ["complete", "incomplete"],
396
- class: [
397
- "text-on-main-container bg-main-container",
398
- "group-hover/btn:group-data-[interactive=true]/btn:bg-main-container-hovered",
399
- "group-hover/btn:group-data-[interactive=false]/btn:bg-main-container"
400
- ]
401
- },
402
- {
403
- design: "tinted",
404
- intent: "main",
405
- state: "active",
406
- class: "text-on-main bg-main"
407
- },
408
- {
409
- design: "tinted",
410
- intent: "neutral",
411
- state: ["complete", "incomplete"],
412
- class: [
413
- "text-on-neutral-container bg-neutral-container",
414
- "group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered",
415
- "group-hover/btn:group-data-[interactive=false]/btn:bg-neutral-container"
416
- ]
417
- },
418
- {
419
- design: "tinted",
420
- intent: "neutral",
421
- state: "active",
422
- class: "text-on-neutral bg-neutral"
423
- },
424
- {
425
- design: "tinted",
426
- intent: "info",
427
- state: ["complete", "incomplete"],
428
- class: [
429
- "text-on-info-container bg-info-container",
430
- "group-hover/btn:group-data-[interactive=true]/btn:bg-info-container-hovered",
431
- "group-hover/btn:group-data-[interactive=false]/btn:bg-info-container"
432
- ]
433
- },
434
- {
435
- design: "tinted",
436
- intent: "info",
437
- state: "active",
438
- class: "text-on-info bg-info"
439
- },
440
- {
441
- design: "tinted",
442
- intent: "accent",
443
- state: ["complete", "incomplete"],
444
- class: [
445
- "text-on-accent-container bg-accent-container",
446
- "group-hover/btn:group-data-[interactive=true]/btn:bg-accent-container-hovered",
447
- "group-hover/btn:group-data-[interactive=false]/btn:bg-accent-container"
448
- ]
449
- },
450
- {
451
- design: "tinted",
452
- intent: "accent",
453
- state: "active",
454
- class: "text-on-accent bg-accent"
455
- },
456
- {
457
- design: "tinted",
458
- intent: "danger",
459
- state: ["complete", "incomplete"],
460
- class: [
461
- "text-on-error-container bg-error-container",
462
- "group-hover/btn:group-data-[interactive=true]/btn:bg-error-container-hovered",
463
- "group-hover/btn:group-data-[interactive=false]/btn:bg-error-container"
464
- ]
465
- },
466
- {
467
- design: "tinted",
468
- intent: "danger",
469
- state: "active",
470
- class: "text-on-error bg-error"
471
- },
472
- {
473
- design: "tinted",
474
- intent: "alert",
475
- state: ["complete", "incomplete"],
476
- class: [
477
- "text-on-alert-container bg-alert-container",
478
- "group-hover/btn:group-data-[interactive=true]/btn:bg-alert-container-hovered",
479
- "group-hover/btn:group-data-[interactive=false]/btn:bg-alert-container"
480
- ]
481
- },
482
- {
483
- design: "tinted",
484
- intent: "alert",
485
- state: "active",
486
- class: "text-on-alert bg-alert"
487
- },
488
- {
489
- design: "tinted",
490
- intent: "success",
491
- state: ["complete", "incomplete"],
492
- class: [
493
- "text-on-success-container bg-success-container",
494
- "group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered",
495
- "group-hover/btn:group-data-[interactive=false]/btn:bg-success-container"
496
- ]
497
- },
498
- {
499
- design: "tinted",
500
- intent: "success",
501
- state: "active",
502
- class: "text-on-success bg-success"
503
- }
504
- ];
505
-
506
- // src/progress-tracker/ProgressTrackerStepIndicator.styles.ts
507
202
  var stepIndicatorVariant = cva2(
508
203
  [
509
204
  "relative flex shrink-0 justify-center items-center",
@@ -532,19 +227,9 @@ var stepIndicatorVariant = cva2(
532
227
  },
533
228
  intent: {
534
229
  basic: "",
535
- support: "",
536
- main: "",
537
230
  neutral: "",
538
- info: "",
539
- accent: "",
540
- danger: "",
541
- alert: "",
542
231
  success: ""
543
232
  },
544
- design: {
545
- outline: "border-sm",
546
- tinted: ""
547
- },
548
233
  state: {
549
234
  complete: "",
550
235
  incomplete: "",
@@ -555,14 +240,58 @@ var stepIndicatorVariant = cva2(
555
240
  * Known type issue with CVA compoundVariants and VS Code/Intellisense:
556
241
  * https://github.com/joe-bell/cva/discussions/195#discussioncomment-6750163
557
242
  * */
558
- /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
559
243
  /* @ts-ignore */
560
- compoundVariants: [...outlineVariants, ...tintedVariants],
244
+ compoundVariants: [
245
+ // Basic
246
+ {
247
+ intent: "basic",
248
+ state: ["complete", "incomplete"],
249
+ class: [
250
+ "text-on-basic-container bg-basic-container",
251
+ "group-hover/btn:group-data-[interactive=true]/btn:bg-basic-container-hovered",
252
+ "group-hover/btn:group-data-[interactive=false]/btn:bg-basic-container"
253
+ ]
254
+ },
255
+ {
256
+ intent: "basic",
257
+ state: "active",
258
+ class: "text-on-basic bg-basic"
259
+ },
260
+ // Neutral
261
+ {
262
+ intent: "neutral",
263
+ state: ["complete", "incomplete"],
264
+ class: [
265
+ "text-on-neutral-container bg-neutral-container",
266
+ "group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered",
267
+ "group-hover/btn:group-data-[interactive=false]/btn:bg-neutral-container"
268
+ ]
269
+ },
270
+ {
271
+ intent: "neutral",
272
+ state: "active",
273
+ class: "text-on-neutral bg-neutral"
274
+ },
275
+ // Success
276
+ {
277
+ intent: "success",
278
+ state: ["complete", "incomplete"],
279
+ class: [
280
+ "text-on-success-container bg-success-container",
281
+ "group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered",
282
+ "group-hover/btn:group-data-[interactive=false]/btn:bg-success-container"
283
+ ]
284
+ },
285
+ {
286
+ intent: "success",
287
+ state: "active",
288
+ class: "text-on-success bg-success"
289
+ }
290
+ ],
561
291
  defaultVariants: {
562
292
  size: "lg",
563
293
  state: "incomplete",
564
- intent: "basic",
565
- design: "outline"
294
+ intent: "basic"
566
295
  }
567
296
  }
568
297
  );
@@ -575,19 +304,12 @@ var ProgressTrackerStepIndicator = ({
575
304
  incomplete,
576
305
  className
577
306
  }) => {
578
- const { size, intent, design } = useProgressTrackerContext();
307
+ const { size, intent } = useProgressTrackerContext();
579
308
  const { index, state } = useProgressTrackerStepContext();
580
- return /* @__PURE__ */ jsx2(
581
- "span",
582
- {
583
- className: stepIndicatorVariant({ size, intent, design, state, className }),
584
- "aria-hidden": "true",
585
- children: size !== "sm" && /* @__PURE__ */ jsxs(Fragment, { children: [
586
- state === "complete" && (complete === void 0 ? /* @__PURE__ */ jsx2(CompleteIndicator, {}) : complete),
587
- state !== "complete" && (incomplete === void 0 ? `${index + 1}` : incomplete)
588
- ] })
589
- }
590
- );
309
+ return /* @__PURE__ */ jsx2("span", { className: stepIndicatorVariant({ size, intent, state, className }), "aria-hidden": "true", children: size !== "sm" && /* @__PURE__ */ jsxs(Fragment, { children: [
310
+ state === "complete" && (complete === void 0 ? /* @__PURE__ */ jsx2(CompleteIndicator, {}) : complete),
311
+ state !== "complete" && (incomplete === void 0 ? `${index + 1}` : incomplete)
312
+ ] }) });
591
313
  };
592
314
  ProgressTrackerStepIndicator.displayName = "ProgressTracker.StepIndicator";
593
315