@ohif/ui-next 3.14.0-beta.10 → 3.14.0-beta.100
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 +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,103 @@
|
|
|
1
|
+
import { act } from 'react';
|
|
2
|
+
import { renderHook } from '@testing-library/react';
|
|
3
|
+
import useSessionStorage from './useSessionStorage';
|
|
4
|
+
|
|
5
|
+
const SESSION_STORAGE_KEY = 'test';
|
|
6
|
+
|
|
7
|
+
describe('Hook Session Storage', () => {
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
window.sessionStorage.removeItem(SESSION_STORAGE_KEY);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('hook should return state and setState', () => {
|
|
13
|
+
const data = { test: 1 };
|
|
14
|
+
const { result } = renderHook(() =>
|
|
15
|
+
useSessionStorage({ key: SESSION_STORAGE_KEY, defaultValue: data })
|
|
16
|
+
);
|
|
17
|
+
const [hookState, setHookState] = result.current;
|
|
18
|
+
expect(hookState).toStrictEqual(data);
|
|
19
|
+
expect(typeof setHookState).toBe('function');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('hook should store data on sessionStorage', () => {
|
|
23
|
+
const data = { test: 2 };
|
|
24
|
+
renderHook(() => useSessionStorage({ key: SESSION_STORAGE_KEY, defaultValue: data }));
|
|
25
|
+
|
|
26
|
+
const dataStr = JSON.stringify(data);
|
|
27
|
+
const dataSessionStorage = window.sessionStorage.getItem(SESSION_STORAGE_KEY);
|
|
28
|
+
expect(dataSessionStorage).toEqual(dataStr);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('hook should return stored data from sessionStorage', () => {
|
|
32
|
+
const data = { test: 3 };
|
|
33
|
+
const dataToCompare = { test: 4 };
|
|
34
|
+
|
|
35
|
+
window.sessionStorage.setItem(SESSION_STORAGE_KEY, JSON.stringify(dataToCompare));
|
|
36
|
+
|
|
37
|
+
const { result } = renderHook(() =>
|
|
38
|
+
useSessionStorage({ key: SESSION_STORAGE_KEY, defaultValue: data })
|
|
39
|
+
);
|
|
40
|
+
const [hookState, setHookState] = result.current;
|
|
41
|
+
|
|
42
|
+
expect(hookState).toStrictEqual(dataToCompare);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('hook should provide a setState method which updates its state', () => {
|
|
46
|
+
const data = { test: 5 };
|
|
47
|
+
const dataToCompare = { test: 6 };
|
|
48
|
+
const { result } = renderHook(() =>
|
|
49
|
+
useSessionStorage({ key: SESSION_STORAGE_KEY, defaultValue: data })
|
|
50
|
+
);
|
|
51
|
+
const [hookState, setHookState] = result.current;
|
|
52
|
+
|
|
53
|
+
act(() => {
|
|
54
|
+
setHookState(dataToCompare);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const dataToCompareStr = JSON.stringify(dataToCompare);
|
|
58
|
+
const dataSessionStorage = window.sessionStorage.getItem(SESSION_STORAGE_KEY);
|
|
59
|
+
|
|
60
|
+
const [hookStateToCompare] = result.current;
|
|
61
|
+
expect(dataSessionStorage).toEqual(dataToCompareStr);
|
|
62
|
+
expect(hookStateToCompare).toStrictEqual(dataToCompare);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('hook state must be preserved in case rerender', () => {
|
|
66
|
+
const data = { test: 7 };
|
|
67
|
+
const { result, rerender } = renderHook(() =>
|
|
68
|
+
useSessionStorage({ key: SESSION_STORAGE_KEY, defaultValue: data })
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
rerender();
|
|
72
|
+
|
|
73
|
+
const [hookState, setHookState] = result.current;
|
|
74
|
+
|
|
75
|
+
const dataToCompareStr = JSON.stringify(data);
|
|
76
|
+
const dataSessionStorage = window.sessionStorage.getItem(SESSION_STORAGE_KEY);
|
|
77
|
+
|
|
78
|
+
expect(dataSessionStorage).toEqual(dataToCompareStr);
|
|
79
|
+
expect(hookState).toStrictEqual(data);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('hook state must be preserved in case multiple operations and rerender', () => {
|
|
83
|
+
const data = { test: 8 };
|
|
84
|
+
const dataToCompare = { test: 9 };
|
|
85
|
+
const { result, rerender } = renderHook(() =>
|
|
86
|
+
useSessionStorage({ key: SESSION_STORAGE_KEY, defaultValue: data })
|
|
87
|
+
);
|
|
88
|
+
const [hookState, setHookState] = result.current;
|
|
89
|
+
|
|
90
|
+
act(() => {
|
|
91
|
+
setHookState(dataToCompare);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
rerender();
|
|
95
|
+
|
|
96
|
+
const dataToCompareStr = JSON.stringify(dataToCompare);
|
|
97
|
+
const dataSessionStorage = window.sessionStorage.getItem(SESSION_STORAGE_KEY);
|
|
98
|
+
|
|
99
|
+
const [hookStateToCompare] = result.current;
|
|
100
|
+
expect(dataSessionStorage).toEqual(dataToCompareStr);
|
|
101
|
+
expect(hookStateToCompare).toStrictEqual(dataToCompare);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A map of session storage items that should be cleared out of session storage
|
|
5
|
+
* when the page unloads.
|
|
6
|
+
*/
|
|
7
|
+
const sessionItemsToClearOnUnload: Map<string, string> = new Map<string, string>();
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* This callback simulates clearing the various session items when a page unloads.
|
|
11
|
+
* When the page is hidden the session storage items are removed but maintained
|
|
12
|
+
* in the map above in case the page becomes visible again. So those pages that
|
|
13
|
+
* are hidden because they are being unloaded have their session storage disposed
|
|
14
|
+
* of for ever. For those pages that are hidden, but later return to visible,
|
|
15
|
+
* this callback restores the session storage from the map above.
|
|
16
|
+
*/
|
|
17
|
+
const visibilityChangeCallback = () => {
|
|
18
|
+
if (document.visibilityState === 'hidden') {
|
|
19
|
+
Array.from(sessionItemsToClearOnUnload.keys()).forEach(key => {
|
|
20
|
+
window.sessionStorage.removeItem(key);
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
Array.from(sessionItemsToClearOnUnload.keys()).forEach(key => {
|
|
24
|
+
window.sessionStorage.setItem(key, sessionItemsToClearOnUnload.get(key));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Technically there is no memory leak here because the listener needs to
|
|
31
|
+
* persist until the page unloads and once the page unloads it will be gone.
|
|
32
|
+
*/
|
|
33
|
+
document.addEventListener('visibilitychange', visibilityChangeCallback);
|
|
34
|
+
|
|
35
|
+
type useSessionStorageProps = {
|
|
36
|
+
key: string;
|
|
37
|
+
defaultValue: unknown;
|
|
38
|
+
clearOnUnload: boolean;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const useSessionStorage = ({
|
|
42
|
+
key,
|
|
43
|
+
defaultValue = {},
|
|
44
|
+
clearOnUnload = false,
|
|
45
|
+
}: useSessionStorageProps) => {
|
|
46
|
+
const valueFromStorage = window.sessionStorage.getItem(key);
|
|
47
|
+
const storageValue = valueFromStorage ? JSON.parse(valueFromStorage) : defaultValue;
|
|
48
|
+
const [sessionItem, setSessionItem] = useState({ ...storageValue });
|
|
49
|
+
|
|
50
|
+
const updateSessionItem = value => {
|
|
51
|
+
setSessionItem({ ...value });
|
|
52
|
+
|
|
53
|
+
const valueAsStr = JSON.stringify(value);
|
|
54
|
+
|
|
55
|
+
if (!clearOnUnload || document.visibilityState === 'visible') {
|
|
56
|
+
window.sessionStorage.setItem(key, valueAsStr);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (clearOnUnload) {
|
|
60
|
+
sessionItemsToClearOnUnload.set(key, valueAsStr);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
updateSessionItem(sessionItem);
|
|
66
|
+
}, []);
|
|
67
|
+
|
|
68
|
+
return [sessionItem, updateSessionItem];
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export default useSessionStorage;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as utils from './utils';
|
|
2
|
+
import { cn, formatDICOMDate, formatDICOMTime, parseStudyDateTimestamp } from './utils';
|
|
3
|
+
export * from './components';
|
|
4
|
+
export * from './contextProviders';
|
|
5
|
+
export * as Types from './types';
|
|
6
|
+
export { utils, cn, formatDICOMDate, formatDICOMTime, parseStudyDateTimestamp };
|
|
7
|
+
export { useSessionStorage, useDynamicMaxHeight } from './hooks';
|
package/src/lib/utils.ts
ADDED
package/src/tailwind.css
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
@import './assets/fonts.css';
|
|
2
|
+
|
|
3
|
+
@tailwind base;
|
|
4
|
+
@tailwind components;
|
|
5
|
+
@tailwind utilities;
|
|
6
|
+
|
|
7
|
+
/* OHIF Theme */
|
|
8
|
+
|
|
9
|
+
@layer base {
|
|
10
|
+
:root {
|
|
11
|
+
--highlight: 191 74% 63%;
|
|
12
|
+
--neutral: 213 22% 59%;
|
|
13
|
+
--neutral-light: 214 69% 81%;
|
|
14
|
+
--neutral-dark: 214 16% 21%;
|
|
15
|
+
--background: 0 0% 0%;
|
|
16
|
+
--foreground: 0 0% 98%;
|
|
17
|
+
--card: 234 64% 10%;
|
|
18
|
+
--card-foreground: 0 0% 98%;
|
|
19
|
+
--popover: 219 90% 15%;
|
|
20
|
+
--popover-foreground: 0 0% 98%;
|
|
21
|
+
--primary: 214 98% 60%;
|
|
22
|
+
--primary-foreground: 0 0% 98%;
|
|
23
|
+
--secondary: 214 65% 36%;
|
|
24
|
+
--secondary-foreground: 200 50% 84%;
|
|
25
|
+
--muted: 234 64% 10%;
|
|
26
|
+
--muted-foreground: 200 46% 65%;
|
|
27
|
+
--accent: 217 79% 24%;
|
|
28
|
+
--accent-foreground: 0 0% 98%;
|
|
29
|
+
--destructive: 0 62.8% 30.6%;
|
|
30
|
+
--destructive-foreground: 0 0% 98%;
|
|
31
|
+
--border: 0 0% 14.9%;
|
|
32
|
+
--input: 236 52% 30%;
|
|
33
|
+
--ring: 214 98% 60%;
|
|
34
|
+
--chart-1: 220 70% 50%;
|
|
35
|
+
--chart-2: 160 60% 45%;
|
|
36
|
+
--chart-3: 30 80% 55%;
|
|
37
|
+
--chart-4: 280 65% 60%;
|
|
38
|
+
--chart-5: 340 75% 55%;
|
|
39
|
+
--radius: 0.5rem;
|
|
40
|
+
--success-bg: hsl(143, 85%, 96%);
|
|
41
|
+
--success-border: hsl(145, 92%, 91%);
|
|
42
|
+
--success-text: hsl(140, 100%, 27%);
|
|
43
|
+
|
|
44
|
+
--info-bg: hsl(208, 100%, 97%);
|
|
45
|
+
--info-border: hsl(221, 91%, 91%);
|
|
46
|
+
--info-text: hsl(210, 92%, 45%);
|
|
47
|
+
|
|
48
|
+
--warning-bg: hsl(49, 100%, 97%);
|
|
49
|
+
--warning-border: hsl(49, 91%, 91%);
|
|
50
|
+
--warning-text: hsl(31, 92%, 45%);
|
|
51
|
+
|
|
52
|
+
--error-bg: hsl(359, 100%, 97%);
|
|
53
|
+
--error-border: hsl(359, 100%, 94%);
|
|
54
|
+
--error-text: hsl(360, 100%, 45%);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dark {
|
|
58
|
+
--background: 0 0% 3.9%;
|
|
59
|
+
--foreground: 0 0% 98%;
|
|
60
|
+
--card: 234 64% 10%;
|
|
61
|
+
--card-foreground: 0 0% 98%;
|
|
62
|
+
--popover: 0 0% 3.9%;
|
|
63
|
+
--popover-foreground: 0 0% 98%;
|
|
64
|
+
--primary: 214 98% 60%;
|
|
65
|
+
--primary-foreground: 0 0% 98%;
|
|
66
|
+
--secondary: 0 0% 14.9%;
|
|
67
|
+
--secondary-foreground: 0 0% 98%;
|
|
68
|
+
--muted: 0 0% 14.9%;
|
|
69
|
+
--muted-foreground: 0 0% 63.9%;
|
|
70
|
+
--accent: 0 0% 14.9%;
|
|
71
|
+
--accent-foreground: 0 0% 98%;
|
|
72
|
+
--destructive: 0 62.8% 30.6%;
|
|
73
|
+
--destructive-foreground: 0 0% 98%;
|
|
74
|
+
--border: 0 0% 14.9%;
|
|
75
|
+
--input: 236 52% 30%;
|
|
76
|
+
--ring: 214 98% 60%;
|
|
77
|
+
--chart-1: 220 70% 50%;
|
|
78
|
+
--chart-2: 160 60% 45%;
|
|
79
|
+
--chart-3: 30 80% 55%;
|
|
80
|
+
--chart-4: 280 65% 60%;
|
|
81
|
+
--chart-5: 340 75% 55%;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* ORIGINAL THEME for comparison and testing
|
|
86
|
+
|
|
87
|
+
@layer base {
|
|
88
|
+
:root {
|
|
89
|
+
--background: 0 0% 100%;
|
|
90
|
+
--foreground: 240 10% 3.9%;
|
|
91
|
+
--card: 0 0% 100%;
|
|
92
|
+
--card-foreground: 240 10% 3.9%;
|
|
93
|
+
--popover: 0 0% 100%;
|
|
94
|
+
--popover-foreground: 240 10% 3.9%;
|
|
95
|
+
--primary: 240 5.9% 10%;
|
|
96
|
+
--primary-foreground: 0 0% 98%;
|
|
97
|
+
--secondary: 240 4.8% 95.9%;
|
|
98
|
+
--secondary-foreground: 240 5.9% 10%;
|
|
99
|
+
--muted: 240 4.8% 95.9%;
|
|
100
|
+
--muted-foreground: 240 3.8% 46.1%;
|
|
101
|
+
--accent: 240 4.8% 95.9%;
|
|
102
|
+
--accent-foreground: 240 5.9% 10%;
|
|
103
|
+
--destructive: 0 72.22% 50.59%;
|
|
104
|
+
--destructive-foreground: 0 0% 98%;
|
|
105
|
+
--border: 240 5.9% 90%;
|
|
106
|
+
--input: 240 5.9% 90%;
|
|
107
|
+
--ring: 240 5% 64.9%;
|
|
108
|
+
--radius: 0.5rem;
|
|
109
|
+
|
|
110
|
+
--chart-1: 12 76% 61%;
|
|
111
|
+
--chart-2: 173 58% 39%;
|
|
112
|
+
--chart-3: 197 37% 24%;
|
|
113
|
+
--chart-4: 43 74% 66%;
|
|
114
|
+
--chart-5: 27 87% 67%;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
.dark {
|
|
119
|
+
--background: 240 10% 3.9%;
|
|
120
|
+
--foreground: 0 0% 98%;
|
|
121
|
+
--card: 240 10% 3.9%;
|
|
122
|
+
--card-foreground: 0 0% 98%;
|
|
123
|
+
--popover: 240 10% 3.9%;
|
|
124
|
+
--popover-foreground: 0 0% 98%;
|
|
125
|
+
--primary: 0 0% 98%;
|
|
126
|
+
--primary-foreground: 240 5.9% 10%;
|
|
127
|
+
--secondary: 240 3.7% 15.9%;
|
|
128
|
+
--secondary-foreground: 0 0% 98%;
|
|
129
|
+
--muted: 240 3.7% 15.9%;
|
|
130
|
+
--muted-foreground: 240 5% 64.9%;
|
|
131
|
+
--accent: 240 3.7% 15.9%;
|
|
132
|
+
--accent-foreground: 0 0% 98%;
|
|
133
|
+
--destructive: 0 62.8% 30.6%;
|
|
134
|
+
--destructive-foreground: 0 85.7% 97.3%;
|
|
135
|
+
--border: 240 3.7% 15.9%;
|
|
136
|
+
--input: 240 3.7% 15.9%;
|
|
137
|
+
--ring: 240 4.9% 83.9%;
|
|
138
|
+
|
|
139
|
+
--chart-1: 220 70% 50%;
|
|
140
|
+
--chart-2: 160 60% 45%;
|
|
141
|
+
--chart-3: 30 80% 55%;
|
|
142
|
+
--chart-4: 280 65% 60%;
|
|
143
|
+
--chart-5: 340 75% 55%;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
*/
|
|
148
|
+
|
|
149
|
+
/* Theme Copy Example
|
|
150
|
+
|
|
151
|
+
@layer base {
|
|
152
|
+
:root {
|
|
153
|
+
--background: 0 0% 100%;
|
|
154
|
+
--foreground: 224 71.4% 4.1%;
|
|
155
|
+
--card: 0 0% 100%;
|
|
156
|
+
--card-foreground: 224 71.4% 4.1%;
|
|
157
|
+
--popover: 0 0% 100%;
|
|
158
|
+
--popover-foreground: 224 71.4% 4.1%;
|
|
159
|
+
--primary: 262.1 83.3% 57.8%;
|
|
160
|
+
--primary-foreground: 210 20% 98%;
|
|
161
|
+
--secondary: 220 14.3% 95.9%;
|
|
162
|
+
--secondary-foreground: 220.9 39.3% 11%;
|
|
163
|
+
--muted: 220 14.3% 95.9%;
|
|
164
|
+
--muted-foreground: 220 8.9% 46.1%;
|
|
165
|
+
--accent: 220 14.3% 95.9%;
|
|
166
|
+
--accent-foreground: 220.9 39.3% 11%;
|
|
167
|
+
--destructive: 360 84.2% 60.2%;
|
|
168
|
+
--destructive-foreground: 210 20% 98%;
|
|
169
|
+
--border: 220 13% 91%;
|
|
170
|
+
--input: 220 13% 91%;
|
|
171
|
+
--ring: 262.1 83.3% 57.8%;
|
|
172
|
+
--radius: 0.5rem;
|
|
173
|
+
--chart-1: ;
|
|
174
|
+
--chart-2: ;
|
|
175
|
+
--chart-3: ;
|
|
176
|
+
--chart-4: ;
|
|
177
|
+
--chart-5: ;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.dark {
|
|
181
|
+
--background: 224 71.4% 4.1%;
|
|
182
|
+
--foreground: 210 20% 98%;
|
|
183
|
+
--card: 224 71.4% 4.1%;
|
|
184
|
+
--card-foreground: 210 20% 98%;
|
|
185
|
+
--popover: 224 71.4% 4.1%;
|
|
186
|
+
--popover-foreground: 210 20% 98%;
|
|
187
|
+
--primary: 263.4 70% 50.4%;
|
|
188
|
+
--primary-foreground: 210 20% 98%;
|
|
189
|
+
--secondary: 215 27.9% 16.9%;
|
|
190
|
+
--secondary-foreground: 210 20% 98%;
|
|
191
|
+
--muted: 215 27.9% 16.9%;
|
|
192
|
+
--muted-foreground: 217.9 10.6% 64.9%;
|
|
193
|
+
--accent: 215 27.9% 16.9%;
|
|
194
|
+
--accent-foreground: 210 20% 98%;
|
|
195
|
+
--destructive: 360 84.2% 60.2%;
|
|
196
|
+
--destructive-foreground: 210 20% 98%;
|
|
197
|
+
--border: 215 27.9% 16.9%;
|
|
198
|
+
--input: 215 27.9% 16.9%;
|
|
199
|
+
--ring: 263.4 70% 50.4%;
|
|
200
|
+
--chart-1: ;
|
|
201
|
+
--chart-2: ;
|
|
202
|
+
--chart-3: ;
|
|
203
|
+
--chart-4: ;
|
|
204
|
+
--chart-5: ;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
/* Updated Playground page styles */
|
|
211
|
+
|
|
212
|
+
@layer base {
|
|
213
|
+
html {
|
|
214
|
+
font-family: 'Inter', sans-serif;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
body {
|
|
218
|
+
@apply !bg-background;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
h2.section-header {
|
|
223
|
+
@apply text-foreground py-4 text-2xl font-normal;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
h3.section-header {
|
|
227
|
+
@apply text-foreground py-3 text-xl;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.row {
|
|
231
|
+
@apply mb-6 flex flex-row flex-wrap rounded-md border py-10;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.example {
|
|
235
|
+
@apply flex-initial px-6;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.example2 {
|
|
239
|
+
@apply flex-initial px-4;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* Additional CSS edits to components */
|
|
243
|
+
|
|
244
|
+
/* Tooltip */
|
|
245
|
+
|
|
246
|
+
.TooltipContent[data-side='bottom'] {
|
|
247
|
+
animation-name: slideDown;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Custom CSS to hide default number input arrows */
|
|
251
|
+
input[type='number']::-webkit-inner-spin-button,
|
|
252
|
+
input[type='number']::-webkit-outer-spin-button {
|
|
253
|
+
@apply appearance-none;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
input[type='number'] {
|
|
257
|
+
-moz-appearance: textfield; /* For Firefox */
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* disabled class - used for icons and divs based on context */
|
|
261
|
+
.ohif-disabled {
|
|
262
|
+
pointer-events: none;
|
|
263
|
+
cursor: not-allowed;
|
|
264
|
+
user-select: none;
|
|
265
|
+
opacity: 0.5;
|
|
266
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "arctic",
|
|
3
|
+
"label": "Tonal: Arctic",
|
|
4
|
+
"cssVars": {
|
|
5
|
+
"dark": {
|
|
6
|
+
"highlight": "173 81% 52%",
|
|
7
|
+
"neutral": "185 20% 55%",
|
|
8
|
+
"neutral-light": "180 40% 78%",
|
|
9
|
+
"neutral-dark": "190 18% 22%",
|
|
10
|
+
"background": "0 0% 0%",
|
|
11
|
+
"foreground": "180 10% 97%",
|
|
12
|
+
"card": "203 39% 9%",
|
|
13
|
+
"card-foreground": "180 10% 97%",
|
|
14
|
+
"popover": "202 54% 11%",
|
|
15
|
+
"popover-foreground": "180 10% 97%",
|
|
16
|
+
"primary": "175 85% 42%",
|
|
17
|
+
"primary-foreground": "185 50% 8%",
|
|
18
|
+
"secondary": "180 45% 28%",
|
|
19
|
+
"secondary-foreground": "175 50% 88%",
|
|
20
|
+
"muted": "203 39% 9%",
|
|
21
|
+
"muted-foreground": "185 30% 60%",
|
|
22
|
+
"accent": "185 55% 18%",
|
|
23
|
+
"accent-foreground": "180 10% 97%",
|
|
24
|
+
"destructive": "0 65% 35%",
|
|
25
|
+
"destructive-foreground": "0 0% 98%",
|
|
26
|
+
"border": "190 25% 17%",
|
|
27
|
+
"input": "223 40% 24%",
|
|
28
|
+
"ring": "175 85% 42%"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "deep",
|
|
3
|
+
"label": "Neutral: Deep",
|
|
4
|
+
"cssVars": {
|
|
5
|
+
"dark": {
|
|
6
|
+
"highlight": "184 53% 54%",
|
|
7
|
+
"neutral": "215 15% 50%",
|
|
8
|
+
"neutral-light": "210 20% 68%",
|
|
9
|
+
"neutral-dark": "220 18% 22%",
|
|
10
|
+
"background": "0 0% 0%",
|
|
11
|
+
"foreground": "215 15% 82%",
|
|
12
|
+
"card": "218 25% 5%",
|
|
13
|
+
"card-foreground": "215 15% 82%",
|
|
14
|
+
"popover": "215 30% 8%",
|
|
15
|
+
"popover-foreground": "215 15% 82%",
|
|
16
|
+
"primary": "200 43% 48%",
|
|
17
|
+
"primary-foreground": "210 20% 92%",
|
|
18
|
+
"secondary": "218 30% 18%",
|
|
19
|
+
"secondary-foreground": "215 25% 75%",
|
|
20
|
+
"muted": "214 28% 5%",
|
|
21
|
+
"muted-foreground": "215 18% 48%",
|
|
22
|
+
"accent": "216 32% 12%",
|
|
23
|
+
"accent-foreground": "215 15% 82%",
|
|
24
|
+
"destructive": "0 50% 35%",
|
|
25
|
+
"destructive-foreground": "0 15% 90%",
|
|
26
|
+
"border": "218 22% 10%",
|
|
27
|
+
"input": "216 28% 15%",
|
|
28
|
+
"ring": "215 45% 42%"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import orchid from './orchid.json';
|
|
2
|
+
import arctic from './arctic.json';
|
|
3
|
+
import verdant from './verdant.json';
|
|
4
|
+
import midnight from './midnight.json';
|
|
5
|
+
import slate from './slate.json';
|
|
6
|
+
import deep from './deep.json';
|
|
7
|
+
|
|
8
|
+
export interface ThemePreset {
|
|
9
|
+
name: string;
|
|
10
|
+
label: string;
|
|
11
|
+
cssVars: {
|
|
12
|
+
dark: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const themePresets: ThemePreset[] = [orchid, arctic, verdant, midnight, slate, deep];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "midnight",
|
|
3
|
+
"label": "Neutral: Midnight",
|
|
4
|
+
"cssVars": {
|
|
5
|
+
"dark": {
|
|
6
|
+
"highlight": "188 90% 58%",
|
|
7
|
+
"neutral": "213 22% 59%",
|
|
8
|
+
"neutral-light": "214 69% 81%",
|
|
9
|
+
"neutral-dark": "214 16% 21%",
|
|
10
|
+
"background": "240 15% 3%",
|
|
11
|
+
"foreground": "0 0% 99%",
|
|
12
|
+
"card": "240 12% 8%",
|
|
13
|
+
"card-foreground": "0 0% 99%",
|
|
14
|
+
"popover": "225 45% 13%",
|
|
15
|
+
"popover-foreground": "0 0% 99%",
|
|
16
|
+
"primary": "210 100% 62%",
|
|
17
|
+
"primary-foreground": "0 0% 99%",
|
|
18
|
+
"secondary": "215 55% 32%",
|
|
19
|
+
"secondary-foreground": "200 60% 88%",
|
|
20
|
+
"muted": "240 12% 8%",
|
|
21
|
+
"muted-foreground": "210 40% 70%",
|
|
22
|
+
"accent": "220 65% 20%",
|
|
23
|
+
"accent-foreground": "0 0% 99%",
|
|
24
|
+
"destructive": "0 70% 35%",
|
|
25
|
+
"destructive-foreground": "0 0% 99%",
|
|
26
|
+
"border": "240 10% 18%",
|
|
27
|
+
"input": "225 35% 24%",
|
|
28
|
+
"ring": "210 100% 62%"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "orchid",
|
|
3
|
+
"label": "Tonal: Orchid",
|
|
4
|
+
"cssVars": {
|
|
5
|
+
"dark": {
|
|
6
|
+
"highlight": "292 75% 62%",
|
|
7
|
+
"neutral": "270 18% 55%",
|
|
8
|
+
"neutral-light": "275 35% 75%",
|
|
9
|
+
"neutral-dark": "268 20% 24%",
|
|
10
|
+
"background": "270 45% 6%",
|
|
11
|
+
"foreground": "280 15% 96%",
|
|
12
|
+
"card": "268 40% 10%",
|
|
13
|
+
"card-foreground": "280 15% 96%",
|
|
14
|
+
"popover": "264 48% 13%",
|
|
15
|
+
"popover-foreground": "280 15% 96%",
|
|
16
|
+
"primary": "270 85% 65%",
|
|
17
|
+
"primary-foreground": "0 0% 98%",
|
|
18
|
+
"secondary": "268 45% 32%",
|
|
19
|
+
"secondary-foreground": "275 45% 88%",
|
|
20
|
+
"muted": "268 40% 10%",
|
|
21
|
+
"muted-foreground": "272 30% 60%",
|
|
22
|
+
"accent": "268 50% 20%",
|
|
23
|
+
"accent-foreground": "280 15% 96%",
|
|
24
|
+
"destructive": "0 65% 40%",
|
|
25
|
+
"destructive-foreground": "0 0% 98%",
|
|
26
|
+
"border": "268 30% 18%",
|
|
27
|
+
"input": "268 40% 25%",
|
|
28
|
+
"ring": "270 80% 60%"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "slate",
|
|
3
|
+
"label": "Neutral: Slate",
|
|
4
|
+
"cssVars": {
|
|
5
|
+
"dark": {
|
|
6
|
+
"highlight": "217 97% 52%",
|
|
7
|
+
"neutral": "0 0% 55%",
|
|
8
|
+
"neutral-light": "0 0% 75%",
|
|
9
|
+
"neutral-dark": "0 0% 25%",
|
|
10
|
+
"background": "0 0% 0%",
|
|
11
|
+
"foreground": "0 0% 96%",
|
|
12
|
+
"card": "0 0% 7%",
|
|
13
|
+
"card-foreground": "0 0% 96%",
|
|
14
|
+
"popover": "0 0% 9%",
|
|
15
|
+
"popover-foreground": "0 0% 96%",
|
|
16
|
+
"primary": "230 75% 55%",
|
|
17
|
+
"primary-foreground": "0 0% 98%",
|
|
18
|
+
"secondary": "0 0% 25%",
|
|
19
|
+
"secondary-foreground": "0 0% 85%",
|
|
20
|
+
"muted": "0 0% 7%",
|
|
21
|
+
"muted-foreground": "0 0% 60%",
|
|
22
|
+
"accent": "0 0% 18%",
|
|
23
|
+
"accent-foreground": "0 0% 96%",
|
|
24
|
+
"destructive": "0 65% 40%",
|
|
25
|
+
"destructive-foreground": "0 0% 98%",
|
|
26
|
+
"border": "0 0% 18%",
|
|
27
|
+
"input": "0 0% 22%",
|
|
28
|
+
"ring": "215 75% 55%"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|