@morscherlab/mint-sdk 1.0.0-alpha.2
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/README.md +326 -0
- package/dist/__stories__/experiment-helpers.d.ts +25 -0
- package/dist/__tests__/components/AppLayout.test.d.ts +1 -0
- package/dist/__tests__/components/AppSidebar.test.d.ts +1 -0
- package/dist/__tests__/components/AppTopBar.test.d.ts +1 -0
- package/dist/__tests__/components/BaseInput.test.d.ts +1 -0
- package/dist/__tests__/components/BasePill.test.d.ts +1 -0
- package/dist/__tests__/components/Calendar.test.d.ts +1 -0
- package/dist/__tests__/components/CollapsibleCard.test.d.ts +1 -0
- package/dist/__tests__/components/DataFrame.test.d.ts +1 -0
- package/dist/__tests__/components/DropdownButton.test.d.ts +1 -0
- package/dist/__tests__/composables/formBuilderRegistry.test.d.ts +1 -0
- package/dist/__tests__/composables/useAppExperiment.test.d.ts +1 -0
- package/dist/__tests__/composables/useAuth.test.d.ts +1 -0
- package/dist/__tests__/composables/useAutoGroup.test.d.ts +1 -0
- package/dist/__tests__/composables/useExperimentData.test.d.ts +13 -0
- package/dist/__tests__/composables/useExperimentSave.test.d.ts +1 -0
- package/dist/__tests__/composables/useForm.test.d.ts +1 -0
- package/dist/__tests__/composables/useFormBuilder.test.d.ts +1 -0
- package/dist/__tests__/composables/usePlatformContext.test.d.ts +1 -0
- package/dist/__tests__/composables/usePluginApi.test.d.ts +13 -0
- package/dist/__tests__/composables/usePluginConfig.test.d.ts +14 -0
- package/dist/__tests__/utils/color.test.d.ts +1 -0
- package/dist/auth-BYmxZdJl.js +297 -0
- package/dist/auth-BYmxZdJl.js.map +1 -0
- package/dist/components/AlertBox.vue.d.ts +34 -0
- package/dist/components/AppAvatarMenu.vue.d.ts +58 -0
- package/dist/components/AppContainer.vue.d.ts +28 -0
- package/dist/components/AppLayout.vue.d.ts +31 -0
- package/dist/components/AppPageSelector.vue.d.ts +43 -0
- package/dist/components/AppPillNav.vue.d.ts +11 -0
- package/dist/components/AppPluginSwitcher.vue.d.ts +38 -0
- package/dist/components/AppSidebar.vue.d.ts +47 -0
- package/dist/components/AppTopBar.vue.d.ts +111 -0
- package/dist/components/AuditTrail.vue.d.ts +38 -0
- package/dist/components/AutoGroupModal.vue.d.ts +124 -0
- package/dist/components/Avatar.vue.d.ts +14 -0
- package/dist/components/BaseButton.vue.d.ts +37 -0
- package/dist/components/BaseCheckbox.vue.d.ts +17 -0
- package/dist/components/BaseInput.vue.d.ts +34 -0
- package/dist/components/BaseModal.vue.d.ts +46 -0
- package/dist/components/BasePill.vue.d.ts +57 -0
- package/dist/components/BaseRadioGroup.vue.d.ts +21 -0
- package/dist/components/BaseSelect.vue.d.ts +20 -0
- package/dist/components/BaseSlider.vue.d.ts +22 -0
- package/dist/components/BaseTabs.vue.d.ts +14 -0
- package/dist/components/BaseTextarea.vue.d.ts +30 -0
- package/dist/components/BaseToggle.vue.d.ts +19 -0
- package/dist/components/BatchProgressList.vue.d.ts +43 -0
- package/dist/components/Breadcrumb.vue.d.ts +33 -0
- package/dist/components/Calendar.vue.d.ts +107 -0
- package/dist/components/ChartContainer.vue.d.ts +31 -0
- package/dist/components/ChemicalFormula.vue.d.ts +8 -0
- package/dist/components/CollapsibleCard.vue.d.ts +41 -0
- package/dist/components/ColorSlider.vue.d.ts +34 -0
- package/dist/components/ConcentrationInput.vue.d.ts +25 -0
- package/dist/components/ConfirmDialog.vue.d.ts +42 -0
- package/dist/components/DataFrame.vue.d.ts +107 -0
- package/dist/components/DatePicker.vue.d.ts +25 -0
- package/dist/components/DateTimePicker.vue.d.ts +30 -0
- package/dist/components/Divider.vue.d.ts +14 -0
- package/dist/components/DoseCalculator.vue.d.ts +19 -0
- package/dist/components/DropdownButton.vue.d.ts +47 -0
- package/dist/components/EmptyState.vue.d.ts +36 -0
- package/dist/components/ExperimentCodeBadge.vue.d.ts +14 -0
- package/dist/components/ExperimentDataViewer.vue.d.ts +29 -0
- package/dist/components/ExperimentPopover.vue.d.ts +32 -0
- package/dist/components/ExperimentSelectorModal.vue.d.ts +28 -0
- package/dist/components/ExperimentTimeline.vue.d.ts +44 -0
- package/dist/components/FileUploader.vue.d.ts +40 -0
- package/dist/components/FitPanel.vue.d.ts +46 -0
- package/dist/components/FormActions.vue.d.ts +33 -0
- package/dist/components/FormBuilder.vue.d.ts +287 -0
- package/dist/components/FormField.vue.d.ts +28 -0
- package/dist/components/FormFieldRenderer.vue.d.ts +31 -0
- package/dist/components/FormSection.vue.d.ts +43 -0
- package/dist/components/FormulaInput.vue.d.ts +25 -0
- package/dist/components/GroupAssigner.vue.d.ts +25 -0
- package/dist/components/GroupingModal.vue.d.ts +12 -0
- package/dist/components/IconButton.vue.d.ts +34 -0
- package/dist/components/LoadingSpinner.vue.d.ts +12 -0
- package/dist/components/MoleculeInput.vue.d.ts +27 -0
- package/dist/components/MultiSelect.vue.d.ts +19 -0
- package/dist/components/NumberInput.vue.d.ts +22 -0
- package/dist/components/PlateMapEditor.vue.d.ts +50 -0
- package/dist/components/ProgressBar.vue.d.ts +23 -0
- package/dist/components/ProtocolStepEditor.vue.d.ts +24 -0
- package/dist/components/RackEditor.vue.d.ts +40 -0
- package/dist/components/ReagentEditor.vue.d.ts +30 -0
- package/dist/components/ReagentList.vue.d.ts +32 -0
- package/dist/components/ResourceCard.vue.d.ts +50 -0
- package/dist/components/SampleHierarchyTree.vue.d.ts +26 -0
- package/dist/components/SampleLegend.vue.d.ts +32 -0
- package/dist/components/SampleSelector.vue.d.ts +29 -0
- package/dist/components/ScheduleCalendar.vue.d.ts +110 -0
- package/dist/components/ScientificNumber.vue.d.ts +14 -0
- package/dist/components/SegmentedControl.vue.d.ts +20 -0
- package/dist/components/SequenceInput.vue.d.ts +54 -0
- package/dist/components/SettingsButton.vue.d.ts +30 -0
- package/dist/components/SettingsModal.vue.d.ts +36 -0
- package/dist/components/Skeleton.vue.d.ts +11 -0
- package/dist/components/StatusIndicator.vue.d.ts +13 -0
- package/dist/components/StepWizard.vue.d.ts +65 -0
- package/dist/components/TagsInput.vue.d.ts +39 -0
- package/dist/components/ThemeToggle.vue.d.ts +7 -0
- package/dist/components/TimePicker.vue.d.ts +29 -0
- package/dist/components/TimeRangeInput.vue.d.ts +27 -0
- package/dist/components/ToastNotification.vue.d.ts +2 -0
- package/dist/components/Tooltip.vue.d.ts +35 -0
- package/dist/components/UnitInput.vue.d.ts +39 -0
- package/dist/components/WellEditPopup.vue.d.ts +25 -0
- package/dist/components/WellPlate.vue.d.ts +73 -0
- package/dist/components/index.d.ts +87 -0
- package/dist/components/index.js +3 -0
- package/dist/components-CKf-UpGi.js +15089 -0
- package/dist/components-CKf-UpGi.js.map +1 -0
- package/dist/composables/experiment-utils.d.ts +8 -0
- package/dist/composables/formBuilderRegistry.d.ts +13 -0
- package/dist/composables/index.d.ts +28 -0
- package/dist/composables/index.js +3 -0
- package/dist/composables/useApi.d.ts +20 -0
- package/dist/composables/useAppExperiment.d.ts +37 -0
- package/dist/composables/useAsync.d.ts +128 -0
- package/dist/composables/useAuth.d.ts +47 -0
- package/dist/composables/useAutoGroup.d.ts +106 -0
- package/dist/composables/useChemicalFormula.d.ts +21 -0
- package/dist/composables/useConcentrationUnits.d.ts +29 -0
- package/dist/composables/useDoseCalculator.d.ts +58 -0
- package/dist/composables/useExperimentData.d.ts +18 -0
- package/dist/composables/useExperimentSave.d.ts +36 -0
- package/dist/composables/useExperimentSelector.d.ts +30 -0
- package/dist/composables/useForm.d.ts +92 -0
- package/dist/composables/useFormBuilder.d.ts +24 -0
- package/dist/composables/usePasskey.d.ts +10 -0
- package/dist/composables/usePlatformContext.d.ts +131 -0
- package/dist/composables/usePluginApi.d.ts +29 -0
- package/dist/composables/usePluginConfig.d.ts +13 -0
- package/dist/composables/useProtocolTemplates.d.ts +44 -0
- package/dist/composables/useRackEditor.d.ts +31 -0
- package/dist/composables/useReagentSeries.d.ts +23 -0
- package/dist/composables/useScheduleDrag.d.ts +78 -0
- package/dist/composables/useSequenceUtils.d.ts +14 -0
- package/dist/composables/useTheme.d.ts +8 -0
- package/dist/composables/useTimeUtils.d.ts +29 -0
- package/dist/composables/useToast.d.ts +22 -0
- package/dist/composables/useWellPlateEditor.d.ts +33 -0
- package/dist/composables-D0QfFzq1.js +805 -0
- package/dist/composables-D0QfFzq1.js.map +1 -0
- package/dist/histoire.setup.d.ts +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -0
- package/dist/install.d.ts +16 -0
- package/dist/install.js +23 -0
- package/dist/install.js.map +1 -0
- package/dist/stores/auth.d.ts +146 -0
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/index.js +2 -0
- package/dist/stores/settings.d.ts +75 -0
- package/dist/styles.css +29728 -0
- package/dist/tailwind.preset.d.ts +58 -0
- package/dist/tailwind.preset.js +66 -0
- package/dist/tailwind.preset.js.map +1 -0
- package/dist/types/auth.d.ts +42 -0
- package/dist/types/auto-group.d.ts +34 -0
- package/dist/types/components.d.ts +528 -0
- package/dist/types/form-builder.d.ts +167 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +0 -0
- package/dist/types/platform.d.ts +75 -0
- package/dist/useScheduleDrag-DAJueTbK.js +7181 -0
- package/dist/useScheduleDrag-DAJueTbK.js.map +1 -0
- package/dist/utils/color.d.ts +24 -0
- package/package.json +114 -0
- package/src/__stories__/experiment-helpers.ts +83 -0
- package/src/__tests__/components/AppLayout.test.ts +163 -0
- package/src/__tests__/components/AppSidebar.test.ts +292 -0
- package/src/__tests__/components/AppTopBar.test.ts +683 -0
- package/src/__tests__/components/BaseInput.test.ts +99 -0
- package/src/__tests__/components/BasePill.test.ts +291 -0
- package/src/__tests__/components/Calendar.test.ts +566 -0
- package/src/__tests__/components/CollapsibleCard.test.ts +524 -0
- package/src/__tests__/components/DataFrame.test.ts +767 -0
- package/src/__tests__/components/DropdownButton.test.ts +471 -0
- package/src/__tests__/composables/formBuilderRegistry.test.ts +187 -0
- package/src/__tests__/composables/useAppExperiment.test.ts +560 -0
- package/src/__tests__/composables/useAuth.test.ts +188 -0
- package/src/__tests__/composables/useAutoGroup.test.ts +860 -0
- package/src/__tests__/composables/useExperimentData.test.ts +127 -0
- package/src/__tests__/composables/useExperimentSave.test.ts +347 -0
- package/src/__tests__/composables/useForm.test.ts +205 -0
- package/src/__tests__/composables/useFormBuilder.test.ts +917 -0
- package/src/__tests__/composables/usePlatformContext.test.ts +116 -0
- package/src/__tests__/composables/usePluginApi.test.ts +81 -0
- package/src/__tests__/composables/usePluginConfig.test.ts +176 -0
- package/src/__tests__/utils/color.test.ts +96 -0
- package/src/components/AlertBox.story.vue +204 -0
- package/src/components/AlertBox.vue +88 -0
- package/src/components/AppAvatarMenu.story.vue +155 -0
- package/src/components/AppAvatarMenu.vue +184 -0
- package/src/components/AppContainer.story.vue +104 -0
- package/src/components/AppContainer.vue +34 -0
- package/src/components/AppLayout.story.vue +292 -0
- package/src/components/AppLayout.vue +75 -0
- package/src/components/AppPageSelector.vue +159 -0
- package/src/components/AppPillNav.vue +66 -0
- package/src/components/AppPluginSwitcher.vue +241 -0
- package/src/components/AppSidebar.story.vue +309 -0
- package/src/components/AppSidebar.vue +119 -0
- package/src/components/AppTopBar.story.vue +304 -0
- package/src/components/AppTopBar.vue +661 -0
- package/src/components/AuditTrail.story.vue +163 -0
- package/src/components/AuditTrail.vue +151 -0
- package/src/components/AutoGroupModal.story.vue +273 -0
- package/src/components/AutoGroupModal.vue +566 -0
- package/src/components/Avatar.story.vue +115 -0
- package/src/components/Avatar.vue +79 -0
- package/src/components/BaseButton.story.vue +96 -0
- package/src/components/BaseButton.vue +73 -0
- package/src/components/BaseCheckbox.story.vue +73 -0
- package/src/components/BaseCheckbox.vue +69 -0
- package/src/components/BaseInput.story.vue +98 -0
- package/src/components/BaseInput.vue +74 -0
- package/src/components/BaseModal.story.vue +237 -0
- package/src/components/BaseModal.vue +182 -0
- package/src/components/BasePill.story.vue +142 -0
- package/src/components/BasePill.vue +89 -0
- package/src/components/BaseRadioGroup.story.vue +145 -0
- package/src/components/BaseRadioGroup.vue +124 -0
- package/src/components/BaseSelect.story.vue +120 -0
- package/src/components/BaseSelect.vue +71 -0
- package/src/components/BaseSlider.story.vue +122 -0
- package/src/components/BaseSlider.vue +126 -0
- package/src/components/BaseTabs.story.vue +127 -0
- package/src/components/BaseTabs.vue +59 -0
- package/src/components/BaseTextarea.story.vue +91 -0
- package/src/components/BaseTextarea.vue +62 -0
- package/src/components/BaseToggle.story.vue +81 -0
- package/src/components/BaseToggle.vue +76 -0
- package/src/components/BatchProgressList.story.vue +92 -0
- package/src/components/BatchProgressList.vue +184 -0
- package/src/components/Breadcrumb.story.vue +106 -0
- package/src/components/Breadcrumb.vue +75 -0
- package/src/components/Calendar.story.vue +106 -0
- package/src/components/Calendar.vue +363 -0
- package/src/components/ChartContainer.story.vue +113 -0
- package/src/components/ChartContainer.vue +64 -0
- package/src/components/ChemicalFormula.story.vue +102 -0
- package/src/components/ChemicalFormula.vue +39 -0
- package/src/components/CollapsibleCard.story.vue +135 -0
- package/src/components/CollapsibleCard.vue +167 -0
- package/src/components/ColorSlider.story.vue +120 -0
- package/src/components/ColorSlider.vue +164 -0
- package/src/components/ConcentrationInput.story.vue +77 -0
- package/src/components/ConcentrationInput.vue +185 -0
- package/src/components/ConfirmDialog.story.vue +248 -0
- package/src/components/ConfirmDialog.vue +93 -0
- package/src/components/DataFrame.story.vue +148 -0
- package/src/components/DataFrame.vue +419 -0
- package/src/components/DatePicker.story.vue +119 -0
- package/src/components/DatePicker.vue +330 -0
- package/src/components/DateTimePicker.story.vue +112 -0
- package/src/components/DateTimePicker.vue +392 -0
- package/src/components/Divider.story.vue +80 -0
- package/src/components/Divider.vue +49 -0
- package/src/components/DoseCalculator.story.vue +68 -0
- package/src/components/DoseCalculator.vue +476 -0
- package/src/components/DropdownButton.story.vue +102 -0
- package/src/components/DropdownButton.vue +181 -0
- package/src/components/EmptyState.story.vue +135 -0
- package/src/components/EmptyState.vue +69 -0
- package/src/components/ExperimentCodeBadge.story.vue +77 -0
- package/src/components/ExperimentCodeBadge.vue +64 -0
- package/src/components/ExperimentDataViewer.story.vue +174 -0
- package/src/components/ExperimentDataViewer.vue +288 -0
- package/src/components/ExperimentPopover.story.vue +384 -0
- package/src/components/ExperimentPopover.vue +241 -0
- package/src/components/ExperimentSelectorModal.story.vue +391 -0
- package/src/components/ExperimentSelectorModal.vue +387 -0
- package/src/components/ExperimentTimeline.story.vue +161 -0
- package/src/components/ExperimentTimeline.vue +382 -0
- package/src/components/FileUploader.story.vue +107 -0
- package/src/components/FileUploader.vue +386 -0
- package/src/components/FitPanel.story.vue +125 -0
- package/src/components/FitPanel.vue +120 -0
- package/src/components/FormActions.vue +92 -0
- package/src/components/FormBuilder.vue +214 -0
- package/src/components/FormField.story.vue +132 -0
- package/src/components/FormField.vue +59 -0
- package/src/components/FormFieldRenderer.vue +58 -0
- package/src/components/FormSection.vue +90 -0
- package/src/components/FormulaInput.story.vue +96 -0
- package/src/components/FormulaInput.vue +125 -0
- package/src/components/GroupAssigner.story.vue +83 -0
- package/src/components/GroupAssigner.vue +284 -0
- package/src/components/GroupingModal.story.vue +52 -0
- package/src/components/GroupingModal.vue +422 -0
- package/src/components/IconButton.story.vue +135 -0
- package/src/components/IconButton.vue +73 -0
- package/src/components/LoadingSpinner.story.vue +70 -0
- package/src/components/LoadingSpinner.vue +50 -0
- package/src/components/MoleculeInput.story.vue +66 -0
- package/src/components/MoleculeInput.vue +426 -0
- package/src/components/MultiSelect.story.vue +132 -0
- package/src/components/MultiSelect.vue +118 -0
- package/src/components/NumberInput.story.vue +122 -0
- package/src/components/NumberInput.vue +160 -0
- package/src/components/PlateMapEditor.story.vue +92 -0
- package/src/components/PlateMapEditor.vue +513 -0
- package/src/components/ProgressBar.story.vue +148 -0
- package/src/components/ProgressBar.vue +114 -0
- package/src/components/ProtocolStepEditor.story.vue +69 -0
- package/src/components/ProtocolStepEditor.vue +522 -0
- package/src/components/RackEditor.story.vue +100 -0
- package/src/components/RackEditor.vue +371 -0
- package/src/components/ReagentEditor.story.vue +153 -0
- package/src/components/ReagentEditor.vue +418 -0
- package/src/components/ReagentList.story.vue +137 -0
- package/src/components/ReagentList.vue +463 -0
- package/src/components/ResourceCard.story.vue +150 -0
- package/src/components/ResourceCard.vue +161 -0
- package/src/components/SampleHierarchyTree.story.vue +161 -0
- package/src/components/SampleHierarchyTree.vue +256 -0
- package/src/components/SampleLegend.story.vue +91 -0
- package/src/components/SampleLegend.vue +119 -0
- package/src/components/SampleSelector.story.vue +111 -0
- package/src/components/SampleSelector.vue +1033 -0
- package/src/components/ScheduleCalendar.story.vue +195 -0
- package/src/components/ScheduleCalendar.vue +569 -0
- package/src/components/ScientificNumber.story.vue +127 -0
- package/src/components/ScientificNumber.vue +197 -0
- package/src/components/SegmentedControl.story.vue +132 -0
- package/src/components/SegmentedControl.vue +79 -0
- package/src/components/SequenceInput.story.vue +119 -0
- package/src/components/SequenceInput.vue +209 -0
- package/src/components/SettingsButton.story.vue +58 -0
- package/src/components/SettingsButton.vue +76 -0
- package/src/components/SettingsModal.story.vue +145 -0
- package/src/components/SettingsModal.vue +146 -0
- package/src/components/Skeleton.story.vue +141 -0
- package/src/components/Skeleton.vue +74 -0
- package/src/components/StatusIndicator.story.vue +99 -0
- package/src/components/StatusIndicator.vue +40 -0
- package/src/components/StepWizard.story.vue +155 -0
- package/src/components/StepWizard.vue +223 -0
- package/src/components/TagsInput.story.vue +155 -0
- package/src/components/TagsInput.vue +265 -0
- package/src/components/ThemeToggle.story.vue +36 -0
- package/src/components/ThemeToggle.vue +54 -0
- package/src/components/TimePicker.story.vue +96 -0
- package/src/components/TimePicker.vue +273 -0
- package/src/components/TimeRangeInput.story.vue +104 -0
- package/src/components/TimeRangeInput.vue +122 -0
- package/src/components/ToastNotification.story.vue +157 -0
- package/src/components/ToastNotification.vue +62 -0
- package/src/components/Tooltip.story.vue +138 -0
- package/src/components/Tooltip.vue +119 -0
- package/src/components/UnitInput.story.vue +194 -0
- package/src/components/UnitInput.vue +213 -0
- package/src/components/WellEditPopup.vue +234 -0
- package/src/components/WellPlate.story.vue +282 -0
- package/src/components/WellPlate.vue +830 -0
- package/src/components/index.ts +118 -0
- package/src/composables/experiment-utils.ts +57 -0
- package/src/composables/formBuilderRegistry.ts +79 -0
- package/src/composables/index.ts +140 -0
- package/src/composables/useApi.ts +167 -0
- package/src/composables/useAppExperiment.ts +159 -0
- package/src/composables/useAsync.ts +323 -0
- package/src/composables/useAuth.ts +445 -0
- package/src/composables/useAutoGroup.ts +641 -0
- package/src/composables/useChemicalFormula.ts +275 -0
- package/src/composables/useConcentrationUnits.ts +246 -0
- package/src/composables/useDoseCalculator.ts +370 -0
- package/src/composables/useExperimentData.ts +86 -0
- package/src/composables/useExperimentSave.ts +192 -0
- package/src/composables/useExperimentSelector.ts +292 -0
- package/src/composables/useForm.ts +416 -0
- package/src/composables/useFormBuilder.ts +383 -0
- package/src/composables/usePasskey.ts +216 -0
- package/src/composables/usePlatformContext.ts +299 -0
- package/src/composables/usePluginApi.ts +39 -0
- package/src/composables/usePluginConfig.ts +93 -0
- package/src/composables/useProtocolTemplates.ts +518 -0
- package/src/composables/useRackEditor.ts +222 -0
- package/src/composables/useReagentSeries.ts +91 -0
- package/src/composables/useScheduleDrag.ts +245 -0
- package/src/composables/useSequenceUtils.ts +105 -0
- package/src/composables/useTheme.ts +58 -0
- package/src/composables/useTimeUtils.ts +131 -0
- package/src/composables/useToast.ts +40 -0
- package/src/composables/useWellPlateEditor.ts +421 -0
- package/src/histoire.setup.ts +17 -0
- package/src/index.ts +367 -0
- package/src/install.ts +32 -0
- package/src/stores/auth.ts +152 -0
- package/src/stores/index.ts +2 -0
- package/src/stores/settings.ts +218 -0
- package/src/styles/components/alert-box.css +150 -0
- package/src/styles/components/app-avatar-menu.css +155 -0
- package/src/styles/components/app-container.css +33 -0
- package/src/styles/components/app-layout.css +98 -0
- package/src/styles/components/app-page-selector.css +191 -0
- package/src/styles/components/app-pill-nav.css +57 -0
- package/src/styles/components/app-plugin-switcher.css +209 -0
- package/src/styles/components/app-sidebar.css +145 -0
- package/src/styles/components/app-top-bar.css +492 -0
- package/src/styles/components/audit-trail.css +143 -0
- package/src/styles/components/auto-group-modal.css +644 -0
- package/src/styles/components/avatar.css +73 -0
- package/src/styles/components/batch-progress-list.css +196 -0
- package/src/styles/components/breadcrumb.css +64 -0
- package/src/styles/components/button.css +188 -0
- package/src/styles/components/calendar.css +192 -0
- package/src/styles/components/chart-container.css +69 -0
- package/src/styles/components/checkbox.css +123 -0
- package/src/styles/components/chemical-formula.css +46 -0
- package/src/styles/components/collapsible-card.css +253 -0
- package/src/styles/components/color-slider.css +110 -0
- package/src/styles/components/concentration-input.css +156 -0
- package/src/styles/components/confirm-dialog.css +183 -0
- package/src/styles/components/dataframe.css +382 -0
- package/src/styles/components/date-picker.css +243 -0
- package/src/styles/components/datetime-picker.css +229 -0
- package/src/styles/components/divider.css +63 -0
- package/src/styles/components/dose-calculator.css +301 -0
- package/src/styles/components/dropdown-button.css +280 -0
- package/src/styles/components/empty-state.css +151 -0
- package/src/styles/components/experiment-code-badge.css +33 -0
- package/src/styles/components/experiment-data-viewer.css +138 -0
- package/src/styles/components/experiment-popover.css +562 -0
- package/src/styles/components/experiment-selector-modal.css +285 -0
- package/src/styles/components/experiment-timeline.css +529 -0
- package/src/styles/components/file-uploader.css +310 -0
- package/src/styles/components/fit-panel.css +67 -0
- package/src/styles/components/form-builder.css +69 -0
- package/src/styles/components/form-field.css +48 -0
- package/src/styles/components/formula-input.css +103 -0
- package/src/styles/components/group-assigner.css +200 -0
- package/src/styles/components/grouping-modal.css +323 -0
- package/src/styles/components/icon-button.css +192 -0
- package/src/styles/components/input.css +66 -0
- package/src/styles/components/loading-spinner.css +67 -0
- package/src/styles/components/modal.css +350 -0
- package/src/styles/components/molecule-input.css +186 -0
- package/src/styles/components/multi-select.css +131 -0
- package/src/styles/components/number-input.css +199 -0
- package/src/styles/components/pill.css +188 -0
- package/src/styles/components/plate-map-editor.css +464 -0
- package/src/styles/components/progress-bar.css +133 -0
- package/src/styles/components/protocol-step-editor.css +449 -0
- package/src/styles/components/rack-editor.css +265 -0
- package/src/styles/components/radio-group.css +240 -0
- package/src/styles/components/reagent-editor.css +510 -0
- package/src/styles/components/reagent-list.css +407 -0
- package/src/styles/components/resource-card.css +360 -0
- package/src/styles/components/sample-hierarchy-tree.css +314 -0
- package/src/styles/components/sample-legend.css +201 -0
- package/src/styles/components/sample-selector.css +751 -0
- package/src/styles/components/schedule-calendar.css +478 -0
- package/src/styles/components/scientific-number.css +63 -0
- package/src/styles/components/segmented-control.css +197 -0
- package/src/styles/components/select.css +77 -0
- package/src/styles/components/sequence-input.css +184 -0
- package/src/styles/components/settings-button.css +94 -0
- package/src/styles/components/settings-modal.css +95 -0
- package/src/styles/components/skeleton.css +49 -0
- package/src/styles/components/slider.css +74 -0
- package/src/styles/components/status-indicator.css +66 -0
- package/src/styles/components/step-wizard.css +192 -0
- package/src/styles/components/tabs.css +95 -0
- package/src/styles/components/tags-input.css +195 -0
- package/src/styles/components/textarea.css +82 -0
- package/src/styles/components/theme-toggle.css +69 -0
- package/src/styles/components/time-picker.css +171 -0
- package/src/styles/components/time-range-input.css +42 -0
- package/src/styles/components/toast.css +91 -0
- package/src/styles/components/toggle.css +146 -0
- package/src/styles/components/tooltip.css +91 -0
- package/src/styles/components/unit-input.css +123 -0
- package/src/styles/components/well-edit-popup.css +252 -0
- package/src/styles/components/well-plate.css +307 -0
- package/src/styles/index.css +87 -0
- package/src/styles/variables.css +1117 -0
- package/src/tailwind.preset.ts +61 -0
- package/src/types/auth.ts +55 -0
- package/src/types/auto-group.ts +40 -0
- package/src/types/components.ts +710 -0
- package/src/types/form-builder.ts +197 -0
- package/src/types/index.ts +207 -0
- package/src/types/platform.ts +116 -0
- package/src/utils/color.ts +96 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ToastNotification from './ToastNotification.vue'
|
|
3
|
+
import { useToast } from '../composables/useToast'
|
|
4
|
+
|
|
5
|
+
const toast = useToast()
|
|
6
|
+
|
|
7
|
+
function showSuccess() {
|
|
8
|
+
toast.success('Analysis completed successfully.')
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function showError() {
|
|
12
|
+
toast.error('Failed to process plate data. Please try again.')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function showWarning() {
|
|
16
|
+
toast.warning('3 wells have missing sample assignments.')
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function showInfo() {
|
|
20
|
+
toast.info('Export file is being generated...')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function showAll() {
|
|
24
|
+
toast.success('Experiment saved.')
|
|
25
|
+
setTimeout(() => toast.info('Syncing with platform...'), 300)
|
|
26
|
+
setTimeout(() => toast.warning('Low disk space detected.'), 600)
|
|
27
|
+
setTimeout(() => toast.error('Connection timeout on retry.'), 900)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function triggerLongToast(type: 'success' | 'error') {
|
|
31
|
+
const duration = type === 'success' ? 4000 : 6000
|
|
32
|
+
toast.show(`Progress bar TTL demo — ${duration}ms`, type, duration)
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<Story title="Feedback/ToastNotification">
|
|
38
|
+
<Variant title="Playground">
|
|
39
|
+
<template #default="{ state }">
|
|
40
|
+
<div style="padding: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem;">
|
|
41
|
+
<p style="margin: 0; color: var(--text-muted, #94a3b8); font-size: 0.875rem;">
|
|
42
|
+
Click a button to trigger a toast notification.
|
|
43
|
+
</p>
|
|
44
|
+
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;">
|
|
45
|
+
<button
|
|
46
|
+
type="button"
|
|
47
|
+
style="padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; background: #10b981; color: #fff; cursor: pointer; font-size: 0.875rem;"
|
|
48
|
+
@click="toast.success(state.message || 'Success!')"
|
|
49
|
+
>
|
|
50
|
+
Success
|
|
51
|
+
</button>
|
|
52
|
+
<button
|
|
53
|
+
type="button"
|
|
54
|
+
style="padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; background: #ef4444; color: #fff; cursor: pointer; font-size: 0.875rem;"
|
|
55
|
+
@click="toast.error(state.message || 'Error!')"
|
|
56
|
+
>
|
|
57
|
+
Error
|
|
58
|
+
</button>
|
|
59
|
+
<button
|
|
60
|
+
type="button"
|
|
61
|
+
style="padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; background: #f59e0b; color: #fff; cursor: pointer; font-size: 0.875rem;"
|
|
62
|
+
@click="toast.warning(state.message || 'Warning!')"
|
|
63
|
+
>
|
|
64
|
+
Warning
|
|
65
|
+
</button>
|
|
66
|
+
<button
|
|
67
|
+
type="button"
|
|
68
|
+
style="padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; background: #3b82f6; color: #fff; cursor: pointer; font-size: 0.875rem;"
|
|
69
|
+
@click="toast.info(state.message || 'Info!')"
|
|
70
|
+
>
|
|
71
|
+
Info
|
|
72
|
+
</button>
|
|
73
|
+
</div>
|
|
74
|
+
<ToastNotification />
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<template #controls="{ state }">
|
|
79
|
+
<HstText v-model="state.message" title="Message" />
|
|
80
|
+
</template>
|
|
81
|
+
</Variant>
|
|
82
|
+
|
|
83
|
+
<Variant title="All Types">
|
|
84
|
+
<div style="padding: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem;">
|
|
85
|
+
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;">
|
|
86
|
+
<button
|
|
87
|
+
type="button"
|
|
88
|
+
style="padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; background: #10b981; color: #fff; cursor: pointer; font-size: 0.875rem;"
|
|
89
|
+
@click="showSuccess"
|
|
90
|
+
>
|
|
91
|
+
Success Toast
|
|
92
|
+
</button>
|
|
93
|
+
<button
|
|
94
|
+
type="button"
|
|
95
|
+
style="padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; background: #ef4444; color: #fff; cursor: pointer; font-size: 0.875rem;"
|
|
96
|
+
@click="showError"
|
|
97
|
+
>
|
|
98
|
+
Error Toast
|
|
99
|
+
</button>
|
|
100
|
+
<button
|
|
101
|
+
type="button"
|
|
102
|
+
style="padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; background: #f59e0b; color: #fff; cursor: pointer; font-size: 0.875rem;"
|
|
103
|
+
@click="showWarning"
|
|
104
|
+
>
|
|
105
|
+
Warning Toast
|
|
106
|
+
</button>
|
|
107
|
+
<button
|
|
108
|
+
type="button"
|
|
109
|
+
style="padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; background: #3b82f6; color: #fff; cursor: pointer; font-size: 0.875rem;"
|
|
110
|
+
@click="showInfo"
|
|
111
|
+
>
|
|
112
|
+
Info Toast
|
|
113
|
+
</button>
|
|
114
|
+
</div>
|
|
115
|
+
<ToastNotification />
|
|
116
|
+
</div>
|
|
117
|
+
</Variant>
|
|
118
|
+
|
|
119
|
+
<Variant title="Multiple Toasts">
|
|
120
|
+
<div style="padding: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem;">
|
|
121
|
+
<button
|
|
122
|
+
type="button"
|
|
123
|
+
style="padding: 0.5rem 1rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: 0.375rem; background: var(--bg-card, #fff); color: var(--text-primary, #1e293b); cursor: pointer; font-size: 0.875rem;"
|
|
124
|
+
@click="showAll"
|
|
125
|
+
>
|
|
126
|
+
Show All Types (stacked)
|
|
127
|
+
</button>
|
|
128
|
+
<p style="margin: 0; color: var(--text-muted, #94a3b8); font-size: 0.75rem;">
|
|
129
|
+
Click to see multiple toasts stacked. Click any toast to dismiss it.
|
|
130
|
+
</p>
|
|
131
|
+
<ToastNotification />
|
|
132
|
+
</div>
|
|
133
|
+
</Variant>
|
|
134
|
+
<Variant title="Progress bar — 4s / 6s TTL">
|
|
135
|
+
<div style="padding: 2rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;">
|
|
136
|
+
<button
|
|
137
|
+
type="button"
|
|
138
|
+
style="padding: 0.5rem 1rem; border-radius: 0.375rem; background: var(--mint-success); color: white; border: none; cursor: pointer;"
|
|
139
|
+
@click="triggerLongToast('success')"
|
|
140
|
+
>
|
|
141
|
+
Show success (4s)
|
|
142
|
+
</button>
|
|
143
|
+
<button
|
|
144
|
+
type="button"
|
|
145
|
+
style="padding: 0.5rem 1rem; border-radius: 0.375rem; background: var(--mint-error); color: white; border: none; cursor: pointer;"
|
|
146
|
+
@click="triggerLongToast('error')"
|
|
147
|
+
>
|
|
148
|
+
Show error (6s)
|
|
149
|
+
</button>
|
|
150
|
+
<p style="margin: 0; font-size: 0.8125rem; color: var(--text-muted);">
|
|
151
|
+
Watch the bottom progress bar shrink over the toast's TTL.
|
|
152
|
+
</p>
|
|
153
|
+
<ToastNotification />
|
|
154
|
+
</div>
|
|
155
|
+
</Variant>
|
|
156
|
+
</Story>
|
|
157
|
+
</template>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/** Teleported toast stack driven by useToast, with auto-dismiss progress bar and click-to-close on each notification. */
|
|
3
|
+
import { useToast } from '../composables/useToast'
|
|
4
|
+
import type { Toast } from '../types'
|
|
5
|
+
|
|
6
|
+
const { toasts, dismiss } = useToast()
|
|
7
|
+
|
|
8
|
+
const accentColors: Record<Toast['type'], string> = {
|
|
9
|
+
success: '#10B981',
|
|
10
|
+
error: '#EF4444',
|
|
11
|
+
warning: '#F59E0B',
|
|
12
|
+
info: '#3B82F6',
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<Teleport to="body">
|
|
18
|
+
<div class="mld-toast__container">
|
|
19
|
+
<TransitionGroup name="toast">
|
|
20
|
+
<div
|
|
21
|
+
v-for="toast in toasts"
|
|
22
|
+
:key="toast.id"
|
|
23
|
+
:class="['mld-toast__item', `mld-toast__item--${toast.type}`]"
|
|
24
|
+
:style="{
|
|
25
|
+
borderLeftColor: accentColors[toast.type],
|
|
26
|
+
}"
|
|
27
|
+
role="alert"
|
|
28
|
+
@click="dismiss(toast.id)"
|
|
29
|
+
>
|
|
30
|
+
<!-- Lucide circle-check -->
|
|
31
|
+
<svg v-if="toast.type === 'success'" class="mld-toast__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" :style="{ color: accentColors[toast.type] }">
|
|
32
|
+
<circle cx="12" cy="12" r="10" /><path d="m9 12 2 2 4-4" />
|
|
33
|
+
</svg>
|
|
34
|
+
<!-- Lucide circle-x -->
|
|
35
|
+
<svg v-else-if="toast.type === 'error'" class="mld-toast__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" :style="{ color: accentColors[toast.type] }">
|
|
36
|
+
<circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" />
|
|
37
|
+
</svg>
|
|
38
|
+
<!-- Lucide triangle-alert -->
|
|
39
|
+
<svg v-else-if="toast.type === 'warning'" class="mld-toast__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" :style="{ color: accentColors[toast.type] }">
|
|
40
|
+
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /><path d="M12 9v4" /><path d="M12 17h.01" />
|
|
41
|
+
</svg>
|
|
42
|
+
<!-- Lucide info -->
|
|
43
|
+
<svg v-else class="mld-toast__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" :style="{ color: accentColors[toast.type] }">
|
|
44
|
+
<circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" />
|
|
45
|
+
</svg>
|
|
46
|
+
<span class="mld-toast__message">{{ toast.message }}</span>
|
|
47
|
+
<span
|
|
48
|
+
class="mld-toast__progress"
|
|
49
|
+
:style="{
|
|
50
|
+
backgroundColor: accentColors[toast.type],
|
|
51
|
+
animationDuration: `${toast.duration ?? 3500}ms`,
|
|
52
|
+
}"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</TransitionGroup>
|
|
56
|
+
</div>
|
|
57
|
+
</Teleport>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<style>
|
|
61
|
+
@import '../styles/components/toast.css';
|
|
62
|
+
</style>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import Tooltip from './Tooltip.vue'
|
|
3
|
+
|
|
4
|
+
const positions: ('top' | 'bottom' | 'left' | 'right')[] = ['top', 'bottom', 'left', 'right']
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<Story title="Data Display/Tooltip">
|
|
9
|
+
<Variant title="Playground">
|
|
10
|
+
<template #default="{ state }">
|
|
11
|
+
<div style="padding: 4rem; display: flex; align-items: center; justify-content: center;">
|
|
12
|
+
<Tooltip :text="state.text" :position="state.position" :delay="state.delay">
|
|
13
|
+
<button
|
|
14
|
+
type="button"
|
|
15
|
+
style="padding: 0.5rem 1rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: 0.375rem; background: var(--bg-card, #fff); color: var(--text-primary, #1e293b); cursor: pointer;"
|
|
16
|
+
>
|
|
17
|
+
Hover me
|
|
18
|
+
</button>
|
|
19
|
+
</Tooltip>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<template #controls="{ state }">
|
|
24
|
+
<HstText v-model="state.text" title="Tooltip Text" />
|
|
25
|
+
<HstSelect
|
|
26
|
+
v-model="state.position"
|
|
27
|
+
title="Position"
|
|
28
|
+
:options="positions.map(p => ({ label: p, value: p }))"
|
|
29
|
+
/>
|
|
30
|
+
<HstSlider v-model="state.delay" title="Delay (ms)" :min="0" :max="1000" :step="50" />
|
|
31
|
+
</template>
|
|
32
|
+
</Variant>
|
|
33
|
+
|
|
34
|
+
<Variant title="All Positions">
|
|
35
|
+
<div style="padding: 6rem; display: flex; gap: 3rem; align-items: center; justify-content: center; flex-wrap: wrap;">
|
|
36
|
+
<Tooltip
|
|
37
|
+
v-for="pos in positions"
|
|
38
|
+
:key="pos"
|
|
39
|
+
:text="`Tooltip on ${pos}`"
|
|
40
|
+
:position="pos"
|
|
41
|
+
:delay="100"
|
|
42
|
+
>
|
|
43
|
+
<button
|
|
44
|
+
type="button"
|
|
45
|
+
style="padding: 0.5rem 1rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: 0.375rem; background: var(--bg-card, #fff); color: var(--text-primary, #1e293b); cursor: pointer; min-width: 100px; text-align: center;"
|
|
46
|
+
>
|
|
47
|
+
{{ pos }}
|
|
48
|
+
</button>
|
|
49
|
+
</Tooltip>
|
|
50
|
+
</div>
|
|
51
|
+
</Variant>
|
|
52
|
+
|
|
53
|
+
<Variant title="On Text Content">
|
|
54
|
+
<div style="padding: 4rem; max-width: 500px; margin: 0 auto; line-height: 1.8; color: var(--text-primary, #1e293b);">
|
|
55
|
+
<p style="margin: 0;">
|
|
56
|
+
The experiment used
|
|
57
|
+
<Tooltip text="Dimethyl sulfoxide - a polar aprotic solvent" position="top" :delay="100">
|
|
58
|
+
<span style="text-decoration: underline dotted; cursor: help; color: var(--mint-primary, #3B82F6);">DMSO</span>
|
|
59
|
+
</Tooltip>
|
|
60
|
+
as the vehicle control. Samples were incubated at
|
|
61
|
+
<Tooltip text="Standard mammalian cell culture temperature" position="top" :delay="100">
|
|
62
|
+
<span style="text-decoration: underline dotted; cursor: help; color: var(--mint-primary, #3B82F6);">37 C</span>
|
|
63
|
+
</Tooltip>
|
|
64
|
+
for 24 hours before
|
|
65
|
+
<Tooltip text="3-(4,5-dimethylthiazol-2-yl)-2,5-diphenyltetrazolium bromide" position="top" :delay="100">
|
|
66
|
+
<span style="text-decoration: underline dotted; cursor: help; color: var(--mint-primary, #3B82F6);">MTT</span>
|
|
67
|
+
</Tooltip>
|
|
68
|
+
assay readout.
|
|
69
|
+
</p>
|
|
70
|
+
</div>
|
|
71
|
+
</Variant>
|
|
72
|
+
|
|
73
|
+
<Variant title="On Icon Buttons">
|
|
74
|
+
<div style="padding: 4rem; display: flex; gap: 1rem; align-items: center; justify-content: center;">
|
|
75
|
+
<Tooltip text="Add new sample" position="bottom" :delay="100">
|
|
76
|
+
<button type="button" style="padding: 0.5rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: 0.375rem; background: var(--bg-card, #fff); cursor: pointer; display: flex; align-items: center; justify-content: center;">
|
|
77
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
78
|
+
<path d="M12 5v14M5 12h14" />
|
|
79
|
+
</svg>
|
|
80
|
+
</button>
|
|
81
|
+
</Tooltip>
|
|
82
|
+
<Tooltip text="Export results" position="bottom" :delay="100">
|
|
83
|
+
<button type="button" style="padding: 0.5rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: 0.375rem; background: var(--bg-card, #fff); cursor: pointer; display: flex; align-items: center; justify-content: center;">
|
|
84
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
85
|
+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
|
|
86
|
+
<polyline points="7 10 12 15 17 10" />
|
|
87
|
+
<line x1="12" y1="15" x2="12" y2="3" />
|
|
88
|
+
</svg>
|
|
89
|
+
</button>
|
|
90
|
+
</Tooltip>
|
|
91
|
+
<Tooltip text="Delete experiment" position="bottom" :delay="100">
|
|
92
|
+
<button type="button" style="padding: 0.5rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: 0.375rem; background: var(--bg-card, #fff); cursor: pointer; display: flex; align-items: center; justify-content: center; color: #ef4444;">
|
|
93
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
94
|
+
<polyline points="3 6 5 6 21 6" />
|
|
95
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
|
|
96
|
+
</svg>
|
|
97
|
+
</button>
|
|
98
|
+
</Tooltip>
|
|
99
|
+
</div>
|
|
100
|
+
</Variant>
|
|
101
|
+
|
|
102
|
+
<Variant title="Shortcut chip">
|
|
103
|
+
<div style="padding: 4rem 2rem; display: flex; gap: 2rem; justify-content: center;">
|
|
104
|
+
<Tooltip text="Save file" shortcut="⌘S">
|
|
105
|
+
<button style="padding: 0.5rem 1rem; border-radius: 0.375rem; border: 1px solid var(--border-color); background: var(--bg-card); cursor: pointer;">Save</button>
|
|
106
|
+
</Tooltip>
|
|
107
|
+
<Tooltip text="Run analysis" shortcut="⌘↵" position="bottom">
|
|
108
|
+
<button style="padding: 0.5rem 1rem; border-radius: 0.375rem; border: 1px solid var(--border-color); background: var(--bg-card); cursor: pointer;">Run</button>
|
|
109
|
+
</Tooltip>
|
|
110
|
+
<Tooltip text="Next cell" shortcut="J">
|
|
111
|
+
<button style="padding: 0.5rem 1rem; border-radius: 0.375rem; border: 1px solid var(--border-color); background: var(--bg-card); cursor: pointer;">Next</button>
|
|
112
|
+
</Tooltip>
|
|
113
|
+
</div>
|
|
114
|
+
</Variant>
|
|
115
|
+
|
|
116
|
+
<Variant title="Multi-line (maxWidth)">
|
|
117
|
+
<div style="padding: 4rem 2rem; display: flex; justify-content: center;">
|
|
118
|
+
<Tooltip
|
|
119
|
+
text="This action will permanently remove all associated analysis results and cannot be undone. Affected wells: C2, C3, C4."
|
|
120
|
+
:max-width="260"
|
|
121
|
+
>
|
|
122
|
+
<button style="padding: 0.5rem 1rem; border-radius: 0.375rem; border: 1px solid var(--mint-error); color: var(--mint-error); background: transparent; cursor: pointer;">Delete experiment</button>
|
|
123
|
+
</Tooltip>
|
|
124
|
+
</div>
|
|
125
|
+
</Variant>
|
|
126
|
+
|
|
127
|
+
<Variant title="Auto-flip near viewport edge">
|
|
128
|
+
<div style="padding: 4rem 2rem; display: flex; justify-content: space-between; align-items: center; min-height: 100px;">
|
|
129
|
+
<Tooltip text="Wants to be on the left but will flip right" position="left">
|
|
130
|
+
<button style="padding: 0.5rem 1rem; border-radius: 0.375rem; border: 1px solid var(--border-color); background: var(--bg-card); cursor: pointer;">Left edge</button>
|
|
131
|
+
</Tooltip>
|
|
132
|
+
<Tooltip text="Wants to be on the right but will flip left" position="right">
|
|
133
|
+
<button style="padding: 0.5rem 1rem; border-radius: 0.375rem; border: 1px solid var(--border-color); background: var(--bg-card); cursor: pointer;">Right edge</button>
|
|
134
|
+
</Tooltip>
|
|
135
|
+
</div>
|
|
136
|
+
</Variant>
|
|
137
|
+
</Story>
|
|
138
|
+
</template>
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/** Floating tooltip using @floating-ui with auto-flip, delay, optional keyboard shortcut badge, and body Teleport. */
|
|
3
|
+
import { ref, onBeforeUnmount, nextTick } from 'vue'
|
|
4
|
+
import { computePosition, flip, offset, shift, type Placement } from '@floating-ui/dom'
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
text: string
|
|
8
|
+
position?: 'top' | 'bottom' | 'left' | 'right'
|
|
9
|
+
delay?: number
|
|
10
|
+
shortcut?: string
|
|
11
|
+
maxWidth?: string | number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
+
position: 'top',
|
|
16
|
+
delay: 200,
|
|
17
|
+
shortcut: undefined,
|
|
18
|
+
maxWidth: undefined,
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const tooltipId = `mld-tooltip-${Math.random().toString(36).slice(2, 9)}`
|
|
22
|
+
const visible = ref(false)
|
|
23
|
+
const actualPlacement = ref<Placement>(props.position)
|
|
24
|
+
const triggerRef = ref<HTMLElement | null>(null)
|
|
25
|
+
const contentRef = ref<HTMLElement | null>(null)
|
|
26
|
+
const coords = ref({ top: '0px', left: '0px' })
|
|
27
|
+
let timeoutId: ReturnType<typeof setTimeout> | undefined
|
|
28
|
+
|
|
29
|
+
async function updatePosition() {
|
|
30
|
+
if (!triggerRef.value || !contentRef.value) return
|
|
31
|
+
|
|
32
|
+
const { x, y, placement } = await computePosition(triggerRef.value, contentRef.value, {
|
|
33
|
+
placement: props.position,
|
|
34
|
+
middleware: [
|
|
35
|
+
offset(6),
|
|
36
|
+
flip(),
|
|
37
|
+
shift({ padding: 8 }),
|
|
38
|
+
],
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
coords.value = { top: `${y}px`, left: `${x}px` }
|
|
42
|
+
actualPlacement.value = placement
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function addListeners() {
|
|
46
|
+
window.addEventListener('scroll', updatePosition, { passive: true, capture: true })
|
|
47
|
+
window.addEventListener('resize', updatePosition)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function removeListeners() {
|
|
51
|
+
window.removeEventListener('scroll', updatePosition, { capture: true })
|
|
52
|
+
window.removeEventListener('resize', updatePosition)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function show() {
|
|
56
|
+
timeoutId = setTimeout(async () => {
|
|
57
|
+
visible.value = true
|
|
58
|
+
await nextTick()
|
|
59
|
+
await updatePosition()
|
|
60
|
+
addListeners()
|
|
61
|
+
}, props.delay)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function hide() {
|
|
65
|
+
clearTimeout(timeoutId)
|
|
66
|
+
timeoutId = undefined
|
|
67
|
+
visible.value = false
|
|
68
|
+
removeListeners()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
onBeforeUnmount(() => {
|
|
72
|
+
clearTimeout(timeoutId)
|
|
73
|
+
removeListeners()
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
function resolvedMaxWidth(value: string | number | undefined): string | undefined {
|
|
77
|
+
if (value === undefined) return undefined
|
|
78
|
+
return typeof value === 'number' ? `${value}px` : value
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<template>
|
|
83
|
+
<span
|
|
84
|
+
ref="triggerRef"
|
|
85
|
+
class="mld-tooltip"
|
|
86
|
+
:aria-describedby="visible ? tooltipId : undefined"
|
|
87
|
+
@mouseenter="show"
|
|
88
|
+
@mouseleave="hide"
|
|
89
|
+
@focusin="show"
|
|
90
|
+
@focusout="hide"
|
|
91
|
+
>
|
|
92
|
+
<slot />
|
|
93
|
+
<Teleport to="body">
|
|
94
|
+
<span
|
|
95
|
+
v-if="visible"
|
|
96
|
+
:id="tooltipId"
|
|
97
|
+
ref="contentRef"
|
|
98
|
+
:class="[
|
|
99
|
+
'mld-tooltip__content',
|
|
100
|
+
`mld-tooltip__content--${actualPlacement}`,
|
|
101
|
+
maxWidth ? 'mld-tooltip__content--multiline' : '',
|
|
102
|
+
]"
|
|
103
|
+
:style="{
|
|
104
|
+
top: coords.top,
|
|
105
|
+
left: coords.left,
|
|
106
|
+
maxWidth: resolvedMaxWidth(maxWidth),
|
|
107
|
+
}"
|
|
108
|
+
role="tooltip"
|
|
109
|
+
>
|
|
110
|
+
<span class="mld-tooltip__body">{{ text }}</span>
|
|
111
|
+
<kbd v-if="shortcut" class="mld-tooltip__shortcut">{{ shortcut }}</kbd>
|
|
112
|
+
</span>
|
|
113
|
+
</Teleport>
|
|
114
|
+
</span>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<style>
|
|
118
|
+
@import '../styles/components/tooltip.css';
|
|
119
|
+
</style>
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import UnitInput from './UnitInput.vue'
|
|
4
|
+
|
|
5
|
+
const sizes: ('sm' | 'md' | 'lg')[] = ['sm', 'md', 'lg']
|
|
6
|
+
|
|
7
|
+
const concentrationValue = ref<number | undefined>(10)
|
|
8
|
+
const concentrationUnit = ref('uM')
|
|
9
|
+
|
|
10
|
+
const concentrationUnits = [
|
|
11
|
+
{ value: 'M', label: 'M', factor: 1, group: 'Molar' },
|
|
12
|
+
{ value: 'mM', label: 'mM', factor: 1e-3, group: 'Molar' },
|
|
13
|
+
{ value: 'uM', label: 'uM', factor: 1e-6, group: 'Molar' },
|
|
14
|
+
{ value: 'nM', label: 'nM', factor: 1e-9, group: 'Molar' },
|
|
15
|
+
{ value: 'pM', label: 'pM', factor: 1e-12, group: 'Molar' },
|
|
16
|
+
{ value: 'mg/mL', label: 'mg/mL', factor: 1e-3, group: 'Mass' },
|
|
17
|
+
{ value: 'ug/mL', label: 'ug/mL', factor: 1e-6, group: 'Mass' },
|
|
18
|
+
{ value: 'ng/mL', label: 'ng/mL', factor: 1e-9, group: 'Mass' },
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const volumeUnits = [
|
|
22
|
+
{ value: 'L', label: 'L', factor: 1 },
|
|
23
|
+
{ value: 'mL', label: 'mL', factor: 1e-3 },
|
|
24
|
+
{ value: 'uL', label: 'uL', factor: 1e-6 },
|
|
25
|
+
{ value: 'nL', label: 'nL', factor: 1e-9 },
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
const temperatureUnits = [
|
|
29
|
+
{ value: 'C', label: 'Celsius' },
|
|
30
|
+
{ value: 'F', label: 'Fahrenheit' },
|
|
31
|
+
{ value: 'K', label: 'Kelvin' },
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
const weightUnits = [
|
|
35
|
+
{ value: 'kg', label: 'kg', factor: 1000 },
|
|
36
|
+
{ value: 'g', label: 'g', factor: 1 },
|
|
37
|
+
{ value: 'mg', label: 'mg', factor: 1e-3 },
|
|
38
|
+
{ value: 'ug', label: 'ug', factor: 1e-6 },
|
|
39
|
+
]
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<Story title="Scientific/UnitInput">
|
|
44
|
+
<Variant title="Playground">
|
|
45
|
+
<template #default="{ state }">
|
|
46
|
+
<div style="padding: 2rem; max-width: 350px; margin: 0 auto;">
|
|
47
|
+
<UnitInput
|
|
48
|
+
v-model="concentrationValue"
|
|
49
|
+
v-model:unit="concentrationUnit"
|
|
50
|
+
:units="concentrationUnits"
|
|
51
|
+
:placeholder="state.placeholder"
|
|
52
|
+
:size="state.size"
|
|
53
|
+
:disabled="state.disabled"
|
|
54
|
+
:error="state.error"
|
|
55
|
+
:convert-on-unit-change="state.convertOnUnitChange"
|
|
56
|
+
:precision="state.precision"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<template #controls="{ state }">
|
|
62
|
+
<HstText v-model="state.placeholder" title="Placeholder" />
|
|
63
|
+
<HstSelect
|
|
64
|
+
v-model="state.size"
|
|
65
|
+
title="Size"
|
|
66
|
+
:options="sizes.map(s => ({ label: s, value: s }))"
|
|
67
|
+
/>
|
|
68
|
+
<HstSlider v-model="state.precision" title="Precision" :min="0" :max="8" :step="1" />
|
|
69
|
+
<HstCheckbox v-model="state.convertOnUnitChange" title="Convert on Unit Change" />
|
|
70
|
+
<HstCheckbox v-model="state.disabled" title="Disabled" />
|
|
71
|
+
<HstCheckbox v-model="state.error" title="Error" />
|
|
72
|
+
</template>
|
|
73
|
+
</Variant>
|
|
74
|
+
|
|
75
|
+
<Variant title="Concentration (Grouped Units)">
|
|
76
|
+
<div style="padding: 2rem; max-width: 350px; margin: 0 auto;">
|
|
77
|
+
<p style="margin: 0 0 0.75rem; font-size: 0.875rem; color: var(--text-muted, #94a3b8);">
|
|
78
|
+
Grouped units with automatic conversion
|
|
79
|
+
</p>
|
|
80
|
+
<UnitInput
|
|
81
|
+
:model-value="10"
|
|
82
|
+
unit="uM"
|
|
83
|
+
:units="concentrationUnits"
|
|
84
|
+
convert-on-unit-change
|
|
85
|
+
:precision="3"
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
</Variant>
|
|
89
|
+
|
|
90
|
+
<Variant title="Volume">
|
|
91
|
+
<div style="padding: 2rem; max-width: 350px; margin: 0 auto;">
|
|
92
|
+
<UnitInput
|
|
93
|
+
:model-value="250"
|
|
94
|
+
unit="uL"
|
|
95
|
+
:units="volumeUnits"
|
|
96
|
+
convert-on-unit-change
|
|
97
|
+
:precision="2"
|
|
98
|
+
placeholder="Enter volume"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
</Variant>
|
|
102
|
+
|
|
103
|
+
<Variant title="Temperature (No Conversion)">
|
|
104
|
+
<div style="padding: 2rem; max-width: 350px; margin: 0 auto;">
|
|
105
|
+
<UnitInput
|
|
106
|
+
:model-value="37"
|
|
107
|
+
unit="C"
|
|
108
|
+
:units="temperatureUnits"
|
|
109
|
+
placeholder="Enter temperature"
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
</Variant>
|
|
113
|
+
|
|
114
|
+
<Variant title="Weight with Min/Max">
|
|
115
|
+
<div style="padding: 2rem; max-width: 350px; margin: 0 auto;">
|
|
116
|
+
<p style="margin: 0 0 0.75rem; font-size: 0.875rem; color: var(--text-muted, #94a3b8);">
|
|
117
|
+
Clamped between 0 and 1000
|
|
118
|
+
</p>
|
|
119
|
+
<UnitInput
|
|
120
|
+
:model-value="5.5"
|
|
121
|
+
unit="mg"
|
|
122
|
+
:units="weightUnits"
|
|
123
|
+
:min="0"
|
|
124
|
+
:max="1000"
|
|
125
|
+
:step="0.1"
|
|
126
|
+
convert-on-unit-change
|
|
127
|
+
:precision="2"
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
</Variant>
|
|
131
|
+
|
|
132
|
+
<Variant title="All Sizes">
|
|
133
|
+
<div style="padding: 2rem; max-width: 350px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem;">
|
|
134
|
+
<div v-for="size in sizes" :key="size">
|
|
135
|
+
<p style="margin: 0 0 0.5rem; font-size: 0.75rem; color: var(--text-muted, #94a3b8); text-transform: uppercase; letter-spacing: 0.05em;">
|
|
136
|
+
{{ size }}
|
|
137
|
+
</p>
|
|
138
|
+
<UnitInput
|
|
139
|
+
:model-value="10"
|
|
140
|
+
unit="uM"
|
|
141
|
+
:units="concentrationUnits"
|
|
142
|
+
:size="size"
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</Variant>
|
|
147
|
+
|
|
148
|
+
<Variant title="Error State">
|
|
149
|
+
<div style="padding: 2rem; max-width: 350px; margin: 0 auto;">
|
|
150
|
+
<UnitInput
|
|
151
|
+
:model-value="10"
|
|
152
|
+
unit="uM"
|
|
153
|
+
:units="concentrationUnits"
|
|
154
|
+
error
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
</Variant>
|
|
158
|
+
|
|
159
|
+
<Variant title="Disabled State">
|
|
160
|
+
<div style="padding: 2rem; max-width: 350px; margin: 0 auto;">
|
|
161
|
+
<UnitInput
|
|
162
|
+
:model-value="37"
|
|
163
|
+
unit="C"
|
|
164
|
+
:units="temperatureUnits"
|
|
165
|
+
disabled
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</Variant>
|
|
169
|
+
|
|
170
|
+
<Variant title="Refresh · Clean Bordered + primary-softer chip">
|
|
171
|
+
<div style="padding: 2rem; max-width: 360px; display: flex; flex-direction: column; gap: 1rem;">
|
|
172
|
+
<UnitInput
|
|
173
|
+
:model-value="12.5"
|
|
174
|
+
unit="mg"
|
|
175
|
+
:units="[
|
|
176
|
+
{ value: 'mg', label: 'mg' },
|
|
177
|
+
{ value: 'g', label: 'g' },
|
|
178
|
+
{ value: 'µg', label: 'µg' },
|
|
179
|
+
{ value: 'kg', label: 'kg' },
|
|
180
|
+
]"
|
|
181
|
+
/>
|
|
182
|
+
<UnitInput
|
|
183
|
+
:model-value="37.0"
|
|
184
|
+
unit="°C"
|
|
185
|
+
:units="[
|
|
186
|
+
{ value: '°C', label: '°C' },
|
|
187
|
+
{ value: '°F', label: '°F' },
|
|
188
|
+
{ value: 'K', label: 'K' },
|
|
189
|
+
]"
|
|
190
|
+
/>
|
|
191
|
+
</div>
|
|
192
|
+
</Variant>
|
|
193
|
+
</Story>
|
|
194
|
+
</template>
|