@databricks/design-system 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/AGENTS.md +473 -0
  2. package/CHANGELOG.md +5 -0
  3. package/README.md +5 -3
  4. package/dist/{WizardStepContentWrapper-Dvdj_FRA.js → WizardStepContentWrapper-DnwQIMN1.js} +787 -193
  5. package/dist/WizardStepContentWrapper-DnwQIMN1.js.map +1 -0
  6. package/dist/dubois-colors.less +2 -0
  7. package/dist/index-dark.css +10 -319
  8. package/dist/index-dark.mitigated.css +10 -319
  9. package/dist/index.css +61 -279
  10. package/dist/index.js +1809 -155
  11. package/dist/index.js.map +1 -1
  12. package/dist/index.mitigated.css +61 -279
  13. package/dist/patterns.js +10 -1
  14. package/dist/patterns.js.map +1 -1
  15. package/dist-types/design-system/Button/Button.d.ts +2 -2
  16. package/dist-types/design-system/Drawer/DrawerContext.d.ts +9 -0
  17. package/dist-types/design-system/FormV2/RHFAdapters.d.ts +8 -8
  18. package/dist-types/design-system/Grid/Col.d.ts +2 -2
  19. package/dist-types/design-system/Grid/Row.d.ts +2 -2
  20. package/dist-types/design-system/Icon/__generated/icons/FlowsIcon.d.ts +4 -0
  21. package/dist-types/design-system/Icon/__generated/icons/LakewatchAlertIcon.d.ts +4 -0
  22. package/dist-types/design-system/Icon/__generated/icons/LakewatchDatasourceIcon.d.ts +4 -0
  23. package/dist-types/design-system/Icon/__generated/icons/LakewatchDetectionRuleIcon.d.ts +4 -0
  24. package/dist-types/design-system/Icon/__generated/icons/LakewatchParserIcon.d.ts +4 -0
  25. package/dist-types/design-system/Icon/__generated/icons/index.d.ts +5 -0
  26. package/dist-types/design-system/LegacyTooltip/index.d.ts +0 -1
  27. package/dist-types/design-system/Skeleton/TitleSkeleton.d.ts +9 -3
  28. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts +2 -0
  29. package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +9 -0
  30. package/dist-types/design-system/TypeaheadComboboxReactAria/CountBadge.d.ts +6 -0
  31. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxAddButton.d.ts +3 -0
  32. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxCheckboxItem.d.ts +10 -0
  33. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxControls.d.ts +11 -0
  34. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxFooter.d.ts +2 -0
  35. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxInput.d.ts +9 -0
  36. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxMenu.d.ts +17 -0
  37. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxMenuItem.d.ts +16 -0
  38. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxMultiSelectInput.d.ts +18 -0
  39. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxRoot.d.ts +17 -0
  40. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxSectionHeader.d.ts +1 -0
  41. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxSelectedItem.d.ts +11 -0
  42. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxSeparator.d.ts +1 -0
  43. package/dist-types/design-system/TypeaheadComboboxReactAria/TypeaheadComboboxToggleButton.d.ts +4 -0
  44. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/footerFocus.d.ts +13 -0
  45. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/index.d.ts +4 -0
  46. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useComboboxItems.d.ts +32 -0
  47. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useComboboxState.d.ts +75 -0
  48. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useComboboxStateProps.d.ts +36 -0
  49. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useMultipleSelectionState.d.ts +25 -0
  50. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useScrollOptionIntoView.d.ts +11 -0
  51. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useTypeaheadComboboxContext.d.ts +2 -0
  52. package/dist-types/design-system/TypeaheadComboboxReactAria/hooks/useVirtualizedComboboxScroll.d.ts +36 -0
  53. package/dist-types/design-system/TypeaheadComboboxReactAria/index.d.ts +13 -0
  54. package/dist-types/design-system/TypeaheadComboboxReactAria/providers/TypeaheadComboboxContext.d.ts +45 -0
  55. package/dist-types/design-system/Typography/titleLevel.d.ts +11 -0
  56. package/dist-types/design-system/index.d.ts +1 -0
  57. package/dist-types/design-system/utils/useMediaQuery.d.ts +4 -1
  58. package/dist-types/theme/_generated/ValidSemanticColors.d.ts +2 -1
  59. package/package.json +14 -3
  60. package/dist/WizardStepContentWrapper-Dvdj_FRA.js.map +0 -1
  61. package/dist-types/design-system/LegacyTooltip/LegacyInfoTooltip.d.ts +0 -16
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { p as primitiveColors, d as DesignSystemEventProvider, e as useDesignSystemContext, f as useDesignSystemTheme, I as InfoFillIcon, C as CheckCircleFillIcon, g as WarningFillIcon, h as DangerFillIcon, i as DesignSystemEventProviderAnalyticsEventTypes, j as useDesignSystemEventComponentCallbacks, k as DesignSystemEventProviderComponentTypes, l as DesignSystemEventProviderComponentSubTypeMap, m as useNotifyOnFirstView, n as useStableUuidV4, B as Button, T as Typography, o as ChevronDownIcon, q as ChevronRightIcon, r as DesignSystemAntDConfigProvider, s as CloseSmallIcon, t as addDebugOutlineIfEnabled, v as Modal, w as getAnimationCss, x as token, S as ShapeTokens, y as getDarkModePortalStyles, L as LegacyTooltip, z as LegacyInfoCircleOutlined, A as useModalContext, R as Root$1, E as Trigger, G as InfoSmallIcon, H as Content, J as Arrow, K as SparkleDoubleIcon, O as OverflowPopover, N as LoadingState, P as visuallyHidden, Q as genSkeletonAnimatedColor, U as getOffsets, V as DesignSystemEventSuppressInteractionProviderContext, X as DesignSystemEventSuppressInteractionTrueContextValue, Y as tableStyles, Z as repeatingElementsStyles, _ as tableClassNames, $ as hideIconButtonRowStyles, a0 as hideIconButtonActionCellClassName, a1 as safex, a2 as useDialogComboboxContext, a3 as PlusIcon, a4 as importantify, a5 as getComboboxOptionItemWrapperStyles, a6 as getFooterStyles, a7 as Tooltip, a8 as useDialogComboboxOptionListContext, a9 as generateUuidV4, aa as getContentOptions, ab as findHighlightedOption, ac as highlightOption, ad as Input, ae as SearchIcon, af as EmptyResults, ag as findClosestOptionSibling, ah as DialogComboboxOptionListCheckboxItem, ai as DialogComboboxOptionListSelectItem, aj as DialogComboboxOptionListContextProvider, ak as LoadingSpinner, al as DialogComboboxOptionList, am as useUniqueId, an as useDuboisThemeClass, ao as TypeaheadComboboxContextProvider, ap as useTypeaheadComboboxContext, aq as getComboboxContentWrapperStyles, ar as ClearSelectionButton, as as TypeaheadComboboxSelectedItem, at as CountBadge, au as getValidationStateColor, av as SectionHeader, aw as useComboboxState, ax as useMultipleSelectionState, ay as Radio, az as Checkbox, aA as DialogCombobox, aB as DialogComboboxTrigger, aC as DialogComboboxContent, aD as Select, aE as SelectTrigger, aF as SelectContent, aG as SelectOption, aH as LegacySelect, aI as WarningIcon, aJ as CheckCircleIcon, aK as DangerIcon, aL as Hint, aM as Title$1, aN as CloseIcon, aO as RestoreAntDDefaultClsPrefix, aP as AccessibleContainer, aQ as DU_BOIS_ENABLE_ANIMATION_CLASSNAME, aR as CircleOffIcon, aS as CircleOutlineIcon, aT as CircleIcon, aU as shimExports, aV as SortAscendingIcon, aW as SortDescendingIcon, aX as SortUnsortedIcon, aY as MinusSquareIcon, aZ as PlusSquareIcon } from './WizardStepContentWrapper-Dvdj_FRA.js';
2
- export { a_ as AccessDeniedGraphic, a$ as Accordion, b0 as AccordionPanel, b1 as AlignCenterIcon, b2 as AlignJustifyIcon, b3 as AlignLeftIcon, b4 as AlignRightIcon, b5 as AlignVerticalBottomIcon, b6 as AlignVerticalCenterIcon, b7 as AlignVerticalTopIcon, b8 as AppIcon, b9 as ApplyDesignSystemContextOverrides, ba as ApplyDesignSystemFlags, bb as ArrowDownDotIcon, bc as ArrowDownFillIcon, bd as ArrowDownIcon, be as ArrowInIcon, bf as ArrowInTableIcon, bg as ArrowLeftIcon, bh as ArrowOutTableIcon, bi as ArrowOverIcon, bj as ArrowRightIcon, bk as ArrowUpDotIcon, bl as ArrowUpFillIcon, bm as ArrowUpIcon, bn as ArrowsCollapseIcon, bo as ArrowsConnectIcon, bp as ArrowsExpandIcon, bq as ArrowsUpDownIcon, br as AssistantIcon, bs as AtIcon, bt as Auth0Graphic, bu as Auth0GraphicLarge, bv as AzHorizontalIcon, bw as AzVerticalIcon, bx as BANNER_MAX_HEIGHT, by as BANNER_MIN_HEIGHT, bz as BackupIcon, bA as BadgeCodeIcon, bB as BadgeCodeOffIcon, bC as Banner, bD as BarChartIcon, bE as BarGroupedIcon, bF as BarStackedIcon, bG as BarStackedPercentageIcon, bH as BarsAscendingHorizontalIcon, bI as BarsAscendingVerticalIcon, bJ as BarsDescendingHorizontalIcon, bK as BarsDescendingVerticalIcon, bL as BeakerIcon, bM as BinaryIcon, bN as BlockQuoteIcon, bO as BoldIcon, bP as BookIcon, bQ as BookmarkFillIcon, bR as BookmarkIcon, bS as BooksIcon, bT as BracketsCheckIcon, bU as BracketsCurlyIcon, bV as BracketsErrorIcon, bW as BracketsSquareIcon, bX as BracketsXIcon, bY as BranchCheckIcon, bZ as BranchIcon, b_ as BranchResetIcon, b$ as BriefcaseFillIcon, c0 as BriefcaseIcon, c1 as BrushIcon, c2 as BugIcon, c3 as CalendarClockIcon, c4 as CalendarEventIcon, c5 as CalendarIcon, c6 as CalendarRangeIcon, c7 as CalendarSyncIcon, c8 as CameraIcon, c9 as CapitalizeIcon, ca as CaretDownSquareIcon, cb as CaretUpSquareIcon, cc as CatalogCloudIcon, cd as CatalogGearIcon, ce as CatalogHomeIcon, cf as CatalogIcon, cg as CatalogOffIcon, ch as CatalogSharedIcon, ci as CatalogUserHomeIcon, cj as CellsSquareIcon, ck as CertifiedFillIcon, cl as CertifiedFillSmallIcon, cm as CertifiedIcon, cn as ChainIcon, co as ChartLineIcon, cp as CheckCircleBadgeIcon, cq as CheckCircleSmallIcon, cr as CheckIcon, cs as CheckLineIcon, ct as CheckSmallIcon, cu as CheckboxIcon, cv as ChecklistIcon, cw as ChevronDoubleDownIcon, cx as ChevronDoubleLeftIcon, cy as ChevronDoubleLeftOffIcon, cz as ChevronDoubleRightIcon, cA as ChevronDoubleRightOffIcon, cB as ChevronDoubleUpIcon, cC as ChevronLeftIcon, cD as ChevronUpIcon, cE as ChipIcon, cF as CircleOffLargeIcon, cG as CircleOutlineLargeIcon, cH as ClipboardIcon, cI as ClockIcon, cJ as ClockKeyIcon, cK as ClockOffIcon, cL as CloudCheckIcon, cM as CloudDatabaseIcon, cN as CloudDownloadIcon, cO as CloudIcon, cP as CloudKeyIcon, cQ as CloudModelIcon, cR as CloudOffIcon, cS as CloudUploadIcon, cT as CodeIcon, cU as ColorFillIcon, cV as ColorVars, cW as ColumnIcon, cX as ColumnSplitIcon, cY as ColumnTagIcon, cZ as ColumnsIcon, c_ as CommandIcon, c$ as CommandPaletteIcon, d0 as CompassIcon, d1 as ComponentFinderContext, d2 as ConnectIcon, d3 as Content, d4 as ContextMenu, d5 as CopyIcon, d6 as CreditCardIcon, d7 as CursorClickIcon, d8 as CursorIcon, d9 as CursorPagination, da as CursorTypeIcon, db as CustomAppIcon, dc as DagHorizontalIcon, dd as DagIcon, de as DagVerticalIcon, df as DangerModal, dg as DangerSmallIcon, dh as DashIcon, di as DashboardCodeIcon, dj as DashboardIcon, dk as DataIcon, dl as DataMaskiingGraphic, dm as DatabaseClockIcon, dn as DatabaseIcon, dp as DatabaseImportIcon, dq as DatePicker, dr as DecimalIcon, ds as DeprecatedIcon, dt as DeprecatedSmallIcon, du as DesignSystemContext, dv as DesignSystemEventProviderComponentSubTypes, dw as DesignSystemProvider, dx as DesignSystemThemeContext, dy as DesignSystemThemeProvider, dz as DialogComboboxCountBadge, dA as DialogComboboxCustomButtonTriggerWrapper, dB as DialogComboboxSectionHeader, D as DocumentationSidebar, dC as DollarIcon, dD as DomainCirclesThree, dE as DomainsIcon, dF as DotsCircleIcon, dG as DownloadIcon, dH as DragIcon, dI as Drawer, dJ as DropdownMenu, dK as Empty, dL as EmptyDashboardGraphic, dM as ErdIcon, dN as ExpandLessIcon, dO as ExpandMoreIcon, F as FIXED_VERTICAL_STEPPER_WIDTH, dP as FaceFrownIcon, dQ as FaceNeutralIcon, dR as FaceSmileIcon, dS as FileCodeIcon, dT as FileCubeIcon, dU as FileDocumentIcon, dV as FileIcon, dW as FileImageIcon, dX as FileLockIcon, dY as FileModelIcon, dZ as FileNewIcon, d_ as FilePipelineIcon, d$ as FilterFillIcon, e0 as FilterIcon, e1 as FlagPointerIcon, e2 as FloatIcon, e3 as FlowIcon, e4 as FolderBranchFillIcon, e5 as FolderBranchIcon, e6 as FolderCloudFilledIcon, e7 as FolderCloudIcon, e8 as FolderCubeIcon, e9 as FolderCubeOutlineIcon, ea as FolderFillIcon, eb as FolderHomeIcon, ec as FolderIcon, ed as FolderNewIcon, ee as FolderNodeIcon, ef as FolderOpenBranchIcon, eg as FolderOpenCloudIcon, eh as FolderOpenCubeIcon, ei as FolderOpenIcon, ej as FolderOpenPipelineIcon, ek as FolderOutlinePipelineIcon, el as FolderSolidPipelineIcon, em as FontIcon, en as ForkHorizontalIcon, eo as ForkIcon, ep as Form, eq as FormContextResetBoundary, er as FullscreenExitIcon, es as FullscreenIcon, et as FunctionIcon, eu as FunctionInputIcon, ev as GavelIcon, ew as GearFillIcon, ex as GearIcon, ey as GenieCodeIcon, ez as GenieDeepResearchIcon, eA as GiftIcon, eB as GitCommitIcon, eC as GitMergeIcon, eD as GitRebaseIcon, eE as GlobeIcon, eF as Graphic, eG as GridDashIcon, eH as GridIcon, eI as GroupIcon, eJ as H1Icon, eK as H2Icon, eL as H3Icon, eM as H4Icon, eN as H5Icon, eO as H6Icon, eP as HashIcon, eQ as HistoryIcon, eR as HomeIcon, eS as Icon, eT as ImageIcon, eU as IndentDecreaseIcon, eV as IndentIncreaseIcon, eW as InfinityIcon, eX as InfoBookIcon, eY as InfoIcon, eZ as InfoTooltip, e_ as IngestionIcon, e$ as ItalicIcon, f0 as JoinOperatorIcon, f1 as KeyIcon, f2 as KeyboardIcon, f3 as LakebaseCatalogIcon, f4 as LakebaseIcon, f5 as LakeflowDesignerIcon, f6 as LayerGraphIcon, f7 as LayerIcon, f8 as Layout, f9 as LeafIcon, fa as LegacyAppstoreOutlined, fb as LegacyArrowUpOutlined, fc as LegacyBookOutlined, fd as LegacyBugOutlined, fe as LegacyCheckCircleFilled, ff as LegacyCheckCircleOutlined, fg as LegacyClockCircleFilled, fh as LegacyClockCircleOutlined, fi as LegacyCloseCircleFilled, fj as LegacyCloseOutlined, fk as LegacyCodeOutlined, fl as LegacyCommentOutlined, fm as LegacyCopyOutlined, fn as LegacyDatabaseOutlined, fo as LegacyDeleteOutlined, fp as LegacyDownOutlined, fq as LegacyEditOutlined, fr as LegacyEllipsisOutlined, fs as LegacyExclamationCircleOutlined, ft as LegacyEyeOutlined, fu as LegacyFileOutlined, fv as LegacyFileTextOutlined, fw as LegacyFilterOutlined, fx as LegacyFlagOutlined, fy as LegacyFolderOpenOutlined, fz as LegacyFolderOutlined, fA as LegacyForm, fB as LegacyFormDubois, fC as LegacyFullscreenOutlined, fD as LegacyGithubOutlined, fE as LegacyHourglassOutlined, fF as LegacyLinkOutlined, fG as LegacyLoadingOutlined, fH as LegacyNotificationOutlined, fI as LegacyOptGroup, fJ as LegacyOption, fK as LegacyPauseCircleFilled, fL as LegacyPlayCircleOutlined, fM as LegacyPlusOutlined, fN as LegacyQuestionCircleOutlined, fO as LegacyReloadOutlined, fP as LegacyRightOutlined, fQ as LegacyRocketOutlined, fR as LegacySearchOutlined, fS as LegacySelectOptGroup, fT as LegacySelectOption, fU as LegacySendOutlined, fV as LegacySettingOutlined, fW as LegacySlackOutlined, fX as LegacySwapOutlined, fY as LegacySyncOutlined, fZ as LegacyTable, f_ as LegacyUpOutlined, f$ as LegacyVideoCameraOutlined, g0 as LetterFormatIcon, g1 as LettersIcon, g2 as LettersNumbersIcon, g3 as LibrariesIcon, g4 as LifesaverIcon, g5 as LightbulbIcon, g6 as LightningCircleFillIcon, g7 as LightningIcon, g8 as LinearLineIcon, g9 as LinkIcon, ga as LinkOffIcon, gb as ListBorderIcon, gc as ListClearIcon, gd as ListIcon, ge as ListNumberIcon, gf as Listbox, gg as LoadingIcon, gh as LoadingStateContext, gi as LockFillIcon, gj as LockIcon, gk as LockShareIcon, gl as LockUnlockedIcon, gm as LoopIcon, gn as LowercaseIcon, M as MAX_VERTICAL_WIZARD_CONTENT_WIDTH, go as MailIcon, gp as MapIcon, gq as MarkdownIcon, gr as McpIcon, gs as MeasureIcon, gt as MegaphoneIcon, gu as MenuIcon, gv as MinusCircleFillIcon, gw as MinusCircleIcon, gx as MinusCircleSmallIcon, gy as MissingBranchGraphic, gz as MissingGraphic, gA as ModelsIcon, gB as MonotoneLineIcon, gC as MonthPickerGrid, gD as MoonIcon, gE as Nav, gF as NavButton, gG as NavigationMenu, gH as NeonProjectIcon, gI as NewChatIcon, gJ as NewTabIcon, gK as NewWindowIcon, gL as NoCaseIcon, gM as NoIcon, gN as NotebookIcon, gO as NotebookPipelineIcon, gP as NotificationIcon, gQ as NotificationOffIcon, gR as NumberFormatIcon, gS as NumbersIcon, gT as OfficeIcon, gU as OntologyIcon, gV as OutageGraphic, gW as Overflow, gX as OverflowHorizontalIcon, gY as OverflowIcon, gZ as PageBottomIcon, g_ as PageFirstIcon, g$ as PageIcon, h0 as PageLastIcon, h1 as PageTopIcon, h2 as Pagination, h3 as Panel, h4 as PanelBody, h5 as PanelDockedIcon, h6 as PanelFloatingIcon, h7 as PanelHeader, h8 as PanelHeaderButtons, h9 as PanelHeaderTitle, ha as PaperclipIcon, hb as PassFailChecklistIcon, hc as PauseIcon, hd as PencilFillIcon, he as PencilIcon, hf as PencilSparkleIcon, hg as PieChartIcon, hh as PillControl, hi as PinCancelIcon, hj as PinFillIcon, hk as PinIcon, hl as PipelineCodeIcon, hm as PipelineCubeIcon, hn as PipelineIcon, ho as PivotOperatorIcon, hp as PlayCircleFillIcon, hq as PlayCircleIcon, hr as PlayDoubleIcon, hs as PlayIcon, ht as PlayMultipleIcon, hu as PlugIcon, hv as PlusCircleFillIcon, hw as PlusCircleIcon, hx as PlusCircleSmallIcon, hy as PlusMinusSquareIcon, hz as Popover, hA as PositionBottomIcon, hB as PositionLeftIcon, hC as PositionRightIcon, hD as PositionTopIcon, hE as PreviewCard, hF as Progress, hG as PullRequestIcon, hH as PuzzleIcon, hI as QueryEditorIcon, hJ as QueryIcon, hK as QuestionMarkFillIcon, hL as QuestionMarkIcon, hM as RadioIcon, hN as RadioTile, hO as RangePicker, hP as ReaderModeIcon, hQ as RedoIcon, hR as RefreshIcon, hS as RefreshPlayIcon, hT as RefreshXIcon, hU as ReplyIcon, hV as ResizeIcon, hW as RhfForm, hX as RichTextIcon, hY as RobotIcon, hZ as RocketIcon, h_ as RowsIcon, h$ as RunIcon, i0 as RunningIcon, i1 as SMALL_BUTTON_HEIGHT, i2 as SaveClockIcon, i3 as SaveIcon, i4 as SchemaIcon, i5 as SchoolIcon, i6 as SearchDataIcon, i7 as SegmentedControlButton, i8 as SegmentedControlGroup, i9 as SelectContext, ia as SelectContextProvider, ib as SelectOptionGroup, ic as SendIcon, id as ShareIcon, ie as ShareNodesIcon, ig as ShieldCheckIcon, ih as ShieldIcon, ii as ShieldOffIcon, ij as ShortcutIcon, ik as Sidebar, il as SidebarAutoIcon, im as SidebarClosedIcon, io as SidebarCollapseIcon, ip as SidebarExpandIcon, iq as SidebarIcon, ir as SidebarOpenIcon, is as SidebarSyncIcon, it as SimpleSelect, iu as SimpleSelectOption, iv as SimpleSelectOptionGroup, iw as SlashSquareIcon, ix as Slider, iy as SlidersIcon, iz as SnippetIcon, iA as SortCustomHorizontalIcon, iB as SortCustomVerticalIcon, iC as SortHorizontalAscendingIcon, iD as SortHorizontalDescendingIcon, iE as SortLetterHorizontalAscendingIcon, iF as SortLetterHorizontalDescendingIcon, iG as SortLetterUnsortedIcon, iH as SortLetterVerticalAscendingIcon, iI as SortLetterVerticalDescendingIcon, iJ as Spacer, iK as SparkleDoubleFillIcon, iL as SparkleFillIcon, iM as SparkleIcon, iN as SparkleRectangleIcon, iO as SpeechBubbleIcon, iP as SpeechBubblePlusIcon, iQ as SpeechBubbleQuestionMarkFillIcon, iR as SpeechBubbleQuestionMarkIcon, iS as SpeechBubbleStarIcon, iT as SpeedometerIcon, iU as Spinner, iV as SplitButton, iW as SqlIcon, iX as StarFillIcon, iY as StarIcon, iZ as StepAfterLineIcon, i_ as StepBeforeLineIcon, i$ as Stepper, j0 as StopCircleFillIcon, j1 as StopCircleIcon, j2 as StopIcon, j3 as StoredProcedureIcon, j4 as StorefrontIcon, j5 as StreamIcon, j6 as StrikeThroughIcon, j7 as SunIcon, j8 as SyncIcon, j9 as SyncSmallIcon, ja as SyncToFileIcon, jb as TableAsteriskIcon, jc as TableClockIcon, jd as TableCombineIcon, je as TableGlassesIcon, jf as TableGlobeIcon, jg as TableIcon, jh as TableLightningIcon, ji as TableMeasureIcon, jj as TableModelIcon, jk as TableReportIcon, jl as TableStreamIcon, jm as TableVectorIcon, jn as TableViewIcon, jo as Tabs, jp as Tag, jq as TagColumnIcon, jr as TagIcon, js as TagTableIcon, jt as TargetIcon, ju as TerminalIcon, jv as TextBoxIcon, jw as TextColorIcon, jx as TextIcon, jy as TextJustifyIcon, jz as TextUnderlineIcon, jA as ThreeDotsIcon, jB as ThumbsDownFilledIcon, jC as ThumbsDownIcon, jD as ThumbsUpFilledIcon, jE as ThumbsUpIcon, jF as ToggleButton, jG as TokenIcon, jH as Toolbar, jI as TrashIcon, jJ as Tree, jK as TreeIcon, jL as TrendingFillIcon, jM as TrendingIcon, jN as TriangleIcon, jO as TypeaheadComboboxCheckboxItem, jP as TypeaheadComboboxFooter, jQ as TypeaheadComboboxMenuItem, jR as TypeaheadComboboxMultiSelectStateChangeTypes, jS as TypeaheadComboboxStateChangeTypes, jT as UnderlineIcon, jU as UndoIcon, jV as UploadIcon, jW as UppercaseIcon, jX as UsageOverageGraphic, jY as UsageSpikeGraphic, jZ as UsbIcon, j_ as UserBadgeIcon, j$ as UserCircleIcon, k0 as UserGroupFillIcon, k1 as UserGroupIcon, k2 as UserIcon, k3 as UserKeyIconIcon, k4 as UserShieldIcon, k5 as UserSparkleIcon, k6 as UserTeamIcon, k7 as VisibleFillIcon, k8 as VisibleIcon, k9 as VisibleOffIcon, ka as WithDesignSystemThemeHoc, W as Wizard, a as WizardControlled, b as WizardModal, c as WizardStepContentWrapper, kb as WorkflowCodeIcon, kc as WorkflowCubeIcon, kd as WorkflowsIcon, ke as WorkspacesIcon, kf as WrenchIcon, kg as WrenchSparkleIcon, kh as XCircleFillIcon, ki as XCircleIcon, kj as YearPickerGrid, kk as ZaHorizontalIcon, kl as ZaVerticalIcon, km as ZeroOpsIcon, kn as ZeroOpsOutlineIcon, ko as ZoomInIcon, kp as ZoomMarqueeSelection, kq as ZoomOutIcon, kr as ZoomToFitIcon, ks as __INTERNAL_DO_NOT_USE__FormItem, kt as __INTERNAL_DO_NOT_USE__Group, ku as __INTERNAL_DO_NOT_USE__HorizontalGroup, kv as __INTERNAL_DO_NOT_USE__VerticalGroup, kw as __INTERNAL_DO_NOT_USE__wrapLegacyFormRules, kx as augmentWithDataComponentProps, ky as dialogComboboxLookAheadKeyDown, kz as getBottomOnlyShadowScrollStyles, kA as getButtonEmotionStyles, kB as getComboboxOptionLabelStyles, kC as getDatePickerQuickActionBasic, kD as getDialogComboboxOptionLabelWidth, kE as getHorizontalTabShadowStyles, kF as getInputStyles, kG as getKeyboardNavigationFunctions, kH as getMemoizedButtonEmotionStyles, kI as getPaginationEmotionStyles, kJ as getPanelContainmentStyle, kK as getRadioStyles, kL as getRangeQuickActionsBasic, kM as getShadowScrollStyles, kN as getTypographyColor, kO as getVirtualListScrollbarStyles, kP as getVirtualListScrollbarThumbColor, kQ as getVirtualizedComboboxMenuItemStyles, kR as getWrapperStyle, kS as highlightFirstNonDisabledOption, kT as isOptionDisabled, kU as resetTabIndexToFocusedElement, kV as setImplicitContextGetter, kW as skipHideIconButtonActionClassName, kX as themeMemoKey, kY as useAntDConfigProviderContext, kZ as useCallbackOnEnter, k_ as useComponentFinderContext, k$ as useDesignSystemEventSuppressInteractionContext, l0 as useFormContext, l1 as useRadioGroupContext, l2 as useRadixModalContext, u as useWizardCurrentStep } from './WizardStepContentWrapper-Dvdj_FRA.js';
1
+ import { p as primitiveColors, d as DesignSystemEventProvider, e as useDesignSystemContext, f as useDesignSystemTheme, I as InfoFillIcon, C as CheckCircleFillIcon, g as WarningFillIcon, h as DangerFillIcon, i as DesignSystemEventProviderAnalyticsEventTypes, j as useDesignSystemEventComponentCallbacks, k as DesignSystemEventProviderComponentTypes, l as DesignSystemEventProviderComponentSubTypeMap, m as useNotifyOnFirstView, n as useStableUuidV4, B as Button, T as Typography, o as ChevronDownIcon, q as ChevronRightIcon, r as DesignSystemAntDConfigProvider, s as CloseSmallIcon, t as addDebugOutlineIfEnabled, v as Modal, w as getAnimationCss, x as token, S as ShapeTokens, y as getDarkModePortalStyles, z as useModalContext, R as Root$1, A as Trigger, E as InfoSmallIcon, G as Content, H as Arrow, J as SparkleDoubleIcon, O as OverflowPopover, L as LoadingState, K as visuallyHidden, N as genSkeletonAnimatedColor, P as getOffsets, Q as DesignSystemEventSuppressInteractionProviderContext, U as DesignSystemEventSuppressInteractionTrueContextValue, V as tableStyles, X as repeatingElementsStyles, Y as tableClassNames, Z as hideIconButtonRowStyles, _ as hideIconButtonActionCellClassName, $ as safex, a0 as TitleSkeleton, a1 as useDialogComboboxContext, a2 as PlusIcon, a3 as importantify, a4 as getComboboxOptionItemWrapperStyles, a5 as getFooterStyles, a6 as Tooltip, a7 as useDialogComboboxOptionListContext, a8 as generateUuidV4, a9 as getContentOptions, aa as findHighlightedOption, ab as highlightOption, ac as Input, ad as SearchIcon, ae as EmptyResults, af as findClosestOptionSibling, ag as DialogComboboxOptionListCheckboxItem, ah as DialogComboboxOptionListSelectItem, ai as DialogComboboxOptionListContextProvider, aj as LoadingSpinner, ak as DialogComboboxOptionList, al as useUniqueId, am as useDuboisThemeClass, an as TypeaheadComboboxContextProvider, ao as useTypeaheadComboboxContext, ap as getComboboxContentWrapperStyles, aq as ClearSelectionButton, ar as TypeaheadComboboxSelectedItem, as as CountBadge, at as getValidationStateColor, au as SectionHeader, av as useComboboxState$1, aw as useMultipleSelectionState$1, ax as Radio, ay as Checkbox, az as DialogCombobox, aA as DialogComboboxTrigger, aB as DialogComboboxContent, aC as Select, aD as SelectTrigger, aE as SelectContent, aF as SelectOption, aG as LegacySelect, aH as WarningIcon, aI as CheckCircleIcon, aJ as DangerIcon, aK as Hint, aL as Title$1, aM as CloseIcon, aN as RestoreAntDDefaultClsPrefix, aO as AccessibleContainer, aP as DU_BOIS_ENABLE_ANIMATION_CLASSNAME, aQ as CircleOffIcon, aR as CircleOutlineIcon, aS as CircleIcon, aT as shimExports, aU as SortAscendingIcon, aV as SortDescendingIcon, aW as SortUnsortedIcon, aX as MinusSquareIcon, aY as PlusSquareIcon, aZ as TypeaheadComboboxReactAriaContextProvider, a_ as useTypeaheadComboboxReactAriaContext, a$ as useRadixModalContext, b0 as useIsomorphicLayoutEffect, b1 as useScrollOptionIntoView, b2 as InfoTooltip, b3 as getInfoIconStyles, b4 as HintRow, b5 as getCheckboxStyles, b6 as getMenuItemStyles, b7 as TypeaheadComboboxSelectedItem$1, b8 as CountBadge$1, b9 as TypeaheadComboboxMenuItem } from './WizardStepContentWrapper-DnwQIMN1.js';
2
+ export { ba as AccessDeniedGraphic, bb as Accordion, bc as AccordionPanel, bd as AlignCenterIcon, be as AlignJustifyIcon, bf as AlignLeftIcon, bg as AlignRightIcon, bh as AlignVerticalBottomIcon, bi as AlignVerticalCenterIcon, bj as AlignVerticalTopIcon, bk as AppIcon, bl as ApplyDesignSystemContextOverrides, bm as ApplyDesignSystemFlags, bn as ArrowDownDotIcon, bo as ArrowDownFillIcon, bp as ArrowDownIcon, bq as ArrowInIcon, br as ArrowInTableIcon, bs as ArrowLeftIcon, bt as ArrowOutTableIcon, bu as ArrowOverIcon, bv as ArrowRightIcon, bw as ArrowUpDotIcon, bx as ArrowUpFillIcon, by as ArrowUpIcon, bz as ArrowsCollapseIcon, bA as ArrowsConnectIcon, bB as ArrowsExpandIcon, bC as ArrowsUpDownIcon, bD as AssistantIcon, bE as AtIcon, bF as Auth0Graphic, bG as Auth0GraphicLarge, bH as AzHorizontalIcon, bI as AzVerticalIcon, bJ as BANNER_MAX_HEIGHT, bK as BANNER_MIN_HEIGHT, bL as BackupIcon, bM as BadgeCodeIcon, bN as BadgeCodeOffIcon, bO as Banner, bP as BarChartIcon, bQ as BarGroupedIcon, bR as BarStackedIcon, bS as BarStackedPercentageIcon, bT as BarsAscendingHorizontalIcon, bU as BarsAscendingVerticalIcon, bV as BarsDescendingHorizontalIcon, bW as BarsDescendingVerticalIcon, bX as BeakerIcon, bY as BinaryIcon, bZ as BlockQuoteIcon, b_ as BoldIcon, b$ as BookIcon, c0 as BookmarkFillIcon, c1 as BookmarkIcon, c2 as BooksIcon, c3 as BracketsCheckIcon, c4 as BracketsCurlyIcon, c5 as BracketsErrorIcon, c6 as BracketsSquareIcon, c7 as BracketsXIcon, c8 as BranchCheckIcon, c9 as BranchIcon, ca as BranchResetIcon, cb as BriefcaseFillIcon, cc as BriefcaseIcon, cd as BrushIcon, ce as BugIcon, cf as CalendarClockIcon, cg as CalendarEventIcon, ch as CalendarIcon, ci as CalendarRangeIcon, cj as CalendarSyncIcon, ck as CameraIcon, cl as CapitalizeIcon, cm as CaretDownSquareIcon, cn as CaretUpSquareIcon, co as CatalogCloudIcon, cp as CatalogGearIcon, cq as CatalogHomeIcon, cr as CatalogIcon, cs as CatalogOffIcon, ct as CatalogSharedIcon, cu as CatalogUserHomeIcon, cv as CellsSquareIcon, cw as CertifiedFillIcon, cx as CertifiedFillSmallIcon, cy as CertifiedIcon, cz as ChainIcon, cA as ChartLineIcon, cB as CheckCircleBadgeIcon, cC as CheckCircleSmallIcon, cD as CheckIcon, cE as CheckLineIcon, cF as CheckSmallIcon, cG as CheckboxIcon, cH as ChecklistIcon, cI as ChevronDoubleDownIcon, cJ as ChevronDoubleLeftIcon, cK as ChevronDoubleLeftOffIcon, cL as ChevronDoubleRightIcon, cM as ChevronDoubleRightOffIcon, cN as ChevronDoubleUpIcon, cO as ChevronLeftIcon, cP as ChevronUpIcon, cQ as ChipIcon, cR as CircleOffLargeIcon, cS as CircleOutlineLargeIcon, cT as ClipboardIcon, cU as ClockIcon, cV as ClockKeyIcon, cW as ClockOffIcon, cX as CloudCheckIcon, cY as CloudDatabaseIcon, cZ as CloudDownloadIcon, c_ as CloudIcon, c$ as CloudKeyIcon, d0 as CloudModelIcon, d1 as CloudOffIcon, d2 as CloudUploadIcon, d3 as CodeIcon, d4 as ColorFillIcon, d5 as ColorVars, d6 as ColumnIcon, d7 as ColumnSplitIcon, d8 as ColumnTagIcon, d9 as ColumnsIcon, da as CommandIcon, db as CommandPaletteIcon, dc as CompassIcon, dd as ComponentFinderContext, de as ConnectIcon, df as Content, dg as ContextMenu, dh as CopyIcon, di as CreditCardIcon, dj as CursorClickIcon, dk as CursorIcon, dl as CursorPagination, dm as CursorTypeIcon, dn as CustomAppIcon, dp as DagHorizontalIcon, dq as DagIcon, dr as DagVerticalIcon, ds as DangerModal, dt as DangerSmallIcon, du as DashIcon, dv as DashboardCodeIcon, dw as DashboardIcon, dx as DataIcon, dy as DataMaskiingGraphic, dz as DatabaseClockIcon, dA as DatabaseIcon, dB as DatabaseImportIcon, dC as DatePicker, dD as DecimalIcon, dE as DeprecatedIcon, dF as DeprecatedSmallIcon, dG as DesignSystemContext, dH as DesignSystemEventProviderComponentSubTypes, dI as DesignSystemProvider, dJ as DesignSystemThemeContext, dK as DesignSystemThemeProvider, dL as DialogComboboxCountBadge, dM as DialogComboboxCustomButtonTriggerWrapper, dN as DialogComboboxSectionHeader, D as DocumentationSidebar, dO as DollarIcon, dP as DomainCirclesThree, dQ as DomainsIcon, dR as DotsCircleIcon, dS as DownloadIcon, dT as DragIcon, dU as Drawer, dV as DropdownMenu, dW as Empty, dX as EmptyDashboardGraphic, dY as ErdIcon, dZ as ExpandLessIcon, d_ as ExpandMoreIcon, F as FIXED_VERTICAL_STEPPER_WIDTH, d$ as FaceFrownIcon, e0 as FaceNeutralIcon, e1 as FaceSmileIcon, e2 as FileCodeIcon, e3 as FileCubeIcon, e4 as FileDocumentIcon, e5 as FileIcon, e6 as FileImageIcon, e7 as FileLockIcon, e8 as FileModelIcon, e9 as FileNewIcon, ea as FilePipelineIcon, eb as FilterFillIcon, ec as FilterIcon, ed as FlagPointerIcon, ee as FloatIcon, ef as FlowIcon, eg as FlowsIcon, eh as FolderBranchFillIcon, ei as FolderBranchIcon, ej as FolderCloudFilledIcon, ek as FolderCloudIcon, el as FolderCubeIcon, em as FolderCubeOutlineIcon, en as FolderFillIcon, eo as FolderHomeIcon, ep as FolderIcon, eq as FolderNewIcon, er as FolderNodeIcon, es as FolderOpenBranchIcon, et as FolderOpenCloudIcon, eu as FolderOpenCubeIcon, ev as FolderOpenIcon, ew as FolderOpenPipelineIcon, ex as FolderOutlinePipelineIcon, ey as FolderSolidPipelineIcon, ez as FontIcon, eA as ForkHorizontalIcon, eB as ForkIcon, eC as Form, eD as FormContextResetBoundary, eE as FullscreenExitIcon, eF as FullscreenIcon, eG as FunctionIcon, eH as FunctionInputIcon, eI as GavelIcon, eJ as GearFillIcon, eK as GearIcon, eL as GenieCodeIcon, eM as GenieDeepResearchIcon, eN as GiftIcon, eO as GitCommitIcon, eP as GitMergeIcon, eQ as GitRebaseIcon, eR as GlobeIcon, eS as Graphic, eT as GridDashIcon, eU as GridIcon, eV as GroupIcon, eW as H1Icon, eX as H2Icon, eY as H3Icon, eZ as H4Icon, e_ as H5Icon, e$ as H6Icon, f0 as HashIcon, f1 as HistoryIcon, f2 as HomeIcon, f3 as Icon, f4 as ImageIcon, f5 as IndentDecreaseIcon, f6 as IndentIncreaseIcon, f7 as InfinityIcon, f8 as InfoBookIcon, f9 as InfoIcon, fa as IngestionIcon, fb as ItalicIcon, fc as JoinOperatorIcon, fd as KeyIcon, fe as KeyboardIcon, ff as LakebaseCatalogIcon, fg as LakebaseIcon, fh as LakeflowDesignerIcon, fi as LakewatchAlertIcon, fj as LakewatchDatasourceIcon, fk as LakewatchDetectionRuleIcon, fl as LakewatchParserIcon, fm as LayerGraphIcon, fn as LayerIcon, fo as Layout, fp as LeafIcon, fq as LegacyAppstoreOutlined, fr as LegacyArrowUpOutlined, fs as LegacyBookOutlined, ft as LegacyBugOutlined, fu as LegacyCheckCircleFilled, fv as LegacyCheckCircleOutlined, fw as LegacyClockCircleFilled, fx as LegacyClockCircleOutlined, fy as LegacyCloseCircleFilled, fz as LegacyCloseOutlined, fA as LegacyCodeOutlined, fB as LegacyCommentOutlined, fC as LegacyCopyOutlined, fD as LegacyDatabaseOutlined, fE as LegacyDeleteOutlined, fF as LegacyDownOutlined, fG as LegacyEditOutlined, fH as LegacyEllipsisOutlined, fI as LegacyExclamationCircleOutlined, fJ as LegacyEyeOutlined, fK as LegacyFileOutlined, fL as LegacyFileTextOutlined, fM as LegacyFilterOutlined, fN as LegacyFlagOutlined, fO as LegacyFolderOpenOutlined, fP as LegacyFolderOutlined, fQ as LegacyForm, fR as LegacyFormDubois, fS as LegacyFullscreenOutlined, fT as LegacyGithubOutlined, fU as LegacyHourglassOutlined, fV as LegacyInfoCircleOutlined, fW as LegacyLinkOutlined, fX as LegacyLoadingOutlined, fY as LegacyNotificationOutlined, fZ as LegacyOptGroup, f_ as LegacyOption, f$ as LegacyPauseCircleFilled, g0 as LegacyPlayCircleOutlined, g1 as LegacyPlusOutlined, g2 as LegacyQuestionCircleOutlined, g3 as LegacyReloadOutlined, g4 as LegacyRightOutlined, g5 as LegacyRocketOutlined, g6 as LegacySearchOutlined, g7 as LegacySelectOptGroup, g8 as LegacySelectOption, g9 as LegacySendOutlined, ga as LegacySettingOutlined, gb as LegacySlackOutlined, gc as LegacySwapOutlined, gd as LegacySyncOutlined, ge as LegacyTable, gf as LegacyTooltip, gg as LegacyUpOutlined, gh as LegacyVideoCameraOutlined, gi as LetterFormatIcon, gj as LettersIcon, gk as LettersNumbersIcon, gl as LibrariesIcon, gm as LifesaverIcon, gn as LightbulbIcon, go as LightningCircleFillIcon, gp as LightningIcon, gq as LinearLineIcon, gr as LinkIcon, gs as LinkOffIcon, gt as ListBorderIcon, gu as ListClearIcon, gv as ListIcon, gw as ListNumberIcon, gx as Listbox, gy as LoadingIcon, gz as LoadingStateContext, gA as LockFillIcon, gB as LockIcon, gC as LockShareIcon, gD as LockUnlockedIcon, gE as LoopIcon, gF as LowercaseIcon, M as MAX_VERTICAL_WIZARD_CONTENT_WIDTH, gG as MailIcon, gH as MapIcon, gI as MarkdownIcon, gJ as McpIcon, gK as MeasureIcon, gL as MegaphoneIcon, gM as MenuIcon, gN as MinusCircleFillIcon, gO as MinusCircleIcon, gP as MinusCircleSmallIcon, gQ as MissingBranchGraphic, gR as MissingGraphic, gS as ModelsIcon, gT as MonotoneLineIcon, gU as MonthPickerGrid, gV as MoonIcon, gW as Nav, gX as NavButton, gY as NavigationMenu, gZ as NeonProjectIcon, g_ as NewChatIcon, g$ as NewTabIcon, h0 as NewWindowIcon, h1 as NoCaseIcon, h2 as NoIcon, h3 as NotebookIcon, h4 as NotebookPipelineIcon, h5 as NotificationIcon, h6 as NotificationOffIcon, h7 as NumberFormatIcon, h8 as NumbersIcon, h9 as OfficeIcon, ha as OntologyIcon, hb as OutageGraphic, hc as Overflow, hd as OverflowHorizontalIcon, he as OverflowIcon, hf as PageBottomIcon, hg as PageFirstIcon, hh as PageIcon, hi as PageLastIcon, hj as PageTopIcon, hk as Pagination, hl as Panel, hm as PanelBody, hn as PanelDockedIcon, ho as PanelFloatingIcon, hp as PanelHeader, hq as PanelHeaderButtons, hr as PanelHeaderTitle, hs as PaperclipIcon, ht as PassFailChecklistIcon, hu as PauseIcon, hv as PencilFillIcon, hw as PencilIcon, hx as PencilSparkleIcon, hy as PieChartIcon, hz as PillControl, hA as PinCancelIcon, hB as PinFillIcon, hC as PinIcon, hD as PipelineCodeIcon, hE as PipelineCubeIcon, hF as PipelineIcon, hG as PivotOperatorIcon, hH as PlayCircleFillIcon, hI as PlayCircleIcon, hJ as PlayDoubleIcon, hK as PlayIcon, hL as PlayMultipleIcon, hM as PlugIcon, hN as PlusCircleFillIcon, hO as PlusCircleIcon, hP as PlusCircleSmallIcon, hQ as PlusMinusSquareIcon, hR as Popover, hS as PositionBottomIcon, hT as PositionLeftIcon, hU as PositionRightIcon, hV as PositionTopIcon, hW as PreviewCard, hX as Progress, hY as PullRequestIcon, hZ as PuzzleIcon, h_ as QueryEditorIcon, h$ as QueryIcon, i0 as QuestionMarkFillIcon, i1 as QuestionMarkIcon, i2 as RadioIcon, i3 as RadioTile, i4 as RangePicker, i5 as ReaderModeIcon, i6 as RedoIcon, i7 as RefreshIcon, i8 as RefreshPlayIcon, i9 as RefreshXIcon, ia as ReplyIcon, ib as ResizeIcon, ic as RhfForm, id as RichTextIcon, ie as RobotIcon, ig as RocketIcon, ih as RowsIcon, ii as RunIcon, ij as RunningIcon, ik as SMALL_BUTTON_HEIGHT, il as SaveClockIcon, im as SaveIcon, io as SchemaIcon, ip as SchoolIcon, iq as SearchDataIcon, ir as SegmentedControlButton, is as SegmentedControlGroup, it as SelectContext, iu as SelectContextProvider, iv as SelectOptionGroup, iw as SendIcon, ix as ShareIcon, iy as ShareNodesIcon, iz as ShieldCheckIcon, iA as ShieldIcon, iB as ShieldOffIcon, iC as ShortcutIcon, iD as Sidebar, iE as SidebarAutoIcon, iF as SidebarClosedIcon, iG as SidebarCollapseIcon, iH as SidebarExpandIcon, iI as SidebarIcon, iJ as SidebarOpenIcon, iK as SidebarSyncIcon, iL as SimpleSelect, iM as SimpleSelectOption, iN as SimpleSelectOptionGroup, iO as SlashSquareIcon, iP as Slider, iQ as SlidersIcon, iR as SnippetIcon, iS as SortCustomHorizontalIcon, iT as SortCustomVerticalIcon, iU as SortHorizontalAscendingIcon, iV as SortHorizontalDescendingIcon, iW as SortLetterHorizontalAscendingIcon, iX as SortLetterHorizontalDescendingIcon, iY as SortLetterUnsortedIcon, iZ as SortLetterVerticalAscendingIcon, i_ as SortLetterVerticalDescendingIcon, i$ as Spacer, j0 as SparkleDoubleFillIcon, j1 as SparkleFillIcon, j2 as SparkleIcon, j3 as SparkleRectangleIcon, j4 as SpeechBubbleIcon, j5 as SpeechBubblePlusIcon, j6 as SpeechBubbleQuestionMarkFillIcon, j7 as SpeechBubbleQuestionMarkIcon, j8 as SpeechBubbleStarIcon, j9 as SpeedometerIcon, ja as Spinner, jb as SplitButton, jc as SqlIcon, jd as StarFillIcon, je as StarIcon, jf as StepAfterLineIcon, jg as StepBeforeLineIcon, jh as Stepper, ji as StopCircleFillIcon, jj as StopCircleIcon, jk as StopIcon, jl as StoredProcedureIcon, jm as StorefrontIcon, jn as StreamIcon, jo as StrikeThroughIcon, jp as SunIcon, jq as SyncIcon, jr as SyncSmallIcon, js as SyncToFileIcon, jt as TableAsteriskIcon, ju as TableClockIcon, jv as TableCombineIcon, jw as TableGlassesIcon, jx as TableGlobeIcon, jy as TableIcon, jz as TableLightningIcon, jA as TableMeasureIcon, jB as TableModelIcon, jC as TableReportIcon, jD as TableStreamIcon, jE as TableVectorIcon, jF as TableViewIcon, jG as Tabs, jH as Tag, jI as TagColumnIcon, jJ as TagIcon, jK as TagTableIcon, jL as TargetIcon, jM as TerminalIcon, jN as TextBoxIcon, jO as TextColorIcon, jP as TextIcon, jQ as TextJustifyIcon, jR as TextUnderlineIcon, jS as ThreeDotsIcon, jT as ThumbsDownFilledIcon, jU as ThumbsDownIcon, jV as ThumbsUpFilledIcon, jW as ThumbsUpIcon, jX as ToggleButton, jY as TokenIcon, jZ as Toolbar, j_ as TrashIcon, j$ as Tree, k0 as TreeIcon, k1 as TrendingFillIcon, k2 as TrendingIcon, k3 as TriangleIcon, k4 as TypeaheadComboboxCheckboxItem, k5 as TypeaheadComboboxFooter, k6 as TypeaheadComboboxMenuItem, k7 as TypeaheadComboboxMultiSelectStateChangeTypes, k8 as TypeaheadComboboxStateChangeTypes, k9 as UnderlineIcon, ka as UndoIcon, kb as UploadIcon, kc as UppercaseIcon, kd as UsageOverageGraphic, ke as UsageSpikeGraphic, kf as UsbIcon, kg as UserBadgeIcon, kh as UserCircleIcon, ki as UserGroupFillIcon, kj as UserGroupIcon, kk as UserIcon, kl as UserKeyIconIcon, km as UserShieldIcon, kn as UserSparkleIcon, ko as UserTeamIcon, kp as VisibleFillIcon, kq as VisibleIcon, kr as VisibleOffIcon, ks as WithDesignSystemThemeHoc, W as Wizard, a as WizardControlled, b as WizardModal, c as WizardStepContentWrapper, kt as WorkflowCodeIcon, ku as WorkflowCubeIcon, kv as WorkflowsIcon, kw as WorkspacesIcon, kx as WrenchIcon, ky as WrenchSparkleIcon, kz as XCircleFillIcon, kA as XCircleIcon, kB as YearPickerGrid, kC as ZaHorizontalIcon, kD as ZaVerticalIcon, kE as ZeroOpsIcon, kF as ZeroOpsOutlineIcon, kG as ZoomInIcon, kH as ZoomMarqueeSelection, kI as ZoomOutIcon, kJ as ZoomToFitIcon, kK as __INTERNAL_DO_NOT_USE__FormItem, kL as __INTERNAL_DO_NOT_USE__Group, kM as __INTERNAL_DO_NOT_USE__HorizontalGroup, kN as __INTERNAL_DO_NOT_USE__VerticalGroup, kO as __INTERNAL_DO_NOT_USE__wrapLegacyFormRules, kP as augmentWithDataComponentProps, kQ as dialogComboboxLookAheadKeyDown, kR as getBottomOnlyShadowScrollStyles, kS as getButtonEmotionStyles, kT as getComboboxOptionLabelStyles, kU as getDatePickerQuickActionBasic, kV as getDialogComboboxOptionLabelWidth, kW as getHorizontalTabShadowStyles, kX as getInputStyles, kY as getKeyboardNavigationFunctions, kZ as getMemoizedButtonEmotionStyles, k_ as getPaginationEmotionStyles, k$ as getPanelContainmentStyle, l0 as getRadioStyles, l1 as getRangeQuickActionsBasic, l2 as getShadowScrollStyles, l3 as getTypographyColor, l4 as getVirtualListScrollbarStyles, l5 as getVirtualListScrollbarThumbColor, l6 as getVirtualizedComboboxMenuItemStyles, l7 as getWrapperStyle, l8 as highlightFirstNonDisabledOption, l9 as isOptionDisabled, la as resetTabIndexToFocusedElement, lb as setImplicitContextGetter, lc as skipHideIconButtonActionClassName, ld as themeMemoKey, le as useAntDConfigProviderContext, lf as useCallbackOnEnter, lg as useComponentFinderContext, lh as useDesignSystemEventSuppressInteractionContext, li as useFormContext, lj as useRadioGroupContext, u as useWizardCurrentStep } from './WizardStepContentWrapper-DnwQIMN1.js';
3
3
  import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
