@servicetitan/anvil2 3.11.1 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stepper-CCKHWlUr.js","sources":["../src/components/Stepper/base/internal/StepperBaseContext.ts","../src/components/Stepper/base/internal/StepperStepIndexScope.tsx","../src/components/Stepper/base/StepperBaseList.tsx","../src/components/Stepper/base/StepperBaseStep.tsx","../src/components/Stepper/base/StepperBasePanel.tsx","../src/components/Stepper/base/StepperBase.tsx","../src/components/Stepper/StepperList.tsx","../src/components/Stepper/internal/StepperContext.ts","../src/components/Stepper/StepperStep.tsx","../src/components/Stepper/StepperPanel.tsx","../src/components/Stepper/StepperFinalPanel.tsx","../src/components/Stepper/internal/countRegisteredSteps.ts","../src/components/Stepper/StepperNextButton.tsx","../src/components/Stepper/StepperPrevButton.tsx","../src/components/Stepper/internal/StepperWizardBootstrap.tsx","../src/components/Stepper/Stepper.tsx"],"sourcesContent":["import { createContext, useContext, useRef, type RefObject } from \"react\";\n\n/** Per-step outcome. Independent of whether the step is current. */\nexport type StepperBaseStepState = \"not started\" | \"started\" | \"complete\";\n\nexport type StepperBaseStepInfo = {\n index: number;\n id?: string;\n label: string;\n disabled: boolean;\n node: RefObject<HTMLButtonElement | null>;\n};\n\nexport type StepperBaseContextValue = {\n currentIndex: number;\n interactive: boolean;\n focusIndex: number;\n setFocusIndex: (index: number) => void;\n requestIndexChange: (index: number) => void;\n registerStep: (info: StepperBaseStepInfo) => () => void;\n getStep: (index: number) => StepperBaseStepInfo | undefined;\n getCurrentStep: () => StepperBaseStepInfo | undefined;\n getPanelId: (stepId: string) => string | undefined;\n registerPanel: (stepId: string, panelId: string) => () => void;\n};\n\nexport const StepperBaseContext = createContext<StepperBaseContextValue>({\n currentIndex: 0,\n interactive: false,\n focusIndex: 0,\n setFocusIndex: () => undefined,\n requestIndexChange: () => undefined,\n registerStep: () => () => undefined,\n getStep: () => undefined,\n getCurrentStep: () => undefined,\n getPanelId: () => undefined,\n registerPanel: () => () => undefined,\n});\n\n/**\n * Hands out 0-based indices in render order, so steps work inside fragments and\n * wrapper components rather than only as direct List children. Each render of\n * StepperStepIndexScope starts a new pass.\n */\nexport type StepperBaseStepIndexPass = {\n allocate: () => number;\n};\n\nexport const StepperBaseStepIndexPassContext =\n createContext<StepperBaseStepIndexPass | null>(null);\n\ntype AllocatedIndex = {\n pass: StepperBaseStepIndexPass;\n index: number;\n};\n\n/**\n * Index of the calling step, or undefined when it renders outside a List.\n *\n * A step allocates at most once per pass, so it keeps its index when it\n * re-renders alone and when StrictMode renders it twice.\n */\nexport function useStepperStepIndex() {\n const pass = useContext(StepperBaseStepIndexPassContext);\n const allocated = useRef<AllocatedIndex | null>(null);\n\n if (!pass) return undefined;\n\n if (allocated.current?.pass !== pass) {\n allocated.current = { pass, index: pass.allocate() };\n }\n\n return allocated.current.index;\n}\n","import type { ReactNode } from \"react\";\n\nimport {\n StepperBaseStepIndexPassContext,\n type StepperBaseStepIndexPass,\n} from \"./StepperBaseContext\";\n\nfunction startIndexPass(): StepperBaseStepIndexPass {\n let nextIndex = 0;\n\n return {\n allocate: () => {\n const index = nextIndex;\n nextIndex += 1;\n return index;\n },\n };\n}\n\nexport function StepperStepIndexScope({ children }: { children: ReactNode }) {\n return (\n <StepperBaseStepIndexPassContext.Provider value={startIndexPass()}>\n {children}\n </StepperBaseStepIndexPassContext.Provider>\n );\n}\n","import { type ComponentPropsWithoutRef, forwardRef, useContext } from \"react\";\nimport cx from \"classnames\";\n\nimport { StepperBaseContext } from \"./internal/StepperBaseContext\";\nimport { StepperStepIndexScope } from \"./internal/StepperStepIndexScope\";\n\nimport styles from \"../StepperList.module.scss\";\n\n/**\n * Props for the StepperBase.List component\n * @extends ComponentPropsWithoutRef<\"div\">\n */\nexport type StepperBaseListProps = ComponentPropsWithoutRef<\"div\">;\n\n/**\n * Container for StepperBase steps.\n *\n * Features:\n * - Groups steps in the track\n * - Shows the current step label on small widths\n * - Accessible tablist\n *\n * @example\n * <StepperBase.List>\n * <StepperBase.Step>One</StepperBase.Step>\n * <StepperBase.Step>Two</StepperBase.Step>\n * </StepperBase.List>\n */\nexport const StepperBaseList = forwardRef<HTMLDivElement, StepperBaseListProps>(\n (props, ref) => {\n const { className, children, ...rest } = props;\n const { getCurrentStep } = useContext(StepperBaseContext);\n const currentLabel = getCurrentStep()?.label;\n\n return (\n <div\n {...rest}\n className={cx(styles[\"stepper-list\"], className)}\n data-anv=\"stepper-base-list\"\n ref={ref}\n role=\"tablist\"\n >\n <div className={styles[\"stepper-steps\"]}>\n <StepperStepIndexScope>{children}</StepperStepIndexScope>\n </div>\n <span className={styles.label}>{currentLabel}</span>\n </div>\n );\n },\n);\n\nStepperBaseList.displayName = \"StepperBaseList\";\n","import {\n forwardRef,\n useContext,\n useLayoutEffect,\n useRef,\n type KeyboardEvent,\n type MouseEvent,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport cx from \"classnames\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check.svg\";\n\nimport { Icon } from \"../../Icon\";\nimport { useMergeRefs } from \"../../../hooks\";\nimport {\n StepperBaseContext,\n useStepperStepIndex,\n type StepperBaseStepState,\n} from \"./internal/StepperBaseContext\";\n\nimport styles from \"../StepperStep.module.scss\";\n\nexport type { StepperBaseStepState };\n\n/**\n * Props for the StepperBase.Step component\n * @extends ComponentPropsWithoutRef<\"button\">\n */\nexport type StepperBaseStepProps = Omit<\n ComponentPropsWithoutRef<\"button\">,\n \"onClick\" | \"disabled\"\n> & {\n /**\n * Outcome of this step. Independent of whether it is current (index).\n * Current + any state is legal.\n * @default \"not started\"\n */\n state?: StepperBaseStepState;\n\n /**\n * Stable id. Required when a Panel points at this step.\n */\n id?: string;\n\n /**\n * When true, this step cannot become current via click or keyboard.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Notify only. Does not replace onIndexChange.\n * @param e Mouse event\n * @param index Index of the step in the list\n */\n onClick?: (e: MouseEvent<HTMLButtonElement>, index?: number) => void;\n};\n\n/**\n * Individual step for StepperBase.\n *\n * Features:\n * - Outcome independent of the current step\n * - Check icon when complete\n * - Optional id for panel pairing\n *\n * @example\n * <StepperBase.Step id=\"approved\" state=\"complete\">\n * Approved\n * </StepperBase.Step>\n */\nexport const StepperBaseStep = forwardRef<\n HTMLButtonElement,\n StepperBaseStepProps\n>((props, ref) => {\n const stepRef = useRef<HTMLButtonElement>(null);\n const index = useStepperStepIndex();\n const {\n currentIndex,\n interactive,\n focusIndex,\n setFocusIndex,\n requestIndexChange,\n registerStep,\n getStep,\n getPanelId,\n } = useContext(StepperBaseContext);\n const {\n state = \"not started\",\n id,\n disabled = false,\n onClick,\n children,\n onKeyDown,\n className,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n\n const childrenText =\n typeof children === \"string\"\n ? children\n : typeof children === \"number\"\n ? String(children)\n : undefined;\n const label = childrenText || ariaLabel || \"\";\n\n useLayoutEffect(() => {\n if (index === undefined) return;\n return registerStep({\n index,\n id,\n label,\n disabled,\n node: stepRef,\n });\n }, [disabled, id, index, label, registerStep]);\n\n const selected = index === currentIndex;\n const completed = state === \"complete\";\n const panelId = id ? getPanelId(id) : undefined;\n\n const onClickHandler = (e: MouseEvent<HTMLButtonElement>) => {\n onClick?.(e, index);\n if (index === undefined) return;\n requestIndexChange(index);\n };\n\n const onKeyDownHandler = (e: KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e);\n if (!interactive || index === undefined) return;\n\n const activatable: number[] = [];\n for (let i = 0; ; i += 1) {\n const step = getStep(i);\n if (!step) break;\n if (!step.disabled) activatable.push(i);\n }\n if (activatable.length === 0) return;\n\n const currentPos = activatable.indexOf(focusIndex);\n const safePos = currentPos === -1 ? 0 : currentPos;\n\n switch (e.code) {\n case \"Enter\":\n case \"Space\":\n e.preventDefault();\n requestIndexChange(focusIndex);\n break;\n case \"ArrowRight\": {\n e.preventDefault();\n const next = activatable[(safePos + 1) % activatable.length];\n setFocusIndex(next);\n getStep(next)?.node.current?.focus();\n break;\n }\n case \"ArrowLeft\": {\n e.preventDefault();\n const prev =\n activatable[(safePos - 1 + activatable.length) % activatable.length];\n setFocusIndex(prev);\n getStep(prev)?.node.current?.focus();\n break;\n }\n default:\n break;\n }\n };\n\n return (\n <button\n type=\"button\"\n role=\"tab\"\n data-anv=\"stepper-base-step\"\n data-state={state}\n data-completed={completed}\n className={cx(styles[\"stepper-step\"], className, {\n [styles[\"can-navigate\"]]: interactive,\n })}\n aria-selected={selected}\n aria-controls={panelId}\n aria-disabled={disabled || undefined}\n aria-label={childrenText || ariaLabel}\n tabIndex={interactive && index === focusIndex && !disabled ? 0 : -1}\n onClick={onClickHandler}\n onKeyDown={interactive ? onKeyDownHandler : onKeyDown}\n {...rest}\n id={id}\n ref={useMergeRefs([stepRef, ref])}\n >\n <span className={styles.bar} />\n <span className={styles.label}>\n <span className={styles.circle}>\n <Icon svg={Check} inherit aria-hidden />\n </span>\n {children}\n </span>\n </button>\n );\n});\n\nStepperBaseStep.displayName = \"StepperBaseStep\";\n","import {\n type ComponentPropsWithoutRef,\n forwardRef,\n useContext,\n useId,\n useLayoutEffect,\n} from \"react\";\nimport cx from \"classnames\";\nimport { core } from \"@servicetitan/hammer-token\";\nimport { motion } from \"motion/react\";\n\nimport type { LayoutUtilProps } from \"../../../types\";\nimport { useLayoutPropsUtil } from \"../../../internal/hooks\";\nimport { Overflow } from \"../../Overflow\";\nimport { StepperBaseContext } from \"./internal/StepperBaseContext\";\n\nimport styles from \"../StepperPanel.module.scss\";\n\n/**\n * Props for the StepperBase.Panel component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type StepperBasePanelProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\"\n> &\n LayoutUtilProps & {\n /**\n * id of the controlling Step.\n */\n step: string;\n\n /**\n * Panel element id. Generated when omitted (used for aria-controls).\n */\n id?: string;\n };\n\n/**\n * Content panel for a StepperBase step.\n *\n * Features:\n * - Shown only when the named step is current\n * - Fade-in animation\n * - Overflow scrolling for long content\n *\n * @example\n * <StepperBase.Panel step=\"approved\">\n * Details\n * </StepperBase.Panel>\n */\nexport const StepperBasePanel = forwardRef<\n HTMLDivElement,\n StepperBasePanelProps\n>((props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n step,\n id: idProp,\n className,\n style,\n children,\n ...rest\n } = componentProps;\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const { getCurrentStep, registerPanel } = useContext(StepperBaseContext);\n const currentStep = getCurrentStep();\n const isCurrent = currentStep?.id === step;\n\n useLayoutEffect(() => {\n return registerPanel(step, id);\n }, [id, registerPanel, step]);\n\n const styleCombined = {\n ...style,\n ...layoutStyles,\n };\n\n if (!isCurrent) {\n return null;\n }\n\n return (\n <motion.div\n style={styleCombined}\n className={cx(styles[\"stepper-panel\"], className)}\n transition={{\n opacity: {\n duration: +core.primitive.DurationSlow.value.replace(\"ms\", \"\") / 1000,\n },\n }}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n layout\n {...rest}\n role=\"tabpanel\"\n data-anv=\"stepper-base-panel\"\n id={id}\n ref={ref}\n >\n <Overflow flexGrow={1}>{children}</Overflow>\n </motion.div>\n );\n});\n\nStepperBasePanel.displayName = \"StepperBasePanel\";\n","import {\n type ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport cx from \"classnames\";\nimport { motion } from \"motion/react\";\n\nimport { useMergeRefs } from \"../../../hooks\";\nimport type { LayoutUtilProps } from \"../../../types\";\nimport {\n useLayoutPropsUtil,\n useOptionallyControlledState,\n} from \"../../../internal/hooks\";\n\nimport { StepperBaseList } from \"./StepperBaseList\";\nimport { StepperBaseStep } from \"./StepperBaseStep\";\nimport { StepperBasePanel } from \"./StepperBasePanel\";\nimport {\n StepperBaseContext,\n type StepperBaseContextValue,\n type StepperBaseStepInfo,\n} from \"./internal/StepperBaseContext\";\n\nimport styles from \"../Stepper.module.scss\";\n\n/**\n * Props for the StepperBase component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type StepperBaseProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\"\n> &\n LayoutUtilProps & {\n /**\n * Controlled current step (0-based). Pair with onIndexChange.\n */\n index?: number;\n\n /**\n * Uncontrolled start. Ignored when index is set.\n * @default 0\n */\n defaultIndex?: number;\n\n /**\n * Fired when a step is activated.\n * @param index The index of the newly current step\n */\n onIndexChange?: (index: number) => void;\n\n /**\n * When true, click and keyboard can change the current step.\n * @default false\n */\n interactive?: boolean;\n };\n\n/**\n * StepperBase is a controllable stepper primitive. The caller sets the current\n * step and each step's outcome. Use Stepper for the linear wizard.\n *\n * Features:\n * - Controlled or uncontrolled current step via index / defaultIndex / onIndexChange\n * - Per-step outcome (not started, started, complete) independent of current\n * - Optional panels; a panel names its step, steps do not require panels\n * - Display-only by default; opt into click/keyboard with interactive\n * - Same track, circle, and compact-label chrome as Stepper\n *\n * @example\n * <StepperBase index={2}>\n * <StepperBase.List>\n * <StepperBase.Step state=\"complete\">Approved</StepperBase.Step>\n * <StepperBase.Step state=\"complete\">Approved & Reconciled</StepperBase.Step>\n * <StepperBase.Step>Scheduled</StepperBase.Step>\n * </StepperBase.List>\n * </StepperBase>\n */\nexport const StepperBase = Object.assign(\n forwardRef<HTMLDivElement, StepperBaseProps>(\n function StepperBaseInner(props, ref) {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n index,\n defaultIndex = 0,\n onIndexChange,\n interactive = false,\n className,\n children,\n style,\n ...rest\n } = componentProps;\n\n const rootRef = useRef<HTMLDivElement>(null);\n const [currentIndex, setCurrentIndex] = useOptionallyControlledState({\n controlledValue: index,\n defaultValue: defaultIndex,\n onChange: onIndexChange,\n });\n const [focusIndex, setFocusIndex] = useState(index ?? defaultIndex);\n\n useEffect(() => {\n setFocusIndex(currentIndex);\n }, [currentIndex]);\n const stepsRef = useRef<Map<number, StepperBaseStepInfo>>(new Map());\n const [stepsVersion, setStepsVersion] = useState(0);\n const panelsRef = useRef<Map<string, string>>(new Map());\n const [panelsVersion, setPanelsVersion] = useState(0);\n\n const bumpSteps = useCallback(() => {\n setStepsVersion((value) => value + 1);\n }, []);\n\n const bumpPanels = useCallback(() => {\n setPanelsVersion((value) => value + 1);\n }, []);\n\n const registerStep = useCallback(\n (info: StepperBaseStepInfo) => {\n stepsRef.current.set(info.index, info);\n bumpSteps();\n return () => {\n const current = stepsRef.current.get(info.index);\n if (current === info) {\n stepsRef.current.delete(info.index);\n bumpSteps();\n }\n };\n },\n [bumpSteps],\n );\n\n const getStep = useCallback((stepIndex: number) => {\n return stepsRef.current.get(stepIndex);\n }, []);\n\n const getCurrentStep = useCallback(() => {\n return stepsRef.current.get(currentIndex);\n }, [currentIndex]);\n\n const requestIndexChange = useCallback(\n (nextIndex: number) => {\n if (!interactive) return;\n const target = stepsRef.current.get(nextIndex);\n if (target?.disabled) return;\n setCurrentIndex(nextIndex);\n setFocusIndex(nextIndex);\n },\n [interactive, setCurrentIndex],\n );\n\n const registerPanel = useCallback(\n (stepId: string, panelId: string) => {\n panelsRef.current.set(stepId, panelId);\n bumpPanels();\n return () => {\n if (panelsRef.current.get(stepId) === panelId) {\n panelsRef.current.delete(stepId);\n bumpPanels();\n }\n };\n },\n [bumpPanels],\n );\n\n const getPanelId = useCallback((stepId: string) => {\n return panelsRef.current.get(stepId);\n }, []);\n\n const value = useMemo<StepperBaseContextValue>(\n () => ({\n currentIndex,\n interactive,\n focusIndex,\n setFocusIndex,\n requestIndexChange,\n registerStep,\n getStep,\n getCurrentStep,\n getPanelId,\n registerPanel,\n }),\n [\n currentIndex,\n interactive,\n focusIndex,\n requestIndexChange,\n registerStep,\n getStep,\n getCurrentStep,\n getPanelId,\n registerPanel,\n stepsVersion,\n panelsVersion,\n ],\n );\n\n const styleCombined = { ...style, ...layoutStyles };\n\n return (\n <StepperBaseContext.Provider value={value}>\n <motion.div\n transition={{ duration: 0 }}\n layout\n className={cx(styles.stepper, className)}\n data-anv=\"stepper-base\"\n style={styleCombined}\n {...rest}\n ref={useMergeRefs([rootRef, ref])}\n >\n {children}\n </motion.div>\n </StepperBaseContext.Provider>\n );\n },\n ),\n {\n /**\n * Individual step. Outcome is independent of whether the step is current.\n *\n * Features:\n * - state: not started, started, or complete\n * - Optional id when a panel points at this step\n * - Check icon when complete\n *\n * @example\n * <StepperBase.Step state=\"complete\">Approved</StepperBase.Step>\n */\n Step: StepperBaseStep,\n\n /**\n * Track of steps plus the compact label on small widths.\n *\n * Features:\n * - Lays out StepperBase.Step children\n * - Shows the current step label when the track is narrow\n *\n * @example\n * <StepperBase.List>\n * <StepperBase.Step>Scheduled</StepperBase.Step>\n * </StepperBase.List>\n */\n List: StepperBaseList,\n\n /**\n * Content for one step. Visible when that step is current.\n *\n * Features:\n * - step is required and must match a Step id\n * - id is optional and generated when omitted\n *\n * @example\n * <StepperBase.Panel step=\"approved\">Details</StepperBase.Panel>\n */\n Panel: StepperBasePanel,\n },\n);\nStepperBase.displayName = \"StepperBase\";\n","import { type ComponentPropsWithoutRef, forwardRef, useContext } from \"react\";\nimport cx from \"classnames\";\n\nimport { StepperBaseContext } from \"./base/internal/StepperBaseContext\";\nimport { StepperStepIndexScope } from \"./base/internal/StepperStepIndexScope\";\n\nimport styles from \"./StepperList.module.scss\";\n\n/**\n * Props for the StepperList component\n * @extends ComponentPropsWithoutRef<\"div\">\n */\nexport type StepperListProps = ComponentPropsWithoutRef<\"div\">;\n\n/**\n * Container component for organizing and displaying stepper steps.\n *\n * Features:\n * - Groups multiple stepper steps together\n * - Displays current step label\n * - Responsive design with mobile-friendly layout\n * - Accessible with proper ARIA roles\n * - Automatic step organization\n * - Visual step indicators\n * - Context-based current step display\n * - Flexible layout with CSS Grid/Flexbox\n * - Container queries for responsive behavior\n *\n * @example\n * <Stepper.List>\n * <Stepper.Step controls=\"step1\">Step 1</Stepper.Step>\n * <Stepper.Step controls=\"step2\">Step 2</Stepper.Step>\n * <Stepper.Step controls=\"step3\">Step 3</Stepper.Step>\n * </Stepper.List>\n */\nexport const StepperList = forwardRef<HTMLDivElement, StepperListProps>(\n (props, ref) => {\n const { className, children, onKeyDown: _onKeyDown, ...rest } = props;\n const { getCurrentStep } = useContext(StepperBaseContext);\n const currentLabel = getCurrentStep()?.label;\n\n const tabListClassNames = cx(styles[\"stepper-list\"], className);\n\n return (\n <div\n {...rest}\n className={tabListClassNames}\n data-anv=\"stepper-list\"\n ref={ref}\n role=\"tablist\"\n >\n <div className={styles[\"stepper-steps\"]}>\n <StepperStepIndexScope>{children}</StepperStepIndexScope>\n </div>\n <span className={styles.label}>{currentLabel}</span>\n </div>\n );\n },\n);\n\nStepperList.displayName = \"StepperList\";\n","import { type Dispatch, type SetStateAction, createContext } from \"react\";\n\nexport type StepperContextProps = {\n current: number;\n setCurrent: Dispatch<SetStateAction<number>>;\n currentId: string;\n setCurrentId: Dispatch<SetStateAction<string>>;\n focus: number;\n setFocus: Dispatch<SetStateAction<number>>;\n onComplete?: () => void;\n allCompleted?: boolean;\n setAllCompleted?: Dispatch<SetStateAction<boolean>>;\n allowNavigateToPrevStep?: boolean;\n};\n\nexport const StepperContext = createContext<StepperContextProps>({\n current: 0,\n currentId: \"\",\n focus: 0,\n setFocus: () => undefined,\n setCurrent: () => undefined,\n setCurrentId: () => undefined,\n});\n","import {\n forwardRef,\n useContext,\n useLayoutEffect,\n useRef,\n type KeyboardEvent,\n type MouseEvent,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport cx from \"classnames\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check.svg\";\n\nimport { Icon } from \"../Icon\";\nimport { useMergeRefs } from \"../../hooks\";\nimport {\n StepperBaseContext,\n useStepperStepIndex,\n} from \"./base/internal/StepperBaseContext\";\nimport { StepperContext } from \"./internal/StepperContext\";\n\nimport styles from \"./StepperStep.module.scss\";\n\n/**\n * Props for the StepperStep component\n * @extends ComponentPropsWithoutRef<\"button\">\n */\nexport type StepperStepProps = Omit<\n ComponentPropsWithoutRef<\"button\">,\n \"onClick\" | \"disabled\"\n> & {\n /**\n * ID of the panel that this step is controlling.\n * Must match the id prop of the corresponding Stepper.Panel.\n */\n controls: string;\n\n /**\n * Called when the step is clicked.\n * @param e Mouse event object\n * @param index Index of the step in the stepper\n */\n onClick?: (e: MouseEvent<HTMLButtonElement>, index?: number) => void;\n};\n\n/**\n * Individual step component for the Stepper.\n *\n * Features:\n * - Visual progress indicator with animated bar\n * - Check icon for completed steps\n * - Keyboard navigation support\n * - Accessible with proper ARIA attributes\n * - Click handling for step navigation\n * - Visual states for current, completed, and future steps\n * - Responsive design with mobile-friendly layout\n * - Focus management for keyboard users\n * - Custom styling support\n *\n * @example\n * <Stepper.Step controls=\"step1\">\n * Personal Information\n * </Stepper.Step>\n *\n * @example\n * <Stepper.Step\n * controls=\"step2\"\n * onClick={(e, index) => console.log(`Clicked step ${index}`)}\n * >\n * Contact Details\n * </Stepper.Step>\n */\nexport const StepperStep = forwardRef<HTMLButtonElement, StepperStepProps>(\n (props, ref) => {\n const stepRef = useRef<HTMLButtonElement>(null);\n const index = useStepperStepIndex();\n const { registerStep, getStep } = useContext(StepperBaseContext);\n const {\n current,\n setCurrent,\n focus,\n setFocus,\n allCompleted,\n allowNavigateToPrevStep,\n } = useContext(StepperContext);\n const {\n onClick,\n children,\n onFocus,\n onKeyDown,\n controls,\n className,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n\n const childrenText =\n typeof children === \"string\"\n ? children\n : typeof children === \"number\"\n ? String(children)\n : undefined;\n const label = childrenText || ariaLabel || \"\";\n\n useLayoutEffect(() => {\n if (index === undefined) return;\n return registerStep({\n index,\n id: controls,\n label,\n disabled: false,\n node: stepRef,\n });\n }, [controls, index, label, registerStep]);\n\n const selected = index === current;\n const completed = index !== undefined && index < current;\n\n const stepClassNames = cx(styles[\"stepper-step\"], className, {\n [styles[\"can-navigate\"]]: allowNavigateToPrevStep,\n [styles[\"all-completed\"]]: allCompleted,\n });\n\n const onClickHandler = (e: MouseEvent<HTMLButtonElement>) => {\n onClick?.(e, index);\n if (\n !allowNavigateToPrevStep ||\n selected ||\n index === undefined ||\n index > current\n ) {\n return;\n }\n setCurrent(index);\n setFocus(index);\n stepRef.current?.focus();\n };\n\n const onKeyDownHandler = (e: KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e);\n const focusableItems: HTMLElement[] = [];\n for (let i = 0; i <= current; i += 1) {\n const node = getStep(i)?.node.current;\n if (node) focusableItems.push(node);\n }\n const prevFocus = focus - 1;\n const nextFocus = focus + 1;\n switch (e.code) {\n case \"Enter\":\n case \"Space\":\n e.preventDefault();\n setCurrent(focus);\n break;\n case \"ArrowRight\":\n e.preventDefault();\n if (nextFocus === focusableItems.length) {\n setFocus(0);\n focusableItems[0].focus();\n return;\n }\n setFocus(nextFocus);\n focusableItems[nextFocus].focus();\n break;\n case \"ArrowLeft\":\n e.preventDefault();\n if (focus === 0) {\n const lastItemIndex = focusableItems.length - 1;\n setFocus(lastItemIndex);\n focusableItems[lastItemIndex].focus();\n return;\n }\n setFocus(prevFocus);\n focusableItems[prevFocus].focus();\n break;\n }\n };\n\n return (\n <button\n type=\"button\"\n role=\"tab\"\n data-anv=\"stepper-step\"\n className={stepClassNames}\n aria-selected={selected}\n aria-controls={controls}\n aria-label={childrenText || ariaLabel}\n tabIndex={\n allowNavigateToPrevStep && index === focus && !allCompleted ? 0 : -1\n }\n data-completed={completed}\n onClick={onClickHandler}\n onKeyDown={allowNavigateToPrevStep ? onKeyDownHandler : onKeyDown}\n {...rest}\n ref={useMergeRefs([stepRef, ref])}\n >\n <span className={styles.bar} />\n <span className={styles.label}>\n <span className={styles.circle}>\n <Icon svg={Check} inherit aria-hidden />\n </span>\n\n {children}\n </span>\n </button>\n );\n },\n);\n\nStepperStep.displayName = \"StepperStep\";\n","import {\n type ComponentPropsWithoutRef,\n forwardRef,\n useContext,\n useEffect,\n} from \"react\";\nimport cx from \"classnames\";\nimport { core } from \"@servicetitan/hammer-token\";\nimport { motion } from \"motion/react\";\n\nimport type { LayoutUtilProps } from \"../../types\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\nimport { Overflow } from \"../Overflow\";\nimport { StepperBaseContext } from \"./base/internal/StepperBaseContext\";\nimport { StepperContext } from \"./internal/StepperContext\";\n\nimport styles from \"./StepperPanel.module.scss\";\n\n/**\n * Props for the StepperPanel component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type StepperPanelProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\"\n> &\n LayoutUtilProps & {\n /**\n * Unique identifier for the panel.\n * Must match the controls prop of the corresponding Stepper.Step.\n */\n id: string;\n };\n\n/**\n * Content panel component for displaying step content in the Stepper.\n *\n * Features:\n * - Displays content for the current step only\n * - Smooth fade-in/fade-out animations\n * - Automatic overflow handling with scroll support\n * - Accessible with proper ARIA roles\n * - Layout utilities for positioning and spacing\n * - Motion animations for smooth transitions\n * - Focus management for keyboard navigation\n * - Responsive design with flexible layout\n * - Context-based visibility control\n *\n * @example\n * <Stepper.Panel id=\"step1\">\n * <h2>Personal Information</h2>\n * <form>\n * <label htmlFor=\"name\">Name:</label>\n * <input id=\"name\" type=\"text\" />\n * </form>\n * </Stepper.Panel>\n *\n * @example\n * <Stepper.Panel id=\"step2\" className=\"custom-panel\">\n * <div className=\"step-content\">\n * <h2>Contact Details</h2>\n * <p>Please provide your contact information.</p>\n * </div>\n * </Stepper.Panel>\n */\nexport const StepperPanel = forwardRef<HTMLDivElement, StepperPanelProps>(\n (props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const { id, className, style, children, ...rest } = componentProps;\n const { allCompleted, setCurrentId } = useContext(StepperContext);\n const { getCurrentStep } = useContext(StepperBaseContext);\n\n const currentStepId = getCurrentStep()?.id;\n const isCurrent = currentStepId === id;\n\n useEffect(() => {\n if (isCurrent && !allCompleted) {\n setCurrentId(currentStepId ?? \"\");\n }\n }, [allCompleted, isCurrent, currentStepId, setCurrentId]);\n\n const tabPanelClassNames = cx(styles[\"stepper-panel\"], className);\n const styleCombined = {\n ...style,\n ...layoutStyles,\n };\n\n if (isCurrent && !allCompleted) {\n return (\n <motion.div\n style={styleCombined}\n className={tabPanelClassNames}\n transition={{\n opacity: {\n duration:\n +core.primitive.DurationSlow.value.replace(\"ms\", \"\") / 1000,\n },\n }}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n layout\n {...rest}\n role=\"tabpanel\"\n data-anv=\"stepper-panel\"\n id={id}\n ref={ref}\n >\n <Overflow flexGrow={1}>{children}</Overflow>\n </motion.div>\n );\n }\n return <></>;\n },\n);\n\nStepperPanel.displayName = \"StepperPanel\";\n","import {\n type ComponentPropsWithoutRef,\n forwardRef,\n useContext,\n useEffect,\n} from \"react\";\nimport cx from \"classnames\";\nimport { core } from \"@servicetitan/hammer-token\";\nimport { motion } from \"motion/react\";\n\nimport type { LayoutUtilProps } from \"../../types\";\nimport { Overflow } from \"../Overflow\";\nimport { StepperContext } from \"./internal/StepperContext\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\n\nimport styles from \"./StepperPanel.module.scss\";\n\n/**\n * Props for the StepperFinalPanel component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type StepperFinalPanelProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\"\n> &\n LayoutUtilProps;\n\n/**\n * Final panel component displayed when all stepper steps are completed.\n *\n * Features:\n * - Displays only when all steps are completed\n * - Smooth fade-in animation on completion\n * - Automatic overflow handling with scroll support\n * - Accessible with proper ARIA roles\n * - Layout utilities for positioning and spacing\n * - Motion animations for smooth transitions\n * - Focus management for keyboard navigation\n * - Responsive design with flexible layout\n * - Context-based visibility control\n *\n * @example\n * <Stepper.FinalPanel>\n * <h2>Congratulations!</h2>\n * <p>You have successfully completed all steps.</p>\n * <Button onClick={handleSubmit}>Submit</Button>\n * </Stepper.FinalPanel>\n */\nexport const StepperFinalPanel = forwardRef<\n HTMLDivElement,\n StepperFinalPanelProps\n>((props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const { id, className, style, children, ...rest } = componentProps;\n const { allCompleted, setCurrentId } = useContext(StepperContext);\n\n useEffect(() => {\n if (allCompleted) {\n setCurrentId(\"final-panel\");\n }\n }, [allCompleted, setCurrentId]);\n\n const tabPanelClassNames = cx(styles[\"stepper-panel\"], className);\n const styleCombined = {\n ...style,\n ...layoutStyles,\n };\n\n if (allCompleted) {\n return (\n <motion.div\n style={styleCombined}\n className={tabPanelClassNames}\n transition={{\n opacity: {\n duration:\n +core.primitive.DurationSlow.value.replace(\"ms\", \"\") / 1000,\n },\n }}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n layout\n {...rest}\n role=\"tabpanel\"\n data-anv=\"stepper-final-panel\"\n tabIndex={0}\n ref={ref}\n >\n <Overflow>{children}</Overflow>\n </motion.div>\n );\n }\n return null;\n});\n\nStepperFinalPanel.displayName = \"StepperFinalPanel\";\n","import type { StepperBaseContextValue } from \"../base/internal/StepperBaseContext\";\n\nexport function countRegisteredSteps(\n getStep: StepperBaseContextValue[\"getStep\"],\n): number {\n let count = 0;\n while (getStep(count)) count += 1;\n return count;\n}\n","import { forwardRef, useContext, type MouseEvent } from \"react\";\n\nimport { Button, type ButtonProps } from \"../Button\";\nimport type { DataTrackingId } from \"../../types\";\nimport { useTrackingId } from \"../../hooks\";\nimport { StepperBaseContext } from \"./base/internal/StepperBaseContext\";\n\nimport { StepperContext } from \"./internal/StepperContext\";\nimport { countRegisteredSteps } from \"./internal/countRegisteredSteps\";\n\n/**\n * Props for the StepperNextButton component\n * @extends ButtonProps\n */\nexport type StepperNextButtonProps = Omit<ButtonProps, \"children\"> & {\n /**\n * Label for the next button.\n * @default \"Next\"\n */\n nextLabel?: string;\n\n /**\n * Label for the complete button (shown on the last step).\n * @default \"Complete\"\n */\n completeLabel?: string;\n\n /**\n * Called when the \"Next\" button is clicked.\n * @param e MouseEvent<HTMLButtonElement>\n * @returns If the function returns `false`, or a Promise that resolves to `false`, the next step will not be executed.\n */\n onClick?: (\n e: MouseEvent<HTMLButtonElement>,\n ) => void | boolean | Promise<boolean>;\n} & DataTrackingId;\n\n/**\n * Next button component for navigating to the next step in the Stepper.\n *\n * Features:\n * - Automatically advances to the next step\n * - Changes label to \"Complete\" on the final step\n * - Supports async validation with Promise return\n * - Prevents navigation when validation fails\n * - Hides when all steps are completed\n * - Accessible with proper button semantics\n * - Customizable appearance and styling\n * - Integration with stepper context\n * - Automatic completion handling\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Stepper.NextButton\n * nextLabel=\"Continue\"\n * completeLabel=\"Finish\"\n * />\n *\n * @example\n * <Stepper.NextButton\n * onClick={async (e) => {\n * const isValid = await validateForm();\n * return isValid;\n * }}\n * appearance=\"primary\"\n * />\n */\nexport const StepperNextButton = forwardRef<\n HTMLButtonElement,\n StepperNextButtonProps\n>((props, ref) => {\n const {\n setAllCompleted,\n onComplete,\n setCurrent,\n setFocus,\n current,\n allCompleted,\n } = useContext(StepperContext);\n const { getStep } = useContext(StepperBaseContext);\n const stepCount = countRegisteredSteps(getStep);\n const isLastStep = stepCount > 0 && current === stepCount - 1;\n const {\n onClick,\n onFocus,\n nextLabel = \"Next\",\n completeLabel = \"Complete\",\n appearance = \"primary\",\n ...rest\n } = props;\n\n const proceedToNextStep = () => {\n if (isLastStep) {\n setAllCompleted?.(true);\n onComplete?.();\n return;\n }\n setCurrent(current + 1);\n setFocus(current + 1);\n };\n\n const onClickHandler = (e: MouseEvent<HTMLButtonElement>) => {\n const onClickResult = onClick?.(e);\n\n // check if onClick returns a Promise\n if (\n onClickResult !== undefined &&\n onClickResult &&\n (onClickResult as unknown) instanceof Promise\n ) {\n (onClickResult as unknown as Promise<boolean>).then((result) => {\n if (result === false) return;\n proceedToNextStep();\n });\n\n // otherwise, onClick returns a boolean or void\n } else {\n if ((onClickResult as void | boolean) === false) return;\n proceedToNextStep();\n }\n };\n\n const data = {\n nextLabel: props.nextLabel,\n completeLabel: props.completeLabel,\n };\n\n const trackingId = useTrackingId({\n name: \"StepperNextButton\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return allCompleted ? null : (\n <Button\n data-anv=\"stepper-next-button\"\n data-tracking-id={trackingId}\n onClick={onClickHandler}\n appearance={appearance}\n ref={ref}\n {...rest}\n >\n {isLastStep ? completeLabel : nextLabel}\n </Button>\n );\n});\n\nStepperNextButton.displayName = \"StepperNextButton\";\n","import { forwardRef, useContext, type MouseEvent } from \"react\";\n\nimport type { DataTrackingId } from \"../../types\";\nimport { Button, type ButtonProps } from \"../Button\";\nimport { useTrackingId } from \"../../hooks\";\n\nimport { StepperContext } from \"./internal/StepperContext\";\n\n/**\n * Props for the StepperPrevButton component\n * @extends ButtonProps\n */\nexport type StepperPrevButtonProps = Omit<ButtonProps, \"children\"> & {\n /**\n * Label for the previous button.\n * @default \"Previous\"\n */\n label?: string;\n} & DataTrackingId;\n\n/**\n * Previous button component for navigating to the previous step in the Stepper.\n *\n * Features:\n * - Navigates to the previous step when available\n * - Hides when on the first step\n * - Restores navigation when returning from completion\n * - Accessible with proper button semantics\n * - Customizable label and styling\n * - Integration with stepper context\n * - Automatic focus management\n * - Support for completion state handling\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Stepper.PrevButton label=\"Go Back\" />\n *\n * @example\n * <Stepper.PrevButton\n * label=\"Previous Step\"\n * appearance=\"secondary\"\n * onClick={(e) => console.log('Going back')}\n * />\n */\nexport const StepperPrevButton = forwardRef<\n HTMLButtonElement,\n StepperPrevButtonProps\n>((props, ref) => {\n const { setCurrent, setFocus, allCompleted, setAllCompleted, current } =\n useContext(StepperContext);\n const { onClick, label = \"Previous\", onFocus, ...rest } = props;\n\n const onClickHandler = (e: MouseEvent<HTMLButtonElement>) => {\n if (allCompleted) {\n setAllCompleted?.(false);\n } else {\n setCurrent(current - 1);\n setFocus(current - 1);\n }\n\n onClick?.(e);\n };\n\n const data = {\n label: props.label,\n };\n\n const trackingId = useTrackingId({\n name: \"StepperPrevButton\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return current === 0 ? null : (\n <Button\n data-anv=\"stepper-prev-button\"\n data-tracking-id={trackingId}\n onClick={onClickHandler}\n ref={ref}\n {...rest}\n >\n {label}\n </Button>\n );\n});\n\nStepperPrevButton.displayName = \"StepperPrevButton\";\n","import { useContext, useEffect, useRef } from \"react\";\n\nimport { StepperBaseContext } from \"../base/internal/StepperBaseContext\";\n\nimport { countRegisteredSteps } from \"./countRegisteredSteps\";\nimport { StepperContext } from \"./StepperContext\";\n\nexport function StepperWizardBootstrap({\n defaultIndex,\n}: {\n defaultIndex?: number;\n}) {\n const { getStep } = useContext(StepperBaseContext);\n const { setAllCompleted, setCurrent, setFocus } = useContext(StepperContext);\n const didBootstrap = useRef(false);\n const hasSteps = !!getStep(0);\n\n useEffect(() => {\n if (didBootstrap.current || !hasSteps) return;\n didBootstrap.current = true;\n\n const stepCount = countRegisteredSteps(getStep);\n if (defaultIndex !== undefined && defaultIndex >= stepCount) {\n const lastIndex = stepCount - 1;\n setAllCompleted?.(true);\n setCurrent(lastIndex);\n setFocus(lastIndex);\n }\n }, [defaultIndex, getStep, hasSteps, setAllCompleted, setCurrent, setFocus]);\n\n return null;\n}\n","import {\n type ComponentPropsWithoutRef,\n forwardRef,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\n\nimport type { LayoutUtilProps } from \"../../types\";\nimport { StepperBase } from \"./base\";\n\nimport { StepperList } from \"./StepperList\";\nimport { StepperStep } from \"./StepperStep\";\nimport { StepperPanel } from \"./StepperPanel\";\nimport { StepperFinalPanel } from \"./StepperFinalPanel\";\nimport { StepperNextButton } from \"./StepperNextButton\";\nimport { StepperPrevButton } from \"./StepperPrevButton\";\nimport { StepperContext } from \"./internal/StepperContext\";\nimport { StepperWizardBootstrap } from \"./internal/StepperWizardBootstrap\";\n\n/**\n * Props for the Stepper component\n * @extends ComponentPropsWithoutRef<\"div\">\n * @extends LayoutUtilProps\n */\nexport type StepperProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\" | \"onChange\"\n> &\n LayoutUtilProps & {\n /**\n * Default step to start on (0-based index).\n * To start in the completed state (showing FinalPanel with all steps marked complete),\n * set this to the total number of steps (e.g. `items.length`).\n * @default undefined\n */\n defaultIndex?: number;\n\n /**\n * Allows users to navigate to previous steps.\n * @default undefined\n */\n allowNavigateToPrevStep?: boolean;\n\n /**\n * Returns current step data when step changes.\n * @param data Object containing currentStepId and currentStepIndex\n * @param data.currentStepId ID given to Stepper.Panel, or \"final-panel\"\n * @param data.currentStepIndex Index of current step, or undefined on final panel\n */\n onChange?: (data: {\n currentStepId: string | \"final-panel\";\n currentStepIndex?: number;\n }) => void;\n\n /**\n * Called when all steps are completed.\n */\n onComplete?: () => void;\n };\n\n/**\n * Stepper component for creating multi-step workflows and forms.\n *\n * Features:\n * - Multi-step navigation with visual progress indicators\n * - Keyboard navigation support with arrow keys\n * - Optional navigation to previous steps\n * - Smooth animations and transitions\n * - Accessible with proper ARIA roles and attributes\n * - Customizable step labels and content\n * - Completion state handling\n * - Layout utilities for positioning and spacing\n * - Motion animations for step transitions\n * - Context-based state management\n *\n * @example\n * <Stepper defaultIndex={0} allowNavigateToPrevStep>\n * <Stepper.List>\n * <Stepper.Step controls=\"step1\">Step 1</Stepper.Step>\n * <Stepper.Step controls=\"step2\">Step 2</Stepper.Step>\n * <Stepper.Step controls=\"step3\">Step 3</Stepper.Step>\n * </Stepper.List>\n *\n * <Stepper.Panel id=\"step1\">\n * <h2>Step 1 Content</h2>\n * <p>This is the first step content.</p>\n * </Stepper.Panel>\n *\n * <Stepper.Panel id=\"step2\">\n * <h2>Step 2 Content</h2>\n * <p>This is the second step content.</p>\n * </Stepper.Panel>\n *\n * <Stepper.Panel id=\"step3\">\n * <h2>Step 3 Content</h2>\n * <p>This is the final step content.</p>\n * </Stepper.Panel>\n *\n * <Stepper.FinalPanel>\n * <h2>Completed!</h2>\n * <p>All steps have been completed successfully.</p>\n * </Stepper.FinalPanel>\n *\n * <Stepper.PrevButton />\n * <Stepper.NextButton />\n * </Stepper>\n */\nexport const Stepper = Object.assign(\n forwardRef<HTMLDivElement, StepperProps>(function StepperInner(props, ref) {\n const {\n defaultIndex,\n allowNavigateToPrevStep,\n children,\n onChange,\n onComplete,\n ...rest\n } = props;\n const [allCompleted, setAllCompleted] = useState(false);\n const [current, setCurrent] = useState<number>(defaultIndex ?? 0);\n const [currentId, setCurrentId] = useState<string>(\"\");\n const [focus, setFocus] = useState<number>(defaultIndex ?? 0);\n\n useEffect(() => {\n onChange?.({\n currentStepId: currentId,\n currentStepIndex: allCompleted ? undefined : current,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allCompleted, currentId, onChange]);\n\n const value = useMemo(\n () => ({\n current,\n setCurrent,\n currentId,\n setCurrentId,\n focus,\n setFocus,\n onComplete,\n allCompleted,\n setAllCompleted,\n allowNavigateToPrevStep,\n }),\n [\n current,\n currentId,\n focus,\n onComplete,\n allCompleted,\n allowNavigateToPrevStep,\n ],\n );\n\n return (\n <StepperBase\n index={current}\n interactive={false}\n data-anv=\"stepper\"\n {...rest}\n ref={ref}\n >\n <StepperContext.Provider value={value}>\n <StepperWizardBootstrap defaultIndex={defaultIndex} />\n {children}\n </StepperContext.Provider>\n </StepperBase>\n );\n }),\n {\n /**\n * Individual step component for the Stepper.\n *\n * Features:\n * - Visual progress indicator with animated bar\n * - Check icon for completed steps\n * - Keyboard navigation support\n * - Accessible with proper ARIA attributes\n * - Click handling for step navigation\n * - Visual states for current, completed, and future steps\n * - Responsive design with mobile-friendly layout\n * - Focus management for keyboard users\n * - Custom styling support\n *\n * @example\n * <Stepper.Step controls=\"step1\">\n * Personal Information\n * </Stepper.Step>\n *\n * @example\n * <Stepper.Step\n * controls=\"step2\"\n * onClick={(e, index) => console.log(`Clicked step ${index}`)}\n * >\n * Contact Details\n * </Stepper.Step>\n */\n Step: StepperStep,\n\n /**\n * Container component for organizing and displaying stepper steps.\n *\n * Features:\n * - Groups multiple stepper steps together\n * - Displays current step label\n * - Responsive design with mobile-friendly layout\n * - Accessible with proper ARIA roles\n * - Automatic step organization\n * - Visual step indicators\n * - Context-based current step display\n * - Flexible layout with CSS Grid/Flexbox\n * - Container queries for responsive behavior\n *\n * @example\n * <Stepper.List>\n * <Stepper.Step controls=\"step1\">Step 1</Stepper.Step>\n * <Stepper.Step controls=\"step2\">Step 2</Stepper.Step>\n * <Stepper.Step controls=\"step3\">Step 3</Stepper.Step>\n * </Stepper.List>\n */\n List: StepperList,\n\n /**\n * Content panel component for displaying step content in the Stepper.\n *\n * Features:\n * - Displays content for the current step only\n * - Smooth fade-in/fade-out animations\n * - Automatic overflow handling with scroll support\n * - Accessible with proper ARIA roles\n * - Layout utilities for positioning and spacing\n * - Motion animations for smooth transitions\n * - Focus management for keyboard navigation\n * - Responsive design with flexible layout\n * - Context-based visibility control\n *\n * @example\n * <Stepper.Panel id=\"step1\">\n * <h2>Personal Information</h2>\n * <form>\n * <label htmlFor=\"name\">Name:</label>\n * <input id=\"name\" type=\"text\" />\n * </form>\n * </Stepper.Panel>\n */\n Panel: StepperPanel,\n\n /**\n * Next button component for navigating to the next step in the Stepper.\n *\n * Features:\n * - Automatically advances to the next step\n * - Changes label to \"Complete\" on the final step\n * - Supports async validation with Promise return\n * - Prevents navigation when validation fails\n * - Hides when all steps are completed\n * - Accessible with proper button semantics\n * - Customizable appearance and styling\n * - Integration with stepper context\n * - Automatic completion handling\n *\n * @example\n * <Stepper.NextButton\n * nextLabel=\"Continue\"\n * completeLabel=\"Finish\"\n * />\n *\n * @example\n * <Stepper.NextButton\n * onClick={async (e) => {\n * const isValid = await validateForm();\n * return isValid;\n * }}\n * appearance=\"primary\"\n * />\n */\n NextButton: StepperNextButton,\n\n /**\n * Previous button component for navigating to the previous step in the Stepper.\n *\n * Features:\n * - Navigates to the previous step when available\n * - Hides when on the first step\n * - Restores navigation when returning from completion\n * - Accessible with proper button semantics\n * - Customizable label and styling\n * - Integration with stepper context\n * - Automatic focus management\n * - Support for completion state handling\n *\n * @example\n * <Stepper.PrevButton label=\"Go Back\" />\n *\n * @example\n * <Stepper.PrevButton\n * label=\"Previous Step\"\n * appearance=\"secondary\"\n * onClick={(e) => console.log('Going back')}\n * />\n */\n PrevButton: StepperPrevButton,\n\n /**\n * Final panel component displayed when all stepper steps are completed.\n *\n * Features:\n * - Displays only when all steps are completed\n * - Smooth fade-in animation on completion\n * - Automatic overflow handling with scroll support\n * - Accessible with proper ARIA roles\n * - Layout utilities for positioning and spacing\n * - Motion animations for smooth transitions\n * - Focus management for keyboard navigation\n * - Responsive design with flexible layout\n * - Context-based visibility control\n *\n * @example\n * <Stepper.FinalPanel>\n * <h2>Congratulations!</h2>\n * <p>You have successfully completed all steps.</p>\n * <Button onClick={handleSubmit}>Submit</Button>\n * </Stepper.FinalPanel>\n */\n FinalPanel: StepperFinalPanel,\n },\n);\nStepper.displayName = \"Stepper\";\n"],"names":["styles","Check","core.primitive.DurationSlow","value"],"mappings":";;;;;;;;;;;;;;AA0BO,MAAM,qBAAqB,aAAA,CAAuC;AAAA,EACvE,YAAA,EAAc,CAAA;AAAA,EACd,WAAA,EAAa,KAAA;AAAA,EACb,UAAA,EAAY,CAAA;AAAA,EACZ,eAAe,MAAM,MAAA;AAAA,EACrB,oBAAoB,MAAM,MAAA;AAAA,EAC1B,YAA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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAuBZ,UAAA,EAAY;AAAA;AAEhB;AACA,OAAA,CAAQ,WAAA,GAAc,SAAA;;;;"}
package/dist/Stepper.css CHANGED
@@ -28,7 +28,7 @@
28
28
  display: none;
