@ohif/ui-next 3.14.0-beta.12 → 3.14.0-beta.121
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/ohif-ui-next.css +6 -6
- package/dist/ohif-ui-next.umd.js +4 -1838
- package/package.json +31 -14
- package/src/__mocks__/fileMock.js +7 -0
- package/src/assets/fonts.css +50 -0
- package/src/assets/styles.css +55 -0
- package/src/assets/woff2/latin.woff2 +0 -0
- package/src/components/Accordion/Accordion.tsx +70 -0
- package/src/components/Accordion/index.ts +3 -0
- package/src/components/AllInOneMenu/BackItem.tsx +32 -0
- package/src/components/AllInOneMenu/DividerItem.tsx +11 -0
- package/src/components/AllInOneMenu/HeaderItem.tsx +15 -0
- package/src/components/AllInOneMenu/IconMenu.tsx +83 -0
- package/src/components/AllInOneMenu/Item.tsx +51 -0
- package/src/components/AllInOneMenu/ItemPanel.tsx +38 -0
- package/src/components/AllInOneMenu/Menu.tsx +231 -0
- package/src/components/AllInOneMenu/PanelSelector.tsx +32 -0
- package/src/components/AllInOneMenu/SubMenu.tsx +36 -0
- package/src/components/AllInOneMenu/index.ts +42 -0
- package/src/components/BackgroundColorSelect/BackgroundColorSelect.tsx +38 -0
- package/src/components/BackgroundColorSelect/index.tsx +1 -0
- package/src/components/Badge/Badge.tsx +38 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Button/Button.tsx +65 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Calendar/Calendar.tsx +258 -0
- package/src/components/Calendar/index.tsx +3 -0
- package/src/components/Card/Card.tsx +83 -0
- package/src/components/Card/index.ts +2 -0
- package/src/components/Checkbox/Checkbox.tsx +27 -0
- package/src/components/Checkbox/index.tsx +3 -0
- package/src/components/CinePlayer/CinePlayer.tsx +187 -0
- package/src/components/CinePlayer/index.ts +5 -0
- package/src/components/Clipboard/Clipboard.tsx +58 -0
- package/src/components/Clipboard/index.tsx +3 -0
- package/src/components/ColorCircle.tsx +12 -0
- package/src/components/Combobox/Combobox.tsx +66 -0
- package/src/components/Combobox/index.ts +3 -0
- package/src/components/Command/Command.tsx +149 -0
- package/src/components/Command/index.ts +23 -0
- package/src/components/ContextMenu/ContextMenu.tsx +202 -0
- package/src/components/ContextMenu/index.ts +35 -0
- package/src/components/ContextMenuViewport/ContextMenuViewport.tsx +47 -0
- package/src/components/ContextMenuViewport/index.ts +1 -0
- package/src/components/DataRow/DataRow.tsx +532 -0
- package/src/components/DataRow/index.ts +1 -0
- package/src/components/DataRow/types.ts +31 -0
- package/src/components/DataTable/ActionOverlayCell.tsx +153 -0
- package/src/components/DataTable/ColumnHeader.tsx +70 -0
- package/src/components/DataTable/DataTable.tsx +532 -0
- package/src/components/DataTable/FilterRow.tsx +52 -0
- package/src/components/DataTable/Pagination.tsx +78 -0
- package/src/components/DataTable/Title.tsx +5 -0
- package/src/components/DataTable/Toolbar.tsx +5 -0
- package/src/components/DataTable/ViewOptions.tsx +86 -0
- package/src/components/DataTable/context.tsx +21 -0
- package/src/components/DataTable/index.ts +5 -0
- package/src/components/DataTable/types.ts +27 -0
- package/src/components/DataTable/useResponsiveColumns.tsx +346 -0
- package/src/components/DateRange/DateRange.tsx +163 -0
- package/src/components/DateRange/index.ts +3 -0
- package/src/components/Dialog/Dialog.tsx +201 -0
- package/src/components/Dialog/index.ts +25 -0
- package/src/components/Dialog/useDraggable.ts +108 -0
- package/src/components/DisplaySetMessageListTooltip/DisplaySetMessageListTooltip.tsx +64 -0
- package/src/components/DisplaySetMessageListTooltip/index.ts +3 -0
- package/src/components/DoubleSlider/DoubleSlider.test.ts +232 -0
- package/src/components/DoubleSlider/DoubleSlider.tsx +211 -0
- package/src/components/DoubleSlider/index.tsx +3 -0
- package/src/components/DropdownMenu/DropdownMenu.tsx +213 -0
- package/src/components/DropdownMenu/index.ts +35 -0
- package/src/components/Errorboundary/ErrorBoundary.tsx +345 -0
- package/src/components/Errorboundary/index.tsx +3 -0
- package/src/components/FooterAction/FooterAction.tsx +115 -0
- package/src/components/FooterAction/index.tsx +3 -0
- package/src/components/Header/Header.tsx +140 -0
- package/src/components/Header/index.js +2 -0
- package/src/components/HoverCard/HoverCard.tsx +30 -0
- package/src/components/HoverCard/index.ts +1 -0
- package/src/components/Icons/Icons.tsx +852 -0
- package/src/components/Icons/Sources/ActionNewDialog.tsx +64 -0
- package/src/components/Icons/Sources/Actions.tsx +47 -0
- package/src/components/Icons/Sources/Add.tsx +51 -0
- package/src/components/Icons/Sources/Alert.tsx +32 -0
- package/src/components/Icons/Sources/AlertOutline.tsx +30 -0
- package/src/components/Icons/Sources/ArrowLeftBold.tsx +49 -0
- package/src/components/Icons/Sources/ArrowRight.tsx +25 -0
- package/src/components/Icons/Sources/Cancel.tsx +37 -0
- package/src/components/Icons/Sources/CheckBoxChecked.tsx +39 -0
- package/src/components/Icons/Sources/CheckBoxUnChecked.tsx +25 -0
- package/src/components/Icons/Sources/Checked.tsx +23 -0
- package/src/components/Icons/Sources/ChevronClosed.tsx +40 -0
- package/src/components/Icons/Sources/ChevronLeft.tsx +28 -0
- package/src/components/Icons/Sources/ChevronOpen.tsx +38 -0
- package/src/components/Icons/Sources/Clear.tsx +34 -0
- package/src/components/Icons/Sources/Clipboard.tsx +15 -0
- package/src/components/Icons/Sources/Close.tsx +28 -0
- package/src/components/Icons/Sources/CloudSettings.tsx +34 -0
- package/src/components/Icons/Sources/Code.tsx +7 -0
- package/src/components/Icons/Sources/ColorChange.tsx +100 -0
- package/src/components/Icons/Sources/ContentNext.tsx +35 -0
- package/src/components/Icons/Sources/ContentPrev.tsx +35 -0
- package/src/components/Icons/Sources/Controls.tsx +99 -0
- package/src/components/Icons/Sources/Copy.tsx +44 -0
- package/src/components/Icons/Sources/Database.tsx +33 -0
- package/src/components/Icons/Sources/Delete.tsx +58 -0
- package/src/components/Icons/Sources/DicomTagBrowser.tsx +79 -0
- package/src/components/Icons/Sources/DisplayFillAndOutline.tsx +49 -0
- package/src/components/Icons/Sources/DisplayFillOnly.tsx +40 -0
- package/src/components/Icons/Sources/DisplayOutlineOnly.tsx +40 -0
- package/src/components/Icons/Sources/Download.tsx +75 -0
- package/src/components/Icons/Sources/Export.tsx +53 -0
- package/src/components/Icons/Sources/ExternalLink.tsx +26 -0
- package/src/components/Icons/Sources/EyeHidden.tsx +32 -0
- package/src/components/Icons/Sources/EyeVisible.tsx +28 -0
- package/src/components/Icons/Sources/FeedbackComplete.tsx +35 -0
- package/src/components/Icons/Sources/GearSettings.tsx +59 -0
- package/src/components/Icons/Sources/GroupLayers.tsx +33 -0
- package/src/components/Icons/Sources/Helpers.tsx +398 -0
- package/src/components/Icons/Sources/Hide.tsx +45 -0
- package/src/components/Icons/Sources/IconColorLUT.tsx +103 -0
- package/src/components/Icons/Sources/IconMPR.tsx +55 -0
- package/src/components/Icons/Sources/IconTransferring.tsx +25 -0
- package/src/components/Icons/Sources/IllustrationNotFound.tsx +102 -0
- package/src/components/Icons/Sources/Info.tsx +55 -0
- package/src/components/Icons/Sources/InfoLink.tsx +23 -0
- package/src/components/Icons/Sources/InfoSeries.tsx +52 -0
- package/src/components/Icons/Sources/InvestigationalUse.tsx +82 -0
- package/src/components/Icons/Sources/JumpToSlice.tsx +69 -0
- package/src/components/Icons/Sources/LaunchArrow.tsx +34 -0
- package/src/components/Icons/Sources/LaunchInfo.tsx +38 -0
- package/src/components/Icons/Sources/LayerBackground.tsx +28 -0
- package/src/components/Icons/Sources/LayerForeground.tsx +34 -0
- package/src/components/Icons/Sources/LayerSegmentation.tsx +20 -0
- package/src/components/Icons/Sources/Layout.tsx +433 -0
- package/src/components/Icons/Sources/Link.tsx +58 -0
- package/src/components/Icons/Sources/ListView.tsx +79 -0
- package/src/components/Icons/Sources/LoadingOHIFMark.tsx +21 -0
- package/src/components/Icons/Sources/LoadingSpinner.tsx +49 -0
- package/src/components/Icons/Sources/Lock.tsx +35 -0
- package/src/components/Icons/Sources/Magnifier.tsx +37 -0
- package/src/components/Icons/Sources/Minus.tsx +40 -0
- package/src/components/Icons/Sources/MissingIcon.tsx +6 -0
- package/src/components/Icons/Sources/More.tsx +53 -0
- package/src/components/Icons/Sources/MultiplePatients.tsx +76 -0
- package/src/components/Icons/Sources/NavigationPanelReveal.tsx +25 -0
- package/src/components/Icons/Sources/NotificationInfo.tsx +33 -0
- package/src/components/Icons/Sources/NotificationWarning.tsx +44 -0
- package/src/components/Icons/Sources/OHIFLogo.tsx +72 -0
- package/src/components/Icons/Sources/OHIFLogoColorDarkBackground.tsx +78 -0
- package/src/components/Icons/Sources/OHIFLogoHorizontal.tsx +139 -0
- package/src/components/Icons/Sources/Opacity.tsx +106 -0
- package/src/components/Icons/Sources/OrientationSwitch.tsx +41 -0
- package/src/components/Icons/Sources/OrientationSwitchA.tsx +41 -0
- package/src/components/Icons/Sources/OrientationSwitchC.tsx +41 -0
- package/src/components/Icons/Sources/OrientationSwitchR.tsx +41 -0
- package/src/components/Icons/Sources/OrientationSwitchS.tsx +41 -0
- package/src/components/Icons/Sources/PanelRight.tsx +29 -0
- package/src/components/Icons/Sources/Patient.tsx +58 -0
- package/src/components/Icons/Sources/PatientStudyList.tsx +62 -0
- package/src/components/Icons/Sources/Pause.tsx +26 -0
- package/src/components/Icons/Sources/Pencil.tsx +16 -0
- package/src/components/Icons/Sources/Pin.tsx +50 -0
- package/src/components/Icons/Sources/PinFill.tsx +51 -0
- package/src/components/Icons/Sources/Play.tsx +25 -0
- package/src/components/Icons/Sources/Plus.tsx +29 -0
- package/src/components/Icons/Sources/PowerOff.tsx +19 -0
- package/src/components/Icons/Sources/Redo.tsx +51 -0
- package/src/components/Icons/Sources/Refresh.tsx +42 -0
- package/src/components/Icons/Sources/Rename.tsx +50 -0
- package/src/components/Icons/Sources/Search.tsx +35 -0
- package/src/components/Icons/Sources/SegActions.tsx +594 -0
- package/src/components/Icons/Sources/Series.tsx +47 -0
- package/src/components/Icons/Sources/SeriesPlaceholder.tsx +40 -0
- package/src/components/Icons/Sources/Settings.tsx +105 -0
- package/src/components/Icons/Sources/SettingsStudyList.tsx +28 -0
- package/src/components/Icons/Sources/Show.tsx +67 -0
- package/src/components/Icons/Sources/SidePanelCloseLeft.tsx +75 -0
- package/src/components/Icons/Sources/SidePanelCloseRight.tsx +74 -0
- package/src/components/Icons/Sources/SocialGithub.tsx +39 -0
- package/src/components/Icons/Sources/Sorting.tsx +39 -0
- package/src/components/Icons/Sources/SortingAscending.tsx +28 -0
- package/src/components/Icons/Sources/SortingDescending.tsx +26 -0
- package/src/components/Icons/Sources/SortingNew.tsx +20 -0
- package/src/components/Icons/Sources/SortingNewAscending.tsx +35 -0
- package/src/components/Icons/Sources/SortingNewDescending.tsx +35 -0
- package/src/components/Icons/Sources/StatusAlert.tsx +36 -0
- package/src/components/Icons/Sources/StatusError.tsx +57 -0
- package/src/components/Icons/Sources/StatusLocked.tsx +35 -0
- package/src/components/Icons/Sources/StatusSuccess.tsx +45 -0
- package/src/components/Icons/Sources/StatusTracking.tsx +37 -0
- package/src/components/Icons/Sources/StatusUntracked.tsx +30 -0
- package/src/components/Icons/Sources/StatusWarning.tsx +58 -0
- package/src/components/Icons/Sources/Tab4D.tsx +54 -0
- package/src/components/Icons/Sources/TabContours.tsx +63 -0
- package/src/components/Icons/Sources/TabLinear.tsx +47 -0
- package/src/components/Icons/Sources/TabPatientInfo.tsx +33 -0
- package/src/components/Icons/Sources/TabRoiThreshold.tsx +38 -0
- package/src/components/Icons/Sources/TabSegmentation.tsx +38 -0
- package/src/components/Icons/Sources/TabStudies.tsx +62 -0
- package/src/components/Icons/Sources/Threshold.tsx +38 -0
- package/src/components/Icons/Sources/ThumbnailView.tsx +67 -0
- package/src/components/Icons/Sources/Tools.tsx +3659 -0
- package/src/components/Icons/Sources/Trash.tsx +17 -0
- package/src/components/Icons/Sources/Undo.tsx +51 -0
- package/src/components/Icons/Sources/Upload.tsx +29 -0
- package/src/components/Icons/Sources/ViewportViews.tsx +45 -0
- package/src/components/Icons/Sources/ViewportWindowLevel.tsx +58 -0
- package/src/components/Icons/Sources/WindowLevelAdvanced.tsx +30 -0
- package/src/components/Icons/index.ts +4 -0
- package/src/components/Icons/types.ts +3 -0
- package/src/components/Input/Input.tsx +25 -0
- package/src/components/Input/index.tsx +3 -0
- package/src/components/InputFilter/InputFilter.tsx +200 -0
- package/src/components/InputFilter/index.ts +2 -0
- package/src/components/InputMultiSelect/InputMultiSelect.tsx +370 -0
- package/src/components/InputMultiSelect/index.ts +1 -0
- package/src/components/InputNumber/InputNumber.tsx +439 -0
- package/src/components/InputNumber/index.ts +3 -0
- package/src/components/InvestigationalUseDialog/InvestigationalUseDialog.tsx +98 -0
- package/src/components/InvestigationalUseDialog/index.ts +3 -0
- package/src/components/Label/Label.tsx +24 -0
- package/src/components/Label/index.tsx +3 -0
- package/src/components/Labelling/LabellingFlow.tsx +92 -0
- package/src/components/Labelling/index.ts +2 -0
- package/src/components/LayoutSelector/LayoutSelector.tsx +345 -0
- package/src/components/LayoutSelector/index.ts +4 -0
- package/src/components/LineChart/LineChart.css +40 -0
- package/src/components/LineChart/LineChart.tsx +101 -0
- package/src/components/LineChart/d3LineChart/chart.ts +365 -0
- package/src/components/LineChart/d3LineChart/events.ts +149 -0
- package/src/components/LineChart/d3LineChart/index.ts +3 -0
- package/src/components/LineChart/d3LineChart/lineChart.ts +272 -0
- package/src/components/LineChart/index.ts +1 -0
- package/src/components/LoadingIndicatorProgress/LoadingIndicatorProgress.tsx +29 -0
- package/src/components/LoadingIndicatorProgress/index.ts +2 -0
- package/src/components/LoadingIndicatorTotalPercent/LoadingIndicatorTotalPercent.tsx +49 -0
- package/src/components/LoadingIndicatorTotalPercent/index.ts +2 -0
- package/src/components/MeasurementTable/MeasurementTable.tsx +144 -0
- package/src/components/MeasurementTable/index.js +3 -0
- package/src/components/Modal/Modal.tsx +44 -0
- package/src/components/NavBar/NavBar.tsx +32 -0
- package/src/components/NavBar/index.js +2 -0
- package/src/components/Numeric/Numeric.test.ts +124 -0
- package/src/components/Numeric/Numeric.tsx +576 -0
- package/src/components/Numeric/index.ts +3 -0
- package/src/components/OHIFDialogs/InputDialog.tsx +287 -0
- package/src/components/OHIFDialogs/PresetDialog.tsx +106 -0
- package/src/components/OHIFDialogs/index.ts +2 -0
- package/src/components/OHIFModals/AboutModal.tsx +114 -0
- package/src/components/OHIFModals/AppearanceModal.tsx +38 -0
- package/src/components/OHIFModals/ImageModal.tsx +251 -0
- package/src/components/OHIFModals/UserPreferencesModal.tsx +229 -0
- package/src/components/OHIFModals/index.ts +4 -0
- package/src/components/OHIFPanels/WindowLevel.tsx +162 -0
- package/src/components/OHIFPanels/WindowLevelHistogram.tsx +237 -0
- package/src/components/OHIFPanels/index.ts +3 -0
- package/src/components/OHIFPanels/types.ts +41 -0
- package/src/components/OHIFToolSettings/RowDoubleRange.tsx +67 -0
- package/src/components/OHIFToolSettings/RowInputRange.tsx +65 -0
- package/src/components/OHIFToolSettings/RowSegmentedControl.tsx +77 -0
- package/src/components/OHIFToolSettings/ToolSettings.tsx +253 -0
- package/src/components/OHIFToolSettings/index.ts +1 -0
- package/src/components/OHIFToolbox/ToolboxUI.tsx +104 -0
- package/src/components/OHIFToolbox/index.ts +1 -0
- package/src/components/Onboarding/Onboarding.css +48 -0
- package/src/components/Onboarding/Onboarding.tsx +58 -0
- package/src/components/Onboarding/index.ts +3 -0
- package/src/components/Onboarding/utilities.ts +91 -0
- package/src/components/PanelSection/PanelSection.tsx +70 -0
- package/src/components/PanelSection/index.ts +2 -0
- package/src/components/Popover/Popover.tsx +35 -0
- package/src/components/Popover/index.ts +3 -0
- package/src/components/ProgressDropdown/ProgressDiscreteBar.tsx +24 -0
- package/src/components/ProgressDropdown/ProgressDropdown.tsx +158 -0
- package/src/components/ProgressDropdown/ProgressItem.tsx +27 -0
- package/src/components/ProgressDropdown/ProgressItemDetail.tsx +89 -0
- package/src/components/ProgressDropdown/index.ts +1 -0
- package/src/components/ProgressDropdown/types.ts +9 -0
- package/src/components/ProgressLoadingBar/ProgressLoadingBar.css +26 -0
- package/src/components/ProgressLoadingBar/ProgressLoadingBar.tsx +32 -0
- package/src/components/ProgressLoadingBar/index.ts +2 -0
- package/src/components/Resizable/Resizable.tsx +43 -0
- package/src/components/Resizable/index.ts +3 -0
- package/src/components/ScrollArea/ScrollArea.tsx +127 -0
- package/src/components/ScrollArea/index.tsx +3 -0
- package/src/components/SegmentationTable/AddSegmentRow.tsx +78 -0
- package/src/components/SegmentationTable/AddSegmentationRow.tsx +56 -0
- package/src/components/SegmentationTable/SegmentStatistics.tsx +104 -0
- package/src/components/SegmentationTable/SegmentationCollapsed.tsx +211 -0
- package/src/components/SegmentationTable/SegmentationExpanded.tsx +173 -0
- package/src/components/SegmentationTable/SegmentationHeader.tsx +58 -0
- package/src/components/SegmentationTable/SegmentationLabel.tsx +27 -0
- package/src/components/SegmentationTable/SegmentationSegments.tsx +206 -0
- package/src/components/SegmentationTable/SegmentationTable.tsx +169 -0
- package/src/components/SegmentationTable/SegmentationTableConfig.tsx +194 -0
- package/src/components/SegmentationTable/contexts/SegmentStatisticsContext.tsx +45 -0
- package/src/components/SegmentationTable/contexts/SegmentationExpandedContext.tsx +45 -0
- package/src/components/SegmentationTable/contexts/SegmentationTableContext.tsx +148 -0
- package/src/components/SegmentationTable/contexts/index.ts +16 -0
- package/src/components/SegmentationTable/index.ts +27 -0
- package/src/components/Select/Select.tsx +167 -0
- package/src/components/Select/index.tsx +40 -0
- package/src/components/Separator/Separator.tsx +32 -0
- package/src/components/Separator/index.ts +3 -0
- package/src/components/Separator/index.tsx +3 -0
- package/src/components/SidePanel/SidePanel.tsx +479 -0
- package/src/components/SidePanel/index.ts +2 -0
- package/src/components/Slider/Slider.tsx +24 -0
- package/src/components/Slider/index.tsx +3 -0
- package/src/components/SmartScrollbar/SmartScrollbar.tsx +349 -0
- package/src/components/SmartScrollbar/SmartScrollbarEndpoints.tsx +82 -0
- package/src/components/SmartScrollbar/SmartScrollbarFill.tsx +54 -0
- package/src/components/SmartScrollbar/SmartScrollbarIndicator.tsx +59 -0
- package/src/components/SmartScrollbar/SmartScrollbarTrack.tsx +104 -0
- package/src/components/SmartScrollbar/defaultSmartScrollbarIndicatorConfig.tsx +48 -0
- package/src/components/SmartScrollbar/index.ts +11 -0
- package/src/components/SmartScrollbar/useByteArray.ts +146 -0
- package/src/components/SmartScrollbar/utils.test.ts +124 -0
- package/src/components/SmartScrollbar/utils.ts +168 -0
- package/src/components/Sonner/Sonner.tsx +31 -0
- package/src/components/Sonner/index.ts +4 -0
- package/src/components/StudyBrowser/StudyBrowser.tsx +89 -0
- package/src/components/StudyBrowser/index.ts +2 -0
- package/src/components/StudyBrowserSort/StudyBrowserSort.tsx +87 -0
- package/src/components/StudyBrowserSort/index.ts +3 -0
- package/src/components/StudyBrowserViewOptions/StudyBrowserViewOptions.tsx +50 -0
- package/src/components/StudyBrowserViewOptions/index.ts +3 -0
- package/src/components/StudyItem/StudyItem.tsx +100 -0
- package/src/components/StudyItem/index.ts +2 -0
- package/src/components/StudyList/columns/defaultColumns.tsx +258 -0
- package/src/components/StudyList/components/ActionCell.tsx +19 -0
- package/src/components/StudyList/components/Layout.tsx +206 -0
- package/src/components/StudyList/components/PreviewContainer.tsx +45 -0
- package/src/components/StudyList/components/PreviewContent.tsx +186 -0
- package/src/components/StudyList/components/PreviewHeader.tsx +5 -0
- package/src/components/StudyList/components/PreviewPatientSummary.tsx +224 -0
- package/src/components/StudyList/components/PreviewSeriesList.tsx +64 -0
- package/src/components/StudyList/components/PreviewToggleButton.tsx +69 -0
- package/src/components/StudyList/components/SettingsPopover.tsx +214 -0
- package/src/components/StudyList/components/Table.tsx +247 -0
- package/src/components/StudyList/components/WorkflowMenu.tsx +72 -0
- package/src/components/StudyList/components/WorkflowsProvider.tsx +169 -0
- package/src/components/StudyList/hooks/useDefaultWorkflow.ts +60 -0
- package/src/components/StudyList/index.ts +52 -0
- package/src/components/StudyList/types/types.ts +42 -0
- package/src/components/StudyList/utils/tokenizeModalities.ts +6 -0
- package/src/components/StudySummary/StudySummary.tsx +27 -0
- package/src/components/StudySummary/index.tsx +3 -0
- package/src/components/Switch/Switch.tsx +28 -0
- package/src/components/Switch/index.tsx +3 -0
- package/src/components/Table/Table.tsx +134 -0
- package/src/components/Table/index.ts +11 -0
- package/src/components/Tabs/Tabs.tsx +56 -0
- package/src/components/Tabs/index.ts +3 -0
- package/src/components/Tabs/index.tsx +3 -0
- package/src/components/ThemeWrapper/ThemeWrapper.tsx +5 -0
- package/src/components/ThemeWrapper/index.ts +1 -0
- package/src/components/Thumbnail/Thumbnail.test.ts +71 -0
- package/src/components/Thumbnail/Thumbnail.tsx +351 -0
- package/src/components/Thumbnail/index.ts +2 -0
- package/src/components/ThumbnailList/ThumbnailList.tsx +94 -0
- package/src/components/ThumbnailList/index.ts +2 -0
- package/src/components/Toggle/Toggle.tsx +45 -0
- package/src/components/Toggle/index.ts +3 -0
- package/src/components/Toggle/index.tsx +3 -0
- package/src/components/ToggleGroup/ToggleGroup.tsx +63 -0
- package/src/components/ToggleGroup/index.ts +3 -0
- package/src/components/ToolButton/ToolButton.tsx +134 -0
- package/src/components/ToolButton/ToolButtonList.tsx +243 -0
- package/src/components/ToolButton/index.ts +8 -0
- package/src/components/Tooltip/Tooltip.tsx +34 -0
- package/src/components/Tooltip/index.ts +3 -0
- package/src/components/Viewport/ImageScrollbar.module.css +89 -0
- package/src/components/Viewport/ImageScrollbar.tsx +71 -0
- package/src/components/Viewport/PatientInfo.tsx +126 -0
- package/src/components/Viewport/ViewportActionArrows.tsx +36 -0
- package/src/components/Viewport/ViewportActionBar.tsx +107 -0
- package/src/components/Viewport/ViewportActionButton.tsx +25 -0
- package/src/components/Viewport/ViewportActionCorners.tsx +171 -0
- package/src/components/Viewport/ViewportGrid.tsx +24 -0
- package/src/components/Viewport/ViewportOverlay.css +32 -0
- package/src/components/Viewport/ViewportOverlay.tsx +54 -0
- package/src/components/Viewport/ViewportPane.tsx +82 -0
- package/src/components/Viewport/index.ts +9 -0
- package/src/components/ViewportDialog/ViewportDialog.tsx +128 -0
- package/src/components/ViewportDialog/index.ts +2 -0
- package/src/components/index.ts +330 -0
- package/src/contextProviders/ActiveThemeProvider.tsx +204 -0
- package/src/contextProviders/CineProvider.tsx +98 -0
- package/src/contextProviders/DialogProvider.tsx +103 -0
- package/src/contextProviders/DragAndDropProvider.tsx +37 -0
- package/src/contextProviders/IconPresentationProvider.tsx +88 -0
- package/src/contextProviders/ImageViewerProvider.tsx +15 -0
- package/src/contextProviders/ManagedDialog.tsx +176 -0
- package/src/contextProviders/ModalProvider.tsx +102 -0
- package/src/contextProviders/NotificationProvider.tsx +246 -0
- package/src/contextProviders/UserAuthenticationProvider.tsx +118 -0
- package/src/contextProviders/ViewportDialogProvider.tsx +42 -0
- package/src/contextProviders/ViewportGridProvider.tsx +556 -0
- package/src/contextProviders/index.ts +26 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useDynamicMaxHeight.ts +105 -0
- package/src/hooks/useSessionStorage.test.js +103 -0
- package/src/hooks/useSessionStorage.tsx +71 -0
- package/src/index.ts +7 -0
- package/src/lib/utils.ts +6 -0
- package/src/tailwind.css +266 -0
- package/src/themes/arctic.json +31 -0
- package/src/themes/deep.json +31 -0
- package/src/themes/index.ts +16 -0
- package/src/themes/midnight.json +31 -0
- package/src/themes/orchid.json +31 -0
- package/src/themes/slate.json +31 -0
- package/src/themes/themes.css +206 -0
- package/src/themes/verdant.json +31 -0
- package/src/types/ActionCorners.ts +18 -0
- package/src/types/AppTypes.ts +24 -0
- package/src/types/ContextMenuItem.ts +9 -0
- package/src/types/Predicate.ts +1 -0
- package/src/types/ThumbnailType.ts +3 -0
- package/src/types/ViewportActionCornersTypes.ts +13 -0
- package/src/types/global.d.ts +4 -0
- package/src/types/index.ts +21 -0
- package/src/utils/formatDICOMDate.test.ts +61 -0
- package/src/utils/formatDICOMDate.ts +65 -0
- package/src/utils/formatDICOMTime.test.ts +62 -0
- package/src/utils/formatDICOMTime.ts +49 -0
- package/src/utils/getToggledClassName.tsx +5 -0
- package/src/utils/index.ts +15 -0
- package/src/utils/parseStudyDateTimestamp.test.ts +47 -0
- package/src/utils/parseStudyDateTimestamp.ts +27 -0
- package/src/utils/roundNumber.ts +43 -0
- package/tailwind.config.js +120 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
3
|
+
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { Input } from '../Input';
|
|
6
|
+
|
|
7
|
+
interface DoubleSliderProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
allowTypedExpansion?: boolean | [number, number];
|
|
12
|
+
step?: number;
|
|
13
|
+
defaultValue?: [number, number];
|
|
14
|
+
onValueChange?: (value: [number, number]) => void;
|
|
15
|
+
showNumberInputs?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const DoubleSlider = ({
|
|
19
|
+
className,
|
|
20
|
+
min,
|
|
21
|
+
max,
|
|
22
|
+
allowTypedExpansion = false,
|
|
23
|
+
onValueChange,
|
|
24
|
+
step = 1,
|
|
25
|
+
defaultValue = [min, max],
|
|
26
|
+
showNumberInputs = false,
|
|
27
|
+
ref,
|
|
28
|
+
}: DoubleSliderProps & { ref?: React.Ref<HTMLDivElement> }) => {
|
|
29
|
+
const [value, setValue] = React.useState<[number, number]>(defaultValue);
|
|
30
|
+
const [inputValues, setInputValues] = React.useState<[string, string]>([
|
|
31
|
+
defaultValue[0].toString(),
|
|
32
|
+
defaultValue[1].toString(),
|
|
33
|
+
]);
|
|
34
|
+
const [sliderMin, setSliderMin] = React.useState(() => Math.min(min, defaultValue[0]));
|
|
35
|
+
const [sliderMax, setSliderMax] = React.useState(() => Math.max(max, defaultValue[1]));
|
|
36
|
+
|
|
37
|
+
// Adjust prop-derived state during render so React retries before committing stale values.
|
|
38
|
+
// See https://react.dev/learn/you-might-not-need-an-effect#adjusting-some-state-when-a-prop-changes
|
|
39
|
+
const [prevDefaultValue, setPrevDefaultValue] = React.useState(defaultValue);
|
|
40
|
+
const [prevLimits, setPrevLimits] = React.useState({ min, max });
|
|
41
|
+
|
|
42
|
+
let nextSliderMin = sliderMin;
|
|
43
|
+
let nextSliderMax = sliderMax;
|
|
44
|
+
|
|
45
|
+
if (prevLimits.min !== min || prevLimits.max !== max) {
|
|
46
|
+
setPrevLimits({ min, max });
|
|
47
|
+
nextSliderMin = min;
|
|
48
|
+
nextSliderMax = max;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (prevDefaultValue[0] !== defaultValue[0] || prevDefaultValue[1] !== defaultValue[1]) {
|
|
52
|
+
setPrevDefaultValue(defaultValue);
|
|
53
|
+
setValue(defaultValue);
|
|
54
|
+
setInputValues([defaultValue[0].toString(), defaultValue[1].toString()]);
|
|
55
|
+
nextSliderMin = Math.min(nextSliderMin, defaultValue[0]);
|
|
56
|
+
nextSliderMax = Math.max(nextSliderMax, defaultValue[1]);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (nextSliderMin !== sliderMin) {
|
|
60
|
+
setSliderMin(nextSliderMin);
|
|
61
|
+
}
|
|
62
|
+
if (nextSliderMax !== sliderMax) {
|
|
63
|
+
setSliderMax(nextSliderMax);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const roundToStep = (num: number): number => {
|
|
67
|
+
const inverse = 1 / step;
|
|
68
|
+
return Math.round(num * inverse) / inverse;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const handleSliderChange = (newValue: number[]) => {
|
|
72
|
+
const clampedValue: [number, number] = [
|
|
73
|
+
roundToStep(Math.max(sliderMin, Math.min(newValue[0], sliderMax))),
|
|
74
|
+
roundToStep(Math.min(sliderMax, Math.max(newValue[1], sliderMin))),
|
|
75
|
+
];
|
|
76
|
+
setValue(clampedValue);
|
|
77
|
+
setInputValues([clampedValue[0].toString(), clampedValue[1].toString()]);
|
|
78
|
+
onValueChange?.(clampedValue);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const commitInputValue = (index: 0 | 1) => {
|
|
82
|
+
const inputValue = inputValues[index].trim();
|
|
83
|
+
|
|
84
|
+
if (inputValue === '') {
|
|
85
|
+
const newValue: [number, number] = [...value];
|
|
86
|
+
newValue[index] = index === 0 ? min : max;
|
|
87
|
+
|
|
88
|
+
if (index === 0 && newValue[0] > newValue[1]) {
|
|
89
|
+
newValue[1] = newValue[0];
|
|
90
|
+
} else if (index === 1 && newValue[1] < newValue[0]) {
|
|
91
|
+
newValue[0] = newValue[1];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (index === 0) {
|
|
95
|
+
setSliderMin(min);
|
|
96
|
+
} else {
|
|
97
|
+
setSliderMax(max);
|
|
98
|
+
}
|
|
99
|
+
setValue(newValue);
|
|
100
|
+
setInputValues([newValue[0].toString(), newValue[1].toString()]);
|
|
101
|
+
onValueChange?.(newValue);
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const parsedValue = Number(inputValue);
|
|
106
|
+
if (!Number.isFinite(parsedValue)) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const [inputMin, inputMax] = Array.isArray(allowTypedExpansion)
|
|
111
|
+
? allowTypedExpansion
|
|
112
|
+
: allowTypedExpansion
|
|
113
|
+
? [-Infinity, Infinity]
|
|
114
|
+
: [min, max];
|
|
115
|
+
const hardLimitedValue = Math.max(inputMin, Math.min(parsedValue, inputMax));
|
|
116
|
+
const newValue: [number, number] = [...value];
|
|
117
|
+
const roundedValue = roundToStep(hardLimitedValue);
|
|
118
|
+
newValue[index] = Math.max(inputMin, Math.min(roundedValue, inputMax));
|
|
119
|
+
|
|
120
|
+
if (index === 0 && newValue[0] > newValue[1]) {
|
|
121
|
+
newValue[1] = newValue[0];
|
|
122
|
+
} else if (index === 1 && newValue[1] < newValue[0]) {
|
|
123
|
+
newValue[0] = newValue[1];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
setSliderMin(currentMin => Math.min(currentMin, newValue[0]));
|
|
127
|
+
setSliderMax(currentMax => Math.max(currentMax, newValue[1]));
|
|
128
|
+
setValue(newValue);
|
|
129
|
+
setInputValues([newValue[0].toString(), newValue[1].toString()]);
|
|
130
|
+
onValueChange?.(newValue);
|
|
131
|
+
return true;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const restorePreviousInputValue = (index: 0 | 1) => {
|
|
135
|
+
setInputValues(currentValues => {
|
|
136
|
+
const nextValues: [string, string] = [...currentValues];
|
|
137
|
+
nextValues[index] = value[index].toString();
|
|
138
|
+
return nextValues;
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const handleInputBlur = (index: 0 | 1) => {
|
|
143
|
+
if (!commitInputValue(index)) {
|
|
144
|
+
restorePreviousInputValue(index);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const handleInputKeyDown = (index: 0 | 1, event: React.KeyboardEvent<HTMLInputElement>) => {
|
|
149
|
+
if (event.nativeEvent.isComposing) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (event.key === 'Enter') {
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
if (!commitInputValue(index)) {
|
|
156
|
+
restorePreviousInputValue(index);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
return (
|
|
162
|
+
<div
|
|
163
|
+
ref={ref}
|
|
164
|
+
className={cn('flex w-full items-center space-x-2', className)}
|
|
165
|
+
>
|
|
166
|
+
{showNumberInputs && (
|
|
167
|
+
<Input
|
|
168
|
+
type="text"
|
|
169
|
+
inputMode="decimal"
|
|
170
|
+
value={inputValues[0]}
|
|
171
|
+
onChange={event =>
|
|
172
|
+
setInputValues(currentValues => [event.target.value, currentValues[1]])
|
|
173
|
+
}
|
|
174
|
+
onKeyDown={event => handleInputKeyDown(0, event)}
|
|
175
|
+
onBlur={() => handleInputBlur(0)}
|
|
176
|
+
className="w-14"
|
|
177
|
+
/>
|
|
178
|
+
)}
|
|
179
|
+
<SliderPrimitive.Root
|
|
180
|
+
className="relative flex h-4 w-full touch-none select-none items-center"
|
|
181
|
+
min={sliderMin}
|
|
182
|
+
max={sliderMax}
|
|
183
|
+
step={step}
|
|
184
|
+
value={value}
|
|
185
|
+
onValueChange={handleSliderChange}
|
|
186
|
+
>
|
|
187
|
+
<SliderPrimitive.Track className="bg-primary/30 relative h-1 w-full grow overflow-hidden rounded-full">
|
|
188
|
+
<SliderPrimitive.Range className="bg-primary absolute h-full" />
|
|
189
|
+
</SliderPrimitive.Track>
|
|
190
|
+
<SliderPrimitive.Thumb className="border-background bg-primary focus-visible:ring-ring block h-4 w-4 rounded-full border-2 shadow transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50" />
|
|
191
|
+
<SliderPrimitive.Thumb className="border-background bg-primary focus-visible:ring-ring block h-4 w-4 rounded-full border-2 shadow transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50" />
|
|
192
|
+
</SliderPrimitive.Root>
|
|
193
|
+
{showNumberInputs && (
|
|
194
|
+
<Input
|
|
195
|
+
type="text"
|
|
196
|
+
inputMode="decimal"
|
|
197
|
+
value={inputValues[1]}
|
|
198
|
+
onChange={event =>
|
|
199
|
+
setInputValues(currentValues => [currentValues[0], event.target.value])
|
|
200
|
+
}
|
|
201
|
+
onKeyDown={event => handleInputKeyDown(1, event)}
|
|
202
|
+
onBlur={() => handleInputBlur(1)}
|
|
203
|
+
className="w-14"
|
|
204
|
+
/>
|
|
205
|
+
)}
|
|
206
|
+
</div>
|
|
207
|
+
);
|
|
208
|
+
};
|
|
209
|
+
DoubleSlider.displayName = 'DoubleSlider';
|
|
210
|
+
|
|
211
|
+
export { DoubleSlider };
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';
|
|
4
|
+
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
|
|
7
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
8
|
+
|
|
9
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
10
|
+
|
|
11
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
12
|
+
|
|
13
|
+
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
14
|
+
|
|
15
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
16
|
+
|
|
17
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
18
|
+
|
|
19
|
+
const DropdownMenuSubTrigger = ({
|
|
20
|
+
className,
|
|
21
|
+
inset,
|
|
22
|
+
children,
|
|
23
|
+
disabled,
|
|
24
|
+
ref,
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
27
|
+
inset?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}) => (
|
|
30
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
31
|
+
ref={ref}
|
|
32
|
+
className={cn(
|
|
33
|
+
'focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center rounded px-2 py-1 text-base outline-none',
|
|
34
|
+
inset && 'pl-8',
|
|
35
|
+
disabled && 'pointer-events-none opacity-50',
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
>
|
|
40
|
+
{children}
|
|
41
|
+
<ChevronRightIcon className="ml-auto h-4 w-4" />
|
|
42
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
43
|
+
);
|
|
44
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
45
|
+
|
|
46
|
+
const DropdownMenuSubContent = ({
|
|
47
|
+
className,
|
|
48
|
+
ref,
|
|
49
|
+
...props
|
|
50
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) => (
|
|
51
|
+
<DropdownMenuPrimitive.SubContent
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn(
|
|
54
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-input/50 z-50 min-w-[8rem] overflow-hidden rounded border p-1 shadow-lg',
|
|
55
|
+
className
|
|
56
|
+
)}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
61
|
+
|
|
62
|
+
const DropdownMenuContent = ({
|
|
63
|
+
className,
|
|
64
|
+
sideOffset = 4,
|
|
65
|
+
ref,
|
|
66
|
+
...props
|
|
67
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) => (
|
|
68
|
+
<DropdownMenuPrimitive.Portal>
|
|
69
|
+
<DropdownMenuPrimitive.Content
|
|
70
|
+
ref={ref}
|
|
71
|
+
sideOffset={sideOffset}
|
|
72
|
+
onKeyDown={e => {
|
|
73
|
+
// Todo: or maybe we just want to prevent arrows?
|
|
74
|
+
e.stopPropagation();
|
|
75
|
+
props.onKeyDown?.(e);
|
|
76
|
+
}}
|
|
77
|
+
className={cn(
|
|
78
|
+
'bg-popover text-popover-foreground border-input/50 z-50 min-w-[8rem] overflow-hidden rounded border p-1 shadow-md',
|
|
79
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
80
|
+
className
|
|
81
|
+
)}
|
|
82
|
+
{...props}
|
|
83
|
+
/>
|
|
84
|
+
</DropdownMenuPrimitive.Portal>
|
|
85
|
+
);
|
|
86
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
87
|
+
|
|
88
|
+
const DropdownMenuItem = ({
|
|
89
|
+
className,
|
|
90
|
+
inset,
|
|
91
|
+
ref,
|
|
92
|
+
...props
|
|
93
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
94
|
+
inset?: boolean;
|
|
95
|
+
}) => (
|
|
96
|
+
<DropdownMenuPrimitive.Item
|
|
97
|
+
ref={ref}
|
|
98
|
+
className={cn(
|
|
99
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded px-1 py-1 text-base outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
100
|
+
inset && 'pl-8',
|
|
101
|
+
className
|
|
102
|
+
)}
|
|
103
|
+
{...props}
|
|
104
|
+
/>
|
|
105
|
+
);
|
|
106
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
107
|
+
|
|
108
|
+
const DropdownMenuCheckboxItem = ({
|
|
109
|
+
className,
|
|
110
|
+
children,
|
|
111
|
+
checked,
|
|
112
|
+
ref,
|
|
113
|
+
...props
|
|
114
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) => (
|
|
115
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
116
|
+
ref={ref}
|
|
117
|
+
className={cn(
|
|
118
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded py-1 pl-8 pr-2 text-base outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
119
|
+
className
|
|
120
|
+
)}
|
|
121
|
+
checked={checked}
|
|
122
|
+
{...props}
|
|
123
|
+
>
|
|
124
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
125
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
126
|
+
<CheckIcon className="h-4 w-4" />
|
|
127
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
128
|
+
</span>
|
|
129
|
+
{children}
|
|
130
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
131
|
+
);
|
|
132
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
133
|
+
|
|
134
|
+
const DropdownMenuRadioItem = ({
|
|
135
|
+
className,
|
|
136
|
+
children,
|
|
137
|
+
ref,
|
|
138
|
+
...props
|
|
139
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) => (
|
|
140
|
+
<DropdownMenuPrimitive.RadioItem
|
|
141
|
+
ref={ref}
|
|
142
|
+
className={cn(
|
|
143
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded py-1 pl-8 pr-2 text-base outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
144
|
+
className
|
|
145
|
+
)}
|
|
146
|
+
{...props}
|
|
147
|
+
>
|
|
148
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
149
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
150
|
+
<DotFilledIcon className="h-4 w-4 fill-current" />
|
|
151
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
152
|
+
</span>
|
|
153
|
+
{children}
|
|
154
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
155
|
+
);
|
|
156
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
157
|
+
|
|
158
|
+
const DropdownMenuLabel = ({
|
|
159
|
+
className,
|
|
160
|
+
inset,
|
|
161
|
+
ref,
|
|
162
|
+
...props
|
|
163
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
164
|
+
inset?: boolean;
|
|
165
|
+
}) => (
|
|
166
|
+
<DropdownMenuPrimitive.Label
|
|
167
|
+
ref={ref}
|
|
168
|
+
className={cn('text-muted-foreground px-2 py-1 text-sm', inset && 'pl-8', className)}
|
|
169
|
+
{...props}
|
|
170
|
+
/>
|
|
171
|
+
);
|
|
172
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
173
|
+
|
|
174
|
+
const DropdownMenuSeparator = ({
|
|
175
|
+
className,
|
|
176
|
+
ref,
|
|
177
|
+
...props
|
|
178
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) => (
|
|
179
|
+
<DropdownMenuPrimitive.Separator
|
|
180
|
+
ref={ref}
|
|
181
|
+
className={cn('bg-muted my-1 mx-2 h-px', className)}
|
|
182
|
+
{...props}
|
|
183
|
+
/>
|
|
184
|
+
);
|
|
185
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
186
|
+
|
|
187
|
+
const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
188
|
+
return (
|
|
189
|
+
<span
|
|
190
|
+
className={cn('ml-auto text-sm tracking-widest opacity-60', className)}
|
|
191
|
+
{...props}
|
|
192
|
+
/>
|
|
193
|
+
);
|
|
194
|
+
};
|
|
195
|
+
DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
|
|
196
|
+
|
|
197
|
+
export {
|
|
198
|
+
DropdownMenu,
|
|
199
|
+
DropdownMenuTrigger,
|
|
200
|
+
DropdownMenuContent,
|
|
201
|
+
DropdownMenuItem,
|
|
202
|
+
DropdownMenuCheckboxItem,
|
|
203
|
+
DropdownMenuRadioItem,
|
|
204
|
+
DropdownMenuLabel,
|
|
205
|
+
DropdownMenuSeparator,
|
|
206
|
+
DropdownMenuShortcut,
|
|
207
|
+
DropdownMenuGroup,
|
|
208
|
+
DropdownMenuPortal,
|
|
209
|
+
DropdownMenuSub,
|
|
210
|
+
DropdownMenuSubContent,
|
|
211
|
+
DropdownMenuSubTrigger,
|
|
212
|
+
DropdownMenuRadioGroup,
|
|
213
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DropdownMenu,
|
|
3
|
+
DropdownMenuTrigger,
|
|
4
|
+
DropdownMenuContent,
|
|
5
|
+
DropdownMenuItem,
|
|
6
|
+
DropdownMenuCheckboxItem,
|
|
7
|
+
DropdownMenuRadioItem,
|
|
8
|
+
DropdownMenuLabel,
|
|
9
|
+
DropdownMenuSeparator,
|
|
10
|
+
DropdownMenuShortcut,
|
|
11
|
+
DropdownMenuGroup,
|
|
12
|
+
DropdownMenuPortal,
|
|
13
|
+
DropdownMenuSub,
|
|
14
|
+
DropdownMenuSubContent,
|
|
15
|
+
DropdownMenuSubTrigger,
|
|
16
|
+
DropdownMenuRadioGroup,
|
|
17
|
+
} from './DropdownMenu';
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
DropdownMenu,
|
|
21
|
+
DropdownMenuTrigger,
|
|
22
|
+
DropdownMenuContent,
|
|
23
|
+
DropdownMenuItem,
|
|
24
|
+
DropdownMenuCheckboxItem,
|
|
25
|
+
DropdownMenuRadioItem,
|
|
26
|
+
DropdownMenuLabel,
|
|
27
|
+
DropdownMenuSeparator,
|
|
28
|
+
DropdownMenuShortcut,
|
|
29
|
+
DropdownMenuGroup,
|
|
30
|
+
DropdownMenuPortal,
|
|
31
|
+
DropdownMenuSub,
|
|
32
|
+
DropdownMenuSubContent,
|
|
33
|
+
DropdownMenuSubTrigger,
|
|
34
|
+
DropdownMenuRadioGroup,
|
|
35
|
+
};
|