4
4
  import { css, Global, createElement, ClassNames, keyframes } from '@emotion/react';
5
5
  import { Alert as Alert$1, AutoComplete as AutoComplete$1, Breadcrumb as Breadcrumb$1, DatePicker, Dropdown as Dropdown$1, Switch as Switch$1, Col as Col$1, Row as Row$1, Space as Space$1, notification, Popover, Skeleton, Menu as Menu$1, Steps as Steps$1 } from 'antd';
6
6
  import classnames from 'classnames';
7
- import React__default, { useState, useRef, useEffect, useCallback, useMemo, forwardRef, useImperativeHandle, createContext, useContext, Children, Fragment as Fragment$1, useLayoutEffect, useReducer } from 'react';
7
+ import React__default, { useState, useRef, useEffect, useCallback, useMemo, forwardRef, useImperativeHandle, createContext, useContext, Children, Fragment as Fragment$1, useLayoutEffect, useReducer, isValidElement } from 'react';
8
8
  import '@ant-design/icons';
9
9
  import { useMergeRefs, useFloating, autoUpdate, offset, flip, shift } from '@floating-ui/react';
10
10
  import isUndefined from 'lodash/isUndefined';
@@ -17,6 +17,15 @@ import { computePosition, flip as flip$1, size } from '@floating-ui/dom';
17
17
  import { createPortal } from 'react-dom';