29
29
  }
30
30
  }
31
- }.anvil2 {._stepper-step_1p8ur_1 {
31
+ }.anvil2 {._stepper-step_rf27i_1 {
32
32
  --a2-mod-stepper-step-circle-foreground-color: var(--a2-stepper-step-default-circle-icon-color, var(--a2-foreground-color-on-primary, light-dark(var(--a2-color-neutral-0, #ffffff), var(--a2-color-neutral-900, #1a1a1a))));
33
33
  --a2-mod-stepper-step-fill-color: var(--a2-stepper-step-default-background-color, var(--a2-status-color-info, light-dark(var(--a2-color-blue-600, #0265dc), var(--a2-color-blue-300, #70b1ff))));
34
34
  --a2-mod-stepper-step-focus-ring-color: var(--a2-stepper-focus-ring-color, var(--a2-focus-ring-color-default, var(--a2-status-color-info, light-dark(var(--a2-color-blue-600, #0265dc), var(--a2-color-blue-300, #70b1ff)))));
@@ -55,7 +55,7 @@
55
55
  line-height: normal;
56
56
  text-align: start;
57
57
  transition: background-color var(--a2-duration-fast, 100ms) var(--a2-transition-ease-out, cubic-bezier(0, 0, 0.4, 1)), outline var(--a2-duration-fast, 100ms) var(--a2-transition-ease-out, cubic-bezier(0, 0, 0.4, 1));
58
- }._bar_1p8ur_30 {
58
+ }._bar_rf27i_30 {
59
59
  background-color: var(--a2-mod-stepper-step-track-color);
60
60
  border-radius: var(--a2-mod-stepper-step-bar-border-radius, var(--a2-border-radius-xlarge, var(--a2-radius-8, 1.5rem)));
61
61
  flex-shrink: 0;
@@ -64,14 +64,14 @@
64
64
  outline: var(--a2-mod-stepper-step-bar-outline, none);
65
65
  outline-offset: var(--a2-mod-stepper-step-bar-outline-offset, 0);
66
66
  overflow: hidden;
67
- }._bar_1p8ur_30::before {
67
+ }._bar_rf27i_30::before {
68
68
  background-color: var(--a2-mod-stepper-step-fill-color);
69
69
  content: "";
70
70
  display: block;
71
71
  height: 100%;
72
72
  transition: width var(--a2-duration-fast, 100ms) var(--a2-transition-ease-out, cubic-bezier(0, 0, 0.4, 1)) var(--a2-mod-stepper-step-bar-transition-delay, 0s);
73
73
  width: var(--a2-mod-stepper-step-bar-width, 0);
74
- }._label_1p8ur_49 {
74
+ }._label_rf27i_49 {
75
75
  border-radius: var(--a2-mod-stepper-step-label-border-radius, 0);
76
76
  color: var(--a2-mod-stepper-step-label-color, inherit);
77
77
  display: var(--a2-mod-stepper-step-label-display, none);
@@ -82,7 +82,7 @@
82
82
  outline-offset: var(--a2-mod-stepper-step-label-outline-offset, 0);
83
83
  position: static;
84
84
  text-decoration: var(--a2-mod-stepper-step-label-text-decoration, none);
85
- }._circle_1p8ur_62 {
85
+ }._circle_rf27i_62 {
86
86
  align-items: center;
87
87
  background-color: var(--a2-mod-stepper-step-circle-background-color, var(--a2-stepper-step-default-circle-background-color, var(--a2-background-color-default, light-dark(var(--a2-color-neutral-0, #ffffff), var(--a2-color-neutral-900, #1a1a1a)))));
88
88
  border: var(--a2-size-quarter, 0.0625rem) var(--a2-mod-stepper-step-circle-border-style, dashed) var(--a2-mod-stepper-step-circle-border-color, var(--a2-stepper-step-default-circle-border-color, var(--a2-border-color-default, light-dark(var(--a2-color-neutral-400, #8b8b8b), var(--a2-color-neutral-600, #545454)))));
@@ -95,41 +95,44 @@
95
95
  justify-content: center;
96
96
  margin-block-start: var(--a2-size-half, 0.125rem);
97
97
  width: var(--a2-size-4, 1rem);
98
- }._circle_1p8ur_62 svg {
98
+ }._circle_rf27i_62 svg {
99
99
  display: var(--a2-mod-stepper-step-check-icon-display, none);
100
- }._stepper-step_1p8ur_1[aria-selected=true] {
100
+ }._stepper-step_rf27i_1[aria-selected=true] {
101
101
  --a2-mod-stepper-step-bar-transition-delay: var(--a2-duration-fast, 100ms);
102
102
  --a2-mod-stepper-step-bar-width: var(--a2-size-6, 1.5rem);
103
103
  --a2-mod-stepper-step-circle-border-color: var(--a2-stepper-step-current-circle-border-color, var(--a2-status-color-info, light-dark(var(--a2-color-blue-600, #0265dc), var(--a2-color-blue-300, #70b1ff))));
104
104
  --a2-mod-stepper-step-circle-border-style: solid;
105
- }._stepper-step_1p8ur_1[aria-selected=true]:not(._all-completed_1p8ur_87) {
105
+ }._stepper-step_rf27i_1[aria-selected=true]:not(._all-completed_rf27i_87) {
106
106
  font-weight: var(--a2-mod-stepper-step-selected-font-weight, var(--a2-font-weight-bold));
107
- }._can-navigate_1p8ur_91[data-completed=true]:not(._all-completed_1p8ur_87):not([aria-selected=true]) {
107
+ }._can-navigate_rf27i_91[data-completed=true]:not(._all-completed_rf27i_87):not([aria-selected=true]) {
108
108
  --a2-mod-stepper-step-label-color: var(--a2-foreground-color-primary, light-dark(var(--a2-color-blue-600, #0265dc), var(--a2-color-blue-300, #70b1ff)));
109
109
  --a2-mod-stepper-step-label-text-decoration: underline;
110
110
  cursor: pointer;
111
- }._stepper-step_1p8ur_1[data-completed=true],
112
- ._stepper-step_1p8ur_1._all-completed_1p8ur_87 {
111
+ }._stepper-step_rf27i_1[data-state=started]:not([aria-selected=true]) {
112
+ --a2-mod-stepper-step-bar-width: var(--a2-size-6, 1.5rem);
113
+ --a2-mod-stepper-step-circle-border-style: solid;
114
+ }._stepper-step_rf27i_1[data-completed=true],
115
+ ._stepper-step_rf27i_1._all-completed_rf27i_87 {
113
116
  --a2-mod-stepper-step-bar-transition-delay: 0s;
114
117
  --a2-mod-stepper-step-bar-width: 100%;
115
118
  --a2-mod-stepper-step-check-icon-display: block;
116
119
  --a2-mod-stepper-step-circle-background-color: var(--a2-stepper-step-complete-circle-background-color, var(--a2-status-color-info, light-dark(var(--a2-color-blue-600, #0265dc), var(--a2-color-blue-300, #70b1ff))));
117
120
  --a2-mod-stepper-step-circle-border-color: var(--a2-stepper-step-complete-circle-border-color, var(--a2-status-color-info, light-dark(var(--a2-color-blue-600, #0265dc), var(--a2-color-blue-300, #70b1ff))));
118
121
  --a2-mod-stepper-step-circle-border-style: solid;
119
- }._stepper-step_1p8ur_1:focus-visible,
120
- ._stepper-step_1p8ur_1[data-interactive=focus-visible] {
122
+ }._stepper-step_rf27i_1:focus-visible,
123
+ ._stepper-step_rf27i_1[data-interactive=focus-visible] {
121
124
  --a2-mod-stepper-step-bar-border-radius: var(--a2-border-radius-medium, var(--a2-radius-2, 0.375rem));
122
125
  --a2-mod-stepper-step-bar-outline: var(--a2-size-half, 0.125rem) solid
123
126
  var(--a2-mod-stepper-step-focus-ring-color);
124
127
  --a2-mod-stepper-step-bar-outline-offset: var(--a2-size-half, 0.125rem);
125
128
  }@container stepper (width > 768px) {
126
- ._stepper-step_1p8ur_1 {
129
+ ._stepper-step_rf27i_1 {
127
130
  --a2-mod-stepper-step-bar-height: var(--a2-size-1, 0.25rem);
128
131
  --a2-mod-stepper-step-circle-display: inline-flex;
129
132
  --a2-mod-stepper-step-label-display: flex;
130
133
  }
131
- ._stepper-step_1p8ur_1:focus-visible,
132
- ._stepper-step_1p8ur_1[data-interactive=focus-visible] {
134
+ ._stepper-step_rf27i_1:focus-visible,
135
+ ._stepper-step_rf27i_1[data-interactive=focus-visible] {
133
136
  --a2-mod-stepper-step-bar-border-radius: var(--a2-border-radius-xlarge, var(--a2-radius-8, 1.5rem));
134
137
  --a2-mod-stepper-step-bar-outline: none;
135
138
  --a2-mod-stepper-step-bar-outline-offset: 0;
package/dist/Stepper.js CHANGED
@@ -1,2 +1,2 @@
1
- export { S as Stepper, S as default } from './Stepper-z1y9AfaJ.js';
1
+ export { S as Stepper, a as StepperBase, S as default } from './Stepper-CCKHWlUr.js';
2
2
  //# sourceMappingURL=Stepper.js.map
package/dist/index.js CHANGED
@@ -60,7 +60,7 @@ export { S as SideNav } from './SideNav-BLXgM918.js';
60
60
  export { Skeleton, SkeletonCircle, SkeletonPill, SkeletonRectangle, SkeletonText } from './Skeleton.js';
61
61
  export { S as Spinner } from './Spinner-B7tTWcP6.js';
62
62
  export { S as SrOnly } from './SrOnly-pnf8ajnh.js';
63
- export { S as Stepper } from './Stepper-z1y9AfaJ.js';
63
+ export { S as Stepper, a as StepperBase } from './Stepper-CCKHWlUr.js';
64
64
  export { S as Switch } from './Switch-MfbL3JVk.js';
65
65
  export { T as Tab } from './Tab-Bqfvg8Ce.js';
66
66
  export { T as Text } from './Text-CEJHoh0p.js';
@@ -0,0 +1,114 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { LayoutUtilProps } from '../../../types';
3
+ /**
4
+ * Props for the StepperBase component
5
+ * @extends ComponentPropsWithoutRef<"div">
6
+ * @extends LayoutUtilProps
7
+ */
8
+ export type StepperBaseProps = Omit<ComponentPropsWithoutRef<"div">, "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag"> & LayoutUtilProps & {
9
+ /**
10
+ * Controlled current step (0-based). Pair with onIndexChange.
11
+ */
12
+ index?: number;
13
+ /**
14
+ * Uncontrolled start. Ignored when index is set.
15
+ * @default 0
16
+ */
17
+ defaultIndex?: number;
18
+ /**
19
+ * Fired when a step is activated.
20
+ * @param index The index of the newly current step
21
+ */
22
+ onIndexChange?: (index: number) => void;
23
+ /**
24
+ * When true, click and keyboard can change the current step.
25
+ * @default false
26
+ */
27
+ interactive?: boolean;
28
+ };
29
+ /**
30
+ * StepperBase is a controllable stepper primitive. The caller sets the current
31
+ * step and each step's outcome. Use Stepper for the linear wizard.
32
+ *
33
+ * Features:
34
+ * - Controlled or uncontrolled current step via index / defaultIndex / onIndexChange
35
+ * - Per-step outcome (not started, started, complete) independent of current
36
+ * - Optional panels; a panel names its step, steps do not require panels
37
+ * - Display-only by default; opt into click/keyboard with interactive
38
+ * - Same track, circle, and compact-label chrome as Stepper
39
+ *
40
+ * @example
41
+ * <StepperBase index={2}>
42
+ * <StepperBase.List>
43
+ * <StepperBase.Step state="complete">Approved</StepperBase.Step>
44
+ * <StepperBase.Step state="complete">Approved & Reconciled</StepperBase.Step>
45
+ * <StepperBase.Step>Scheduled</StepperBase.Step>
46
+ * </StepperBase.List>
47
+ * </StepperBase>
48
+ */
49
+ export declare const StepperBase: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart"> & LayoutUtilProps & {
50
+ /**
51
+ * Controlled current step (0-based). Pair with onIndexChange.
52
+ */
53
+ index?: number;
54
+ /**
55
+ * Uncontrolled start. Ignored when index is set.
56
+ * @default 0
57
+ */
58
+ defaultIndex?: number;
59
+ /**
60
+ * Fired when a step is activated.
61
+ * @param index The index of the newly current step
62
+ */
63
+ onIndexChange?: (index: number) => void;
64
+ /**
65
+ * When true, click and keyboard can change the current step.
66
+ * @default false
67
+ */
68
+ interactive?: boolean;
69
+ } & import('react').RefAttributes<HTMLDivElement>> & {
70
+ /**
71
+ * Individual step. Outcome is independent of whether the step is current.
72
+ *
73
+ * Features:
74
+ * - state: not started, started, or complete
75
+ * - Optional id when a panel points at this step
76
+ * - Check icon when complete
77
+ *
78
+ * @example
79
+ * <StepperBase.Step state="complete">Approved</StepperBase.Step>
80
+ */
81
+ Step: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "onClick" | "disabled"> & {
82
+ state?: import('./StepperBaseStep').StepperBaseStepState;
83
+ id?: string;
84
+ disabled?: boolean;
85
+ onClick?: (e: import('react').MouseEvent<HTMLButtonElement>, index?: number) => void;
86
+ } & import('react').RefAttributes<HTMLButtonElement>>;
87
+ /**
88
+ * Track of steps plus the compact label on small widths.
89
+ *
90
+ * Features:
91
+ * - Lays out StepperBase.Step children
92
+ * - Shows the current step label when the track is narrow
93
+ *
94
+ * @example
95
+ * <StepperBase.List>
96
+ * <StepperBase.Step>Scheduled</StepperBase.Step>
97
+ * </StepperBase.List>
98
+ */
99
+ List: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
100
+ /**
101
+ * Content for one step. Visible when that step is current.
102
+ *
103
+ * Features:
104
+ * - step is required and must match a Step id
105
+ * - id is optional and generated when omitted
106
+ *
107
+ * @example
108
+ * <StepperBase.Panel step="approved">Details</StepperBase.Panel>
109
+ */
110
+ Panel: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart"> & LayoutUtilProps & {
111
+ step: string;
112
+ id?: string;
113
+ } & import('react').RefAttributes<HTMLDivElement>>;
114
+ };
@@ -0,0 +1,21 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ /**
3
+ * Props for the StepperBase.List component
4
+ * @extends ComponentPropsWithoutRef<"div">
5
+ */
6
+ export type StepperBaseListProps = ComponentPropsWithoutRef<"div">;
7
+ /**
8
+ * Container for StepperBase steps.
9
+ *
10
+ * Features:
11
+ * - Groups steps in the track
12
+ * - Shows the current step label on small widths
13
+ * - Accessible tablist
14
+ *
15
+ * @example
16
+ * <StepperBase.List>
17
+ * <StepperBase.Step>One</StepperBase.Step>
18
+ * <StepperBase.Step>Two</StepperBase.Step>
19
+ * </StepperBase.List>
20
+ */
21
+ export declare const StepperBaseList: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,40 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { LayoutUtilProps } from '../../../types';
3
+ /**
4
+ * Props for the StepperBase.Panel component
5
+ * @extends ComponentPropsWithoutRef<"div">
6
+ * @extends LayoutUtilProps
7
+ */
8
+ export type StepperBasePanelProps = Omit<ComponentPropsWithoutRef<"div">, "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag"> & LayoutUtilProps & {
9
+ /**
10
+ * id of the controlling Step.
11
+ */
12
+ step: string;
13
+ /**
14
+ * Panel element id. Generated when omitted (used for aria-controls).
15
+ */
16
+ id?: string;
17
+ };
18
+ /**
19
+ * Content panel for a StepperBase step.
20
+ *
21
+ * Features:
22
+ * - Shown only when the named step is current
23
+ * - Fade-in animation
24
+ * - Overflow scrolling for long content
25
+ *
26
+ * @example
27
+ * <StepperBase.Panel step="approved">
28
+ * Details
29
+ * </StepperBase.Panel>
30
+ */
31
+ export declare const StepperBasePanel: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart"> & LayoutUtilProps & {
32
+ /**
33
+ * id of the controlling Step.
34
+ */
35
+ step: string;
36
+ /**
37
+ * Panel element id. Generated when omitted (used for aria-controls).
38
+ */
39
+ id?: string;
40
+ } & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,66 @@
1
+ import { MouseEvent, ComponentPropsWithoutRef } from 'react';
2
+ import { StepperBaseStepState } from './internal/StepperBaseContext';
3
+ export type { StepperBaseStepState };
4
+ /**
5
+ * Props for the StepperBase.Step component
6
+ * @extends ComponentPropsWithoutRef<"button">
7
+ */
8
+ export type StepperBaseStepProps = Omit<ComponentPropsWithoutRef<"button">, "onClick" | "disabled"> & {
9
+ /**
10
+ * Outcome of this step. Independent of whether it is current (index).
11
+ * Current + any state is legal.
12
+ * @default "not started"
13
+ */
14
+ state?: StepperBaseStepState;
15
+ /**
16
+ * Stable id. Required when a Panel points at this step.
17
+ */
18
+ id?: string;
19
+ /**
20
+ * When true, this step cannot become current via click or keyboard.
21
+ * @default false
22
+ */
23
+ disabled?: boolean;
24
+ /**
25
+ * Notify only. Does not replace onIndexChange.
26
+ * @param e Mouse event
27
+ * @param index Index of the step in the list
28
+ */
29
+ onClick?: (e: MouseEvent<HTMLButtonElement>, index?: number) => void;
30
+ };
31
+ /**
32
+ * Individual step for StepperBase.
33
+ *
34
+ * Features:
35
+ * - Outcome independent of the current step
36
+ * - Check icon when complete
37
+ * - Optional id for panel pairing
38
+ *
39
+ * @example
40
+ * <StepperBase.Step id="approved" state="complete">
41
+ * Approved
42
+ * </StepperBase.Step>
43
+ */
44
+ export declare const StepperBaseStep: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "onClick" | "disabled"> & {
45
+ /**
46
+ * Outcome of this step. Independent of whether it is current (index).
47
+ * Current + any state is legal.
48
+ * @default "not started"
49
+ */
50
+ state?: StepperBaseStepState;
51
+ /**
52
+ * Stable id. Required when a Panel points at this step.
53
+ */
54
+ id?: string;
55
+ /**
56
+ * When true, this step cannot become current via click or keyboard.
57
+ * @default false
58
+ */
59
+ disabled?: boolean;
60
+ /**
61
+ * Notify only. Does not replace onIndexChange.
62
+ * @param e Mouse event
63
+ * @param index Index of the step in the list
64
+ */
65
+ onClick?: (e: MouseEvent<HTMLButtonElement>, index?: number) => void;
66
+ } & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,5 @@
1
+ export * from './StepperBase';
2
+ export type { StepperBaseListProps } from './StepperBaseList';
3
+ export type { StepperBaseStepProps, StepperBaseStepState, } from './StepperBaseStep';
4
+ export type { StepperBasePanelProps } from './StepperBasePanel';
5
+ export { StepperBase as default } from './StepperBase';
@@ -0,0 +1,39 @@
1
+ import { RefObject } from 'react';
2
+ /** Per-step outcome. Independent of whether the step is current. */
3
+ export type StepperBaseStepState = "not started" | "started" | "complete";
4
+ export type StepperBaseStepInfo = {
5
+ index: number;
6
+ id?: string;
7
+ label: string;
8
+ disabled: boolean;
9
+ node: RefObject<HTMLButtonElement | null>;
10
+ };
11
+ export type StepperBaseContextValue = {
12
+ currentIndex: number;
13
+ interactive: boolean;
14
+ focusIndex: number;
15
+ setFocusIndex: (index: number) => void;
16
+ requestIndexChange: (index: number) => void;
17
+ registerStep: (info: StepperBaseStepInfo) => () => void;
18
+ getStep: (index: number) => StepperBaseStepInfo | undefined;
19
+ getCurrentStep: () => StepperBaseStepInfo | undefined;
20
+ getPanelId: (stepId: string) => string | undefined;
21
+ registerPanel: (stepId: string, panelId: string) => () => void;
22
+ };
23
+ export declare const StepperBaseContext: import('react').Context<StepperBaseContextValue>;
24
+ /**
25
+ * Hands out 0-based indices in render order, so steps work inside fragments and
26
+ * wrapper components rather than only as direct List children. Each render of
27
+ * StepperStepIndexScope starts a new pass.
28
+ */
29
+ export type StepperBaseStepIndexPass = {
30
+ allocate: () => number;
31
+ };
32
+ export declare const StepperBaseStepIndexPassContext: import('react').Context<StepperBaseStepIndexPass | null>;
33
+ /**
34
+ * Index of the calling step, or undefined when it renders outside a List.
35
+ *
36
+ * A step allocates at most once per pass, so it keeps its index when it
37
+ * re-renders alone and when StrictMode renders it twice.
38
+ */
39
+ export declare function useStepperStepIndex(): number | undefined;
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function StepperStepIndexScope({ children }: {
3
+ children: ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -6,3 +6,4 @@ export type { StepperPanelProps } from './StepperPanel';
6
6
  export type { StepperPrevButtonProps } from './StepperPrevButton';
7
7
  export type { StepperStepProps } from './StepperStep';
8
8
  export { Stepper as default } from './Stepper';
9
+ export * from './base';
@@ -7,7 +7,6 @@ export type StepperContextProps = {
7
7
  focus: number;
8
8
  setFocus: Dispatch<SetStateAction<number>>;
9
9
  onComplete?: () => void;
10
- items?: NodeListOf<HTMLElement>;
11
10
  allCompleted?: boolean;
12
11
  setAllCompleted?: Dispatch<SetStateAction<boolean>>;
13
12
  allowNavigateToPrevStep?: boolean;
@@ -0,0 +1,3 @@
1
+ export declare function StepperWizardBootstrap({ defaultIndex, }: {
2
+ defaultIndex?: number;
3
+ }): null;
@@ -0,0 +1,2 @@
1
+ import { StepperBaseContextValue } from '../base/internal/StepperBaseContext';
2
+ export declare function countRegisteredSteps(getStep: StepperBaseContextValue["getStep"]): number;