@ohif/ui-next 3.14.0-beta.97 → 3.14.0-beta.99
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.umd.js +4 -1925
- package/package.json +18 -7
- 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 +15 -0
- package/src/components/SegmentationTable/index.ts +24 -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 +323 -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,287 @@
|
|
|
1
|
+
import React, { createContext, useContext, useRef, useEffect } from 'react';
|
|
2
|
+
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
3
|
+
import { Label, Input as InputComponent, FooterAction } from '../../components';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
|
|
6
|
+
interface InputDialogContextValue {
|
|
7
|
+
value: string;
|
|
8
|
+
setValue: (value: string) => void;
|
|
9
|
+
submitOnEnter?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const InputDialogContext = createContext<InputDialogContextValue | null>(null);
|
|
13
|
+
|
|
14
|
+
export type InputDialogRootProps = {
|
|
15
|
+
/** The controlled value of the input */
|
|
16
|
+
value?: string;
|
|
17
|
+
/** The default value for uncontrolled usage */
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
/** Callback when input value changes */
|
|
20
|
+
onChange?: (value: string) => void;
|
|
21
|
+
/** Optional className for the root container */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Enable save on Enter key press */
|
|
24
|
+
submitOnEnter?: boolean;
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const InputDialogRoot = ({
|
|
29
|
+
value,
|
|
30
|
+
defaultValue = '',
|
|
31
|
+
onChange,
|
|
32
|
+
className,
|
|
33
|
+
submitOnEnter,
|
|
34
|
+
children,
|
|
35
|
+
ref,
|
|
36
|
+
}: InputDialogRootProps & { ref?: React.Ref<HTMLDivElement> }) => {
|
|
37
|
+
const [internalValue, setInternalValue] = useControllableState({
|
|
38
|
+
prop: value,
|
|
39
|
+
defaultProp: defaultValue,
|
|
40
|
+
onChange,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<InputDialogContext.Provider
|
|
45
|
+
value={{
|
|
46
|
+
value: internalValue,
|
|
47
|
+
setValue: setInternalValue,
|
|
48
|
+
submitOnEnter,
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
<div
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn('flex flex-col', className)}
|
|
54
|
+
>
|
|
55
|
+
{children}
|
|
56
|
+
</div>
|
|
57
|
+
</InputDialogContext.Provider>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
InputDialogRoot.displayName = 'InputDialog';
|
|
62
|
+
|
|
63
|
+
export interface InputDialogFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
64
|
+
/** Optional className for the field container */
|
|
65
|
+
className?: string;
|
|
66
|
+
children: React.ReactNode;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const Field = ({
|
|
70
|
+
className,
|
|
71
|
+
children,
|
|
72
|
+
ref,
|
|
73
|
+
...props
|
|
74
|
+
}: InputDialogFieldProps & { ref?: React.Ref<HTMLDivElement> }) => {
|
|
75
|
+
return (
|
|
76
|
+
<div
|
|
77
|
+
ref={ref}
|
|
78
|
+
className={cn('mb-4 flex flex-col space-y-2', className)}
|
|
79
|
+
{...props}
|
|
80
|
+
>
|
|
81
|
+
{children}
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
Field.displayName = 'InputDialog.Field';
|
|
87
|
+
|
|
88
|
+
export interface InputDialogInputProps
|
|
89
|
+
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value'> {
|
|
90
|
+
/** ID for the input field */
|
|
91
|
+
id?: string;
|
|
92
|
+
/** Optional className for the input container */
|
|
93
|
+
className?: string;
|
|
94
|
+
/** Save handler */
|
|
95
|
+
onSave?: (value: string) => void;
|
|
96
|
+
/** Placeholder text for the input field */
|
|
97
|
+
placeholder?: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const InputDialogInput = ({
|
|
101
|
+
id = 'dialog-input',
|
|
102
|
+
className,
|
|
103
|
+
onSave,
|
|
104
|
+
ref,
|
|
105
|
+
...props
|
|
106
|
+
}: InputDialogInputProps & { ref?: React.Ref<HTMLInputElement> }) => {
|
|
107
|
+
const context = useContext(InputDialogContext);
|
|
108
|
+
if (!context) {
|
|
109
|
+
throw new Error('InputDialog.Input must be used within an InputDialog');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const { value, setValue } = context;
|
|
113
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
114
|
+
|
|
115
|
+
// Combine the forwarded ref with our local ref
|
|
116
|
+
React.useImperativeHandle(ref, () => inputRef.current);
|
|
117
|
+
|
|
118
|
+
// Focus the input when it mounts
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
if (inputRef.current) {
|
|
121
|
+
inputRef.current.focus();
|
|
122
|
+
}
|
|
123
|
+
}, []);
|
|
124
|
+
|
|
125
|
+
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
126
|
+
if (context.submitOnEnter && e.key === 'Enter') {
|
|
127
|
+
e.preventDefault();
|
|
128
|
+
const saveButton = document.querySelector(
|
|
129
|
+
'[data-cy="input-dialog-save-button"]'
|
|
130
|
+
) as HTMLButtonElement;
|
|
131
|
+
if (saveButton) {
|
|
132
|
+
saveButton.click();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<div className={cn('w-full', className)}>
|
|
139
|
+
<InputComponent
|
|
140
|
+
ref={inputRef}
|
|
141
|
+
id={id}
|
|
142
|
+
data-cy={id}
|
|
143
|
+
value={value}
|
|
144
|
+
onChange={e => setValue(e.target.value)}
|
|
145
|
+
onKeyDown={handleKeyDown}
|
|
146
|
+
{...props}
|
|
147
|
+
/>
|
|
148
|
+
</div>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
InputDialogInput.displayName = 'InputDialog.Input';
|
|
153
|
+
|
|
154
|
+
export interface InputDialogLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
155
|
+
/** Optional className for the label */
|
|
156
|
+
className?: string;
|
|
157
|
+
/** For attribute to match input ID */
|
|
158
|
+
htmlFor?: string;
|
|
159
|
+
children: React.ReactNode;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const InputDialogLabel = ({
|
|
163
|
+
className,
|
|
164
|
+
htmlFor = 'dialog-input',
|
|
165
|
+
children,
|
|
166
|
+
ref,
|
|
167
|
+
...props
|
|
168
|
+
}: InputDialogLabelProps & { ref?: React.Ref<HTMLLabelElement> }) => {
|
|
169
|
+
return (
|
|
170
|
+
<Label
|
|
171
|
+
ref={ref}
|
|
172
|
+
className={cn(className)}
|
|
173
|
+
htmlFor={htmlFor}
|
|
174
|
+
{...props}
|
|
175
|
+
>
|
|
176
|
+
{children}
|
|
177
|
+
</Label>
|
|
178
|
+
);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
InputDialogLabel.displayName = 'InputDialog.Label';
|
|
182
|
+
|
|
183
|
+
export interface InputDialogActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
184
|
+
/** Optional className for the actions container */
|
|
185
|
+
className?: string;
|
|
186
|
+
children: React.ReactNode;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const Actions = ({
|
|
190
|
+
className,
|
|
191
|
+
children,
|
|
192
|
+
ref,
|
|
193
|
+
...props
|
|
194
|
+
}: InputDialogActionsProps & { ref?: React.Ref<HTMLDivElement> }) => {
|
|
195
|
+
return (
|
|
196
|
+
<div
|
|
197
|
+
ref={ref}
|
|
198
|
+
{...props}
|
|
199
|
+
>
|
|
200
|
+
<FooterAction className={cn(className)}>
|
|
201
|
+
<FooterAction.Right>{children}</FooterAction.Right>
|
|
202
|
+
</FooterAction>
|
|
203
|
+
</div>
|
|
204
|
+
);
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
Actions.displayName = 'InputDialog.Actions';
|
|
208
|
+
|
|
209
|
+
export interface InputDialogActionButtonProps {
|
|
210
|
+
/** Optional className for the button */
|
|
211
|
+
className?: string;
|
|
212
|
+
/** Click handler that receives the current input value */
|
|
213
|
+
onClick: (value: string) => void;
|
|
214
|
+
children: React.ReactNode;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const ActionsSecondary = ({
|
|
218
|
+
className,
|
|
219
|
+
onClick,
|
|
220
|
+
children,
|
|
221
|
+
ref,
|
|
222
|
+
...props
|
|
223
|
+
}: InputDialogActionButtonProps & { ref?: React.Ref<HTMLDivElement> }) => {
|
|
224
|
+
const context = useContext(InputDialogContext);
|
|
225
|
+
if (!context) {
|
|
226
|
+
throw new Error('InputDialog.ActionsSecondary must be used within an InputDialog');
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const { value } = context;
|
|
230
|
+
|
|
231
|
+
return (
|
|
232
|
+
<div
|
|
233
|
+
ref={ref}
|
|
234
|
+
data-cy="input-dialog-cancel-button"
|
|
235
|
+
{...props}
|
|
236
|
+
>
|
|
237
|
+
<FooterAction.Secondary
|
|
238
|
+
onClick={() => onClick(value)}
|
|
239
|
+
className={cn(className)}
|
|
240
|
+
>
|
|
241
|
+
{children}
|
|
242
|
+
</FooterAction.Secondary>
|
|
243
|
+
</div>
|
|
244
|
+
);
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
ActionsSecondary.displayName = 'InputDialog.ActionsSecondary';
|
|
248
|
+
|
|
249
|
+
const ActionsPrimary = ({
|
|
250
|
+
className,
|
|
251
|
+
onClick,
|
|
252
|
+
children,
|
|
253
|
+
ref,
|
|
254
|
+
...props
|
|
255
|
+
}: InputDialogActionButtonProps & { ref?: React.Ref<HTMLDivElement> }) => {
|
|
256
|
+
const context = useContext(InputDialogContext);
|
|
257
|
+
if (!context) {
|
|
258
|
+
throw new Error('InputDialog.ActionsPrimary must be used within an InputDialog');
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const { value } = context;
|
|
262
|
+
return (
|
|
263
|
+
<div
|
|
264
|
+
ref={ref}
|
|
265
|
+
{...props}
|
|
266
|
+
>
|
|
267
|
+
<FooterAction.Primary
|
|
268
|
+
data-cy="input-dialog-save-button"
|
|
269
|
+
onClick={() => onClick(value)}
|
|
270
|
+
className={cn(className)}
|
|
271
|
+
>
|
|
272
|
+
{children}
|
|
273
|
+
</FooterAction.Primary>
|
|
274
|
+
</div>
|
|
275
|
+
);
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
ActionsPrimary.displayName = 'InputDialog.ActionsPrimary';
|
|
279
|
+
|
|
280
|
+
export const InputDialog = Object.assign(InputDialogRoot, {
|
|
281
|
+
Label: InputDialogLabel,
|
|
282
|
+
Input: InputDialogInput,
|
|
283
|
+
Field,
|
|
284
|
+
Actions,
|
|
285
|
+
ActionsSecondary,
|
|
286
|
+
ActionsPrimary,
|
|
287
|
+
});
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Input } from '../Input';
|
|
3
|
+
import { ScrollArea } from '../ScrollArea';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
|
|
6
|
+
interface PresetDialogProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function PresetDialog({ children, className }: PresetDialogProps) {
|
|
12
|
+
return <div className={cn('flex h-[500px] max-w-lg flex-col', className)}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Subcomponent: PresetBody
|
|
17
|
+
* A dark "box" container that wraps the filter and grid area.
|
|
18
|
+
* Adjust bg color, padding, border, etc. to match your design.
|
|
19
|
+
*/
|
|
20
|
+
interface PresetBodyProps {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
function PresetBody({ children, className }: PresetBodyProps) {
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
className={cn(
|
|
28
|
+
// Adjust these classes for your desired look
|
|
29
|
+
'border-foreground/10 flex min-h-0 flex-1 flex-col rounded-md border bg-background p-2',
|
|
30
|
+
className
|
|
31
|
+
)}
|
|
32
|
+
>
|
|
33
|
+
{children}
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Subcomponent: PresetFilter
|
|
40
|
+
*/
|
|
41
|
+
interface PresetFilterProps {
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
function PresetFilter({ children, className }: PresetFilterProps) {
|
|
46
|
+
return (
|
|
47
|
+
<div className={cn('mb-2 flex w-full flex-shrink-0 items-center space-x-2', className)}>
|
|
48
|
+
{children}
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Subcomponent: PresetSearch
|
|
55
|
+
*/
|
|
56
|
+
interface PresetSearchProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
function PresetSearch({ className, ...props }: PresetSearchProps) {
|
|
60
|
+
return (
|
|
61
|
+
<Input
|
|
62
|
+
className={cn('w-full', className)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Subcomponent: PresetGrid
|
|
70
|
+
*/
|
|
71
|
+
interface PresetGridProps {
|
|
72
|
+
children: React.ReactNode;
|
|
73
|
+
maxHeight?: string;
|
|
74
|
+
className?: string;
|
|
75
|
+
}
|
|
76
|
+
function PresetGrid({ children, maxHeight = 'flex-1', className }: PresetGridProps) {
|
|
77
|
+
return (
|
|
78
|
+
<ScrollArea className={cn('min-h-0 flex-1', className)}>
|
|
79
|
+
<div className="grid grid-cols-4 gap-2 pr-2">{children}</div>
|
|
80
|
+
</ScrollArea>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Subcomponent: PresetOption
|
|
86
|
+
*/
|
|
87
|
+
interface PresetOptionProps {
|
|
88
|
+
label?: string;
|
|
89
|
+
className?: string;
|
|
90
|
+
}
|
|
91
|
+
function PresetOption({ label = 'Label', className }: PresetOptionProps) {
|
|
92
|
+
return (
|
|
93
|
+
<div className={cn('flex flex-col items-start space-y-1', className)}>
|
|
94
|
+
{/* Default dark placeholder box (swap in an <img> if you like) */}
|
|
95
|
+
<div className="bg-popover h-16 w-24 rounded" />
|
|
96
|
+
<div className="text-muted-foreground text-left text-base">{label}</div>
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Attach subcomponents to PresetDialog as static properties */
|
|
102
|
+
PresetDialog.PresetBody = PresetBody;
|
|
103
|
+
PresetDialog.PresetFilter = PresetFilter;
|
|
104
|
+
PresetDialog.PresetSearch = PresetSearch;
|
|
105
|
+
PresetDialog.PresetGrid = PresetGrid;
|
|
106
|
+
PresetDialog.PresetOption = PresetOption;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
|
+
import { Button } from '../Button';
|
|
4
|
+
import { Icons } from '../Icons';
|
|
5
|
+
|
|
6
|
+
interface AboutModalProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function AboutModal({ children, className }: AboutModalProps) {
|
|
12
|
+
return <div className={cn('space-y-1 text-center', className)}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Sub component: Product Name */
|
|
16
|
+
interface ProductNameProps {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
function ProductName({ children, className }: ProductNameProps) {
|
|
21
|
+
return (
|
|
22
|
+
<div className={cn('text-foreground pt-3 text-2xl font-medium leading-none', className)}>
|
|
23
|
+
{children}
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Sub-component: Product Version */
|
|
29
|
+
interface ProductVersionProps {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
function ProductVersion({ children, className }: ProductVersionProps) {
|
|
34
|
+
return (
|
|
35
|
+
<div className={cn('text-muted-foreground text-2xl font-light leading-none', className)}>
|
|
36
|
+
{children}
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Sub-component: Product Beta */
|
|
42
|
+
interface ProductBetaProps {
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
function ProductBeta({ children, className }: ProductBetaProps) {
|
|
47
|
+
return (
|
|
48
|
+
<div className={cn('text-muted-foreground text-xl font-light', className)}>{children}</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Sub-component: Body (wraps all detail items) */
|
|
53
|
+
interface BodyProps {
|
|
54
|
+
children: React.ReactNode;
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
function Body({ children, className }: BodyProps) {
|
|
58
|
+
return (
|
|
59
|
+
<div className={cn('my-3 flex flex-col items-center space-y-0', className)}>{children}</div>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Sub-component: Detail Item */
|
|
64
|
+
interface DetailItemProps {
|
|
65
|
+
label: string;
|
|
66
|
+
value: string;
|
|
67
|
+
className?: string;
|
|
68
|
+
}
|
|
69
|
+
function DetailItem({ label, value, className }: DetailItemProps) {
|
|
70
|
+
return (
|
|
71
|
+
<div className={cn('flex flex-col items-center', className)}>
|
|
72
|
+
<div className="text-muted-foreground pt-2 text-sm font-semibold tracking-wide">{label}</div>
|
|
73
|
+
<div className="text-muted-foreground text-sm">{value}</div>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Sub-component: Social Item */
|
|
79
|
+
interface SocialItemProps {
|
|
80
|
+
icon: string;
|
|
81
|
+
url: string;
|
|
82
|
+
text: string;
|
|
83
|
+
className?: string;
|
|
84
|
+
}
|
|
85
|
+
function SocialItem({ icon, url, text, className }: SocialItemProps) {
|
|
86
|
+
return (
|
|
87
|
+
<div className={cn('text-foreground flex items-center', className)}>
|
|
88
|
+
<div className="inline-block">
|
|
89
|
+
<Icons.ByName name={icon} />
|
|
90
|
+
</div>
|
|
91
|
+
<Button
|
|
92
|
+
asChild
|
|
93
|
+
variant="link"
|
|
94
|
+
className="py-6 text-lg"
|
|
95
|
+
>
|
|
96
|
+
<a
|
|
97
|
+
href={`https://github.com/${url}`}
|
|
98
|
+
target="_blank"
|
|
99
|
+
rel="noopener noreferrer"
|
|
100
|
+
>
|
|
101
|
+
{text}
|
|
102
|
+
</a>
|
|
103
|
+
</Button>
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** Attach sub-components to AboutModal as static properties */
|
|
109
|
+
AboutModal.ProductName = ProductName;
|
|
110
|
+
AboutModal.ProductVersion = ProductVersion;
|
|
111
|
+
AboutModal.ProductBeta = ProductBeta;
|
|
112
|
+
AboutModal.Body = Body;
|
|
113
|
+
AboutModal.DetailItem = DetailItem;
|
|
114
|
+
AboutModal.SocialItem = SocialItem;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
|
+
|
|
4
|
+
interface AppearanceModalProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function AppearanceModal({ children, className }: AppearanceModalProps) {
|
|
10
|
+
return (
|
|
11
|
+
<div className={cn('flex max-h-[80vh] w-full max-w-md flex-col overflow-hidden', className)}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface BodyProps {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
function Body({ children, className }: BodyProps) {
|
|
22
|
+
return (
|
|
23
|
+
<div className={cn('flex-1 overflow-y-auto', className)}>
|
|
24
|
+
<div className="mt-1 mb-4 flex flex-col space-y-4">{children}</div>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface SectionLabelProps {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
function SectionLabel({ children, className }: SectionLabelProps) {
|
|
34
|
+
return <span className={cn('text-muted-foreground text-lg', className)}>{children}</span>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
AppearanceModal.Body = Body;
|
|
38
|
+
AppearanceModal.SectionLabel = SectionLabel;
|