18
18
  import * as RadixHoverCard from '@radix-ui/react-hover-card';
19
19
  import * as Toast from '@radix-ui/react-toast';
20
+ import { useComboBox } from '@react-aria/combobox';
21
+ import { useListBox, useOption } from '@react-aria/listbox';
22
+ import { useOverlay, useOverlayPosition, Overlay, DismissButton } from '@react-aria/overlays';
23
+ import { mergeRefs, mergeProps } from '@react-aria/utils';
24
+ import { createFocusManager } from '@react-aria/focus';
25
+ import { useButton } from '@react-aria/button';
26
+ import { useComboBoxState } from '@react-stately/combobox';
27
+ import { useFilter } from '@react-aria/i18n';
28
+ import { Item } from '@react-stately/collections';
20
29
  import 'date-fns';
21
30
  import '@radix-ui/react-popover';
22
31
  import '@radix-ui/react-dropdown-menu';
@@ -133,7 +142,8 @@ const consumerDarkColorList = {
133
142
  textValidationDanger: primitiveColors.red500,
134
143
  textValidationSuccess: primitiveColors.green500,
135
144
  textValidationWarning: primitiveColors.yellow500,
136
- tooltipBackgroundTooltip: primitiveColors.grey100
145
+ tooltipBackgroundTooltip: primitiveColors.grey100,
146
+ tooltipTextTooltip: primitiveColors.grey800
137
147
  };
138
148
 
139
149
  // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
@@ -218,7 +228,8 @@ const consumerLightColorList = {
218
228
  textValidationDanger: primitiveColors.red600,
219
229
  textValidationSuccess: primitiveColors.green600,
220
230
  textValidationWarning: primitiveColors.yellow600,
221
- tooltipBackgroundTooltip: primitiveColors.neutral800
231
+ tooltipBackgroundTooltip: primitiveColors.neutral800,
232
+ tooltipTextTooltip: primitiveColors.white
222
233
  };
223
234
 
224
235
  /**
@@ -892,35 +903,6 @@ function SvgUserIcon(props) {
892
903
  });
893
904
  }
894
905
 
895
- /**
896
- * `LegacyInfoTooltip` is deprecated in favor of the new `InfoTooltip` component
897
- * @deprecated
898
- */ const LegacyInfoTooltip = ({ title, tooltipProps, iconTitle, isKeyboardFocusable = true, ...iconProps })=>{
899
- const { theme } = useDesignSystemTheme();
900
- return /*#__PURE__*/ jsx(LegacyTooltip, {
901
- useAsLabel: true,
902
- title: title,
903
- ...tooltipProps,
904
- children: /*#__PURE__*/ jsx("span", {
905
- ...addDebugOutlineIfEnabled(),
906
- style: {
907
- display: 'inline-flex'
908
- },
909
- children: /*#__PURE__*/ jsx(LegacyInfoCircleOutlined, {
910
- tabIndex: isKeyboardFocusable ? 0 : -1,
911
- "aria-hidden": "false",
912
- "aria-label": iconTitle,
913
- alt: iconTitle,
914
- css: {
915
- fontSize: theme.typography.fontSizeSm,
916
- color: theme.colors.textSecondary
917
- },
918
- ...iconProps
919
- })
920
- })
921
- });
922
- };
923
-
924
906
  const InfoPopover = ({ children, popoverProps, iconTitle, iconProps, isKeyboardFocusable = true, ariaLabel = 'More details' })=>{
925
907
  const { theme } = useDesignSystemTheme();
926
908
  const { isInsideModal } = useModalContext();
@@ -1433,52 +1415,6 @@ const ParagraphSkeleton = ({ label, seed = '', frameRate = 60, style, loading =
1433
1415
  });
1434
1416
  };
1435
1417
 
1436
- const titleContainerStyles = /*#__PURE__*/ css({
1437
- cursor: 'progress',
1438
- width: '100%',
1439
- height: 28,
1440
- display: 'flex',
1441
- justifyContent: 'flex-start',
1442
- alignItems: 'center'
1443
- });
1444
- const titleFillStyles = /*#__PURE__*/ css({
1445
- borderRadius: 'var(--border-radius)',
1446
- height: 12,
1447
- width: '100%'
1448
- });
1449
- const TitleSkeleton = ({ label, seed = '', frameRate = 60, style, loading = true, loadingDescription = 'TitleSkeleton', ...restProps })=>{
1450
- const { theme } = useDesignSystemTheme();
1451
- const offsetWidth = getOffsets(seed)[0];
1452
- return /*#__PURE__*/ jsxs("div", {
1453
- ...addDebugOutlineIfEnabled(),
1454
- css: titleContainerStyles,
1455
- style: {
1456
- ...style,
1457
- ['--border-radius']: `${theme.general.borderRadiusBase}px`
1458
- },
1459
- ...restProps,
1460
- children: [
1461
- loading && /*#__PURE__*/ jsx(LoadingState, {
1462
- description: loadingDescription
1463
- }),
1464
- /*#__PURE__*/ jsx("span", {
1465
- css: visuallyHidden,
1466
- children: label
1467
- }),
1468
- /*#__PURE__*/ jsx("div", {
1469
- "aria-hidden": true,
1470
- css: [
1471
- titleFillStyles,
1472
- genSkeletonAnimatedColor(theme, frameRate),
1473
- {
1474
- width: `calc(100% - ${offsetWidth}px)`
1475
- }
1476
- ]
1477
- })
1478
- ]
1479
- });
1480
- };
1481
-
1482
1418
  const TableContext = /*#__PURE__*/ createContext({
1483
1419
  size: 'default',
1484
1420
  grid: false
@@ -3138,29 +3074,20 @@ children, dangerouslySetAntdProps, onClick, ...restProps }, ref) {
3138
3074
  } : {
3139
3075
  defaultChecked
3140
3076
  };
