@bitrise/bitkit 12.83.0 → 12.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/Components/Accordion/Accordion.tsx +1 -1
- package/src/Components/Accordion/AccordionItem.tsx +4 -4
- package/src/Components/AccordionLegacy/Accordion.theme.ts +59 -59
- package/src/Components/AccordionLegacy/LegacyAccordion.tsx +3 -3
- package/src/Components/AccordionLegacy/LegacyAccordionItem.tsx +4 -4
- package/src/Components/Badge/Badge.theme.ts +5 -5
- package/src/Components/Badge/Badge.tsx +1 -1
- package/src/Components/Breadcrumb/Breadcrumb.theme.ts +10 -10
- package/src/Components/Breadcrumb/Breadcrumb.tsx +1 -1
- package/src/Components/Button/Button.theme.ts +72 -72
- package/src/Components/Card/Card.theme.ts +7 -7
- package/src/Components/CloseButton/CloseButton.theme.ts +10 -10
- package/src/Components/CloseButton/CloseButton.tsx +1 -1
- package/src/Components/CodeBlock/CodeBlock.theme.ts +7 -7
- package/src/Components/CodeBlock/CodeBlock.tsx +4 -4
- package/src/Components/CodeSnippet/CodeSnippet.theme.ts +8 -8
- package/src/Components/CodeSnippet/CodeSnippet.tsx +2 -2
- package/src/Components/ColorButton/ColorButton.theme.ts +27 -27
- package/src/Components/ColorButton/ColorButton.tsx +2 -2
- package/src/Components/DatePicker/DatePicker.tsx +9 -9
- package/src/Components/DatePicker/DatePickerDay.theme.ts +31 -31
- package/src/Components/DatePicker/DatePickerDay.tsx +17 -17
- package/src/Components/DatePicker/DatePickerFooter.tsx +13 -13
- package/src/Components/DatePicker/DatePickerGrid.tsx +1 -1
- package/src/Components/DatePicker/DatePickerHeader.tsx +19 -19
- package/src/Components/DatePicker/DatePickerMonth.tsx +15 -15
- package/src/Components/DatePicker/DatePickerMonthSelector.tsx +25 -25
- package/src/Components/DefinitionTooltip/DefinitionTooltip.theme.ts +5 -5
- package/src/Components/DefinitionTooltip/DefinitionTooltip.tsx +1 -1
- package/src/Components/Dialog/Dialog.theme.ts +51 -51
- package/src/Components/Dialog/Dialog.tsx +5 -5
- package/src/Components/Dot/Dot.tsx +1 -1
- package/src/Components/Drawer/Drawer.theme.ts +20 -20
- package/src/Components/Drawer/Drawer.tsx +5 -5
- package/src/Components/Dropdown/Dropdown.context.tsx +2 -2
- package/src/Components/Dropdown/Dropdown.theme.ts +55 -55
- package/src/Components/Dropdown/Dropdown.tsx +52 -52
- package/src/Components/Dropdown/DropdownButton.tsx +5 -5
- package/src/Components/Dropdown/DropdownOption.tsx +12 -12
- package/src/Components/Dropdown/hooks/useAutoScroll.ts +3 -3
- package/src/Components/Dropdown/hooks/useFloatingDropdown.ts +39 -39
- package/src/Components/Dropdown/hooks/useSimpleSearch.tsx +1 -1
- package/src/Components/EmptyState/EmptyState.theme.ts +11 -11
- package/src/Components/EmptyState/EmptyState.tsx +1 -1
- package/src/Components/ExpandableCard/ExpandableCard.theme.ts +14 -14
- package/src/Components/ExpandableCard/ExpandableCard.tsx +3 -3
- package/src/Components/Filter/Filter.storyData.ts +44 -44
- package/src/Components/Filter/Filter.theme.ts +82 -82
- package/src/Components/Filter/Filter.tsx +6 -6
- package/src/Components/Filter/FilterAdd/FilterAdd.tsx +3 -3
- package/src/Components/Filter/FilterDate/FilterDate.tsx +4 -4
- package/src/Components/Filter/FilterForm/FilterForm.tsx +4 -5
- package/src/Components/Filter/FilterItem/FilterItem.tsx +4 -4
- package/src/Components/Filter/FilterSearch/FilterSearch.tsx +2 -2
- package/src/Components/Filter/FilterSwitch/FilterSwitch.theme.ts +29 -29
- package/src/Components/Filter/FilterSwitch/FilterSwitch.tsx +6 -6
- package/src/Components/Form/Checkbox/Checkbox.theme.ts +25 -25
- package/src/Components/Form/DateInput/DateInput.tsx +8 -8
- package/src/Components/Form/FileInput/FileInput.theme.ts +26 -26
- package/src/Components/Form/FileInput/FileInput.tsx +11 -11
- package/src/Components/Form/Form.theme.ts +5 -5
- package/src/Components/Form/Input/Input.theme.ts +24 -24
- package/src/Components/Form/Input/Input.tsx +17 -17
- package/src/Components/Form/Radio/Radio.theme.ts +26 -26
- package/src/Components/Form/Radio/Radio.tsx +1 -1
- package/src/Components/Form/Textarea/Textarea.tsx +9 -9
- package/src/Components/Icon/Icon.tsx +1 -1
- package/src/Components/IconButton/IconButton.tsx +1 -1
- package/src/Components/Icons/16x16/Addons.tsx +3 -3
- package/src/Components/Icons/16x16/AddonsTuorqouise.tsx +7 -7
- package/src/Components/Icons/16x16/AddonsViolet.tsx +7 -7
- package/src/Components/Icons/16x16/AddonsWhite.tsx +7 -7
- package/src/Components/Icons/16x16/Agent.tsx +3 -3
- package/src/Components/Icons/16x16/Anchor.tsx +3 -3
- package/src/Components/Icons/16x16/Android.tsx +3 -3
- package/src/Components/Icons/16x16/App.tsx +3 -3
- package/src/Components/Icons/16x16/Apple.tsx +3 -3
- package/src/Components/Icons/16x16/AppleFill.tsx +2 -2
- package/src/Components/Icons/16x16/ArrowDown.tsx +2 -2
- package/src/Components/Icons/16x16/ArrowLeft.tsx +3 -3
- package/src/Components/Icons/16x16/ArrowMoveDown.tsx +2 -2
- package/src/Components/Icons/16x16/ArrowMoveLeft.tsx +3 -3
- package/src/Components/Icons/16x16/ArrowMoveRight.tsx +3 -3
- package/src/Components/Icons/16x16/ArrowMoveUp.tsx +3 -3
- package/src/Components/Icons/16x16/ArrowQuit.tsx +2 -2
- package/src/Components/Icons/16x16/ArrowRight.tsx +2 -2
- package/src/Components/Icons/16x16/ArrowUp.tsx +2 -2
- package/src/Components/Icons/16x16/Badge3rdParty.tsx +4 -4
- package/src/Components/Icons/16x16/BadgeBitrise.tsx +4 -4
- package/src/Components/Icons/16x16/Bazel.tsx +8 -8
- package/src/Components/Icons/16x16/Bell.tsx +3 -3
- package/src/Components/Icons/16x16/Bitbot.tsx +4 -4
- package/src/Components/Icons/16x16/BitbotError.tsx +4 -4
- package/src/Components/Icons/16x16/BitbucketBlue.tsx +4 -4
- package/src/Components/Icons/16x16/BitbucketPlain.tsx +3 -3
- package/src/Components/Icons/16x16/BitbucketShadedWhite.tsx +6 -6
- package/src/Components/Icons/16x16/Book.tsx +3 -3
- package/src/Components/Icons/16x16/BoxWithArrowDown.tsx +2 -2
- package/src/Components/Icons/16x16/BoxWithDot.tsx +3 -3
- package/src/Components/Icons/16x16/Branch.tsx +3 -3
- package/src/Components/Icons/16x16/Bug.tsx +3 -3
- package/src/Components/Icons/16x16/Build.tsx +4 -4
- package/src/Components/Icons/16x16/BuildCache.tsx +2 -2
- package/src/Components/Icons/16x16/BuildCacheSolid.tsx +3 -3
- package/src/Components/Icons/16x16/BuildTest.tsx +2 -2
- package/src/Components/Icons/16x16/BuildTestSolid.tsx +2 -2
- package/src/Components/Icons/16x16/BuildstatusAborted.tsx +5 -5
- package/src/Components/Icons/16x16/BuildstatusAbortedSolid.tsx +2 -2
- package/src/Components/Icons/16x16/BuildstatusFailed.tsx +3 -3
- package/src/Components/Icons/16x16/BuildstatusFailedSolid.tsx +2 -2
- package/src/Components/Icons/16x16/BuildstatusLoading.tsx +5 -5
- package/src/Components/Icons/16x16/BuildstatusLoadingAnimated.tsx +11 -11
- package/src/Components/Icons/16x16/BuildstatusNeverbuilt.tsx +3 -3
- package/src/Components/Icons/16x16/BuildstatusProgressEggplant.tsx +7 -7
- package/src/Components/Icons/16x16/BuildstatusProgressWhite.tsx +5 -5
- package/src/Components/Icons/16x16/BuildstatusSuccessful.tsx +5 -5
- package/src/Components/Icons/16x16/BuildstatusSuccessfulSolid.tsx +2 -2
- package/src/Components/Icons/16x16/Bulletpoint.tsx +2 -2
- package/src/Components/Icons/16x16/Cache.tsx +4 -4
- package/src/Components/Icons/16x16/Calendar.tsx +3 -3
- package/src/Components/Icons/16x16/ChangePlan.tsx +3 -3
- package/src/Components/Icons/16x16/Chat.tsx +4 -4
- package/src/Components/Icons/16x16/ChatMessage.tsx +3 -3
- package/src/Components/Icons/16x16/CheckCircle.tsx +2 -2
- package/src/Components/Icons/16x16/ChevronDown.tsx +3 -3
- package/src/Components/Icons/16x16/ChevronLeft.tsx +3 -3
- package/src/Components/Icons/16x16/ChevronRight.tsx +3 -3
- package/src/Components/Icons/16x16/ChevronUp.tsx +3 -3
- package/src/Components/Icons/16x16/Clock.tsx +3 -3
- package/src/Components/Icons/16x16/CloseSmall.tsx +3 -3
- package/src/Components/Icons/16x16/Code.tsx +3 -3
- package/src/Components/Icons/16x16/CodeSigning.tsx +4 -4
- package/src/Components/Icons/16x16/Coffee.tsx +3 -3
- package/src/Components/Icons/16x16/Commit.tsx +2 -2
- package/src/Components/Icons/16x16/Conference.tsx +5 -5
- package/src/Components/Icons/16x16/ConnectedAccounts.tsx +2 -2
- package/src/Components/Icons/16x16/Cordova.tsx +3 -3
- package/src/Components/Icons/16x16/Cpu.tsx +4 -4
- package/src/Components/Icons/16x16/Creditcard.tsx +4 -4
- package/src/Components/Icons/16x16/Credits.tsx +5 -5
- package/src/Components/Icons/16x16/Cycle.tsx +3 -3
- package/src/Components/Icons/16x16/DeleteNope.tsx +3 -3
- package/src/Components/Icons/16x16/Deployment.tsx +5 -5
- package/src/Components/Icons/16x16/Details.tsx +2 -2
- package/src/Components/Icons/16x16/Doc.tsx +3 -3
- package/src/Components/Icons/16x16/Dollars.tsx +3 -3
- package/src/Components/Icons/16x16/Download.tsx +3 -3
- package/src/Components/Icons/16x16/DropdownArrows.tsx +3 -3
- package/src/Components/Icons/16x16/Dudes.tsx +3 -3
- package/src/Components/Icons/16x16/Duplicate.tsx +3 -3
- package/src/Components/Icons/16x16/Enterprise.tsx +4 -4
- package/src/Components/Icons/16x16/ErrorGeneral.tsx +4 -4
- package/src/Components/Icons/16x16/Expand.tsx +2 -2
- package/src/Components/Icons/16x16/Fastlane.tsx +3 -3
- package/src/Components/Icons/16x16/FileDoc.tsx +3 -3
- package/src/Components/Icons/16x16/FilePdf.tsx +3 -3
- package/src/Components/Icons/16x16/FilePlist.tsx +5 -5
- package/src/Components/Icons/16x16/FileZip.tsx +5 -5
- package/src/Components/Icons/16x16/Filter.tsx +1 -1
- package/src/Components/Icons/16x16/Flag.tsx +3 -3
- package/src/Components/Icons/16x16/Flutter.tsx +2 -2
- package/src/Components/Icons/16x16/Folder.tsx +3 -3
- package/src/Components/Icons/16x16/Fullscreen.tsx +2 -2
- package/src/Components/Icons/16x16/FullscreenExit.tsx +2 -2
- package/src/Components/Icons/16x16/Gauge.tsx +2 -2
- package/src/Components/Icons/16x16/Github.tsx +3 -3
- package/src/Components/Icons/16x16/GitlabColor.tsx +9 -9
- package/src/Components/Icons/16x16/GitlabPlain.tsx +3 -3
- package/src/Components/Icons/16x16/GitlabShadedWhite.tsx +14 -14
- package/src/Components/Icons/16x16/Globe.tsx +3 -3
- package/src/Components/Icons/16x16/Go.tsx +8 -8
- package/src/Components/Icons/16x16/GoogleColor.tsx +6 -6
- package/src/Components/Icons/16x16/Gradle.tsx +2 -2
- package/src/Components/Icons/16x16/Group.tsx +3 -3
- package/src/Components/Icons/16x16/Heart.tsx +3 -3
- package/src/Components/Icons/16x16/HidePassword.tsx +4 -4
- package/src/Components/Icons/16x16/History.tsx +2 -2
- package/src/Components/Icons/16x16/Image.tsx +3 -3
- package/src/Components/Icons/16x16/Info.tsx +3 -3
- package/src/Components/Icons/16x16/Insights.tsx +2 -2
- package/src/Components/Icons/16x16/InsightsSolid.tsx +2 -2
- package/src/Components/Icons/16x16/Interaction.tsx +4 -4
- package/src/Components/Icons/16x16/Invoice.tsx +3 -3
- package/src/Components/Icons/16x16/Ionic.tsx +3 -3
- package/src/Components/Icons/16x16/Japanese.tsx +3 -3
- package/src/Components/Icons/16x16/Key.tsx +3 -3
- package/src/Components/Icons/16x16/Laptop.tsx +3 -3
- package/src/Components/Icons/16x16/LaunchDarkly.tsx +1 -1
- package/src/Components/Icons/16x16/Lightbulb.tsx +3 -3
- package/src/Components/Icons/16x16/Link.tsx +2 -2
- package/src/Components/Icons/16x16/Lock.tsx +3 -3
- package/src/Components/Icons/16x16/LockOpen.tsx +2 -2
- package/src/Components/Icons/16x16/Login.tsx +3 -3
- package/src/Components/Icons/16x16/Logout.tsx +3 -3
- package/src/Components/Icons/16x16/Macos.tsx +3 -3
- package/src/Components/Icons/16x16/Magnifier.tsx +3 -3
- package/src/Components/Icons/16x16/Mail.tsx +3 -3
- package/src/Components/Icons/16x16/MenuGrid.tsx +3 -3
- package/src/Components/Icons/16x16/MenuHamburger.tsx +3 -3
- package/src/Components/Icons/16x16/Message.tsx +3 -3
- package/src/Components/Icons/16x16/MinusClose.tsx +2 -2
- package/src/Components/Icons/16x16/MinusRemove.tsx +3 -3
- package/src/Components/Icons/16x16/Mobile.tsx +3 -3
- package/src/Components/Icons/16x16/MonitorChart.tsx +2 -2
- package/src/Components/Icons/16x16/MoreHorizontal.tsx +3 -3
- package/src/Components/Icons/16x16/MoreVertical.tsx +3 -3
- package/src/Components/Icons/16x16/News.tsx +4 -4
- package/src/Components/Icons/16x16/NoTie.tsx +3 -3
- package/src/Components/Icons/16x16/Nodejs.tsx +3 -3
- package/src/Components/Icons/16x16/Numero.tsx +3 -3
- package/src/Components/Icons/16x16/OpenInBrowser.tsx +3 -3
- package/src/Components/Icons/16x16/Other.tsx +5 -5
- package/src/Components/Icons/16x16/OverflowingLines.tsx +3 -3
- package/src/Components/Icons/16x16/Overview.tsx +3 -3
- package/src/Components/Icons/16x16/Owner.tsx +4 -4
- package/src/Components/Icons/16x16/Pause.tsx +3 -3
- package/src/Components/Icons/16x16/Pencil.tsx +5 -5
- package/src/Components/Icons/16x16/Percent.tsx +3 -3
- package/src/Components/Icons/16x16/Person.tsx +3 -3
- package/src/Components/Icons/16x16/Play.tsx +3 -3
- package/src/Components/Icons/16x16/PlusAdd.tsx +3 -3
- package/src/Components/Icons/16x16/PlusOpen.tsx +3 -3
- package/src/Components/Icons/16x16/Podcast.tsx +4 -4
- package/src/Components/Icons/16x16/Power.tsx +3 -3
- package/src/Components/Icons/16x16/ProgressEggplant.tsx +5 -5
- package/src/Components/Icons/16x16/ProgressViolet.tsx +5 -5
- package/src/Components/Icons/16x16/ProgressWhite.tsx +5 -5
- package/src/Components/Icons/16x16/Pull.tsx +3 -3
- package/src/Components/Icons/16x16/Push.tsx +3 -3
- package/src/Components/Icons/16x16/ReactIcon.tsx +3 -3
- package/src/Components/Icons/16x16/Refresh.tsx +2 -2
- package/src/Components/Icons/16x16/Release.tsx +2 -2
- package/src/Components/Icons/16x16/ReleaseSolid.tsx +2 -2
- package/src/Components/Icons/16x16/Replace.tsx +2 -2
- package/src/Components/Icons/16x16/Request.tsx +2 -2
- package/src/Components/Icons/16x16/Responsiveness.tsx +3 -3
- package/src/Components/Icons/16x16/Save.tsx +4 -4
- package/src/Components/Icons/16x16/Screenshare.tsx +4 -4
- package/src/Components/Icons/16x16/SecurityShield.tsx +3 -3
- package/src/Components/Icons/16x16/Settings.tsx +3 -3
- package/src/Components/Icons/16x16/SettingsSolid.tsx +2 -2
- package/src/Components/Icons/16x16/Ship.tsx +4 -4
- package/src/Components/Icons/16x16/ShowPassword.tsx +4 -4
- package/src/Components/Icons/16x16/Shuffle.tsx +3 -3
- package/src/Components/Icons/16x16/Siren.tsx +1 -1
- package/src/Components/Icons/16x16/Sort.tsx +2 -2
- package/src/Components/Icons/16x16/SortArrows.tsx +2 -2
- package/src/Components/Icons/16x16/Stability.tsx +4 -4
- package/src/Components/Icons/16x16/Stack.tsx +3 -3
- package/src/Components/Icons/16x16/StageCurrent.tsx +2 -2
- package/src/Components/Icons/16x16/StageIncomplete.tsx +2 -2
- package/src/Components/Icons/16x16/Star.tsx +3 -3
- package/src/Components/Icons/16x16/Status.tsx +5 -5
- package/src/Components/Icons/16x16/StepUpgrade.tsx +3 -3
- package/src/Components/Icons/16x16/StepVersionOk.tsx +3 -3
- package/src/Components/Icons/16x16/Steps.tsx +3 -3
- package/src/Components/Icons/16x16/StepsTuorqouise.tsx +7 -7
- package/src/Components/Icons/16x16/StepsViolet.tsx +7 -7
- package/src/Components/Icons/16x16/StepsWhite.tsx +7 -7
- package/src/Components/Icons/16x16/StepstatusSkip.tsx +5 -5
- package/src/Components/Icons/16x16/StepstatusWarning.tsx +4 -4
- package/src/Components/Icons/16x16/Stopwatch.tsx +5 -5
- package/src/Components/Icons/16x16/Support.tsx +3 -3
- package/src/Components/Icons/16x16/Swag.tsx +2 -2
- package/src/Components/Icons/16x16/Tag.tsx +4 -4
- package/src/Components/Icons/16x16/TestFailed.tsx +4 -4
- package/src/Components/Icons/16x16/TestInconclusive.tsx +4 -4
- package/src/Components/Icons/16x16/TestInfo.tsx +4 -4
- package/src/Components/Icons/16x16/TestInprogress.tsx +3 -3
- package/src/Components/Icons/16x16/TestSkipped.tsx +5 -5
- package/src/Components/Icons/16x16/TestSuccess.tsx +4 -4
- package/src/Components/Icons/16x16/TestWarning.tsx +4 -4
- package/src/Components/Icons/16x16/Testing.tsx +4 -4
- package/src/Components/Icons/16x16/Tick.tsx +3 -3
- package/src/Components/Icons/16x16/Time.tsx +3 -3
- package/src/Components/Icons/16x16/Tools.tsx +3 -3
- package/src/Components/Icons/16x16/Trace.tsx +2 -2
- package/src/Components/Icons/16x16/Trash.tsx +3 -3
- package/src/Components/Icons/16x16/Trigger.tsx +3 -3
- package/src/Components/Icons/16x16/Twitter.tsx +3 -3
- package/src/Components/Icons/16x16/Upload.tsx +1 -1
- package/src/Components/Icons/16x16/ValidateShield.tsx +3 -3
- package/src/Components/Icons/16x16/Video.tsx +5 -5
- package/src/Components/Icons/16x16/Warning.tsx +3 -3
- package/src/Components/Icons/16x16/WarningColored.tsx +2 -2
- package/src/Components/Icons/16x16/WebUi.tsx +5 -5
- package/src/Components/Icons/16x16/Webhooks.tsx +4 -4
- package/src/Components/Icons/16x16/Webinar.tsx +3 -3
- package/src/Components/Icons/16x16/Window.tsx +4 -4
- package/src/Components/Icons/16x16/Workflow.tsx +3 -3
- package/src/Components/Icons/16x16/WorkflowFlow.tsx +3 -3
- package/src/Components/Icons/16x16/Wow.tsx +3 -3
- package/src/Components/Icons/16x16/WrappedLines.tsx +3 -3
- package/src/Components/Icons/16x16/Xamarin.tsx +4 -4
- package/src/Components/Icons/24x24/Addons.tsx +2 -2
- package/src/Components/Icons/24x24/AddonsTuorqouise.tsx +6 -6
- package/src/Components/Icons/24x24/AddonsViolet.tsx +6 -6
- package/src/Components/Icons/24x24/AddonsWhite.tsx +6 -6
- package/src/Components/Icons/24x24/Agent.tsx +3 -3
- package/src/Components/Icons/24x24/Anchor.tsx +2 -2
- package/src/Components/Icons/24x24/Android.tsx +2 -2
- package/src/Components/Icons/24x24/App.tsx +2 -2
- package/src/Components/Icons/24x24/Apple.tsx +2 -2
- package/src/Components/Icons/24x24/AppleFill.tsx +1 -1
- package/src/Components/Icons/24x24/ArrowDown.tsx +2 -2
- package/src/Components/Icons/24x24/ArrowLeft.tsx +2 -2
- package/src/Components/Icons/24x24/ArrowMoveDown.tsx +1 -1
- package/src/Components/Icons/24x24/ArrowMoveLeft.tsx +2 -2
- package/src/Components/Icons/24x24/ArrowMoveRight.tsx +2 -2
- package/src/Components/Icons/24x24/ArrowMoveUp.tsx +2 -2
- package/src/Components/Icons/24x24/ArrowQuit.tsx +1 -1
- package/src/Components/Icons/24x24/ArrowRight.tsx +2 -2
- package/src/Components/Icons/24x24/ArrowUp.tsx +2 -2
- package/src/Components/Icons/24x24/Badge3rdParty.tsx +2 -2
- package/src/Components/Icons/24x24/BadgeBitrise.tsx +2 -2
- package/src/Components/Icons/24x24/Bazel.tsx +8 -8
- package/src/Components/Icons/24x24/Bell.tsx +2 -2
- package/src/Components/Icons/24x24/Bitbot.tsx +2 -2
- package/src/Components/Icons/24x24/BitbotError.tsx +2 -2
- package/src/Components/Icons/24x24/BitbucketBlue.tsx +3 -3
- package/src/Components/Icons/24x24/BitbucketPlain.tsx +2 -2
- package/src/Components/Icons/24x24/BitbucketShadedWhite.tsx +9 -9
- package/src/Components/Icons/24x24/Book.tsx +2 -2
- package/src/Components/Icons/24x24/BoxWithArrowDown.tsx +2 -2
- package/src/Components/Icons/24x24/BoxWithDot.tsx +2 -2
- package/src/Components/Icons/24x24/Branch.tsx +3 -3
- package/src/Components/Icons/24x24/Bug.tsx +2 -2
- package/src/Components/Icons/24x24/Build.tsx +2 -2
- package/src/Components/Icons/24x24/BuildCache.tsx +2 -2
- package/src/Components/Icons/24x24/BuildCacheSolid.tsx +3 -3
- package/src/Components/Icons/24x24/BuildTest.tsx +2 -2
- package/src/Components/Icons/24x24/BuildTestSolid.tsx +2 -2
- package/src/Components/Icons/24x24/BuildstatusAborted.tsx +3 -3
- package/src/Components/Icons/24x24/BuildstatusAbortedSolid.tsx +2 -2
- package/src/Components/Icons/24x24/BuildstatusFailed.tsx +2 -2
- package/src/Components/Icons/24x24/BuildstatusFailedSolid.tsx +2 -2
- package/src/Components/Icons/24x24/BuildstatusLoading.tsx +3 -3
- package/src/Components/Icons/24x24/BuildstatusLoadingAnimated.tsx +11 -11
- package/src/Components/Icons/24x24/BuildstatusNeverbuilt.tsx +2 -2
- package/src/Components/Icons/24x24/BuildstatusProgressEggplant.tsx +6 -6
- package/src/Components/Icons/24x24/BuildstatusProgressWhite.tsx +3 -3
- package/src/Components/Icons/24x24/BuildstatusSuccessful.tsx +3 -3
- package/src/Components/Icons/24x24/BuildstatusSuccessfulSolid.tsx +2 -2
- package/src/Components/Icons/24x24/Bulletpoint.tsx +2 -2
- package/src/Components/Icons/24x24/Cache.tsx +2 -2
- package/src/Components/Icons/24x24/Calendar.tsx +2 -2
- package/src/Components/Icons/24x24/ChangePlan.tsx +1 -1
- package/src/Components/Icons/24x24/Chat.tsx +2 -2
- package/src/Components/Icons/24x24/ChatMessage.tsx +2 -2
- package/src/Components/Icons/24x24/CheckCircle.tsx +2 -2
- package/src/Components/Icons/24x24/ChevronDown.tsx +2 -2
- package/src/Components/Icons/24x24/ChevronLeft.tsx +2 -2
- package/src/Components/Icons/24x24/ChevronRight.tsx +2 -2
- package/src/Components/Icons/24x24/ChevronUp.tsx +2 -2
- package/src/Components/Icons/24x24/Clock.tsx +2 -2
- package/src/Components/Icons/24x24/CloseSmall.tsx +2 -2
- package/src/Components/Icons/24x24/Code.tsx +1 -1
- package/src/Components/Icons/24x24/CodeSigning.tsx +2 -2
- package/src/Components/Icons/24x24/Coffee.tsx +2 -2
- package/src/Components/Icons/24x24/Commit.tsx +2 -2
- package/src/Components/Icons/24x24/Conference.tsx +2 -2
- package/src/Components/Icons/24x24/ConnectedAccounts.tsx +2 -2
- package/src/Components/Icons/24x24/Cordova.tsx +2 -2
- package/src/Components/Icons/24x24/Cpu.tsx +2 -2
- package/src/Components/Icons/24x24/Creditcard.tsx +2 -2
- package/src/Components/Icons/24x24/Credits.tsx +3 -3
- package/src/Components/Icons/24x24/Cycle.tsx +2 -2
- package/src/Components/Icons/24x24/DeleteNope.tsx +2 -2
- package/src/Components/Icons/24x24/Deployment.tsx +2 -2
- package/src/Components/Icons/24x24/Details.tsx +2 -2
- package/src/Components/Icons/24x24/Doc.tsx +2 -2
- package/src/Components/Icons/24x24/Dollars.tsx +2 -2
- package/src/Components/Icons/24x24/Download.tsx +2 -2
- package/src/Components/Icons/24x24/DropdownArrows.tsx +2 -2
- package/src/Components/Icons/24x24/Dudes.tsx +2 -2
- package/src/Components/Icons/24x24/Duplicate.tsx +2 -2
- package/src/Components/Icons/24x24/Enterprise.tsx +2 -2
- package/src/Components/Icons/24x24/ErrorGeneral.tsx +2 -2
- package/src/Components/Icons/24x24/Expand.tsx +1 -1
- package/src/Components/Icons/24x24/Fastlane.tsx +2 -2
- package/src/Components/Icons/24x24/FileDoc.tsx +2 -2
- package/src/Components/Icons/24x24/FilePdf.tsx +2 -2
- package/src/Components/Icons/24x24/FilePlist.tsx +2 -2
- package/src/Components/Icons/24x24/FileZip.tsx +2 -2
- package/src/Components/Icons/24x24/Filter.tsx +1 -1
- package/src/Components/Icons/24x24/Flag.tsx +2 -2
- package/src/Components/Icons/24x24/Flutter.tsx +1 -1
- package/src/Components/Icons/24x24/Folder.tsx +2 -2
- package/src/Components/Icons/24x24/Fullscreen.tsx +1 -1
- package/src/Components/Icons/24x24/FullscreenExit.tsx +1 -1
- package/src/Components/Icons/24x24/Gauge.tsx +2 -2
- package/src/Components/Icons/24x24/Github.tsx +2 -2
- package/src/Components/Icons/24x24/GitlabColor.tsx +1 -1
- package/src/Components/Icons/24x24/GitlabPlain.tsx +2 -2
- package/src/Components/Icons/24x24/GitlabShadedWhite.tsx +7 -7
- package/src/Components/Icons/24x24/Globe.tsx +2 -2
- package/src/Components/Icons/24x24/Go.tsx +4 -4
- package/src/Components/Icons/24x24/GoogleColor.tsx +6 -6
- package/src/Components/Icons/24x24/Gradle.tsx +3 -3
- package/src/Components/Icons/24x24/Group.tsx +2 -2
- package/src/Components/Icons/24x24/Heart.tsx +2 -2
- package/src/Components/Icons/24x24/HidePassword.tsx +2 -2
- package/src/Components/Icons/24x24/History.tsx +2 -2
- package/src/Components/Icons/24x24/Image.tsx +2 -2
- package/src/Components/Icons/24x24/Info.tsx +2 -2
- package/src/Components/Icons/24x24/Insights.tsx +2 -2
- package/src/Components/Icons/24x24/InsightsSolid.tsx +2 -2
- package/src/Components/Icons/24x24/Interaction.tsx +2 -2
- package/src/Components/Icons/24x24/Invoice.tsx +2 -2
- package/src/Components/Icons/24x24/Ionic.tsx +2 -2
- package/src/Components/Icons/24x24/Japanese.tsx +2 -2
- package/src/Components/Icons/24x24/Key.tsx +2 -2
- package/src/Components/Icons/24x24/Laptop.tsx +2 -2
- package/src/Components/Icons/24x24/LaunchDarkly.tsx +1 -1
- package/src/Components/Icons/24x24/Lightbulb.tsx +2 -2
- package/src/Components/Icons/24x24/Link.tsx +1 -1
- package/src/Components/Icons/24x24/Lock.tsx +2 -2
- package/src/Components/Icons/24x24/LockOpen.tsx +2 -2
- package/src/Components/Icons/24x24/Login.tsx +2 -2
- package/src/Components/Icons/24x24/Logout.tsx +2 -2
- package/src/Components/Icons/24x24/Macos.tsx +2 -2
- package/src/Components/Icons/24x24/Magnifier.tsx +2 -2
- package/src/Components/Icons/24x24/Mail.tsx +2 -2
- package/src/Components/Icons/24x24/MenuGrid.tsx +2 -2
- package/src/Components/Icons/24x24/MenuHamburger.tsx +2 -2
- package/src/Components/Icons/24x24/Message.tsx +2 -2
- package/src/Components/Icons/24x24/MinusClose.tsx +2 -2
- package/src/Components/Icons/24x24/MinusRemove.tsx +2 -2
- package/src/Components/Icons/24x24/Mobile.tsx +2 -2
- package/src/Components/Icons/24x24/MonitorChart.tsx +2 -2
- package/src/Components/Icons/24x24/MoreHorizontal.tsx +2 -2
- package/src/Components/Icons/24x24/MoreVertical.tsx +2 -2
- package/src/Components/Icons/24x24/News.tsx +2 -2
- package/src/Components/Icons/24x24/NoTie.tsx +2 -2
- package/src/Components/Icons/24x24/Nodejs.tsx +2 -2
- package/src/Components/Icons/24x24/Numero.tsx +2 -2
- package/src/Components/Icons/24x24/OpenInBrowser.tsx +2 -2
- package/src/Components/Icons/24x24/Other.tsx +3 -3
- package/src/Components/Icons/24x24/OverflowingLines.tsx +3 -3
- package/src/Components/Icons/24x24/Overview.tsx +2 -2
- package/src/Components/Icons/24x24/Owner.tsx +2 -2
- package/src/Components/Icons/24x24/Pause.tsx +2 -2
- package/src/Components/Icons/24x24/Pencil.tsx +2 -2
- package/src/Components/Icons/24x24/Percent.tsx +2 -2
- package/src/Components/Icons/24x24/Person.tsx +2 -2
- package/src/Components/Icons/24x24/Play.tsx +2 -2
- package/src/Components/Icons/24x24/PlusAdd.tsx +2 -2
- package/src/Components/Icons/24x24/PlusOpen.tsx +2 -2
- package/src/Components/Icons/24x24/Podcast.tsx +2 -2
- package/src/Components/Icons/24x24/Power.tsx +1 -1
- package/src/Components/Icons/24x24/ProgressEggplant.tsx +5 -5
- package/src/Components/Icons/24x24/ProgressViolet.tsx +5 -5
- package/src/Components/Icons/24x24/ProgressWhite.tsx +5 -5
- package/src/Components/Icons/24x24/Pull.tsx +2 -2
- package/src/Components/Icons/24x24/Push.tsx +3 -3
- package/src/Components/Icons/24x24/ReactIcon.tsx +2 -2
- package/src/Components/Icons/24x24/Refresh.tsx +1 -1
- package/src/Components/Icons/24x24/Release.tsx +2 -2
- package/src/Components/Icons/24x24/ReleaseSolid.tsx +2 -2
- package/src/Components/Icons/24x24/Replace.tsx +2 -2
- package/src/Components/Icons/24x24/Request.tsx +1 -1
- package/src/Components/Icons/24x24/Responsiveness.tsx +1 -1
- package/src/Components/Icons/24x24/Save.tsx +2 -2
- package/src/Components/Icons/24x24/Screenshare.tsx +2 -2
- package/src/Components/Icons/24x24/SecurityShield.tsx +2 -2
- package/src/Components/Icons/24x24/Settings.tsx +2 -2
- package/src/Components/Icons/24x24/SettingsSolid.tsx +2 -2
- package/src/Components/Icons/24x24/Ship.tsx +2 -2
- package/src/Components/Icons/24x24/ShowPassword.tsx +2 -2
- package/src/Components/Icons/24x24/Shuffle.tsx +2 -2
- package/src/Components/Icons/24x24/Siren.tsx +1 -1
- package/src/Components/Icons/24x24/Sort.tsx +2 -2
- package/src/Components/Icons/24x24/SortArrows.tsx +2 -2
- package/src/Components/Icons/24x24/Stability.tsx +2 -2
- package/src/Components/Icons/24x24/Stack.tsx +2 -2
- package/src/Components/Icons/24x24/StageCurrent.tsx +2 -2
- package/src/Components/Icons/24x24/StageIncomplete.tsx +2 -2
- package/src/Components/Icons/24x24/Star.tsx +2 -2
- package/src/Components/Icons/24x24/Status.tsx +3 -3
- package/src/Components/Icons/24x24/StepUpgrade.tsx +2 -2
- package/src/Components/Icons/24x24/StepVersionOk.tsx +2 -2
- package/src/Components/Icons/24x24/Steps.tsx +2 -2
- package/src/Components/Icons/24x24/StepsTuorqouise.tsx +6 -6
- package/src/Components/Icons/24x24/StepsViolet.tsx +6 -6
- package/src/Components/Icons/24x24/StepsWhite.tsx +6 -6
- package/src/Components/Icons/24x24/StepstatusSkip.tsx +2 -2
- package/src/Components/Icons/24x24/StepstatusWarning.tsx +2 -2
- package/src/Components/Icons/24x24/Stopwatch.tsx +2 -2
- package/src/Components/Icons/24x24/Support.tsx +2 -2
- package/src/Components/Icons/24x24/Swag.tsx +1 -1
- package/src/Components/Icons/24x24/Tag.tsx +2 -2
- package/src/Components/Icons/24x24/TestFailed.tsx +2 -2
- package/src/Components/Icons/24x24/TestInconclusive.tsx +2 -2
- package/src/Components/Icons/24x24/TestInfo.tsx +2 -2
- package/src/Components/Icons/24x24/TestInprogress.tsx +2 -2
- package/src/Components/Icons/24x24/TestSkipped.tsx +2 -2
- package/src/Components/Icons/24x24/TestSuccess.tsx +2 -2
- package/src/Components/Icons/24x24/TestWarning.tsx +2 -2
- package/src/Components/Icons/24x24/Testing.tsx +2 -2
- package/src/Components/Icons/24x24/Tick.tsx +2 -2
- package/src/Components/Icons/24x24/Time.tsx +2 -2
- package/src/Components/Icons/24x24/Tools.tsx +1 -1
- package/src/Components/Icons/24x24/Trace.tsx +1 -1
- package/src/Components/Icons/24x24/Trash.tsx +2 -2
- package/src/Components/Icons/24x24/Trigger.tsx +2 -2
- package/src/Components/Icons/24x24/Twitter.tsx +2 -2
- package/src/Components/Icons/24x24/Upload.tsx +1 -1
- package/src/Components/Icons/24x24/ValidateShield.tsx +2 -2
- package/src/Components/Icons/24x24/Video.tsx +3 -3
- package/src/Components/Icons/24x24/Warning.tsx +2 -2
- package/src/Components/Icons/24x24/WarningColored.tsx +2 -2
- package/src/Components/Icons/24x24/WebUi.tsx +2 -2
- package/src/Components/Icons/24x24/Webhooks.tsx +1 -1
- package/src/Components/Icons/24x24/Webinar.tsx +2 -2
- package/src/Components/Icons/24x24/Window.tsx +2 -2
- package/src/Components/Icons/24x24/Workflow.tsx +2 -2
- package/src/Components/Icons/24x24/WorkflowFlow.tsx +2 -2
- package/src/Components/Icons/24x24/Wow.tsx +2 -2
- package/src/Components/Icons/24x24/WrappedLines.tsx +3 -3
- package/src/Components/Icons/24x24/Xamarin.tsx +2 -2
- package/src/Components/Image/Image.tsx +1 -1
- package/src/Components/LightBox/LightBox.tsx +3 -3
- package/src/Components/Link/Link.theme.ts +4 -4
- package/src/Components/Link/Link.tsx +1 -1
- package/src/Components/LinkBox/LinkBox.tsx +1 -1
- package/src/Components/LinkOverlay/LinkOverlay.tsx +1 -1
- package/src/Components/List/List.theme.ts +1 -1
- package/src/Components/List/List.tsx +1 -1
- package/src/Components/List/ListItem.tsx +1 -1
- package/src/Components/Menu/Menu.theme.ts +27 -27
- package/src/Components/Menu/MenuButton.tsx +1 -1
- package/src/Components/Menu/MenuItem.tsx +6 -6
- package/src/Components/Menu/MenuList.tsx +1 -1
- package/src/Components/Note/Note.theme.ts +47 -47
- package/src/Components/Note/Note.tsx +3 -3
- package/src/Components/Note/NoteMarkdownContent.tsx +17 -17
- package/src/Components/Notification/Notification.tsx +10 -10
- package/src/Components/NumberInput/NumberInput.theme.ts +14 -14
- package/src/Components/Popover/Popover.theme.ts +3 -3
- package/src/Components/Popover/Popover.tsx +1 -1
- package/src/Components/Popover/PopoverArrow.tsx +1 -1
- package/src/Components/ProgressBitbot/ProgressBitbot.tsx +2 -2
- package/src/Components/ProgressIndicator/ProgressIndicator.theme.ts +24 -24
- package/src/Components/ProgressIndicator/ProgressIndicator.tsx +13 -13
- package/src/Components/ProgressSpinner/ProgressSpinner.tsx +2 -2
- package/src/Components/Provider/Provider.tsx +1 -1
- package/src/Components/Ribbon/Ribbon.tsx +10 -10
- package/src/Components/SearchInput/SearchInput.tsx +2 -2
- package/src/Components/SegmentedControl/SegmentedControl.theme.ts +26 -26
- package/src/Components/SegmentedControl/SegmentedControl.tsx +3 -3
- package/src/Components/SegmentedControl/SegmentedControlItem.tsx +1 -1
- package/src/Components/Select/Select.theme.ts +20 -20
- package/src/Components/Select/Select.tsx +7 -7
- package/src/Components/Sidebar/Sidebar.tsx +6 -6
- package/src/Components/Sidebar/SidebarItem.theme.ts +30 -30
- package/src/Components/Sidebar/SidebarItem.tsx +11 -11
- package/src/Components/Skeleton/Skeleton.theme.ts +9 -9
- package/src/Components/Skeleton/Skeleton.tsx +3 -3
- package/src/Components/Slider/Slider.theme.ts +27 -27
- package/src/Components/Table/CheckableRow.tsx +3 -3
- package/src/Components/Table/SelectableRow.tsx +3 -3
- package/src/Components/Table/Table.theme.ts +63 -61
- package/src/Components/Table/Table.tsx +2 -2
- package/src/Components/Table/TableCaption.tsx +2 -2
- package/src/Components/Table/TableContainer.tsx +1 -1
- package/src/Components/Table/TableIconButton.tsx +5 -5
- package/src/Components/Table/TablePagination.tsx +16 -16
- package/src/Components/Table/Tbody.tsx +1 -1
- package/src/Components/Table/Td.tsx +1 -1
- package/src/Components/Table/Th.tsx +4 -4
- package/src/Components/Table/Thead.tsx +1 -1
- package/src/Components/Table/Tr.tsx +6 -6
- package/src/Components/Tabs/ContainedTab.tsx +1 -1
- package/src/Components/Tabs/Tab.tsx +1 -1
- package/src/Components/Tabs/TabList.tsx +1 -1
- package/src/Components/Tabs/TabPanel.tsx +1 -1
- package/src/Components/Tabs/TabPanels.tsx +1 -1
- package/src/Components/Tabs/Tabs.theme.ts +56 -56
- package/src/Components/Tabs/Tabs.tsx +2 -2
- package/src/Components/Tag/Tag.theme.ts +41 -41
- package/src/Components/Tag/Tag.tsx +2 -2
- package/src/Components/Text/Text.tsx +2 -2
- package/src/Components/Toast/Toast.tsx +4 -4
- package/src/Components/Toggle/Toggle.theme.ts +57 -57
- package/src/Components/Toggle/Toggle.tsx +2 -2
- package/src/Components/Toggletip/Toggletip.theme.ts +2 -2
- package/src/Components/Toggletip/Toggletip.tsx +3 -3
- package/src/Components/Tooltip/Tooltip.theme.ts +2 -2
- package/src/Components/Tooltip/Tooltip.tsx +5 -5
- package/src/Foundations/Breakpoints/Breakpoints.ts +1 -1
- package/src/Foundations/Colors/Colors.tsx +2 -2
- package/src/Foundations/Colors/CommonTokens.tsx +2 -2
- package/src/Foundations/Colors/SystemTokens.tsx +2 -2
- package/src/Foundations/Icons/figmaIcons.ts +239 -239
- package/src/Foundations/Shadows/Shadows.ts +5 -5
- package/src/Foundations/Themes/Alert.theme.ts +12 -12
- package/src/Foundations/Typography/Typography.ts +2 -2
- package/src/Foundations/Zindex/Zindex.ts +5 -5
- package/src/Foundations/docComponents/TokenTable.tsx +1 -1
- package/src/hooks/useResponsive.ts +1 -1
- package/src/theme.ts +54 -54
- package/src/tokens/tokens.ts +4 -4
- package/src/utils/utils.ts +1 -1
|
@@ -1,73 +1,62 @@
|
|
|
1
1
|
const DropdownTheme = {
|
|
2
2
|
baseStyle: ({ disabled }: { disabled?: boolean }) => ({
|
|
3
3
|
field: {
|
|
4
|
+
_active: disabled
|
|
5
|
+
? undefined
|
|
6
|
+
: {
|
|
7
|
+
bgGradient: 'linear(to-b, neutral.90, neutral.90)',
|
|
8
|
+
borderColor: 'neutral.80',
|
|
9
|
+
},
|
|
10
|
+
_hover: disabled
|
|
11
|
+
? undefined
|
|
12
|
+
: {
|
|
13
|
+
bgGradient: 'linear(to-b, neutral.93, neutral.93)',
|
|
14
|
+
},
|
|
15
|
+
alignItems: 'center',
|
|
4
16
|
bgGradient: 'linear(to-b, neutral.100, neutral.93)',
|
|
5
17
|
border: '0.0625rem solid',
|
|
6
18
|
borderColor: 'neutral.90',
|
|
7
19
|
borderRadius: '4',
|
|
8
20
|
color: disabled ? 'neutral.70' : 'purple.10',
|
|
9
|
-
position: 'relative',
|
|
10
21
|
display: 'flex',
|
|
11
|
-
|
|
22
|
+
pointerEvents: disabled && 'none',
|
|
23
|
+
position: 'relative',
|
|
12
24
|
textAlign: 'start',
|
|
13
25
|
width: '100%',
|
|
14
|
-
_hover: disabled
|
|
15
|
-
? undefined
|
|
16
|
-
: {
|
|
17
|
-
bgGradient: 'linear(to-b, neutral.93, neutral.93)',
|
|
18
|
-
},
|
|
19
|
-
_active: disabled
|
|
20
|
-
? undefined
|
|
21
|
-
: {
|
|
22
|
-
bgGradient: 'linear(to-b, neutral.90, neutral.90)',
|
|
23
|
-
borderColor: 'neutral.80',
|
|
24
|
-
},
|
|
25
|
-
pointerEvents: disabled && 'none',
|
|
26
|
-
},
|
|
27
|
-
icon: {
|
|
28
|
-
opacity: disabled && '0.2',
|
|
29
|
-
},
|
|
30
|
-
search: {
|
|
31
|
-
mx: 16,
|
|
32
|
-
marginTop: '12',
|
|
33
|
-
width: 'auto',
|
|
34
26
|
},
|
|
35
27
|
group: {
|
|
28
|
+
alignItems: 'center',
|
|
36
29
|
display: 'flex',
|
|
37
30
|
flexDir: 'row',
|
|
38
31
|
gap: '12',
|
|
39
|
-
paddingY: '8',
|
|
40
32
|
paddingX: '16',
|
|
41
|
-
|
|
33
|
+
paddingY: '8',
|
|
34
|
+
},
|
|
35
|
+
icon: {
|
|
36
|
+
opacity: disabled && '0.2',
|
|
42
37
|
},
|
|
43
38
|
item: {
|
|
44
|
-
cursor: 'pointer',
|
|
45
|
-
userSelect: 'none',
|
|
46
|
-
wordBreak: 'break-word',
|
|
47
|
-
color: 'purple.10',
|
|
48
|
-
paddingY: '8',
|
|
49
|
-
paddingX: '16',
|
|
50
|
-
textAlign: 'start',
|
|
51
|
-
w: '100%',
|
|
52
|
-
'&.bitkit-select__option-hover': {
|
|
53
|
-
backgroundColor: 'neutral.95',
|
|
54
|
-
},
|
|
55
39
|
'&.bitkit-select__option-active': {
|
|
56
|
-
backgroundColor: 'purple.95',
|
|
57
40
|
'&.bitkit-select__option-hover': {
|
|
58
41
|
backgroundColor: 'purple.93',
|
|
59
42
|
},
|
|
43
|
+
backgroundColor: 'purple.95',
|
|
44
|
+
},
|
|
45
|
+
'&.bitkit-select__option-hover': {
|
|
46
|
+
backgroundColor: 'neutral.95',
|
|
60
47
|
},
|
|
61
48
|
_disabled: {
|
|
62
49
|
color: 'neutral.70',
|
|
63
50
|
pointerEvents: 'none',
|
|
64
51
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
color: 'purple.10',
|
|
53
|
+
cursor: 'pointer',
|
|
54
|
+
paddingX: '16',
|
|
55
|
+
paddingY: '8',
|
|
56
|
+
textAlign: 'start',
|
|
57
|
+
userSelect: 'none',
|
|
58
|
+
w: '100%',
|
|
59
|
+
wordBreak: 'break-word',
|
|
71
60
|
},
|
|
72
61
|
list: {
|
|
73
62
|
backgroundColor: 'neutral.100',
|
|
@@ -75,31 +64,42 @@ const DropdownTheme = {
|
|
|
75
64
|
borderColor: 'neutral.93',
|
|
76
65
|
borderRadius: '4',
|
|
77
66
|
boxShadow: 'large',
|
|
78
|
-
zIndex: '1',
|
|
79
67
|
display: 'flex',
|
|
80
|
-
|
|
68
|
+
flexDir: 'column',
|
|
69
|
+
flexShrink: 1,
|
|
81
70
|
maxH: 'max(min(var(--dropdown-floating-max, 16rem), var(--floating-available-height)), var(--dropdown-floating-min, 10rem))',
|
|
71
|
+
minH: 0,
|
|
72
|
+
zIndex: '1',
|
|
73
|
+
},
|
|
74
|
+
options: {
|
|
82
75
|
flexShrink: 1,
|
|
83
|
-
|
|
76
|
+
overflowY: 'auto',
|
|
77
|
+
paddingY: '12',
|
|
78
|
+
position: 'relative',
|
|
79
|
+
},
|
|
80
|
+
search: {
|
|
81
|
+
marginTop: '12',
|
|
82
|
+
mx: 16,
|
|
83
|
+
width: 'auto',
|
|
84
84
|
},
|
|
85
85
|
}),
|
|
86
86
|
sizes: {
|
|
87
|
-
small: {
|
|
88
|
-
field: {
|
|
89
|
-
fontSize: '2',
|
|
90
|
-
height: '32',
|
|
91
|
-
paddingLeft: '12',
|
|
92
|
-
paddingRight: '12',
|
|
93
|
-
gap: '0.375rem',
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
87
|
medium: {
|
|
97
88
|
field: {
|
|
98
89
|
fontSize: '3',
|
|
90
|
+
gap: '0.625rem',
|
|
99
91
|
height: '48',
|
|
100
92
|
paddingLeft: '16',
|
|
101
93
|
paddingRight: '16',
|
|
102
|
-
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
small: {
|
|
97
|
+
field: {
|
|
98
|
+
fontSize: '2',
|
|
99
|
+
gap: '0.375rem',
|
|
100
|
+
height: '32',
|
|
101
|
+
paddingLeft: '12',
|
|
102
|
+
paddingRight: '12',
|
|
103
103
|
},
|
|
104
104
|
},
|
|
105
105
|
},
|
|
@@ -4,10 +4,10 @@ import { FloatingFocusManager, UseFloatingProps } from '@floating-ui/react-dom-i
|
|
|
4
4
|
import { TypeIconName } from '../Icon/Icon';
|
|
5
5
|
import SearchInput from '../SearchInput/SearchInput';
|
|
6
6
|
import { DropdownEventArgs, DropdownProvider, useDropdownContext, useDropdownStyles } from './Dropdown.context';
|
|
7
|
-
import {
|
|
7
|
+
import { DropdownDetailedOption, DropdownGroup, DropdownOption, DropdownOptionProps } from './DropdownOption';
|
|
8
8
|
import DropdownButton from './DropdownButton';
|
|
9
9
|
import useFloatingDropdown from './hooks/useFloatingDropdown';
|
|
10
|
-
import {
|
|
10
|
+
import { NoResultsFound, useSimpleSearch } from './hooks/useSimpleSearch';
|
|
11
11
|
import { isSearchable } from './isNodeMatch';
|
|
12
12
|
|
|
13
13
|
type DropdownSearchCustomProps = {
|
|
@@ -21,9 +21,9 @@ const DropdownSearch = ({
|
|
|
21
21
|
...rest
|
|
22
22
|
}: DropdownSearchProps | (DropdownSearchProps & DropdownSearchCustomProps)) => {
|
|
23
23
|
const { search } = useDropdownStyles();
|
|
24
|
-
const {
|
|
24
|
+
const { searchOnChange, searchOnSubmit, searchRef, searchValue } = useDropdownContext();
|
|
25
25
|
|
|
26
|
-
const {
|
|
26
|
+
const { onChange, value } = 'onChange' in rest ? rest : { onChange: searchOnChange, value: searchValue };
|
|
27
27
|
|
|
28
28
|
const onChangeCB = useCallback(
|
|
29
29
|
(q: string) => {
|
|
@@ -49,14 +49,14 @@ const DropdownSearch = ({
|
|
|
49
49
|
);
|
|
50
50
|
return (
|
|
51
51
|
<SearchInput
|
|
52
|
-
onKeyDown={onKeyDown}
|
|
53
|
-
inputRef={searchRef}
|
|
54
|
-
role="search"
|
|
55
52
|
aria-label={placeholder}
|
|
56
|
-
|
|
57
|
-
value={value}
|
|
53
|
+
inputRef={searchRef}
|
|
58
54
|
onChange={onChangeCB}
|
|
55
|
+
onKeyDown={onKeyDown}
|
|
56
|
+
placeholder={placeholder}
|
|
57
|
+
role="search"
|
|
59
58
|
sx={search}
|
|
59
|
+
value={value}
|
|
60
60
|
/>
|
|
61
61
|
);
|
|
62
62
|
};
|
|
@@ -126,7 +126,7 @@ function findOption<T>(children: ReactNode, value: T): { label: ReactNode; index
|
|
|
126
126
|
if (React.isValidElement(elem)) {
|
|
127
127
|
const optValue = typeof elem.props.value === 'undefined' ? null : elem.props.value;
|
|
128
128
|
if (elem.type === DropdownOption && optValue === value) {
|
|
129
|
-
return {
|
|
129
|
+
return { index: elem.props.index, label: elem.props.children };
|
|
130
130
|
}
|
|
131
131
|
const ch =
|
|
132
132
|
findOption(elem.props.children, value) || (isSearchable(elem.type) && findOption(elem.type(elem.props), value));
|
|
@@ -139,34 +139,34 @@ function findOption<T>(children: ReactNode, value: T): { label: ReactNode; index
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
function useDropdown<T>({
|
|
142
|
+
children,
|
|
143
|
+
defaultValue,
|
|
144
|
+
dropdownWidth = 'match',
|
|
142
145
|
name,
|
|
143
146
|
onChange,
|
|
144
|
-
value,
|
|
145
147
|
optionsRef,
|
|
146
|
-
defaultValue,
|
|
147
|
-
dropdownWidth = 'match',
|
|
148
148
|
placement = 'bottom-start',
|
|
149
|
-
ref,
|
|
150
|
-
children,
|
|
151
149
|
readOnly,
|
|
150
|
+
ref,
|
|
151
|
+
value,
|
|
152
152
|
...rest
|
|
153
153
|
}: DropdownProps<T> & UseDropdownProps) {
|
|
154
154
|
const searchRef = useRef(null);
|
|
155
155
|
const {
|
|
156
|
+
activeIndex,
|
|
156
157
|
close,
|
|
157
|
-
isOpen,
|
|
158
|
-
getReferenceProps,
|
|
159
|
-
floatingProps,
|
|
160
158
|
context: floatingContext,
|
|
161
|
-
|
|
162
|
-
setSelectedIndex,
|
|
163
|
-
setActiveIndex,
|
|
159
|
+
floatingProps,
|
|
164
160
|
getItemProps,
|
|
161
|
+
getReferenceProps,
|
|
162
|
+
isOpen,
|
|
165
163
|
listRef,
|
|
166
|
-
|
|
164
|
+
setActiveIndex,
|
|
165
|
+
setSelectedIndex,
|
|
166
|
+
} = useFloatingDropdown({ dropdownWidth, enabled: !readOnly, optionsRef, placement });
|
|
167
167
|
const [formValue, setFormValue] = useControllableState<T>({
|
|
168
|
-
onChange: (newValue) => onChange?.({ target: { value: newValue, name } }),
|
|
169
168
|
defaultValue,
|
|
169
|
+
onChange: (newValue) => onChange?.({ target: { name, value: newValue } }),
|
|
170
170
|
value,
|
|
171
171
|
});
|
|
172
172
|
|
|
@@ -187,7 +187,7 @@ function useDropdown<T>({
|
|
|
187
187
|
},
|
|
188
188
|
[searchOnSubmit],
|
|
189
189
|
);
|
|
190
|
-
const {
|
|
190
|
+
const { searchOnChange, searchValue, ...searchResults } = useSimpleSearch({
|
|
191
191
|
children: refdChildren,
|
|
192
192
|
onSearch: () => setActiveIndex(null),
|
|
193
193
|
});
|
|
@@ -201,15 +201,15 @@ function useDropdown<T>({
|
|
|
201
201
|
);
|
|
202
202
|
const context = useMemo(
|
|
203
203
|
() => ({
|
|
204
|
+
activeIndex,
|
|
204
205
|
formValue,
|
|
205
|
-
onOptionSelected,
|
|
206
206
|
getItemProps,
|
|
207
|
-
|
|
207
|
+
listRef,
|
|
208
|
+
onOptionSelected,
|
|
208
209
|
searchOnChange,
|
|
209
|
-
searchValue,
|
|
210
|
-
searchRef,
|
|
211
210
|
searchOnSubmit,
|
|
212
|
-
|
|
211
|
+
searchRef,
|
|
212
|
+
searchValue,
|
|
213
213
|
}),
|
|
214
214
|
[
|
|
215
215
|
listRef,
|
|
@@ -235,18 +235,18 @@ function useDropdown<T>({
|
|
|
235
235
|
}
|
|
236
236
|
}, [refdChildren, formValue]);
|
|
237
237
|
return {
|
|
238
|
+
context,
|
|
239
|
+
floatingContext,
|
|
240
|
+
floatingProps,
|
|
241
|
+
formLabel,
|
|
242
|
+
formValue,
|
|
238
243
|
isOpen,
|
|
239
244
|
referenceProps: getReferenceProps({
|
|
240
|
-
ref,
|
|
241
245
|
onKeyDown: referenceKeyDown,
|
|
246
|
+
ref,
|
|
242
247
|
}),
|
|
243
|
-
floatingProps,
|
|
244
|
-
floatingContext,
|
|
245
248
|
searchOnSubmit,
|
|
246
249
|
searchRef,
|
|
247
|
-
context,
|
|
248
|
-
formLabel,
|
|
249
|
-
formValue,
|
|
250
250
|
...searchResults,
|
|
251
251
|
...rest,
|
|
252
252
|
};
|
|
@@ -258,35 +258,35 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
|
|
|
258
258
|
dropdownMaxHeight,
|
|
259
259
|
dropdownMinHeight,
|
|
260
260
|
dropdownWidth,
|
|
261
|
-
|
|
261
|
+
formLabel: customFormLabel,
|
|
262
|
+
name,
|
|
262
263
|
onBlur,
|
|
263
264
|
placeholder,
|
|
264
|
-
|
|
265
|
+
readOnly,
|
|
266
|
+
returnFocus = true,
|
|
265
267
|
search,
|
|
266
268
|
size = 'medium',
|
|
267
|
-
formLabel: customFormLabel,
|
|
268
|
-
returnFocus = true,
|
|
269
269
|
...props
|
|
270
270
|
},
|
|
271
271
|
ref,
|
|
272
272
|
) => {
|
|
273
273
|
const optionsRef = useRef(null);
|
|
274
274
|
const {
|
|
275
|
+
children,
|
|
275
276
|
context: dropdownCtx,
|
|
276
277
|
floatingContext,
|
|
277
|
-
isOpen,
|
|
278
|
-
referenceProps,
|
|
279
278
|
floatingProps,
|
|
280
|
-
formValue,
|
|
281
279
|
formLabel,
|
|
280
|
+
formValue,
|
|
281
|
+
isOpen,
|
|
282
|
+
referenceProps,
|
|
282
283
|
searchRef,
|
|
283
|
-
children,
|
|
284
284
|
...rest
|
|
285
285
|
} = useDropdown({
|
|
286
|
+
dropdownWidth,
|
|
286
287
|
name,
|
|
287
|
-
readOnly,
|
|
288
288
|
optionsRef,
|
|
289
|
-
|
|
289
|
+
readOnly,
|
|
290
290
|
ref,
|
|
291
291
|
...props,
|
|
292
292
|
});
|
|
@@ -297,7 +297,7 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
|
|
|
297
297
|
return;
|
|
298
298
|
}
|
|
299
299
|
if (!isOpen) {
|
|
300
|
-
onBlur({ target: { value: formValue
|
|
300
|
+
onBlur({ target: { name, value: formValue } });
|
|
301
301
|
}
|
|
302
302
|
};
|
|
303
303
|
const listStyles = useMemo(
|
|
@@ -311,22 +311,22 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
|
|
|
311
311
|
const searchElement = search === false ? null : search || <DropdownSearch />;
|
|
312
312
|
return (
|
|
313
313
|
<>
|
|
314
|
-
{name && formValue && <input type="hidden"
|
|
314
|
+
{name && formValue && <input name={name} type="hidden" value={formValue} />}
|
|
315
315
|
<DropdownProvider context={dropdownCtx} styles={dropdownStyles}>
|
|
316
316
|
<DropdownButton
|
|
317
317
|
{...referenceProps}
|
|
318
318
|
{...props}
|
|
319
|
-
placeholder={placeholder}
|
|
320
|
-
size={size}
|
|
321
|
-
formLabel={customFormLabel ?? formLabel}
|
|
322
319
|
blurHandler={blurHandler}
|
|
320
|
+
formLabel={customFormLabel ?? formLabel}
|
|
321
|
+
placeholder={placeholder}
|
|
323
322
|
readOnly={readOnly}
|
|
323
|
+
size={size}
|
|
324
324
|
/>
|
|
325
325
|
{isOpen && (
|
|
326
|
-
<FloatingFocusManager
|
|
326
|
+
<FloatingFocusManager context={floatingContext} initialFocus={searchRef} returnFocus={returnFocus}>
|
|
327
327
|
<chakra.div {...floatingProps} sx={listStyles}>
|
|
328
328
|
{searchElement}
|
|
329
|
-
<chakra.div
|
|
329
|
+
<chakra.div ref={optionsRef} __css={dropdownStyles.options} tabIndex={-1}>
|
|
330
330
|
{children}
|
|
331
331
|
</chakra.div>
|
|
332
332
|
</chakra.div>
|
|
@@ -13,16 +13,16 @@ interface DropdownButtonProps extends ChakraProps {
|
|
|
13
13
|
iconName?: TypeIconName;
|
|
14
14
|
}
|
|
15
15
|
const DropdownButton = forwardRef<HTMLButtonElement, DropdownButtonProps>(
|
|
16
|
-
({
|
|
16
|
+
({ blurHandler, children, formLabel, iconName, placeholder, readOnly, size, ...rest }, ref) => {
|
|
17
17
|
const { field, icon } = useDropdownStyles();
|
|
18
18
|
const iconSize = size === 'medium' ? '24' : '16';
|
|
19
19
|
return (
|
|
20
|
-
<chakra.button
|
|
21
|
-
{iconName && <Icon aria-hidden="true"
|
|
22
|
-
<chakra.span overflow="hidden" textOverflow="ellipsis" whiteSpace="nowrap"
|
|
20
|
+
<chakra.button ref={ref} __css={field} aria-readonly={readOnly} onBlur={blurHandler} type="button" {...rest}>
|
|
21
|
+
{iconName && <Icon __css={icon} aria-hidden="true" name={iconName} size={iconSize} />}
|
|
22
|
+
<chakra.span flexGrow={1} overflow="hidden" textOverflow="ellipsis" whiteSpace="nowrap">
|
|
23
23
|
{formLabel || placeholder}
|
|
24
24
|
</chakra.span>
|
|
25
|
-
<Icon aria-hidden="true"
|
|
25
|
+
<Icon __css={icon} aria-hidden="true" name="DropdownArrows" size={iconSize} />
|
|
26
26
|
</chakra.button>
|
|
27
27
|
);
|
|
28
28
|
},
|
|
@@ -13,10 +13,10 @@ export type DropdownOptionProps<T> = {
|
|
|
13
13
|
isDisabled?: boolean;
|
|
14
14
|
};
|
|
15
15
|
const DropdownOption = <T = string,>({
|
|
16
|
-
value = null,
|
|
17
16
|
children,
|
|
18
|
-
onClick,
|
|
19
17
|
isDisabled,
|
|
18
|
+
onClick,
|
|
19
|
+
value = null,
|
|
20
20
|
...rest
|
|
21
21
|
}: DropdownOptionProps<T>) => {
|
|
22
22
|
const { item } = useDropdownStyles();
|
|
@@ -24,26 +24,26 @@ const DropdownOption = <T = string,>({
|
|
|
24
24
|
const { index } = rest as { index?: number };
|
|
25
25
|
return (
|
|
26
26
|
<chakra.div
|
|
27
|
-
role="option"
|
|
28
|
-
id={useId()}
|
|
29
27
|
ref={(node) => {
|
|
30
28
|
if (ctx.listRef.current) {
|
|
31
29
|
ctx.listRef.current[index!] = node;
|
|
32
30
|
}
|
|
33
31
|
}}
|
|
34
32
|
aria-disabled={isDisabled || undefined}
|
|
33
|
+
id={useId()}
|
|
34
|
+
role="option"
|
|
35
35
|
{...rest}
|
|
36
|
+
__css={item}
|
|
36
37
|
className={cx(
|
|
37
38
|
value === ctx.formValue && 'bitkit-select__option-active',
|
|
38
39
|
index === ctx.activeIndex && 'bitkit-select__option-hover',
|
|
39
40
|
)}
|
|
40
|
-
__css={item}
|
|
41
41
|
{...ctx.getItemProps({
|
|
42
42
|
onClick(event) {
|
|
43
43
|
onClick?.(event);
|
|
44
44
|
|
|
45
45
|
if (!event.defaultPrevented) {
|
|
46
|
-
ctx.onOptionSelected({
|
|
46
|
+
ctx.onOptionSelected({ index, label: children, value });
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
})}
|
|
@@ -65,9 +65,9 @@ const DropdownGroup = ({
|
|
|
65
65
|
const { group } = useDropdownStyles();
|
|
66
66
|
const textId = useId();
|
|
67
67
|
return (
|
|
68
|
-
<div
|
|
68
|
+
<div aria-labelledby={textId} role="group">
|
|
69
69
|
<chakra.div __css={group}>
|
|
70
|
-
<Text
|
|
70
|
+
<Text color="neutral.60" fontWeight="bold" id={textId} size="1" {...labelProps}>
|
|
71
71
|
{label}
|
|
72
72
|
</Text>
|
|
73
73
|
<Divider color="neutral.93" />
|
|
@@ -79,8 +79,8 @@ const DropdownGroup = ({
|
|
|
79
79
|
|
|
80
80
|
const DropdownDetailedOption = ({
|
|
81
81
|
icon,
|
|
82
|
-
title,
|
|
83
82
|
subtitle,
|
|
83
|
+
title,
|
|
84
84
|
value,
|
|
85
85
|
...rest
|
|
86
86
|
}: {
|
|
@@ -91,13 +91,13 @@ const DropdownDetailedOption = ({
|
|
|
91
91
|
}) => {
|
|
92
92
|
return (
|
|
93
93
|
<DropdownOption value={value} {...rest} aria-label={title}>
|
|
94
|
-
<chakra.div alignItems="center"
|
|
94
|
+
<chakra.div alignItems="center" display="flex" flexDir="row" gap="12">
|
|
95
95
|
{icon}
|
|
96
96
|
<chakra.div>
|
|
97
|
-
<Text
|
|
97
|
+
<Text color="purple.10" size="3">
|
|
98
98
|
{title}
|
|
99
99
|
</Text>
|
|
100
|
-
<Text
|
|
100
|
+
<Text color="neutral.60" size="2">
|
|
101
101
|
{subtitle}
|
|
102
102
|
</Text>
|
|
103
103
|
</chakra.div>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useLayoutEffect, useRef } from 'react';
|
|
2
2
|
|
|
3
3
|
const useAutoScroll = ({
|
|
4
|
-
optionsRef,
|
|
5
|
-
listRef,
|
|
6
4
|
activeIndex,
|
|
7
|
-
selectedIndex,
|
|
8
5
|
keyboardControlled,
|
|
6
|
+
listRef,
|
|
7
|
+
optionsRef,
|
|
8
|
+
selectedIndex,
|
|
9
9
|
}: {
|
|
10
10
|
optionsRef: React.RefObject<HTMLDivElement>;
|
|
11
11
|
listRef: React.MutableRefObject<HTMLElement[]>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { KeyboardEvent, RefObject, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
autoUpdate,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
flip,
|
|
5
|
+
MiddlewareArguments,
|
|
6
6
|
size,
|
|
7
7
|
useClick,
|
|
8
|
-
useListNavigation,
|
|
9
|
-
useRole,
|
|
10
8
|
useDismiss,
|
|
11
|
-
|
|
9
|
+
useFloating,
|
|
12
10
|
UseFloatingProps,
|
|
13
|
-
|
|
11
|
+
useInteractions,
|
|
12
|
+
useListNavigation,
|
|
13
|
+
useRole,
|
|
14
14
|
} from '@floating-ui/react-dom-interactions';
|
|
15
15
|
import { ChakraProps } from '@chakra-ui/react';
|
|
16
16
|
import { mergeRefs } from '@chakra-ui/react-utils';
|
|
@@ -21,9 +21,9 @@ type ApplyFnArgs = MiddlewareArguments & {
|
|
|
21
21
|
availableHeight: number;
|
|
22
22
|
};
|
|
23
23
|
const useFloatingDropdown = ({
|
|
24
|
+
dropdownWidth,
|
|
24
25
|
enabled,
|
|
25
26
|
optionsRef,
|
|
26
|
-
dropdownWidth,
|
|
27
27
|
placement,
|
|
28
28
|
}: {
|
|
29
29
|
enabled: boolean;
|
|
@@ -42,34 +42,28 @@ const useFloatingDropdown = ({
|
|
|
42
42
|
|
|
43
43
|
const widthRef = useRef(dropdownWidth);
|
|
44
44
|
widthRef.current = dropdownWidth;
|
|
45
|
-
const { context,
|
|
46
|
-
open: enabled && isOpen,
|
|
47
|
-
onOpenChange: setOpen,
|
|
48
|
-
placement,
|
|
49
|
-
whileElementsMounted(aRef, aFloat, update) {
|
|
50
|
-
return autoUpdate(aRef, aFloat, update, { elementResize: false });
|
|
51
|
-
},
|
|
45
|
+
const { context, floating, reference, strategy, x, y } = useFloating<Element>({
|
|
52
46
|
middleware: [
|
|
53
47
|
size({
|
|
54
|
-
|
|
55
|
-
apply: ({ elements, availableHeight, rects }: ApplyFnArgs) => {
|
|
48
|
+
apply: ({ availableHeight, elements, rects }: ApplyFnArgs) => {
|
|
56
49
|
Object.assign(elements.floating.style, {
|
|
57
50
|
width: widthRef.current === 'match' ? `${rects.reference.width}px` : widthRef.current,
|
|
58
51
|
});
|
|
59
52
|
elements.floating.style.setProperty('--floating-available-height', `${availableHeight}px`);
|
|
60
53
|
},
|
|
54
|
+
padding: 5,
|
|
61
55
|
}),
|
|
62
56
|
flip(),
|
|
63
57
|
],
|
|
58
|
+
onOpenChange: setOpen,
|
|
59
|
+
open: enabled && isOpen,
|
|
60
|
+
placement,
|
|
61
|
+
whileElementsMounted(aRef, aFloat, update) {
|
|
62
|
+
return autoUpdate(aRef, aFloat, update, { elementResize: false });
|
|
63
|
+
},
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
const keyboardControlledHandlers = {
|
|
67
|
-
onPointerEnter() {
|
|
68
|
-
setKeyboardControlled(false);
|
|
69
|
-
},
|
|
70
|
-
onPointerMove() {
|
|
71
|
-
setKeyboardControlled(false);
|
|
72
|
-
},
|
|
73
67
|
onKeyDown(ev: KeyboardEvent) {
|
|
74
68
|
if (ev.key === 'Escape') {
|
|
75
69
|
ev.stopPropagation();
|
|
@@ -77,50 +71,56 @@ const useFloatingDropdown = ({
|
|
|
77
71
|
}
|
|
78
72
|
setKeyboardControlled(true);
|
|
79
73
|
},
|
|
74
|
+
onPointerEnter() {
|
|
75
|
+
setKeyboardControlled(false);
|
|
76
|
+
},
|
|
77
|
+
onPointerMove() {
|
|
78
|
+
setKeyboardControlled(false);
|
|
79
|
+
},
|
|
80
80
|
};
|
|
81
|
-
const {
|
|
81
|
+
const { getFloatingProps, getItemProps, getReferenceProps } = useInteractions([
|
|
82
82
|
useClick(context, { enabled }),
|
|
83
83
|
useRole(context, { role: 'listbox' }),
|
|
84
84
|
useDismiss(context),
|
|
85
85
|
useListNavigation(context, {
|
|
86
|
+
activeIndex,
|
|
86
87
|
enabled,
|
|
87
88
|
listRef,
|
|
88
|
-
activeIndex,
|
|
89
|
-
selectedIndex,
|
|
90
|
-
virtual: true,
|
|
91
89
|
loop: true,
|
|
92
90
|
onNavigate: setActiveIndex,
|
|
91
|
+
selectedIndex,
|
|
92
|
+
virtual: true,
|
|
93
93
|
}),
|
|
94
94
|
{
|
|
95
|
-
reference: { onKeyDown: keyboardControlledHandlers.onKeyDown },
|
|
96
95
|
floating: keyboardControlledHandlers,
|
|
96
|
+
reference: { onKeyDown: keyboardControlledHandlers.onKeyDown },
|
|
97
97
|
},
|
|
98
98
|
]);
|
|
99
99
|
useAutoScroll({
|
|
100
|
+
activeIndex,
|
|
101
|
+
keyboardControlled,
|
|
100
102
|
listRef,
|
|
101
103
|
optionsRef,
|
|
102
|
-
activeIndex,
|
|
103
104
|
selectedIndex,
|
|
104
|
-
keyboardControlled,
|
|
105
105
|
});
|
|
106
106
|
|
|
107
107
|
return {
|
|
108
|
-
|
|
108
|
+
activeIndex,
|
|
109
109
|
close: () => setOpen(false),
|
|
110
|
-
|
|
110
|
+
context,
|
|
111
|
+
floatingProps: getFloatingProps({
|
|
112
|
+
ref: floating,
|
|
113
|
+
style: { left: x ?? 0, position: strategy, top: y ?? 0 },
|
|
114
|
+
}),
|
|
111
115
|
getItemProps,
|
|
112
|
-
activeIndex,
|
|
113
|
-
setActiveIndex,
|
|
114
|
-
setSelectedIndex,
|
|
115
116
|
getReferenceProps({ ref, ...props }: React.HTMLProps<Element>) {
|
|
116
117
|
const merged = mergeRefs(ref as any, reference);
|
|
117
118
|
return getReferenceProps({ ...props, ref: merged });
|
|
118
119
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
context,
|
|
120
|
+
isOpen,
|
|
121
|
+
listRef,
|
|
122
|
+
setActiveIndex,
|
|
123
|
+
setSelectedIndex,
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
|
|
@@ -42,6 +42,6 @@ function useSimpleSearch({ children, onSearch }: { children?: ReactNode; onSearc
|
|
|
42
42
|
return results.length ? results : <NoResultsFound>No results found for `{searchValue}`</NoResultsFound>;
|
|
43
43
|
}, [children, searchValue]);
|
|
44
44
|
|
|
45
|
-
return { children: options,
|
|
45
|
+
return { children: options, searchOnChange, searchValue };
|
|
46
46
|
}
|
|
47
47
|
export { useSimpleSearch, NoResultsFound };
|