@morscherlab/mint-sdk 1.0.0-alpha.7 → 1.0.0-alpha.9
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 +15 -15
- package/dist/{auth-BYmxZdJl.js → auth-DsI0rQ7_.js} +6 -6
- package/dist/auth-DsI0rQ7_.js.map +1 -0
- package/dist/components/index.js +2 -2
- package/dist/{components-CKf-UpGi.js → components-CzbQQPCb.js} +1429 -1429
- package/dist/components-CzbQQPCb.js.map +1 -0
- package/dist/composables/index.js +2 -2
- package/dist/composables/usePlatformContext.d.ts +3 -3
- package/dist/{composables-D0QfFzq1.js → composables-BXklV5ii.js} +3 -3
- package/dist/{composables-D0QfFzq1.js.map → composables-BXklV5ii.js.map} +1 -1
- package/dist/index.js +4 -4
- package/dist/install.d.ts +3 -3
- package/dist/install.js +5 -5
- package/dist/install.js.map +1 -1
- package/dist/stores/auth.d.ts +1 -1
- package/dist/stores/index.js +1 -1
- package/dist/stores/settings.d.ts +1 -1
- package/dist/styles.css +5388 -5388
- package/dist/types/platform.d.ts +1 -1
- package/dist/{useScheduleDrag-DAJueTbK.js → useScheduleDrag-CxBeqYcu.js} +331 -331
- package/dist/useScheduleDrag-CxBeqYcu.js.map +1 -0
- package/package.json +2 -2
- package/src/__tests__/components/AppLayout.test.ts +23 -23
- package/src/__tests__/components/AppSidebar.test.ts +29 -29
- package/src/__tests__/components/AppTopBar.test.ts +45 -45
- package/src/__tests__/components/BaseInput.test.ts +2 -2
- package/src/__tests__/components/BasePill.test.ts +37 -37
- package/src/__tests__/components/Calendar.test.ts +52 -52
- package/src/__tests__/components/CollapsibleCard.test.ts +81 -81
- package/src/__tests__/components/DataFrame.test.ts +80 -80
- package/src/__tests__/components/DropdownButton.test.ts +80 -80
- package/src/__tests__/composables/usePlatformContext.test.ts +1 -1
- package/src/components/AlertBox.story.vue +1 -1
- package/src/components/AlertBox.vue +14 -14
- package/src/components/AppAvatarMenu.vue +26 -26
- package/src/components/AppContainer.vue +3 -3
- package/src/components/AppLayout.vue +7 -7
- package/src/components/AppPageSelector.vue +30 -30
- package/src/components/AppPillNav.vue +10 -10
- package/src/components/AppPluginSwitcher.vue +31 -31
- package/src/components/AppSidebar.vue +8 -8
- package/src/components/AppTopBar.story.vue +7 -7
- package/src/components/AppTopBar.vue +102 -102
- package/src/components/AuditTrail.vue +19 -19
- package/src/components/AutoGroupModal.vue +76 -76
- package/src/components/Avatar.vue +6 -6
- package/src/components/BaseButton.vue +6 -6
- package/src/components/BaseCheckbox.vue +9 -9
- package/src/components/BaseInput.vue +4 -4
- package/src/components/BaseModal.story.vue +1 -1
- package/src/components/BaseModal.vue +14 -14
- package/src/components/BasePill.vue +9 -9
- package/src/components/BaseRadioGroup.vue +21 -21
- package/src/components/BaseSelect.vue +6 -6
- package/src/components/BaseSlider.vue +8 -8
- package/src/components/BaseTabs.vue +7 -7
- package/src/components/BaseTextarea.vue +5 -5
- package/src/components/BaseToggle.vue +10 -10
- package/src/components/BatchProgressList.vue +25 -25
- package/src/components/Breadcrumb.vue +8 -8
- package/src/components/Calendar.vue +19 -19
- package/src/components/ChartContainer.vue +9 -9
- package/src/components/ChemicalFormula.vue +7 -7
- package/src/components/CollapsibleCard.vue +20 -20
- package/src/components/ColorSlider.vue +6 -6
- package/src/components/ConcentrationInput.vue +12 -12
- package/src/components/ConfirmDialog.story.vue +1 -1
- package/src/components/ConfirmDialog.vue +7 -7
- package/src/components/DataFrame.vue +40 -40
- package/src/components/DatePicker.vue +29 -29
- package/src/components/DateTimePicker.vue +41 -41
- package/src/components/Divider.vue +9 -9
- package/src/components/DoseCalculator.vue +66 -66
- package/src/components/DropdownButton.vue +19 -19
- package/src/components/EmptyState.vue +9 -9
- package/src/components/ExperimentCodeBadge.vue +3 -3
- package/src/components/ExperimentDataViewer.vue +25 -25
- package/src/components/ExperimentPopover.vue +35 -35
- package/src/components/ExperimentSelectorModal.vue +40 -40
- package/src/components/ExperimentTimeline.vue +48 -48
- package/src/components/FileUploader.vue +31 -31
- package/src/components/FitPanel.vue +9 -9
- package/src/components/FormActions.vue +1 -1
- package/src/components/FormBuilder.vue +2 -2
- package/src/components/FormField.vue +7 -7
- package/src/components/FormSection.vue +7 -7
- package/src/components/FormulaInput.vue +10 -10
- package/src/components/GroupAssigner.vue +40 -40
- package/src/components/GroupingModal.vue +45 -45
- package/src/components/IconButton.vue +6 -6
- package/src/components/LoadingSpinner.vue +5 -5
- package/src/components/MoleculeInput.vue +21 -21
- package/src/components/MultiSelect.vue +13 -13
- package/src/components/NumberInput.vue +13 -13
- package/src/components/PlateMapEditor.vue +63 -63
- package/src/components/ProgressBar.vue +18 -18
- package/src/components/ProtocolStepEditor.vue +57 -57
- package/src/components/RackEditor.vue +28 -28
- package/src/components/ReagentEditor.vue +61 -61
- package/src/components/ReagentList.vue +49 -49
- package/src/components/ResourceCard.vue +28 -28
- package/src/components/SampleHierarchyTree.vue +13 -13
- package/src/components/SampleLegend.vue +12 -12
- package/src/components/SampleSelector.vue +104 -104
- package/src/components/ScheduleCalendar.vue +42 -42
- package/src/components/ScientificNumber.vue +11 -11
- package/src/components/SegmentedControl.vue +12 -12
- package/src/components/SequenceInput.vue +32 -32
- package/src/components/SettingsButton.vue +5 -5
- package/src/components/SettingsModal.vue +17 -17
- package/src/components/StatusIndicator.vue +5 -5
- package/src/components/StepWizard.vue +16 -16
- package/src/components/TagsInput.vue +20 -20
- package/src/components/ThemeToggle.vue +3 -3
- package/src/components/TimePicker.vue +21 -21
- package/src/components/TimeRangeInput.vue +5 -5
- package/src/components/ToastNotification.vue +8 -8
- package/src/components/Tooltip.vue +7 -7
- package/src/components/UnitInput.vue +12 -12
- package/src/components/WellEditPopup.vue +28 -28
- package/src/components/WellPlate.vue +37 -37
- package/src/composables/useAppExperiment.ts +1 -1
- package/src/composables/usePlatformContext.ts +16 -16
- package/src/composables/useProtocolTemplates.ts +1 -1
- package/src/install.ts +3 -3
- package/src/stores/auth.ts +3 -3
- package/src/stores/settings.ts +2 -2
- package/src/styles/components/alert-box.css +30 -30
- package/src/styles/components/app-avatar-menu.css +23 -23
- package/src/styles/components/app-container.css +6 -6
- package/src/styles/components/app-layout.css +15 -15
- package/src/styles/components/app-page-selector.css +26 -26
- package/src/styles/components/app-pill-nav.css +7 -7
- package/src/styles/components/app-plugin-switcher.css +27 -27
- package/src/styles/components/app-sidebar.css +24 -24
- package/src/styles/components/app-top-bar.css +65 -65
- package/src/styles/components/audit-trail.css +29 -29
- package/src/styles/components/auto-group-modal.css +91 -91
- package/src/styles/components/avatar.css +15 -15
- package/src/styles/components/batch-progress-list.css +40 -40
- package/src/styles/components/breadcrumb.css +8 -8
- package/src/styles/components/button.css +31 -31
- package/src/styles/components/calendar.css +27 -27
- package/src/styles/components/chart-container.css +9 -9
- package/src/styles/components/checkbox.css +20 -20
- package/src/styles/components/chemical-formula.css +8 -8
- package/src/styles/components/collapsible-card.css +35 -35
- package/src/styles/components/color-slider.css +8 -8
- package/src/styles/components/concentration-input.css +27 -27
- package/src/styles/components/confirm-dialog.css +32 -32
- package/src/styles/components/dataframe.css +66 -66
- package/src/styles/components/date-picker.css +40 -40
- package/src/styles/components/datetime-picker.css +37 -37
- package/src/styles/components/divider.css +13 -13
- package/src/styles/components/dose-calculator.css +43 -43
- package/src/styles/components/dropdown-button.css +46 -46
- package/src/styles/components/empty-state.css +44 -44
- package/src/styles/components/experiment-code-badge.css +8 -8
- package/src/styles/components/experiment-data-viewer.css +23 -23
- package/src/styles/components/experiment-popover.css +97 -97
- package/src/styles/components/experiment-selector-modal.css +39 -39
- package/src/styles/components/experiment-timeline.css +98 -98
- package/src/styles/components/file-uploader.css +44 -44
- package/src/styles/components/fit-panel.css +12 -12
- package/src/styles/components/form-builder.css +11 -11
- package/src/styles/components/form-field.css +7 -7
- package/src/styles/components/formula-input.css +17 -17
- package/src/styles/components/group-assigner.css +26 -26
- package/src/styles/components/grouping-modal.css +51 -51
- package/src/styles/components/icon-button.css +41 -41
- package/src/styles/components/input.css +13 -13
- package/src/styles/components/loading-spinner.css +12 -12
- package/src/styles/components/modal.css +69 -69
- package/src/styles/components/molecule-input.css +27 -27
- package/src/styles/components/multi-select.css +23 -23
- package/src/styles/components/number-input.css +32 -32
- package/src/styles/components/pill.css +37 -37
- package/src/styles/components/plate-map-editor.css +67 -67
- package/src/styles/components/progress-bar.css +41 -41
- package/src/styles/components/protocol-step-editor.css +63 -63
- package/src/styles/components/rack-editor.css +34 -34
- package/src/styles/components/radio-group.css +41 -41
- package/src/styles/components/reagent-editor.css +70 -70
- package/src/styles/components/reagent-list.css +65 -65
- package/src/styles/components/resource-card.css +52 -52
- package/src/styles/components/sample-hierarchy-tree.css +56 -56
- package/src/styles/components/sample-legend.css +37 -37
- package/src/styles/components/sample-selector.css +121 -121
- package/src/styles/components/schedule-calendar.css +67 -67
- package/src/styles/components/scientific-number.css +11 -11
- package/src/styles/components/segmented-control.css +33 -33
- package/src/styles/components/select.css +11 -11
- package/src/styles/components/sequence-input.css +29 -29
- package/src/styles/components/settings-button.css +16 -16
- package/src/styles/components/settings-modal.css +14 -14
- package/src/styles/components/skeleton.css +2 -2
- package/src/styles/components/slider.css +10 -10
- package/src/styles/components/status-indicator.css +12 -12
- package/src/styles/components/step-wizard.css +32 -32
- package/src/styles/components/tabs.css +16 -16
- package/src/styles/components/tags-input.css +46 -46
- package/src/styles/components/textarea.css +17 -17
- package/src/styles/components/theme-toggle.css +13 -13
- package/src/styles/components/time-picker.css +28 -28
- package/src/styles/components/time-range-input.css +8 -8
- package/src/styles/components/toast.css +18 -18
- package/src/styles/components/toggle.css +27 -27
- package/src/styles/components/tooltip.css +18 -18
- package/src/styles/components/unit-input.css +25 -25
- package/src/styles/components/well-edit-popup.css +32 -32
- package/src/styles/components/well-plate.css +49 -49
- package/src/styles/index.css +1 -1
- package/src/styles/variables.css +3 -3
- package/src/types/platform.ts +6 -6
- package/dist/auth-BYmxZdJl.js.map +0 -1
- package/dist/components-CKf-UpGi.js.map +0 -1
- package/dist/useScheduleDrag-DAJueTbK.js.map +0 -1
|
@@ -88,91 +88,91 @@ onUnmounted(() => {
|
|
|
88
88
|
</script>
|
|
89
89
|
|
|
90
90
|
<template>
|
|
91
|
-
<div ref="rootRef" class="
|
|
91
|
+
<div ref="rootRef" class="mint-avatar-menu">
|
|
92
92
|
<button
|
|
93
93
|
type="button"
|
|
94
|
-
class="
|
|
95
|
-
:class="{ '
|
|
94
|
+
class="mint-avatar-menu__trigger"
|
|
95
|
+
:class="{ 'mint-avatar-menu__trigger--open': isOpen }"
|
|
96
96
|
:aria-expanded="isOpen"
|
|
97
97
|
aria-haspopup="menu"
|
|
98
98
|
:title="userName ? `${userName} · Account menu` : 'Account menu'"
|
|
99
99
|
@click.stop="toggle"
|
|
100
100
|
>
|
|
101
|
-
<span class="
|
|
101
|
+
<span class="mint-avatar-menu__avatar">
|
|
102
102
|
<slot name="avatar" :initials="initials">
|
|
103
103
|
{{ initials }}
|
|
104
104
|
</slot>
|
|
105
105
|
</span>
|
|
106
|
-
<span v-if="userName" class="
|
|
106
|
+
<span v-if="userName" class="mint-avatar-menu__name">{{ userName }}</span>
|
|
107
107
|
</button>
|
|
108
108
|
|
|
109
|
-
<div v-if="isOpen" class="
|
|
110
|
-
<div v-if="userName || userEmail" class="
|
|
111
|
-
<div v-if="userName" class="
|
|
112
|
-
<div v-if="userEmail" class="
|
|
109
|
+
<div v-if="isOpen" class="mint-avatar-menu__panel" role="menu">
|
|
110
|
+
<div v-if="userName || userEmail" class="mint-avatar-menu__header">
|
|
111
|
+
<div v-if="userName" class="mint-avatar-menu__user-name">{{ userName }}</div>
|
|
112
|
+
<div v-if="userEmail" class="mint-avatar-menu__user-email">{{ userEmail }}</div>
|
|
113
113
|
</div>
|
|
114
114
|
|
|
115
115
|
<slot name="items" :close="() => (isOpen = false)">
|
|
116
116
|
<template v-for="item in items" :key="item.id">
|
|
117
|
-
<div v-if="item.divider" class="
|
|
117
|
+
<div v-if="item.divider" class="mint-avatar-menu__divider" role="separator" />
|
|
118
118
|
<a
|
|
119
119
|
v-else-if="item.href"
|
|
120
120
|
:href="item.href"
|
|
121
|
-
:class="['
|
|
121
|
+
:class="['mint-avatar-menu__item', { 'mint-avatar-menu__item--danger': item.danger }]"
|
|
122
122
|
role="menuitem"
|
|
123
123
|
@click="handleSelect(item)"
|
|
124
124
|
>
|
|
125
|
-
<span v-if="item.icon" class="
|
|
125
|
+
<span v-if="item.icon" class="mint-avatar-menu__item-icon">
|
|
126
126
|
<slot name="item-icon" :item="item" />
|
|
127
127
|
</span>
|
|
128
|
-
<span class="
|
|
129
|
-
<span v-if="item.rightLabel" class="
|
|
128
|
+
<span class="mint-avatar-menu__item-label">{{ item.label }}</span>
|
|
129
|
+
<span v-if="item.rightLabel" class="mint-avatar-menu__item-right">{{ item.rightLabel }}</span>
|
|
130
130
|
</a>
|
|
131
131
|
<router-link
|
|
132
132
|
v-else-if="item.to"
|
|
133
133
|
:to="item.to"
|
|
134
|
-
:class="['
|
|
134
|
+
:class="['mint-avatar-menu__item', { 'mint-avatar-menu__item--danger': item.danger }]"
|
|
135
135
|
role="menuitem"
|
|
136
136
|
@click="handleSelect(item)"
|
|
137
137
|
>
|
|
138
|
-
<span v-if="item.icon" class="
|
|
138
|
+
<span v-if="item.icon" class="mint-avatar-menu__item-icon">
|
|
139
139
|
<slot name="item-icon" :item="item" />
|
|
140
140
|
</span>
|
|
141
|
-
<span class="
|
|
142
|
-
<span v-if="item.rightLabel" class="
|
|
141
|
+
<span class="mint-avatar-menu__item-label">{{ item.label }}</span>
|
|
142
|
+
<span v-if="item.rightLabel" class="mint-avatar-menu__item-right">{{ item.rightLabel }}</span>
|
|
143
143
|
</router-link>
|
|
144
144
|
<button
|
|
145
145
|
v-else
|
|
146
146
|
type="button"
|
|
147
|
-
:class="['
|
|
147
|
+
:class="['mint-avatar-menu__item', { 'mint-avatar-menu__item--danger': item.danger }]"
|
|
148
148
|
role="menuitem"
|
|
149
149
|
@click="handleSelect(item)"
|
|
150
150
|
>
|
|
151
|
-
<span v-if="item.icon" class="
|
|
151
|
+
<span v-if="item.icon" class="mint-avatar-menu__item-icon">
|
|
152
152
|
<slot name="item-icon" :item="item" />
|
|
153
153
|
</span>
|
|
154
|
-
<span class="
|
|
155
|
-
<span v-if="item.rightLabel" class="
|
|
154
|
+
<span class="mint-avatar-menu__item-label">{{ item.label }}</span>
|
|
155
|
+
<span v-if="item.rightLabel" class="mint-avatar-menu__item-right">{{ item.rightLabel }}</span>
|
|
156
156
|
</button>
|
|
157
157
|
</template>
|
|
158
158
|
</slot>
|
|
159
159
|
|
|
160
160
|
<template v-if="showSignOut">
|
|
161
|
-
<div class="
|
|
161
|
+
<div class="mint-avatar-menu__divider" role="separator" />
|
|
162
162
|
<button
|
|
163
163
|
type="button"
|
|
164
|
-
class="
|
|
164
|
+
class="mint-avatar-menu__item mint-avatar-menu__item--danger"
|
|
165
165
|
role="menuitem"
|
|
166
166
|
@click="handleSignOut"
|
|
167
167
|
>
|
|
168
|
-
<span class="
|
|
168
|
+
<span class="mint-avatar-menu__item-icon" aria-hidden="true">
|
|
169
169
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
170
170
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
|
|
171
171
|
<polyline points="16 17 21 12 16 7" />
|
|
172
172
|
<line x1="21" y1="12" x2="9" y2="12" />
|
|
173
173
|
</svg>
|
|
174
174
|
</span>
|
|
175
|
-
<span class="
|
|
175
|
+
<span class="mint-avatar-menu__item-label">{{ signOutLabel }}</span>
|
|
176
176
|
</button>
|
|
177
177
|
</template>
|
|
178
178
|
</div>
|
|
@@ -21,11 +21,11 @@ const isLayout = computed(() => !!props.direction)
|
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
23
|
<div
|
|
24
|
-
class="
|
|
24
|
+
class="mint-container"
|
|
25
25
|
:class="
|
|
26
26
|
isLayout
|
|
27
|
-
? ['
|
|
28
|
-
: ['
|
|
27
|
+
? ['mint-container--layout', direction === 'row' ? 'mint-container--row' : 'mint-container--column']
|
|
28
|
+
: ['mint-container--card', scrollable ? 'mint-container--scrollable' : '']
|
|
29
29
|
"
|
|
30
30
|
:style="isLayout ? { gap } : undefined"
|
|
31
31
|
>
|
|
@@ -38,9 +38,9 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
38
38
|
})
|
|
39
39
|
|
|
40
40
|
const layoutClasses = computed(() => [
|
|
41
|
-
'
|
|
42
|
-
props.sidebarPosition === 'right' ? '
|
|
43
|
-
props.floating ? '
|
|
41
|
+
'mint-layout',
|
|
42
|
+
props.sidebarPosition === 'right' ? 'mint-layout--sidebar-right' : '',
|
|
43
|
+
props.floating ? 'mint-layout--floating' : '',
|
|
44
44
|
])
|
|
45
45
|
|
|
46
46
|
const sidebarStyle = computed(() => {
|
|
@@ -50,20 +50,20 @@ const sidebarStyle = computed(() => {
|
|
|
50
50
|
|
|
51
51
|
<template>
|
|
52
52
|
<div :class="layoutClasses">
|
|
53
|
-
<div v-if="$slots.topbar" class="
|
|
53
|
+
<div v-if="$slots.topbar" class="mint-layout__topbar">
|
|
54
54
|
<slot name="topbar" />
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
|
-
<div class="
|
|
57
|
+
<div class="mint-layout__body">
|
|
58
58
|
<div
|
|
59
59
|
v-if="$slots.sidebar"
|
|
60
|
-
class="
|
|
60
|
+
class="mint-layout__sidebar"
|
|
61
61
|
:style="sidebarStyle"
|
|
62
62
|
>
|
|
63
63
|
<slot name="sidebar" />
|
|
64
64
|
</div>
|
|
65
65
|
|
|
66
|
-
<main class="
|
|
66
|
+
<main class="mint-layout__main">
|
|
67
67
|
<slot />
|
|
68
68
|
</main>
|
|
69
69
|
</div>
|
|
@@ -62,20 +62,20 @@ onUnmounted(() => {
|
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
64
|
<template>
|
|
65
|
-
<div ref="rootRef" class="
|
|
65
|
+
<div ref="rootRef" class="mint-page-selector" :style="{ minWidth }">
|
|
66
66
|
<button
|
|
67
67
|
type="button"
|
|
68
|
-
class="
|
|
69
|
-
:class="{ '
|
|
68
|
+
class="mint-page-selector__trigger"
|
|
69
|
+
:class="{ 'mint-page-selector__trigger--open': isOpen }"
|
|
70
70
|
:aria-expanded="isOpen"
|
|
71
71
|
aria-haspopup="menu"
|
|
72
72
|
@click.stop="toggle"
|
|
73
73
|
>
|
|
74
|
-
<span class="
|
|
75
|
-
<span class="
|
|
74
|
+
<span class="mint-page-selector__label">{{ current?.label ?? placeholder }}</span>
|
|
75
|
+
<span class="mint-page-selector__chevron-wrap" aria-hidden="true">
|
|
76
76
|
<svg
|
|
77
|
-
class="
|
|
78
|
-
:class="{ '
|
|
77
|
+
class="mint-page-selector__chevron"
|
|
78
|
+
:class="{ 'mint-page-selector__chevron--open': isOpen }"
|
|
79
79
|
viewBox="0 0 24 24"
|
|
80
80
|
fill="none"
|
|
81
81
|
stroke="currentColor"
|
|
@@ -88,66 +88,66 @@ onUnmounted(() => {
|
|
|
88
88
|
</span>
|
|
89
89
|
</button>
|
|
90
90
|
|
|
91
|
-
<div v-if="isOpen" class="
|
|
92
|
-
<div class="
|
|
91
|
+
<div v-if="isOpen" class="mint-page-selector__menu" role="menu">
|
|
92
|
+
<div class="mint-page-selector__menu-title">Go to</div>
|
|
93
93
|
<template v-for="page in pages" :key="page.id">
|
|
94
94
|
<a
|
|
95
95
|
v-if="page.href"
|
|
96
96
|
:href="page.href"
|
|
97
97
|
:class="[
|
|
98
|
-
'
|
|
99
|
-
{ '
|
|
100
|
-
{ '
|
|
98
|
+
'mint-page-selector__item',
|
|
99
|
+
{ 'mint-page-selector__item--active': page.id === current?.id },
|
|
100
|
+
{ 'mint-page-selector__item--disabled': page.disabled },
|
|
101
101
|
]"
|
|
102
102
|
role="menuitem"
|
|
103
103
|
@click="isOpen = false"
|
|
104
104
|
>
|
|
105
|
-
<span class="
|
|
105
|
+
<span class="mint-page-selector__item-icon">
|
|
106
106
|
<slot name="item-icon" :page="page">
|
|
107
|
-
<span class="
|
|
107
|
+
<span class="mint-page-selector__icon-fallback">{{ page.label.charAt(0) }}</span>
|
|
108
108
|
</slot>
|
|
109
109
|
</span>
|
|
110
|
-
<span class="
|
|
111
|
-
<span v-if="page.hint" class="
|
|
110
|
+
<span class="mint-page-selector__item-label">{{ page.label }}</span>
|
|
111
|
+
<span v-if="page.hint" class="mint-page-selector__item-hint">{{ page.hint }}</span>
|
|
112
112
|
</a>
|
|
113
113
|
<router-link
|
|
114
114
|
v-else-if="page.to"
|
|
115
115
|
:to="page.to"
|
|
116
116
|
:class="[
|
|
117
|
-
'
|
|
118
|
-
{ '
|
|
119
|
-
{ '
|
|
117
|
+
'mint-page-selector__item',
|
|
118
|
+
{ 'mint-page-selector__item--active': page.id === current?.id },
|
|
119
|
+
{ 'mint-page-selector__item--disabled': page.disabled },
|
|
120
120
|
]"
|
|
121
121
|
role="menuitem"
|
|
122
122
|
@click="isOpen = false"
|
|
123
123
|
>
|
|
124
|
-
<span class="
|
|
124
|
+
<span class="mint-page-selector__item-icon">
|
|
125
125
|
<slot name="item-icon" :page="page">
|
|
126
|
-
<span class="
|
|
126
|
+
<span class="mint-page-selector__icon-fallback">{{ page.label.charAt(0) }}</span>
|
|
127
127
|
</slot>
|
|
128
128
|
</span>
|
|
129
|
-
<span class="
|
|
130
|
-
<span v-if="page.hint" class="
|
|
129
|
+
<span class="mint-page-selector__item-label">{{ page.label }}</span>
|
|
130
|
+
<span v-if="page.hint" class="mint-page-selector__item-hint">{{ page.hint }}</span>
|
|
131
131
|
</router-link>
|
|
132
132
|
<button
|
|
133
133
|
v-else
|
|
134
134
|
type="button"
|
|
135
135
|
:class="[
|
|
136
|
-
'
|
|
137
|
-
{ '
|
|
138
|
-
{ '
|
|
136
|
+
'mint-page-selector__item',
|
|
137
|
+
{ 'mint-page-selector__item--active': page.id === current?.id },
|
|
138
|
+
{ 'mint-page-selector__item--disabled': page.disabled },
|
|
139
139
|
]"
|
|
140
140
|
role="menuitem"
|
|
141
141
|
:disabled="page.disabled"
|
|
142
142
|
@click="handleSelect(page)"
|
|
143
143
|
>
|
|
144
|
-
<span class="
|
|
144
|
+
<span class="mint-page-selector__item-icon">
|
|
145
145
|
<slot name="item-icon" :page="page">
|
|
146
|
-
<span class="
|
|
146
|
+
<span class="mint-page-selector__icon-fallback">{{ page.label.charAt(0) }}</span>
|
|
147
147
|
</slot>
|
|
148
148
|
</span>
|
|
149
|
-
<span class="
|
|
150
|
-
<span v-if="page.hint" class="
|
|
149
|
+
<span class="mint-page-selector__item-label">{{ page.label }}</span>
|
|
150
|
+
<span v-if="page.hint" class="mint-page-selector__item-hint">{{ page.hint }}</span>
|
|
151
151
|
</button>
|
|
152
152
|
</template>
|
|
153
153
|
</div>
|
|
@@ -20,15 +20,15 @@ function handleClick(item: PillNavItem) {
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<nav class="
|
|
23
|
+
<nav class="mint-pill-nav" aria-label="Primary">
|
|
24
24
|
<template v-for="item in items" :key="item.id">
|
|
25
25
|
<a
|
|
26
26
|
v-if="item.href"
|
|
27
27
|
:href="item.href"
|
|
28
28
|
:class="[
|
|
29
|
-
'
|
|
30
|
-
{ '
|
|
31
|
-
{ '
|
|
29
|
+
'mint-pill-nav__item',
|
|
30
|
+
{ 'mint-pill-nav__item--active': item.id === currentItemId },
|
|
31
|
+
{ 'mint-pill-nav__item--disabled': item.disabled },
|
|
32
32
|
]"
|
|
33
33
|
>
|
|
34
34
|
{{ item.label }}
|
|
@@ -37,9 +37,9 @@ function handleClick(item: PillNavItem) {
|
|
|
37
37
|
v-else-if="item.to"
|
|
38
38
|
:to="item.to"
|
|
39
39
|
:class="[
|
|
40
|
-
'
|
|
41
|
-
{ '
|
|
42
|
-
{ '
|
|
40
|
+
'mint-pill-nav__item',
|
|
41
|
+
{ 'mint-pill-nav__item--active': item.id === currentItemId },
|
|
42
|
+
{ 'mint-pill-nav__item--disabled': item.disabled },
|
|
43
43
|
]"
|
|
44
44
|
>
|
|
45
45
|
{{ item.label }}
|
|
@@ -48,9 +48,9 @@ function handleClick(item: PillNavItem) {
|
|
|
48
48
|
v-else
|
|
49
49
|
type="button"
|
|
50
50
|
:class="[
|
|
51
|
-
'
|
|
52
|
-
{ '
|
|
53
|
-
{ '
|
|
51
|
+
'mint-pill-nav__item',
|
|
52
|
+
{ 'mint-pill-nav__item--active': item.id === currentItemId },
|
|
53
|
+
{ 'mint-pill-nav__item--disabled': item.disabled },
|
|
54
54
|
]"
|
|
55
55
|
:disabled="item.disabled"
|
|
56
56
|
@click="handleClick(item)"
|
|
@@ -73,21 +73,21 @@ onUnmounted(() => {
|
|
|
73
73
|
</script>
|
|
74
74
|
|
|
75
75
|
<template>
|
|
76
|
-
<div ref="rootRef" class="
|
|
76
|
+
<div ref="rootRef" class="mint-plugin-switcher">
|
|
77
77
|
<button
|
|
78
78
|
type="button"
|
|
79
|
-
class="
|
|
80
|
-
:class="{ '
|
|
79
|
+
class="mint-plugin-switcher__trigger"
|
|
80
|
+
:class="{ 'mint-plugin-switcher__trigger--open': isOpen }"
|
|
81
81
|
:aria-expanded="isOpen"
|
|
82
82
|
aria-haspopup="menu"
|
|
83
83
|
@click.stop="toggle"
|
|
84
84
|
>
|
|
85
|
-
<span class="
|
|
86
|
-
<span v-if="current.version" class="
|
|
87
|
-
<span class="
|
|
85
|
+
<span class="mint-plugin-switcher__label">{{ current.label }}</span>
|
|
86
|
+
<span v-if="current.version" class="mint-plugin-switcher__version">v{{ current.version }}</span>
|
|
87
|
+
<span class="mint-plugin-switcher__chevron-wrap" aria-hidden="true">
|
|
88
88
|
<svg
|
|
89
|
-
class="
|
|
90
|
-
:class="{ '
|
|
89
|
+
class="mint-plugin-switcher__chevron"
|
|
90
|
+
:class="{ 'mint-plugin-switcher__chevron--open': isOpen }"
|
|
91
91
|
viewBox="0 0 24 24"
|
|
92
92
|
fill="none"
|
|
93
93
|
stroke="currentColor"
|
|
@@ -100,30 +100,30 @@ onUnmounted(() => {
|
|
|
100
100
|
</span>
|
|
101
101
|
</button>
|
|
102
102
|
|
|
103
|
-
<div v-if="isOpen" class="
|
|
104
|
-
<div class="
|
|
103
|
+
<div v-if="isOpen" class="mint-plugin-switcher__menu" role="menu">
|
|
104
|
+
<div class="mint-plugin-switcher__menu-title">Switch plugin</div>
|
|
105
105
|
<template v-for="plugin in plugins" :key="plugin.id">
|
|
106
106
|
<a
|
|
107
107
|
v-if="plugin.href"
|
|
108
108
|
:href="plugin.href"
|
|
109
109
|
:class="[
|
|
110
|
-
'
|
|
111
|
-
{ '
|
|
110
|
+
'mint-plugin-switcher__item',
|
|
111
|
+
{ 'mint-plugin-switcher__item--active': plugin.id === current.id },
|
|
112
112
|
]"
|
|
113
113
|
role="menuitem"
|
|
114
114
|
@click="handleSelect(plugin)"
|
|
115
115
|
>
|
|
116
116
|
<span
|
|
117
|
-
class="
|
|
117
|
+
class="mint-plugin-switcher__item-swatch"
|
|
118
118
|
:style="{ background: plugin.color ?? 'var(--color-primary)' }"
|
|
119
119
|
>
|
|
120
120
|
{{ initialsOf(plugin) }}
|
|
121
121
|
</span>
|
|
122
|
-
<span class="
|
|
123
|
-
<span v-if="plugin.version" class="
|
|
122
|
+
<span class="mint-plugin-switcher__item-label">{{ plugin.label }}</span>
|
|
123
|
+
<span v-if="plugin.version" class="mint-plugin-switcher__item-version">v{{ plugin.version }}</span>
|
|
124
124
|
<svg
|
|
125
125
|
v-if="plugin.id === current.id"
|
|
126
|
-
class="
|
|
126
|
+
class="mint-plugin-switcher__item-check"
|
|
127
127
|
viewBox="0 0 24 24"
|
|
128
128
|
fill="none"
|
|
129
129
|
stroke="currentColor"
|
|
@@ -139,23 +139,23 @@ onUnmounted(() => {
|
|
|
139
139
|
v-else-if="plugin.to"
|
|
140
140
|
:to="plugin.to"
|
|
141
141
|
:class="[
|
|
142
|
-
'
|
|
143
|
-
{ '
|
|
142
|
+
'mint-plugin-switcher__item',
|
|
143
|
+
{ 'mint-plugin-switcher__item--active': plugin.id === current.id },
|
|
144
144
|
]"
|
|
145
145
|
role="menuitem"
|
|
146
146
|
@click="handleSelect(plugin)"
|
|
147
147
|
>
|
|
148
148
|
<span
|
|
149
|
-
class="
|
|
149
|
+
class="mint-plugin-switcher__item-swatch"
|
|
150
150
|
:style="{ background: plugin.color ?? 'var(--color-primary)' }"
|
|
151
151
|
>
|
|
152
152
|
{{ initialsOf(plugin) }}
|
|
153
153
|
</span>
|
|
154
|
-
<span class="
|
|
155
|
-
<span v-if="plugin.version" class="
|
|
154
|
+
<span class="mint-plugin-switcher__item-label">{{ plugin.label }}</span>
|
|
155
|
+
<span v-if="plugin.version" class="mint-plugin-switcher__item-version">v{{ plugin.version }}</span>
|
|
156
156
|
<svg
|
|
157
157
|
v-if="plugin.id === current.id"
|
|
158
|
-
class="
|
|
158
|
+
class="mint-plugin-switcher__item-check"
|
|
159
159
|
viewBox="0 0 24 24"
|
|
160
160
|
fill="none"
|
|
161
161
|
stroke="currentColor"
|
|
@@ -171,23 +171,23 @@ onUnmounted(() => {
|
|
|
171
171
|
v-else
|
|
172
172
|
type="button"
|
|
173
173
|
:class="[
|
|
174
|
-
'
|
|
175
|
-
{ '
|
|
174
|
+
'mint-plugin-switcher__item',
|
|
175
|
+
{ 'mint-plugin-switcher__item--active': plugin.id === current.id },
|
|
176
176
|
]"
|
|
177
177
|
role="menuitem"
|
|
178
178
|
@click="handleSelect(plugin)"
|
|
179
179
|
>
|
|
180
180
|
<span
|
|
181
|
-
class="
|
|
181
|
+
class="mint-plugin-switcher__item-swatch"
|
|
182
182
|
:style="{ background: plugin.color ?? 'var(--color-primary)' }"
|
|
183
183
|
>
|
|
184
184
|
{{ initialsOf(plugin) }}
|
|
185
185
|
</span>
|
|
186
|
-
<span class="
|
|
187
|
-
<span v-if="plugin.version" class="
|
|
186
|
+
<span class="mint-plugin-switcher__item-label">{{ plugin.label }}</span>
|
|
187
|
+
<span v-if="plugin.version" class="mint-plugin-switcher__item-version">v{{ plugin.version }}</span>
|
|
188
188
|
<svg
|
|
189
189
|
v-if="plugin.id === current.id"
|
|
190
|
-
class="
|
|
190
|
+
class="mint-plugin-switcher__item-check"
|
|
191
191
|
viewBox="0 0 24 24"
|
|
192
192
|
fill="none"
|
|
193
193
|
stroke="currentColor"
|
|
@@ -202,13 +202,13 @@ onUnmounted(() => {
|
|
|
202
202
|
</template>
|
|
203
203
|
|
|
204
204
|
<template v-if="plugins.length && (installHref || installTo || $slots.install)">
|
|
205
|
-
<div class="
|
|
205
|
+
<div class="mint-plugin-switcher__divider" role="separator" />
|
|
206
206
|
</template>
|
|
207
207
|
<slot name="install">
|
|
208
208
|
<a
|
|
209
209
|
v-if="installHref"
|
|
210
210
|
:href="installHref"
|
|
211
|
-
class="
|
|
211
|
+
class="mint-plugin-switcher__install"
|
|
212
212
|
role="menuitem"
|
|
213
213
|
@click="handleInstall"
|
|
214
214
|
>
|
|
@@ -221,7 +221,7 @@ onUnmounted(() => {
|
|
|
221
221
|
<router-link
|
|
222
222
|
v-else-if="installTo"
|
|
223
223
|
:to="installTo"
|
|
224
|
-
class="
|
|
224
|
+
class="mint-plugin-switcher__install"
|
|
225
225
|
role="menuitem"
|
|
226
226
|
@click="handleInstall"
|
|
227
227
|
>
|
|
@@ -65,11 +65,11 @@ const activeSections = computed<SidebarToolSection[]>(() => {
|
|
|
65
65
|
const isVisible = computed(() => activeSections.value.length > 0)
|
|
66
66
|
|
|
67
67
|
const sidebarClasses = computed(() => [
|
|
68
|
-
'
|
|
69
|
-
`
|
|
70
|
-
props.floating ? '
|
|
71
|
-
props.dense ? '
|
|
72
|
-
!isVisible.value ? '
|
|
68
|
+
'mint-sidebar',
|
|
69
|
+
`mint-sidebar--${props.side}`,
|
|
70
|
+
props.floating ? 'mint-sidebar--floating' : 'mint-sidebar--static',
|
|
71
|
+
props.dense ? 'mint-sidebar--dense' : '',
|
|
72
|
+
!isVisible.value ? 'mint-sidebar--hidden' : '',
|
|
73
73
|
])
|
|
74
74
|
|
|
75
75
|
const sidebarStyle = computed(() => ({
|
|
@@ -83,12 +83,12 @@ const sidebarStyle = computed(() => ({
|
|
|
83
83
|
:style="sidebarStyle"
|
|
84
84
|
>
|
|
85
85
|
<!-- Header slot -->
|
|
86
|
-
<div v-if="$slots.header" class="
|
|
86
|
+
<div v-if="$slots.header" class="mint-sidebar__header">
|
|
87
87
|
<slot name="header" />
|
|
88
88
|
</div>
|
|
89
89
|
|
|
90
90
|
<!-- Tool sections -->
|
|
91
|
-
<div class="
|
|
91
|
+
<div class="mint-sidebar__sections">
|
|
92
92
|
<CollapsibleCard
|
|
93
93
|
v-for="section in activeSections"
|
|
94
94
|
:key="section.id"
|
|
@@ -108,7 +108,7 @@ const sidebarStyle = computed(() => ({
|
|
|
108
108
|
</div>
|
|
109
109
|
|
|
110
110
|
<!-- Footer slot -->
|
|
111
|
-
<div v-if="$slots.footer" class="
|
|
111
|
+
<div v-if="$slots.footer" class="mint-sidebar__footer">
|
|
112
112
|
<slot name="footer" />
|
|
113
113
|
</div>
|
|
114
114
|
</aside>
|
|
@@ -214,9 +214,9 @@ const sampleTabs: TopBarTab[] = [
|
|
|
214
214
|
</div>
|
|
215
215
|
</Variant>
|
|
216
216
|
|
|
217
|
-
<!-- ───────────────
|
|
217
|
+
<!-- ─────────────── CLASSIC VARIANTS (classic prop surface) ─────────────── -->
|
|
218
218
|
|
|
219
|
-
<Variant title="
|
|
219
|
+
<Variant title="Classic · Playground">
|
|
220
220
|
<template #default="{ state }">
|
|
221
221
|
<div style="padding: 2rem;">
|
|
222
222
|
<AppTopBar
|
|
@@ -244,7 +244,7 @@ const sampleTabs: TopBarTab[] = [
|
|
|
244
244
|
</template>
|
|
245
245
|
</Variant>
|
|
246
246
|
|
|
247
|
-
<Variant title="
|
|
247
|
+
<Variant title="Classic · Title + Subtitle">
|
|
248
248
|
<div style="padding: 2rem;">
|
|
249
249
|
<AppTopBar
|
|
250
250
|
title="Dose-Response Analysis"
|
|
@@ -254,7 +254,7 @@ const sampleTabs: TopBarTab[] = [
|
|
|
254
254
|
</div>
|
|
255
255
|
</Variant>
|
|
256
256
|
|
|
257
|
-
<Variant title="
|
|
257
|
+
<Variant title="Classic · Breadcrumb with pages">
|
|
258
258
|
<div style="padding: 2rem;">
|
|
259
259
|
<AppTopBar
|
|
260
260
|
plugin-name="IC50 Calculator"
|
|
@@ -268,7 +268,7 @@ const sampleTabs: TopBarTab[] = [
|
|
|
268
268
|
</div>
|
|
269
269
|
</Variant>
|
|
270
270
|
|
|
271
|
-
<Variant title="
|
|
271
|
+
<Variant title="Classic · Tabs">
|
|
272
272
|
<div style="padding: 2rem;">
|
|
273
273
|
<AppTopBar
|
|
274
274
|
plugin-name="Plate Analyzer"
|
|
@@ -281,13 +281,13 @@ const sampleTabs: TopBarTab[] = [
|
|
|
281
281
|
</div>
|
|
282
282
|
</Variant>
|
|
283
283
|
|
|
284
|
-
<Variant title="
|
|
284
|
+
<Variant title="Classic · Minimal (logo only)">
|
|
285
285
|
<div style="padding: 2rem;">
|
|
286
286
|
<AppTopBar :show-logo="true" home-path="/" />
|
|
287
287
|
</div>
|
|
288
288
|
</Variant>
|
|
289
289
|
|
|
290
|
-
<Variant title="
|
|
290
|
+
<Variant title="Classic · Experiment selector integration">
|
|
291
291
|
<div style="padding: 2rem;">
|
|
292
292
|
<ExperimentProvider>
|
|
293
293
|
<AppTopBar
|