3141
- const switchControl = /*#__PURE__*/ jsxs("label", {
3077
+ const switchControl = /*#__PURE__*/ jsx("label", {
3142
3078
  ...addDebugOutlineIfEnabled(),
3143
3079
  className: rootClassName,
3144
- children: [
3145
- /*#__PURE__*/ jsx("input", {
3146
- ref: mergedRef,
3147
- type: "checkbox",
3148
- role: "switch",
3149
- id: uniqueId,
3150
- ...checkedStateProps,
3151
- onChange: handleChange,
3152
- disabled: disabled,
3153
- ...restProps,
3154
- ...eventContext.dataComponentProps
3155
- }),
3156
- /*#__PURE__*/ jsx("span", {
3157
- className: "ds-switch-track",
3158
- "aria-hidden": "true",
3159
- children: /*#__PURE__*/ jsx("span", {
3160
- className: "ds-switch-thumb"
3161
- })
3162
- })
3163
- ]
3080
+ children: /*#__PURE__*/ jsx("input", {
3081
+ ref: mergedRef,
3082
+ type: "checkbox",
3083
+ role: "switch",
3084
+ id: uniqueId,
3085
+ ...checkedStateProps,
3086
+ onChange: handleChange,
3087
+ disabled: disabled,
3088
+ ...restProps,
3089
+ ...eventContext.dataComponentProps
3090
+ })
3164
3091
  });
3165
3092
  if (!label) {
3166
3093
  return switchControl;
@@ -3212,11 +3139,11 @@ const Switch = /*#__PURE__*/ forwardRef(function Switch(props, ref) {
3212
3139
  });
3213
3140
  });
3214
3141
 
3215
- const ROOT_CSS = {
3142
+ const ROOT_CSS$1 = {
3216
3143
  display: 'inline-block',
3217
3144
  width: '100%'
3218
3145
  };
3219
- const TypeaheadComboboxRoot = /*#__PURE__*/ forwardRef(({ comboboxState, multiSelect = false, floatingStrategy = 'absolute', children, ...props }, ref)=>{
3146
+ const TypeaheadComboboxRoot$1 = /*#__PURE__*/ forwardRef(({ comboboxState, multiSelect = false, floatingStrategy = 'absolute', children, ...props }, ref)=>{
3220
3147
  const { classNamePrefix } = useDesignSystemTheme();
3221
3148
  const { refs, floatingStyles } = useFloating({
3222
3149
  whileElementsMounted: autoUpdate,
@@ -3255,7 +3182,7 @@ const TypeaheadComboboxRoot = /*#__PURE__*/ forwardRef(({ comboboxState, multiSe
3255
3182
  suppressRefError: true
3256
3183
  }),
3257
3184
  className: `${classNamePrefix}-typeahead-combobox`,
3258
- css: ROOT_CSS,
3185
+ css: ROOT_CSS$1,
3259
3186
  ...props,
3260
3187
  ref: mergedRef,
3261
3188
  "data-component-type": DesignSystemEventProviderComponentTypes.TypeaheadCombobox,
@@ -3274,7 +3201,7 @@ const TYPEAHEAD_COMBOBOX_MENU_STYLES = /*#__PURE__*/ css({
3274
3201
  alignItems: 'flex-start',
3275
3202
  position: 'absolute'
3276
3203
  });
3277
- const TypeaheadComboboxMenu = /*#__PURE__*/ forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3204
+ const TypeaheadComboboxMenu$1 = /*#__PURE__*/ forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3278
3205
  ({ comboboxState, loading, emptyText, width, minWidth = 240, maxWidth, minHeight, maxHeight, listWrapperHeight, virtualizerRef, children, matchTriggerWidth, ...restProps }, ref)=>{
3279
3206
  const { getMenuProps, isOpen } = comboboxState;
3280
3207
  const { ref: downshiftRef, ...downshiftProps } = getMenuProps({}, {
@@ -3402,7 +3329,7 @@ const TypeaheadComboboxMenu = /*#__PURE__*/ forwardRef(// eslint-disable-next-li
3402
3329
  }), getPopupContainer ? getPopupContainer() : document.body);
3403
3330
  });
3404
3331
 
3405
- const getToggleButtonStyles = (theme, disabled)=>{
3332
+ const getToggleButtonStyles$1 = (theme, disabled)=>{
3406
3333
  return /*#__PURE__*/ css({
3407
3334
  cursor: 'pointer',
3408
3335
  userSelect: 'none',
@@ -3419,7 +3346,7 @@ const getToggleButtonStyles = (theme, disabled)=>{
3419
3346
  }
3420
3347
  });
3421
3348
  };
3422
- const TypeaheadComboboxToggleButton = /*#__PURE__*/ React__default.forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3349
+ const TypeaheadComboboxToggleButton$1 = /*#__PURE__*/ React__default.forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3423
3350
  ({ disabled, ...restProps }, ref)=>{
3424
3351
  const { theme } = useDesignSystemTheme();
3425
3352
  const { onClick } = restProps;
@@ -3431,34 +3358,35 @@ const TypeaheadComboboxToggleButton = /*#__PURE__*/ React__default.forwardRef(//
3431
3358
  type: "button",
3432
3359
  "aria-label": "toggle menu",
3433
3360
  ref: ref,
3434
- css: getToggleButtonStyles(theme, disabled),
3361
+ css: getToggleButtonStyles$1(theme, disabled),
3435
3362
  ...restProps,
3436
3363
  onClick: handleClick,
3437
3364
  children: /*#__PURE__*/ jsx(ChevronDownIcon, {})
3438
3365
  });
3439
3366
  });
3440
3367
 
3441
- const TypeaheadComboboxControls = ({ getDownshiftToggleButtonProps, showClearSelectionButton, showComboboxToggleButton = true, handleClear, disabled, loading = false, inline = false, className })=>{
3368
+ /** Height of the non-inline controls block, for callers that position it themselves. */ const TYPEAHEAD_COMBOBOX_CONTROLS_HEIGHT = 16;
3369
+ const TypeaheadComboboxControls$1 = ({ getDownshiftToggleButtonProps, showClearSelectionButton, showComboboxToggleButton = true, handleClear, disabled, loading = false, inline = false, className })=>{
3442
3370
  return /*#__PURE__*/ jsxs("div", {
3443
3371
  className: className,
3444
- css: inline ? {
3372
+ css: {
3373
+ // Centers the 12px clear icon against the 16px toggle button.
3445
3374
  display: 'flex',
3446
3375
  alignItems: 'center',
3447
- cursor: disabled ? 'not-allowed' : undefined
3448
- } : {
3449
- height: 16,
3450
- zIndex: 1,
3451
- cursor: disabled ? 'not-allowed' : undefined
3376
+ cursor: disabled ? 'not-allowed' : undefined,
3377
+ ...inline ? {} : {
3378
+ height: TYPEAHEAD_COMBOBOX_CONTROLS_HEIGHT,
3379
+ zIndex: 1
3380
+ }
3452
3381
  },
3453
3382
  children: [
3454
3383
  showClearSelectionButton && /*#__PURE__*/ jsx(ClearSelectionButton, {
3455
3384
  onClick: handleClear,
3456
3385
  css: {
3457
- pointerEvents: 'all',
3458
- verticalAlign: 'text-top'
3386
+ pointerEvents: 'all'
3459
3387
  }
3460
3388
  }),
3461
- loading ? /*#__PURE__*/ jsx(LoadingSpinner, {}) : showComboboxToggleButton && /*#__PURE__*/ jsx(TypeaheadComboboxToggleButton, {
3389
+ loading ? /*#__PURE__*/ jsx(LoadingSpinner, {}) : showComboboxToggleButton && /*#__PURE__*/ jsx(TypeaheadComboboxToggleButton$1, {
3462
3390
  ...getDownshiftToggleButtonProps(),
3463
3391
  disabled: disabled
3464
3392
  })
@@ -3466,7 +3394,7 @@ const TypeaheadComboboxControls = ({ getDownshiftToggleButtonProps, showClearSel
3466
3394
  });
3467
3395
  };
3468
3396
 
3469
- const getInputStyles$1 = (theme)=>/*#__PURE__*/ css({
3397
+ const getInputStyles$3 = (theme)=>/*#__PURE__*/ css({
3470
3398
  width: '100%',
3471
3399
  minWidth: 72,
3472
3400
  textOverflow: 'ellipsis',
@@ -3481,7 +3409,7 @@ const getInputStyles$1 = (theme)=>/*#__PURE__*/ css({
3481
3409
  backgroundColor: 'transparent'
3482
3410
  }
3483
3411
  });
3484
- const TypeaheadComboboxInput = /*#__PURE__*/ forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3412
+ const TypeaheadComboboxInput$1 = /*#__PURE__*/ forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3485
3413
  ({ comboboxState, allowClear = true, showComboboxToggleButton = true, formOnChange, onClick, clearInputValueOnFocus = false, size, loading = false, suffix, ...restProps }, ref)=>{
3486
3414
  const { isInsideTypeaheadCombobox, floatingUiRefs, setInputWidth, inputWidth } = useTypeaheadComboboxContext();
3487
3415
  if (!isInsideTypeaheadCombobox) {
@@ -3561,7 +3489,7 @@ const TypeaheadComboboxInput = /*#__PURE__*/ forwardRef(// eslint-disable-next-l
3561
3489
  "aria-controls": comboboxState.isOpen ? downshiftProps['aria-controls'] : undefined,
3562
3490
  onClick: handleClick,
3563
3491
  size: size,
3564
- css: getInputStyles$1(theme),
3492
+ css: getInputStyles$3(theme),
3565
3493
  ...restProps,
3566
3494
  suffix: /*#__PURE__*/ jsxs("div", {
3567
3495
  css: /*#__PURE__*/ css({
@@ -3571,7 +3499,7 @@ const TypeaheadComboboxInput = /*#__PURE__*/ forwardRef(// eslint-disable-next-l
3571
3499
  }),
3572
3500
  children: [
3573
3501
  suffix,
3574
- /*#__PURE__*/ jsx(TypeaheadComboboxControls, {
3502
+ /*#__PURE__*/ jsx(TypeaheadComboboxControls$1, {
3575
3503
  getDownshiftToggleButtonProps: getToggleButtonProps,
3576
3504
  showClearSelectionButton: allowClear && Boolean(inputValue) && !restProps.disabled,
3577
3505
  showComboboxToggleButton: showComboboxToggleButton,
@@ -3586,7 +3514,7 @@ const TypeaheadComboboxInput = /*#__PURE__*/ forwardRef(// eslint-disable-next-l
3586
3514
  });
3587
3515
  });
3588
3516
 
3589
- const getContainerStyles = (theme, validationState, width, disabled)=>{
3517
+ const getContainerStyles$1 = (theme, validationState, width, disabled)=>{
3590
3518
  const validationColor = getValidationStateColor(theme, validationState);
3591
3519
  return /*#__PURE__*/ css({
3592
3520
  cursor: 'text',
@@ -3643,12 +3571,21 @@ const getContainerStyles = (theme, validationState, width, disabled)=>{
3643
3571
  }
3644
3572
  });
3645
3573
  };
3574
+ // One tag row (20px line height + 2px margins) plus vertical padding on both sides and the
3575
+ // container's 1px borders: 36px by default, 32px at `size="middle"`.
3576
+ const TAG_ROW_HEIGHT = 24;
3577
+ const DEFAULT_VERTICAL_PADDING = 5;
3578
+ const MIDDLE_VERTICAL_PADDING = 3;
3579
+ const getVerticalPadding = (size)=>size === 'middle' ? MIDDLE_VERTICAL_PADDING : DEFAULT_VERTICAL_PADDING;
3580
+ // Centers the shorter controls block on the tag row it floats beside.
3581
+ const CONTROLS_ROW_OFFSET = (TAG_ROW_HEIGHT - TYPEAHEAD_COMBOBOX_CONTROLS_HEIGHT) / 2;
3646
3582
  // Overflow lives on this inner wrapper so the floated, sticky controls
3647
3583
  // (rendered as the first child) stay pinned to the top-right of the visible
3648
3584
  // scroll viewport while the tag list scrolls.
3649
- const getScrollContainerStyles = (maxHeight)=>{
3585
+ const getScrollContainerStyles$1 = (maxHeight, size)=>{
3586
+ const verticalPadding = getVerticalPadding(size);
3650
3587
  return /*#__PURE__*/ css({
3651
- padding: '5px 7px 5px 12px',
3588
+ padding: `${verticalPadding}px 7px ${verticalPadding}px 12px`,
3652
3589
  overflowY: 'auto',
3653
3590
  overflowX: 'hidden',
3654
3591
  ...maxHeight ? {
@@ -3656,7 +3593,7 @@ const getScrollContainerStyles = (maxHeight)=>{
3656
3593
  } : {}
3657
3594
  });
3658
3595
  };
3659
- const getContentWrapperStyles = ()=>{
3596
+ const getContentWrapperStyles$1 = ()=>{
3660
3597
  return /*#__PURE__*/ css({
3661
3598
  display: 'flex',
3662
3599
  flex: 'auto',
@@ -3665,7 +3602,7 @@ const getContentWrapperStyles = ()=>{
3665
3602
  position: 'relative'
3666
3603
  });
3667
3604
  };
3668
- const getInputWrapperStyles = ()=>{
3605
+ const getInputWrapperStyles$1 = ()=>{
3669
3606
  return /*#__PURE__*/ css({
3670
3607
  display: 'inline-flex',
3671
3608
  position: 'relative',
@@ -3679,7 +3616,7 @@ const getInputWrapperStyles = ()=>{
3679
3616
  minWidth: 40
3680
3617
  });
3681
3618
  };
3682
- const getInputStyles = (theme)=>{
3619
+ const getInputStyles$2 = (theme)=>{
3683
3620
  return /*#__PURE__*/ css({
3684
3621
  lineHeight: 20,
3685
3622
  height: 24,
@@ -3699,8 +3636,9 @@ const getInputStyles = (theme)=>{
3699
3636
  }
3700
3637
  });
3701
3638
  };
3702
- const TypeaheadComboboxMultiSelectInput = /*#__PURE__*/ forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3703
- ({ comboboxState, multipleSelectionState, selectedItems, setSelectedItems, getSelectedItemLabel, allowClear = true, showTagAfterValueCount = 20, width, maxHeight, placeholder, validationState, showComboboxToggleButton, disableTooltip = false, ...restProps }, ref)=>{
3639
+ const TypeaheadComboboxMultiSelectInput$1 = /*#__PURE__*/ forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3640
+ ({ comboboxState, multipleSelectionState, selectedItems, setSelectedItems, getSelectedItemLabel, allowClear = true, showTagAfterValueCount = 20, width, maxHeight, placeholder, validationState, showComboboxToggleButton, disableTooltip = false, // Kept out of `restProps`: on an `input`, `size` is a character count.
3641
+ size, ...restProps }, ref)=>{
3704
3642
  const { isInsideTypeaheadCombobox } = useTypeaheadComboboxContext();
3705
3643
  if (!isInsideTypeaheadCombobox) {
3706
3644
  throw new Error('`TypeaheadComboboxMultiSelectInput` must be used within `TypeaheadCombobox`');
@@ -3872,29 +3810,30 @@ const TypeaheadComboboxMultiSelectInput = /*#__PURE__*/ forwardRef(// eslint-dis
3872
3810
  ...addDebugOutlineIfEnabled(),
3873
3811
  onClick: handleClick,
3874
3812
  ref: mergedContainerRef,
3875
- css: getContainerStyles(theme, validationState, width, restProps.disabled),
3813
+ css: getContainerStyles$1(theme, validationState, width, restProps.disabled),
3876
3814
  tabIndex: restProps.disabled ? -1 : 0,
3877
3815
  children: /*#__PURE__*/ jsxs("div", {
3878
3816
  ref: scrollContainerRef,
3879
- css: getScrollContainerStyles(maxHeight),
3817
+ css: getScrollContainerStyles$1(maxHeight, size),
3880
3818
  children: [
3881
- /*#__PURE__*/ jsx(TypeaheadComboboxControls, {
3819
+ /*#__PURE__*/ jsx(TypeaheadComboboxControls$1, {
3882
3820
  getDownshiftToggleButtonProps: getToggleButtonProps,
3883
3821
  showComboboxToggleButton: showComboboxToggleButton,
3884
3822
  showClearSelectionButton: allowClear && (Boolean(inputValue) || selectedItems && selectedItems.length > 0) && !restProps.disabled,
3885
3823
  handleClear: handleClear,
3886
3824
  disabled: restProps.disabled,
3887
- // top offset = theme.spacing.sm (8) - scroll container padding-top (5) so the
3888
- // controls sit at y=8 from the outer container, matching the pre-split layout.
3825
+ // `top` equals the flow position, so scrolling the tag list leaves the controls in
3826
+ // place on the first row.
3889
3827
  css: /*#__PURE__*/ css({
3890
3828
  position: 'sticky',
3891
- top: 3,
3829
+ top: getVerticalPadding(size) + CONTROLS_ROW_OFFSET,
3830
+ marginTop: CONTROLS_ROW_OFFSET,
3892
3831
  float: 'right'
3893
3832
  })
3894
3833
  }),
3895
3834
  /*#__PURE__*/ jsxs("div", {
3896
3835
  ref: itemsRef,
3897
- css: getContentWrapperStyles(),
3836
+ css: getContentWrapperStyles$1(),
3898
3837
  children: [
3899
3838
  selectedItemsToRender?.map((selectedItemForRender, index)=>/*#__PURE__*/ jsx(TypeaheadComboboxSelectedItem, {
3900
3839
  label: getSelectedItemLabel(selectedItemForRender),
@@ -3912,14 +3851,14 @@ const TypeaheadComboboxMultiSelectInput = /*#__PURE__*/ forwardRef(// eslint-dis
3912
3851
  disabled: restProps.disabled
3913
3852
  }),
3914
3853
  /*#__PURE__*/ jsxs("div", {
3915
- css: getInputWrapperStyles(),
3854
+ css: getInputWrapperStyles$1(),
3916
3855
  "data-slot": "input",
3917
3856
  children: [
3918
3857
  /*#__PURE__*/ jsx("input", {
3919
3858
  ...downshiftProps,
3920
3859
  ref: mergedInputRef,
3921
3860
  css: [
3922
- getInputStyles(theme),
3861
+ getInputStyles$2(theme),
3923
3862
  {
3924
3863
  width: inputWidth
3925
3864
  }
@@ -3959,7 +3898,7 @@ const TypeaheadComboboxMultiSelectInput = /*#__PURE__*/ forwardRef(// eslint-dis
3959
3898
  return content;
3960
3899
  });
3961
3900
 
3962
- const TypeaheadComboboxSectionHeader = ({ children, ...props })=>{
3901
+ const TypeaheadComboboxSectionHeader$1 = ({ children, ...props })=>{
3963
3902
  const { isInsideTypeaheadCombobox } = useTypeaheadComboboxContext();
3964
3903
  if (!isInsideTypeaheadCombobox) {
3965
3904
  throw new Error('`TypeaheadComboboxSectionHeader` must be used within `TypeaheadComboboxMenu`');
@@ -3970,7 +3909,7 @@ const TypeaheadComboboxSectionHeader = ({ children, ...props })=>{
3970
3909
  });
3971
3910
  };
3972
3911
 
3973
- const TypeaheadComboboxSeparator = (props)=>{
3912
+ const TypeaheadComboboxSeparator$1 = (props)=>{
3974
3913
  const { isInsideTypeaheadCombobox } = useTypeaheadComboboxContext();
3975
3914
  if (!isInsideTypeaheadCombobox) {
3976
3915
  throw new Error('`TypeaheadComboboxSeparator` must be used within `TypeaheadComboboxMenu`');
@@ -3980,7 +3919,7 @@ const TypeaheadComboboxSeparator = (props)=>{
3980
3919
  });
3981
3920
  };
3982
3921
 
3983
- const TypeaheadComboboxAddButton = /*#__PURE__*/ forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3922
+ const TypeaheadComboboxAddButton$1 = /*#__PURE__*/ forwardRef(// eslint-disable-next-line react-component-name/react-component-name -- TODO(FEINF-4716)
3984
3923
  ({ children, ...restProps }, forwardedRef)=>{
3985
3924
  const { theme } = useDesignSystemTheme();
3986
3925
  const { isInsideTypeaheadCombobox, componentId } = useTypeaheadComboboxContext();
@@ -4256,7 +4195,7 @@ function RHFControlledTypeaheadCombobox({ name, control, rules, allItems, itemTo
4256
4195
  rules
4257
4196
  });
4258
4197
  const [items, setItems] = useState(allItems);
4259
- const comboboxState = useComboboxState({
4198
+ const comboboxState = useComboboxState$1({
4260
4199
  allItems,
4261
4200
  items,
4262
4201
  setItems,
@@ -4286,18 +4225,18 @@ function RHFControlledTypeaheadCombobox({ name, control, rules, allItems, itemTo
4286
4225
  comboboxState.inputValue,
4287
4226
  onInputChange
4288
4227
  ]);
4289
- return /*#__PURE__*/ jsxs(TypeaheadComboboxRoot, {
4228
+ return /*#__PURE__*/ jsxs(TypeaheadComboboxRoot$1, {
4290
4229
  ...props,
4291
4230
  comboboxState: comboboxState,
4292
4231
  children: [
4293
- /*#__PURE__*/ jsx(TypeaheadComboboxInput, {
4232
+ /*#__PURE__*/ jsx(TypeaheadComboboxInput$1, {
4294
4233
  ...inputProps,
4295
4234
  validationState: validationState,
4296
4235
  formOnChange: field.onChange,
4297
4236
  comboboxState: comboboxState,
4298
4237
  ref: field.ref
4299
4238
  }),
4300
- /*#__PURE__*/ jsx(TypeaheadComboboxMenu, {
4239
+ /*#__PURE__*/ jsx(TypeaheadComboboxMenu$1, {
4301
4240
  ...menuProps,
4302
4241
  comboboxState: comboboxState,
4303
4242
  children: children({
@@ -4330,7 +4269,7 @@ function RHFControlledMultiSelectTypeaheadCombobox({ name, control, rules, allIt
4330
4269
  field.onChange(item);
4331
4270
  setSelectedItems(item);
4332
4271
  };
4333
- const comboboxState = useComboboxState({
4272
+ const comboboxState = useComboboxState$1({
4334
4273
  allItems,
4335
4274
  items,
4336
4275
  setInputValue,
@@ -4346,7 +4285,7 @@ function RHFControlledMultiSelectTypeaheadCombobox({ name, control, rules, allIt
4346
4285
  analyticsEvents,
4347
4286
  valueHasNoPii
4348
4287
  });
4349
- const multipleSelectionState = useMultipleSelectionState(selectedItems, handleItemUpdate, comboboxState);
4288
+ const multipleSelectionState = useMultipleSelectionState$1(selectedItems, handleItemUpdate, comboboxState);
4350
4289
  const lastEmmitedInputValue = useRef(inputProps?.value);
4351
4290
  useEffect(()=>{
4352
4291
  if (onInputChange && lastEmmitedInputValue.current !== comboboxState.inputValue) {
@@ -4357,11 +4296,11 @@ function RHFControlledMultiSelectTypeaheadCombobox({ name, control, rules, allIt
4357
4296
  comboboxState.inputValue,
4358
4297
  onInputChange
4359
4298
  ]);
4360
- return /*#__PURE__*/ jsxs(TypeaheadComboboxRoot, {
4299
+ return /*#__PURE__*/ jsxs(TypeaheadComboboxRoot$1, {
4361
4300
  ...props,
4362
4301
  comboboxState: comboboxState,
4363
4302
  children: [
4364
- /*#__PURE__*/ jsx(TypeaheadComboboxMultiSelectInput, {
4303
+ /*#__PURE__*/ jsx(TypeaheadComboboxMultiSelectInput$1, {
4365
4304
  ...inputProps,
4366
4305
  multipleSelectionState: multipleSelectionState,
4367
4306
  selectedItems: selectedItems,
@@ -4371,7 +4310,7 @@ function RHFControlledMultiSelectTypeaheadCombobox({ name, control, rules, allIt
4371
4310
  validationState: validationState,
4372
4311
  ref: field.ref
4373
4312
  }),
4374
- /*#__PURE__*/ jsx(TypeaheadComboboxMenu, {
4313
+ /*#__PURE__*/ jsx(TypeaheadComboboxMenu$1, {
4375
4314
  ...menuProps,
4376
4315
  comboboxState: comboboxState,
4377
4316
  children: children({
@@ -4544,10 +4483,9 @@ const FormUI = {
4544
4483
  HorizontalFormRow
4545
4484
  };
4546
4485
 
4547
- const Col = ({ dangerouslySetAntdProps, ...props })=>/*#__PURE__*/ jsx(DesignSystemAntDConfigProvider, {
4486
+ const Col = (props)=>/*#__PURE__*/ jsx(DesignSystemAntDConfigProvider, {
4548
4487
  children: /*#__PURE__*/ jsx(Col$1, {
4549
- ...props,
4550
- ...dangerouslySetAntdProps
4488
+ ...props
4551
4489
  })
4552
4490
  });
4553
4491
 
@@ -6420,11 +6358,1727 @@ const TreeGrid = ({ data, columns, renderCell, renderRow, renderTable, renderHea
6420
6358
  });
6421
6359
  };
6422
6360
 
6361
+ const ROOT_CSS = {
6362
+ display: 'inline-block',
6363
+ width: '100%',
6364
+ position: 'relative'
6365
+ };
6366
+ // `any` matches the original Root's pattern: ComboBoxState is invariant in T, so we can't widen
6367
+ // ComboboxStateValue<T> at this generic boundary. Typed consumer code still routes through
6368
+ // useComboboxState.
6369
+ const TypeaheadComboboxRoot = /*#__PURE__*/ forwardRef(function TypeaheadComboboxRoot({ comboboxState, children, footerFocusable = true, ...props }, ref) {
6370
+ const { classNamePrefix } = useDesignSystemTheme();
6371
+ const inputRef = useRef(null);
6372
+ const listBoxRef = useRef(null);
6373
+ const popoverRef = useRef(null);
6374
+ const buttonRef = useRef(null);
6375
+ const triggerRef = useRef(null);
6376
+ const footerRef = useRef(null);
6377
+ const { state, itemsByKey, getKeyForItem, itemToString, removeByKey, clearSelection, onInputBlur } = comboboxState;
6378
+ const { inputProps: ariaInputProps, listBoxProps, buttonProps } = useComboBox({
6379
+ inputRef,
6380
+ listBoxRef,
6381
+ popoverRef,
6382
+ buttonRef,
6383
+ // Arrowing past the last option wraps to the first (and vice versa), matching the original
6384
+ // downshift TypeaheadCombobox, whose `useCombobox` defaults to `circularNavigation: true`.
6385
+ // react-aria's `useSelectableCollection` defaults `shouldFocusWrap` to false, so without this
6386
+ // keyboard focus stops dead at the list boundary.
6387
+ shouldFocusWrap: true,
6388
+ 'aria-label': props['aria-label']
6389
+ }, state);
6390
+ // Compose the consumer's formOnBlur onto react-aria's own input onBlur (which drives the
6391
+ // commit-on-blur), rather than clobbering it. useComboBox owns the value re-sync; we only add
6392
+ // the form notification on a genuine blur.
6393
+ const inputProps = useMemo(()=>({
6394
+ ...ariaInputProps,
6395
+ onBlur: (e)=>{
6396
+ ariaInputProps.onBlur?.(e);
6397
+ // Only notify the form on a *real* blur — focus leaving the whole widget. Committing a
6398
+ // selection (and Tab-to-footer when footerFocusable) transiently blurs the input to a node
6399
+ // still inside the trigger/popover and refocuses; treating that as a blur would fire
6400
+ // formOnBlur mid-interaction, diverging from RHF touched/validation semantics. Skip when
6401
+ // focus lands on a node still inside the combobox.
6402
+ const next = e.relatedTarget;
6403
+ if (next instanceof Node && (triggerRef.current?.contains(next) || popoverRef.current?.contains(next))) {
6404
+ return;
6405
+ }
6406
+ onInputBlur();
6407
+ }
6408
+ }), [
6409
+ ariaInputProps,
6410
+ onInputBlur,
6411
+ triggerRef,
6412
+ popoverRef
6413
+ ]);
6414
+ const { elementRef: viewRef } = useNotifyOnFirstView({
6415
+ onView: comboboxState.onView,
6416
+ value: comboboxState.firstOnViewValue
6417
+ });
6418
+ const mergedRef = useCallback((node)=>{
6419
+ if (typeof ref === 'function') ref(node);
6420
+ else if (ref) ref.current = node;
6421
+ viewRef.current = node;
6422
+ triggerRef.current = node;
6423
+ }, [
6424
+ ref,
6425
+ viewRef
6426
+ ]);
6427
+ const contextValue = useMemo(()=>({
6428
+ componentId: comboboxState.componentId,
6429
+ multiSelect: comboboxState.multiSelect,
6430
+ isInsideTypeaheadCombobox: true,
6431
+ comboBoxState: state,
6432
+ inputProps,
6433
+ listBoxProps,
6434
+ buttonProps,
6435
+ inputRef,
6436
+ listBoxRef,
6437
+ popoverRef,
6438
+ buttonRef,
6439
+ triggerRef,
6440
+ footerFocusable,
6441
+ footerRef,
6442
+ itemsByKey,
6443
+ getKeyForItem,
6444
+ itemToString,
6445
+ removeByKey,
6446
+ clearSelection
6447
+ }), [
6448
+ comboboxState.componentId,
6449
+ comboboxState.multiSelect,
6450
+ state,
6451
+ inputProps,
6452
+ listBoxProps,
6453
+ buttonProps,
6454
+ footerFocusable,
6455
+ itemsByKey,
6456
+ getKeyForItem,
6457
+ itemToString,
6458
+ removeByKey,
6459
+ clearSelection
6460
+ ]);
6461
+ return /*#__PURE__*/ jsx(TypeaheadComboboxReactAriaContextProvider, {
6462
+ value: contextValue,
6463
+ children: /*#__PURE__*/ jsx("div", {
6464
+ className: `${classNamePrefix}-typeahead-combobox-react-aria`,
6465
+ css: ROOT_CSS,
6466
+ ...props,
6467
+ ref: mergedRef,
6468
+ "data-component-type": DesignSystemEventProviderComponentTypes.TypeaheadCombobox,
6469
+ // eslint-disable-next-line @databricks/no-dynamic-property-value -- Valid case, as combostate componentId is checked in the hook exempt:b9d30633-6d2c-4215-8451-f32826273087
6470
+ "data-component-id": comboboxState.componentId,
6471
+ children: children
6472
+ })
6473
+ });
6474
+ });
6475
+
6476
+ // PROTOTYPE helper (DUBOIS-455, "Option A"): move DOM focus between the combobox input and the
6477
+ // footer's focusable controls. Only used when `footerFocusable` is set on the Root.
6478
+ //
6479
+ // Backed by react-aria's `createFocusManager` rather than a hand-rolled `querySelector`. The manager
6480
+ // walks the footer with `getFocusableTreeWalker`, whose node filter runs through `isFocusable` — so
6481
+ // it skips `display:none` / `visibility:hidden` / ancestor-hidden / `inert` / closed-`<details>`
6482
+ // controls that a raw CSS selector would wrongly match (and then `.focus()` as a no-op, stranding
6483
+ // focus). It also gives ordered `focusNext` / `focusPrevious`, so a footer with more than one control
6484
+ // navigates correctly instead of always landing on the first one.
6485
+ /**
6486
+ * Focus the first tabbable control in `container`. Returns true only if focus actually moved onto a
6487
+ * control inside `container` — react-aria skips non-visible/inert nodes and `.focus()` on them is a
6488
+ * no-op, so we confirm against the resulting element rather than assuming a query match succeeded.
6489
+ */ function focusFirstFocusable(container) {
6490
+ if (!container) {
6491
+ return false;
6492
+ }
6493
+ const focused = createFocusManager({
6494
+ current: container
6495
+ }).focusFirst({
6496
+ tabbable: true
6497
+ });
6498
+ return focused != null && container.contains(focused);
6499
+ }
6500
+ /**
6501
+ * Step focus to the adjacent tabbable control within `container`, starting from the currently focused
6502
+ * element. Returns true if focus moved to another control in `container`; false when there is none in
6503
+ * that direction (Shift+Tab from the first control, or forward Tab from the last) — the caller's cue
6504
+ * to return focus to the input instead of letting it escape the popover.
6505
+ */ function focusAdjacentFocusable(container, direction) {
6506
+ if (!container) {
6507
+ return false;
6508
+ }
6509
+ const active = document.activeElement;
6510
+ if (!(active instanceof HTMLElement) || !container.contains(active)) {
6511
+ return false;
6512
+ }
6513
+ const manager = createFocusManager({
6514
+ current: container
6515
+ });
6516
+ const focused = direction === 'next' ? manager.focusNext({
6517
+ from: active,
6518
+ tabbable: true
6519
+ }) : manager.focusPrevious({
6520
+ from: active,
6521
+ tabbable: true
6522
+ });
6523
+ return focused != null && container.contains(focused);
6524
+ }
6525
+
6526
+ // Menu identifies the footer by component type (`child.type === TypeaheadComboboxFooter`), so no
6527
+ // marker prop is needed — `defaultProps` on a function component is removed in React 19.
6528
+ const TypeaheadComboboxFooter = ({ children, onKeyDown, ...restProps })=>{
6529
+ const { theme } = useDesignSystemTheme();
6530
+ const { isInsideTypeaheadCombobox, footerFocusable, footerRef, inputRef, comboBoxState } = useTypeaheadComboboxReactAriaContext();
6531
+ if (!isInsideTypeaheadCombobox) {
6532
+ throw new Error('`TypeaheadComboboxFooter` must be used within `TypeaheadComboboxMenu`');
6533
+ }
6534
+ // PROTOTYPE (DUBOIS-455, "Option A"): the return leg. When footerFocusable and focus is inside the
6535
+ // footer, Tab / Shift+Tab step between the footer's controls, and Escape (or stepping off either
6536
+ // end) sends DOM focus back to the input so the user can resume typing. The menu stays open on the
6537
+ // return leg — the Menu gates useOverlay's close-on-blur for focus moving to the input.
6538
+ const setFooterRef = useCallback((node)=>{
6539
+ if (footerFocusable) {
6540
+ footerRef.current = node;
6541
+ }
6542
+ }, [
6543
+ footerFocusable,
6544
+ footerRef
6545
+ ]);
6546
+ const returnFocusToInput = (e, close)=>{
6547
+ e.preventDefault();
6548
+ e.stopPropagation();
6549
+ inputRef.current?.focus();
6550
+ if (close) {
6551
+ comboBoxState?.close();
6552
+ }
6553
+ };
6554
+ const handleKeyDown = (e)=>{
6555
+ onKeyDown?.(e);
6556
+ if (!footerFocusable) {
6557
+ return;
6558
+ }
6559
+ if (e.key === 'Escape') {
6560
+ returnFocusToInput(e, true);
6561
+ return;
6562
+ }
6563
+ if (e.key === 'Tab') {
6564
+ // Step to the adjacent footer control; if there is none in that direction (Shift+Tab from the
6565
+ // first control, forward Tab from the last), return to the input instead of letting focus
6566
+ // escape the popover. A single-control footer returns on the first Tab either way.
6567
+ const moved = focusAdjacentFocusable(footerRef.current, e.shiftKey ? 'previous' : 'next');
6568
+ if (moved) {
6569
+ e.preventDefault();
6570
+ e.stopPropagation();
6571
+ } else {
6572
+ returnFocusToInput(e, false);
6573
+ }
6574
+ }
6575
+ };
6576
+ return /*#__PURE__*/ jsx("div", {
6577
+ ...restProps,
6578
+ ref: setFooterRef,
6579
+ onKeyDown: handleKeyDown,
6580
+ css: getFooterStyles(theme),
6581
+ children: children
6582
+ });
6583
+ };
6584
+
6585
+ const MENU_STYLES = /*#__PURE__*/ css({
6586
+ padding: 0,
6587
+ margin: 0,
6588
+ display: 'flex',
6589
+ flexDirection: 'column',
6590
+ alignItems: 'flex-start',
6591
+ listStyle: 'none',
6592
+ outline: 'none'
6593
+ });
6594
+ const TypeaheadComboboxMenu = /*#__PURE__*/ forwardRef(function TypeaheadComboboxMenu(props, _ref) {
6595
+ const ctx = useTypeaheadComboboxReactAriaContext();
6596
+ if (!ctx.isInsideTypeaheadCombobox) {
6597
+ throw new Error('`TypeaheadComboboxMenu` must be used within `TypeaheadComboboxRoot`');
6598
+ }
6599
+ if (!ctx.comboBoxState || !ctx.comboBoxState.isOpen) return null;
6600
+ return /*#__PURE__*/ jsx(TypeaheadComboboxMenuContents, {
6601
+ ...props,
6602
+ state: ctx.comboBoxState,
6603
+ rawListBoxProps: ctx.listBoxProps,
6604
+ listBoxRef: ctx.listBoxRef,
6605
+ popoverRef: ctx.popoverRef,
6606
+ triggerRef: ctx.triggerRef,
6607
+ triggerWidth: ctx.triggerWidth,
6608
+ inputRef: ctx.inputRef,
6609
+ footerFocusable: ctx.footerFocusable
6610
+ });
6611
+ });
6612
+ const TypeaheadComboboxMenuContents = ({ loading, emptyText, width, minWidth = 240, maxWidth, minHeight, maxHeight, listWrapperHeight, virtualizerRef, children, matchTriggerWidth, state, rawListBoxProps, listBoxRef, popoverRef, triggerRef, triggerWidth, inputRef, footerFocusable, ...restProps })=>{
6613
+ const { theme } = useDesignSystemTheme();
6614
+ const { getPopupContainer } = useDesignSystemContext();
6615
+ const { isInsideRadixModal } = useRadixModalContext();
6616
+ // useOverlayPosition already caps to the viewport; only forward numeric maxHeight to tighten further.
6617
+ const popoverMaxHeight = typeof maxHeight === 'number' ? maxHeight : undefined;
6618
+ // We compose useOverlay + useOverlayPosition directly instead of usePopover because usePopover
6619
+ // hard-wires `onClose` into the position hook (usePopover.ts), which makes react-aria close the
6620
+ // menu on *any* scroll whose target contains the trigger (useCloseOnScroll) — including page
6621
+ // scroll. The original floating-ui combobox repositioned on scroll instead of closing. Passing
6622
+ // `onClose: null` to useOverlayPosition preserves that reposition-don't-close behavior. Dismissal
6623
+ // still happens via blur/outside-click (useComboBox + shouldCloseOnBlur) and Escape (useOverlay).
6624
+ const { overlayProps: dismissProps } = useOverlay({
6625
+ isOpen: state.isOpen,
6626
+ onClose: state.close,
6627
+ shouldCloseOnBlur: true,
6628
+ // Dismiss on outside press. With isDismissable:false, useOverlay wires NO interact-outside
6629
+ // handler and dismissal rides entirely on onBlurWithin — which deliberately does NOT close
6630
+ // when the blur's relatedTarget is null (focus falling to <body>). Clicking empty page area,
6631
+ // or clicking through the count-badge Tooltip that wraps the trigger, produces exactly that
6632
+ // null-relatedTarget blur, so the menu got stuck open (only the chevron, which toggles
6633
+ // directly, could close it). isDismissable:true activates useInteractOutside, which closes on
6634
+ // any outside pointer-down regardless of focus. This is independent of the scroll behavior:
6635
+ // useOverlayPosition still gets onClose:null below, so scrolling repositions, never closes.
6636
+ isDismissable: true,
6637
+ // PROTOTYPE (DUBOIS-455, "Option A"): when the footer is focusable, moving focus from the
6638
+ // footer BACK to the input leaves the popover and would trip useOverlay's close-on-blur —
6639
+ // closing the menu and wiping the typed filter. Gate that: don't treat the input as "outside".
6640
+ // (No-op when footerFocusable is false, so default behavior is unchanged.)
6641
+ ...footerFocusable ? {
6642
+ shouldCloseOnInteractOutside: (element)=>!inputRef.current?.contains(element)
6643
+ } : {}
6644
+ }, popoverRef);
6645
+ const { overlayProps: positionProps } = useOverlayPosition({
6646
+ targetRef: triggerRef,
6647
+ overlayRef: popoverRef,
6648
+ isOpen: state.isOpen,
6649
+ placement: 'bottom start',
6650
+ offset: 4,
6651
+ maxHeight: popoverMaxHeight,
6652
+ onClose: null
6653
+ });
6654
+ const popoverProps = {
6655
+ ...dismissProps,
6656
+ ...positionProps
6657
+ };
6658
+ // PROTOTYPE (DUBOIS-455, "Option A"): because the Menu runs with <Overlay disableFocusManagement>
6659
+ // (no FocusScope), react-aria does NOT restore focus on close. If the menu closes (Escape, select,
6660
+ // outside-click) while focus is on the footer, focus would strand on <body> — a WCAG 2.4.3 gap. On
6661
+ // unmount (menu close), if focus is still inside the popover, hand it back to the input.
6662
+ //
6663
+ // MUST be a layout effect, not a passive useEffect: a passive cleanup runs AFTER the commit that
6664
+ // detaches the popover, and removing the focused footer button drops focus to <body> first — so the
6665
+ // `popover.contains(document.activeElement)` guard would already be false and the handoff would never
6666
+ // fire. A layout-effect cleanup runs before detachment, while focus is still on the footer.
6667
+ useIsomorphicLayoutEffect(()=>{
6668
+ if (!footerFocusable) {
6669
+ return;
6670
+ }
6671
+ // Capture both nodes here rather than reading .current in the cleanup: by teardown the refs may
6672
+ // already have been detached, so the cleanup would see null and skip the focus handoff.
6673
+ const popover = popoverRef.current;
6674
+ const input = inputRef.current;
6675
+ return ()=>{
6676
+ if (popover && popover.contains(document.activeElement)) {
6677
+ input?.focus();
6678
+ }
6679
+ };
6680
+ }, [
6681
+ footerFocusable,
6682
+ popoverRef,
6683
+ inputRef
6684
+ ]);
6685
+ const isVirtualized = virtualizerRef !== undefined;
6686
+ const { listBoxProps } = useListBox({
6687
+ ...rawListBoxProps,
6688
+ isVirtualized
6689
+ }, state, listBoxRef);
6690
+ // mergeRefs fans the listbox node out to both refs; memoized so it isn't detached/reattached
6691
+ // on every render.
6692
+ const setListBoxRef = useMemo(()=>mergeRefs(listBoxRef, virtualizerRef), [
6693
+ listBoxRef,
6694
+ virtualizerRef
6695
+ ]);
6696
+ const hasFragmentWrapper = children && !Array.isArray(children) && /*#__PURE__*/ isValidElement(children) && children.type === Fragment$1;
6697
+ const filterableChildren = hasFragmentWrapper ? children.props.children : children;
6698
+ const [menuItemChildren, footer] = Children.toArray(filterableChildren).reduce((acc, child)=>{
6699
+ const isFooter = /*#__PURE__*/ isValidElement(child) && child.type === TypeaheadComboboxFooter;
6700
+ if (isFooter) acc[1].push(child);
6701
+ else acc[0].push(child);
6702
+ return acc;
6703
+ }, [
6704
+ [],
6705
+ []
6706
+ ]);
6707
+ const hasResults = menuItemChildren.length > 0;
6708
+ const close = ()=>state.close();
6709
+ // Inside a focus-trapped Radix modal, portal the menu into the modal's Dialog.Content
6710
+ // (role="document" — the FocusScope boundary) instead of document.body. Otherwise focusing a
6711
+ // footer control (footerFocusable) lands focus outside the trap and Radix immediately refocuses
6712
+ // the input. We target the role="document" node specifically, NOT the inner .modal-content div
6713
+ // (which is centered with a `transform`, and a transformed ancestor would become the containing
6714
+ // block for the menu's position: fixed and clip it). triggerRef sits inside the modal body, so
6715
+ // closest() resolves the content node once the trigger is mounted (always true when the menu is open).
6716
+ const modalContentNode = isInsideRadixModal && triggerRef.current ? triggerRef.current.closest('[role="document"]') : null;
6717
+ const portalContainer = modalContentNode ?? (getPopupContainer ? getPopupContainer() : undefined);
6718
+ return(// disableFocusManagement: the combobox input owns focus throughout (options are virtually
6719
+ // focused via aria-activedescendant), so the Overlay's default FocusScope must not move or
6720
+ // restore focus into the popover.
6721
+ /*#__PURE__*/ jsx(Overlay, {
6722
+ portalContainer: portalContainer,
6723
+ disableFocusManagement: true,
6724
+ children: /*#__PURE__*/ jsxs("div", {
6725
+ ref: popoverRef,
6726
+ ...popoverProps,
6727
+ // Chrome (border, background, radius, shadow) + sizing live on the popover container so they
6728
+ // wrap the option list AND the footer/spinner. `overflow: hidden` + a flex column make the
6729
+ // <ul> the only scroll area, so the footer stays pinned below it inside the same container.
6730
+ css: [
6731
+ getComboboxContentWrapperStyles(theme, {
6732
+ maxHeight,
6733
+ maxWidth,
6734
+ minHeight,
6735
+ minWidth,
6736
+ width
6737
+ }),
6738
+ {
6739
+ display: 'flex',
6740
+ flexDirection: 'column',
6741
+ overflow: 'hidden'
6742
+ }
6743
+ ],
6744
+ style: {
6745
+ ...popoverProps.style,
6746
+ // react-aria hard-codes zIndex: 100000 on the overlay, which sits *above* Du Bois
6747
+ // tooltips (zIndexBase + 70) — burying both the multi-select tooltip and in-menu
6748
+ // InfoTooltips. Bring the menu into the Du Bois band (matching Popover, zIndexBase + 30):
6749
+ // still above modals (zIndexBase) and page content, but below tooltips as designed.
6750
+ zIndex: theme.options.zIndexBase + 30,
6751
+ ...matchTriggerWidth && triggerWidth ? {
6752
+ width: triggerWidth
6753
+ } : {}
6754
+ },
6755
+ children: [
6756
+ /*#__PURE__*/ jsx(DismissButton, {
6757
+ onDismiss: close
6758
+ }),
6759
+ loading && /*#__PURE__*/ jsx(LoadingSpinner, {
6760
+ "aria-label": "Loading",
6761
+ alt: "Loading spinner"
6762
+ }),
6763
+ /*#__PURE__*/ jsx("ul", {
6764
+ ...addDebugOutlineIfEnabled(),
6765
+ "aria-busy": loading,
6766
+ ...listBoxProps,
6767
+ ref: setListBoxRef,
6768
+ // Inner scroll area only — chrome/sizing moved to the container above. `position: relative`
6769
+ // makes the <ul> the containing block for the absolutely-positioned virtualized rows AND
6770
+ // the offsetParent that useScrollOptionIntoView's offsetTop/scrollTop math depends on —
6771
+ // both break together if it is removed. MENU_STYLES keeps `padding: 0`: the virtual rows'
6772
+ // translateY offsets are measured from the <ul>'s padding-box origin, so adding padding
6773
+ // here would shift every row.
6774
+ css: [
6775
+ MENU_STYLES,
6776
+ {
6777
+ position: 'relative',
6778
+ flex: '1 1 auto',
6779
+ minHeight: 0,
6780
+ overflowY: 'auto',
6781
+ width: '100%'
6782
+ }
6783
+ ],
6784
+ ...restProps,
6785
+ children: !loading && (hasResults ? /*#__PURE__*/ jsxs(Fragment, {
6786
+ children: [
6787
+ menuItemChildren,
6788
+ listWrapperHeight ? // role="none" removes this spacer from the accessibility tree so the listbox still
6789
+ // owns only options. Keep it attribute-free: do NOT add any aria-* attribute, no id
6790
+ // (especially one targeted by aria-activedescendant), no tabindex, and keep it
6791
+ // non-focusable — per WAI-ARIA 1.2 §5.4, any of those makes the browser ignore
6792
+ // role="none" and expose this node as a spurious owned child of the listbox.
6793
+ // flexShrink: 0 stops the flex column from compressing the scroll-height carrier.
6794
+ /*#__PURE__*/ jsx("li", {
6795
+ role: "none",
6796
+ style: {
6797
+ height: listWrapperHeight,
6798
+ flexShrink: 0
6799
+ }
6800
+ }) : null
6801
+ ]
6802
+ }) : /*#__PURE__*/ jsx(EmptyResults, {
6803
+ emptyText: emptyText
6804
+ }))
6805
+ }),
6806
+ !loading && footer,
6807
+ /*#__PURE__*/ jsx(DismissButton, {
6808
+ onDismiss: close
6809
+ })
6810
+ ]
6811
+ })
6812
+ }));
6813
+ };
6814
+
6815
+ const TypeaheadComboboxCheckboxItemInner = ({ item, selectedItems, selectedMatcher, textOverflowMode = 'multiline', isDisabled, disabledReason, hintContent, children, ...restProps }, forwardedRef)=>{
6816
+ const ctx = useTypeaheadComboboxReactAriaContext();
6817
+ if (!ctx.isInsideTypeaheadCombobox || !ctx.comboBoxState) {
6818
+ throw new Error('`TypeaheadComboboxCheckboxItem` must be used within an open `TypeaheadComboboxRoot`');
6819
+ }
6820
+ const { comboBoxState: state, getKeyForItem } = ctx;
6821
+ const { theme } = useDesignSystemTheme();
6822
+ const itemRef = useRef(null);
6823
+ const setRef = useCallback((node)=>{
6824
+ itemRef.current = node;
6825
+ if (typeof forwardedRef === 'function') forwardedRef(node);
6826
+ else if (forwardedRef) forwardedRef.current = node;
6827
+ }, [
6828
+ forwardedRef
6829
+ ]);
6830
+ const key = getKeyForItem(item);
6831
+ const { optionProps, isFocused } = useOption({
6832
+ key,
6833
+ 'aria-label': typeof children === 'string' ? children : undefined
6834
+ }, state, itemRef);
6835
+ const isSelected = selectedMatcher && selectedItems ? selectedItems.some((selectedItem)=>selectedMatcher(selectedItem, item)) : state.selectionManager.isSelected(key);
6836
+ useScrollOptionIntoView(itemRef, isFocused, state.isOpen);
6837
+ return /*#__PURE__*/ jsx("li", {
6838
+ ...optionProps,
6839
+ ref: setRef,
6840
+ css: [
6841
+ getComboboxOptionItemWrapperStyles(theme),
6842
+ getMenuItemStyles(theme, isFocused, isDisabled)
6843
+ ],
6844
+ ...restProps,
6845
+ children: /*#__PURE__*/ jsx(Checkbox, {
6846
+ componentId: "design_system.typeahead_combobox_react_aria.checkbox_item",
6847
+ disabled: isDisabled,
6848
+ isChecked: isSelected,
6849
+ css: getCheckboxStyles(theme, textOverflowMode),
6850
+ tabIndex: -1,
6851
+ onClick: (e)=>e.stopPropagation(),
6852
+ children: /*#__PURE__*/ jsxs("label", {
6853
+ children: [
6854
+ isDisabled && disabledReason ? /*#__PURE__*/ jsxs("div", {
6855
+ css: {
6856
+ display: 'flex'
6857
+ },
6858
+ children: [
6859
+ /*#__PURE__*/ jsx("div", {
6860
+ children: children
6861
+ }),
6862
+ /*#__PURE__*/ jsx("div", {
6863
+ css: getInfoIconStyles(theme),
6864
+ children: /*#__PURE__*/ jsx(InfoTooltip, {
6865
+ componentId: "typeahead-combobox-react-aria-checkbox-item-disabled-reason-info-tooltip",
6866
+ content: disabledReason
6867
+ })
6868
+ })
6869
+ ]
6870
+ }) : children,
6871
+ /*#__PURE__*/ jsx(HintRow, {
6872
+ disabled: isDisabled,
6873
+ children: hintContent
6874
+ })
6875
+ ]
6876
+ })
6877
+ })
6878
+ });
6879
+ };
6880
+ const TypeaheadComboboxCheckboxItem = /*#__PURE__*/ forwardRef(TypeaheadComboboxCheckboxItemInner);
6881
+
6882
+ const getToggleButtonStyles = (theme, disabled)=>/*#__PURE__*/ css({
6883
+ cursor: 'pointer',
6884
+ userSelect: 'none',
6885
+ color: theme.colors.textSecondary,
6886
+ backgroundColor: 'transparent',
6887
+ border: 'none',
6888
+ padding: 0,
6889
+ marginLeft: theme.spacing.xs,
6890
+ height: 16,
6891
+ width: 16,
6892
+ ...disabled && {
6893
+ pointerEvents: 'none',
6894
+ color: theme.colors.actionDisabledText
6895
+ }
6896
+ });
6897
+ const TypeaheadComboboxToggleButton = ({ disabled })=>{
6898
+ const { theme } = useDesignSystemTheme();
6899
+ const { buttonProps: ariaButtonProps, buttonRef } = useTypeaheadComboboxReactAriaContext();
6900
+ const { buttonProps } = useButton({
6901
+ ...ariaButtonProps,
6902
+ isDisabled: disabled
6903
+ }, buttonRef);
6904
+ return /*#__PURE__*/ jsx("button", {
6905
+ type: "button",
6906
+ "aria-label": "toggle menu",
6907
+ ref: (el)=>{
6908
+ buttonRef.current = el;
6909
+ },
6910
+ css: getToggleButtonStyles(theme, disabled),
6911
+ ...buttonProps,
6912
+ children: /*#__PURE__*/ jsx(ChevronDownIcon, {})
6913
+ });
6914
+ };
6915
+
6916
+ const TypeaheadComboboxControls = ({ showClearSelectionButton, showComboboxToggleButton = true, handleClear, disabled, loading = false, inline = false, className })=>{
6917
+ return /*#__PURE__*/ jsxs("div", {
6918
+ className: className,
6919
+ css: inline ? {
6920
+ display: 'flex',
6921
+ alignItems: 'center',
6922
+ cursor: disabled ? 'not-allowed' : undefined
6923
+ } : {
6924
+ height: 16,
6925
+ zIndex: 1,
6926
+ cursor: disabled ? 'not-allowed' : undefined
6927
+ },
6928
+ children: [
6929
+ showClearSelectionButton && /*#__PURE__*/ jsx(ClearSelectionButton, {
6930
+ onClick: handleClear,
6931
+ css: {
6932
+ pointerEvents: 'all',
6933
+ verticalAlign: 'text-top'
6934
+ }
6935
+ }),
6936
+ loading ? /*#__PURE__*/ jsx(LoadingSpinner, {}) : showComboboxToggleButton && /*#__PURE__*/ jsx(TypeaheadComboboxToggleButton, {
6937
+ disabled: disabled
6938
+ })
6939
+ ]
6940
+ });
6941
+ };
6942
+
6943
+ const getInputStyles$1 = (theme)=>/*#__PURE__*/ css({
6944
+ width: '100%',
6945
+ minWidth: 72,
6946
+ textOverflow: 'ellipsis',
6947
+ borderRadius: theme.borders.borderRadiusSm,
6948
+ borderColor: theme.colors.actionDefaultBorderDefault,
6949
+ '&:disabled': {
6950
+ borderColor: theme.colors.actionDisabledBorder,
6951
+ backgroundColor: theme.colors.actionDisabledBackground,
6952
+ color: theme.colors.actionDisabledText
6953
+ },
6954
+ '&:not(:disabled)': {
6955
+ backgroundColor: 'transparent'
6956
+ }
6957
+ });
6958
+ const TypeaheadComboboxInput = /*#__PURE__*/ forwardRef(function TypeaheadComboboxInput({ allowClear = true, showComboboxToggleButton = true, onClick, size, loading = false, suffix, ...restProps }, ref) {
6959
+ const ctx = useTypeaheadComboboxReactAriaContext();
6960
+ if (!ctx.isInsideTypeaheadCombobox) {
6961
+ throw new Error('`TypeaheadComboboxInput` must be used within `TypeaheadComboboxRoot`');
6962
+ }
6963
+ const { inputProps, inputRef, comboBoxState: state, setTriggerWidth, triggerRef, componentId, clearSelection, footerFocusable, footerRef } = ctx;
6964
+ const { theme } = useDesignSystemTheme();
6965
+ // Measure trigger so `matchTriggerWidth` on Menu can size to it. Must be a passive effect, not
6966
+ // useLayoutEffect: triggerRef points at the Root <div> (an ancestor), whose ref is attached
6967
+ // only after this child's layout effects run — reading it in useLayoutEffect sees null and
6968
+ // never sets triggerWidth (the menu then falls back to its min width).
6969
+ useEffect(()=>{
6970
+ const node = triggerRef.current;
6971
+ if (!node) return;
6972
+ const width = node.getBoundingClientRect().width;
6973
+ setTriggerWidth(width);
6974
+ }, [
6975
+ triggerRef,
6976
+ setTriggerWidth
6977
+ ]);
6978
+ const handleClear = ()=>{
6979
+ // clearSelection() already notifies the form via the hook-level formOnChange(null).
6980
+ clearSelection();
6981
+ };
6982
+ const handleClick = (e)=>{
6983
+ onClick?.(e);
6984
+ // Open-only: toggling on every click would flicker on repeat clicks. Toggle button + outside-click close.
6985
+ if (state && !state.isOpen) state.open();
6986
+ };
6987
+ // PROTOTYPE (DUBOIS-455, "Option A"): when footerFocusable, forward-Tab moves DOM focus into the
6988
+ // footer instead of committing. Must run in the CAPTURE phase — useComboBox binds Tab to
6989
+ // commit()->closeMenu() in the bubble phase, and that would close the menu (unmounting the footer)
6990
+ // before our handler ran. stopPropagation prevents react-aria's bubble handler from also firing;
6991
+ // preventDefault stops the browser's native tab. Shift+Tab is left alone (handled in the footer).
6992
+ //
6993
+ // react-aria coupling (RE-VERIFY ON UPGRADE): this works only because react-aria exposes its Tab
6994
+ // handler as a React `onKeyDown` prop on this same input (useComboBox inputProps, bubble phase),
6995
+ // which a capture-phase handler preempts and stopPropagation() can suppress. If a future react-aria
6996
+ // version moved that handling to a native/document listener, stopPropagation() would no longer stop
6997
+ // it and Tab would close the menu again. react-aria is version-pinned in this repo, so an upgrade
6998
+ // must re-verify this — the "Tab moves focus to the footer, menu stays open" regression test in
6999
+ // tests/TypeaheadComboboxReactAriaFooterFocus.test.tsx guards it.
7000
+ const handleKeyDownCapture = (e)=>{
7001
+ if (!footerFocusable || e.key !== 'Tab' || e.shiftKey || !state?.isOpen) {
7002
+ return;
7003
+ }
7004
+ const moved = focusFirstFocusable(footerRef.current);
7005
+ if (moved) {
7006
+ e.preventDefault();
7007
+ e.stopPropagation();
7008
+ // Clear virtual focus so the (now-unfocused) input doesn't keep a stale aria-activedescendant
7009
+ // pointing at an option while real focus sits on the footer button.
7010
+ state.selectionManager.setFocusedKey(null);
7011
+ }
7012
+ };
7013
+ return /*#__PURE__*/ jsx("div", {
7014
+ className: restProps.className,
7015
+ ...addDebugOutlineIfEnabled(),
7016
+ children: /*#__PURE__*/ jsx(Input, {
7017
+ // eslint-disable-next-line @databricks/no-dynamic-property-value -- Valid case, as combostate componentId is checked in the hook exempt:97883162-7cd4-4bdc-a433-170eb108a4e3
7018
+ componentId: componentId ? `${componentId}.input` : 'design_system.typeahead_combobox_react_aria.input',
7019
+ ref: (antdInput)=>{
7020
+ // useComboBox needs the underlying HTMLInputElement, exposed by AntD v4 as `.input`.
7021
+ const node = antdInput?.input ?? null;
7022
+ inputRef.current = node;
7023
+ // Also forward to the consumer's ref (e.g. RHF `field.ref` for focus-on-validation-error).
7024
+ // Parity with TypeaheadComboboxMultiSelectInput, whose input already forwards; this ref was
7025
+ // previously dropped.
7026
+ if (typeof ref === 'function') ref(node);
7027
+ else if (ref) ref.current = node;
7028
+ },
7029
+ ...mergeProps(inputProps, restProps),
7030
+ onClick: handleClick,
7031
+ onKeyDownCapture: handleKeyDownCapture,
7032
+ size: size,
7033
+ css: getInputStyles$1(theme),
7034
+ suffix: /*#__PURE__*/ jsxs("div", {
7035
+ css: /*#__PURE__*/ css({
7036
+ display: 'flex',
7037
+ alignItems: 'center',
7038
+ gap: theme.spacing.xs
7039
+ }),
7040
+ children: [
7041
+ suffix,
7042
+ /*#__PURE__*/ jsx(TypeaheadComboboxControls, {
7043
+ showClearSelectionButton: allowClear && Boolean(state?.inputValue) && !restProps.disabled,
7044
+ showComboboxToggleButton: showComboboxToggleButton,
7045
+ handleClear: handleClear,
7046
+ disabled: restProps.disabled,
7047
+ loading: loading,
7048
+ inline: true
7049
+ })
7050
+ ]
7051
+ })
7052
+ })
7053
+ });
7054
+ });
7055
+
7056
+ const getContainerStyles = (theme, validationState, width, disabled)=>{
7057
+ const validationColor = getValidationStateColor(theme, validationState);
7058
+ return /*#__PURE__*/ css({
7059
+ cursor: 'text',
7060
+ display: 'inline-block',
7061
+ verticalAlign: 'top',
7062
+ border: `1px solid ${theme.colors.actionDefaultBorderDefault}`,
7063
+ borderRadius: theme.general.borderRadiusBase,
7064
+ minHeight: 32,
7065
+ height: 'auto',
7066
+ minWidth: 0,
7067
+ ...width ? {
7068
+ width
7069
+ } : {},
7070
+ position: 'relative',
7071
+ '&:hover': {
7072
+ border: `1px solid ${theme.colors.actionPrimaryBackgroundHover}`
7073
+ },
7074
+ '&:focus-within': {
7075
+ outlineColor: theme.colors.actionDefaultBorderFocus,
7076
+ outlineWidth: 2,
7077
+ outlineOffset: -2,
7078
+ outlineStyle: 'solid',
7079
+ boxShadow: 'none',
7080
+ borderColor: 'transparent'
7081
+ },
7082
+ '&&': {
7083
+ ...validationState && {
7084
+ borderColor: validationColor
7085
+ },
7086
+ '&:hover': {
7087
+ borderColor: validationState ? validationColor : theme.colors.actionPrimaryBackgroundHover
7088
+ },
7089
+ ...disabled && {
7090
+ borderColor: theme.colors.actionDisabledBorder,
7091
+ backgroundColor: theme.colors.actionDisabledBackground,
7092
+ cursor: 'not-allowed',
7093
+ outline: 'none',
7094
+ '&:hover': {
7095
+ border: `1px solid ${theme.colors.actionDisabledBorder}`
7096
+ },
7097
+ '&:focus-within': {
7098
+ outline: 'none',
7099
+ borderColor: theme.colors.actionDisabledBorder
7100
+ }
7101
+ }
7102
+ }
7103
+ });
7104
+ };
7105
+ const getScrollContainerStyles = (maxHeight)=>/*#__PURE__*/ css({
7106
+ padding: '5px 7px 5px 12px',
7107
+ overflowY: 'auto',
7108
+ overflowX: 'hidden',
7109
+ ...maxHeight ? {
7110
+ maxHeight
7111
+ } : {}
7112
+ });
7113
+ const getContentWrapperStyles = ()=>/*#__PURE__*/ css({
7114
+ display: 'flex',
7115
+ flex: 'auto',
7116
+ flexWrap: 'wrap',
7117
+ maxWidth: '100%',
7118
+ position: 'relative'
7119
+ });
7120
+ const getInputWrapperStyles = ()=>/*#__PURE__*/ css({
7121
+ display: 'inline-flex',
7122
+ position: 'relative',
7123
+ maxWidth: '100%',
7124
+ alignSelf: 'auto',
7125
+ flex: '1 1 auto',
7126
+ minWidth: 40
7127
+ });
7128
+ const getInputStyles = (theme)=>/*#__PURE__*/ css({
7129
+ lineHeight: 20,
7130
+ height: 24,
7131
+ margin: 0,
7132
+ padding: 0,
7133
+ appearance: 'none',
7134
+ cursor: 'auto',
7135
+ width: '100%',
7136
+ backgroundColor: 'transparent',
7137
+ color: theme.colors.textPrimary,
7138
+ '&, &:hover, &:focus-visible': {
7139
+ border: 'none',
7140
+ outline: 'none'
7141
+ },
7142
+ '&::placeholder': {
7143
+ color: theme.colors.textPlaceholder
7144
+ }
7145
+ });
7146
+ const TypeaheadComboboxMultiSelectInputInner = ({ selectedItems, // Destructured to keep it out of `restProps` (which is spread onto the <input>); the selection
7147
+ // reset is routed through the context's clearSelection, so this setter isn't used directly here.
7148
+ setSelectedItems: _setSelectedItems, getSelectedItemLabel, allowClear = true, showTagAfterValueCount = 20, width, maxHeight, placeholder, validationState, showComboboxToggleButton, disableTooltip = false, loading, ...restProps }, ref)=>{
7149
+ const ctx = useTypeaheadComboboxReactAriaContext();
7150
+ if (!ctx.isInsideTypeaheadCombobox) {
7151
+ throw new Error('`TypeaheadComboboxMultiSelectInput` must be used within `TypeaheadComboboxRoot`');
7152
+ }
7153
+ const { inputProps, inputRef, comboBoxState: state, setTriggerWidth, triggerRef, clearSelection, removeByKey, getKeyForItem, footerFocusable, footerRef } = ctx;
7154
+ const { theme } = useDesignSystemTheme();
7155
+ const containerRef = useRef(null);
7156
+ const scrollContainerRef = useRef(null);
7157
+ const itemsRef = useRef(null);
7158
+ const measureRef = useRef(null);
7159
+ const [inputWidth, setInputWidth] = useState(0);
7160
+ const setContainerRef = useCallback((node)=>{
7161
+ containerRef.current = node;
7162
+ triggerRef.current = node;
7163
+ }, [
7164
+ triggerRef
7165
+ ]);
7166
+ const setInputElRef = useCallback((node)=>{
7167
+ inputRef.current = node;
7168
+ if (typeof ref === 'function') ref(node);
7169
+ else if (ref) ref.current = node;
7170
+ }, [
7171
+ inputRef,
7172
+ ref
7173
+ ]);
7174
+ const isResponsive = showTagAfterValueCount === 'responsive';
7175
+ const fixedTagCount = typeof showTagAfterValueCount === 'number' ? showTagAfterValueCount : 20;
7176
+ const [responsiveVisibleCount, setResponsiveVisibleCount] = useState(null);
7177
+ const selectedItemsToRender = isResponsive ? responsiveVisibleCount === null ? selectedItems : selectedItems.slice(0, responsiveVisibleCount) : selectedItems.slice(0, fixedTagCount);
7178
+ const shouldShowCountBadge = selectedItems.length > selectedItemsToRender.length;
7179
+ const countBadgeStartAt = selectedItemsToRender.length;
7180
+ const [showTooltip, setShowTooltip] = useState(shouldShowCountBadge);
7181
+ const handleClick = ()=>{
7182
+ if (restProps.disabled) return;
7183
+ inputRef.current?.focus();
7184
+ // Open-only on click (see TypeaheadComboboxInput for rationale).
7185
+ if (state && !state.isOpen) state.open();
7186
+ };
7187
+ const handleClear = ()=>{
7188
+ if (!state) return;
7189
+ // Clear the typed search text, then route the selection reset through the hook's clearSelection
7190
+ // so the onValueChange('[]') analytics event fires — the single-select input clears the same way.
7191
+ // (clearSelection resets selectedItems in multi-select mode but does not touch the input value.)
7192
+ state.setInputValue('');
7193
+ clearSelection();
7194
+ };
7195
+ // Backspace on an empty input removes the last selected item, matching the original downshift
7196
+ // TypeaheadCombobox (whose `useMultipleSelection` handled DropdownKeyDownBackspace). react-aria's
7197
+ // multi-select is managed by us, so it does not wire this. Routed through `removeByKey` so the
7198
+ // same `onValueChange` analytics event fires as tag-click / clear-button removal. Guarded on an
7199
+ // empty input so it never interferes with normal text editing (the caret has nothing to delete).
7200
+ const handleKeyDown = (e)=>{
7201
+ // Read the input value from state, not the DOM node: react-aria controls the input via
7202
+ // `state.inputValue`, so that is the authoritative "is the field empty" source at event time.
7203
+ if (e.key !== 'Backspace' || (state?.inputValue ?? '') !== '' || selectedItems.length === 0 || restProps.disabled) {
7204
+ return;
7205
+ }
7206
+ removeByKey(getKeyForItem(selectedItems[selectedItems.length - 1]));
7207
+ };
7208
+ // PROTOTYPE (DUBOIS-455, "Option A"): mirror TypeaheadComboboxInput's capture-phase Tab handler for
7209
+ // multi-select. Without it, react-aria's bubble-phase Tab->commit fires and toggles (selects/
7210
+ // deselects) the highlighted option instead of moving focus to the footer — and with the
7211
+ // first-option highlight always on, an option is always highlighted, so Tab always toggled it.
7212
+ // Capture phase + stopPropagation suppresses that commit; preventDefault stops the native tab; and
7213
+ // clearing the focused key drops the stale aria-activedescendant while focus sits on the footer.
7214
+ const handleKeyDownCapture = (e)=>{
7215
+ if (!footerFocusable || e.key !== 'Tab' || e.shiftKey || !state?.isOpen) {
7216
+ return;
7217
+ }
7218
+ const moved = focusFirstFocusable(footerRef.current);
7219
+ if (moved) {
7220
+ e.preventDefault();
7221
+ e.stopPropagation();
7222
+ state.selectionManager.setFocusedKey(null);
7223
+ }
7224
+ };
7225
+ const currentInputValue = state?.inputValue ?? '';
7226
+ useLayoutEffect(()=>{
7227
+ if (measureRef.current) setInputWidth(measureRef.current.scrollWidth);
7228
+ }, [
7229
+ currentInputValue,
7230
+ placeholder
7231
+ ]);
7232
+ useLayoutEffect(()=>{
7233
+ if (!isResponsive) return;
7234
+ setResponsiveVisibleCount(null);
7235
+ }, [
7236
+ isResponsive,
7237
+ selectedItems,
7238
+ inputWidth
7239
+ ]);
7240
+ useLayoutEffect(()=>{
7241
+ if (!isResponsive) return;
7242
+ const container = containerRef.current;
7243
+ if (!container || typeof ResizeObserver === 'undefined') return;
7244
+ const observer = new ResizeObserver(()=>setResponsiveVisibleCount(null));
7245
+ observer.observe(container);
7246
+ return ()=>observer.disconnect();
7247
+ }, [
7248
+ isResponsive
7249
+ ]);
7250
+ useLayoutEffect(()=>{
7251
+ if (!isResponsive) return;
7252
+ const itemsEl = itemsRef.current;
7253
+ if (!itemsEl) return;
7254
+ const tagEls = itemsEl.querySelectorAll('[data-slot="tag"]');
7255
+ if (tagEls.length === 0) {
7256
+ setResponsiveVisibleCount(0);
7257
+ return;
7258
+ }
7259
+ const firstTop = tagEls[0].offsetTop;
7260
+ const onFirstLine = (el)=>el != null && Math.abs(el.offsetTop - firstTop) <= 2;
7261
+ let firstLineTagCount = 0;
7262
+ for(let i = 0; i < tagEls.length; i++){
7263
+ if (onFirstLine(tagEls[i])) firstLineTagCount++;
7264
+ else break;
7265
+ }
7266
+ const inputWrapperEl = itemsEl.querySelector('[data-slot="input"]');
7267
+ const inputWrapped = inputWrapperEl != null && !onFirstLine(inputWrapperEl);
7268
+ let nextCount;
7269
+ if (firstLineTagCount < tagEls.length) {
7270
+ nextCount = firstLineTagCount;
7271
+ } else if (tagEls.length === selectedItems.length) {
7272
+ nextCount = inputWrapped ? Math.max(0, tagEls.length - 1) : selectedItems.length;
7273
+ } else if (inputWrapped) {
7274
+ nextCount = Math.max(0, tagEls.length - 1);
7275
+ } else {
7276
+ nextCount = tagEls.length;
7277
+ }
7278
+ setResponsiveVisibleCount(nextCount);
7279
+ }, [
7280
+ isResponsive,
7281
+ selectedItems,
7282
+ responsiveVisibleCount
7283
+ ]);
7284
+ // Measure trigger so the menu can match its width. useLayoutEffect so it is set before paint.
7285
+ useLayoutEffect(()=>{
7286
+ const node = containerRef.current;
7287
+ if (!node) return;
7288
+ setTriggerWidth(node.getBoundingClientRect().width);
7289
+ }, [
7290
+ setTriggerWidth
7291
+ ]);
7292
+ // When adding tags overflows the (maxHeight-capped) scroll container, the input — which sits at
7293
+ // the end of the flow — scrolls below the fold and takes the cursor with it. Scroll the container
7294
+ // to the bottom so the input stays visible. Scoped to the container's own scrollTop (not
7295
+ // scrollIntoView, which would also scroll the page/menu). Only on growth, so removing a tag
7296
+ // doesn't yank the view.
7297
+ const prevSelectedCount = useRef(selectedItems.length);
7298
+ useLayoutEffect(()=>{
7299
+ const grew = selectedItems.length > prevSelectedCount.current;
7300
+ prevSelectedCount.current = selectedItems.length;
7301
+ const container = scrollContainerRef.current;
7302
+ if (!grew || !container) return;
7303
+ container.scrollTop = container.scrollHeight;
7304
+ }, [
7305
+ selectedItems
7306
+ ]);
7307
+ useEffect(()=>{
7308
+ let isPartiallyHidden = false;
7309
+ if (itemsRef.current && scrollContainerRef.current) {
7310
+ isPartiallyHidden = itemsRef.current.clientHeight > scrollContainerRef.current.clientHeight;
7311
+ }
7312
+ setShowTooltip(!disableTooltip && (shouldShowCountBadge || isPartiallyHidden));
7313
+ }, [
7314
+ shouldShowCountBadge,
7315
+ disableTooltip
7316
+ ]);
7317
+ const content = /*#__PURE__*/ jsx("div", {
7318
+ ...addDebugOutlineIfEnabled(),
7319
+ onClick: handleClick,
7320
+ ref: setContainerRef,
7321
+ css: getContainerStyles(theme, validationState, width, restProps.disabled),
7322
+ children: /*#__PURE__*/ jsxs("div", {
7323
+ ref: scrollContainerRef,
7324
+ css: getScrollContainerStyles(maxHeight),
7325
+ children: [
7326
+ /*#__PURE__*/ jsx(TypeaheadComboboxControls, {
7327
+ showComboboxToggleButton: showComboboxToggleButton,
7328
+ showClearSelectionButton: allowClear && (Boolean(currentInputValue) || selectedItems.length > 0) && !restProps.disabled,
7329
+ handleClear: handleClear,
7330
+ disabled: restProps.disabled,
7331
+ loading: loading,
7332
+ css: /*#__PURE__*/ css({
7333
+ position: 'sticky',
7334
+ top: 3,
7335
+ float: 'right'
7336
+ })
7337
+ }),
7338
+ /*#__PURE__*/ jsxs("div", {
7339
+ ref: itemsRef,
7340
+ css: getContentWrapperStyles(),
7341
+ children: [
7342
+ selectedItemsToRender.map((selectedItem, index)=>/*#__PURE__*/ jsx(TypeaheadComboboxSelectedItem$1, {
7343
+ label: getSelectedItemLabel(selectedItem),
7344
+ item: selectedItem,
7345
+ disabled: restProps.disabled,
7346
+ "data-slot": "tag"
7347
+ }, `selected-item-${index}`)),
7348
+ shouldShowCountBadge && /*#__PURE__*/ jsx(CountBadge$1, {
7349
+ countStartAt: countBadgeStartAt,
7350
+ totalCount: selectedItems.length,
7351
+ disabled: restProps.disabled
7352
+ }),
7353
+ /*#__PURE__*/ jsxs("div", {
7354
+ css: getInputWrapperStyles(),
7355
+ "data-slot": "input",
7356
+ children: [
7357
+ /*#__PURE__*/ jsx("input", {
7358
+ ...mergeProps(inputProps, restProps, {
7359
+ onKeyDown: handleKeyDown
7360
+ }),
7361
+ onKeyDownCapture: handleKeyDownCapture,
7362
+ ref: setInputElRef,
7363
+ css: [
7364
+ getInputStyles(theme),
7365
+ {
7366
+ width: inputWidth
7367
+ }
7368
+ ],
7369
+ placeholder: selectedItems.length ? undefined : placeholder
7370
+ }),
7371
+ /*#__PURE__*/ jsxs("span", {
7372
+ ref: measureRef,
7373
+ "aria-hidden": true,
7374
+ css: /*#__PURE__*/ css({
7375
+ visibility: 'hidden',
7376
+ whiteSpace: 'pre',
7377
+ position: 'absolute'
7378
+ }),
7379
+ children: [
7380
+ currentInputValue || placeholder,
7381
+ "\xa0"
7382
+ ]
7383
+ })
7384
+ ]
7385
+ })
7386
+ ]
7387
+ })
7388
+ ]
7389
+ })
7390
+ });
7391
+ if (showTooltip && selectedItems.length > 0) {
7392
+ return /*#__PURE__*/ jsx(Tooltip, {
7393
+ componentId: "typeahead-combobox-react-aria-multi-select-input-tooltip",
7394
+ side: "right",
7395
+ content: selectedItems.map((item)=>getSelectedItemLabel(item)).join(', '),
7396
+ children: content
7397
+ });
7398
+ }
7399
+ return content;
7400
+ };
7401
+ const TypeaheadComboboxMultiSelectInput = /*#__PURE__*/ forwardRef(TypeaheadComboboxMultiSelectInputInner);
7402
+
7403
+ const TypeaheadComboboxSectionHeader = ({ children, ...props })=>{
7404
+ const { isInsideTypeaheadCombobox } = useTypeaheadComboboxReactAriaContext();
7405
+ if (!isInsideTypeaheadCombobox) {
7406
+ throw new Error('`TypeaheadComboboxSectionHeader` must be used within `TypeaheadComboboxMenu`');
7407
+ }
7408
+ // role="presentation" keeps the header out of the listbox's owned children (which must be only
7409
+ // options) now that menu children render as direct children of the <ul role="listbox">. The
7410
+ // header text stays exposed as static content. A consumer-supplied role still wins via {...props}.
7411
+ return /*#__PURE__*/ jsx(SectionHeader, {
7412
+ role: "presentation",
7413
+ ...props,
7414
+ children: children
7415
+ });
7416
+ };
7417
+
7418
+ const TypeaheadComboboxSeparator = (props)=>{
7419
+ const { isInsideTypeaheadCombobox } = useTypeaheadComboboxReactAriaContext();
7420
+ if (!isInsideTypeaheadCombobox) {
7421
+ throw new Error('`TypeaheadComboboxSeparator` must be used within `TypeaheadComboboxMenu`');
7422
+ }
7423
+ // role="presentation" keeps the decorative separator out of the listbox's owned children (which
7424
+ // must be only options) now that menu children render as direct children of the <ul role="listbox">.
7425
+ return /*#__PURE__*/ jsx(Separator, {
7426
+ role: "presentation",
7427
+ ...props
7428
+ });
7429
+ };
7430
+
7431
+ const TypeaheadComboboxAddButton = /*#__PURE__*/ forwardRef(function TypeaheadComboboxAddButton({ children, componentId: componentIdProp, ...restProps }, forwardedRef) {
7432
+ const { theme } = useDesignSystemTheme();
7433
+ const { isInsideTypeaheadCombobox, componentId } = useTypeaheadComboboxReactAriaContext();
7434
+ if (!isInsideTypeaheadCombobox) {
7435
+ throw new Error('`TypeaheadComboboxAddButton` must be used within `TypeaheadComboboxRoot`');
7436
+ }
7437
+ return /*#__PURE__*/ jsx(Button, {
7438
+ ...restProps,
7439
+ // eslint-disable-next-line @databricks/no-dynamic-property-value -- Validated in the Root for the context exempt:ae0b57c6-871d-4375-a3ea-2574d7a3899e
7440
+ componentId: componentIdProp ?? `${componentId}.add_option`,
7441
+ type: "tertiary",
7442
+ onClick: (event)=>{
7443
+ event.stopPropagation();
7444
+ restProps.onClick?.(event);
7445
+ },
7446
+ onMouseUp: (event)=>{
7447
+ event.stopPropagation();
7448
+ restProps.onMouseUp?.(event);
7449
+ },
7450
+ className: "combobox-footer-add-button",
7451
+ css: /*#__PURE__*/ css({
7452
+ ...getComboboxOptionItemWrapperStyles(theme),
7453
+ .../*#__PURE__*/ css(importantify({
7454
+ width: '100%',
7455
+ padding: 0,
7456
+ display: 'flex',
7457
+ alignItems: 'center',
7458
+ borderRadius: 0,
7459
+ // Keep the row-highlight background on focus, but do NOT suppress the outline: the DS
7460
+ // Button renders its `:focus-visible` ring (2px actionDefaultBorderFocus, offset -2px),
7461
+ // which is the keyboard focus indicator. The old `outline: 'none'` here dated from when
7462
+ // the footer button was mouse-only (never keyboard-focusable); now that focus can land
7463
+ // on it (footerFocusable), suppressing the ring is a WCAG 2.4.7 failure.
7464
+ '&:focus': {
7465
+ background: theme.colors.actionTertiaryBackgroundHover
7466
+ }
7467
+ }))
7468
+ }),
7469
+ icon: /*#__PURE__*/ jsx(PlusIcon, {}),
7470
+ ref: forwardedRef,
7471
+ children: children
7472
+ });
7473
+ });
7474
+
7475
+ /** JSON-encode a list of items by their display strings (the multi-select analytics value shape). */ const mapItemsToString$1 = (items, itemToString)=>{
7476
+ return JSON.stringify(items.map(itemToString));
7477
+ };
7478
+ /**
7479
+ * Item ↔ key/string mapping for the TypeaheadCombobox: resolves each item's display string and
7480
+ * key, wraps items for react-aria's collection, and builds the key/text lookup maps. Warns in dev
7481
+ * when two items collapse to the same key.
7482
+ */ function useComboboxItems({ allItems, itemToString: itemToStringProp, getKey: getKeyProp }) {
7483
+ const itemToString = useCallback((item)=>{
7484
+ if (item === null || item === undefined) return '';
7485
+ return itemToStringProp ? itemToStringProp(item) : String(item);
7486
+ }, [
7487
+ itemToStringProp
7488
+ ]);
7489
+ // Normalize keys to strings. react-aria's collection key comes from the `<Item key>` we render,
7490
+ // which React coerces to a string, so `state.selectedKey` (and the keys `useOption` looks up) are
7491
+ // always strings. A numeric `getKey` would otherwise leave `itemsByKey` / `disabledKeys` /
7492
+ // controlled `value` keyed by the raw number, so every string-vs-number comparison against the
7493
+ // collection would miss — breaking selection, option focus, and removal for numeric-id consumers.
7494
+ const getKey = useCallback((item)=>{
7495
+ if (getKeyProp) return String(getKeyProp(item));
7496
+ return itemToString(item);
7497
+ }, [
7498
+ getKeyProp,
7499
+ itemToString
7500
+ ]);
7501
+ const wrappedItems = useMemo(()=>allItems.map((value)=>({
7502
+ id: getKey(value),
7503
+ value
7504
+ })), [
7505
+ allItems,
7506
+ getKey
7507
+ ]);
7508
+ const itemsByKey = useMemo(()=>{
7509
+ const map = new Map();
7510
+ for (const w of wrappedItems){
7511
+ if (process.env.NODE_ENV !== 'production' && map.has(w.id)) {
7512
+ // eslint-disable-next-line no-console
7513
+ console.error(`[TypeaheadCombobox] Duplicate item key "${String(w.id)}". Items must map to unique keys; ` + 'pass a `getKey` that returns a unique value (the default falls back to `itemToString`, which ' + 'is colliding here). Items that share a key are dropped from selection and removal.');
7514
+ }
7515
+ map.set(w.id, w.value);
7516
+ }
7517
+ return map;
7518
+ }, [
7519
+ wrappedItems
7520
+ ]);
7521
+ // textValue → all items with that display string, for the custom-matcher path (runs per item per
7522
+ // keystroke). Grouping (rather than first-wins) keeps distinct items that share a label matchable
7523
+ // on their own non-label fields — otherwise every duplicate after the first is filtered against
7524
+ // the first item's data.
7525
+ const itemsByTextValue = useMemo(()=>{
7526
+ const map = new Map();
7527
+ for (const w of wrappedItems){
7528
+ const key = itemToString(w.value);
7529
+ const group = map.get(key);
7530
+ if (group) group.push(w.value);
7531
+ else map.set(key, [
7532
+ w.value
7533
+ ]);
7534
+ }
7535
+ return map;
7536
+ }, [
7537
+ wrappedItems,
7538
+ itemToString
7539
+ ]);
7540
+ return {
7541
+ itemToString,
7542
+ getKey,
7543
+ wrappedItems,
7544
+ itemsByKey,
7545
+ itemsByTextValue
7546
+ };
7547
+ }
7548
+
7549
+ /**
7550
+ * Assembles the `ComboBoxStateOptions` passed to react-aria's `useComboBoxState`: the filter, the
7551
+ * disabled-keys set, the controlled/uncontrolled selection value, the initial (uncontrolled) input
7552
+ * text, and the selection/input/open change handlers (including analytics + multi-select
7553
+ * input-reset). Kept separate from `useComboboxState` so the wiring into react-aria is isolated
7554
+ * from the selection helpers the hook derives afterward.
7555
+ */ function useComboboxStateProps({ items, multiSelect, matcher, isItemDisabled, allowNewValue, initialInputValue, initialSelectedItem, formValue, formOnChange, onStateChange, onIsOpenChange, externalSelectedItems, externalSetSelectedItems, stateRef, onValueChange }) {
7556
+ const { itemToString, getKey, wrappedItems, itemsByKey, itemsByTextValue } = items;
7557
+ // react-aria blocks selection of keys listed here (keyboard + pointer); the per-item `isDisabled`
7558
+ // prop only styles the row.
7559
+ const disabledKeys = useMemo(()=>isItemDisabled ? wrappedItems.filter((w)=>isItemDisabled(w.value)).map((w)=>w.id) : [], [
7560
+ isItemDisabled,
7561
+ wrappedItems
7562
+ ]);
7563
+ const { contains } = useFilter({
7564
+ sensitivity: 'base'
7565
+ });
7566
+ const defaultFilter = useCallback((textValue, inputValue)=>{
7567
+ if (matcher) {
7568
+ const group = itemsByTextValue.get(textValue);
7569
+ // A label is shown if any item carrying it matches — items that share a display string are
7570
+ // indistinguishable to react-aria's filter (it only gets the string), so we can't route a
7571
+ // single row to a single item here.
7572
+ if (group !== undefined) {
7573
+ const lowerCasedInputValue = inputValue.toLocaleLowerCase();
7574
+ return group.some((item)=>matcher(item, lowerCasedInputValue));
7575
+ }
7576
+ return contains(textValue, inputValue);
7577
+ }
7578
+ return contains(textValue, inputValue);
7579
+ }, [
7580
+ matcher,
7581
+ itemsByTextValue,
7582
+ contains
7583
+ ]);
7584
+ // A single-select consumer opts into controlling the selection by passing `formValue` +
7585
+ // `formOnChange`. Once controlled, "nothing selected" must stay controlled as `null` (not
7586
+ // `undefined`) — otherwise clearing the input, which react-aria turns into setValue(null), would
7587
+ // flip the selection value from controlled to uncontrolled (React warns, and clicks revert).
7588
+ const isControlledSingleSelect = !multiSelect && formOnChange !== undefined;
7589
+ const controlledValue = useMemo(()=>{
7590
+ if (externalSelectedItems !== null) return externalSelectedItems.map(getKey);
7591
+ if (formValue !== undefined) return getKey(formValue);
7592
+ return isControlledSingleSelect ? null : undefined;
7593
+ }, [
7594
+ externalSelectedItems,
7595
+ formValue,
7596
+ getKey,
7597
+ isControlledSingleSelect
7598
+ ]);
7599
+ const handleSelectionChange = useCallback((newValue)=>{
7600
+ if (externalSetSelectedItems !== null) {
7601
+ const keys = newValue ?? [];
7602
+ const selected = keys.map((k)=>itemsByKey.get(k)).filter((x)=>x !== undefined);
7603
+ externalSetSelectedItems(selected);
7604
+ // Multi-select stays open after a pick; clear the search text so the menu resets to all items.
7605
+ stateRef.current?.setInputValue('');
7606
+ onValueChange?.(mapItemsToString$1(selected, itemToString));
7607
+ onStateChange?.({
7608
+ type: 'select',
7609
+ selectedItem: selected[selected.length - 1] ?? null,
7610
+ inputValue: ''
7611
+ });
7612
+ return;
7613
+ }
7614
+ const key = newValue;
7615
+ const item = key === null ? null : itemsByKey.get(key) ?? null;
7616
+ formOnChange?.(item);
7617
+ onValueChange?.(itemToString(item));
7618
+ onStateChange?.({
7619
+ type: 'select',
7620
+ selectedItem: item,
7621
+ inputValue: ''
7622
+ });
7623
+ }, [
7624
+ externalSetSelectedItems,
7625
+ itemsByKey,
7626
+ onValueChange,
7627
+ itemToString,
7628
+ formOnChange,
7629
+ onStateChange,
7630
+ stateRef
7631
+ ]);
7632
+ // Seed the initial input text, then let react-aria manage it (show the selected item's text,
7633
+ // revert on blur, etc.). `defaultInputValue` is uncontrolled — we no longer mirror it in state.
7634
+ const defaultInputValue = useMemo(()=>{
7635
+ if (initialInputValue !== undefined) return initialInputValue;
7636
+ if (initialSelectedItem !== undefined) return itemToString(initialSelectedItem);
7637
+ if (formValue !== undefined) return itemToString(formValue);
7638
+ return undefined;
7639
+ }, [
7640
+ initialInputValue,
7641
+ initialSelectedItem,
7642
+ formValue,
7643
+ itemToString
7644
+ ]);
7645
+ // `defaultItems` rather than `items`: react-aria skips `defaultFilter` when `items` is set
7646
+ // ("No default filter if items are controlled" — useComboBoxState.js:110).
7647
+ return {
7648
+ defaultItems: wrappedItems,
7649
+ defaultFilter,
7650
+ disabledKeys,
7651
+ allowsCustomValue: allowNewValue,
7652
+ defaultInputValue,
7653
+ defaultSelectedKey: initialSelectedItem !== undefined ? getKey(initialSelectedItem) : undefined,
7654
+ selectionMode: multiSelect ? 'multiple' : 'single',
7655
+ value: controlledValue,
7656
+ onChange: handleSelectionChange,
7657
+ children: (wrapped)=>/*#__PURE__*/ jsx(Item, {
7658
+ textValue: itemToString(wrapped.value),
7659
+ children: itemToString(wrapped.value)
7660
+ }, wrapped.id),
7661
+ onInputChange: (inputValue)=>{
7662
+ onStateChange?.({
7663
+ type: 'input',
7664
+ selectedItem: null,
7665
+ inputValue
7666
+ });
7667
+ },
7668
+ onOpenChange: (isOpen)=>{
7669
+ onIsOpenChange?.(isOpen);
7670
+ onStateChange?.({
7671
+ type: isOpen ? 'open' : 'close',
7672
+ selectedItem: null,
7673
+ inputValue: ''
7674
+ });
7675
+ },
7676
+ // Non-modal popovers rely on blur as their dismiss path (usePopover hard-codes
7677
+ // isDismissable=false when isNonModal=true), so we can't ever leave this off.
7678
+ shouldCloseOnBlur: true
7679
+ };
7680
+ }
7681
+
7682
+ /**
7683
+ * Backs the Du Bois TypeaheadCombobox (react-aria variant) by wrapping react-aria's
7684
+ * `useComboBoxState`. Handles single- and multi-select modes, item↔key mapping, filtering
7685
+ * (default substring match or a custom `matcher`), selection helpers (`removeItem`,
7686
+ * `clearSelection`, `isSelected`), form `onChange`/`onBlur` bridging, and analytics wiring.
7687
+ * The returned object is what the `Root`/`Input`/`Menu` subtree consumes via context.
7688
+ */ function useComboboxState(props) {
7689
+ const multiSelect = props.multiSelect === true;
7690
+ // Narrow the discriminated union once for stable typed refs in deps/callbacks.
7691
+ const externalSelectedItems = multiSelect && props.multiSelect ? props.selectedItems : null;
7692
+ const externalSetSelectedItems = multiSelect && props.multiSelect ? props.setSelectedItems : null;
7693
+ const { allItems, itemToString: itemToStringProp, getKey: getKeyProp, matcher, isItemDisabled, componentId, analyticsEvents, valueHasNoPii, initialInputValue, initialSelectedItem, formValue, formOnChange, formOnBlur, onStateChange, onIsOpenChange, allowNewValue = false } = props;
7694
+ // `preventUnsetOnBlur` is accepted for source compatibility with the original API but is a
7695
+ // no-op: in react-aria, blur never clears the selection (only re-syncs input text), and
7696
+ // closing on blur is required for non-modal popover dismissal.
7697
+ const emitOnView = safex('databricks.fe.observability.defaultComponentView.typeaheadCombobox', false);
7698
+ const items = useComboboxItems({
7699
+ allItems,
7700
+ itemToString: itemToStringProp,
7701
+ getKey: getKeyProp
7702
+ });
7703
+ const { itemToString, getKey, itemsByKey } = items;
7704
+ const memoizedAnalyticsEvents = useMemo(()=>analyticsEvents ? [
7705
+ ...analyticsEvents
7706
+ ] : emitOnView ? [
7707
+ DesignSystemEventProviderAnalyticsEventTypes.OnValueChange,
7708
+ DesignSystemEventProviderAnalyticsEventTypes.OnView
7709
+ ] : [
7710
+ DesignSystemEventProviderAnalyticsEventTypes.OnValueChange
7711
+ ], [
7712
+ analyticsEvents,
7713
+ emitOnView
7714
+ ]);
7715
+ const eventContext = useDesignSystemEventComponentCallbacks({
7716
+ componentType: DesignSystemEventProviderComponentTypes.TypeaheadCombobox,
7717
+ componentId,
7718
+ analyticsEvents: memoizedAnalyticsEvents,
7719
+ valueHasNoPii
7720
+ });
7721
+ // react-aria owns the input value. `stateRef` lets the selection handler clear the input in
7722
+ // multi-select mode without making inputValue a controlled prop.
7723
+ const stateRef = useRef(null);
7724
+ const stateOptions = useComboboxStateProps({
7725
+ items,
7726
+ multiSelect,
7727
+ matcher,
7728
+ isItemDisabled,
7729
+ allowNewValue,
7730
+ initialInputValue,
7731
+ initialSelectedItem,
7732
+ formValue,
7733
+ formOnChange,
7734
+ onStateChange,
7735
+ onIsOpenChange,
7736
+ externalSelectedItems,
7737
+ externalSetSelectedItems,
7738
+ stateRef,
7739
+ onValueChange: eventContext.onValueChange
7740
+ });
7741
+ const state = useComboBoxState(stateOptions);
7742
+ stateRef.current = state;
7743
+ // Keep the first option highlighted while the menu is open so Enter commits it, matching the
7744
+ // original downshift variant's `defaultHighlightedIndex: 0`. react-aria clears the focused key on
7745
+ // every input change (useComboBoxState: "Clear focused key when input value changes"), and its
7746
+ // `commit()` only selects when `focusedKey != null` — so without this, typing leaves nothing
7747
+ // highlighted and Enter falls through to commitValue(), selecting nothing.
7748
+ //
7749
+ // Only re-focus when nothing is focused: that way arrowing or hovering to another option sticks,
7750
+ // and we merely restore the default after react-aria drops it. Keyed on the collection so it
7751
+ // re-runs as filtering narrows the list.
7752
+ //
7753
+ // Skipped when `allowNewValue`: there Enter is how the user commits the text they just typed, so
7754
+ // pre-highlighting an option would hijack it and select the option instead.
7755
+ const { collection, isOpen, selectionManager, disabledKeys } = state;
7756
+ const focusedKey = selectionManager.focusedKey;
7757
+ useEffect(()=>{
7758
+ if (allowNewValue || !isOpen || focusedKey != null) return;
7759
+ // Only restore the highlight while the combobox input itself holds DOM focus. With
7760
+ // footerFocusable, Tab moves focus onto a footer control and deliberately clears focusedKey so
7761
+ // no stale aria-activedescendant points at an option while focus sits on the footer button
7762
+ // (WCAG 4.1.3). Re-focusing the first option here would undo that. The input carries
7763
+ // role="combobox", so this cleanly excludes footer buttons, tag remove-buttons, etc.
7764
+ if (document.activeElement?.getAttribute('role') !== 'combobox') return;
7765
+ // Walk to the first *selectable* option; a disabled one could not be committed by Enter anyway.
7766
+ let candidate = collection.getFirstKey();
7767
+ while(candidate != null && disabledKeys.has(candidate)){
7768
+ candidate = collection.getKeyAfter(candidate);
7769
+ }
7770
+ if (candidate == null) return;
7771
+ selectionManager.setFocusedKey(candidate);
7772
+ }, [
7773
+ allowNewValue,
7774
+ isOpen,
7775
+ focusedKey,
7776
+ collection,
7777
+ selectionManager,
7778
+ disabledKeys
7779
+ ]);
7780
+ const selectedKeys = useMemo(()=>{
7781
+ if (externalSelectedItems !== null) {
7782
+ const set = new Set();
7783
+ for (const it of externalSelectedItems)set.add(getKey(it));
7784
+ return set;
7785
+ }
7786
+ return state.selectedKey === null ? new Set() : new Set([
7787
+ state.selectedKey
7788
+ ]);
7789
+ }, [
7790
+ externalSelectedItems,
7791
+ getKey,
7792
+ state.selectedKey
7793
+ ]);
7794
+ const selectedItems = useMemo(()=>{
7795
+ if (externalSelectedItems !== null) return externalSelectedItems;
7796
+ if (state.selectedKey === null) return [];
7797
+ const item = itemsByKey.get(state.selectedKey);
7798
+ return item === undefined ? [] : [
7799
+ item
7800
+ ];
7801
+ }, [
7802
+ externalSelectedItems,
7803
+ state.selectedKey,
7804
+ itemsByKey
7805
+ ]);
7806
+ // Fire the consumer's formOnBlur on a *real* input blur, reading the committed selection at blur
7807
+ // time. react-aria has no blur-with-value callback, so Root wires this onto the input's onBlur
7808
+ // (guarded so focus moving within the widget — toggle/clear buttons — doesn't count as a blur).
7809
+ // Keying an effect on selectedKey instead — the previous approach — fired formOnBlur on every
7810
+ // selection commit/clear while the field still had focus, diverging from RHF touched/validation
7811
+ // semantics (DUBOIS-455). Multi-select never routed formOnBlur through the single-value path in
7812
+ // the original downshift variant, so it stays single-select-scoped here.
7813
+ const selectedItemsRef = useRef(selectedItems);
7814
+ selectedItemsRef.current = selectedItems;
7815
+ const onInputBlur = useCallback(()=>{
7816
+ if (multiSelect) return;
7817
+ if (allowNewValue) {
7818
+ // Free-text parity with the downshift variant: react-aria's selection handler only reports
7819
+ // matched options, so a typed custom value would otherwise never reach the form. On blur,
7820
+ // register the current input string as the form value (empty input → null). allowNewValue
7821
+ // implies T is a string, so the raw inputValue is a valid T.
7822
+ const custom = stateRef.current?.inputValue ? stateRef.current.inputValue : null;
7823
+ formOnChange?.(custom);
7824
+ formOnBlur?.(custom);
7825
+ return;
7826
+ }
7827
+ formOnBlur?.(selectedItemsRef.current[0] ?? null);
7828
+ }, [
7829
+ multiSelect,
7830
+ allowNewValue,
7831
+ formOnChange,
7832
+ formOnBlur
7833
+ ]);
7834
+ // Unwrap state.collection (post-filter) back to T[] for consumers.
7835
+ const filteredItems = useMemo(()=>{
7836
+ const out = [];
7837
+ for (const node of state.collection){
7838
+ if (node.type === 'item' && node.value) out.push(node.value.value);
7839
+ }
7840
+ return out;
7841
+ }, [
7842
+ state.collection
7843
+ ]);
7844
+ const removeByKey = useCallback((key)=>{
7845
+ // Normalize to a string so a consumer passing a raw numeric key still matches our string
7846
+ // keys (getKey stringifies; react-aria's collection keys are strings — see useComboboxItems).
7847
+ const normalizedKey = String(key);
7848
+ if (externalSelectedItems !== null && externalSetSelectedItems !== null) {
7849
+ const next = externalSelectedItems.filter((it)=>getKey(it) !== normalizedKey);
7850
+ if (next.length === externalSelectedItems.length) return;
7851
+ externalSetSelectedItems(next);
7852
+ eventContext.onValueChange?.(mapItemsToString$1(next, itemToString));
7853
+ return;
7854
+ }
7855
+ // Single-select: removing the active selection clears it.
7856
+ if (state.selectedKey === normalizedKey) {
7857
+ formOnChange?.(null);
7858
+ state.setSelectedKey(null);
7859
+ eventContext.onValueChange?.(itemToString(null));
7860
+ }
7861
+ }, [
7862
+ externalSelectedItems,
7863
+ externalSetSelectedItems,
7864
+ getKey,
7865
+ eventContext,
7866
+ itemToString,
7867
+ state,
7868
+ formOnChange
7869
+ ]);
7870
+ const removeItem = useCallback((item)=>removeByKey(getKey(item)), [
7871
+ removeByKey,
7872
+ getKey
7873
+ ]);
7874
+ const clearSelection = useCallback(()=>{
7875
+ if (externalSetSelectedItems !== null) {
7876
+ externalSetSelectedItems([]);
7877
+ eventContext.onValueChange?.('[]');
7878
+ return;
7879
+ }
7880
+ formOnChange?.(null);
7881
+ state.setInputValue('');
7882
+ state.setSelectedKey(null);
7883
+ }, [
7884
+ externalSetSelectedItems,
7885
+ eventContext,
7886
+ formOnChange,
7887
+ state
7888
+ ]);
7889
+ const isSelected = useCallback((item)=>selectedKeys.has(getKey(item)), [
7890
+ selectedKeys,
7891
+ getKey
7892
+ ]);
7893
+ const firstOnViewValue = useMemo(()=>{
7894
+ if (externalSelectedItems !== null) return mapItemsToString$1(externalSelectedItems, itemToString);
7895
+ return itemToString(initialSelectedItem ?? null);
7896
+ }, [
7897
+ externalSelectedItems,
7898
+ initialSelectedItem,
7899
+ itemToString
7900
+ ]);
7901
+ return {
7902
+ state,
7903
+ itemsByKey,
7904
+ getKeyForItem: getKey,
7905
+ itemToString,
7906
+ selectedItems,
7907
+ selectedKeys,
7908
+ filteredItems,
7909
+ removeItem,
7910
+ removeByKey,
7911
+ clearSelection,
7912
+ isSelected,
7913
+ onInputBlur,
7914
+ componentId,
7915
+ analyticsEvents: memoizedAnalyticsEvents,
7916
+ valueHasNoPii,
7917
+ onView: eventContext.onView,
7918
+ firstOnViewValue,
7919
+ multiSelect
7920
+ };
7921
+ }
7922
+
7923
+ const mapItemsToString = (items, itemToString)=>{
7924
+ return JSON.stringify(items.map(itemToString));
7925
+ };
7926
+ /**
7927
+ * Companion hook to `useComboboxState` in multi-select mode. Returns chip-management helpers
7928
+ * keyed off the consumer-owned `selectedItems` array, plus analytics wiring. Mostly redundant —
7929
+ * the state hook already exposes `removeItem`/`removeByKey`/`clearSelection` — but kept for API
7930
+ * parity with the original.
7931
+ */ function useMultipleSelectionState(selectedItems, setSelectedItems, { componentId, analyticsEvents, valueHasNoPii, itemToString, getKey }) {
7932
+ const toString = useCallback((item)=>item === null || item === undefined ? '' : itemToString ? itemToString(item) : String(item), [
7933
+ itemToString
7934
+ ]);
7935
+ const keyFor = useCallback((item)=>getKey ? getKey(item) : toString(item), [
7936
+ getKey,
7937
+ toString
7938
+ ]);
7939
+ const memoizedAnalyticsEvents = useMemo(()=>analyticsEvents ?? [
7940
+ DesignSystemEventProviderAnalyticsEventTypes.OnValueChange
7941
+ ], [
7942
+ analyticsEvents
7943
+ ]);
7944
+ const eventContext = useDesignSystemEventComponentCallbacks({
7945
+ componentType: DesignSystemEventProviderComponentTypes.TypeaheadCombobox,
7946
+ componentId,
7947
+ analyticsEvents: memoizedAnalyticsEvents,
7948
+ valueHasNoPii
7949
+ });
7950
+ const selectedKeys = useMemo(()=>{
7951
+ const set = new Set();
7952
+ for (const item of selectedItems)set.add(keyFor(item));
7953
+ return set;
7954
+ }, [
7955
+ selectedItems,
7956
+ keyFor
7957
+ ]);
7958
+ const addItem = useCallback((item)=>{
7959
+ const k = keyFor(item);
7960
+ if (selectedKeys.has(k)) return;
7961
+ const next = [
7962
+ ...selectedItems,
7963
+ item
7964
+ ];
7965
+ setSelectedItems(next);
7966
+ eventContext.onValueChange?.(mapItemsToString(next, toString));
7967
+ }, [
7968
+ keyFor,
7969
+ selectedKeys,
7970
+ selectedItems,
7971
+ setSelectedItems,
7972
+ eventContext,
7973
+ toString
7974
+ ]);
7975
+ const removeByKey = useCallback((key)=>{
7976
+ const next = selectedItems.filter((item)=>keyFor(item) !== key);
7977
+ if (next.length === selectedItems.length) return;
7978
+ setSelectedItems(next);
7979
+ eventContext.onValueChange?.(mapItemsToString(next, toString));
7980
+ }, [
7981
+ selectedItems,
7982
+ setSelectedItems,
7983
+ keyFor,
7984
+ eventContext,
7985
+ toString
7986
+ ]);
7987
+ const removeItem = useCallback((item)=>removeByKey(keyFor(item)), [
7988
+ removeByKey,
7989
+ keyFor
7990
+ ]);
7991
+ const clear = useCallback(()=>{
7992
+ setSelectedItems([]);
7993
+ eventContext.onValueChange?.('[]');
7994
+ }, [
7995
+ setSelectedItems,
7996
+ eventContext
7997
+ ]);
7998
+ const isSelected = useCallback((item)=>selectedKeys.has(keyFor(item)), [
7999
+ selectedKeys,
8000
+ keyFor
8001
+ ]);
8002
+ return {
8003
+ selectedItems,
8004
+ selectedKeys,
8005
+ addItem,
8006
+ removeItem,
8007
+ removeByKey,
8008
+ clear,
8009
+ isSelected
8010
+ };
8011
+ }
8012
+
8013
+ /**
8014
+ * Scrolls the virtually-focused option into view when it is NOT currently rendered. Under
8015
+ * virtualization only a window of options is in the DOM, so react-aria's own scroll-into-view (and
8016
+ * our per-item `useScrollOptionIntoView`) can't reach an option that hasn't mounted — arrowing past
8017
+ * the rendered window would otherwise appear to do nothing. This bridges react-aria's
8018
+ * `selectionManager.focusedKey` to the consumer's virtualizer so the row mounts and scrolls in.
8019
+ *
8020
+ * Consumer-invoked (the consumer owns the virtualizer instance).
8021
+ *
8022
+ * The effect keys ONLY on `focusedKey`/`isOpen` — i.e. it runs when the *active option* changes,
8023
+ * not on every render. This is essential: `useVirtual` returns a new `virtualizer` object on every
8024
+ * render and re-renders on every scroll frame, so depending on it would re-fire `scrollToIndex` on
8025
+ * each scroll tick and fight the user's scrollbar drag. The mutable inputs are read through a ref
8026
+ * instead. Hovering an option also moves `focusedKey`, but a hovered option is by definition already
8027
+ * rendered/visible, so `scrollToIndex` (align "auto") is a no-op for it.
8028
+ */ function useVirtualizedComboboxScroll({ state, filteredItems, getKey, virtualizer }) {
8029
+ const focusedKey = state.selectionManager.focusedKey;
8030
+ const isOpen = state.isOpen;
8031
+ // Latest mutable inputs, read inside the effect without adding them as deps (they change identity
8032
+ // every render / scroll frame).
8033
+ const latest = useRef({
8034
+ filteredItems,
8035
+ getKey,
8036
+ virtualizer
8037
+ });
8038
+ latest.current = {
8039
+ filteredItems,
8040
+ getKey,
8041
+ virtualizer
8042
+ };
8043
+ useEffect(()=>{
8044
+ if (!isOpen || focusedKey == null) return;
8045
+ const { filteredItems: items, getKey: key, virtualizer: v } = latest.current;
8046
+ const index = items.findIndex((item)=>key(item) === focusedKey);
8047
+ if (index < 0) return;
8048
+ // Defer one frame so the collection re-render + virtualizer measurement settle before we scroll.
8049
+ const raf = requestAnimationFrame(()=>v.scrollToIndex(index));
8050
+ return ()=>cancelAnimationFrame(raf);
8051
+ }, [
8052
+ focusedKey,
8053
+ isOpen
8054
+ ]);
8055
+ }
8056
+
8057
+ var index = /*#__PURE__*/Object.freeze({
8058
+ __proto__: null,
8059
+ TypeaheadComboboxAddButton: TypeaheadComboboxAddButton,
8060
+ TypeaheadComboboxCheckboxItem: TypeaheadComboboxCheckboxItem,
8061
+ TypeaheadComboboxFooter: TypeaheadComboboxFooter,
8062
+ TypeaheadComboboxInput: TypeaheadComboboxInput,
8063
+ TypeaheadComboboxMenu: TypeaheadComboboxMenu,
8064
+ TypeaheadComboboxMenuItem: TypeaheadComboboxMenuItem,
8065
+ TypeaheadComboboxMultiSelectInput: TypeaheadComboboxMultiSelectInput,
8066
+ TypeaheadComboboxRoot: TypeaheadComboboxRoot,
8067
+ TypeaheadComboboxSectionHeader: TypeaheadComboboxSectionHeader,
8068
+ TypeaheadComboboxSelectedItem: TypeaheadComboboxSelectedItem$1,
8069
+ TypeaheadComboboxSeparator: TypeaheadComboboxSeparator,
8070
+ TypeaheadComboboxToggleButton: TypeaheadComboboxToggleButton,
8071
+ useComboboxState: useComboboxState,
8072
+ useMultipleSelectionState: useMultipleSelectionState,
8073
+ useTypeaheadComboboxReactAriaContext: useTypeaheadComboboxReactAriaContext,
8074
+ useVirtualizedComboboxScroll: useVirtualizedComboboxScroll
8075
+ });
8076
+
6423
8077
  // Single source of truth for the DM Sans font-family stack used by Databricks One surfaces
6424
8078
  // (webapp DatabricksOneRouter, accounts-ui DatabricksOneWrapper). Co-located with the vendored
6425
8079
  // font CSS under `@databricks/design-system/fonts/dm-sans.css` so consumers can import both
6426
8080
  // from the design-system without duplicating the fallback chain.
6427
8081
  const DM_SANS_FONT_FAMILY = "'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif";
6428
8082
 
6429
- export { AccessibleContainer, Alert, ApplyGlobalStyles, AssistantAvatar, AutoComplete, Avatar, AvatarGroup, Breadcrumb, Button, Card, CheckCircleFillIcon, CheckCircleIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, CircleIcon, CircleOffIcon, CircleOutlineIcon, CloseIcon, CloseSmallIcon, Col, DBAssistantAvatar, DM_SANS_FONT_FAMILY, DU_BOIS_ENABLE_ANIMATION_CLASSNAME, DangerFillIcon, DangerIcon, DesignSystemAntDConfigProvider, DesignSystemEventProvider, DesignSystemEventProviderAnalyticsEventTypes, DesignSystemEventProviderComponentSubTypeMap, DesignSystemEventProviderComponentTypes, DesignSystemEventSuppressInteractionProviderContext, DesignSystemEventSuppressInteractionTrueContextValue, DialogCombobox, DialogComboboxAddButton, DialogComboboxContent, EmptyResults as DialogComboboxEmpty, DialogComboboxFooter, DialogComboboxHintRow, DialogComboboxOptionControlledList, DialogComboboxOptionList, DialogComboboxOptionListCheckboxItem, DialogComboboxOptionListSearch, DialogComboboxOptionListSelectItem, DialogComboboxSeparator, DialogComboboxTrigger, Dropdown, DuboisDatePicker, FormUI, GenericSkeleton, Header, HoverCard, InfoFillIcon, InfoPopover, InfoSmallIcon, Input, LegacyDatePicker, LegacyInfoCircleOutlined, LegacyInfoTooltip, LegacyPopover, LegacySelect, LegacySkeleton, LegacyTooltip, LoadingState, Menu, MinusSquareIcon, Modal, Notification, OverflowPopover, PageWrapper, ParagraphSkeleton, PlusIcon, PlusSquareIcon, RHFControlledComponents, ROW_GUTTER_SIZE, Radio, ResourceStatusIndicator, RestoreAntDDefaultClsPrefix, Row, SearchIcon, Select, SelectContent, SelectOption, SelectTrigger, ShapeTokens, SnackBar, SortAscendingIcon, SortDescendingIcon, SortUnsortedIcon, Space, SparkleDoubleIcon, Steps, Switch, Table, TableCell, TableContext, TableFilterInput, TableFilterLayout, TableHeader, TableRow, TableRowAction, TableRowActionHeader, TableRowContext, TableRowMenuContainer, TableRowMultiAction, TableRowSelectCell, TableSkeleton, TableSkeletonRows, TitleSkeleton, Tooltip, TreeGrid, TruncationTooltip, TypeaheadComboboxAddButton, TypeaheadComboboxInput, TypeaheadComboboxMenu, TypeaheadComboboxMultiSelectInput, TypeaheadComboboxRoot, TypeaheadComboboxSectionHeader, TypeaheadComboboxSelectedItem, TypeaheadComboboxSeparator, TypeaheadComboboxToggleButton, Typography, WarningFillIcon, WarningIcon, consumerDarkColorList, consumerLightColorList, findClosestOptionSibling, findHighlightedOption, flushFastdomForTesting, getAnimationCss, getComboboxOptionItemWrapperStyles, getContentOptions, getDarkModePortalStyles, getGlobalResetStyles, getGlobalStyles, getSwitchWithLabelStyles, getValidationStateColor, hideIconButtonRowStyles, highlightOption, importantify, isSafeRelativeUrl, isSafeUrl, measure, sanitizeNextUrl, setupDesignSystemEventProviderForTesting, snackBarManager, update, useComboboxState, useDefaultTreeGridState, useDesignSystemEventComponentCallbacks, useDesignSystemFlags, useDesignSystemTheme, useFastDom, useLegacyNotification, useModalContext, useMultipleSelectionState, useNotifyOnFirstView, useSnackBar, useThemedStyles, useTypeaheadComboboxContext, visuallyHidden, withNotifications };
8083
+ export { AccessibleContainer, Alert, ApplyGlobalStyles, AssistantAvatar, AutoComplete, Avatar, AvatarGroup, Breadcrumb, Button, Card, CheckCircleFillIcon, CheckCircleIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, CircleIcon, CircleOffIcon, CircleOutlineIcon, CloseIcon, CloseSmallIcon, Col, DBAssistantAvatar, DM_SANS_FONT_FAMILY, DU_BOIS_ENABLE_ANIMATION_CLASSNAME, DangerFillIcon, DangerIcon, DesignSystemAntDConfigProvider, DesignSystemEventProvider, DesignSystemEventProviderAnalyticsEventTypes, DesignSystemEventProviderComponentSubTypeMap, DesignSystemEventProviderComponentTypes, DesignSystemEventSuppressInteractionProviderContext, DesignSystemEventSuppressInteractionTrueContextValue, DialogCombobox, DialogComboboxAddButton, DialogComboboxContent, EmptyResults as DialogComboboxEmpty, DialogComboboxFooter, DialogComboboxHintRow, DialogComboboxOptionControlledList, DialogComboboxOptionList, DialogComboboxOptionListCheckboxItem, DialogComboboxOptionListSearch, DialogComboboxOptionListSelectItem, DialogComboboxSeparator, DialogComboboxTrigger, Dropdown, DuboisDatePicker, FormUI, GenericSkeleton, Header, HoverCard, InfoFillIcon, InfoPopover, InfoSmallIcon, InfoTooltip, Input, LegacyDatePicker, LegacyPopover, LegacySelect, LegacySkeleton, LoadingState, Menu, MinusSquareIcon, Modal, Notification, OverflowPopover, PageWrapper, ParagraphSkeleton, PlusIcon, PlusSquareIcon, RHFControlledComponents, ROW_GUTTER_SIZE, Radio, ResourceStatusIndicator, RestoreAntDDefaultClsPrefix, Row, SearchIcon, Select, SelectContent, SelectOption, SelectTrigger, ShapeTokens, SnackBar, SortAscendingIcon, SortDescendingIcon, SortUnsortedIcon, Space, SparkleDoubleIcon, Steps, Switch, Table, TableCell, TableContext, TableFilterInput, TableFilterLayout, TableHeader, TableRow, TableRowAction, TableRowActionHeader, TableRowContext, TableRowMenuContainer, TableRowMultiAction, TableRowSelectCell, TableSkeleton, TableSkeletonRows, TitleSkeleton, Tooltip, TreeGrid, TruncationTooltip, TypeaheadComboboxAddButton$1 as TypeaheadComboboxAddButton, TypeaheadComboboxInput$1 as TypeaheadComboboxInput, TypeaheadComboboxMenu$1 as TypeaheadComboboxMenu, TypeaheadComboboxMultiSelectInput$1 as TypeaheadComboboxMultiSelectInput, index as TypeaheadComboboxReactAria, TypeaheadComboboxRoot$1 as TypeaheadComboboxRoot, TypeaheadComboboxSectionHeader$1 as TypeaheadComboboxSectionHeader, TypeaheadComboboxSelectedItem, TypeaheadComboboxSeparator$1 as TypeaheadComboboxSeparator, TypeaheadComboboxToggleButton$1 as TypeaheadComboboxToggleButton, Typography, WarningFillIcon, WarningIcon, consumerDarkColorList, consumerLightColorList, findClosestOptionSibling, findHighlightedOption, flushFastdomForTesting, getAnimationCss, getComboboxOptionItemWrapperStyles, getContentOptions, getDarkModePortalStyles, getGlobalResetStyles, getGlobalStyles, getSwitchWithLabelStyles, getValidationStateColor, hideIconButtonRowStyles, highlightOption, importantify, isSafeRelativeUrl, isSafeUrl, measure, sanitizeNextUrl, setupDesignSystemEventProviderForTesting, snackBarManager, update, useComboboxState$1 as useComboboxState, useDefaultTreeGridState, useDesignSystemEventComponentCallbacks, useDesignSystemFlags, useDesignSystemTheme, useFastDom, useLegacyNotification, useModalContext, useMultipleSelectionState$1 as useMultipleSelectionState, useNotifyOnFirstView, useRadixModalContext, useSnackBar, useThemedStyles, useTypeaheadComboboxContext, visuallyHidden, withNotifications };
6430
8084
  //# sourceMappingURL=index.js.map