@servicetitan/anvil2 1.49.0 → 1.49.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{Calendar-B7ypKGUn.js → Calendar-BkJs1qTF.js} +55 -65
  3. package/dist/Calendar-BkJs1qTF.js.map +1 -0
  4. package/dist/{Calendar-1MhJ03iy.js → Calendar-WHERvu2Y.js} +2 -2
  5. package/dist/{Calendar-1MhJ03iy.js.map → Calendar-WHERvu2Y.js.map} +1 -1
  6. package/dist/Calendar.css +52 -51
  7. package/dist/Calendar.js +2 -2
  8. package/dist/{DateField-C5rA3USK.js → DateField-BNleIuS8.js} +4 -4
  9. package/dist/{DateField-C5rA3USK.js.map → DateField-BNleIuS8.js.map} +1 -1
  10. package/dist/DateField.js +1 -1
  11. package/dist/{DateFieldRange-BLfEH-oC.js → DateFieldRange-BBgvno-_.js} +8 -5
  12. package/dist/{DateFieldRange-BLfEH-oC.js.map → DateFieldRange-BBgvno-_.js.map} +1 -1
  13. package/dist/DateFieldRange.js +1 -1
  14. package/dist/{DateFieldSingle-7Cx_FMtb.js → DateFieldSingle-Bcwkxogy.js} +8 -5
  15. package/dist/{DateFieldSingle-7Cx_FMtb.js.map → DateFieldSingle-Bcwkxogy.js.map} +1 -1
  16. package/dist/DateFieldSingle.js +1 -1
  17. package/dist/{DateFieldYearless-D2uo-uqE.js → DateFieldYearless-DnVJaBBq.js} +2 -1
  18. package/dist/{DateFieldYearless-D2uo-uqE.js.map → DateFieldYearless-DnVJaBBq.js.map} +1 -1
  19. package/dist/DateFieldYearless.js +1 -1
  20. package/dist/Dnd.js +1 -1
  21. package/dist/DndSort.js +3 -2
  22. package/dist/DndSort.js.map +1 -1
  23. package/dist/{InputMask-fS5nqXdI.js → InputMask-Cd01c3Tj.js} +2 -2
  24. package/dist/{InputMask-fS5nqXdI.js.map → InputMask-Cd01c3Tj.js.map} +1 -1
  25. package/dist/InputMask.js +1 -1
  26. package/dist/{SegmentedControl-C-QOwO7q.js → SegmentedControl-DK1cwC7A.js} +11 -2
  27. package/dist/SegmentedControl-DK1cwC7A.js.map +1 -0
  28. package/dist/SegmentedControl.js +1 -1
  29. package/dist/{Stepper-B0U_YrbZ.js → Stepper-BZr9ytpD.js} +4 -1
  30. package/dist/Stepper-BZr9ytpD.js.map +1 -0
  31. package/dist/Stepper.js +1 -1
  32. package/dist/{Switch-DjL2CsQi.js → Switch-BXDPs2mD.js} +4 -2
  33. package/dist/Switch-BXDPs2mD.js.map +1 -0
  34. package/dist/Switch.js +1 -1
  35. package/dist/{TextField-DOSwy_gm.js → TextField-CpVkZxMT.js} +2 -2
  36. package/dist/{TextField-DOSwy_gm.js.map → TextField-CpVkZxMT.js.map} +1 -1
  37. package/dist/{TextField-DcyjojNg.js → TextField-CygbgVVt.js} +3 -2
  38. package/dist/TextField-CygbgVVt.js.map +1 -0
  39. package/dist/TextField.js +1 -1
  40. package/dist/{TimeField-C4s8fjDG.js → TimeField-BkOB5ESa.js} +3 -2
  41. package/dist/{TimeField-C4s8fjDG.js.map → TimeField-BkOB5ESa.js.map} +1 -1
  42. package/dist/TimeField.js +1 -1
  43. package/dist/{Toolbar-BvFwcXOk.js → Toolbar-XcfHQftc.js} +4 -4
  44. package/dist/{Toolbar-BvFwcXOk.js.map → Toolbar-XcfHQftc.js.map} +1 -1
  45. package/dist/Toolbar.js +1 -1
  46. package/dist/beta.js +3 -3
  47. package/dist/components/Dnd/DndHandleButton.d.ts +2 -1
  48. package/dist/{index-B25zeBIC.js → index-ByS9WvPk.js} +2 -1
  49. package/dist/index-ByS9WvPk.js.map +1 -0
  50. package/dist/index.js +12 -12
  51. package/dist/{utils-B8bmyfFR.js → utils-aSAOVHjX.js} +2 -2
  52. package/dist/{utils-B8bmyfFR.js.map → utils-aSAOVHjX.js.map} +1 -1
  53. package/package.json +1 -1
  54. package/dist/Calendar-B7ypKGUn.js.map +0 -1
  55. package/dist/SegmentedControl-C-QOwO7q.js.map +0 -1
  56. package/dist/Stepper-B0U_YrbZ.js.map +0 -1
  57. package/dist/Switch-DjL2CsQi.js.map +0 -1
  58. package/dist/TextField-DcyjojNg.js.map +0 -1
  59. package/dist/index-B25zeBIC.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"SegmentedControl-C-QOwO7q.js","sources":["../src/components/SegmentedControl/internal/SegmentedControlContext.ts","../src/components/SegmentedControl/SegmentedControlSegment.tsx","../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import { createContext } from \"react\";\n\nimport { SegmentedControlSegmentProps } from \"../SegmentedControlSegment\";\nimport { SegmentedControlProps } from \"../SegmentedControl\";\n\n/**\n * Context props for SegmentedControl internal state management\n */\nexport type SegmentedControlContextProps = {\n /**\n * Currently selected segment value\n */\n current?: SegmentedControlSegmentProps[\"value\"];\n /**\n * Function to set the current segment\n */\n setCurrent?: (value: SegmentedControlSegmentProps[\"value\"]) => void;\n /**\n * Change handler for the segmented control\n */\n onChange?: SegmentedControlProps[\"onChange\"];\n /**\n * Name attribute for radio inputs\n */\n name?: string;\n};\n\nexport const SegmentedControlContext =\n createContext<SegmentedControlContextProps>({});\n","import {\n useContext,\n useRef,\n forwardRef,\n ComponentPropsWithoutRef,\n} from \"react\";\nimport cx from \"classnames\";\nimport { core } from \"@servicetitan/hammer-token\";\n\nimport { DataTrackingId } from \"../../types\";\nimport { Icon, IconProps } from \"../Icon\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { useMergeRefs, useTrackingId } from \"../../hooks\";\n\nimport { SegmentedControlContext } from \"./internal/SegmentedControlContext\";\n\nimport styles from \"./SegmentedControl.module.scss\";\n\n/**\n * State object returned by segment interactions\n */\nexport type SegmentState = {\n /**\n * Whether the segment is checked\n */\n checked: boolean;\n /**\n * The value of the segment\n */\n value?: SegmentedControlSegmentProps[\"value\"];\n};\n\n/**\n * Props for the SegmentedControlSegment component\n * @extends ComponentPropsWithoutRef<\"label\">\n */\nexport type SegmentedControlSegmentProps = ComponentPropsWithoutRef<\"label\"> & {\n /**\n * Optional icon to display in the segment\n */\n icon?: IconProps[\"svg\"];\n /**\n * Value of the segment\n */\n value: string;\n /**\n * The content to display in the segment\n */\n children?: React.ReactNode;\n} & DataTrackingId;\n\n/**\n * SegmentedControlSegment component for individual segments within a segmented control.\n *\n * Features:\n * - Individual segment with radio input\n * - Optional icon support\n * - Animated selection indicator\n * - Accessibility support with proper ARIA attributes\n * - Context integration with parent SegmentedControl\n * - Motion animations with reduced motion support\n * - Icon-only mode when no children provided\n * - Data tracking id support\n *\n * @example\n * <SegmentedControl.Segment value=\"option1\" icon={Icon1}>\n * Option 1\n * </SegmentedControl.Segment>\n *\n * @example\n * <SegmentedControl.Segment value=\"icon-only\" icon={IconOnly} />\n */\nexport const SegmentedControlSegment = forwardRef<\n HTMLLabelElement,\n SegmentedControlSegmentProps\n>((props, ref) => {\n const { icon, value, children, className, ...rest } = props;\n const shouldReduceMotion = useReducedMotion();\n const { current, setCurrent, name } = useContext(SegmentedControlContext);\n const labelRef = useRef<HTMLSpanElement>(null);\n\n const classNames = cx(styles.segment, className, {\n [styles[\"icon-only\"]]: icon && !children,\n });\n\n const data = {\n value: props.value,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControlSegment\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return (\n <>\n <label\n className={classNames}\n ref={useMergeRefs([labelRef, ref])}\n data-tracking-id={trackingId}\n data-anv=\"segmented-control-segment\"\n {...rest}\n >\n <input\n type=\"radio\"\n name={name}\n value={value}\n onChange={() => setCurrent?.(value)}\n checked={current === value}\n aria-checked={current === value}\n />\n {icon ? <Icon svg={icon} aria-hidden /> : null}\n {children}\n {current === value && (\n <motion.span\n layoutId={name}\n className={styles[\"select-indicator\"]}\n transition={{\n duration: shouldReduceMotion\n ? 0\n : +core.primitive.Duration.value.replace(\"ms\", \"\") / 1000,\n }}\n />\n )}\n </label>\n </>\n );\n});\n\nSegmentedControlSegment.displayName = \"SegmentedControlSegment\";\n","import { forwardRef, useId, ComponentPropsWithoutRef, useRef } from \"react\";\nimport cx from \"classnames\";\nimport { motion } from \"motion/react\";\n\nimport { DataTrackingId, LayoutUtilProps, Size } from \"../../types\";\nimport { useMergeRefs, useTrackingId } from \"../../hooks\";\nimport { useOptionallyControlledState } from \"../../internal/hooks\";\n\nimport { SegmentedControlContext } from \"./internal/SegmentedControlContext\";\nimport {\n SegmentedControlSegment,\n SegmentedControlSegmentProps,\n} from \"./SegmentedControlSegment\";\n\nimport styles from \"./SegmentedControl.module.scss\";\n\n/**\n * Base props for SegmentedControl component\n * @extends Omit<ComponentPropsWithoutRef<\"div\">, \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\" | \"onChange\">\n * @extends LayoutUtilProps\n */\ntype BaseSegmentedControlProps = Omit<\n ComponentPropsWithoutRef<\"div\">,\n \"onAnimationStart\" | \"onDragStart\" | \"onDragEnd\" | \"onDrag\" | \"onChange\"\n> &\n LayoutUtilProps &\n DataTrackingId & {\n /**\n * Callback when segment is changed\n */\n onChange?: (value: SegmentedControlSegmentProps[\"value\"]) => void;\n\n /**\n * Size of the segment\n * @default \"medium\"\n */\n size?: Extract<Size, \"small\" | \"medium\">;\n\n /**\n * Whether to fill available width\n * @default false\n */\n fill?: boolean;\n\n /**\n * Name attribute for radio inputs\n * @remarks If empty, it will auto generate one using useId()\n */\n name?: string;\n\n /**\n * The segments to render within the segmented control\n */\n children?: React.ReactNode;\n };\n\n/**\n * Props for controlled SegmentedControl\n */\ntype ControlledSegmentedControlProps = BaseSegmentedControlProps & {\n /**\n * Selected segment (controlled mode)\n */\n selected: SegmentedControlSegmentProps[\"value\"];\n defaultSelected?: never;\n};\n\n/**\n * Props for uncontrolled SegmentedControl\n */\ntype UncontrolledSegmentedControlProps = BaseSegmentedControlProps & {\n /**\n * Initial selection (uncontrolled mode)\n */\n defaultSelected: SegmentedControlSegmentProps[\"value\"];\n selected?: never;\n};\n\n/**\n * Props for the SegmentedControl component\n */\nexport type SegmentedControlProps =\n | ControlledSegmentedControlProps\n | UncontrolledSegmentedControlProps;\n\nconst SegmentedControlElement = forwardRef<\n HTMLDivElement,\n SegmentedControlProps\n>((props, ref) => {\n const {\n className,\n onClick,\n onChange,\n children,\n size = \"medium\",\n defaultSelected,\n selected,\n name,\n fill,\n ...rest\n } = props;\n\n const [current, setCurrent] = useOptionallyControlledState({\n controlledValue: selected,\n defaultValue: defaultSelected,\n onChange,\n });\n\n const segmentedControlRef = useRef<HTMLDivElement>(null);\n\n const SegmentedControlClassNames = cx(\n styles[\"segmented-control\"],\n styles[size],\n className,\n {\n [styles.fill]: fill,\n },\n );\n\n const uid = useId();\n\n const data = {\n name: props.name,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControl\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return (\n <motion.div\n transition={{ duration: 0 }}\n layout\n role=\"radiogroup\"\n className={SegmentedControlClassNames}\n data-anv=\"segmented-control\"\n data-tracking-id={trackingId}\n ref={useMergeRefs([segmentedControlRef, ref])}\n {...rest}\n >\n <SegmentedControlContext.Provider\n value={{ current, setCurrent, name: name ?? uid }}\n >\n {children}\n </SegmentedControlContext.Provider>\n </motion.div>\n );\n});\n\nSegmentedControlElement.displayName = \"SegmentedControl\";\n\n/**\n * SegmentedControl component for selecting one option from a group of related choices.\n *\n * Features:\n * - Supports both controlled and uncontrolled modes\n * - Multiple size variants (small, medium)\n * - Optional fill width mode\n * - Smooth animations with motion\n * - Accessibility support with proper radio group semantics\n * - Layout utility props for positioning and spacing\n * - Context-based state management\n * - Auto-generated or custom name attributes\n * - Segment support via SegmentedControl.Segment\n * - Data tracking id support\n *\n * @example\n * <SegmentedControl\n * selected={selectedValue}\n * onChange={setSelectedValue}\n * size=\"medium\"\n * >\n * <SegmentedControl.Segment value=\"option1\">Option 1</SegmentedControl.Segment>\n * <SegmentedControl.Segment value=\"option2\">Option 2</SegmentedControl.Segment>\n * <SegmentedControl.Segment value=\"option3\">Option 3</SegmentedControl.Segment>\n * </SegmentedControl>\n *\n * @example\n * <SegmentedControl\n * defaultSelected=\"small\"\n * size=\"small\"\n * fill\n * >\n * <SegmentedControl.Segment value=\"small\" icon={SmallIcon}>Small</SegmentedControl.Segment>\n * <SegmentedControl.Segment value=\"large\" icon={LargeIcon}>Large</SegmentedControl.Segment>\n * </SegmentedControl>\n */\nexport const SegmentedControl = Object.assign(SegmentedControlElement, {\n /**\n * SegmentedControlSegment component for individual segments within a segmented control.\n *\n * Features:\n * - Individual segment with radio input\n * - Optional icon support\n * - Animated selection indicator\n * - Accessibility support with proper ARIA attributes\n * - Context integration with parent SegmentedControl\n * - Motion animations with reduced motion support\n *\n * @example\n * <SegmentedControl.Segment value=\"option1\" icon={Icon1}>\n * Option 1\n * </SegmentedControl.Segment>\n */\n Segment: SegmentedControlSegment,\n});\n\nexport default SegmentedControl;\n"],"names":["core.primitive.Duration"],"mappings":";;;;;;;;;;;AA2BO,MAAM,uBAAA,GACX,aAAA,CAA4C,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;AC4CzC,MAAM,uBAAA,GAA0B,UAAA,CAGrC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAChB,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,UAAU,SAAA,EAAW,GAAG,MAAK,GAAI,KAAA;AACtD,EAAA,MAAM,qBAAqB,gBAAA,EAAiB;AAC5C,EAAA,MAAM,EAAE,OAAA,EAAS,UAAA,EAAY,IAAA,EAAK,GAAI,WAAW,uBAAuB,CAAA;AACxE,EAAA,MAAM,QAAA,GAAW,OAAwB,IAAI,CAAA;AAE7C,EAAA,MAAM,UAAA,GAAa,EAAA,CAAG,MAAA,CAAO,OAAA,EAAS,SAAA,EAAW;AAAA,IAC/C,CAAC,MAAA,CAAO,WAAW,CAAC,GAAG,QAAQ,CAAC;AAAA,GACjC,CAAA;AAED,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,OA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,MACT,kBAAA,EAAkB,UAAA;AAAA,MAClB,GAAA,EAAK,YAAA,CAAa,CAAC,mBAAA,EAAqB,GAAG,CAAC,CAAA;AAAA,MAC3C,GAAG,IAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA;AAAA,QAAC,uBAAA,CAAwB,QAAA;AAAA,QAAxB;AAAA,UACC,OAAO,EAAE,OAAA,EAAS,UAAA,EAAY,IAAA,EAAM,QAAQ,GAAA,EAAI;AAAA,UAE/C;AAAA;AAAA;AACH;AAAA,GACF;AAEJ,CAAC,CAAA;AAED,uBAAA,CAAwB,WAAA,GAAc,kBAAA;AAsC/B,MAAM,gBAAA,GAAmB,MAAA,CAAO,MAAA,CAAO,uBAAA,EAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBrE,OAAA,EAAS;AACX,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stepper-B0U_YrbZ.js","sources":["../src/components/Stepper/internal/StepperContext.ts","../src/components/Stepper/StepperList.tsx","../src/components/Stepper/StepperStep.tsx","../src/components/Stepper/StepperPanel.tsx","../src/components/Stepper/StepperFinalPanel.tsx","../src/components/Stepper/StepperNextButton.tsx","../src/components/Stepper/StepperPrevButton.tsx","../src/components/Stepper/Stepper.tsx"],"sourcesContent":["import { Dispatch, 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 items?: NodeListOf<HTMLElement>;\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 { ComponentPropsWithoutRef, forwardRef, useContext } from \"react\";\nimport cx from \"classnames\";\n\nimport { StepperContext } from \"./internal/StepperContext\";\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, ...rest } = props;\n const { current, items } = useContext(StepperContext);\n\n const tabListClassNames = cx(styles[\"stepper-list\"], className);\n const currentLabel =\n items?.[current].querySelectorAll(\"span\")[1].textContent;\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\"]}>{children}</div>\n <span className={styles.label}>{currentLabel}</span>\n </div>\n );\n },\n);\n\nStepperList.displayName = \"StepperList\";\n","import {\n forwardRef,\n useContext,\n MouseEvent,\n useRef,\n ComponentPropsWithoutRef,\n useEffect,\n useState,\n KeyboardEvent,\n} from \"react\";\nimport cx from \"classnames\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check.svg\";\n\nimport { Icon } from \"../Icon\";\nimport { StepperContext } from \"./internal/StepperContext\";\nimport { useMergeRefs } from \"../../hooks\";\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 {\n current,\n items,\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 ...rest\n } = props;\n\n const index = useRef<number>();\n const [selected, setSelected] = useState(false);\n const [completed, setCompleted] = useState(\n // Below is to be used for custom overriding\n // completed state for a step\n // Check Stepper.stories.tsx#103 for the use case\n stepRef.current?.getAttribute(\"data-completed\") === \"true\"\n ? true\n : undefined,\n );\n\n useEffect(() => {\n if (!items) return;\n index.current = Array.prototype.indexOf.call(items, stepRef.current);\n\n setCompleted(index.current < current);\n setSelected(index.current === current);\n }, [current, items]);\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.current);\n if (\n !allowNavigateToPrevStep ||\n selected ||\n index.current === undefined ||\n !items ||\n index.current > current\n ) {\n return;\n }\n setCurrent(index.current ?? 0);\n setFocus(index.current);\n items[index.current].focus();\n };\n\n const onKeyDownHandler = (e: KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e);\n const focusableItems = Array.prototype.filter.call(\n items,\n (item) =>\n item.getAttribute(\"data-completed\") === \"true\" ||\n item.getAttribute(\"aria-selected\") === \"true\",\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 focusableItems[0].setAttribute(\"tabindex\", \"0\");\n stepRef.current?.setAttribute(\"tabindex\", \"-1\");\n return;\n }\n stepRef.current?.setAttribute(\"tabindex\", \"-1\");\n setFocus(nextFocus);\n focusableItems[nextFocus].focus();\n focusableItems[nextFocus].setAttribute(\"tabindex\", \"0\");\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 focusableItems[lastItemIndex].setAttribute(\"tabindex\", \"0\");\n stepRef.current?.setAttribute(\"tabindex\", \"-1\");\n return;\n }\n stepRef.current?.setAttribute(\"tabindex\", \"-1\");\n setFocus(prevFocus);\n focusableItems[prevFocus].focus();\n focusableItems[prevFocus].setAttribute(\"tabindex\", \"0\");\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 tabIndex={allowNavigateToPrevStep && selected ? 0 : -1}\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 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 { LayoutUtilProps } from \"../../types\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\nimport { Overflow } from \"../Overflow\";\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 { current, items, allCompleted, setCurrentId } =\n useContext(StepperContext);\n\n const currentId = items?.[current].getAttribute(\"aria-controls\");\n const isCurrent = currentId === id;\n\n useEffect(() => {\n if (isCurrent && !allCompleted) {\n setCurrentId(currentId ?? \"\");\n }\n }, [allCompleted, isCurrent, currentId, 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 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 { 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 { forwardRef, useContext, MouseEvent } from \"react\";\n\nimport { Button, ButtonProps } from \"../Button\";\nimport { DataTrackingId } from \"../../types\";\nimport { useTrackingId } from \"../../hooks\";\n\nimport { StepperContext } from \"./internal/StepperContext\";\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 items,\n current,\n allCompleted,\n } = useContext(StepperContext);\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 (items && current === items.length - 1) {\n items.forEach((item) => item.setAttribute(\"tabindex\", \"-1\"));\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 {items && current === items.length - 1 ? completeLabel : nextLabel}\n </Button>\n );\n});\n\nStepperNextButton.displayName = \"StepperNextButton\";\n","import { forwardRef, useContext, MouseEvent } from \"react\";\n\nimport { DataTrackingId } from \"../../types\";\nimport { Button, 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 {\n setCurrent,\n setFocus,\n allCompleted,\n setAllCompleted,\n items,\n current,\n allowNavigateToPrevStep,\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 if (allowNavigateToPrevStep) {\n items?.[current].setAttribute(\"tabindex\", \"0\");\n }\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 {\n ComponentPropsWithoutRef,\n forwardRef,\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 { LayoutUtilProps } from \"../../types\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\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\";\n\nimport styles from \"./Stepper.module.scss\";\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.\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\nconst StepperElement = forwardRef<HTMLDivElement, StepperProps>(\n (props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n defaultIndex,\n className,\n allowNavigateToPrevStep,\n children,\n onChange,\n onComplete,\n style,\n ...rest\n } = componentProps;\n const tabRef = useRef<HTMLDivElement>(null);\n const [items, setItems] = useState<NodeListOf<HTMLElement>>();\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 const stepperClassNames = cx(styles[\"stepper\"], className);\n\n useEffect(() => {\n setItems(tabRef.current?.querySelectorAll(\"[role=tab]:not([disabled])\"));\n }, []);\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 styleCombined = { ...style, ...layoutStyles };\n\n const value = useMemo(\n () => ({\n current,\n setCurrent,\n currentId,\n setCurrentId,\n focus,\n setFocus,\n onComplete,\n items,\n allCompleted,\n setAllCompleted,\n allowNavigateToPrevStep,\n }),\n [\n current,\n currentId,\n focus,\n onComplete,\n items,\n allCompleted,\n setAllCompleted,\n allowNavigateToPrevStep,\n ],\n );\n\n return (\n <StepperContext.Provider value={value}>\n <motion.div\n transition={{ duration: 0 }}\n layout\n className={stepperClassNames}\n data-anv=\"stepper\"\n style={styleCombined}\n {...rest}\n ref={useMergeRefs([tabRef, ref])}\n >\n {children}\n </motion.div>\n </StepperContext.Provider>\n );\n },\n);\n\nStepperElement.displayName = \"Stepper\";\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(StepperElement, {\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"],"names":["styles","Check","core.primitive.DurationSlow"],"mappings":";;;;;;;;;;;;;AAgBO,MAAM,iBAAiB,aAAA,CAAmC;AAAA,EAC/D,OAAA,EAAS,CAAA;AAAA,EACT,SAAA,EAAW,EAAA;AAAA,EACX,KAAA,EAAO,CAAA;AAAA,EACP,UAAU,MAAM,MAAA;AAAA,EAChB,YAAY,MAAM,MAAA;AAAA,EAClB,cAAc,MAAM;AACtB,CAAC,CAAA;;;;;;;;;ACWM,MAAM,WAAA,GAAc,UAAA;AAAA,EACzB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,SAAA,EAAW,QAAA,EAAU,SAAA,EAAW,GAAG,MAAK,GAAI,KAAA;AACpD,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAM,GAAI,WAAW,cAAc,CAAA;AAEpD,IAAA,MAAM,iBAAA,GAAoB,EAAA,CAAGA,QAAA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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBZ,UAAA,EAAY;AACd,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Switch-DjL2CsQi.js","sources":["../src/components/Switch/Switch.tsx"],"sourcesContent":["import {\n ChangeEvent,\n ComponentPropsWithoutRef,\n ReactElement,\n Ref,\n forwardRef,\n useId,\n} from \"react\";\nimport { useTrackingId } from \"../../hooks\";\nimport { DataTrackingId, LayoutUtilProps } from \"../../types\";\nimport { childrenToString } from \"../../internal/functions\";\nimport { useLayoutPropsUtil } from \"../../internal/hooks\";\nimport Check from \"@servicetitan/hammer-icon/mdi/round/check.svg\";\nimport Icon from \"../Icon\";\nimport Flex from \"../Flex\";\nimport { Helper } from \"../../internal/components\";\n\nimport cx from \"classnames\";\nimport styles from \"./Switch.module.scss\";\n\n/**\n * State object returned by the Switch onChange callback\n */\nexport type SwitchState = {\n /**\n * Whether the switch is currently checked\n */\n checked: boolean;\n /**\n * The value of the switch input\n */\n value?: string | number | readonly string[];\n};\n\n/**\n * Props for the Switch component\n * @extends ComponentPropsWithoutRef<\"input\">\n * @extends LayoutUtilProps\n */\nexport type SwitchProps = Omit<ComponentPropsWithoutRef<\"input\">, \"onChange\"> &\n LayoutUtilProps & {\n /**\n * Callback when switch is changed.\n * @param e Change event object\n * @param state Current switch state with checked status and value\n */\n onChange?: (e: ChangeEvent<HTMLInputElement>, state: SwitchState) => void;\n\n /**\n * Label for the switch.\n * @remarks This should either be a string or have text content inside for accessibility\n */\n label?: ReactElement | string;\n\n /**\n * Description text to display below the label\n */\n description?: string;\n } & DataTrackingId;\n\n/**\n * Switch component for toggling between on/off states.\n *\n * Features:\n * - Toggle switch with smooth animations\n * - Check icon indicator when active\n * - Accessible with proper ARIA roles and attributes\n * - Keyboard navigation support (Space/Enter)\n * - Controlled and uncontrolled state management\n * - Customizable label and styling\n * - Layout utilities for positioning and spacing\n * - Focus management with visible focus indicators\n * - Hover states and visual feedback\n * - Disabled state support\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Switch\n * label=\"Enable notifications\"\n * onChange={(e, state) => console.log('Switch toggled:', state.checked)}\n * />\n */\nexport const Switch = forwardRef(\n (props: SwitchProps, ref: Ref<HTMLInputElement>) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n label,\n description,\n className,\n onChange,\n checked,\n defaultChecked,\n value,\n style,\n ...rest\n } = componentProps;\n\n const helperUid = useId();\n\n const onChangeHandler = (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e, { value, checked: e.target.checked });\n };\n\n const data = {\n label: childrenToString(label),\n ariaLabel: rest[\"aria-label\"],\n ariaLabelledBy: rest[\"aria-labelledby\"],\n value,\n };\n\n const trackingId = useTrackingId({\n name: \"Switch\",\n data,\n hasOverride: !!rest[\"data-tracking-id\"],\n });\n\n const switchClassNames = cx(styles[\"switch\"], className);\n\n const styleCombined = {\n ...style,\n ...layoutStyles,\n alignItems: description ? \"flex-start\" : \"center\",\n };\n\n return (\n <label className={switchClassNames} style={styleCombined}>\n <input\n data-tracking-id={trackingId}\n data-anv=\"switch\"\n ref={ref}\n type=\"checkbox\"\n role=\"switch\"\n value={value}\n aria-checked={checked ?? defaultChecked}\n checked={checked}\n defaultChecked={defaultChecked}\n onChange={onChangeHandler}\n {...rest}\n />\n <span aria-hidden className={styles[\"toggle\"]}>\n <span className={styles[\"indicator\"]}>\n <Icon svg={Check} className={styles[\"check\"]} />\n </span>\n </span>\n {label || description ? (\n <Flex direction=\"column\" gap={1}>\n {label && label}\n {description && <Helper id={helperUid} description={description} />}\n </Flex>\n ) : null}\n </label>\n );\n },\n);\n\nSwitch.displayName = \"Switch\";\n"],"names":["Check"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkFO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAoB,GAAA,KAA+B;AAClD,IAAA,MAAM,EAAE,YAAA,EA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A,IAAA,EAAK,UAAA;AAAA,UACL,IAAA,EAAK,QAAA;AAAA,UACL,KAAA;AAAA,UACA,gBAAc,OAAA,IAAW,cAAA;AAAA,UACzB,OAAA;AAAA,UACA,cAAA;AAAA,UACA,QAAA,EAAU,eAAA;AAAA,UACT,GAAG;AAAA;AAAA,OACN;AAAA,sBACA,GAAA,CAAC,UAAK,aAAA,EAAW,IAAA,EAAC,WAAW,MAAA,CAAO,QAAQ,CAAA,EAC1C,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAO,WAAW,CAAA,EACjC,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,GAAA,EAAKA,QAAA,EAAO,WAAW,MAAA,CAAO,OAAO,CAAA,EAAG,CAAA,EAChD,CAAA,EACF,CAAA;AAAA,MACC,SAAS,WAAA,mBACR,IAAA,CAAC,QAAK,SAAA,EAAU,QAAA,EAAS,KAAK,CAAA,EAC3B,QAAA,EAAA;AAAA,QAAA,KAAA,IAAS,KAAA;AAAA,QACT,WAAA,oBAAe,GAAA,CAAC,MAAA,EAAA,EAAO,EAAA,EAAI,WAAW,WAAA,EAA0B;AAAA,OAAA,EACnE,CAAA,GACE;AAAA,KAAA,EACN,CAAA;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextField-DcyjojNg.js","sources":["../src/components/TextField/internal/TextField.tsx"],"sourcesContent":["import {\n ChangeEventHandler,\n ComponentPropsWithoutRef,\n FocusEventHandler,\n ReactElement,\n ReactNode,\n Ref,\n forwardRef,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useTrackingId, useMergeRefs } from \"../../../hooks\";\nimport {\n DataTrackingId,\n LayoutUtilProps,\n Size,\n MaxLengthCounterProps,\n} from \"../../../types\";\nimport {\n useLayoutPropsUtil,\n useOptionallyControlledState,\n} from \"../../../internal/hooks\";\nimport { Helper, HelperProps } from \"../../../internal/components\";\nimport { Spinner } from \"../../Spinner\";\nimport styles from \"../TextField.module.scss\";\nimport cx from \"classnames\";\nimport { FieldLabel, FieldLabelProps } from \"../../FieldLabel\";\nimport { childrenToString } from \"../../../internal/functions\";\n\nexport type TextFieldProps = Omit<\n ComponentPropsWithoutRef<\"input\">,\n \"size\" | \"prefix\"\n> &\n LayoutUtilProps & {\n error?: ReactElement | string | boolean;\n label?: FieldLabelProps[\"children\"];\n prefix?: string | ReactElement;\n suffix?: string | ReactElement;\n size?: Extract<Size, \"small\" | \"medium\" | \"large\">;\n type?: \"text\" | \"email\" | \"tel\" | \"url\" | \"password\" | \"number\";\n description?: HelperProps[\"description\"];\n errorAriaLive?: HelperProps[\"errorAriaLive\"];\n hint?: HelperProps[\"hint\"];\n loading?: boolean;\n disabled?: boolean;\n labelProps?: FieldLabelProps;\n moreInfo?: ReactNode;\n } & MaxLengthCounterProps &\n DataTrackingId;\n\nexport const TextField = forwardRef(\n (props: TextFieldProps, ref: Ref<HTMLInputElement>) => {\n const data = {\n label: childrenToString(props.label),\n labelProps: props.labelProps,\n prefix: childrenToString(props.prefix),\n hint: childrenToString(props.hint),\n description: childrenToString(props.description),\n size: props.size,\n type: props.type,\n };\n\n const trackingId = useTrackingId({\n name: \"TextField\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n className,\n error,\n errorAriaLive: errorAriaLiveProp = \"assertive\",\n defaultValue: defaultValueProp,\n value: valueProp,\n label,\n moreInfo,\n prefix,\n suffix,\n size,\n type = \"text\",\n required,\n onChange,\n onFocus,\n onBlur,\n id: idProp,\n description,\n hint,\n showCounter,\n maxLength,\n loading,\n disabled,\n labelProps,\n style,\n placeholder,\n ...rest\n } = componentProps;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const [isTyping, setIsTyping] = useState(false);\n const [openInfo, setOpenInfo] = useState(false);\n const [errorAriaLive, setErrorAriaLive] =\n useState<HelperProps[\"errorAriaLive\"]>(\"off\");\n\n // Use the optionally controlled state for value\n const [value, setValue] = useOptionallyControlledState<typeof valueProp>({\n controlledValue: valueProp,\n defaultValue: defaultValueProp,\n });\n\n const length = useMemo(() => {\n if (\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n Array.isArray(value)\n ) {\n return String(value).length;\n }\n return 0;\n }, [value]);\n\n const onChangeHandler: ChangeEventHandler<HTMLInputElement> = (e) => {\n setValue(e.target.value);\n onChange?.(e);\n if (!isTyping) {\n setIsTyping(true);\n }\n };\n\n const focusHandler: FocusEventHandler<HTMLInputElement> = (e) => {\n onFocus?.(e);\n setOpenInfo(true);\n setErrorAriaLive(errorAriaLiveProp);\n };\n\n const blurHandler: FocusEventHandler<HTMLInputElement> = (e) => {\n onBlur?.(e);\n setOpenInfo(false);\n setErrorAriaLive(\"off\");\n if (isTyping) {\n setIsTyping(false);\n }\n };\n\n const labelUid = useId();\n const id = idProp ?? labelUid;\n\n const prefixUid = useId();\n const suffixUid = useId();\n\n const helperUid = useId();\n\n const errorMessage = typeof error !== \"boolean\" ? error : undefined;\n\n const styleCombined = { ...style, ...layoutStyles };\n\n const hasHelperText = hint || showCounter || errorMessage || description;\n\n return (\n <div\n className={cx(styles[\"textfield\"], className)}\n data-anv=\"textfield\"\n style={styleCombined}\n >\n {label && (\n <FieldLabel\n moreInfo={moreInfo}\n openMoreInfo={openInfo}\n required={required}\n htmlFor={id}\n {...labelProps}\n >\n {label}\n </FieldLabel>\n )}\n <div\n className={cx(styles[\"input-wrapper\"], {\n [styles[\"small\"]]: size === \"small\",\n [styles[\"large\"]]: size === \"large\",\n })}\n role=\"presentation\"\n onClick={() => inputRef.current?.focus()}\n >\n {prefix ? (\n <div\n aria-hidden\n className={styles[\"prefix\"]}\n id={`prefix${prefixUid}`}\n >\n {prefix}\n </div>\n ) : null}\n <input\n id={id}\n className={cx(styles[\"input\"], {\n [styles[\"error\"]]: error,\n })}\n onChange={onChangeHandler}\n onFocus={focusHandler}\n onBlur={blurHandler}\n ref={useMergeRefs([ref, inputRef])}\n required={required}\n maxLength={maxLength}\n placeholder={placeholder}\n type={type}\n disabled={disabled}\n value={value ?? \"\"}\n data-tracking-id={trackingId}\n {...rest}\n aria-label={label ? undefined : placeholder}\n aria-describedby={hasHelperText ? helperUid : undefined}\n aria-invalid={error ? !!error : undefined}\n />\n {loading ? (\n <div className={styles[\"loading-spinner-wrapper\"]}>\n <Spinner size=\"small\" />\n </div>\n ) : null}\n {suffix ? (\n <div\n className={styles[\"suffix\"]}\n aria-hidden\n id={`suffix${suffixUid}`}\n >\n {suffix}\n </div>\n ) : null}\n </div>\n {hasHelperText ? (\n <Helper\n id={helperUid}\n hint={hint}\n maxLength={maxLength}\n inputLength={length}\n isTyping={isTyping}\n showCounter={showCounter}\n errorMessage={errorMessage}\n errorAriaLive={errorAriaLive}\n description={description}\n />\n ) : null}\n </div>\n );\n },\n);\nTextField.displayName = \"InternalTextField\";\n"],"names":["styles"],"mappings":";;;;;;;;;;;;;AAoDO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,OAAuB,GAAA,KAA+B;AACrD,IAAA,MAAM,IAAA,GAAO;AAAA,MACX,KAAA,EAAO,gBAAA,CAAiB,KAAA,CAAM,KAAK,CAAA;AAAA,MACnC,YAAY,KAAA,CAAM,UAAA;AAAA,MAClB,MAAA,EAAQ,gBAAA,CAAiB,KAAA,CAAM,MAAM,CAAA;AAAA,MACrC,IAAA,EAAM,gBAAA,CAAiB,KAAA,CAAM,IAAI,CAAA;AAAA,MACjC,WAAA,EAAa,gBAAA,CAAiB,KAAA,CAAM,WAAW,CAAA;AAAA,MAC/C,MAAM,KAAA,CAAM,IAAA;AAAA,MACZ,MAAM,KAAA,CAAM;AAAA,KACd;AAEA,IAAA,MAAM,aAAa,aAAA,CAAc;AAAA,MAC/B,IAAA,EAAM,WAAA;AAAA,MACN,IAAA;AAAA,MACA,WAAA,EAAa,CAAC,CAAC,KAAA,CAAM,kBAAkB;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A;AAAA;AAAA,WACF,GACE;AAAA;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AACA,SAAA,CAAU,WAAA,GAAc,mBAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-B25zeBIC.js","sources":["../../hammer-icon/mdi/round/drag_indicator.svg","../src/components/Dnd/DndHandle.tsx","../src/components/Dnd/DndHandleButton.tsx","../src/components/Dnd/DndSortLine.tsx","../src/components/Dnd/DndZone.tsx","../src/components/Dnd/index.ts"],"sourcesContent":["import * as React from \"react\";\nconst SvgDragIndicator = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\" }));\nexport default SvgDragIndicator;\n","import { Icon } from \"../Icon\";\nimport DragIndicator from \"@servicetitan/hammer-icon/mdi/round/drag_indicator.svg\";\nimport styles from \"./DndHandle.module.scss\";\nimport cx from \"classnames\";\n\n/**\n * Props for the DndHandle component\n */\nexport type DndHandleProps = {\n /**\n * Additional CSS class names to apply to the drag handle.\n */\n className?: string;\n};\n\n/**\n * A reusable drag handle icon component for drag and drop interactions.\n *\n * Features:\n * - Standardized drag indicator icon\n * - Accessible with proper ARIA attributes\n * - Customizable styling through className prop\n * - Consistent visual appearance across applications\n * - Lightweight and performant\n * - Supports all standard HTML element props\n *\n * @example\n * <DndHandle className=\"custom-drag-handle\" />\n */\nexport function DndHandle({ className }: { className?: string }) {\n const handleClasses = cx(styles.handle, className);\n return (\n <Icon svg={DragIndicator} className={handleClasses} role=\"presentation\" />\n );\n}\n","import { ButtonCompound } from \"../ButtonCompound\";\nimport handleStyles from \"./DndHandle.module.scss\";\nimport cx from \"classnames\";\nimport { forwardRef } from \"react\";\nimport { DndHandle } from \"./DndHandle\";\n\n/**\n * Props for the DndHandleButton component\n * @extends React.ComponentPropsWithoutRef<typeof ButtonCompound>\n */\nexport interface DndHandleButtonProps\n extends React.ComponentPropsWithoutRef<typeof ButtonCompound> {\n /**\n * Indicates whether the handle is currently being dragged.\n * @default false\n */\n isActive?: boolean;\n}\n\n/**\n * A reusable drag handle button component for drag and drop functionality.\n *\n * Features:\n * - Interactive button with drag handle icon\n * - Visual feedback for active drag state\n * - Accessible with proper ARIA attributes\n * - Extends ButtonCompound functionality\n * - Customizable styling through className prop\n * - Supports all standard button props\n * - Consistent visual appearance across applications\n *\n * @example\n * <DndHandleButton\n * isActive={isDragging}\n * className=\"custom-handle-button\"\n * onClick={handleClick}\n * />\n */\nexport const DndHandleButton = forwardRef<\n HTMLButtonElement,\n DndHandleButtonProps\n>(({ isActive = false, className, ...props }, ref) => {\n const handleButtonClasses = cx(className, handleStyles[\"handle-button\"], {\n [handleStyles[\"active\"]]: isActive,\n });\n\n return (\n <ButtonCompound\n ref={ref}\n className={handleButtonClasses}\n type=\"button\"\n shape=\"rounded\"\n {...props}\n >\n <DndHandle />\n </ButtonCompound>\n );\n});\n\nDndHandleButton.displayName = \"DndHandleButton\";\n","import cx from \"classnames\";\n\nimport styles from \"./Dnd.module.scss\";\nimport { CSSProperties } from \"react\";\n\n/**\n * Props for the DndSortLine component\n * @extends React.ComponentPropsWithoutRef<\"div\">\n */\nexport type SortLineProps = React.ComponentPropsWithoutRef<\"div\"> & {\n /**\n * The offset of the line from the item. This is a CSS value, typically negative.\n */\n offset: string;\n /**\n * The orientation of the sort - Note this may be counterintuitive, as the line is rendered perpendicular to the sort.\n */\n orientation: \"horizontal\" | \"vertical\";\n /**\n * The position of the line relative to a target item.\n */\n position: \"before\" | \"after\";\n};\n\n/**\n * A visual indicator line that shows where an item will be dropped during drag and drop operations.\n *\n * Features:\n * - Visual feedback for drop positioning\n * - Configurable orientation (horizontal/vertical)\n * - Adjustable positioning (before/after)\n * - Customizable offset for precise placement\n * - Accessible with proper ARIA attributes\n * - Automatic CSS class management\n * - Supports all standard HTML div props\n *\n * @example\n * <DndSortLine\n * offset=\"-10px\"\n * orientation=\"vertical\"\n * position=\"after\"\n * className=\"custom-drop-line\"\n * />\n */\nexport const DndSortLine = ({\n offset,\n orientation,\n position,\n ...rest\n}: SortLineProps) => {\n const classes = cx(\n styles[\"drop-line\"],\n styles[`orientation-${orientation}`],\n styles[`position-${position}`],\n );\n\n return (\n <div\n aria-hidden\n className={classes}\n style={{ \"--drop-line-offset\": offset } as CSSProperties}\n {...rest}\n />\n );\n};\n","import { ElementType, forwardRef, ReactNode } from \"react\";\nimport cx from \"classnames\";\n\nimport styles from \"./Dnd.module.scss\";\n\n/**\n * Props for the DndZone component\n * @extends Omit<React.ComponentPropsWithoutRef<T>, \"el\" | \"ref\">\n */\nexport type DndZoneProps<T extends ElementType = \"div\"> = {\n /**\n * The HTML element type to render. Can be any valid HTML element or React component.\n * @default \"div\"\n */\n el?: T;\n /**\n * The content to be rendered inside the drop zone.\n */\n children?: ReactNode;\n /**\n * Additional CSS class names to apply to the drop zone.\n */\n className?: string;\n /**\n * Indicates whether a draggable item is currently over this drop zone.\n */\n isOver: boolean;\n /**\n * Indicates whether the current drag operation is valid for this drop zone.\n */\n isValid: boolean;\n /**\n * Indicates whether any item is currently being dragged.\n */\n isDragging: boolean;\n} & Omit<React.ComponentPropsWithoutRef<T>, \"el\" | \"ref\">;\n\n/**\n * Base styling component for drop zones that handles visual states and styling.\n *\n * Features:\n * - Configurable HTML element rendering with the 'el' prop\n * - Visual feedback for drag states (over, valid, dragging)\n * - Automatic CSS class management based on drag state\n * - Supports all standard HTML element props\n * - Accessible with proper ARIA attributes\n * - Flexible styling through className prop\n * - Responsive design that adapts to container\n *\n * @example\n * <DndZone\n * isOver={isOver}\n * isValid={isValid}\n * isDragging={isDragging}\n * className=\"custom-drop-zone\"\n * >\n * Drop items here\n * </DndZone>\n */\nexport const DndZone = forwardRef<HTMLDivElement, DndZoneProps<ElementType>>(\n (\n {\n el: Component = \"div\" as ElementType,\n children,\n className,\n isDragging,\n isOver,\n isValid,\n ...rest\n },\n ref,\n ) => {\n const classes = cx(className, {\n [styles[\"drop-zone\"]]: true,\n [styles[\"over-valid\"]]: isDragging && isOver && isValid,\n [styles[\"over-invalid\"]]: isDragging && isOver && !isValid,\n [styles[\"active-not-over\"]]: isDragging && !isOver,\n });\n\n return (\n <Component ref={ref} className={classes} {...rest}>\n {children}\n </Component>\n );\n },\n);\n\nDndZone.displayName = \"DndZoneBase\";\n","import { DndHandle } from \"./DndHandle\";\nimport { DndHandleButton } from \"./DndHandleButton\";\nimport { DndSortLine } from \"./DndSortLine\";\nimport { DndZone } from \"./DndZone\";\n\nexport const Dnd = {\n Handle: DndHandle,\n HandleButton: DndHandleButton,\n SortLine: DndSortLine,\n Zone: DndZone,\n};\n"],"names":["styles","DragIndicator"],"mappings":";;;;;;;AACA,MAAM,gBAAgB,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,qSAAqS,EAAE,CAAC,CAAC;;;;;;;;;;AC4BxgB,SAAS,SAAA,CAAU,EAAE,SAAA,EAAU,EAA2B;AAC/D,EAAA,MAAM,aAAA,GAAgB,EAAA,CAAGA,YAAA,CAAO,MAAA,EA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