@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
|
@@ -43,8 +43,8 @@ const handleToggleClick = (event: Event) => {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const headerClasses = computed(() => [
|
|
46
|
-
'
|
|
47
|
-
props.disabled ? '
|
|
46
|
+
'mint-collapsible-card__header',
|
|
47
|
+
props.disabled ? 'mint-collapsible-card__header--disabled' : '',
|
|
48
48
|
])
|
|
49
49
|
|
|
50
50
|
const iconBgStyle = computed(() => ({
|
|
@@ -70,7 +70,7 @@ const toggleTrackStyle = computed(() => {
|
|
|
70
70
|
</script>
|
|
71
71
|
|
|
72
72
|
<template>
|
|
73
|
-
<div :class="['
|
|
73
|
+
<div :class="['mint-collapsible-card', dense ? 'mint-collapsible-card--dense' : '']">
|
|
74
74
|
<button
|
|
75
75
|
type="button"
|
|
76
76
|
:class="headerClasses"
|
|
@@ -78,12 +78,12 @@ const toggleTrackStyle = computed(() => {
|
|
|
78
78
|
:aria-expanded="isOpen"
|
|
79
79
|
@click="toggle"
|
|
80
80
|
>
|
|
81
|
-
<div class="
|
|
81
|
+
<div class="mint-collapsible-card__title-section">
|
|
82
82
|
<!-- Icon badge -->
|
|
83
|
-
<div v-if="icon" class="
|
|
83
|
+
<div v-if="icon" class="mint-collapsible-card__icon-badge" :style="iconBgStyle">
|
|
84
84
|
<svg
|
|
85
85
|
v-if="isSvgIcon"
|
|
86
|
-
class="
|
|
86
|
+
class="mint-collapsible-card__icon"
|
|
87
87
|
:style="iconColorStyle"
|
|
88
88
|
viewBox="0 0 24 24"
|
|
89
89
|
fill="none"
|
|
@@ -97,20 +97,20 @@ const toggleTrackStyle = computed(() => {
|
|
|
97
97
|
</template>
|
|
98
98
|
<path v-else :d="icon" />
|
|
99
99
|
</svg>
|
|
100
|
-
<span v-else class="
|
|
100
|
+
<span v-else class="mint-collapsible-card__icon-text" :style="iconColorStyle">{{ icon }}</span>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
103
|
-
<div class="
|
|
104
|
-
<h3 class="
|
|
105
|
-
<p v-if="subtitle" class="
|
|
103
|
+
<div class="mint-collapsible-card__titles">
|
|
104
|
+
<h3 class="mint-collapsible-card__title">{{ title }}</h3>
|
|
105
|
+
<p v-if="subtitle" class="mint-collapsible-card__subtitle">{{ subtitle }}</p>
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
108
108
|
|
|
109
|
-
<div class="
|
|
109
|
+
<div class="mint-collapsible-card__actions">
|
|
110
110
|
<!-- Toggle switch -->
|
|
111
111
|
<div
|
|
112
112
|
v-if="showToggle"
|
|
113
|
-
class="
|
|
113
|
+
class="mint-collapsible-card__toggle"
|
|
114
114
|
@click="handleToggleClick"
|
|
115
115
|
>
|
|
116
116
|
<div
|
|
@@ -118,8 +118,8 @@ const toggleTrackStyle = computed(() => {
|
|
|
118
118
|
tabindex="0"
|
|
119
119
|
:aria-checked="toggleValue"
|
|
120
120
|
:class="[
|
|
121
|
-
'
|
|
122
|
-
toggleValue ? '
|
|
121
|
+
'mint-collapsible-card__toggle-track',
|
|
122
|
+
toggleValue ? 'mint-collapsible-card__toggle-track--on' : '',
|
|
123
123
|
]"
|
|
124
124
|
:style="toggleTrackStyle"
|
|
125
125
|
@keydown.enter.prevent="handleToggleClick"
|
|
@@ -127,8 +127,8 @@ const toggleTrackStyle = computed(() => {
|
|
|
127
127
|
>
|
|
128
128
|
<span
|
|
129
129
|
:class="[
|
|
130
|
-
'
|
|
131
|
-
toggleValue ? '
|
|
130
|
+
'mint-collapsible-card__toggle-knob',
|
|
131
|
+
toggleValue ? 'mint-collapsible-card__toggle-knob--on' : '',
|
|
132
132
|
]"
|
|
133
133
|
/>
|
|
134
134
|
</div>
|
|
@@ -137,8 +137,8 @@ const toggleTrackStyle = computed(() => {
|
|
|
137
137
|
<!-- Chevron -->
|
|
138
138
|
<svg
|
|
139
139
|
:class="[
|
|
140
|
-
'
|
|
141
|
-
isOpen ? '
|
|
140
|
+
'mint-collapsible-card__chevron',
|
|
141
|
+
isOpen ? 'mint-collapsible-card__chevron--open' : '',
|
|
142
142
|
]"
|
|
143
143
|
fill="none"
|
|
144
144
|
stroke="currentColor"
|
|
@@ -153,8 +153,8 @@ const toggleTrackStyle = computed(() => {
|
|
|
153
153
|
</button>
|
|
154
154
|
|
|
155
155
|
<Transition name="collapse">
|
|
156
|
-
<div v-show="isOpen" class="
|
|
157
|
-
<div class="
|
|
156
|
+
<div v-show="isOpen" class="mint-collapsible-card__body">
|
|
157
|
+
<div class="mint-collapsible-card__content">
|
|
158
158
|
<slot />
|
|
159
159
|
</div>
|
|
160
160
|
</div>
|
|
@@ -108,10 +108,10 @@ function handleInput(event: Event) {
|
|
|
108
108
|
</script>
|
|
109
109
|
|
|
110
110
|
<template>
|
|
111
|
-
<div :class="['
|
|
112
|
-
<div class="
|
|
111
|
+
<div :class="['mint-color-slider', { 'mint-color-slider--disabled': disabled }]">
|
|
112
|
+
<div class="mint-color-slider__row">
|
|
113
113
|
<!-- Slider track with gradient -->
|
|
114
|
-
<div class="
|
|
114
|
+
<div class="mint-color-slider__track">
|
|
115
115
|
<input
|
|
116
116
|
type="range"
|
|
117
117
|
:value="currentValue"
|
|
@@ -123,7 +123,7 @@ function handleInput(event: Event) {
|
|
|
123
123
|
:aria-valuemin="min"
|
|
124
124
|
:aria-valuemax="max"
|
|
125
125
|
:aria-valuenow="currentValue"
|
|
126
|
-
class="color-slider
|
|
126
|
+
class="color-slider mint-color-slider__input"
|
|
127
127
|
:style="{
|
|
128
128
|
'--slider-gradient': gradientStyle,
|
|
129
129
|
'--thumb-size': `${sizeConfig.thumb}px`,
|
|
@@ -135,7 +135,7 @@ function handleInput(event: Event) {
|
|
|
135
135
|
<!-- Value badge -->
|
|
136
136
|
<div
|
|
137
137
|
v-if="showValue"
|
|
138
|
-
class="
|
|
138
|
+
class="mint-color-slider__badge"
|
|
139
139
|
:style="{
|
|
140
140
|
...valueBadgeStyle,
|
|
141
141
|
minWidth: sizeConfig.badgeSize,
|
|
@@ -150,7 +150,7 @@ function handleInput(event: Event) {
|
|
|
150
150
|
<!-- Min/Max labels -->
|
|
151
151
|
<div
|
|
152
152
|
v-if="showLabels"
|
|
153
|
-
class="
|
|
153
|
+
class="mint-color-slider__labels"
|
|
154
154
|
:style="{ fontSize: sizeConfig.labelFontSize }"
|
|
155
155
|
>
|
|
156
156
|
<span>{{ minLabel ?? min }}</span>
|
|
@@ -110,12 +110,12 @@ watch(availableUnits, (units) => {
|
|
|
110
110
|
<template>
|
|
111
111
|
<div
|
|
112
112
|
:class="[
|
|
113
|
-
'
|
|
114
|
-
error ? '
|
|
115
|
-
disabled ? '
|
|
113
|
+
'mint-concentration-input',
|
|
114
|
+
error ? 'mint-concentration-input--error' : '',
|
|
115
|
+
disabled ? 'mint-concentration-input--disabled' : '',
|
|
116
116
|
]"
|
|
117
117
|
>
|
|
118
|
-
<div :class="['
|
|
118
|
+
<div :class="['mint-concentration-input__controls', `mint-concentration-input__controls--${size}`]">
|
|
119
119
|
<input
|
|
120
120
|
type="number"
|
|
121
121
|
:value="currentValue"
|
|
@@ -124,21 +124,21 @@ watch(availableUnits, (units) => {
|
|
|
124
124
|
:disabled="disabled"
|
|
125
125
|
:placeholder="placeholder"
|
|
126
126
|
:class="[
|
|
127
|
-
'
|
|
128
|
-
`
|
|
129
|
-
disabled ? '
|
|
127
|
+
'mint-concentration-input__value',
|
|
128
|
+
`mint-concentration-input__value--${size}`,
|
|
129
|
+
disabled ? 'mint-concentration-input__value--disabled' : '',
|
|
130
130
|
]"
|
|
131
131
|
aria-label="Concentration value"
|
|
132
132
|
@input="handleValueInput"
|
|
133
133
|
/>
|
|
134
134
|
|
|
135
|
-
<div class="
|
|
135
|
+
<div class="mint-concentration-input__unit">
|
|
136
136
|
<select
|
|
137
137
|
:value="currentUnit"
|
|
138
138
|
:disabled="disabled"
|
|
139
139
|
:class="[
|
|
140
|
-
'
|
|
141
|
-
`
|
|
140
|
+
'mint-concentration-input__unit-select',
|
|
141
|
+
`mint-concentration-input__unit-select--${size}`,
|
|
142
142
|
]"
|
|
143
143
|
aria-label="Concentration unit"
|
|
144
144
|
@change="handleUnitChange"
|
|
@@ -147,7 +147,7 @@ watch(availableUnits, (units) => {
|
|
|
147
147
|
<optgroup
|
|
148
148
|
v-if="filteredCategories.length > 1"
|
|
149
149
|
:label="category.label"
|
|
150
|
-
class="
|
|
150
|
+
class="mint-concentration-input__unit-group"
|
|
151
151
|
>
|
|
152
152
|
<option
|
|
153
153
|
v-for="unit in category.units"
|
|
@@ -173,7 +173,7 @@ watch(availableUnits, (units) => {
|
|
|
173
173
|
|
|
174
174
|
<div
|
|
175
175
|
v-if="showConversion && conversionHint"
|
|
176
|
-
class="
|
|
176
|
+
class="mint-concentration-input__conversion"
|
|
177
177
|
>
|
|
178
178
|
{{ conversionHint }}
|
|
179
179
|
</div>
|
|
@@ -89,7 +89,7 @@ function initPlayground() {
|
|
|
89
89
|
<ConfirmDialog
|
|
90
90
|
v-model="uninstallOpen"
|
|
91
91
|
title="Confirm uninstall"
|
|
92
|
-
subtitle="
|
|
92
|
+
subtitle="mint-plugin-metabolomics · v2.4.1"
|
|
93
93
|
message="Removing this plugin will delete its routes from the platform on next restart. Plugin data and registered experiment types will be preserved."
|
|
94
94
|
variant="danger"
|
|
95
95
|
confirm-label="Uninstall"
|
|
@@ -48,24 +48,24 @@ function handleConfirm() {
|
|
|
48
48
|
:close-on-escape="!loading"
|
|
49
49
|
@update:model-value="emit('update:modelValue', $event)"
|
|
50
50
|
>
|
|
51
|
-
<div class="
|
|
51
|
+
<div class="mint-confirm">
|
|
52
52
|
<!-- Icon is now opt-in via slot. Refresh design keeps the body focused on
|
|
53
53
|
the message; variant intent is carried by the confirm button's color. -->
|
|
54
54
|
<div
|
|
55
55
|
v-if="$slots.icon"
|
|
56
|
-
:class="['
|
|
56
|
+
:class="['mint-confirm__icon', `mint-confirm__icon--${variant}`]"
|
|
57
57
|
>
|
|
58
58
|
<slot name="icon" />
|
|
59
59
|
</div>
|
|
60
|
-
<p v-if="message" class="
|
|
60
|
+
<p v-if="message" class="mint-confirm__message">{{ message }}</p>
|
|
61
61
|
<slot />
|
|
62
62
|
</div>
|
|
63
63
|
|
|
64
64
|
<template #footer>
|
|
65
|
-
<div class="
|
|
65
|
+
<div class="mint-confirm__footer">
|
|
66
66
|
<button
|
|
67
67
|
type="button"
|
|
68
|
-
class="
|
|
68
|
+
class="mint-confirm__btn-cancel"
|
|
69
69
|
:disabled="loading"
|
|
70
70
|
@click="handleCancel"
|
|
71
71
|
>
|
|
@@ -73,11 +73,11 @@ function handleConfirm() {
|
|
|
73
73
|
</button>
|
|
74
74
|
<button
|
|
75
75
|
type="button"
|
|
76
|
-
:class="['
|
|
76
|
+
:class="['mint-confirm__btn-confirm', `mint-confirm__btn-confirm--${variant}`]"
|
|
77
77
|
:disabled="loading"
|
|
78
78
|
@click="handleConfirm"
|
|
79
79
|
>
|
|
80
|
-
<svg v-if="loading" class="
|
|
80
|
+
<svg v-if="loading" class="mint-confirm__btn-spinner" fill="none" viewBox="0 0 24 24">
|
|
81
81
|
<circle style="opacity: 0.25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4" />
|
|
82
82
|
<path style="opacity: 0.75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" />
|
|
83
83
|
</svg>
|
|
@@ -239,36 +239,36 @@ const wrapperStyle = computed(() => {
|
|
|
239
239
|
<template>
|
|
240
240
|
<div
|
|
241
241
|
:class="[
|
|
242
|
-
'
|
|
243
|
-
{ '
|
|
242
|
+
'mint-dataframe',
|
|
243
|
+
{ 'mint-dataframe--bordered': bordered },
|
|
244
244
|
]"
|
|
245
245
|
>
|
|
246
246
|
<!-- Search header -->
|
|
247
|
-
<div v-if="searchable" class="
|
|
248
|
-
<div class="
|
|
249
|
-
<svg class="
|
|
247
|
+
<div v-if="searchable" class="mint-dataframe__header">
|
|
248
|
+
<div class="mint-dataframe__search-wrapper">
|
|
249
|
+
<svg class="mint-dataframe__search-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
250
250
|
<circle cx="11" cy="11" r="8" /><path d="m21 21-4.34-4.34" />
|
|
251
251
|
</svg>
|
|
252
252
|
<input
|
|
253
253
|
v-model="searchQuery"
|
|
254
254
|
type="text"
|
|
255
|
-
class="
|
|
255
|
+
class="mint-dataframe__search"
|
|
256
256
|
:placeholder="searchPlaceholder"
|
|
257
257
|
/>
|
|
258
258
|
</div>
|
|
259
259
|
</div>
|
|
260
260
|
|
|
261
261
|
<!-- Table wrapper -->
|
|
262
|
-
<div class="
|
|
263
|
-
<table class="
|
|
264
|
-
<thead :class="['
|
|
262
|
+
<div class="mint-dataframe__table-wrapper" :style="wrapperStyle">
|
|
263
|
+
<table class="mint-dataframe__table">
|
|
264
|
+
<thead :class="['mint-dataframe__thead', { 'mint-dataframe__thead--sticky': stickyHeader }]">
|
|
265
265
|
<tr>
|
|
266
|
-
<th v-if="selectable" class="
|
|
266
|
+
<th v-if="selectable" class="mint-dataframe__th mint-dataframe__th--checkbox">
|
|
267
267
|
<input
|
|
268
268
|
type="checkbox"
|
|
269
269
|
:checked="allSelected"
|
|
270
270
|
:indeterminate="selectIndeterminate"
|
|
271
|
-
class="
|
|
271
|
+
class="mint-dataframe__checkbox"
|
|
272
272
|
@change="toggleSelectAll"
|
|
273
273
|
/>
|
|
274
274
|
</th>
|
|
@@ -276,12 +276,12 @@ const wrapperStyle = computed(() => {
|
|
|
276
276
|
v-for="col in columns"
|
|
277
277
|
:key="col.key"
|
|
278
278
|
:class="[
|
|
279
|
-
'
|
|
280
|
-
`
|
|
281
|
-
`
|
|
279
|
+
'mint-dataframe__th',
|
|
280
|
+
`mint-dataframe__th--${size}`,
|
|
281
|
+
`mint-dataframe__th--align-${col.align ?? 'left'}`,
|
|
282
282
|
{
|
|
283
|
-
'
|
|
284
|
-
'
|
|
283
|
+
'mint-dataframe__th--sortable': isColumnSortable(col),
|
|
284
|
+
'mint-dataframe__th--sorted': activeSort?.key === col.key && activeSort?.direction,
|
|
285
285
|
},
|
|
286
286
|
]"
|
|
287
287
|
:style="{
|
|
@@ -291,15 +291,15 @@ const wrapperStyle = computed(() => {
|
|
|
291
291
|
@click="isColumnSortable(col) ? handleSort(col) : undefined"
|
|
292
292
|
>
|
|
293
293
|
<slot :name="`header-${col.key}`" :column="col">
|
|
294
|
-
<div class="
|
|
294
|
+
<div class="mint-dataframe__th-content">
|
|
295
295
|
<span>{{ col.label }}</span>
|
|
296
296
|
<svg
|
|
297
297
|
v-if="isColumnSortable(col)"
|
|
298
298
|
:class="[
|
|
299
|
-
'
|
|
299
|
+
'mint-dataframe__sort-icon',
|
|
300
300
|
{
|
|
301
|
-
'
|
|
302
|
-
'
|
|
301
|
+
'mint-dataframe__sort-icon--asc': activeSort?.key === col.key && activeSort?.direction === 'asc',
|
|
302
|
+
'mint-dataframe__sort-icon--desc': activeSort?.key === col.key && activeSort?.direction === 'desc',
|
|
303
303
|
},
|
|
304
304
|
]"
|
|
305
305
|
viewBox="0 0 24 24"
|
|
@@ -322,19 +322,19 @@ const wrapperStyle = computed(() => {
|
|
|
322
322
|
v-for="(row, rowIndex) in paginatedData"
|
|
323
323
|
:key="getRowKey(row, rowIndex)"
|
|
324
324
|
:class="[
|
|
325
|
-
'
|
|
325
|
+
'mint-dataframe__row',
|
|
326
326
|
{
|
|
327
|
-
'
|
|
328
|
-
'
|
|
327
|
+
'mint-dataframe__row--striped': striped && rowIndex % 2 === 1,
|
|
328
|
+
'mint-dataframe__row--selected': selectedKeys.includes(getRowKey(row, rowIndex)),
|
|
329
329
|
},
|
|
330
330
|
]"
|
|
331
331
|
@click="emit('row-click', row, rowIndex)"
|
|
332
332
|
>
|
|
333
|
-
<td v-if="selectable" class="
|
|
333
|
+
<td v-if="selectable" class="mint-dataframe__td mint-dataframe__td--checkbox">
|
|
334
334
|
<input
|
|
335
335
|
type="checkbox"
|
|
336
336
|
:checked="selectedKeys.includes(getRowKey(row, rowIndex))"
|
|
337
|
-
class="
|
|
337
|
+
class="mint-dataframe__checkbox"
|
|
338
338
|
@click.stop
|
|
339
339
|
@change="toggleRowSelect(getRowKey(row, rowIndex))"
|
|
340
340
|
/>
|
|
@@ -343,10 +343,10 @@ const wrapperStyle = computed(() => {
|
|
|
343
343
|
v-for="col in columns"
|
|
344
344
|
:key="col.key"
|
|
345
345
|
:class="[
|
|
346
|
-
'
|
|
347
|
-
`
|
|
348
|
-
`
|
|
349
|
-
{ '
|
|
346
|
+
'mint-dataframe__td',
|
|
347
|
+
`mint-dataframe__td--${size}`,
|
|
348
|
+
`mint-dataframe__td--align-${col.align ?? 'left'}`,
|
|
349
|
+
{ 'mint-dataframe__td--ellipsis': col.ellipsis },
|
|
350
350
|
]"
|
|
351
351
|
@click.stop="emit('cell-click', getCellValue(row, col.key), col, row)"
|
|
352
352
|
>
|
|
@@ -359,19 +359,19 @@ const wrapperStyle = computed(() => {
|
|
|
359
359
|
</table>
|
|
360
360
|
|
|
361
361
|
<!-- Empty state -->
|
|
362
|
-
<div v-if="paginatedData.length === 0 && !loading" class="
|
|
362
|
+
<div v-if="paginatedData.length === 0 && !loading" class="mint-dataframe__empty">
|
|
363
363
|
<slot name="empty">
|
|
364
|
-
<svg class="
|
|
364
|
+
<svg class="mint-dataframe__empty-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
365
365
|
<polyline points="22 12 16 12 14 15 10 15 8 12 2 12" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" />
|
|
366
366
|
</svg>
|
|
367
|
-
<p class="
|
|
367
|
+
<p class="mint-dataframe__empty-text">{{ emptyText }}</p>
|
|
368
368
|
</slot>
|
|
369
369
|
</div>
|
|
370
370
|
|
|
371
371
|
<!-- Loading overlay -->
|
|
372
|
-
<div v-if="loading" class="
|
|
372
|
+
<div v-if="loading" class="mint-dataframe__loading">
|
|
373
373
|
<slot name="loading">
|
|
374
|
-
<svg class="
|
|
374
|
+
<svg class="mint-dataframe__loading-spinner" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
375
375
|
<circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="3" opacity="0.25" />
|
|
376
376
|
<path d="M12 2a10 10 0 0 1 10 10" stroke="currentColor" stroke-width="3" stroke-linecap="round" />
|
|
377
377
|
</svg>
|
|
@@ -380,16 +380,16 @@ const wrapperStyle = computed(() => {
|
|
|
380
380
|
</div>
|
|
381
381
|
|
|
382
382
|
<!-- Footer / Pagination -->
|
|
383
|
-
<div v-if="pagination" class="
|
|
383
|
+
<div v-if="pagination" class="mint-dataframe__footer">
|
|
384
384
|
<slot name="footer">
|
|
385
|
-
<span class="
|
|
385
|
+
<span class="mint-dataframe__page-info">
|
|
386
386
|
{{ (pagination.page - 1) * pagination.pageSize + 1 }}–{{ Math.min(pagination.page * pagination.pageSize, sortedData.length) }}
|
|
387
387
|
of {{ sortedData.length }}
|
|
388
388
|
</span>
|
|
389
|
-
<div class="
|
|
389
|
+
<div class="mint-dataframe__page-controls">
|
|
390
390
|
<button
|
|
391
391
|
type="button"
|
|
392
|
-
class="
|
|
392
|
+
class="mint-dataframe__page-btn"
|
|
393
393
|
:disabled="pagination.page <= 1"
|
|
394
394
|
@click="handlePageChange(pagination.page - 1)"
|
|
395
395
|
>
|
|
@@ -397,10 +397,10 @@ const wrapperStyle = computed(() => {
|
|
|
397
397
|
<path d="m15 18-6-6 6-6" />
|
|
398
398
|
</svg>
|
|
399
399
|
</button>
|
|
400
|
-
<span class="
|
|
400
|
+
<span class="mint-dataframe__page-number">{{ pagination.page }} / {{ totalPages }}</span>
|
|
401
401
|
<button
|
|
402
402
|
type="button"
|
|
403
|
-
class="
|
|
403
|
+
class="mint-dataframe__page-btn"
|
|
404
404
|
:disabled="pagination.page >= totalPages"
|
|
405
405
|
@click="handlePageChange(pagination.page + 1)"
|
|
406
406
|
>
|
|
@@ -206,8 +206,8 @@ onUnmounted(() => {
|
|
|
206
206
|
</script>
|
|
207
207
|
|
|
208
208
|
<template>
|
|
209
|
-
<div ref="containerRef" class="
|
|
210
|
-
<div ref="inputRef" class="
|
|
209
|
+
<div ref="containerRef" class="mint-date-picker">
|
|
210
|
+
<div ref="inputRef" class="mint-date-picker__input-wrapper">
|
|
211
211
|
<input
|
|
212
212
|
type="text"
|
|
213
213
|
readonly
|
|
@@ -215,14 +215,14 @@ onUnmounted(() => {
|
|
|
215
215
|
:placeholder="placeholder || 'Select date'"
|
|
216
216
|
:disabled="disabled"
|
|
217
217
|
:class="[
|
|
218
|
-
'
|
|
219
|
-
`
|
|
220
|
-
error ? '
|
|
221
|
-
disabled ? '
|
|
218
|
+
'mint-date-picker__input',
|
|
219
|
+
`mint-date-picker__input--${size}`,
|
|
220
|
+
error ? 'mint-date-picker__input--error' : '',
|
|
221
|
+
disabled ? 'mint-date-picker__input--disabled' : '',
|
|
222
222
|
]"
|
|
223
223
|
@click="toggleCalendar"
|
|
224
224
|
/>
|
|
225
|
-
<div class="
|
|
225
|
+
<div class="mint-date-picker__icon">
|
|
226
226
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
227
227
|
<path d="M8 2v4" /><path d="M16 2v4" /><rect width="18" height="18" x="3" y="4" rx="2" /><path d="M3 10h18" />
|
|
228
228
|
</svg>
|
|
@@ -231,38 +231,38 @@ onUnmounted(() => {
|
|
|
231
231
|
|
|
232
232
|
<Teleport to="body">
|
|
233
233
|
<Transition
|
|
234
|
-
enter-active-class="
|
|
235
|
-
enter-from-class="
|
|
236
|
-
enter-to-class="
|
|
237
|
-
leave-active-class="
|
|
238
|
-
leave-from-class="
|
|
239
|
-
leave-to-class="
|
|
234
|
+
enter-active-class="mint-date-picker__dropdown-enter-active"
|
|
235
|
+
enter-from-class="mint-date-picker__dropdown-enter-from"
|
|
236
|
+
enter-to-class="mint-date-picker__dropdown-enter-to"
|
|
237
|
+
leave-active-class="mint-date-picker__dropdown-leave-active"
|
|
238
|
+
leave-from-class="mint-date-picker__dropdown-leave-from"
|
|
239
|
+
leave-to-class="mint-date-picker__dropdown-leave-to"
|
|
240
240
|
>
|
|
241
241
|
<div
|
|
242
242
|
v-if="isOpen"
|
|
243
243
|
ref="dropdownRef"
|
|
244
|
-
class="
|
|
244
|
+
class="mint-date-picker__dropdown"
|
|
245
245
|
:style="dropdownStyle"
|
|
246
246
|
role="dialog"
|
|
247
247
|
aria-modal="true"
|
|
248
248
|
aria-label="Date picker"
|
|
249
249
|
>
|
|
250
|
-
<div class="
|
|
250
|
+
<div class="mint-date-picker__header">
|
|
251
251
|
<button
|
|
252
252
|
type="button"
|
|
253
253
|
aria-label="Previous month"
|
|
254
|
-
class="
|
|
254
|
+
class="mint-date-picker__nav-btn"
|
|
255
255
|
@click="prevMonth"
|
|
256
256
|
>
|
|
257
257
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
258
258
|
<path d="m15 18-6-6 6-6" />
|
|
259
259
|
</svg>
|
|
260
260
|
</button>
|
|
261
|
-
<span class="
|
|
261
|
+
<span class="mint-date-picker__month-year">{{ monthYear }}</span>
|
|
262
262
|
<button
|
|
263
263
|
type="button"
|
|
264
264
|
aria-label="Next month"
|
|
265
|
-
class="
|
|
265
|
+
class="mint-date-picker__nav-btn"
|
|
266
266
|
@click="nextMonth"
|
|
267
267
|
>
|
|
268
268
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -271,17 +271,17 @@ onUnmounted(() => {
|
|
|
271
271
|
</button>
|
|
272
272
|
</div>
|
|
273
273
|
|
|
274
|
-
<div class="
|
|
274
|
+
<div class="mint-date-picker__weekdays">
|
|
275
275
|
<div
|
|
276
276
|
v-for="day in weekDays"
|
|
277
277
|
:key="day"
|
|
278
|
-
class="
|
|
278
|
+
class="mint-date-picker__weekday"
|
|
279
279
|
>
|
|
280
280
|
{{ day }}
|
|
281
281
|
</div>
|
|
282
282
|
</div>
|
|
283
283
|
|
|
284
|
-
<div class="
|
|
284
|
+
<div class="mint-date-picker__grid">
|
|
285
285
|
<button
|
|
286
286
|
v-for="(day, index) in calendarDays"
|
|
287
287
|
:key="index"
|
|
@@ -290,11 +290,11 @@ onUnmounted(() => {
|
|
|
290
290
|
:aria-label="day.date.toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })"
|
|
291
291
|
:aria-selected="isSameDay(day.date, selectedDate)"
|
|
292
292
|
:class="[
|
|
293
|
-
'
|
|
294
|
-
!day.isCurrentMonth ? '
|
|
295
|
-
day.isDisabled ? '
|
|
296
|
-
isSameDay(day.date, selectedDate) ? '
|
|
297
|
-
isToday(day.date) && !isSameDay(day.date, selectedDate) ? '
|
|
293
|
+
'mint-date-picker__day',
|
|
294
|
+
!day.isCurrentMonth ? 'mint-date-picker__day--other-month' : '',
|
|
295
|
+
day.isDisabled ? 'mint-date-picker__day--disabled' : '',
|
|
296
|
+
isSameDay(day.date, selectedDate) ? 'mint-date-picker__day--selected' : '',
|
|
297
|
+
isToday(day.date) && !isSameDay(day.date, selectedDate) ? 'mint-date-picker__day--today' : '',
|
|
298
298
|
]"
|
|
299
299
|
@click="selectDate(day)"
|
|
300
300
|
>
|
|
@@ -302,10 +302,10 @@ onUnmounted(() => {
|
|
|
302
302
|
</button>
|
|
303
303
|
</div>
|
|
304
304
|
|
|
305
|
-
<div class="
|
|
305
|
+
<div class="mint-date-picker__footer">
|
|
306
306
|
<button
|
|
307
307
|
type="button"
|
|
308
|
-
class="
|
|
308
|
+
class="mint-date-picker__footer-btn mint-date-picker__today-btn"
|
|
309
309
|
@click="goToToday"
|
|
310
310
|
>
|
|
311
311
|
Today
|
|
@@ -313,7 +313,7 @@ onUnmounted(() => {
|
|
|
313
313
|
<button
|
|
314
314
|
v-if="clearable && modelValue"
|
|
315
315
|
type="button"
|
|
316
|
-
class="
|
|
316
|
+
class="mint-date-picker__footer-btn mint-date-picker__clear-btn"
|
|
317
317
|
@click="clear"
|
|
318
318
|
>
|
|
319
319
|
Clear
|