@databricks/design-system 1.12.15 → 1.12.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Stepper-1ef5b499.js +395 -0
- package/dist/Stepper-1ef5b499.js.map +1 -0
- package/dist/{Stepper-a0fb4d9b.js → Typography-ed0b1c4d.js} +852 -1397
- package/dist/Typography-ed0b1c4d.js.map +1 -0
- package/dist/common-5b60d682.js.map +1 -1
- package/dist/design-system/AccessibleContainer/index.d.ts +0 -1
- package/dist/design-system/AccessibleContainer/index.d.ts.map +1 -1
- package/dist/design-system/Accordion/Accordion.d.ts +0 -1
- package/dist/design-system/Accordion/Accordion.d.ts.map +1 -1
- package/dist/design-system/Alert/Alert.d.ts +3 -3
- package/dist/design-system/Alert/Alert.d.ts.map +1 -1
- package/dist/design-system/ApplyGlobalStyles/ApplyGlobalStyles.d.ts +0 -1
- package/dist/design-system/ApplyGlobalStyles/ApplyGlobalStyles.d.ts.map +1 -1
- package/dist/design-system/AutoComplete/AutoComplete.d.ts +0 -1
- package/dist/design-system/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/design-system/Avatar/Avatar.d.ts +22 -15
- package/dist/design-system/Avatar/Avatar.d.ts.map +1 -1
- package/dist/design-system/Breadcrumb/Breadcrumb.d.ts +0 -1
- package/dist/design-system/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/design-system/Button/Button.d.ts +11 -13
- package/dist/design-system/Button/Button.d.ts.map +1 -1
- package/dist/design-system/Button/styles.d.ts +4 -1
- package/dist/design-system/Button/styles.d.ts.map +1 -1
- package/dist/design-system/Card/Card.d.ts +6 -3
- package/dist/design-system/Card/Card.d.ts.map +1 -1
- package/dist/design-system/Checkbox/Checkbox.d.ts +7 -5
- package/dist/design-system/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/design-system/ContextMenu/ContextMenu.d.ts +7 -5
- package/dist/design-system/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/design-system/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/design-system/DesignSystemEventProvider/DesignSystemEventProvider.d.ts +38 -4
- package/dist/design-system/DesignSystemEventProvider/DesignSystemEventProvider.d.ts.map +1 -1
- package/dist/design-system/DesignSystemEventProvider/DesignSystemEventSuppressInteractionProvider.d.ts +14 -0
- package/dist/design-system/DesignSystemEventProvider/DesignSystemEventSuppressInteractionProvider.d.ts.map +1 -0
- package/dist/design-system/DesignSystemEventProvider/index.d.ts +1 -0
- package/dist/design-system/DesignSystemEventProvider/index.d.ts.map +1 -1
- package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogCombobox.d.ts +12 -5
- package/dist/design-system/DialogCombobox/DialogCombobox.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxAddButton.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxFooter.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionControlledList.d.ts +0 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionControlledList.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts +0 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts +2 -2
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts +0 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxSectionHeader.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxSeparator.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts +2 -0
- package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/providers/DialogComboboxContext.d.ts +5 -3
- package/dist/design-system/DialogCombobox/providers/DialogComboboxContext.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/providers/DialogComboboxOptionListContext.d.ts +0 -1
- package/dist/design-system/DialogCombobox/providers/DialogComboboxOptionListContext.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/shared.d.ts +3 -3
- package/dist/design-system/DialogCombobox/shared.d.ts.map +1 -1
- package/dist/design-system/Drawer/Drawer.d.ts.map +1 -1
- package/dist/design-system/Dropdown/Dropdown.d.ts +0 -1
- package/dist/design-system/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/design-system/DropdownMenu/DropdownMenu.d.ts +11 -6
- package/dist/design-system/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/design-system/Empty/Empty.d.ts.map +1 -1
- package/dist/design-system/Form/Form.d.ts.map +1 -1
- package/dist/design-system/FormMessage/FormMessage.d.ts +2 -2
- package/dist/design-system/FormMessage/FormMessage.d.ts.map +1 -1
- package/dist/design-system/FormV2/RHFAdapters.d.ts +5 -5
- package/dist/design-system/FormV2/RHFAdapters.d.ts.map +1 -1
- package/dist/design-system/FormV2/index.d.ts +1 -2
- package/dist/design-system/FormV2/index.d.ts.map +1 -1
- package/dist/design-system/Grid/Col.d.ts +0 -1
- package/dist/design-system/Grid/Col.d.ts.map +1 -1
- package/dist/design-system/Grid/Row.d.ts +0 -1
- package/dist/design-system/Grid/Row.d.ts.map +1 -1
- package/dist/design-system/Header/Header.d.ts.map +1 -1
- package/dist/design-system/Hint/Hint.d.ts.map +1 -1
- package/dist/design-system/Hooks/useThemedStyles.d.ts.map +1 -1
- package/dist/design-system/Icon/Icon.d.ts +1 -1
- package/dist/design-system/Icon/Icon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/AlignCenterIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/AlignLeftIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/AlignRightIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/AppIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ArrowDownDotIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/ArrowDownDotIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ArrowDownIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ArrowInIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ArrowLeftIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ArrowOverIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/ArrowOverIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ArrowRightIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ArrowUpDotIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/ArrowUpDotIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ArrowUpIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ArrowsUpDownIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/AssistantIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BadgeCodeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BadgeCodeOffIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BarChartIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BarGroupedIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BarStackedIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BarStackedPercentageIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BeakerIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BinaryIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BlockQuoteIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/BlockQuoteIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/BoldIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BookIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BookmarkFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BookmarkIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BooksIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BracketsCurlyIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BracketsSquareIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BracketsXIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BranchIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BriefcaseFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BriefcaseIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/BugIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/BugIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/CalendarClockIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CalendarEventIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CalendarIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CaretDownSquareIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CaretUpSquareIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CatalogCloudIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/{VectorTableIcon.d.ts → CatalogGearIcon.d.ts} +3 -3
- package/dist/design-system/Icon/__generated/icons/CatalogGearIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/{StepIntoIcon.d.ts → CatalogHIcon.d.ts} +3 -3
- package/dist/design-system/Icon/__generated/icons/CatalogHIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/CatalogIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CatalogOffIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CatalogSharedIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/CatalogSharedIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ChainIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/ChainIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ChartLineIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChartLineIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/CheckCircleBadgeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CheckCircleFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CheckCircleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CheckIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CheckLineIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CheckSmallIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/CheckSmallIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/CheckboxIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChecklistIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChevronDoubleDownIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChevronDoubleDownIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/ChevronDoubleLeftIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChevronDoubleRightIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChevronDoubleUpIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChevronDownIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChevronLeftIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChevronRightIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ChevronUpIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CircleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ClipboardIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ClockIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ClockKeyIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CloseIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CloseSmallIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/CloseSmallIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/CloudDatabaseIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/CloudDatabaseIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/CloudDownloadIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CloudDownloadIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/CloudIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CloudKeyIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CloudModelIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CloudOffIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CloudUploadIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CodeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ColorFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ColumnIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ColumnsIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CommandPaletteIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/CommandPaletteIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ConnectIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CopyIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CursorIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/CursorTypeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DagIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DangerFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DangerIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DashIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DashboardIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DataIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DatabaseIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DecimalIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DotsCircleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DownloadIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/DragIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ErdIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ErdIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/ExpandLessIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ExpandMoreIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FaceFrownIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FaceNeutralIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FaceSmileIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FileCodeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FileDocumentIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FileIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FileImageIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FileModelIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FilterIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FlagPointerIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/FlagPointerIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/FloatIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FolderBranchFillIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/FolderBranchFillIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/FolderBranchIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FolderCloudFilledIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FolderCloudIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FolderFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FolderIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FontIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ForkIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FullscreenExitIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FullscreenIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/FunctionIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/GearFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/GearIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/GiftIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/GitCommitIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/GlobeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/GridDashIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/GridIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/H1Icon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/H2Icon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/H3Icon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/HistoryIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/HomeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ImageIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/IndentDecreaseIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/IndentIncreaseIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/InfinityIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/{StepOverIcon.d.ts → InfoBookIcon.d.ts} +3 -3
- package/dist/design-system/Icon/__generated/icons/InfoBookIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/InfoFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/InfoIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/IngestionIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ItalicIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/KeyIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/KeyboardIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LayerGraphIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LayerIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LeafIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/LeafIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/LettersIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LibrariesIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LibrariesIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/LightningIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LinkIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LinkOffIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ListBorderIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ListClearIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ListClearIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/ListIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LoadingIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LockFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LockIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/LockUnlockedIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/MIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/MailIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/MegaphoneIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/MenuIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/MinusBoxIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/MinusCircleFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/MinusCircleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ModelsIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/NewWindowIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/NoIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/NotebookIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/NotificationIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/NotificationOffIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/NumbersIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/OfficeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/OverflowIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PageBottomIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PageFirstIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PageLastIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PageTopIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PauseIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PencilIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PieChartIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/PieChartIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/PinCancelIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PinFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PinIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PipelineIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PlayCircleFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PlayCircleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PlayIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PlugIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PlusCircleFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PlusCircleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PlusIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/PlusSquareIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/QueryEditorIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/QueryEditorIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/QueryIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/QuestionMarkFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/QuestionMarkIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ReaderModeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/RedoIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/RefreshIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ReplyIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/ReplyIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/Robot2Icon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/Robot2Icon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/RobotIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/RunningIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SaveIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SchemaIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SchoolIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SearchDataIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/SearchDataIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SearchIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SecurityIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SendIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ShareIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ShareIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/ShieldIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/ShieldIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ShortcutIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/ShortcutIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SidebarAutoIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SidebarCollapseIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SidebarExpandIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SidebarExpandIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/SidebarIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SlidersIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalAscendingIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalDescendingIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalLeftIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SortAlphabeticalRightIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SortAscendingIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SortDescendingIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SortUnsortedIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SparkleDoubleFillIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/SparkleDoubleFillIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SparkleDoubleIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/SparkleDoubleIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SparkleFillIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/SparkleFillIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SparkleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SparkleIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/SparkleRectangleIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/SparkleRectangleIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SpeechBubbleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SpeechBubblePlusIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SpeechBubbleQuestionMarkIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SpeechBubbleStarIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/SpeechBubbleStarIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/StarFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/StarIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/StopCircleFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/StopCircleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/StopIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/StopIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/StorefrontIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/StreamIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/SyncIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TableGlassesIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TableGlobeIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/TableGlobeIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/TableIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TableLightningIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TableModelIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/TableModelIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/TableOnlineViewIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TableStreamIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TableVectorIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TableViewIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TagIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TargetIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TargetIcon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/TerminalIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/TerminalIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/TextBoxIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TextUnderlineIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/TextUnderlineIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ThumbsDownIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ThumbsUpIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TrashIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/TreeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/UnderlineIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/UndoIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/UploadIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/UsbIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/UserBadgeIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/UserCircleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/UserGroupIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/UserIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/VisibleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/VisibleOffIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/WarningFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/WarningIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/WorkflowsIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/WorkspacesIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/WrenchIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/WrenchIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/XCircleFillIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/XCircleIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ZoomInIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ZoomMarqueeSelection.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/ZoomOutIcon.d.ts +1 -1
- package/dist/design-system/Icon/__generated/icons/index.d.ts +33 -5
- package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
- package/dist/design-system/Icon/iconMap.d.ts +2 -2
- package/dist/design-system/Icon/iconMap.d.ts.map +1 -1
- package/dist/design-system/Icon/index.d.ts +1 -1
- package/dist/design-system/Icon/index.d.ts.map +1 -1
- package/dist/design-system/Input/Group.d.ts.map +1 -1
- package/dist/design-system/Input/Input.d.ts +2 -2
- package/dist/design-system/Input/Input.d.ts.map +1 -1
- package/dist/design-system/Input/Password.d.ts.map +1 -1
- package/dist/design-system/Input/TextArea.d.ts +0 -1
- package/dist/design-system/Input/TextArea.d.ts.map +1 -1
- package/dist/design-system/Input/common.d.ts +1 -1
- package/dist/design-system/Input/common.d.ts.map +1 -1
- package/dist/design-system/Input/index.d.ts +1 -2
- package/dist/design-system/Input/index.d.ts.map +1 -1
- package/dist/design-system/Label/Label.d.ts +7 -1
- package/dist/design-system/Label/Label.d.ts.map +1 -1
- package/dist/design-system/Layout/Layout.d.ts.map +1 -1
- package/dist/design-system/LegacyNotification/LegacyNotification.d.ts +1 -2
- package/dist/design-system/LegacyNotification/LegacyNotification.d.ts.map +1 -1
- package/dist/design-system/LegacyPopover/LegacyPopover.d.ts +0 -1
- package/dist/design-system/LegacyPopover/LegacyPopover.d.ts.map +1 -1
- package/dist/design-system/LegacySelect/LegacySelect.d.ts +2 -2
- package/dist/design-system/LegacySelect/LegacySelect.d.ts.map +1 -1
- package/dist/design-system/LegacySkeleton/LegacySkeleton.d.ts +0 -1
- package/dist/design-system/LegacySkeleton/LegacySkeleton.d.ts.map +1 -1
- package/dist/design-system/LegacyTable/LegacyTable.d.ts +0 -1
- package/dist/design-system/LegacyTable/LegacyTable.d.ts.map +1 -1
- package/dist/design-system/LegacyTooltip/LegacyInfoTooltip.d.ts +17 -0
- package/dist/design-system/LegacyTooltip/LegacyInfoTooltip.d.ts.map +1 -0
- package/dist/design-system/LegacyTooltip/LegacyTooltip.d.ts +48 -0
- package/dist/design-system/LegacyTooltip/LegacyTooltip.d.ts.map +1 -0
- package/dist/design-system/LegacyTooltip/index.d.ts +3 -0
- package/dist/design-system/LegacyTooltip/index.d.ts.map +1 -0
- package/dist/design-system/List/List.d.ts.map +1 -1
- package/dist/design-system/LoadingState/LoadingState.d.ts +0 -1
- package/dist/design-system/LoadingState/LoadingState.d.ts.map +1 -1
- package/dist/design-system/Menu/Menu.d.ts +0 -1
- package/dist/design-system/Menu/Menu.d.ts.map +1 -1
- package/dist/design-system/Modal/Modal.d.ts +8 -5
- package/dist/design-system/Modal/Modal.d.ts.map +1 -1
- package/dist/design-system/Notification/Notification.d.ts +4 -2
- package/dist/design-system/Notification/Notification.d.ts.map +1 -1
- package/dist/design-system/Overflow/Overflow.d.ts +0 -1
- package/dist/design-system/Overflow/Overflow.d.ts.map +1 -1
- package/dist/design-system/Overflow/OverflowPopover.d.ts +9 -0
- package/dist/design-system/Overflow/OverflowPopover.d.ts.map +1 -0
- package/dist/design-system/PageWrapper/PageWrapper.d.ts +0 -1
- package/dist/design-system/PageWrapper/PageWrapper.d.ts.map +1 -1
- package/dist/design-system/Pagination/index.d.ts +4 -4
- package/dist/design-system/Pagination/index.d.ts.map +1 -1
- package/dist/design-system/Popover/InfoPopover.d.ts +0 -1
- package/dist/design-system/Popover/InfoPopover.d.ts.map +1 -1
- package/dist/design-system/Popover/Popover.d.ts +1 -1
- package/dist/design-system/Popover/Popover.d.ts.map +1 -1
- package/dist/design-system/Radio/Radio.d.ts +4 -5
- package/dist/design-system/Radio/Radio.d.ts.map +1 -1
- package/dist/design-system/SegmentedControl/SegmentedControl.d.ts +3 -3
- package/dist/design-system/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/design-system/Select/Select.d.ts +3 -2
- package/dist/design-system/Select/Select.d.ts.map +1 -1
- package/dist/design-system/Select/SelectContent.d.ts +0 -1
- package/dist/design-system/Select/SelectContent.d.ts.map +1 -1
- package/dist/design-system/Select/SelectOption.d.ts +0 -1
- package/dist/design-system/Select/SelectOption.d.ts.map +1 -1
- package/dist/design-system/Select/SelectOptionGroup.d.ts +0 -1
- package/dist/design-system/Select/SelectOptionGroup.d.ts.map +1 -1
- package/dist/design-system/Select/SelectTrigger.d.ts +0 -1
- package/dist/design-system/Select/SelectTrigger.d.ts.map +1 -1
- package/dist/design-system/Select/SimpleSelect.d.ts +13 -9
- package/dist/design-system/Select/SimpleSelect.d.ts.map +1 -1
- package/dist/design-system/Select/providers/SelectContext.d.ts +0 -1
- package/dist/design-system/Select/providers/SelectContext.d.ts.map +1 -1
- package/dist/design-system/Sidebar/Sidebar.d.ts +2 -2
- package/dist/design-system/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/design-system/Skeleton/GenericSkeleton.d.ts.map +1 -1
- package/dist/design-system/Skeleton/ParagraphSkeleton.d.ts.map +1 -1
- package/dist/design-system/Skeleton/TableSkeleton.d.ts.map +1 -1
- package/dist/design-system/Skeleton/TitleSkeleton.d.ts.map +1 -1
- package/dist/design-system/Space/Space.d.ts +0 -1
- package/dist/design-system/Space/Space.d.ts.map +1 -1
- package/dist/design-system/Spacer/Spacer.d.ts +0 -1
- package/dist/design-system/Spacer/Spacer.d.ts.map +1 -1
- package/dist/design-system/Spinner/Spinner.d.ts +0 -1
- package/dist/design-system/Spinner/Spinner.d.ts.map +1 -1
- package/dist/design-system/SplitButton/Dropdown/DropdownButton.d.ts +3 -1
- package/dist/design-system/SplitButton/Dropdown/DropdownButton.d.ts.map +1 -1
- package/dist/design-system/SplitButton/SplitButton.d.ts +0 -1
- package/dist/design-system/SplitButton/SplitButton.d.ts.map +1 -1
- package/dist/design-system/Steps/Steps.d.ts.map +1 -1
- package/dist/design-system/Switch/Switch.d.ts +3 -3
- package/dist/design-system/Switch/Switch.d.ts.map +1 -1
- package/dist/design-system/TableUI/Table.d.ts +3 -3
- package/dist/design-system/TableUI/Table.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableFilterInput.d.ts +0 -1
- package/dist/design-system/TableUI/TableFilterInput.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableFilterLayout.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableRow.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableRowActionHeader.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableRowSelectCell.d.ts +0 -1
- package/dist/design-system/TableUI/TableRowSelectCell.d.ts.map +1 -1
- package/dist/design-system/Tabs/index.d.ts +0 -1
- package/dist/design-system/Tabs/index.d.ts.map +1 -1
- package/dist/design-system/Tag/index.d.ts +4 -3
- package/dist/design-system/Tag/index.d.ts.map +1 -1
- package/dist/design-system/ToggleButton/ToggleButton.d.ts +10 -1
- package/dist/design-system/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/design-system/Tooltip/InfoTooltip.d.ts +3 -7
- package/dist/design-system/Tooltip/InfoTooltip.d.ts.map +1 -1
- package/dist/design-system/Tooltip/Tooltip.d.ts +6 -30
- package/dist/design-system/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/design-system/Tree/Tree.d.ts +0 -1
- package/dist/design-system/Tree/Tree.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts +0 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts +0 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts +0 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts +3 -3
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts +0 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +1 -2
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts +3 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts +0 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +0 -1
- package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/providers/TypeaheadComboboxContext.d.ts +3 -2
- package/dist/design-system/TypeaheadCombobox/providers/TypeaheadComboboxContext.d.ts.map +1 -1
- package/dist/design-system/Typography/Hint.d.ts.map +1 -1
- package/dist/design-system/Typography/Link.d.ts +4 -3
- package/dist/design-system/Typography/Link.d.ts.map +1 -1
- package/dist/design-system/Typography/Paragraph.d.ts.map +1 -1
- package/dist/design-system/Typography/Text.d.ts.map +1 -1
- package/dist/design-system/Typography/Title.d.ts.map +1 -1
- package/dist/design-system/Typography/Truncate.d.ts +7 -0
- package/dist/design-system/Typography/Truncate.d.ts.map +1 -0
- package/dist/design-system/Typography/Typography.d.ts +2 -1
- package/dist/design-system/Typography/Typography.d.ts.map +1 -1
- package/dist/design-system/Typography/index.d.ts +1 -0
- package/dist/design-system/Typography/index.d.ts.map +1 -1
- package/dist/design-system/_shared_/Combobox/EmptyResults.d.ts +0 -1
- package/dist/design-system/_shared_/Combobox/EmptyResults.d.ts.map +1 -1
- package/dist/design-system/_shared_/Combobox/SectionHeader.d.ts.map +1 -1
- package/dist/design-system/_shared_/Combobox/Separator.d.ts.map +1 -1
- package/dist/design-system/_shared_/Combobox/styles.d.ts +7 -7
- package/dist/design-system/_shared_/Combobox/styles.d.ts.map +1 -1
- package/dist/design-system/_shared_/Menu/index.d.ts +0 -1
- package/dist/design-system/_shared_/Menu/index.d.ts.map +1 -1
- package/dist/design-system/index.d.ts +1 -1
- package/dist/design-system/index.d.ts.map +1 -1
- package/dist/design-system/types.d.ts +34 -2
- package/dist/design-system/types.d.ts.map +1 -1
- package/dist/design-system/utils/css-utils.d.ts +0 -1
- package/dist/design-system/utils/css-utils.d.ts.map +1 -1
- package/dist/design-system/utils/debug.d.ts +1 -0
- package/dist/design-system/utils/debug.d.ts.map +1 -1
- package/dist/design-system/utils/useCallbackOnceUntilReset.d.ts.map +1 -1
- package/dist/design-system/utils/useNotifyOnFirstView.d.ts +0 -1
- package/dist/design-system/utils/useNotifyOnFirstView.d.ts.map +1 -1
- package/dist/development/Banner/Banner.d.ts.map +1 -1
- package/dist/development/DatePicker/DatePicker.d.ts +60 -0
- package/dist/development/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/development/DatePicker/index.d.ts +2 -0
- package/dist/development/DatePicker/index.d.ts.map +1 -0
- package/dist/development/DatePicker/styles.d.ts +3 -0
- package/dist/development/DatePicker/styles.d.ts.map +1 -0
- package/dist/development/DatePicker/utils.d.ts +44 -0
- package/dist/development/DatePicker/utils.d.ts.map +1 -0
- package/dist/development/PillControl/PillControl.d.ts +3 -1
- package/dist/development/PillControl/PillControl.d.ts.map +1 -1
- package/dist/development/PreviewCard/PreviewCard.d.ts +3 -1
- package/dist/development/PreviewCard/PreviewCard.d.ts.map +1 -1
- package/dist/development/Progress/providers/ProgressContex.d.ts +0 -1
- package/dist/development/Progress/providers/ProgressContex.d.ts.map +1 -1
- package/dist/development/Slider/Slider.d.ts +0 -1
- package/dist/development/Slider/Slider.d.ts.map +1 -1
- package/dist/development/Stepper/Stepper.d.ts +21 -3
- package/dist/development/Stepper/Stepper.d.ts.map +1 -1
- package/dist/development/TabsV2/TabsV2.d.ts +27 -0
- package/dist/development/TabsV2/TabsV2.d.ts.map +1 -0
- package/dist/development/TabsV2/index.d.ts +2 -0
- package/dist/development/TabsV2/index.d.ts.map +1 -0
- package/dist/development/Toolbar/Toolbar.d.ts +0 -1
- package/dist/development/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/development/index.d.ts +6 -4
- package/dist/development/index.d.ts.map +1 -1
- package/dist/development.js +1267 -800
- package/dist/development.js.map +1 -1
- package/dist/flags.d.ts +0 -1
- package/dist/flags.d.ts.map +1 -1
- package/dist/index-b1437d2d.js +507 -0
- package/dist/index-b1437d2d.js.map +1 -0
- package/dist/index-dark.css +23 -1
- package/dist/index.css +20 -1
- package/dist/index.js +3581 -2592
- package/dist/index.js.map +1 -1
- package/dist/patterns.js +508 -0
- package/dist/patterns.js.map +1 -0
- package/dist/test-utils/enzyme/index.d.ts.map +1 -1
- package/dist/test-utils/enzyme/utils.d.ts +0 -1
- package/dist/test-utils/enzyme/utils.d.ts.map +1 -1
- package/dist/test-utils/enzyme.js.map +1 -1
- package/dist/test-utils/rtl/index.d.ts +2 -0
- package/dist/test-utils/rtl/index.d.ts.map +1 -1
- package/dist/test-utils/rtl/select.d.ts +28 -0
- package/dist/test-utils/rtl/select.d.ts.map +1 -0
- package/dist/test-utils/rtl/simpleSelect.utils.d.ts +20 -0
- package/dist/test-utils/rtl/simpleSelect.utils.d.ts.map +1 -0
- package/dist/test-utils/rtl.js +152 -2
- package/dist/test-utils/rtl.js.map +1 -1
- package/dist/theme/borders.d.ts +2 -0
- package/dist/theme/borders.d.ts.map +1 -1
- package/dist/theme/colors.d.ts +8 -4
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/theme/gradients.d.ts +6 -0
- package/dist/theme/gradients.d.ts.map +1 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/useMediaQuery-fddfe3fd.js +499 -0
- package/dist/useMediaQuery-fddfe3fd.js.map +1 -0
- package/dist/~patterns/Wizard/HorizontalWizardContent.d.ts +5 -0
- package/dist/~patterns/Wizard/HorizontalWizardContent.d.ts.map +1 -0
- package/dist/~patterns/Wizard/HorizontalWizardStepsContent.d.ts +11 -0
- package/dist/~patterns/Wizard/HorizontalWizardStepsContent.d.ts.map +1 -0
- package/dist/~patterns/Wizard/VerticalWizardContent.d.ts +5 -0
- package/dist/~patterns/Wizard/VerticalWizardContent.d.ts.map +1 -0
- package/dist/~patterns/Wizard/Wizard.d.ts +4 -0
- package/dist/~patterns/Wizard/Wizard.d.ts.map +1 -0
- package/dist/{design-system → ~patterns}/Wizard/WizardFooter.d.ts +4 -4
- package/dist/~patterns/Wizard/WizardFooter.d.ts.map +1 -0
- package/dist/~patterns/Wizard/WizardModal.d.ts +7 -0
- package/dist/~patterns/Wizard/WizardModal.d.ts.map +1 -0
- package/dist/{design-system/Wizard/Wizard.d.ts → ~patterns/Wizard/WizardProps.d.ts} +38 -12
- package/dist/~patterns/Wizard/WizardProps.d.ts.map +1 -0
- package/dist/{design-system → ~patterns}/Wizard/WizardStep.d.ts +25 -1
- package/dist/~patterns/Wizard/WizardStep.d.ts.map +1 -0
- package/dist/~patterns/Wizard/index.d.ts +6 -0
- package/dist/~patterns/Wizard/index.d.ts.map +1 -0
- package/dist/~patterns/Wizard/useStepperStepsFromWizardSteps.d.ts +9 -0
- package/dist/~patterns/Wizard/useStepperStepsFromWizardSteps.d.ts.map +1 -0
- package/dist/{design-system → ~patterns}/Wizard/useWizardCurrentStep.d.ts +3 -3
- package/dist/~patterns/Wizard/useWizardCurrentStep.d.ts.map +1 -0
- package/dist/~patterns/index.d.ts +4 -0
- package/dist/~patterns/index.d.ts.map +1 -0
- package/package.json +22 -11
- package/patterns.d.ts +1 -0
- package/patterns.mjs +1 -0
- package/dist/Stepper-a0fb4d9b.js.map +0 -1
- package/dist/design-system/Avatar/SvgSparkleIcon.d.ts +0 -3
- package/dist/design-system/Avatar/SvgSparkleIcon.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/QuestionMarkSpeechBubbleIcon.d.ts +0 -5
- package/dist/design-system/Icon/__generated/icons/QuestionMarkSpeechBubbleIcon.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/StepIntoIcon.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/StepOutIcon.d.ts +0 -5
- package/dist/design-system/Icon/__generated/icons/StepOutIcon.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/StepOverIcon.d.ts.map +0 -1
- package/dist/design-system/Icon/__generated/icons/VectorTableIcon.d.ts.map +0 -1
- package/dist/design-system/Wizard/Wizard.d.ts.map +0 -1
- package/dist/design-system/Wizard/WizardFooter.d.ts.map +0 -1
- package/dist/design-system/Wizard/WizardModal.d.ts +0 -7
- package/dist/design-system/Wizard/WizardModal.d.ts.map +0 -1
- package/dist/design-system/Wizard/WizardStep.d.ts.map +0 -1
- package/dist/design-system/Wizard/WizardStepsContent.d.ts +0 -11
- package/dist/design-system/Wizard/WizardStepsContent.d.ts.map +0 -1
- package/dist/design-system/Wizard/index.d.ts +0 -5
- package/dist/design-system/Wizard/index.d.ts.map +0 -1
- package/dist/design-system/Wizard/useWizardCurrentStep.d.ts.map +0 -1
- package/dist/development/ChatUI/ChatInput.d.ts +0 -11
- package/dist/development/ChatUI/ChatInput.d.ts.map +0 -1
- package/dist/development/ChatUI/CodeSnippet.d.ts +0 -9
- package/dist/development/ChatUI/CodeSnippet.d.ts.map +0 -1
- package/dist/development/ChatUI/Feedback.d.ts +0 -6
- package/dist/development/ChatUI/Feedback.d.ts.map +0 -1
- package/dist/development/ChatUI/Message.d.ts +0 -8
- package/dist/development/ChatUI/Message.d.ts.map +0 -1
- package/dist/development/ChatUI/MessageActionButton.d.ts +0 -4
- package/dist/development/ChatUI/MessageActionButton.d.ts.map +0 -1
- package/dist/development/ChatUI/MessageBody.d.ts +0 -7
- package/dist/development/ChatUI/MessageBody.d.ts.map +0 -1
- package/dist/development/ChatUI/MessageHeader.d.ts +0 -11
- package/dist/development/ChatUI/MessageHeader.d.ts.map +0 -1
- package/dist/development/ChatUI/MessagePagination.d.ts +0 -9
- package/dist/development/ChatUI/MessagePagination.d.ts.map +0 -1
- package/dist/development/ChatUI/index.d.ts +0 -39
- package/dist/development/ChatUI/index.d.ts.map +0 -1
- package/dist/test-utils/types.d.ts +0 -2
- package/dist/test-utils/types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enzyme.js","sources":["../../src/test-utils/enzyme/utils.ts","../../src/test-utils/enzyme/selectEvent.ts","../../src/test-utils/enzyme/table.ts","../../src/test-utils/enzyme/index.ts"],"sourcesContent":["// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\nimport { act } from 'react-dom/test-utils';\n\ninterface QueryOptions {\n /** Whether to trim the whitespace from DOM text using `String.prototype.trim` */\n trim?: boolean;\n}\n\n/**\n * Finds a single element that contains the specified text in the wrapper. If\n * there are 0 or more than 1 element that contains the specified text, an error\n * is thrown. Returns the element in an enzyme wrapper.\n */\nexport function findByText<P, S, C>(\n wrapper: ReactWrapper<P, S, C>,\n text: string | RegExp,\n queryOptions?: QueryOptions,\n) {\n const newWrappers = findAllByText<P, S, C>(wrapper, text, queryOptions);\n if (newWrappers.length !== 1) {\n throw new Error(\n `Expected to find 1 node but found ${newWrappers.length} nodes for text \"${text}\".\\n${wrapper.debug()}`,\n );\n }\n return newWrappers[0];\n}\n\n/**\n * Finds all elements that contain the specified text. To avoid duplicate results,\n * only the parents of text nodes are returned.\n */\nexport function findAllByText<P, S, C>(\n wrapper: ReactWrapper<P, S, C>,\n text: string | RegExp,\n { trim = false }: QueryOptions = {},\n) {\n const textNodes = wrapper.findWhere((n) => {\n if (typeof n.type() !== 'string' || n.getDOMNode().children.length !== 0) {\n return false;\n }\n\n let nodeText = n.text();\n if (trim) {\n nodeText = nodeText.trim();\n }\n\n return typeof text === 'string' ? nodeText === text : text.test(nodeText);\n });\n const hostNodes = textNodes.map((n) => {\n // Traverse from the text node to the closest DOM node (aka host node)\n let hostNode = n.parents().first();\n while (typeof hostNode.type() !== 'string' && hostNode.parents().length > 0) {\n hostNode = hostNode.parents().first();\n }\n return hostNode;\n });\n return hostNodes;\n}\n\n// We need to keep ref to original setTimeout to avoid SinonJS fake timers if enabled\nconst originalSetTimeout = window.setTimeout;\n\n/**\n * This is so the stack trace the developer sees is one that's\n * closer to their code (because async stack traces are hard to follow).\n *\n * The code is taken from\n * https://github.com/testing-library/dom-testing-library/blob/f7b5c33c44632fba\n * 1579cb44f9f175be1ec46087/src/wait-for.js#L15-L19\n */\nfunction copyStackTrace(target: Error, source: Error) {\n target.stack = source.stack!.replace(source.message, target.message);\n}\n\ninterface WaitForOptions {\n interval?: number;\n stackTraceError?: Error;\n timeout?: number;\n}\n\n/**\n * Run an expectation until it succeeds or reaches the timeout. The timeout of 1500ms\n * is chosen to be under the default Karma test timeout of 2000ms. This function will\n * not work properly if fake timers are being used (since it expects the real setTimeout).\n *\n * The code is taken from\n * https://github.com/TheBrainFamily/wait-for-expect/blob/master/src/index.ts,\n * with slight modifications to support Karma (instead of Jest).\n *\n *\n * Example\n * The <App /> component does not render the header synchronously.\n * Therefore, we cannot check that the wrapper's text is equal to the string\n * immediately--this assertion will fail and cause the test to fail. To\n * remediate this issue, we can run the expectation until it succeeds:\n *\n * function App() {\n * const [value, setValue] = useState(null);\n * useEffect(() => {\n * const timeoutId = setTimeout(() => setValue(\"some value\"), 100);\n * return () => clearTimeout(timeoutId);\n * }, []);\n * return value === null ? null : <h1>The value is: {value}</h1>;\n * }\n *\n * it('renders value', async () => {\n * const wrapper = mount(<App />);\n * await waitFor(() =>\n * wrapper.update();\n * expect(wrapper.text()).to.equal(\"The value is: some value\")\n * );\n * });\n */\nfunction _waitFor<T>(\n f: () => T | Promise<T>,\n { interval = 50, stackTraceError, timeout = 1500 }: WaitForOptions = {},\n): Promise<T> {\n const maxTries = Math.ceil(timeout / interval);\n let tries = 0;\n return new Promise((resolve, reject) => {\n const rejectOrRerun = (error: Error) => {\n if (tries > maxTries) {\n if (stackTraceError !== undefined) {\n copyStackTrace(error, stackTraceError);\n }\n reject(error);\n return;\n }\n originalSetTimeout(runExpectation, interval);\n };\n\n function runExpectation() {\n tries += 1;\n try {\n Promise.resolve(f()).then(resolve).catch(rejectOrRerun);\n } catch (error) {\n // @ts-expect-error ts-migrate(2571) Object is of type 'unknown'\n rejectOrRerun(error);\n }\n }\n\n originalSetTimeout(runExpectation, 0);\n });\n}\n\n/**\n * Wraps `_waitFor` in React's `act` testing utility. Used when the React component\n * updates during the execution of the callback (either because of indirect effects\n * being run or because of direct requests to update the component, like wrapper.update).\n * Prevents updates related to the callback from being affected by other updates\n * and more closely mimics how React runs in the browser. See\n * https://reactjs.org/docs/test-utils.html#act for more info on `act`.\n */\nexport async function waitFor<T>(callback: () => T | Promise<T>, options?: WaitForOptions): Promise<T> {\n let result: T | Promise<T>;\n // See https://github.com/testing-library/dom-testing-library/blob/f7b5c33c44\n // 632fba1579cb44f9f175be1ec46087/src/wait-for.js#L182-L184\n const stackTraceError = new Error('STACK_TRACE_ERROR');\n\n await act(async () => {\n result = await _waitFor(callback, { stackTraceError, ...options });\n });\n\n // @ts-expect-error: either `waitFor` will throw or `result` will be assigned\n return result;\n}\n\n/**\n * Finds all elements (that are rendered in the DOM) in `wrapper` that have an explicit\n * role of `role` specified. This is similar to `getAllByRole` from @testing-library/react\n * but is much simpler because of the shortcomings of Enzyme's API.\n */\nexport function findAllByRole<P, S, C>(wrapper: ReactWrapper<P, S, C>, role: string): ReactWrapper[] {\n return wrapper\n .find(`[role=\"${role}\"]`)\n .hostNodes()\n .map((n) => n);\n}\n\n/**\n * Finds a single element that has the specified role in the wrapper. If\n * there are 0 or more than 1 element that have that role, an error\n * is thrown. Returns the element in an enzyme wrapper.\n */\nexport function findByRole<P, S, C>(wrapper: ReactWrapper<P, S, C>, role: string): ReactWrapper {\n const newWrappers = findAllByRole<P, S, C>(wrapper, role);\n if (newWrappers.length !== 1) {\n throw new Error(\n `Expected to find 1 node but found ${newWrappers.length} nodes for role \"${role}\".\\n${wrapper.debug()}`,\n );\n }\n return newWrappers[0];\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nimport { findByRole, findByText, waitFor } from './utils';\nimport { selectClasses } from '../common';\n\n/**\n * Clicks on the \"Clear\" button. In order for this function to work properly,\n * the `allowClear` prop must be set to `true`.\n */\nexport function clearAll<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): void {\n getSelect().find(`.${selectClasses.clear}`).hostNodes().simulate('mousedown');\n}\n\n/**\n * Closes the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already closed or if the menu is unable to be closed.\n */\nexport async function closeMenu<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): Promise<void> {\n if (!getSelect().find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select is already closed\\n${getSelect().debug()}`);\n }\n getSelect().find(`.${selectClasses.selector}`).simulate('mousedown');\n await waitFor(() => {\n const select = getSelect();\n if (select.find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select did not close\\n${select.debug()}`);\n }\n });\n}\n\n/**\n * Returns a string concatenating the labels for all selected options.\n */\nexport function getLabelText<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): string {\n // Trim the text to avoid weird whitespace issues non-label elements being added.\n // For example, the input mirror is an empty span with some whitespace that is\n // nested under the selector but does not show up in the label text.\n return getSelect().find(`.${selectClasses.selector}`).text().trim();\n}\n\n/**\n * Removes the `option` by clicking its \"X\" button. Can only be used with a <Select/>\n * component with `mode=\"multiple\"`. The provided strings must match the option label\n * exactly.\n */\nexport function removeMultiSelectOption<P, S, C>(getSelect: () => ReactWrapper<P, S, C>, option: string): void {\n const optionItem = findByText(getSelect().find(`.${selectClasses.selector}`), option).closest(\n `.${selectClasses.item}`,\n );\n const removeItem = optionItem.find(`.${selectClasses.removeItem}`).hostNodes();\n removeItem.simulate('click');\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component with `mode=\"multiple\"`.\n * The provided strings must match the option labels exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function multiSelect<P, S, C>(\n getSelect: () => ReactWrapper<P, S, C>,\n options: (string | RegExp)[],\n): Promise<void> {\n await openMenu(getSelect);\n options.forEach((option) => {\n findByText(getSelect().find(`.${selectClasses.list}`), option).simulate('click');\n });\n // Close the menu to indicate that selection has finished\n await closeMenu(getSelect);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component without a\n * mode. The provided string must match an option label exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function singleSelect<P, S, C>(\n getSelect: () => ReactWrapper<P, S, C>,\n option: string | RegExp,\n): Promise<void> {\n await openMenu(getSelect);\n findByText(getSelect().find(`.${selectClasses.list}`), option).simulate('click');\n // Menu automatically closes for a single <Select/> (no mode=\"multiple\")\n}\n\n/**\n * Opens the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already opened or if the menu is unable to be opened.\n */\nexport async function openMenu<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): Promise<void> {\n if (getSelect().find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select is already open\\n${getSelect().debug()}`);\n }\n getSelect().find(`.${selectClasses.selector}`).simulate('mousedown');\n await waitFor(() => {\n const select = getSelect();\n if (!select.find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select did not open\\n${select.debug()}`);\n }\n });\n}\n\n/**\n * Opens the dropdown menu, finds all of the options in the dropdown, closes\n * the menu, and returns a list of the text of each option in order.\n */\nexport async function getAllOptions<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): Promise<string[]> {\n await openMenu(getSelect);\n const options = getSelect()\n .find(`.${selectClasses.list}`)\n .find(`.${selectClasses.option}`)\n .map((option) => option.text());\n await closeMenu(getSelect);\n return options;\n}\n\n/**\n * Creates a new option for a Select with `mode=\"tags\"` by typing it into the input,\n * clicking on the option in the options list, and then closing the menu.\n */\nexport async function createNewOption<P, S, C>(getSelect: () => ReactWrapper<P, S, C>, option: string): Promise<void> {\n const selectInput = findByRole(getSelect(), 'combobox');\n selectInput.simulate('change', { target: { value: option } });\n const optionList = getSelect().find(`.${selectClasses.list}`);\n const optionItem = findByText(optionList, option);\n optionItem.simulate('click');\n await closeMenu(getSelect);\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nimport { findAllByRole, findByText } from './utils';\nimport type { GetTableRowByCellTextOptions, RowIdentifier, TableRows } from '../common';\nimport { createMarkdownTable } from '../common';\n\nfunction getColumnHeaderIndex<P, S, C>(tableWrapper: ReactWrapper<P, S, C>, columnHeaderName: string | RegExp): number {\n const columnHeaders = findAllByRole(tableWrapper, 'columnheader');\n const columnHeaderIndex = columnHeaders.findIndex((n) => {\n try {\n findByText(n, columnHeaderName);\n return true;\n } catch {\n return false;\n }\n });\n\n if (columnHeaderIndex === -1) {\n throw new Error(`Unable to find a column with name \"${columnHeaderName}\"\\n${tableWrapper.debug()}`);\n }\n\n return columnHeaderIndex;\n}\n\n/**\n * Returns the table row that contains the specified `cellText`. The `cellText`\n * must be in the column with name `columnHeaderName` if it is specified. Otherwise,\n * the `cellText` must be in the first column. Throws an error if either multiple\n * rows or no rows can be found that match the given options. Also throws an error\n * if the column with name `columnHeaderName` cannot be found.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n * @param cellText The cell text that uniquely identifies the row.\n * @param columnHeaderName The name of the column to search the text for. If not provided,\n * the first column will be used.\n */\nexport function getTableRowByCellText<P, S, C>(\n tableWrapper: ReactWrapper<P, S, C>,\n cellText: string,\n { columnHeaderName }: GetTableRowByCellTextOptions = {},\n): ReactWrapper {\n const columnHeaderIndex = columnHeaderName === undefined ? 0 : getColumnHeaderIndex(tableWrapper, columnHeaderName);\n\n const matchingRows = findAllByRole(tableWrapper, 'row')\n // Skip first row (table header)\n .slice(1)\n .filter((row) => {\n const cells = findAllByRole(row, 'cell');\n const cell = cells[columnHeaderIndex];\n try {\n findByText(cell, cellText);\n return true;\n } catch {\n return false;\n }\n });\n\n if (matchingRows.length === 0) {\n throw new Error(\n `Unable to find a table row with text \"${cellText}\" in the column \"${columnHeaderName}\"\\n${tableWrapper.debug()}`,\n );\n }\n\n if (matchingRows.length > 1) {\n throw new Error(\n `Found multiple table rows with text \"${cellText}\" in the column \"${columnHeaderName}\"\\n${tableWrapper.debug()}`,\n );\n }\n\n return matchingRows[0].hostNodes();\n}\n\n/**\n * Converts a Du Bois table to a markdown table string. This means that each cell\n * is separated by a pipe (including the edges), the header row is on its own line\n * at the top, each data row is on its own line below, and the header row is separated\n * by a row of dashes from the data rows. This is useful for checking table contents\n * in tests.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Fruit</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alice</TableCell>\n * <TableCell>Apple</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brady</TableCell>\n * <TableCell>Banana</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * The Markdown table:\n * ```md\n * | Name | Fruit |\n * | --- | --- |\n * | Alice | Apple |\n * | Brady | Banana |\n * ```\n */\nexport function toMarkdownTable<P, S, C>(tableWrapper: ReactWrapper<P, S, C>): string {\n const { bodyRows, headerRow } = getTableRows(tableWrapper);\n const columns = findAllByRole(headerRow, 'columnheader').map((column) => column.text());\n const rows = bodyRows.map((row) => findAllByRole(row, 'cell').map((cell) => cell.text()));\n return createMarkdownTable(columns, rows);\n}\n\n/**\n * Returns the header row and all body rows (non-header rows) in order. Assumes that the\n * `tableWrapper` has a single header row (as the first row) and the rest of the rows are\n * body rows.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n */\nexport function getTableRows<P, S, C>(tableWrapper: ReactWrapper<P, S, C>): TableRows<ReactWrapper> {\n const [firstRow, ...restRows] = findAllByRole(tableWrapper, 'row');\n return {\n bodyRows: restRows,\n headerRow: firstRow,\n };\n}\n\n/**\n * Returns the table cell in the specified table row corresponding to the given\n * `columnHeaderName`. This is useful for checking that a row has a particular value\n * for a given column, especially when there are duplicate values in the column.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Age</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alex</TableCell>\n * <TableCell>25</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brenda</TableCell>\n * <TableCell>39</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Carlos</TableCell>\n * <TableCell>39</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * ```js\n * const result = getTableCellInRow(wrapper, { cellText: 'Carlos' }, 'Age');\n * expect(result.textContent).toEqual('39');\n * ```\n */\nexport function getTableCellInRow(\n tableWrapper: ReactWrapper,\n row: RowIdentifier,\n columnHeaderName: string | RegExp,\n): ReactWrapper {\n const tableRowWrapper = getTableRowByCellText(tableWrapper, row.cellText, { columnHeaderName: row.columnHeaderName });\n const columnHeaderIndex = getColumnHeaderIndex(tableWrapper, columnHeaderName);\n const cells = findAllByRole(tableRowWrapper, 'cell');\n const cell = cells[columnHeaderIndex];\n return cell;\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nexport * as selectEvent from './selectEvent';\n\nexport * from './table';\n\n/**\n * Open a dropdown menu by simulating a pointerDown event on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = <P, S, C>(dropdownButton: ReactWrapper<P, S, C>) => {\n dropdownButton.hostNodes().simulate('pointerDown', { button: 0, ctrlKey: false });\n};\n"],"names":["findByText","wrapper","text","queryOptions","newWrappers","findAllByText","length","Error","debug","trim","arguments","undefined","textNodes","findWhere","n","type","getDOMNode","children","nodeText","test","hostNodes","map","hostNode","parents","first","originalSetTimeout","window","setTimeout","copyStackTrace","target","source","stack","replace","message","_waitFor","f","interval","stackTraceError","timeout","maxTries","Math","ceil","tries","Promise","resolve","reject","rejectOrRerun","error","runExpectation","then","catch","waitFor","callback","options","result","act","findAllByRole","role","find","findByRole","clearAll","getSelect","selectClasses","clear","simulate","closeMenu","open","exists","selector","select","getLabelText","removeMultiSelectOption","option","optionItem","closest","item","removeItem","multiSelect","openMenu","forEach","list","singleSelect","getAllOptions","createNewOption","selectInput","value","optionList","getColumnHeaderIndex","tableWrapper","columnHeaderName","columnHeaders","columnHeaderIndex","findIndex","getTableRowByCellText","cellText","matchingRows","slice","filter","row","cells","cell","toMarkdownTable","bodyRows","headerRow","getTableRows","columns","column","rows","createMarkdownTable","firstRow","restRows","getTableCellInRow","tableRowWrapper","openDropdownMenu","dropdownButton","button","ctrlKey"],"mappings":";;;AAAA;;AASA;AACA;AACA;AACA;AACA;AACO,SAASA,UAAUA,CACxBC,OAA8B,EAC9BC,IAAqB,EACrBC,YAA2B,EAC3B;EACA,MAAMC,WAAW,GAAGC,aAAa,CAAUJ,OAAO,EAAEC,IAAI,EAAEC,YAAY,CAAC,CAAA;AACvE,EAAA,IAAIC,WAAW,CAACE,MAAM,KAAK,CAAC,EAAE;AAC5B,IAAA,MAAM,IAAIC,KAAK,CACZ,CAAoCH,kCAAAA,EAAAA,WAAW,CAACE,MAAO,CAAA,iBAAA,EAAmBJ,IAAK,CAAA,IAAA,EAAMD,OAAO,CAAC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MAAM,CAAC,CAAA;AACpD,EAAA,MAAMZ,IAAI,GAAGD,KAAK,CAACR,iBAAiB,CAAC,CAAA;AACrC,EAAA,OAAOS,IAAI,CAAA;AACb;;AC9KA;;AAOA;AACA;AACA;AACA;AACA;AACaa,MAAAA,gBAAgB,GAAaC,cAAqC,IAAK;EAClFA,cAAc,CAAC9F,SAAS,EAAE,CAAC4C,QAAQ,CAAC,aAAa,EAAE;AAAEmD,IAAAA,MAAM,EAAE,CAAC;AAAEC,IAAAA,OAAO,EAAE,KAAA;AAAM,GAAC,CAAC,CAAA;AACnF;;;;"}
|
|
1
|
+
{"version":3,"file":"enzyme.js","sources":["../../src/test-utils/enzyme/utils.ts","../../src/test-utils/enzyme/selectEvent.ts","../../src/test-utils/enzyme/table.ts","../../src/test-utils/enzyme/index.ts"],"sourcesContent":["// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\nimport { act } from 'react-dom/test-utils';\n\ninterface QueryOptions {\n /** Whether to trim the whitespace from DOM text using `String.prototype.trim` */\n trim?: boolean;\n}\n\n/**\n * Finds a single element that contains the specified text in the wrapper. If\n * there are 0 or more than 1 element that contains the specified text, an error\n * is thrown. Returns the element in an enzyme wrapper.\n */\nexport function findByText<P, S, C>(\n wrapper: ReactWrapper<P, S, C>,\n text: string | RegExp,\n queryOptions?: QueryOptions,\n) {\n const newWrappers = findAllByText<P, S, C>(wrapper, text, queryOptions);\n if (newWrappers.length !== 1) {\n throw new Error(\n `Expected to find 1 node but found ${newWrappers.length} nodes for text \"${text}\".\\n${wrapper.debug()}`,\n );\n }\n return newWrappers[0];\n}\n\n/**\n * Finds all elements that contain the specified text. To avoid duplicate results,\n * only the parents of text nodes are returned.\n */\nexport function findAllByText<P, S, C>(\n wrapper: ReactWrapper<P, S, C>,\n text: string | RegExp,\n { trim = false }: QueryOptions = {},\n) {\n const textNodes = wrapper.findWhere((n) => {\n if (typeof n.type() !== 'string' || n.getDOMNode().children.length !== 0) {\n return false;\n }\n\n let nodeText = n.text();\n if (trim) {\n nodeText = nodeText.trim();\n }\n\n return typeof text === 'string' ? nodeText === text : text.test(nodeText);\n });\n const hostNodes = textNodes.map((n) => {\n // Traverse from the text node to the closest DOM node (aka host node)\n let hostNode = n.parents().first();\n while (typeof hostNode.type() !== 'string' && hostNode.parents().length > 0) {\n hostNode = hostNode.parents().first();\n }\n return hostNode;\n });\n return hostNodes;\n}\n\n// We need to keep ref to original setTimeout to avoid SinonJS fake timers if enabled\nconst originalSetTimeout = window.setTimeout;\n\n/**\n * This is so the stack trace the developer sees is one that's\n * closer to their code (because async stack traces are hard to follow).\n *\n * The code is taken from\n * https://github.com/testing-library/dom-testing-library/blob/f7b5c33c44632fba\n * 1579cb44f9f175be1ec46087/src/wait-for.js#L15-L19\n */\nfunction copyStackTrace(target: Error, source: Error) {\n target.stack = source.stack!.replace(source.message, target.message);\n}\n\ninterface WaitForOptions {\n interval?: number;\n stackTraceError?: Error;\n timeout?: number;\n}\n\n/**\n * Run an expectation until it succeeds or reaches the timeout. The timeout of 1500ms\n * is chosen to be under the default Karma test timeout of 2000ms. This function will\n * not work properly if fake timers are being used (since it expects the real setTimeout).\n *\n * The code is taken from\n * https://github.com/TheBrainFamily/wait-for-expect/blob/master/src/index.ts,\n * with slight modifications to support Karma (instead of Jest).\n *\n *\n * Example\n * The <App /> component does not render the header synchronously.\n * Therefore, we cannot check that the wrapper's text is equal to the string\n * immediately--this assertion will fail and cause the test to fail. To\n * remediate this issue, we can run the expectation until it succeeds:\n *\n * function App() {\n * const [value, setValue] = useState(null);\n * useEffect(() => {\n * const timeoutId = setTimeout(() => setValue(\"some value\"), 100);\n * return () => clearTimeout(timeoutId);\n * }, []);\n * return value === null ? null : <h1>The value is: {value}</h1>;\n * }\n *\n * it('renders value', async () => {\n * const wrapper = mount(<App />);\n * await waitFor(() =>\n * wrapper.update();\n * expect(wrapper.text()).to.equal(\"The value is: some value\")\n * );\n * });\n */\nfunction _waitFor<T>(\n f: () => T | Promise<T>,\n { interval = 50, stackTraceError, timeout = 1500 }: WaitForOptions = {},\n): Promise<T> {\n const maxTries = Math.ceil(timeout / interval);\n let tries = 0;\n return new Promise((resolve, reject) => {\n const rejectOrRerun = (error: Error) => {\n if (tries > maxTries) {\n if (stackTraceError !== undefined) {\n copyStackTrace(error, stackTraceError);\n }\n reject(error);\n return;\n }\n originalSetTimeout(runExpectation, interval);\n };\n\n function runExpectation() {\n tries += 1;\n try {\n Promise.resolve(f()).then(resolve).catch(rejectOrRerun);\n } catch (error) {\n // @ts-expect-error ts-migrate(2571) Object is of type 'unknown'\n rejectOrRerun(error);\n }\n }\n\n originalSetTimeout(runExpectation, 0);\n });\n}\n\n/**\n * Wraps `_waitFor` in React's `act` testing utility. Used when the React component\n * updates during the execution of the callback (either because of indirect effects\n * being run or because of direct requests to update the component, like wrapper.update).\n * Prevents updates related to the callback from being affected by other updates\n * and more closely mimics how React runs in the browser. See\n * https://reactjs.org/docs/test-utils.html#act for more info on `act`.\n */\nexport async function waitFor<T>(callback: () => T | Promise<T>, options?: WaitForOptions): Promise<T> {\n let result: T | Promise<T>;\n // See https://github.com/testing-library/dom-testing-library/blob/f7b5c33c44\n // 632fba1579cb44f9f175be1ec46087/src/wait-for.js#L182-L184\n const stackTraceError = new Error('STACK_TRACE_ERROR');\n\n await act(async () => {\n result = await _waitFor(callback, { stackTraceError, ...options });\n });\n\n // @ts-expect-error: either `waitFor` will throw or `result` will be assigned\n return result;\n}\n\n/**\n * Finds all elements (that are rendered in the DOM) in `wrapper` that have an explicit\n * role of `role` specified. This is similar to `getAllByRole` from @testing-library/react\n * but is much simpler because of the shortcomings of Enzyme's API.\n */\nexport function findAllByRole<P, S, C>(wrapper: ReactWrapper<P, S, C>, role: string): ReactWrapper[] {\n return wrapper\n .find(`[role=\"${role}\"]`)\n .hostNodes()\n .map((n) => n);\n}\n\n/**\n * Finds a single element that has the specified role in the wrapper. If\n * there are 0 or more than 1 element that have that role, an error\n * is thrown. Returns the element in an enzyme wrapper.\n */\nexport function findByRole<P, S, C>(wrapper: ReactWrapper<P, S, C>, role: string): ReactWrapper {\n const newWrappers = findAllByRole<P, S, C>(wrapper, role);\n if (newWrappers.length !== 1) {\n throw new Error(\n `Expected to find 1 node but found ${newWrappers.length} nodes for role \"${role}\".\\n${wrapper.debug()}`,\n );\n }\n return newWrappers[0];\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nimport { findByRole, findByText, waitFor } from './utils';\nimport { selectClasses } from '../common';\n\n/**\n * Clicks on the \"Clear\" button. In order for this function to work properly,\n * the `allowClear` prop must be set to `true`.\n */\nexport function clearAll<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): void {\n getSelect().find(`.${selectClasses.clear}`).hostNodes().simulate('mousedown');\n}\n\n/**\n * Closes the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already closed or if the menu is unable to be closed.\n */\nexport async function closeMenu<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): Promise<void> {\n if (!getSelect().find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select is already closed\\n${getSelect().debug()}`);\n }\n getSelect().find(`.${selectClasses.selector}`).simulate('mousedown');\n await waitFor(() => {\n const select = getSelect();\n if (select.find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select did not close\\n${select.debug()}`);\n }\n });\n}\n\n/**\n * Returns a string concatenating the labels for all selected options.\n */\nexport function getLabelText<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): string {\n // Trim the text to avoid weird whitespace issues non-label elements being added.\n // For example, the input mirror is an empty span with some whitespace that is\n // nested under the selector but does not show up in the label text.\n return getSelect().find(`.${selectClasses.selector}`).text().trim();\n}\n\n/**\n * Removes the `option` by clicking its \"X\" button. Can only be used with a <Select/>\n * component with `mode=\"multiple\"`. The provided strings must match the option label\n * exactly.\n */\nexport function removeMultiSelectOption<P, S, C>(getSelect: () => ReactWrapper<P, S, C>, option: string): void {\n const optionItem = findByText(getSelect().find(`.${selectClasses.selector}`), option).closest(\n `.${selectClasses.item}`,\n );\n const removeItem = optionItem.find(`.${selectClasses.removeItem}`).hostNodes();\n removeItem.simulate('click');\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component with `mode=\"multiple\"`.\n * The provided strings must match the option labels exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function multiSelect<P, S, C>(\n getSelect: () => ReactWrapper<P, S, C>,\n options: (string | RegExp)[],\n): Promise<void> {\n await openMenu(getSelect);\n options.forEach((option) => {\n findByText(getSelect().find(`.${selectClasses.list}`), option).simulate('click');\n });\n // Close the menu to indicate that selection has finished\n await closeMenu(getSelect);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component without a\n * mode. The provided string must match an option label exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function singleSelect<P, S, C>(\n getSelect: () => ReactWrapper<P, S, C>,\n option: string | RegExp,\n): Promise<void> {\n await openMenu(getSelect);\n findByText(getSelect().find(`.${selectClasses.list}`), option).simulate('click');\n // Menu automatically closes for a single <Select/> (no mode=\"multiple\")\n}\n\n/**\n * Opens the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already opened or if the menu is unable to be opened.\n */\nexport async function openMenu<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): Promise<void> {\n if (getSelect().find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select is already open\\n${getSelect().debug()}`);\n }\n getSelect().find(`.${selectClasses.selector}`).simulate('mousedown');\n await waitFor(() => {\n const select = getSelect();\n if (!select.find(`.${selectClasses.open}`).exists()) {\n throw new Error(`Select did not open\\n${select.debug()}`);\n }\n });\n}\n\n/**\n * Opens the dropdown menu, finds all of the options in the dropdown, closes\n * the menu, and returns a list of the text of each option in order.\n */\nexport async function getAllOptions<P, S, C>(getSelect: () => ReactWrapper<P, S, C>): Promise<string[]> {\n await openMenu(getSelect);\n const options = getSelect()\n .find(`.${selectClasses.list}`)\n .find(`.${selectClasses.option}`)\n .map((option) => option.text());\n await closeMenu(getSelect);\n return options;\n}\n\n/**\n * Creates a new option for a Select with `mode=\"tags\"` by typing it into the input,\n * clicking on the option in the options list, and then closing the menu.\n */\nexport async function createNewOption<P, S, C>(getSelect: () => ReactWrapper<P, S, C>, option: string): Promise<void> {\n const selectInput = findByRole(getSelect(), 'combobox');\n selectInput.simulate('change', { target: { value: option } });\n const optionList = getSelect().find(`.${selectClasses.list}`);\n const optionItem = findByText(optionList, option);\n optionItem.simulate('click');\n await closeMenu(getSelect);\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nimport { findAllByRole, findByText } from './utils';\nimport type { GetTableRowByCellTextOptions, RowIdentifier, TableRows } from '../common';\nimport { createMarkdownTable } from '../common';\n\nfunction getColumnHeaderIndex<P, S, C>(tableWrapper: ReactWrapper<P, S, C>, columnHeaderName: string | RegExp): number {\n const columnHeaders = findAllByRole(tableWrapper, 'columnheader');\n const columnHeaderIndex = columnHeaders.findIndex((n) => {\n try {\n findByText(n, columnHeaderName);\n return true;\n } catch {\n return false;\n }\n });\n\n if (columnHeaderIndex === -1) {\n throw new Error(`Unable to find a column with name \"${columnHeaderName}\"\\n${tableWrapper.debug()}`);\n }\n\n return columnHeaderIndex;\n}\n\n/**\n * Returns the table row that contains the specified `cellText`. The `cellText`\n * must be in the column with name `columnHeaderName` if it is specified. Otherwise,\n * the `cellText` must be in the first column. Throws an error if either multiple\n * rows or no rows can be found that match the given options. Also throws an error\n * if the column with name `columnHeaderName` cannot be found.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n * @param cellText The cell text that uniquely identifies the row.\n * @param columnHeaderName The name of the column to search the text for. If not provided,\n * the first column will be used.\n */\nexport function getTableRowByCellText<P, S, C>(\n tableWrapper: ReactWrapper<P, S, C>,\n cellText: string,\n { columnHeaderName }: GetTableRowByCellTextOptions = {},\n): ReactWrapper {\n const columnHeaderIndex = columnHeaderName === undefined ? 0 : getColumnHeaderIndex(tableWrapper, columnHeaderName);\n\n const matchingRows = findAllByRole(tableWrapper, 'row')\n // Skip first row (table header)\n .slice(1)\n .filter((row) => {\n const cells = findAllByRole(row, 'cell');\n const cell = cells[columnHeaderIndex];\n try {\n findByText(cell, cellText);\n return true;\n } catch {\n return false;\n }\n });\n\n if (matchingRows.length === 0) {\n throw new Error(\n `Unable to find a table row with text \"${cellText}\" in the column \"${columnHeaderName}\"\\n${tableWrapper.debug()}`,\n );\n }\n\n if (matchingRows.length > 1) {\n throw new Error(\n `Found multiple table rows with text \"${cellText}\" in the column \"${columnHeaderName}\"\\n${tableWrapper.debug()}`,\n );\n }\n\n return matchingRows[0].hostNodes();\n}\n\n/**\n * Converts a Du Bois table to a markdown table string. This means that each cell\n * is separated by a pipe (including the edges), the header row is on its own line\n * at the top, each data row is on its own line below, and the header row is separated\n * by a row of dashes from the data rows. This is useful for checking table contents\n * in tests.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Fruit</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alice</TableCell>\n * <TableCell>Apple</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brady</TableCell>\n * <TableCell>Banana</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * The Markdown table:\n * ```md\n * | Name | Fruit |\n * | --- | --- |\n * | Alice | Apple |\n * | Brady | Banana |\n * ```\n */\nexport function toMarkdownTable<P, S, C>(tableWrapper: ReactWrapper<P, S, C>): string {\n const { bodyRows, headerRow } = getTableRows(tableWrapper);\n const columns = findAllByRole(headerRow, 'columnheader').map((column) => column.text());\n const rows = bodyRows.map((row) => findAllByRole(row, 'cell').map((cell) => cell.text()));\n return createMarkdownTable(columns, rows);\n}\n\n/**\n * Returns the header row and all body rows (non-header rows) in order. Assumes that the\n * `tableWrapper` has a single header row (as the first row) and the rest of the rows are\n * body rows.\n *\n * @param tableWrapper The ReactWrapper containing the table to query in.\n */\nexport function getTableRows<P, S, C>(tableWrapper: ReactWrapper<P, S, C>): TableRows<ReactWrapper> {\n const [firstRow, ...restRows] = findAllByRole(tableWrapper, 'row');\n return {\n bodyRows: restRows,\n headerRow: firstRow,\n };\n}\n\n/**\n * Returns the table cell in the specified table row corresponding to the given\n * `columnHeaderName`. This is useful for checking that a row has a particular value\n * for a given column, especially when there are duplicate values in the column.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Age</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alex</TableCell>\n * <TableCell>25</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brenda</TableCell>\n * <TableCell>39</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Carlos</TableCell>\n * <TableCell>39</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * ```js\n * const result = getTableCellInRow(wrapper, { cellText: 'Carlos' }, 'Age');\n * expect(result.textContent).toEqual('39');\n * ```\n */\nexport function getTableCellInRow(\n tableWrapper: ReactWrapper,\n row: RowIdentifier,\n columnHeaderName: string | RegExp,\n): ReactWrapper {\n const tableRowWrapper = getTableRowByCellText(tableWrapper, row.cellText, { columnHeaderName: row.columnHeaderName });\n const columnHeaderIndex = getColumnHeaderIndex(tableWrapper, columnHeaderName);\n const cells = findAllByRole(tableRowWrapper, 'cell');\n const cell = cells[columnHeaderIndex];\n return cell;\n}\n","// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\nexport * as selectEvent from './selectEvent';\n\nexport * from './table';\n\n/**\n * Open a dropdown menu by simulating a pointerDown event on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = <P, S, C>(dropdownButton: ReactWrapper<P, S, C>) => {\n dropdownButton.hostNodes().simulate('pointerDown', { button: 0, ctrlKey: false });\n};\n"],"names":["findByText","wrapper","text","queryOptions","newWrappers","findAllByText","length","Error","debug","trim","arguments","undefined","textNodes","findWhere","n","type","getDOMNode","children","nodeText","test","hostNodes","map","hostNode","parents","first","originalSetTimeout","window","setTimeout","copyStackTrace","target","source","stack","replace","message","_waitFor","f","interval","stackTraceError","timeout","maxTries","Math","ceil","tries","Promise","resolve","reject","rejectOrRerun","error","runExpectation","then","catch","waitFor","callback","options","result","act","findAllByRole","role","find","findByRole","clearAll","getSelect","selectClasses","clear","simulate","closeMenu","open","exists","selector","select","getLabelText","removeMultiSelectOption","option","optionItem","closest","item","removeItem","multiSelect","openMenu","forEach","list","singleSelect","getAllOptions","createNewOption","selectInput","value","optionList","getColumnHeaderIndex","tableWrapper","columnHeaderName","columnHeaders","columnHeaderIndex","findIndex","getTableRowByCellText","cellText","matchingRows","slice","filter","row","cells","cell","toMarkdownTable","bodyRows","headerRow","getTableRows","columns","column","rows","createMarkdownTable","firstRow","restRows","getTableCellInRow","tableRowWrapper","openDropdownMenu","dropdownButton","button","ctrlKey"],"mappings":";;;AAAA;;AASA;AACA;AACA;AACA;AACA;AACO,SAASA,UAAUA,CACxBC,OAA8B,EAC9BC,IAAqB,EACrBC,YAA2B,EAC3B;EACA,MAAMC,WAAW,GAAGC,aAAa,CAAUJ,OAAO,EAAEC,IAAI,EAAEC,YAAY,CAAC,CAAA;AACvE,EAAA,IAAIC,WAAW,CAACE,MAAM,KAAK,CAAC,EAAE;AAC5B,IAAA,MAAM,IAAIC,KAAK,CACb,CAAqCH,kCAAAA,EAAAA,WAAW,CAACE,MAAM,CAAA,iBAAA,EAAoBJ,IAAI,CAAA,IAAA,EAAOD,OAAO,CAACO,KAAK,EAAE,EACvG,CAAC,CAAA;AACH,GAAA;EACA,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R,iBAAiB,CAAC,CAAA;AACrC,EAAA,OAAOS,IAAI,CAAA;AACb;;AC9KA;;AAOA;AACA;AACA;AACA;AACA;AACaa,MAAAA,gBAAgB,GAAaC,cAAqC,IAAK;EAClFA,cAAc,CAAC9F,SAAS,EAAE,CAAC4C,QAAQ,CAAC,aAAa,EAAE;AAAEmD,IAAAA,MAAM,EAAE,CAAC;AAAEC,IAAAA,OAAO,EAAE,KAAA;AAAM,GAAC,CAAC,CAAA;AACnF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-utils/rtl/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-utils/rtl/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,cAAc,SAAS,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mBAA0B,WAAW,kBAEjE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the display label from a combobox — equivalent to the selected
|
|
3
|
+
* option's label.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getDisplayLabel(combobox: HTMLElement): string;
|
|
6
|
+
/**
|
|
7
|
+
* Finds the associated listbox for a combobox.
|
|
8
|
+
*
|
|
9
|
+
* @usage
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const combobox = screen.getByRole('combobox', { name: '…' });
|
|
13
|
+
* await userEvent.click(combobox);
|
|
14
|
+
* const listbox = select.getListbox(combobox);
|
|
15
|
+
* await userEvent.click(within(listbox).getByRole('option', { name: '…' }));
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function getListbox(combobox: HTMLElement): HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* Returns all options associated with a combobox (requires the select to have
|
|
21
|
+
* been opened).
|
|
22
|
+
*/
|
|
23
|
+
export declare function getOptions(combobox: HTMLElement): HTMLElement[];
|
|
24
|
+
/**
|
|
25
|
+
* Returns the accessible name for each option in a combobox.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getOptionNames(combobox: HTMLElement): string[];
|
|
28
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/test-utils/rtl/select.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAE7D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,WAAW,GAAG,WAAW,CAgB7D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,WAAW,GAAG,WAAW,EAAE,CAG/D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,EAAE,CAG9D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const simpleSelectTestUtils: {
|
|
2
|
+
getSelectedOptionLabelFromTrigger: (name?: string | RegExp) => string | null;
|
|
3
|
+
getSelectedOptionValueFromTrigger: (name?: string | RegExp) => string | null;
|
|
4
|
+
getSelectedOptionFromTrigger: (name?: string | RegExp) => {
|
|
5
|
+
label: string | null;
|
|
6
|
+
value: string | null;
|
|
7
|
+
};
|
|
8
|
+
expectSelectedOptionFromTriggerToBe: (label: string | RegExp, name?: string | RegExp) => void;
|
|
9
|
+
toggleSelect: (name?: string | RegExp) => void;
|
|
10
|
+
expectSelectToBeOpen: () => void;
|
|
11
|
+
expectSelectToBeClosed: () => void;
|
|
12
|
+
getOptionsLength: () => number;
|
|
13
|
+
expectOptionsLengthToBe: (length: number) => void;
|
|
14
|
+
getUnselectedOption: (label: string | RegExp) => HTMLElement;
|
|
15
|
+
getSelectedOption: (label: string | RegExp) => HTMLElement;
|
|
16
|
+
getOption: (label: string | RegExp) => HTMLElement;
|
|
17
|
+
selectOption: (label: string | RegExp) => void;
|
|
18
|
+
expectSelectedOptionToBe: (label: string | RegExp) => void;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=simpleSelect.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simpleSelect.utils.d.ts","sourceRoot":"","sources":["../../../src/test-utils/rtl/simpleSelect.utils.ts"],"names":[],"mappings":"AAiEA,eAAO,MAAM,qBAAqB;+CA7DgB,MAAM,GAAG,MAAM,KAAG,MAAM,GAAG,IAAI;+CAI/B,MAAM,GAAG,MAAM,KAAG,MAAM,GAAG,IAAI;0CAIpC,MAAM,GAAG,MAAM,KAAG;QAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;iDAMzD,MAAM,GAAG,MAAM,SAAS,MAAM,GAAG,MAAM,KAAG,IAAI;0BAIrE,MAAM,GAAG,MAAM,KAAG,IAAI;gCAIlB,IAAI;kCAIF,IAAI;4BAKV,MAAM;sCAIM,MAAM,KAAG,IAAI;iCAIlB,MAAM,GAAG,MAAM,KAAG,WAAW;+BAI/B,MAAM,GAAG,MAAM,KAAG,WAAW;uBAIrC,MAAM,GAAG,MAAM,KAAG,WAAW;0BAI1B,MAAM,GAAG,MAAM,KAAG,IAAI;sCAIV,MAAM,GAAG,MAAM,KAAG,IAAI;CAqB9D,CAAC"}
|
package/dist/test-utils/rtl.js
CHANGED
|
@@ -1,7 +1,70 @@
|
|
|
1
1
|
import userEvent from '@testing-library/user-event-14';
|
|
2
|
-
import { queryHelpers, waitFor,
|
|
2
|
+
import { queryHelpers, within, waitFor, screen, fireEvent } from '@testing-library/react';
|
|
3
|
+
import { computeAccessibleName } from 'dom-accessibility-api';
|
|
3
4
|
import { s as selectClasses, c as createMarkdownTable } from '../common-5b60d682.js';
|
|
4
5
|
|
|
6
|
+
function normalizeText(text) {
|
|
7
|
+
return text.replace(/\s+/g, ' ').trim();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Extracts the display label from a combobox — equivalent to the selected
|
|
12
|
+
* option's label.
|
|
13
|
+
*/
|
|
14
|
+
function getDisplayLabel(combobox) {
|
|
15
|
+
var _combobox$textContent;
|
|
16
|
+
return normalizeText((_combobox$textContent = combobox.textContent) !== null && _combobox$textContent !== void 0 ? _combobox$textContent : '');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Finds the associated listbox for a combobox.
|
|
21
|
+
*
|
|
22
|
+
* @usage
|
|
23
|
+
*
|
|
24
|
+
* ```tsx
|
|
25
|
+
* const combobox = screen.getByRole('combobox', { name: '…' });
|
|
26
|
+
* await userEvent.click(combobox);
|
|
27
|
+
* const listbox = select.getListbox(combobox);
|
|
28
|
+
* await userEvent.click(within(listbox).getByRole('option', { name: '…' }));
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
function getListbox(combobox) {
|
|
32
|
+
const id = combobox.getAttribute('aria-controls');
|
|
33
|
+
if (!id) {
|
|
34
|
+
throw queryHelpers.getElementError("This doesn't appear to be a combobox. Make sure you're querying the right element: `ByRole('combobox', { name: '…' })`", combobox);
|
|
35
|
+
}
|
|
36
|
+
const listbox = combobox.ownerDocument.getElementById(id);
|
|
37
|
+
if (!listbox) {
|
|
38
|
+
throw queryHelpers.getElementError("Can't find the listbox. Are you sure the select has been opened? `await userEvent.click(combobox)`", combobox.ownerDocument.body);
|
|
39
|
+
}
|
|
40
|
+
return listbox;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Returns all options associated with a combobox (requires the select to have
|
|
45
|
+
* been opened).
|
|
46
|
+
*/
|
|
47
|
+
function getOptions(combobox) {
|
|
48
|
+
const listbox = getListbox(combobox);
|
|
49
|
+
return within(listbox).getAllByRole('option');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Returns the accessible name for each option in a combobox.
|
|
54
|
+
*/
|
|
55
|
+
function getOptionNames(combobox) {
|
|
56
|
+
const options = getOptions(combobox);
|
|
57
|
+
return options.map(option => computeAccessibleName(option));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
var select = /*#__PURE__*/Object.freeze({
|
|
61
|
+
__proto__: null,
|
|
62
|
+
getDisplayLabel: getDisplayLabel,
|
|
63
|
+
getListbox: getListbox,
|
|
64
|
+
getOptionNames: getOptionNames,
|
|
65
|
+
getOptions: getOptions
|
|
66
|
+
});
|
|
67
|
+
|
|
5
68
|
/**
|
|
6
69
|
* Allows the helpers in this module to be used when the select element is
|
|
7
70
|
* queried _semantically_ (as if it were a native <select> element) - i.e.
|
|
@@ -221,6 +284,93 @@ var selectEvent = /*#__PURE__*/Object.freeze({
|
|
|
221
284
|
singleSelect: singleSelect
|
|
222
285
|
});
|
|
223
286
|
|
|
287
|
+
/* eslint-disable @databricks/no-restricted-globals-with-module */
|
|
288
|
+
|
|
289
|
+
// Helpers to get the selected option from the trigger
|
|
290
|
+
const getSelectedOptionLabelFromTrigger = name => {
|
|
291
|
+
return screen.getByRole('combobox', {
|
|
292
|
+
name
|
|
293
|
+
}).textContent;
|
|
294
|
+
};
|
|
295
|
+
const getSelectedOptionValueFromTrigger = name => {
|
|
296
|
+
return screen.getByRole('combobox', {
|
|
297
|
+
name
|
|
298
|
+
}).getAttribute('value');
|
|
299
|
+
};
|
|
300
|
+
const getSelectedOptionFromTrigger = name => {
|
|
301
|
+
const label = getSelectedOptionLabelFromTrigger(name);
|
|
302
|
+
const value = getSelectedOptionValueFromTrigger(name);
|
|
303
|
+
return {
|
|
304
|
+
label,
|
|
305
|
+
value
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
const expectSelectedOptionFromTriggerToBe = (label, name) => {
|
|
309
|
+
expect(getSelectedOptionLabelFromTrigger(name)).toBe(label);
|
|
310
|
+
};
|
|
311
|
+
const toggleSelect = name => {
|
|
312
|
+
fireEvent.click(screen.getByRole('combobox', {
|
|
313
|
+
name
|
|
314
|
+
}));
|
|
315
|
+
};
|
|
316
|
+
const expectSelectToBeOpen = () => {
|
|
317
|
+
expect(screen.queryAllByRole('option')).not.toHaveLength(0);
|
|
318
|
+
};
|
|
319
|
+
const expectSelectToBeClosed = () => {
|
|
320
|
+
expect(screen.queryAllByRole('option')).toHaveLength(0);
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
// Generic helpers for when the select is open
|
|
324
|
+
const getOptionsLength = () => {
|
|
325
|
+
return screen.getAllByRole('option').length;
|
|
326
|
+
};
|
|
327
|
+
const expectOptionsLengthToBe = length => {
|
|
328
|
+
expect(getOptionsLength()).toBe(length);
|
|
329
|
+
};
|
|
330
|
+
const getUnselectedOption = label => {
|
|
331
|
+
return screen.getByRole('option', {
|
|
332
|
+
name: label,
|
|
333
|
+
selected: false
|
|
334
|
+
});
|
|
335
|
+
};
|
|
336
|
+
const getSelectedOption = label => {
|
|
337
|
+
return screen.getByRole('option', {
|
|
338
|
+
name: label,
|
|
339
|
+
selected: false
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
const getOption = label => {
|
|
343
|
+
return screen.getByRole('option', {
|
|
344
|
+
name: label
|
|
345
|
+
});
|
|
346
|
+
};
|
|
347
|
+
const selectOption = label => {
|
|
348
|
+
fireEvent.click(screen.getByRole('option', {
|
|
349
|
+
name: label
|
|
350
|
+
}));
|
|
351
|
+
};
|
|
352
|
+
const expectSelectedOptionToBe = label => {
|
|
353
|
+
const options = screen.getAllByRole('option');
|
|
354
|
+
const selectedOption = options.find(option => option.getAttribute('aria-selected') === 'true');
|
|
355
|
+
expect(selectedOption).toHaveTextContent(label);
|
|
356
|
+
};
|
|
357
|
+
const simpleSelectTestUtils = {
|
|
358
|
+
getSelectedOptionLabelFromTrigger,
|
|
359
|
+
getSelectedOptionValueFromTrigger,
|
|
360
|
+
getSelectedOptionFromTrigger,
|
|
361
|
+
expectSelectedOptionFromTriggerToBe,
|
|
362
|
+
toggleSelect,
|
|
363
|
+
expectSelectToBeOpen,
|
|
364
|
+
expectSelectToBeClosed,
|
|
365
|
+
getOptionsLength,
|
|
366
|
+
expectOptionsLengthToBe,
|
|
367
|
+
getUnselectedOption,
|
|
368
|
+
getSelectedOption,
|
|
369
|
+
getOption,
|
|
370
|
+
selectOption,
|
|
371
|
+
expectSelectedOptionToBe
|
|
372
|
+
};
|
|
373
|
+
|
|
224
374
|
function getColumnHeaderIndex(tableElement, columnHeaderName) {
|
|
225
375
|
var _columnHeader$parentE, _columnHeader$parentE2;
|
|
226
376
|
const columnHeader = within(tableElement).getByRole('columnheader', {
|
|
@@ -387,5 +537,5 @@ const openDropdownMenu = async dropdownButton => {
|
|
|
387
537
|
await userEvent.type(dropdownButton, '{arrowdown}');
|
|
388
538
|
};
|
|
389
539
|
|
|
390
|
-
export { getTableCellInRow, getTableRowByCellText, getTableRows, openDropdownMenu, selectEvent, toMarkdownTable };
|
|
540
|
+
export { getTableCellInRow, getTableRowByCellText, getTableRows, openDropdownMenu, select, selectEvent, simpleSelectTestUtils, toMarkdownTable };
|
|
391
541
|
//# sourceMappingURL=rtl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rtl.js","sources":["../../src/test-utils/rtl/selectEvent.ts","../../src/test-utils/rtl/table.ts","../../src/test-utils/rtl/index.ts"],"sourcesContent":["import { queryHelpers, waitFor, within } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event-14';\n\nimport { selectClasses } from '../common';\n\n/**\n * Allows the helpers in this module to be used when the select element is\n * queried _semantically_ (as if it were a native <select> element) - i.e.\n * `ByRole('combobox', { name: '...' })`, rather than by test ID.\n *\n * Also checks if <DesignSystemProvider> was used, because many of the helpers\n * in this module query by class name starting with \"du-bois-\", which requires\n * the provider.\n */\nfunction getRootElement(element: HTMLElement): HTMLElement {\n if (element.getAttribute('role') === 'combobox') {\n element = element.closest(`.${selectClasses.selector}`)!.parentElement!;\n }\n if (element.classList.contains('ant-select')) {\n throw new Error('Component must be wrapped by <DesignSystemProvider>');\n }\n return element;\n}\n\nfunction getOptionsList(select: HTMLElement): HTMLElement {\n const body = select.ownerDocument.body;\n const input = within(select).getByRole('combobox');\n const listId = input.getAttribute('aria-owns') || input.getAttribute('aria-controls');\n if (!listId) {\n throw queryHelpers.getElementError('Options input does not control an options list', body);\n }\n\n const listbox = select.ownerDocument.getElementById(listId);\n if (!listbox?.parentElement) {\n throw queryHelpers.getElementError('Options listbox does not have a parent', body);\n }\n\n const optionsList = listbox.parentElement.querySelector<HTMLElement>(`.${selectClasses.list}`);\n if (!optionsList) {\n throw queryHelpers.getElementError('Options list not found', body);\n }\n\n return optionsList;\n}\n\n/**\n * Opens the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already opened or if the menu is unable to be opened.\n */\nexport async function openMenu(select: HTMLElement): Promise<void> {\n select = getRootElement(select);\n if (select.classList.contains(selectClasses.open)) {\n throw queryHelpers.getElementError('Select is already open', select);\n }\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw queryHelpers.getElementError('Selector not found', select);\n }\n await userEvent.click(selector, { pointerEventsCheck: 0 });\n await waitFor(() => {\n if (!select.classList.contains(selectClasses.open)) {\n throw queryHelpers.getElementError('Select did not open', select);\n }\n });\n}\n\n/**\n * Closes the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already closed or if the menu is unable to be closed.\n */\nexport async function closeMenu(select: HTMLElement): Promise<void> {\n select = getRootElement(select);\n if (!select.classList.contains(selectClasses.open)) {\n throw queryHelpers.getElementError('Select is already closed', select);\n }\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw queryHelpers.getElementError('Selector not found', select);\n }\n await userEvent.click(selector, { pointerEventsCheck: 0 });\n await waitFor(() => {\n if (select.classList.contains(selectClasses.open)) {\n throw queryHelpers.getElementError('Select did not close', select);\n }\n });\n}\n\n/**\n * Returns a string concatenating the labels for all selected options.\n */\nexport function getLabelText(select: HTMLElement): string {\n select = getRootElement(select);\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw queryHelpers.getElementError('Selector not found', select);\n }\n // Trim the text to avoid weird whitespace issues non-label elements being added.\n // For example, the input mirror is an empty span with some whitespace that is\n // nested under the selector but does not show up in the label text.\n return selector.textContent?.trim() ?? '';\n}\n\n/**\n * Removes the `option` by clicking its \"X\" button. Can only be used with a <Select/>\n * component with `mode=\"multiple\"`. The provided strings must match the option label\n * exactly.\n */\nexport async function removeMultiSelectOption(select: HTMLElement, option: string): Promise<void> {\n select = getRootElement(select);\n const selector = select.querySelector<HTMLElement>(`.${selectClasses.selector}`);\n if (!selector) {\n throw queryHelpers.getElementError('Selector not found', select);\n }\n const optionItem = within(selector).getByText(option).closest(`.${selectClasses.item}`);\n if (optionItem === null) {\n throw queryHelpers.getElementError(`Option \"${option}\" not found`, select);\n }\n const removeItem = optionItem.querySelector(`.${selectClasses.removeItem}`);\n if (removeItem === null) {\n throw queryHelpers.getElementError(`Remove button for option \"${option}\" not found`, optionItem as HTMLElement);\n }\n await userEvent.click(removeItem);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component with `mode=\"multiple\"`.\n * The provided strings must match the option labels exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function multiSelect(select: HTMLElement, options: (string | RegExp)[]): Promise<void> {\n select = getRootElement(select);\n await openMenu(select);\n const optionsList = getOptionsList(select);\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n const optionItem = within(optionsList).getByText(option);\n await userEvent.click(optionItem, { pointerEventsCheck: 0 });\n }\n // Close the menu to indicate that selection has finished\n await closeMenu(select);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component without a\n * mode. The provided string must match an option label exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function singleSelect(select: HTMLElement, option: string | RegExp): Promise<void> {\n select = getRootElement(select);\n await openMenu(select);\n const optionsList = getOptionsList(select);\n const optionItem = within(optionsList).getByText(option);\n await userEvent.click(optionItem, { pointerEventsCheck: 0 });\n // Menu automatically closes for a single <Select/> (no mode=\"multiple\")\n}\n\n/**\n * Clicks on the \"Clear\" button. In order for this function to work properly,\n * the `allowClear` prop must be set to `true`.\n */\nexport async function clearAll(select: HTMLElement): Promise<void> {\n select = getRootElement(select);\n const clearBtn = select.querySelector(`.${selectClasses.clear}`);\n if (!clearBtn) {\n throw queryHelpers.getElementError('Select not clearable', select);\n }\n await userEvent.click(clearBtn);\n}\n\n/**\n * Opens the dropdown menu, finds all of the options in the dropdown, closes\n * the menu, and returns a list of the text of each option in order.\n */\nexport async function getAllOptions(select: HTMLElement): Promise<string[]> {\n select = getRootElement(select);\n await openMenu(select);\n const optionsList = getOptionsList(select);\n const options: string[] = [];\n optionsList.querySelectorAll(`.${selectClasses.option}`).forEach((option) => {\n if (option.textContent === null) {\n throw queryHelpers.getElementError('Option had no text content', option as HTMLElement);\n }\n options.push(option.textContent);\n });\n await closeMenu(select);\n return options;\n}\n\n/**\n * Creates a new option for a Select with `mode=\"tags\"` by typing it into the input,\n * clicking on the option in the options list, and then closing the menu.\n */\nexport async function createNewOption(select: HTMLElement, option: string): Promise<void> {\n select = getRootElement(select);\n const selectInput = within(select).getByRole<HTMLInputElement>('combobox');\n await userEvent.type(selectInput, option);\n const optionsList = getOptionsList(select);\n const optionItem = within(optionsList).getByText(option);\n await userEvent.click(optionItem);\n await closeMenu(select);\n}\n","import { queryHelpers, within } from '@testing-library/react';\n\nimport type { GetTableRowByCellTextOptions, RowIdentifier, TableRows } from '../common';\nimport { createMarkdownTable } from '../common';\n\nfunction getColumnHeaderIndex(tableElement: HTMLElement, columnHeaderName: string | RegExp): number {\n const columnHeader = within(tableElement).getByRole('columnheader', { name: columnHeaderName });\n const columnHeaderIndex = Array.from(columnHeader.parentElement?.children ?? []).indexOf(columnHeader);\n return columnHeaderIndex;\n}\n\n/**\n * Returns the table row that contains the specified `cellText`. The `cellText`\n * must be in the column with name `columnHeaderName` if it is specified. Otherwise,\n * the `cellText` must be in the first column. Throws an error if either multiple\n * rows or no rows can be found that match the given options. Also throws an error\n * if the column with name `columnHeaderName` cannot be found.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n * @param cellText The cell text that uniquely identifies the row.\n * @param columnHeaderName The name of the column to search the text for. If not provided,\n * the first column will be used.\n */\nexport function getTableRowByCellText(\n tableElement: HTMLElement,\n cellText: string,\n { columnHeaderName }: GetTableRowByCellTextOptions = {},\n): HTMLElement {\n const columnHeaderIndex = columnHeaderName === undefined ? 0 : getColumnHeaderIndex(tableElement, columnHeaderName);\n\n const matchingRows = within(tableElement)\n .getAllByRole('row')\n // Skip first row (table header)\n .slice(1)\n .filter((row) => {\n const cells = within(row).getAllByRole('cell');\n const cell = cells[columnHeaderIndex];\n const cellContainsText = within(cell).queryByText(cellText) !== null;\n return cellContainsText;\n });\n\n if (matchingRows.length === 0) {\n throw queryHelpers.getElementError(\n `Unable to find a table row with text \"${cellText}\" in the column \"${columnHeaderName}\"`,\n tableElement,\n );\n }\n\n if (matchingRows.length > 1) {\n throw queryHelpers.getElementError(\n `Found multiple table rows with text \"${cellText}\" in the column \"${columnHeaderName}\"`,\n tableElement,\n );\n }\n\n return matchingRows[0];\n}\n\n/**\n * Converts a Du Bois table to a markdown table string. This means that each cell\n * is separated by a pipe (including the edges), the header row is on its own line\n * at the top, each data row is on its own line below, and the header row is separated\n * by a row of dashes from the data rows. This is useful for checking table contents\n * in tests.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Fruit</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alice</TableCell>\n * <TableCell>Apple</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brady</TableCell>\n * <TableCell>Banana</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * The Markdown table:\n * ```md\n * | Name | Fruit |\n * | --- | --- |\n * | Alice | Apple |\n * | Brady | Banana |\n * ```\n */\nexport function toMarkdownTable(tableElement: HTMLElement): string {\n const { bodyRows, headerRow } = getTableRows(tableElement);\n const columns = within(headerRow)\n .getAllByRole('columnheader')\n .map((column) => column.textContent ?? '');\n const rows = bodyRows.map((row) =>\n within(row)\n .getAllByRole('cell')\n .map((cell) => cell.textContent ?? ''),\n );\n return createMarkdownTable(columns, rows);\n}\n\n/**\n * Returns the header row and all body rows (non-header rows) in order. Assumes that the\n * `tableElement` has a single header row (as the first row) and the rest of the rows are\n * body rows.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n */\nexport function getTableRows(tableElement: HTMLElement): TableRows<HTMLElement> {\n const [firstRow, ...restRows] = within(tableElement).getAllByRole('row');\n return {\n bodyRows: restRows,\n headerRow: firstRow,\n };\n}\n\n/**\n * Returns the table cell in the specified table row corresponding to the given\n * `columnHeaderName`. This is useful for checking that a row has a particular value\n * for a given column, especially when there are duplicate values in the column.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Age</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alex</TableCell>\n * <TableCell>25</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brenda</TableCell>\n * <TableCell>39</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Carlos</TableCell>\n * <TableCell>39</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * ```js\n * const table = screen.getByRole('table');\n * const result = getTableCellInRow(table, { cellText: 'Carlos' }, 'Age');\n * expect(result.textContent).toEqual('39');\n * ```\n */\nexport function getTableCellInRow(\n tableElement: HTMLElement,\n row: RowIdentifier,\n columnHeaderName: string | RegExp,\n): HTMLElement {\n const tableRowElement = getTableRowByCellText(tableElement, row.cellText, { columnHeaderName: row.columnHeaderName });\n const columnHeaderIndex = getColumnHeaderIndex(tableElement, columnHeaderName);\n const cells = within(tableRowElement).getAllByRole('cell');\n const cell = cells[columnHeaderIndex];\n return cell;\n}\n","import userEvent from '@testing-library/user-event-14';\n\nexport * as selectEvent from './selectEvent';\n\nexport * from './table';\n\n/**\n * Opens the dropdown menu by clicking on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = async (dropdownButton: HTMLElement) => {\n await userEvent.type(dropdownButton, '{arrowdown}');\n};\n"],"names":["getRootElement","element","getAttribute","closest","selectClasses","selector","parentElement","classList","contains","Error","getOptionsList","select","body","ownerDocument","input","within","getByRole","listId","queryHelpers","getElementError","listbox","getElementById","optionsList","querySelector","list","openMenu","open","userEvent","click","pointerEventsCheck","waitFor","closeMenu","getLabelText","_selector$textContent","_selector$textContent2","textContent","trim","removeMultiSelectOption","option","optionItem","getByText","item","removeItem","multiSelect","options","i","length","singleSelect","clearAll","clearBtn","clear","getAllOptions","querySelectorAll","forEach","push","createNewOption","selectInput","type","getColumnHeaderIndex","tableElement","columnHeaderName","_columnHeader$parentE","_columnHeader$parentE2","columnHeader","name","columnHeaderIndex","Array","from","children","indexOf","getTableRowByCellText","cellText","arguments","undefined","matchingRows","getAllByRole","slice","filter","row","cells","cell","cellContainsText","queryByText","toMarkdownTable","bodyRows","headerRow","getTableRows","columns","map","column","_column$textContent","rows","_cell$textContent","createMarkdownTable","firstRow","restRows","getTableCellInRow","tableRowElement","openDropdownMenu","dropdownButton"],"mappings":";;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,cAAcA,CAACC,OAAoB,EAAe;EACzD,IAAIA,OAAO,CAACC,YAAY,CAAC,MAAM,CAAC,KAAK,UAAU,EAAE;AAC/CD,IAAAA,OAAO,GAAGA,OAAO,CAACE,OAAO,CAAE,CAAA,CAAA,EAAGC,aAAa,CAACC,QAAS,CAAA,CAAC,CAAC,CAAEC,aAAc,CAAA;AACzE,GAAA;EACA,IAAIL,OAAO,CAACM,SAAS,CAACC,QAAQ,CAAC,YAAY,CAAC,EAAE;AAC5C,IAAA,MAAM,IAAIC,KAAK,CAAC,qDAAqD,CAAC,CAAA;AACxE,GAAA;AACA,EAAA,OAAOR,OAAO,CAAA;AAChB,CAAA;AAEA,SAASS,cAAcA,CAACC,MAAmB,EAAe;AACxD,EAAA,MAAMC,IAAI,GAAGD,MAAM,CAACE,aAAa,CAACD,IAAI,CAAA;EACtC,MAAME,KAAK,GAAGC,MAAM,CAACJ,MAAM,CAAC,CAACK,SAAS,CAAC,UAAU,CAAC,CAAA;AAClD,EAAA,MAAMC,MAAM,GAAGH,KAAK,CAACZ,YAAY,CAAC,WAAW,CAAC,IAAIY,KAAK,CAACZ,YAAY,CAAC,eAAe,CAAC,CAAA;EACrF,IAAI,CAACe,MAAM,EAAE;AACX,IAAA,MAAMC,YAAY,CAACC,eAAe,CAAC,gDAAgD,EAAEP,IAAI,CAAC,CAAA;AAC5F,GAAA;EAEA,MAAMQ,OAAO,GAAGT,MAAM,CAACE,aAAa,CAACQ,cAAc,CAACJ,MAAM,CAAC,CAAA;EAC3D,IAAI,EAACG,OAAO,KAAPA,IAAAA,IAAAA,OAAO,eAAPA,OAAO,CAAEd,aAAa,CAAE,EAAA;AAC3B,IAAA,MAAMY,YAAY,CAACC,eAAe,CAAC,wCAAwC,EAAEP,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A;AACA;AACO,SAASL,YAAYA,CAAC3B,YAAyB,EAA0B;AAC9E,EAAA,MAAM,CAACmC,QAAQ,EAAE,GAAGC,QAAQ,CAAC,GAAGhF,MAAM,CAAC4C,YAAY,CAAC,CAACgB,YAAY,CAAC,KAAK,CAAC,CAAA;EACxE,OAAO;AACLS,IAAAA,QAAQ,EAAEW,QAAQ;AAClBV,IAAAA,SAAS,EAAES,QAAAA;GACZ,CAAA;AACH,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,iBAAiBA,CAC/BrC,YAAyB,EACzBmB,GAAkB,EAClBlB,gBAAiC,EACpB;EACb,MAAMqC,eAAe,GAAG3B,qBAAqB,CAACX,YAAY,EAAEmB,GAAG,CAACP,QAAQ,EAAE;IAAEX,gBAAgB,EAAEkB,GAAG,CAAClB,gBAAAA;AAAiB,GAAC,CAAC,CAAA;AACrH,EAAA,MAAMK,iBAAiB,GAAGP,oBAAoB,CAACC,YAAY,EAAEC,gBAAgB,CAAC,CAAA;EAC9E,MAAMmB,KAAK,GAAGhE,MAAM,CAACkF,eAAe,CAAC,CAACtB,YAAY,CAAC,MAAM,CAAC,CAAA;AAC1D,EAAA,MAAMK,IAAI,GAAGD,KAAK,CAACd,iBAAiB,CAAC,CAAA;AACrC,EAAA,OAAOe,IAAI,CAAA;AACb;;ACnKA;AACA;AACA;AACA;AACA;AACakB,MAAAA,gBAAgB,GAAG,MAAOC,cAA2B,IAAK;AACrE,EAAA,MAAMxE,SAAS,CAAC8B,IAAI,CAAC0C,cAAc,EAAE,aAAa,CAAC,CAAA;AACrD;;;;"}
|
|
1
|
+
{"version":3,"file":"rtl.js","sources":["../../src/test-utils/rtl/select.ts","../../src/test-utils/rtl/selectEvent.ts","../../src/test-utils/rtl/simpleSelect.utils.ts","../../src/test-utils/rtl/table.ts","../../src/test-utils/rtl/index.ts"],"sourcesContent":["import { queryHelpers, within } from '@testing-library/react';\nimport { computeAccessibleName } from 'dom-accessibility-api';\n\nfunction normalizeText(text: string): string {\n return text.replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * Extracts the display label from a combobox — equivalent to the selected\n * option's label.\n */\nexport function getDisplayLabel(combobox: HTMLElement): string {\n return normalizeText(combobox.textContent ?? '');\n}\n\n/**\n * Finds the associated listbox for a combobox.\n *\n * @usage\n *\n * ```tsx\n * const combobox = screen.getByRole('combobox', { name: '…' });\n * await userEvent.click(combobox);\n * const listbox = select.getListbox(combobox);\n * await userEvent.click(within(listbox).getByRole('option', { name: '…' }));\n * ```\n */\nexport function getListbox(combobox: HTMLElement): HTMLElement {\n const id = combobox.getAttribute('aria-controls');\n if (!id) {\n throw queryHelpers.getElementError(\n \"This doesn't appear to be a combobox. Make sure you're querying the right element: `ByRole('combobox', { name: '…' })`\",\n combobox,\n );\n }\n const listbox = combobox.ownerDocument.getElementById(id);\n if (!listbox) {\n throw queryHelpers.getElementError(\n \"Can't find the listbox. Are you sure the select has been opened? `await userEvent.click(combobox)`\",\n combobox.ownerDocument.body,\n );\n }\n return listbox;\n}\n\n/**\n * Returns all options associated with a combobox (requires the select to have\n * been opened).\n */\nexport function getOptions(combobox: HTMLElement): HTMLElement[] {\n const listbox = getListbox(combobox);\n return within(listbox).getAllByRole('option');\n}\n\n/**\n * Returns the accessible name for each option in a combobox.\n */\nexport function getOptionNames(combobox: HTMLElement): string[] {\n const options = getOptions(combobox);\n return options.map((option) => computeAccessibleName(option));\n}\n","import { queryHelpers, waitFor, within } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event-14';\n\nimport { selectClasses } from '../common';\n\n/**\n * Allows the helpers in this module to be used when the select element is\n * queried _semantically_ (as if it were a native <select> element) - i.e.\n * `ByRole('combobox', { name: '...' })`, rather than by test ID.\n *\n * Also checks if <DesignSystemProvider> was used, because many of the helpers\n * in this module query by class name starting with \"du-bois-\", which requires\n * the provider.\n */\nfunction getRootElement(element: HTMLElement): HTMLElement {\n if (element.getAttribute('role') === 'combobox') {\n element = element.closest(`.${selectClasses.selector}`)!.parentElement!;\n }\n if (element.classList.contains('ant-select')) {\n throw new Error('Component must be wrapped by <DesignSystemProvider>');\n }\n return element;\n}\n\nfunction getOptionsList(select: HTMLElement): HTMLElement {\n const body = select.ownerDocument.body;\n const input = within(select).getByRole('combobox');\n const listId = input.getAttribute('aria-owns') || input.getAttribute('aria-controls');\n if (!listId) {\n throw queryHelpers.getElementError('Options input does not control an options list', body);\n }\n\n const listbox = select.ownerDocument.getElementById(listId);\n if (!listbox?.parentElement) {\n throw queryHelpers.getElementError('Options listbox does not have a parent', body);\n }\n\n const optionsList = listbox.parentElement.querySelector<HTMLElement>(`.${selectClasses.list}`);\n if (!optionsList) {\n throw queryHelpers.getElementError('Options list not found', body);\n }\n\n return optionsList;\n}\n\n/**\n * Opens the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already opened or if the menu is unable to be opened.\n */\nexport async function openMenu(select: HTMLElement): Promise<void> {\n select = getRootElement(select);\n if (select.classList.contains(selectClasses.open)) {\n throw queryHelpers.getElementError('Select is already open', select);\n }\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw queryHelpers.getElementError('Selector not found', select);\n }\n await userEvent.click(selector, { pointerEventsCheck: 0 });\n await waitFor(() => {\n if (!select.classList.contains(selectClasses.open)) {\n throw queryHelpers.getElementError('Select did not open', select);\n }\n });\n}\n\n/**\n * Closes the dropdown menu for the <Select/> by clicking. Will throw an error if\n * the menu is already closed or if the menu is unable to be closed.\n */\nexport async function closeMenu(select: HTMLElement): Promise<void> {\n select = getRootElement(select);\n if (!select.classList.contains(selectClasses.open)) {\n throw queryHelpers.getElementError('Select is already closed', select);\n }\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw queryHelpers.getElementError('Selector not found', select);\n }\n await userEvent.click(selector, { pointerEventsCheck: 0 });\n await waitFor(() => {\n if (select.classList.contains(selectClasses.open)) {\n throw queryHelpers.getElementError('Select did not close', select);\n }\n });\n}\n\n/**\n * Returns a string concatenating the labels for all selected options.\n */\nexport function getLabelText(select: HTMLElement): string {\n select = getRootElement(select);\n const selector = select.querySelector(`.${selectClasses.selector}`);\n if (!selector) {\n throw queryHelpers.getElementError('Selector not found', select);\n }\n // Trim the text to avoid weird whitespace issues non-label elements being added.\n // For example, the input mirror is an empty span with some whitespace that is\n // nested under the selector but does not show up in the label text.\n return selector.textContent?.trim() ?? '';\n}\n\n/**\n * Removes the `option` by clicking its \"X\" button. Can only be used with a <Select/>\n * component with `mode=\"multiple\"`. The provided strings must match the option label\n * exactly.\n */\nexport async function removeMultiSelectOption(select: HTMLElement, option: string): Promise<void> {\n select = getRootElement(select);\n const selector = select.querySelector<HTMLElement>(`.${selectClasses.selector}`);\n if (!selector) {\n throw queryHelpers.getElementError('Selector not found', select);\n }\n const optionItem = within(selector).getByText(option).closest(`.${selectClasses.item}`);\n if (optionItem === null) {\n throw queryHelpers.getElementError(`Option \"${option}\" not found`, select);\n }\n const removeItem = optionItem.querySelector(`.${selectClasses.removeItem}`);\n if (removeItem === null) {\n throw queryHelpers.getElementError(`Remove button for option \"${option}\" not found`, optionItem as HTMLElement);\n }\n await userEvent.click(removeItem);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component with `mode=\"multiple\"`.\n * The provided strings must match the option labels exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function multiSelect(select: HTMLElement, options: (string | RegExp)[]): Promise<void> {\n select = getRootElement(select);\n await openMenu(select);\n const optionsList = getOptionsList(select);\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n const optionItem = within(optionsList).getByText(option);\n await userEvent.click(optionItem, { pointerEventsCheck: 0 });\n }\n // Close the menu to indicate that selection has finished\n await closeMenu(select);\n}\n\n/**\n * Selects options from the dropdown menu for a <Select/> component without a\n * mode. The provided string must match an option label exactly. There is a known\n * limitation for lists that are extremely long because AntD virtualizes the\n * options so not all may options may be rendered in the DOM. If this is causing\n * you issues, please let #help-frontend know.\n */\nexport async function singleSelect(select: HTMLElement, option: string | RegExp): Promise<void> {\n select = getRootElement(select);\n await openMenu(select);\n const optionsList = getOptionsList(select);\n const optionItem = within(optionsList).getByText(option);\n await userEvent.click(optionItem, { pointerEventsCheck: 0 });\n // Menu automatically closes for a single <Select/> (no mode=\"multiple\")\n}\n\n/**\n * Clicks on the \"Clear\" button. In order for this function to work properly,\n * the `allowClear` prop must be set to `true`.\n */\nexport async function clearAll(select: HTMLElement): Promise<void> {\n select = getRootElement(select);\n const clearBtn = select.querySelector(`.${selectClasses.clear}`);\n if (!clearBtn) {\n throw queryHelpers.getElementError('Select not clearable', select);\n }\n await userEvent.click(clearBtn);\n}\n\n/**\n * Opens the dropdown menu, finds all of the options in the dropdown, closes\n * the menu, and returns a list of the text of each option in order.\n */\nexport async function getAllOptions(select: HTMLElement): Promise<string[]> {\n select = getRootElement(select);\n await openMenu(select);\n const optionsList = getOptionsList(select);\n const options: string[] = [];\n optionsList.querySelectorAll(`.${selectClasses.option}`).forEach((option) => {\n if (option.textContent === null) {\n throw queryHelpers.getElementError('Option had no text content', option as HTMLElement);\n }\n options.push(option.textContent);\n });\n await closeMenu(select);\n return options;\n}\n\n/**\n * Creates a new option for a Select with `mode=\"tags\"` by typing it into the input,\n * clicking on the option in the options list, and then closing the menu.\n */\nexport async function createNewOption(select: HTMLElement, option: string): Promise<void> {\n select = getRootElement(select);\n const selectInput = within(select).getByRole<HTMLInputElement>('combobox');\n await userEvent.type(selectInput, option);\n const optionsList = getOptionsList(select);\n const optionItem = within(optionsList).getByText(option);\n await userEvent.click(optionItem);\n await closeMenu(select);\n}\n","/* eslint-disable @databricks/no-restricted-globals-with-module */\nimport { fireEvent, screen } from '@testing-library/react';\n\n// Helpers to get the selected option from the trigger\nconst getSelectedOptionLabelFromTrigger = (name?: string | RegExp): string | null => {\n return screen.getByRole('combobox', { name }).textContent;\n};\n\nconst getSelectedOptionValueFromTrigger = (name?: string | RegExp): string | null => {\n return screen.getByRole('combobox', { name }).getAttribute('value');\n};\n\nconst getSelectedOptionFromTrigger = (name?: string | RegExp): { label: string | null; value: string | null } => {\n const label = getSelectedOptionLabelFromTrigger(name);\n const value = getSelectedOptionValueFromTrigger(name);\n return { label, value };\n};\n\nconst expectSelectedOptionFromTriggerToBe = (label: string | RegExp, name?: string | RegExp): void => {\n expect(getSelectedOptionLabelFromTrigger(name)).toBe(label);\n};\n\nconst toggleSelect = (name?: string | RegExp): void => {\n fireEvent.click(screen.getByRole('combobox', { name }));\n};\n\nconst expectSelectToBeOpen = (): void => {\n expect(screen.queryAllByRole('option')).not.toHaveLength(0);\n};\n\nconst expectSelectToBeClosed = (): void => {\n expect(screen.queryAllByRole('option')).toHaveLength(0);\n};\n\n// Generic helpers for when the select is open\nconst getOptionsLength = (): number => {\n return screen.getAllByRole('option').length;\n};\n\nconst expectOptionsLengthToBe = (length: number): void => {\n expect(getOptionsLength()).toBe(length);\n};\n\nconst getUnselectedOption = (label: string | RegExp): HTMLElement => {\n return screen.getByRole('option', { name: label, selected: false });\n};\n\nconst getSelectedOption = (label: string | RegExp): HTMLElement => {\n return screen.getByRole('option', { name: label, selected: false });\n};\n\nconst getOption = (label: string | RegExp): HTMLElement => {\n return screen.getByRole('option', { name: label });\n};\n\nconst selectOption = (label: string | RegExp): void => {\n fireEvent.click(screen.getByRole('option', { name: label }));\n};\n\nconst expectSelectedOptionToBe = (label: string | RegExp): void => {\n const options = screen.getAllByRole('option');\n const selectedOption = options.find((option) => option.getAttribute('aria-selected') === 'true');\n expect(selectedOption).toHaveTextContent(label);\n};\n\nexport const simpleSelectTestUtils = {\n getSelectedOptionLabelFromTrigger,\n getSelectedOptionValueFromTrigger,\n getSelectedOptionFromTrigger,\n expectSelectedOptionFromTriggerToBe,\n toggleSelect,\n expectSelectToBeOpen,\n expectSelectToBeClosed,\n getOptionsLength,\n expectOptionsLengthToBe,\n getUnselectedOption,\n getSelectedOption,\n getOption,\n selectOption,\n expectSelectedOptionToBe,\n};\n","import { queryHelpers, within } from '@testing-library/react';\n\nimport type { GetTableRowByCellTextOptions, RowIdentifier, TableRows } from '../common';\nimport { createMarkdownTable } from '../common';\n\nfunction getColumnHeaderIndex(tableElement: HTMLElement, columnHeaderName: string | RegExp): number {\n const columnHeader = within(tableElement).getByRole('columnheader', { name: columnHeaderName });\n const columnHeaderIndex = Array.from(columnHeader.parentElement?.children ?? []).indexOf(columnHeader);\n return columnHeaderIndex;\n}\n\n/**\n * Returns the table row that contains the specified `cellText`. The `cellText`\n * must be in the column with name `columnHeaderName` if it is specified. Otherwise,\n * the `cellText` must be in the first column. Throws an error if either multiple\n * rows or no rows can be found that match the given options. Also throws an error\n * if the column with name `columnHeaderName` cannot be found.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n * @param cellText The cell text that uniquely identifies the row.\n * @param columnHeaderName The name of the column to search the text for. If not provided,\n * the first column will be used.\n */\nexport function getTableRowByCellText(\n tableElement: HTMLElement,\n cellText: string,\n { columnHeaderName }: GetTableRowByCellTextOptions = {},\n): HTMLElement {\n const columnHeaderIndex = columnHeaderName === undefined ? 0 : getColumnHeaderIndex(tableElement, columnHeaderName);\n\n const matchingRows = within(tableElement)\n .getAllByRole('row')\n // Skip first row (table header)\n .slice(1)\n .filter((row) => {\n const cells = within(row).getAllByRole('cell');\n const cell = cells[columnHeaderIndex];\n const cellContainsText = within(cell).queryByText(cellText) !== null;\n return cellContainsText;\n });\n\n if (matchingRows.length === 0) {\n throw queryHelpers.getElementError(\n `Unable to find a table row with text \"${cellText}\" in the column \"${columnHeaderName}\"`,\n tableElement,\n );\n }\n\n if (matchingRows.length > 1) {\n throw queryHelpers.getElementError(\n `Found multiple table rows with text \"${cellText}\" in the column \"${columnHeaderName}\"`,\n tableElement,\n );\n }\n\n return matchingRows[0];\n}\n\n/**\n * Converts a Du Bois table to a markdown table string. This means that each cell\n * is separated by a pipe (including the edges), the header row is on its own line\n * at the top, each data row is on its own line below, and the header row is separated\n * by a row of dashes from the data rows. This is useful for checking table contents\n * in tests.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Fruit</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alice</TableCell>\n * <TableCell>Apple</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brady</TableCell>\n * <TableCell>Banana</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * The Markdown table:\n * ```md\n * | Name | Fruit |\n * | --- | --- |\n * | Alice | Apple |\n * | Brady | Banana |\n * ```\n */\nexport function toMarkdownTable(tableElement: HTMLElement): string {\n const { bodyRows, headerRow } = getTableRows(tableElement);\n const columns = within(headerRow)\n .getAllByRole('columnheader')\n .map((column) => column.textContent ?? '');\n const rows = bodyRows.map((row) =>\n within(row)\n .getAllByRole('cell')\n .map((cell) => cell.textContent ?? ''),\n );\n return createMarkdownTable(columns, rows);\n}\n\n/**\n * Returns the header row and all body rows (non-header rows) in order. Assumes that the\n * `tableElement` has a single header row (as the first row) and the rest of the rows are\n * body rows.\n *\n * @param tableElement The HTMLElement representing the table to query in. This is likely\n * a `<div role=\"table\">` element, so it can be queried by `screen.getByRole('table')`.\n */\nexport function getTableRows(tableElement: HTMLElement): TableRows<HTMLElement> {\n const [firstRow, ...restRows] = within(tableElement).getAllByRole('row');\n return {\n bodyRows: restRows,\n headerRow: firstRow,\n };\n}\n\n/**\n * Returns the table cell in the specified table row corresponding to the given\n * `columnHeaderName`. This is useful for checking that a row has a particular value\n * for a given column, especially when there are duplicate values in the column.\n *\n * @example\n * The HTML table:\n * ```jsx\n * <Table>\n * <TableRow isHeader>\n * <TableHeader>Name</TableHeader>\n * <TableHeader>Age</TableHeader>\n * </TableRow>\n * <TableRow>\n * <TableCell>Alex</TableCell>\n * <TableCell>25</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Brenda</TableCell>\n * <TableCell>39</TableCell>\n * </TableRow>\n * <TableRow>\n * <TableCell>Carlos</TableCell>\n * <TableCell>39</TableCell>\n * </TableRow>\n * </Table>\n * ```\n *\n * ```js\n * const table = screen.getByRole('table');\n * const result = getTableCellInRow(table, { cellText: 'Carlos' }, 'Age');\n * expect(result.textContent).toEqual('39');\n * ```\n */\nexport function getTableCellInRow(\n tableElement: HTMLElement,\n row: RowIdentifier,\n columnHeaderName: string | RegExp,\n): HTMLElement {\n const tableRowElement = getTableRowByCellText(tableElement, row.cellText, { columnHeaderName: row.columnHeaderName });\n const columnHeaderIndex = getColumnHeaderIndex(tableElement, columnHeaderName);\n const cells = within(tableRowElement).getAllByRole('cell');\n const cell = cells[columnHeaderIndex];\n return cell;\n}\n","import userEvent from '@testing-library/user-event-14';\n\nexport * as select from './select';\nexport * as selectEvent from './selectEvent';\nexport { simpleSelectTestUtils } from './simpleSelect.utils';\n\nexport * from './table';\n\n/**\n * Opens the dropdown menu by clicking on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = async (dropdownButton: HTMLElement) => {\n await userEvent.type(dropdownButton, '{arrowdown}');\n};\n"],"names":["normalizeText","text","replace","trim","getDisplayLabel","combobox","_combobox$textContent","textContent","getListbox","id","getAttribute","queryHelpers","getElementError","listbox","ownerDocument","getElementById","body","getOptions","within","getAllByRole","getOptionNames","options","map","option","computeAccessibleName","getRootElement","element","closest","selectClasses","selector","parentElement","classList","contains","Error","getOptionsList","select","input","getByRole","listId","optionsList","querySelector","list","openMenu","open","userEvent","click","pointerEventsCheck","waitFor","closeMenu","getLabelText","_selector$textContent","_selector$textContent2","removeMultiSelectOption","optionItem","getByText","item","removeItem","multiSelect","i","length","singleSelect","clearAll","clearBtn","clear","getAllOptions","querySelectorAll","forEach","push","createNewOption","selectInput","type","getSelectedOptionLabelFromTrigger","name","screen","getSelectedOptionValueFromTrigger","getSelectedOptionFromTrigger","label","value","expectSelectedOptionFromTriggerToBe","expect","toBe","toggleSelect","fireEvent","expectSelectToBeOpen","queryAllByRole","not","toHaveLength","expectSelectToBeClosed","getOptionsLength","expectOptionsLengthToBe","getUnselectedOption","selected","getSelectedOption","getOption","selectOption","expectSelectedOptionToBe","selectedOption","find","toHaveTextContent","simpleSelectTestUtils","getColumnHeaderIndex","tableElement","columnHeaderName","_columnHeader$parentE","_columnHeader$parentE2","columnHeader","columnHeaderIndex","Array","from","children","indexOf","getTableRowByCellText","cellText","arguments","undefined","matchingRows","slice","filter","row","cells","cell","cellContainsText","queryByText","toMarkdownTable","bodyRows","headerRow","getTableRows","columns","column","_column$textContent","rows","_cell$textContent","createMarkdownTable","firstRow","restRows","getTableCellInRow","tableRowElement","openDropdownMenu","dropdownButton"],"mappings":";;;;;AAGA,SAASA,aAAaA,CAACC,IAAY,EAAU;EAC3C,OAAOA,IAAI,CAACC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAACC,IAAI,EAAE,CAAA;AACzC,CAAA;;AAEA;AACA;AACA;AACA;AACO,SAASC,eAAeA,CAACC,QAAqB,EAAU;AAAA,EAAA,IAAAC,qBAAA,CAAA;AAC7D,EAAA,OAAON,aAAa,CAAA,CAAAM,qBAAA,GAACD,QAAQ,CAACE,WAAW,MAAA,IAAA,IAAAD,qBAAA,KAAA,KAAA,CAAA,GAAAA,qBAAA,GAAI,EAAE,CAAC,CAAA;AAClD,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,UAAUA,CAACH,QAAqB,EAAe;AAC7D,EAAA,MAAMI,EAAE,GAAGJ,QAAQ,CAACK,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;AACrD;;;;"}
|
package/dist/theme/borders.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"borders.d.ts","sourceRoot":"","sources":["../../src/theme/borders.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"borders.d.ts","sourceRoot":"","sources":["../../src/theme/borders.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO;;;CAGnB,CAAC;;;;;AAGF,wBAEE"}
|
package/dist/theme/colors.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { primitiveColors } from './_generated/PrimitiveColors';
|
|
2
2
|
import { lightColorList } from './_generated/SemanticColors-Light';
|
|
3
3
|
declare const branded: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
ai: {
|
|
5
|
+
/** For AI components, the top-left-oriented start color of gradient treatments. */
|
|
6
|
+
gradientStart: string;
|
|
7
|
+
/** For AI components, the mid color of gradient treatments. */
|
|
8
|
+
gradientMid: string;
|
|
9
|
+
/** For AI components, the bottom-right-oriented end color of gradient treatments. */
|
|
10
|
+
gradientEnd: string;
|
|
11
|
+
};
|
|
8
12
|
};
|
|
9
13
|
type DesignSystemColors = typeof lightColorList & typeof primitiveColors & {
|
|
10
14
|
/** These colors represent specific brand interactions and experiences,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/theme/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/theme/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,M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