@morscherlab/mint-sdk 1.0.0-alpha.8 → 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
|
@@ -113,32 +113,32 @@ defineExpose({ setStepValid })
|
|
|
113
113
|
|
|
114
114
|
<template>
|
|
115
115
|
<div
|
|
116
|
-
:class="['
|
|
116
|
+
:class="['mint-wizard', `mint-wizard--${props.size}`]"
|
|
117
117
|
tabindex="0"
|
|
118
118
|
@keydown="handleKeydown"
|
|
119
119
|
>
|
|
120
120
|
<!-- Progress indicator -->
|
|
121
|
-
<div v-if="props.showProgress" class="
|
|
121
|
+
<div v-if="props.showProgress" class="mint-wizard__progress">
|
|
122
122
|
<slot name="progress" :steps="props.steps" :current="props.modelValue" :states="stepStates">
|
|
123
|
-
<div class="
|
|
123
|
+
<div class="mint-wizard__steps-indicator">
|
|
124
124
|
<template v-for="(step, index) in props.steps" :key="step.id">
|
|
125
125
|
<!-- Connector line (before each step except first) -->
|
|
126
126
|
<div
|
|
127
127
|
v-if="index > 0"
|
|
128
128
|
:class="[
|
|
129
|
-
'
|
|
130
|
-
stepStates[index - 1] === 'completed' ? '
|
|
129
|
+
'mint-wizard__step-connector',
|
|
130
|
+
stepStates[index - 1] === 'completed' ? 'mint-wizard__step-connector--completed' : '',
|
|
131
131
|
]"
|
|
132
132
|
/>
|
|
133
133
|
<!-- Step indicator -->
|
|
134
134
|
<div
|
|
135
135
|
:class="[
|
|
136
|
-
'
|
|
137
|
-
`
|
|
136
|
+
'mint-wizard__step-indicator',
|
|
137
|
+
`mint-wizard__step-indicator--${stepStates[index]}`,
|
|
138
138
|
]"
|
|
139
139
|
@click="goToStep(index)"
|
|
140
140
|
>
|
|
141
|
-
<div class="
|
|
141
|
+
<div class="mint-wizard__step-dot">
|
|
142
142
|
<template v-if="stepStates[index] === 'completed'">
|
|
143
143
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
144
144
|
<path d="M20 6 9 17l-5-5" />
|
|
@@ -148,7 +148,7 @@ defineExpose({ setStepValid })
|
|
|
148
148
|
{{ index + 1 }}
|
|
149
149
|
</template>
|
|
150
150
|
</div>
|
|
151
|
-
<div class="
|
|
151
|
+
<div class="mint-wizard__step-label">{{ step.label }}</div>
|
|
152
152
|
</div>
|
|
153
153
|
</template>
|
|
154
154
|
</div>
|
|
@@ -156,19 +156,19 @@ defineExpose({ setStepValid })
|
|
|
156
156
|
</div>
|
|
157
157
|
|
|
158
158
|
<!-- Step content -->
|
|
159
|
-
<div class="
|
|
159
|
+
<div class="mint-wizard__body">
|
|
160
160
|
<div
|
|
161
161
|
v-for="(step, index) in props.steps"
|
|
162
162
|
:key="step.id"
|
|
163
163
|
v-show="index === props.modelValue"
|
|
164
|
-
class="
|
|
164
|
+
class="mint-wizard__step-content"
|
|
165
165
|
>
|
|
166
166
|
<slot :name="`step-${step.id}`" :step="step" :index="index" />
|
|
167
167
|
</div>
|
|
168
168
|
</div>
|
|
169
169
|
|
|
170
170
|
<!-- Navigation -->
|
|
171
|
-
<div class="
|
|
171
|
+
<div class="mint-wizard__navigation">
|
|
172
172
|
<slot
|
|
173
173
|
name="navigation"
|
|
174
174
|
:go-back="goBack"
|
|
@@ -181,7 +181,7 @@ defineExpose({ setStepValid })
|
|
|
181
181
|
>
|
|
182
182
|
<button
|
|
183
183
|
type="button"
|
|
184
|
-
class="
|
|
184
|
+
class="mint-wizard__nav-btn mint-wizard__nav-btn--cancel"
|
|
185
185
|
@click="cancel"
|
|
186
186
|
>
|
|
187
187
|
Cancel
|
|
@@ -189,7 +189,7 @@ defineExpose({ setStepValid })
|
|
|
189
189
|
<div style="flex: 1" />
|
|
190
190
|
<button
|
|
191
191
|
type="button"
|
|
192
|
-
class="
|
|
192
|
+
class="mint-wizard__nav-btn mint-wizard__nav-btn--back"
|
|
193
193
|
:disabled="props.modelValue === 0"
|
|
194
194
|
@click="goBack"
|
|
195
195
|
>
|
|
@@ -198,7 +198,7 @@ defineExpose({ setStepValid })
|
|
|
198
198
|
<button
|
|
199
199
|
v-if="props.modelValue < props.steps.length - 1"
|
|
200
200
|
type="button"
|
|
201
|
-
class="
|
|
201
|
+
class="mint-wizard__nav-btn mint-wizard__nav-btn--next"
|
|
202
202
|
:disabled="stepValidity[props.modelValue] === false"
|
|
203
203
|
@click="goNext"
|
|
204
204
|
>
|
|
@@ -207,7 +207,7 @@ defineExpose({ setStepValid })
|
|
|
207
207
|
<button
|
|
208
208
|
v-else
|
|
209
209
|
type="button"
|
|
210
|
-
class="
|
|
210
|
+
class="mint-wizard__nav-btn mint-wizard__nav-btn--finish"
|
|
211
211
|
:disabled="stepValidity[props.modelValue] === false"
|
|
212
212
|
@click="finish"
|
|
213
213
|
>
|
|
@@ -172,23 +172,23 @@ function onInputEvent() {
|
|
|
172
172
|
<template>
|
|
173
173
|
<div
|
|
174
174
|
:class="[
|
|
175
|
-
'
|
|
176
|
-
`
|
|
177
|
-
error ? '
|
|
178
|
-
disabled ? '
|
|
179
|
-
categories.length ? '
|
|
175
|
+
'mint-tags-input',
|
|
176
|
+
`mint-tags-input--${size}`,
|
|
177
|
+
error ? 'mint-tags-input--error' : '',
|
|
178
|
+
disabled ? 'mint-tags-input--disabled' : '',
|
|
179
|
+
categories.length ? 'mint-tags-input--categorized' : '',
|
|
180
180
|
]"
|
|
181
181
|
>
|
|
182
182
|
<!-- Category switcher (only if categories defined) -->
|
|
183
|
-
<div v-if="categories.length" class="
|
|
183
|
+
<div v-if="categories.length" class="mint-tags-input__categories">
|
|
184
184
|
<button
|
|
185
185
|
v-for="cat in categories"
|
|
186
186
|
:key="cat.prefix"
|
|
187
187
|
type="button"
|
|
188
188
|
:class="[
|
|
189
|
-
'
|
|
190
|
-
`
|
|
191
|
-
activeCategory === cat.prefix ? '
|
|
189
|
+
'mint-tags-input__category',
|
|
190
|
+
`mint-tags-input__category--${cat.color ?? 'neutral'}`,
|
|
191
|
+
activeCategory === cat.prefix ? 'mint-tags-input__category--active' : '',
|
|
192
192
|
]"
|
|
193
193
|
:disabled="disabled"
|
|
194
194
|
@click="setCategory(cat.prefix)"
|
|
@@ -197,14 +197,14 @@ function onInputEvent() {
|
|
|
197
197
|
</button>
|
|
198
198
|
</div>
|
|
199
199
|
|
|
200
|
-
<div class="
|
|
200
|
+
<div class="mint-tags-input__field" @click="focusInput">
|
|
201
201
|
<span
|
|
202
202
|
v-for="(tag, index) in modelValue"
|
|
203
203
|
:key="`${tag}-${index}`"
|
|
204
204
|
:class="[
|
|
205
|
-
'
|
|
206
|
-
`
|
|
207
|
-
categoryFor(tag) ? `
|
|
205
|
+
'mint-tags-input__tag',
|
|
206
|
+
`mint-tags-input__tag--${size}`,
|
|
207
|
+
categoryFor(tag) ? `mint-tags-input__tag--${categoryFor(tag)?.color ?? 'neutral'}` : '',
|
|
208
208
|
]"
|
|
209
209
|
>
|
|
210
210
|
{{ tag }}
|
|
@@ -212,10 +212,10 @@ function onInputEvent() {
|
|
|
212
212
|
v-if="!disabled"
|
|
213
213
|
type="button"
|
|
214
214
|
:aria-label="`Remove ${tag}`"
|
|
215
|
-
class="
|
|
215
|
+
class="mint-tags-input__tag-remove"
|
|
216
216
|
@click.stop="removeTag(index)"
|
|
217
217
|
>
|
|
218
|
-
<svg class="
|
|
218
|
+
<svg class="mint-tags-input__tag-remove-icon" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24">
|
|
219
219
|
<path d="M18 6 6 18" /><path d="m6 6 12 12" />
|
|
220
220
|
</svg>
|
|
221
221
|
</button>
|
|
@@ -227,7 +227,7 @@ function onInputEvent() {
|
|
|
227
227
|
type="text"
|
|
228
228
|
:placeholder="modelValue.length === 0 ? placeholder : ''"
|
|
229
229
|
:disabled="disabled || !canAddMore"
|
|
230
|
-
:class="['
|
|
230
|
+
:class="['mint-tags-input__input', `mint-tags-input__input--${size}`]"
|
|
231
231
|
@keydown="handleKeydown"
|
|
232
232
|
@paste="handlePaste"
|
|
233
233
|
@focus="handleFocus"
|
|
@@ -238,20 +238,20 @@ function onInputEvent() {
|
|
|
238
238
|
<!-- Autocomplete dropdown -->
|
|
239
239
|
<div
|
|
240
240
|
v-if="dropdownOpen && filteredSuggestions.length"
|
|
241
|
-
class="
|
|
241
|
+
class="mint-tags-input__dropdown"
|
|
242
242
|
>
|
|
243
243
|
<button
|
|
244
244
|
v-for="(sug, i) in filteredSuggestions"
|
|
245
245
|
:key="sug.value"
|
|
246
246
|
type="button"
|
|
247
247
|
:class="[
|
|
248
|
-
'
|
|
249
|
-
i === highlightedIndex ? '
|
|
248
|
+
'mint-tags-input__dropdown-item',
|
|
249
|
+
i === highlightedIndex ? 'mint-tags-input__dropdown-item--highlighted' : '',
|
|
250
250
|
]"
|
|
251
251
|
@mousedown.prevent="addTag(sug.value)"
|
|
252
252
|
>
|
|
253
253
|
<span>{{ sug.value }}</span>
|
|
254
|
-
<span v-if="sug.count !== undefined" class="
|
|
254
|
+
<span v-if="sug.count !== undefined" class="mint-tags-input__dropdown-count">
|
|
255
255
|
{{ sug.count }}
|
|
256
256
|
</span>
|
|
257
257
|
</button>
|
|
@@ -16,14 +16,14 @@ const { isDark, toggleTheme } = useTheme()
|
|
|
16
16
|
<template>
|
|
17
17
|
<button
|
|
18
18
|
type="button"
|
|
19
|
-
:class="['
|
|
19
|
+
:class="['mint-theme-toggle', `mint-theme-toggle--${size}`]"
|
|
20
20
|
:aria-label="isDark ? 'Switch to light mode' : 'Switch to dark mode'"
|
|
21
21
|
@click="toggleTheme"
|
|
22
22
|
>
|
|
23
23
|
<!-- Lucide sun -->
|
|
24
24
|
<svg
|
|
25
25
|
v-if="isDark"
|
|
26
|
-
:class="`
|
|
26
|
+
:class="`mint-theme-toggle__icon--${size}`"
|
|
27
27
|
viewBox="0 0 24 24"
|
|
28
28
|
fill="none"
|
|
29
29
|
stroke="currentColor"
|
|
@@ -36,7 +36,7 @@ const { isDark, toggleTheme } = useTheme()
|
|
|
36
36
|
<!-- Lucide moon -->
|
|
37
37
|
<svg
|
|
38
38
|
v-else
|
|
39
|
-
:class="`
|
|
39
|
+
:class="`mint-theme-toggle__icon--${size}`"
|
|
40
40
|
viewBox="0 0 24 24"
|
|
41
41
|
fill="none"
|
|
42
42
|
stroke="currentColor"
|
|
@@ -78,7 +78,7 @@ function handleClickOutside(event: MouseEvent) {
|
|
|
78
78
|
function scrollToActiveSlot() {
|
|
79
79
|
nextTick(() => {
|
|
80
80
|
if (!listRef.value) return
|
|
81
|
-
const activeEl = listRef.value.querySelector('.
|
|
81
|
+
const activeEl = listRef.value.querySelector('.mint-time-picker__slot--active') as HTMLElement | null
|
|
82
82
|
if (activeEl) {
|
|
83
83
|
activeEl.scrollIntoView({ block: 'center' })
|
|
84
84
|
} else if (props.modelValue) {
|
|
@@ -191,8 +191,8 @@ onUnmounted(() => {
|
|
|
191
191
|
</script>
|
|
192
192
|
|
|
193
193
|
<template>
|
|
194
|
-
<div ref="containerRef" class="
|
|
195
|
-
<div class="
|
|
194
|
+
<div ref="containerRef" class="mint-time-picker" @keydown="handleKeydown">
|
|
195
|
+
<div class="mint-time-picker__input-wrapper">
|
|
196
196
|
<input
|
|
197
197
|
type="text"
|
|
198
198
|
readonly
|
|
@@ -200,10 +200,10 @@ onUnmounted(() => {
|
|
|
200
200
|
:placeholder="placeholder"
|
|
201
201
|
:disabled="disabled"
|
|
202
202
|
:class="[
|
|
203
|
-
'
|
|
204
|
-
`
|
|
205
|
-
error ? '
|
|
206
|
-
disabled ? '
|
|
203
|
+
'mint-time-picker__input',
|
|
204
|
+
`mint-time-picker__input--${size}`,
|
|
205
|
+
error ? 'mint-time-picker__input--error' : '',
|
|
206
|
+
disabled ? 'mint-time-picker__input--disabled' : '',
|
|
207
207
|
]"
|
|
208
208
|
role="combobox"
|
|
209
209
|
aria-haspopup="listbox"
|
|
@@ -213,7 +213,7 @@ onUnmounted(() => {
|
|
|
213
213
|
<button
|
|
214
214
|
v-if="clearable && modelValue"
|
|
215
215
|
type="button"
|
|
216
|
-
class="
|
|
216
|
+
class="mint-time-picker__clear-btn"
|
|
217
217
|
aria-label="Clear time"
|
|
218
218
|
@click.stop="clear"
|
|
219
219
|
>
|
|
@@ -221,7 +221,7 @@ onUnmounted(() => {
|
|
|
221
221
|
<path d="M18 6 6 18" /><path d="m6 6 12 12" />
|
|
222
222
|
</svg>
|
|
223
223
|
</button>
|
|
224
|
-
<div class="
|
|
224
|
+
<div class="mint-time-picker__icon">
|
|
225
225
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
226
226
|
<circle cx="12" cy="12" r="10" /><path d="M12 6v6l4 2" />
|
|
227
227
|
</svg>
|
|
@@ -229,20 +229,20 @@ onUnmounted(() => {
|
|
|
229
229
|
</div>
|
|
230
230
|
|
|
231
231
|
<Transition
|
|
232
|
-
enter-active-class="
|
|
233
|
-
enter-from-class="
|
|
234
|
-
enter-to-class="
|
|
235
|
-
leave-active-class="
|
|
236
|
-
leave-from-class="
|
|
237
|
-
leave-to-class="
|
|
232
|
+
enter-active-class="mint-time-picker__dropdown-enter-active"
|
|
233
|
+
enter-from-class="mint-time-picker__dropdown-enter-from"
|
|
234
|
+
enter-to-class="mint-time-picker__dropdown-enter-to"
|
|
235
|
+
leave-active-class="mint-time-picker__dropdown-leave-active"
|
|
236
|
+
leave-from-class="mint-time-picker__dropdown-leave-from"
|
|
237
|
+
leave-to-class="mint-time-picker__dropdown-leave-to"
|
|
238
238
|
>
|
|
239
239
|
<div
|
|
240
240
|
v-if="isOpen"
|
|
241
|
-
class="
|
|
241
|
+
class="mint-time-picker__dropdown"
|
|
242
242
|
>
|
|
243
243
|
<ul
|
|
244
244
|
ref="listRef"
|
|
245
|
-
class="
|
|
245
|
+
class="mint-time-picker__list"
|
|
246
246
|
role="listbox"
|
|
247
247
|
aria-label="Available times"
|
|
248
248
|
>
|
|
@@ -253,10 +253,10 @@ onUnmounted(() => {
|
|
|
253
253
|
:aria-selected="slot === modelValue"
|
|
254
254
|
:aria-disabled="isSlotDisabled(slot)"
|
|
255
255
|
:class="[
|
|
256
|
-
'
|
|
257
|
-
slot === modelValue ? '
|
|
258
|
-
isSlotDisabled(slot) ? '
|
|
259
|
-
index === highlightedIndex && !isSlotDisabled(slot) ? '
|
|
256
|
+
'mint-time-picker__slot',
|
|
257
|
+
slot === modelValue ? 'mint-time-picker__slot--active' : '',
|
|
258
|
+
isSlotDisabled(slot) ? 'mint-time-picker__slot--disabled' : '',
|
|
259
|
+
index === highlightedIndex && !isSlotDisabled(slot) ? 'mint-time-picker__slot--highlighted' : '',
|
|
260
260
|
]"
|
|
261
261
|
@click="selectSlot(slot)"
|
|
262
262
|
>
|
|
@@ -75,8 +75,8 @@ function onEndChange(value: string | undefined) {
|
|
|
75
75
|
</script>
|
|
76
76
|
|
|
77
77
|
<template>
|
|
78
|
-
<div class="
|
|
79
|
-
<div class="
|
|
78
|
+
<div class="mint-time-range">
|
|
79
|
+
<div class="mint-time-range__start">
|
|
80
80
|
<TimePicker
|
|
81
81
|
:model-value="startValue"
|
|
82
82
|
:disabled="disabled"
|
|
@@ -91,16 +91,16 @@ function onEndChange(value: string | undefined) {
|
|
|
91
91
|
/>
|
|
92
92
|
</div>
|
|
93
93
|
|
|
94
|
-
<div class="
|
|
94
|
+
<div class="mint-time-range__separator">
|
|
95
95
|
<span
|
|
96
96
|
v-if="showDuration && duration !== null"
|
|
97
|
-
:class="['
|
|
97
|
+
:class="['mint-time-range__duration', isInvalid ? 'mint-time-range__duration--error' : '']"
|
|
98
98
|
>
|
|
99
99
|
{{ durationLabel }}
|
|
100
100
|
</span>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
103
|
-
<div class="
|
|
103
|
+
<div class="mint-time-range__end">
|
|
104
104
|
<TimePicker
|
|
105
105
|
:model-value="endValue"
|
|
106
106
|
:disabled="disabled"
|
|
@@ -15,12 +15,12 @@ const accentColors: Record<Toast['type'], string> = {
|
|
|
15
15
|
|
|
16
16
|
<template>
|
|
17
17
|
<Teleport to="body">
|
|
18
|
-
<div class="
|
|
18
|
+
<div class="mint-toast__container">
|
|
19
19
|
<TransitionGroup name="toast">
|
|
20
20
|
<div
|
|
21
21
|
v-for="toast in toasts"
|
|
22
22
|
:key="toast.id"
|
|
23
|
-
:class="['
|
|
23
|
+
:class="['mint-toast__item', `mint-toast__item--${toast.type}`]"
|
|
24
24
|
:style="{
|
|
25
25
|
borderLeftColor: accentColors[toast.type],
|
|
26
26
|
}"
|
|
@@ -28,24 +28,24 @@ const accentColors: Record<Toast['type'], string> = {
|
|
|
28
28
|
@click="dismiss(toast.id)"
|
|
29
29
|
>
|
|
30
30
|
<!-- Lucide circle-check -->
|
|
31
|
-
<svg v-if="toast.type === 'success'" class="
|
|
31
|
+
<svg v-if="toast.type === 'success'" class="mint-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
32
|
<circle cx="12" cy="12" r="10" /><path d="m9 12 2 2 4-4" />
|
|
33
33
|
</svg>
|
|
34
34
|
<!-- Lucide circle-x -->
|
|
35
|
-
<svg v-else-if="toast.type === 'error'" class="
|
|
35
|
+
<svg v-else-if="toast.type === 'error'" class="mint-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
36
|
<circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" />
|
|
37
37
|
</svg>
|
|
38
38
|
<!-- Lucide triangle-alert -->
|
|
39
|
-
<svg v-else-if="toast.type === 'warning'" class="
|
|
39
|
+
<svg v-else-if="toast.type === 'warning'" class="mint-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
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
41
|
</svg>
|
|
42
42
|
<!-- Lucide info -->
|
|
43
|
-
<svg v-else class="
|
|
43
|
+
<svg v-else class="mint-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
44
|
<circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" />
|
|
45
45
|
</svg>
|
|
46
|
-
<span class="
|
|
46
|
+
<span class="mint-toast__message">{{ toast.message }}</span>
|
|
47
47
|
<span
|
|
48
|
-
class="
|
|
48
|
+
class="mint-toast__progress"
|
|
49
49
|
:style="{
|
|
50
50
|
backgroundColor: accentColors[toast.type],
|
|
51
51
|
animationDuration: `${toast.duration ?? 3500}ms`,
|
|
@@ -18,7 +18,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
18
18
|
maxWidth: undefined,
|
|
19
19
|
})
|
|
20
20
|
|
|
21
|
-
const tooltipId = `
|
|
21
|
+
const tooltipId = `mint-tooltip-${Math.random().toString(36).slice(2, 9)}`
|
|
22
22
|
const visible = ref(false)
|
|
23
23
|
const actualPlacement = ref<Placement>(props.position)
|
|
24
24
|
const triggerRef = ref<HTMLElement | null>(null)
|
|
@@ -82,7 +82,7 @@ function resolvedMaxWidth(value: string | number | undefined): string | undefine
|
|
|
82
82
|
<template>
|
|
83
83
|
<span
|
|
84
84
|
ref="triggerRef"
|
|
85
|
-
class="
|
|
85
|
+
class="mint-tooltip"
|
|
86
86
|
:aria-describedby="visible ? tooltipId : undefined"
|
|
87
87
|
@mouseenter="show"
|
|
88
88
|
@mouseleave="hide"
|
|
@@ -96,9 +96,9 @@ function resolvedMaxWidth(value: string | number | undefined): string | undefine
|
|
|
96
96
|
:id="tooltipId"
|
|
97
97
|
ref="contentRef"
|
|
98
98
|
:class="[
|
|
99
|
-
'
|
|
100
|
-
`
|
|
101
|
-
maxWidth ? '
|
|
99
|
+
'mint-tooltip__content',
|
|
100
|
+
`mint-tooltip__content--${actualPlacement}`,
|
|
101
|
+
maxWidth ? 'mint-tooltip__content--multiline' : '',
|
|
102
102
|
]"
|
|
103
103
|
:style="{
|
|
104
104
|
top: coords.top,
|
|
@@ -107,8 +107,8 @@ function resolvedMaxWidth(value: string | number | undefined): string | undefine
|
|
|
107
107
|
}"
|
|
108
108
|
role="tooltip"
|
|
109
109
|
>
|
|
110
|
-
<span class="
|
|
111
|
-
<kbd v-if="shortcut" class="
|
|
110
|
+
<span class="mint-tooltip__body">{{ text }}</span>
|
|
111
|
+
<kbd v-if="shortcut" class="mint-tooltip__shortcut">{{ shortcut }}</kbd>
|
|
112
112
|
</span>
|
|
113
113
|
</Teleport>
|
|
114
114
|
</span>
|
|
@@ -127,12 +127,12 @@ watch(conversionHint, (hint) => {
|
|
|
127
127
|
<template>
|
|
128
128
|
<div
|
|
129
129
|
:class="[
|
|
130
|
-
'
|
|
131
|
-
error ? '
|
|
132
|
-
disabled ? '
|
|
130
|
+
'mint-unit-input',
|
|
131
|
+
error ? 'mint-unit-input--error' : '',
|
|
132
|
+
disabled ? 'mint-unit-input--disabled' : '',
|
|
133
133
|
]"
|
|
134
134
|
>
|
|
135
|
-
<div :class="['
|
|
135
|
+
<div :class="['mint-unit-input__controls', `mint-unit-input__controls--${size}`]">
|
|
136
136
|
<input
|
|
137
137
|
type="number"
|
|
138
138
|
:value="modelValue"
|
|
@@ -142,21 +142,21 @@ watch(conversionHint, (hint) => {
|
|
|
142
142
|
:disabled="disabled"
|
|
143
143
|
:placeholder="placeholder"
|
|
144
144
|
:class="[
|
|
145
|
-
'
|
|
146
|
-
`
|
|
147
|
-
disabled ? '
|
|
145
|
+
'mint-unit-input__value',
|
|
146
|
+
`mint-unit-input__value--${size}`,
|
|
147
|
+
disabled ? 'mint-unit-input__value--disabled' : '',
|
|
148
148
|
]"
|
|
149
149
|
aria-label="Value"
|
|
150
150
|
@input="handleValueInput"
|
|
151
151
|
/>
|
|
152
152
|
|
|
153
|
-
<div class="
|
|
153
|
+
<div class="mint-unit-input__unit">
|
|
154
154
|
<select
|
|
155
155
|
:value="currentUnit"
|
|
156
156
|
:disabled="disabled"
|
|
157
157
|
:class="[
|
|
158
|
-
'
|
|
159
|
-
`
|
|
158
|
+
'mint-unit-input__unit-select',
|
|
159
|
+
`mint-unit-input__unit-select--${size}`,
|
|
160
160
|
]"
|
|
161
161
|
aria-label="Unit"
|
|
162
162
|
@change="handleUnitChange"
|
|
@@ -175,7 +175,7 @@ watch(conversionHint, (hint) => {
|
|
|
175
175
|
v-for="[groupLabel, groupUnits] in groupedUnits.groups"
|
|
176
176
|
:key="groupLabel"
|
|
177
177
|
:label="groupLabel"
|
|
178
|
-
class="
|
|
178
|
+
class="mint-unit-input__unit-group"
|
|
179
179
|
>
|
|
180
180
|
<option
|
|
181
181
|
v-for="u in groupUnits"
|
|
@@ -201,7 +201,7 @@ watch(conversionHint, (hint) => {
|
|
|
201
201
|
|
|
202
202
|
<div
|
|
203
203
|
v-if="conversionHint"
|
|
204
|
-
class="
|
|
204
|
+
class="mint-unit-input__conversion-hint"
|
|
205
205
|
>
|
|
206
206
|
{{ conversionHint }}
|
|
207
207
|
</div>
|