uikit-react-public 0.25.5 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert/Alert.d.ts +3 -3
- package/dist/components/Alert/Alert.stories.d.ts +3 -3
- package/dist/components/Alert/AlertMessage.d.ts +1 -1
- package/dist/components/Alert/AlertTitle.d.ts +1 -1
- package/dist/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/components/AppHeader/AppHeader.stories.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderBottom.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderNav.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderTop.d.ts +1 -1
- package/dist/components/AppMenu/AppMenu.context.d.ts +1 -1
- package/dist/components/AppMenu/AppMenu.d.ts +1 -1
- package/dist/components/AppMenu/AppMenu.stories.d.ts +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.stories.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumb.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.stories.d.ts +1 -1
- package/dist/components/Calendar/Calendar.d.ts +1 -1
- package/dist/components/Calendar/Calendar.stories.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/AcademicWeek.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/AcademicWeeks.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/ColumnHeading.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/Controls.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/Day.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/Day.stories.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/EventDot.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/Grid.d.ts +1 -1
- package/dist/components/CookieNotice/CookieNotice.d.ts +1 -1
- package/dist/components/Datepicker/Datepicker.d.ts +1 -1
- package/dist/components/Datepicker/Datepicker.stories.d.ts +1 -1
- package/dist/components/Datepicker/subcomponents/CustomDatepicker.d.ts +1 -1
- package/dist/components/Datepicker/subcomponents/DatepickerInput.d.ts +1 -1
- package/dist/components/Datepicker/subcomponents/Panel.d.ts +1 -1
- package/dist/components/Datepicker/subcomponents/VisibleField.d.ts +1 -1
- package/dist/components/Dialog/BaseDialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +1 -1
- package/dist/components/Dialog/DialogBody.d.ts +1 -1
- package/dist/components/Dialog/DialogFooter.d.ts +1 -1
- package/dist/components/Dialog/DialogHeader.d.ts +1 -1
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/Divider/Divider.stories.d.ts +1 -1
- package/dist/components/DrawerMenu/DrawerMenu.d.ts +28 -0
- package/dist/components/DrawerMenu/DrawerMenuTrigger.d.ts +4 -0
- package/dist/components/DrawerMenu/__tests__/DrawerMenu.test.d.ts +1 -0
- package/dist/components/DrawerMenu/index.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.context.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.stories.d.ts +1 -1
- package/dist/components/Dropdown/DropdownContent.d.ts +9 -3
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
- package/dist/components/DropdownUserMenu/DropdownUserMenu.d.ts +1 -1
- package/dist/components/FeedbackDialog/FeedbackDialog.d.ts +1 -1
- package/dist/components/FeedbackDialog/FeedbackDialog.stories.d.ts +1 -1
- package/dist/components/Field/CharacterCount.d.ts +1 -1
- package/dist/components/Field/ErrorText.d.ts +1 -1
- package/dist/components/Field/Field.d.ts +1 -1
- package/dist/components/Field/Field.stories.d.ts +1 -1
- package/dist/components/Field/HelperText.d.ts +1 -1
- package/dist/components/FileInput/FileInput.d.ts +1 -1
- package/dist/components/FileInput/FileInput.stories.d.ts +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -1
- package/dist/components/Footer/Footer.stories.d.ts +1 -1
- package/dist/components/Footer/FooterColumn.d.ts +1 -1
- package/dist/components/Footer/FooterNavLink.d.ts +1 -1
- package/dist/components/Footer/SocialLink.d.ts +1 -1
- package/dist/components/FooterNew/BackToTop.d.ts +1 -1
- package/dist/components/FooterNew/Footer.d.ts +1 -1
- package/dist/components/FooterNew/FooterColumn.d.ts +1 -1
- package/dist/components/FooterNew/FooterLinks.d.ts +1 -1
- package/dist/components/FooterNew/FooterNavLink.d.ts +1 -1
- package/dist/components/FooterNew/LegalAndCopyright.d.ts +1 -1
- package/dist/components/FooterNew/LogoAddressAndSocial.d.ts +1 -1
- package/dist/components/FooterNew/SocialLink.d.ts +1 -1
- package/dist/components/Header/Header.d.ts +1 -1
- package/dist/components/Header/Header.stories.d.ts +1 -1
- package/dist/components/HeaderDraft/HeaderBottomBreadcrumbs.d.ts +1 -1
- package/dist/components/HeaderDraft/HeaderBottomHeadingAndAvatar.d.ts +1 -1
- package/dist/components/HeaderDraft/HeaderBreadcrumb.d.ts +1 -1
- package/dist/components/HeaderDraft/HeaderDraft.d.ts +1 -1
- package/dist/components/HeaderNew/Header.d.ts +1 -1
- package/dist/components/HeaderNew/HeaderBorder.d.ts +1 -1
- package/dist/components/HeaderNew/HeaderItem.d.ts +1 -1
- package/dist/components/HeaderNew/HeaderLogo.d.ts +1 -1
- package/dist/components/HeaderNew/HeaderTitle.d.ts +1 -1
- package/dist/components/HeaderNew/constants.d.ts +1 -1
- package/dist/components/Heading/Heading.d.ts +2 -2
- package/dist/components/Heading/Heading.stories.d.ts +1 -1
- package/dist/components/Icon/BaseIcon.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/svgs/ActivitySvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AirplaySvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AlertCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AlertOctagonSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AlertTriangleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AlignCenterSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AlignJustifySvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AlignLeftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AlignRightSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AnchorSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ApertureSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArchiveSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowDownCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowDownLeftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowDownRightSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowDownSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowLeftCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowLeftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowRightCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowRightSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowUpCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowUpLeftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowUpRightSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ArrowUpSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AtSignSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AvatarSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/AwardSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BarChart2Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/BarChartSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BatteryChargingSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BatterySvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BellOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BellSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BluetoothSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BoldSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BookOpenSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BookSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BookmarkSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BoxSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/BriefcaseSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CalendarSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CameraOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CameraSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CastSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CheckCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CheckSquareSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CheckSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ChevronDownSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ChevronLeftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ChevronRightSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ChevronUpSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ChevronsDownSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ChevronsLeftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ChevronsRightSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ChevronsUpSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ChromeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ClipboardSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ClockSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CloudDrizzleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CloudLightningSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CloudOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CloudRainSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CloudSnowSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CloudSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CodeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CodepenSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CodesandboxSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CoffeeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ColumnsSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CommandSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CompassSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CopySvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CornerDownLeftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CornerDownRightSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CornerLeftDownSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CornerLeftUpSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CornerRightDownSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CornerRightUpSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CornerUpLeftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CornerUpRightSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CpuSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CreditCardSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CropSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/CrosshairSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DatabaseSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DeleteSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DiscSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DivideCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DivideSquareSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DivideSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DollarSignSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DownloadCloudSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DownloadSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DribbbleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/DropletSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/Edit2Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/Edit3Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/EditSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ExternalLinkSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/EyeOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/EyeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FastForwardSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FeatherSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FigmaSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FileMinusSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FilePlusSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FileSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FileTextSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FilmSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FilterSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FlagSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FolderMinusSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FolderPlusSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FolderSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FramerSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/FrownSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/GiftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/GitBranchSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/GitCommitSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/GitMergeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/GitPullRequestSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/GithubSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/GitlabSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/GlobeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/GridSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/HardDriveSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/HashSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/HeadphonesSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/HeartSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/HelpCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/HexagonSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/HomeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ImageSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/InboxSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/InfoSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ItalicSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/KeySvg.d.ts +1 -1
- package/dist/components/Icon/svgs/LayersSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/LayoutSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/LifeBuoySvg.d.ts +1 -1
- package/dist/components/Icon/svgs/Link2Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/LinkSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/LinkedinSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ListSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/LoaderSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/LockSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/LogInSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/LogOutSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MailSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MapPinSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MapSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/Maximize2Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/MaximizeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MehSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MenuSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MessageCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MessageSquareSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MicOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MicSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/Minimize2Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/MinimizeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MinusCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MinusSquareSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MinusSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MonitorSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MoonSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MoreHorizontalSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MoreVerticalSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MousePointerSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MoveSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/MusicSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/Navigation2Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/NavigationSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/OctagonSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PackageSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PaperclipSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PauseCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PauseSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PenToolSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PercentSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PhoneCallSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PhoneForwardedSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PhoneIncomingSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PhoneMissedSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PhoneOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PhoneOutgoingSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PhoneSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PieChartSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PlayCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PlaySvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PlusCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PlusSquareSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PlusSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PocketSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PowerSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/PrinterSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/RadioSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/RefreshCcwSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/RefreshCwSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/RepeatSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/RewindSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/RotateCcwSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/RotateCwSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/RssSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SaveSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ScissorsSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SearchSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SendSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ServerSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SettingsSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/Share2Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/ShareSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ShieldOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ShieldSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ShoppingBagSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ShoppingCartSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ShuffleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SidebarSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SkipBackSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SkipForwardSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SlackSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SlashSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SlidersSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SmartphoneSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SmileSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SpeakerSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SquareSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/StarSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/StopCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SunSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SunriseSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/SunsetSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TableSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TabletSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TagSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TargetSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TerminalSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ThermometerSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ThumbsDownSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ThumbsUpSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ToggleLeftSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ToggleRightSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ToolSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/Trash2Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/TrashSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TrelloSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TrendingDownSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TrendingUpSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TriangleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TruckSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TvSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TwitchSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TwitterSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/TypeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UmbrellaSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UnderlineSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UnlockSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UploadCloudSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UploadSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UserCheckSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UserMinusSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UserPlusSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UserSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UserXSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/UsersSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/VideoOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/VideoSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/VoicemailSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/Volume1Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/Volume2Svg.d.ts +1 -1
- package/dist/components/Icon/svgs/VolumeSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/VolumeXSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/WatchSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/WifiOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/WifiSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/WindSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/XCircleSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/XOctagonSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/XSquareSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/XSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ZapOffSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ZapSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ZoomInSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/ZoomOutSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/internal/EmptySvg.d.ts +1 -1
- package/dist/components/Icon/svgs/social/FacebookSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/social/FlickrSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/social/InstagramSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/social/SoundcloudSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/social/TiktokSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/social/XSvg.d.ts +1 -1
- package/dist/components/Icon/svgs/social/YoutubeSvg.d.ts +1 -1
- package/dist/components/Layout/Layout.d.ts +1 -1
- package/dist/components/Layout/Layout.stories.d.ts +1 -1
- package/dist/components/Main/Main.d.ts +1 -1
- package/dist/components/Main/Main.stories.d.ts +1 -1
- package/dist/components/Menu/Menu.context.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts +1 -1
- package/dist/components/Menu/MenuTrigger.d.ts +1 -1
- package/dist/components/MenuNew/ActionMenuButton.d.ts +1 -1
- package/dist/components/MenuNew/MenuAccordion/MenuAccordionChevron.d.ts +1 -1
- package/dist/components/MenuNew/MenuAccordion/MenuAccordionItem.d.ts +1 -1
- package/dist/components/MenuNew/MenuBaseItem.d.ts +2 -2
- package/dist/components/MenuNew/MenuDivider.d.ts +1 -1
- package/dist/components/MenuNew/MenuHead.d.ts +1 -1
- package/dist/components/MenuNew/MenuHeading.d.ts +1 -1
- package/dist/components/MenuNew/MenuItemText.d.ts +1 -1
- package/dist/components/MenuNew/MenuSection.d.ts +1 -1
- package/dist/components/MenuNew/PrimaryMenuItem.d.ts +1 -1
- package/dist/components/MenuNew/SecondaryMenuItem.d.ts +1 -1
- package/dist/components/NativeDatepicker/NativeDatepicker.d.ts +1 -1
- package/dist/components/NativeDatepicker/NativeDatepicker.stories.d.ts +1 -1
- package/dist/components/Overlay/Overlay.stories.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts +18 -4
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/Pagination/PaginationControls.d.ts +1 -1
- package/dist/components/Pagination/PaginationInfo.d.ts +1 -1
- package/dist/components/Pagination/index.d.ts +2 -2
- package/dist/components/Paragraph/Paragraph.d.ts +2 -2
- package/dist/components/Paragraph/Paragraph.stories.d.ts +1 -1
- package/dist/components/Search/Search.d.ts +2 -1
- package/dist/components/Search/Search.stories.d.ts +1 -1
- package/dist/components/Select/subcomponents/CustomOption.d.ts +1 -1
- package/dist/components/Select/subcomponents/CustomSelect.d.ts +1 -1
- package/dist/components/Select/subcomponents/FilterInput.d.ts +1 -1
- package/dist/components/Select/subcomponents/NativeSelect.d.ts +1 -1
- package/dist/components/Select/subcomponents/Panel.d.ts +1 -1
- package/dist/components/Select/subcomponents/VisibleField.d.ts +1 -1
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.stories.d.ts +1 -1
- package/dist/components/Table/Table.d.ts +6 -6
- package/dist/components/Table/Table.stories.d.ts +6 -6
- package/dist/components/Table/subcomponents/Body.d.ts +1 -1
- package/dist/components/Table/subcomponents/Cell/Cell.d.ts +1 -1
- package/dist/components/Table/subcomponents/Cell/Cell.stories.d.ts +2 -2
- package/dist/components/Table/subcomponents/Cell/CellContent.d.ts +1 -1
- package/dist/components/Table/subcomponents/Head.d.ts +1 -1
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.d.ts +1 -1
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.stories.d.ts +2 -2
- package/dist/components/Table/subcomponents/HeadCell/HeadCellContent.d.ts +1 -1
- package/dist/components/Table/subcomponents/Row.d.ts +1 -1
- package/dist/components/Table/subcomponents/SortIcon.d.ts +1 -1
- package/dist/components/Tabs/Tab.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Timepicker/Timepicker.d.ts +1 -1
- package/dist/components/Toggle/ToggleHandle.d.ts +1 -1
- package/dist/components/UclLogo/UclLogo.d.ts +1 -1
- package/dist/components/UclLogo/UclLogoNegativeSpace.d.ts +1 -1
- package/dist/components/UclLogoNew/UclLogo.d.ts +1 -1
- package/dist/components/WeekPicker/WeekPicker.d.ts +1 -1
- package/dist/components/WeekPicker/WeekPicker.stories.d.ts +1 -1
- package/dist/components/WeekPicker/subcomponents/CustomDatepicker.d.ts +1 -1
- package/dist/components/WeekPicker/subcomponents/DatepickerInput.d.ts +1 -1
- package/dist/components/WeekPicker/subcomponents/VisibleField.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +5530 -5254
- package/dist/theme/__tests__/useTheme.test.d.ts +1 -0
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/useTheme.d.ts +15 -0
- package/lib/components/DrawerMenu/DrawerMenu.tsx +129 -0
- package/lib/components/DrawerMenu/DrawerMenuTrigger.tsx +9 -0
- package/lib/components/DrawerMenu/__tests__/DrawerMenu.test.tsx +126 -0
- package/lib/components/DrawerMenu/index.ts +2 -0
- package/lib/components/Dropdown/DropdownContent.tsx +166 -14
- package/lib/components/Dropdown/__tests__/Dropdown.test.tsx +20 -0
- package/lib/components/DropdownMenu/DropdownMenu.tsx +3 -0
- package/lib/components/DropdownMenu/__tests__/DropdownMenu.test.tsx +21 -0
- package/lib/components/DropdownUserMenu/DropdownUserMenu.tsx +12 -1
- package/lib/components/DropdownUserMenu/__tests__/DropdownUserMenu.test.tsx +3 -3
- package/lib/components/HeaderNew/HeaderItem.tsx +7 -1
- package/lib/components/HeaderNew/__tests__/Header.test.tsx +30 -0
- package/lib/components/HeaderNew/__tests__/__snapshots__/Header.test.tsx.snap +2 -2
- package/lib/components/HeaderNew/constants.ts +1 -1
- package/lib/components/MenuNew/MenuAccordion/MenuAccordion.tsx +33 -2
- package/lib/components/MenuNew/MenuAccordion/MenuAccordionChevron.tsx +13 -11
- package/lib/components/MenuNew/MenuBaseItem.tsx +20 -9
- package/lib/components/MenuNew/SecondaryMenuItem.tsx +1 -0
- package/lib/components/MenuNew/__tests__/Menu.test.tsx +12 -5
- package/lib/components/Pagination/Pagination.tsx +46 -4
- package/lib/components/Pagination/PaginationControls.tsx +65 -14
- package/lib/components/Pagination/PaginationInfo.tsx +15 -6
- package/lib/components/Pagination/index.tsx +2 -2
- package/lib/components/Search/Search.tsx +19 -1
- package/lib/components/Search/__tests__/Search.test.tsx +53 -0
- package/lib/components/index.ts +3 -0
- package/lib/theme/__tests__/useTheme.test.tsx +92 -0
- package/lib/theme/index.ts +8 -1
- package/lib/theme/useTheme.tsx +41 -3
- package/package.json +4 -4
|
@@ -23,7 +23,13 @@ const HeaderItem = ({
|
|
|
23
23
|
min-height: 40px;
|
|
24
24
|
|
|
25
25
|
&:not(:first-of-type) {
|
|
26
|
-
margin-left: ${theme.margin.
|
|
26
|
+
margin-left: ${theme.margin.m16};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media (min-width: ${theme.breakpoints.desktop}px) {
|
|
30
|
+
&:not(:first-of-type) {
|
|
31
|
+
margin-left: 0;
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
34
|
`;
|
|
29
35
|
|
|
@@ -39,4 +39,34 @@ describe('Header', () => {
|
|
|
39
39
|
expect(link).toBeInTheDocument();
|
|
40
40
|
expect(link.getAttribute('href')).toBe('/');
|
|
41
41
|
});
|
|
42
|
+
|
|
43
|
+
test('spaces subsequent header items on smaller screens and resets spacing on desktop', () => {
|
|
44
|
+
render(
|
|
45
|
+
<ThemeContextProvider>
|
|
46
|
+
<Header title='LIDS'>
|
|
47
|
+
<Header.MenuContainer>
|
|
48
|
+
<Header.Item testId='first-header-item'>First</Header.Item>
|
|
49
|
+
<Header.Item testId='second-header-item'>Second</Header.Item>
|
|
50
|
+
</Header.MenuContainer>
|
|
51
|
+
</Header>
|
|
52
|
+
</ThemeContextProvider>
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const firstItem = screen.getByTestId('first-header-item');
|
|
56
|
+
const secondItem = screen.getByTestId('second-header-item');
|
|
57
|
+
const generatedClass = [...secondItem.classList].find((className) =>
|
|
58
|
+
className.startsWith('css-')
|
|
59
|
+
);
|
|
60
|
+
const styles = document.head.textContent;
|
|
61
|
+
|
|
62
|
+
expect(firstItem).toHaveClass('ucl-uikit-header__item');
|
|
63
|
+
expect(secondItem).toHaveClass('ucl-uikit-header__item');
|
|
64
|
+
expect(generatedClass).toBeDefined();
|
|
65
|
+
expect(styles).toContain(
|
|
66
|
+
`.${generatedClass}:not(:first-of-type){margin-left:16px;}`
|
|
67
|
+
);
|
|
68
|
+
expect(styles).toContain(
|
|
69
|
+
`@media (min-width: 1056px){.${generatedClass}:not(:first-of-type){margin-left:0;}}`
|
|
70
|
+
);
|
|
71
|
+
});
|
|
42
72
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Header > snapshot: variant=avatar 1`] = `
|
|
4
4
|
<header
|
|
5
|
-
class="ucl-uikit-header css-
|
|
5
|
+
class="ucl-uikit-header css-11a9sn4"
|
|
6
6
|
data-testid="ucl-uikit-header"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
@@ -41,7 +41,7 @@ exports[`Header > snapshot: variant=avatar 1`] = `
|
|
|
41
41
|
|
|
42
42
|
exports[`Header > snapshot: variant=breadcrumbs 1`] = `
|
|
43
43
|
<header
|
|
44
|
-
class="ucl-uikit-header css-
|
|
44
|
+
class="ucl-uikit-header css-11a9sn4"
|
|
45
45
|
data-testid="ucl-uikit-header"
|
|
46
46
|
>
|
|
47
47
|
<div
|
|
@@ -60,8 +60,33 @@ const MenuAccordion = ({
|
|
|
60
60
|
`;
|
|
61
61
|
|
|
62
62
|
const bodyStyle = css`
|
|
63
|
+
display: grid;
|
|
64
|
+
grid-template-rows: 0fr;
|
|
63
65
|
width: 100%;
|
|
66
|
+
margin-top: 0;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
opacity: 0;
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
transition:
|
|
71
|
+
grid-template-rows 300ms ease-in,
|
|
72
|
+
margin-top 300ms ease-in,
|
|
73
|
+
opacity 300ms ease-in;
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
const bodyExpandedStyle = css`
|
|
77
|
+
grid-template-rows: 1fr;
|
|
64
78
|
margin-top: ${theme.margin.m8};
|
|
79
|
+
opacity: 1;
|
|
80
|
+
pointer-events: auto;
|
|
81
|
+
transition:
|
|
82
|
+
grid-template-rows 300ms ease-out,
|
|
83
|
+
margin-top 300ms ease-out,
|
|
84
|
+
opacity 300ms ease-out;
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
const bodyInnerStyle = css`
|
|
88
|
+
min-height: 0;
|
|
89
|
+
overflow: hidden;
|
|
65
90
|
`;
|
|
66
91
|
|
|
67
92
|
const handleClick = (event: MouseEvent<HTMLDivElement>) => {
|
|
@@ -74,7 +99,7 @@ const MenuAccordion = ({
|
|
|
74
99
|
<MenuBaseItem
|
|
75
100
|
className={style}
|
|
76
101
|
iconPosition='left'
|
|
77
|
-
|
|
102
|
+
hoverMode='background'
|
|
78
103
|
onClick={handleClick}
|
|
79
104
|
endAdornment={<MenuAccordionChevron expanded={expanded} />}
|
|
80
105
|
aria-expanded={expanded}
|
|
@@ -84,7 +109,13 @@ const MenuAccordion = ({
|
|
|
84
109
|
<MenuItemText className={textStyle}>{label}</MenuItemText>
|
|
85
110
|
</span>
|
|
86
111
|
</MenuBaseItem>
|
|
87
|
-
|
|
112
|
+
<div
|
|
113
|
+
className={cx(bodyStyle, expanded && bodyExpandedStyle)}
|
|
114
|
+
aria-hidden={!expanded}
|
|
115
|
+
inert={!expanded}
|
|
116
|
+
>
|
|
117
|
+
<div className={bodyInnerStyle}>{children}</div>
|
|
118
|
+
</div>
|
|
88
119
|
</>
|
|
89
120
|
);
|
|
90
121
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { css, cx } from '@emotion/css';
|
|
1
2
|
import Icon from '../../Icon';
|
|
2
3
|
|
|
3
4
|
export interface MenuAccordionChevronProps {
|
|
@@ -8,23 +9,24 @@ export interface MenuAccordionChevronProps {
|
|
|
8
9
|
const MenuAccordionChevron = ({
|
|
9
10
|
expanded,
|
|
10
11
|
className,
|
|
11
|
-
}: MenuAccordionChevronProps) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
}: MenuAccordionChevronProps) => {
|
|
13
|
+
const baseStyle = css`
|
|
14
|
+
transition: transform 150ms ease-in-out;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
const expandedStyle = css`
|
|
18
|
+
transform: rotate(180deg);
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
return (
|
|
21
22
|
<Icon.ChevronDown
|
|
22
|
-
className={className}
|
|
23
|
+
className={cx(baseStyle, expanded && expandedStyle, className)}
|
|
23
24
|
size={24}
|
|
24
25
|
aria-hidden='true'
|
|
25
26
|
focusable='false'
|
|
26
27
|
testId='ucl-uikit-menu__accordion__icon--chevron-down'
|
|
27
28
|
/>
|
|
28
29
|
);
|
|
30
|
+
};
|
|
29
31
|
|
|
30
32
|
export default MenuAccordionChevron;
|
|
@@ -6,7 +6,7 @@ export interface MenuBaseItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
iconPosition?: 'left' | 'right';
|
|
8
8
|
endAdornment?: ReactNode;
|
|
9
|
-
|
|
9
|
+
hoverMode?: 'background' | 'underline';
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ const MenuBaseItem = ({
|
|
|
20
20
|
onKeyDown,
|
|
21
21
|
role,
|
|
22
22
|
tabIndex,
|
|
23
|
-
|
|
23
|
+
hoverMode = 'background',
|
|
24
24
|
asChild = false,
|
|
25
25
|
...props
|
|
26
26
|
}: MenuBaseItemProps) => {
|
|
@@ -63,15 +63,26 @@ const MenuBaseItem = ({
|
|
|
63
63
|
&:focus-within {
|
|
64
64
|
box-shadow: ${theme.boxShadow.focus};
|
|
65
65
|
}
|
|
66
|
+
`;
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
`}
|
|
68
|
+
const backgroundOnHoverStyle = css`
|
|
69
|
+
&:hover {
|
|
70
|
+
background-color: ${theme.colour.fill.brandSubtleHover};
|
|
71
|
+
}
|
|
73
72
|
`;
|
|
74
|
-
|
|
73
|
+
|
|
74
|
+
const underlineStyleOnHoverStyle = css`
|
|
75
|
+
&:hover .ucl-uikit-menu__item-text {
|
|
76
|
+
text-decoration: underline;
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
const style = cx(
|
|
81
|
+
baseStyle,
|
|
82
|
+
hoverMode === 'underline' && underlineStyleOnHoverStyle,
|
|
83
|
+
hoverMode === 'background' && backgroundOnHoverStyle,
|
|
84
|
+
className
|
|
85
|
+
);
|
|
75
86
|
|
|
76
87
|
const endAdornmentStyle = css`
|
|
77
88
|
margin-left: auto;
|
|
@@ -86,7 +86,7 @@ describe('Menu', () => {
|
|
|
86
86
|
).toBeInTheDocument();
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
test('accordion toggles to expanded state with
|
|
89
|
+
test('accordion toggles to expanded state with rotated down chevron', () => {
|
|
90
90
|
wrap(
|
|
91
91
|
<Menu>
|
|
92
92
|
<Menu.Accordion
|
|
@@ -98,11 +98,18 @@ describe('Menu', () => {
|
|
|
98
98
|
</Menu>
|
|
99
99
|
);
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
const accordionContent = screen
|
|
102
|
+
.getByText('Library')
|
|
103
|
+
.closest('[aria-hidden]');
|
|
104
|
+
expect(accordionContent).toHaveAttribute('aria-hidden', 'true');
|
|
102
105
|
fireEvent.click(screen.getByText('Services'));
|
|
106
|
+
expect(accordionContent).toHaveAttribute('aria-hidden', 'false');
|
|
103
107
|
expect(
|
|
104
|
-
screen.getByTestId('ucl-uikit-menu__accordion__icon--chevron-
|
|
108
|
+
screen.getByTestId('ucl-uikit-menu__accordion__icon--chevron-down')
|
|
105
109
|
).toBeInTheDocument();
|
|
110
|
+
expect(
|
|
111
|
+
screen.queryByTestId('ucl-uikit-menu__accordion__icon--chevron-up')
|
|
112
|
+
).not.toBeInTheDocument();
|
|
106
113
|
expect(screen.getByText('Library')).toBeInTheDocument();
|
|
107
114
|
});
|
|
108
115
|
|
|
@@ -220,10 +227,10 @@ describe('Menu', () => {
|
|
|
220
227
|
expect(item?.firstChild).toHaveAttribute('data-testid', 'left-icon');
|
|
221
228
|
});
|
|
222
229
|
|
|
223
|
-
test('
|
|
230
|
+
test('primary items use background hover instead of underline hover', () => {
|
|
224
231
|
wrap(
|
|
225
232
|
<Menu>
|
|
226
|
-
<Menu.PrimaryItem
|
|
233
|
+
<Menu.PrimaryItem>Home</Menu.PrimaryItem>
|
|
227
234
|
</Menu>
|
|
228
235
|
);
|
|
229
236
|
|
|
@@ -8,10 +8,17 @@ import { useTheme } from '../../theme';
|
|
|
8
8
|
export const NAME = 'ucl-uikit-pagination';
|
|
9
9
|
|
|
10
10
|
interface PaginationContextValue {
|
|
11
|
+
mode: 'offset' | 'tracked';
|
|
11
12
|
offset: number;
|
|
12
13
|
limit: number;
|
|
13
|
-
total
|
|
14
|
+
total?: number;
|
|
15
|
+
currentPage: number;
|
|
16
|
+
trackedMaxPage: number;
|
|
17
|
+
hasPreviousPage: boolean;
|
|
18
|
+
hasNextPage: boolean;
|
|
14
19
|
onPageChange?: (page: number) => void;
|
|
20
|
+
onNextPage?: () => void;
|
|
21
|
+
onPreviousPage?: () => void;
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
export const PaginationContext = createContext<
|
|
@@ -19,10 +26,17 @@ export const PaginationContext = createContext<
|
|
|
19
26
|
>(undefined);
|
|
20
27
|
|
|
21
28
|
export interface PaginationBaseProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
-
offset
|
|
29
|
+
mode?: 'offset' | 'tracked';
|
|
30
|
+
offset?: number;
|
|
23
31
|
limit: number;
|
|
24
|
-
total
|
|
32
|
+
total?: number;
|
|
25
33
|
onPageChange?: (newOffset: number) => void;
|
|
34
|
+
currentPage?: number;
|
|
35
|
+
trackedMaxPage?: number;
|
|
36
|
+
hasNextPage?: boolean;
|
|
37
|
+
hasPreviousPage?: boolean;
|
|
38
|
+
onNextPage?: () => void;
|
|
39
|
+
onPreviousPage?: () => void;
|
|
26
40
|
testId?: string;
|
|
27
41
|
}
|
|
28
42
|
|
|
@@ -33,6 +47,13 @@ const Pagination = ({
|
|
|
33
47
|
limit,
|
|
34
48
|
total,
|
|
35
49
|
onPageChange,
|
|
50
|
+
mode = 'offset',
|
|
51
|
+
currentPage,
|
|
52
|
+
trackedMaxPage,
|
|
53
|
+
hasNextPage,
|
|
54
|
+
hasPreviousPage,
|
|
55
|
+
onNextPage,
|
|
56
|
+
onPreviousPage,
|
|
36
57
|
testId,
|
|
37
58
|
className,
|
|
38
59
|
children,
|
|
@@ -40,11 +61,32 @@ const Pagination = ({
|
|
|
40
61
|
}: PaginationProps) => {
|
|
41
62
|
const [theme] = useTheme();
|
|
42
63
|
|
|
64
|
+
const isTrackedMode = mode === 'tracked';
|
|
65
|
+
const resolvedCurrentPage = isTrackedMode
|
|
66
|
+
? Math.max(1, currentPage ?? 1)
|
|
67
|
+
: Math.floor((offset ?? 0) / limit) + 1;
|
|
68
|
+
const resolvedOffset = isTrackedMode
|
|
69
|
+
? (resolvedCurrentPage - 1) * limit
|
|
70
|
+
: (offset ?? 0);
|
|
71
|
+
|
|
43
72
|
const contextValue: PaginationContextValue = {
|
|
44
|
-
|
|
73
|
+
mode,
|
|
74
|
+
offset: resolvedOffset,
|
|
45
75
|
limit,
|
|
46
76
|
total,
|
|
77
|
+
currentPage: resolvedCurrentPage,
|
|
78
|
+
trackedMaxPage: isTrackedMode
|
|
79
|
+
? Math.max(resolvedCurrentPage, trackedMaxPage ?? resolvedCurrentPage)
|
|
80
|
+
: 0,
|
|
81
|
+
hasPreviousPage: isTrackedMode
|
|
82
|
+
? Boolean(hasPreviousPage ?? resolvedCurrentPage > 1)
|
|
83
|
+
: resolvedCurrentPage > 1,
|
|
84
|
+
hasNextPage: isTrackedMode
|
|
85
|
+
? Boolean(hasNextPage)
|
|
86
|
+
: typeof total === 'number' && resolvedOffset + limit < total,
|
|
47
87
|
onPageChange,
|
|
88
|
+
onNextPage,
|
|
89
|
+
onPreviousPage,
|
|
48
90
|
};
|
|
49
91
|
|
|
50
92
|
const baseStyle = css`
|
|
@@ -30,7 +30,23 @@ const PaginationControls = ({
|
|
|
30
30
|
const handlePageChange = useCallback(
|
|
31
31
|
(newPage: number) => {
|
|
32
32
|
if (contextValue) {
|
|
33
|
-
const { limit, onPageChange } =
|
|
33
|
+
const { mode, limit, onPageChange, currentPage, trackedMaxPage } =
|
|
34
|
+
contextValue;
|
|
35
|
+
|
|
36
|
+
if (mode === 'tracked') {
|
|
37
|
+
if (
|
|
38
|
+
newPage < 1 ||
|
|
39
|
+
newPage > trackedMaxPage ||
|
|
40
|
+
newPage === currentPage
|
|
41
|
+
) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (onPageChange) {
|
|
45
|
+
onPageChange(newPage);
|
|
46
|
+
}
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
34
50
|
const newOffset = (newPage - 1) * limit;
|
|
35
51
|
if (onPageChange) {
|
|
36
52
|
onPageChange(newOffset);
|
|
@@ -44,16 +60,29 @@ const PaginationControls = ({
|
|
|
44
60
|
return null;
|
|
45
61
|
}
|
|
46
62
|
|
|
47
|
-
const {
|
|
63
|
+
const {
|
|
64
|
+
mode,
|
|
65
|
+
limit,
|
|
66
|
+
total,
|
|
67
|
+
currentPage,
|
|
68
|
+
trackedMaxPage,
|
|
69
|
+
hasPreviousPage,
|
|
70
|
+
hasNextPage,
|
|
71
|
+
onNextPage,
|
|
72
|
+
onPreviousPage,
|
|
73
|
+
} = contextValue;
|
|
48
74
|
|
|
49
|
-
const totalPages =
|
|
50
|
-
|
|
75
|
+
const totalPages =
|
|
76
|
+
typeof total === 'number' ? Math.ceil(total / limit) : undefined;
|
|
51
77
|
|
|
52
|
-
const paginationButtons =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
78
|
+
const paginationButtons =
|
|
79
|
+
mode === 'tracked'
|
|
80
|
+
? Array.from({ length: trackedMaxPage }, (_, i) => i + 1)
|
|
81
|
+
: getPaginationButtons(
|
|
82
|
+
currentPage,
|
|
83
|
+
totalPages ?? 0,
|
|
84
|
+
isTabletPlus ? maxNumberButtons : 5
|
|
85
|
+
);
|
|
57
86
|
|
|
58
87
|
const baseStyle = css``;
|
|
59
88
|
|
|
@@ -141,7 +170,11 @@ const PaginationControls = ({
|
|
|
141
170
|
return (
|
|
142
171
|
<nav
|
|
143
172
|
className={style}
|
|
144
|
-
aria-label={
|
|
173
|
+
aria-label={
|
|
174
|
+
typeof totalPages === 'number'
|
|
175
|
+
? `Pagination, ${totalPages} pages total`
|
|
176
|
+
: 'Pagination'
|
|
177
|
+
}
|
|
145
178
|
data-testid={testId}
|
|
146
179
|
>
|
|
147
180
|
<ul className={listStyle}>
|
|
@@ -151,8 +184,18 @@ const PaginationControls = ({
|
|
|
151
184
|
variant='tertiary'
|
|
152
185
|
size={isTabletPlus ? 'default' : 'small'}
|
|
153
186
|
aria-label='Go to previous page'
|
|
154
|
-
onClick={() =>
|
|
155
|
-
|
|
187
|
+
onClick={() => {
|
|
188
|
+
if (mode === 'tracked') {
|
|
189
|
+
if (onPreviousPage) {
|
|
190
|
+
onPreviousPage();
|
|
191
|
+
} else {
|
|
192
|
+
handlePageChange(currentPage - 1);
|
|
193
|
+
}
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
handlePageChange(currentPage - 1);
|
|
197
|
+
}}
|
|
198
|
+
disabled={!hasPreviousPage}
|
|
156
199
|
>
|
|
157
200
|
Previous
|
|
158
201
|
</Button>
|
|
@@ -198,8 +241,16 @@ const PaginationControls = ({
|
|
|
198
241
|
className={nextButtonStyle}
|
|
199
242
|
variant='tertiary'
|
|
200
243
|
aria-label='Go to next page'
|
|
201
|
-
onClick={() =>
|
|
202
|
-
|
|
244
|
+
onClick={() => {
|
|
245
|
+
if (mode === 'tracked') {
|
|
246
|
+
if (onNextPage) {
|
|
247
|
+
onNextPage();
|
|
248
|
+
}
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
handlePageChange(currentPage + 1);
|
|
252
|
+
}}
|
|
253
|
+
disabled={!hasNextPage}
|
|
203
254
|
>
|
|
204
255
|
Next
|
|
205
256
|
</Button>
|
|
@@ -26,16 +26,25 @@ const PaginationInfo = ({
|
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const { offset, limit, total } = contextValue;
|
|
29
|
+
const { offset, limit, total, currentPage } = contextValue;
|
|
30
30
|
|
|
31
|
-
const totalPages =
|
|
32
|
-
|
|
31
|
+
const totalPages =
|
|
32
|
+
typeof total === 'number' ? Math.ceil(total / limit) : undefined;
|
|
33
33
|
const startItem = offset + 1;
|
|
34
|
-
const endItem =
|
|
34
|
+
const endItem =
|
|
35
|
+
typeof total === 'number'
|
|
36
|
+
? Math.min(offset + limit, total)
|
|
37
|
+
: offset + limit;
|
|
35
38
|
|
|
36
39
|
const text = {
|
|
37
|
-
pages:
|
|
38
|
-
|
|
40
|
+
pages:
|
|
41
|
+
typeof totalPages === 'number'
|
|
42
|
+
? `Page ${currentPage} of ${totalPages}`
|
|
43
|
+
: `Page ${currentPage}`,
|
|
44
|
+
items:
|
|
45
|
+
typeof total === 'number'
|
|
46
|
+
? `${startItem}-${endItem} of ${total}${itemsPluralName ? ` ${itemsPluralName}` : ''}`
|
|
47
|
+
: `${startItem}-${endItem}${itemsPluralName ? ` ${itemsPluralName}` : ''}`,
|
|
39
48
|
}[format];
|
|
40
49
|
|
|
41
50
|
const baseStyle = css`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default } from './Pagination';
|
|
2
2
|
export type { PaginationProps } from './Pagination';
|
|
3
|
-
export { default as
|
|
3
|
+
export { default as PaginationControls } from './PaginationControls';
|
|
4
4
|
export type { PaginationControlsProps } from './PaginationControls';
|
|
5
|
-
export { default as
|
|
5
|
+
export { default as PaginationInfo } from './PaginationInfo';
|
|
6
6
|
export type { PaginationInfoProps } from './PaginationInfo';
|
|
@@ -6,6 +6,7 @@ import marginsStyle, { MarginProps } from '../common/marginsStyle';
|
|
|
6
6
|
|
|
7
7
|
export interface SearchBaseProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
8
|
onSearch?: (searchTerms: string) => void;
|
|
9
|
+
onClear?: () => void;
|
|
9
10
|
placeholder?: string;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
inputProps?: InputProps;
|
|
@@ -22,6 +23,7 @@ const Search = ({
|
|
|
22
23
|
placeholder = '',
|
|
23
24
|
testId = NAME,
|
|
24
25
|
onSearch,
|
|
26
|
+
onClear,
|
|
25
27
|
disabled = false,
|
|
26
28
|
m,
|
|
27
29
|
mv,
|
|
@@ -48,14 +50,29 @@ const Search = ({
|
|
|
48
50
|
const handleClearButtonClick = () => {
|
|
49
51
|
setSearchTerms('');
|
|
50
52
|
inputRef.current?.focus();
|
|
53
|
+
if (onClear) {
|
|
54
|
+
onClear();
|
|
55
|
+
}
|
|
51
56
|
};
|
|
52
57
|
|
|
53
|
-
const
|
|
58
|
+
const triggerSearch = () => {
|
|
54
59
|
if (onSearch) {
|
|
55
60
|
onSearch(searchTerms);
|
|
56
61
|
}
|
|
57
62
|
};
|
|
58
63
|
|
|
64
|
+
const handleSearchInputKeyDown = (
|
|
65
|
+
event: React.KeyboardEvent<HTMLInputElement>
|
|
66
|
+
) => {
|
|
67
|
+
if (event.key === 'Enter') {
|
|
68
|
+
triggerSearch();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const handleSearchButtonClick = () => {
|
|
73
|
+
triggerSearch();
|
|
74
|
+
};
|
|
75
|
+
|
|
59
76
|
const baseStyle = css`
|
|
60
77
|
position: relative;
|
|
61
78
|
height: 48px;
|
|
@@ -132,6 +149,7 @@ const Search = ({
|
|
|
132
149
|
placeholder={placeholder}
|
|
133
150
|
type='text'
|
|
134
151
|
onChange={handleSearchTermsChange}
|
|
152
|
+
onKeyDown={handleSearchInputKeyDown}
|
|
135
153
|
value={searchTerms}
|
|
136
154
|
disabled={disabled}
|
|
137
155
|
data-testid={testId}
|
|
@@ -91,6 +91,24 @@ describe('Search', () => {
|
|
|
91
91
|
|
|
92
92
|
expect(mockOnSearch).toHaveBeenCalledWith('test search');
|
|
93
93
|
});
|
|
94
|
+
|
|
95
|
+
test('calls onSearch when Enter key is pressed in input', async () => {
|
|
96
|
+
const user = userEvent.setup();
|
|
97
|
+
const mockOnSearch = vi.fn();
|
|
98
|
+
|
|
99
|
+
render(
|
|
100
|
+
<ThemeContextProvider>
|
|
101
|
+
<Search onSearch={mockOnSearch} />
|
|
102
|
+
</ThemeContextProvider>
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
const input = screen.getByRole('textbox');
|
|
106
|
+
await user.type(input, 'test search{enter}');
|
|
107
|
+
|
|
108
|
+
expect(mockOnSearch).toHaveBeenCalledWith('test search');
|
|
109
|
+
expect(mockOnSearch).toHaveBeenCalledTimes(1);
|
|
110
|
+
});
|
|
111
|
+
|
|
94
112
|
test('clear button clears text and returns focus to input', async () => {
|
|
95
113
|
const user = userEvent.setup();
|
|
96
114
|
render(
|
|
@@ -109,4 +127,39 @@ describe('Search', () => {
|
|
|
109
127
|
expect((input as HTMLInputElement).value).toBe('');
|
|
110
128
|
expect(document.activeElement).toBe(input);
|
|
111
129
|
});
|
|
130
|
+
|
|
131
|
+
test('calls onClear when clear button is clicked', async () => {
|
|
132
|
+
const user = userEvent.setup();
|
|
133
|
+
const mockOnClear = vi.fn();
|
|
134
|
+
|
|
135
|
+
render(
|
|
136
|
+
<ThemeContextProvider>
|
|
137
|
+
<Search onClear={mockOnClear} />
|
|
138
|
+
</ThemeContextProvider>
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
const input = screen.getByTestId('ucl-uikit-search');
|
|
142
|
+
const clearButton = screen.getByTestId('ucl-uikit-search-clear-search-btn');
|
|
143
|
+
|
|
144
|
+
await user.type(input, 'hello');
|
|
145
|
+
await user.click(clearButton);
|
|
146
|
+
|
|
147
|
+
expect(mockOnClear).toHaveBeenCalledTimes(1);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
test('does not call onClear when search button is clicked', async () => {
|
|
151
|
+
const user = userEvent.setup();
|
|
152
|
+
const mockOnClear = vi.fn();
|
|
153
|
+
|
|
154
|
+
render(
|
|
155
|
+
<ThemeContextProvider>
|
|
156
|
+
<Search onClear={mockOnClear} />
|
|
157
|
+
</ThemeContextProvider>
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
const searchButton = screen.getByTestId('ucl-uikit-search-search-btn');
|
|
161
|
+
await user.click(searchButton);
|
|
162
|
+
|
|
163
|
+
expect(mockOnClear).not.toHaveBeenCalled();
|
|
164
|
+
});
|
|
112
165
|
});
|
package/lib/components/index.ts
CHANGED
|
@@ -183,6 +183,9 @@ export type {
|
|
|
183
183
|
export { default as DropdownMenu } from './DropdownMenu';
|
|
184
184
|
export type { DropdownMenuProps } from './DropdownMenu';
|
|
185
185
|
|
|
186
|
+
export { default as DrawerMenu } from './DrawerMenu';
|
|
187
|
+
export type { DrawerMenuProps } from './DrawerMenu';
|
|
188
|
+
|
|
186
189
|
export { default as DropdownUserMenu } from './DropdownUserMenu';
|
|
187
190
|
export type { DropdownUserMenuProps } from './DropdownUserMenu';
|
|
188
191
|
|