From 74a5c201c2e7785cf53c71767db51542b6313cba Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Fri, 22 Aug 2025 10:59:25 -0600 Subject: [PATCH] Refactor numeric input to its own component, UX improvements. --- src/components/EventDialog.vue | 65 +++++---------- src/components/Numeric.vue | 146 +++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+), 43 deletions(-) create mode 100644 src/components/Numeric.vue diff --git a/src/components/EventDialog.vue b/src/components/EventDialog.vue index b47e228..a2f7e31 100644 --- a/src/components/EventDialog.vue +++ b/src/components/EventDialog.vue @@ -2,6 +2,7 @@ import { useCalendarStore } from '@/stores/CalendarStore' import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue' import WeekdaySelector from './WeekdaySelector.vue' +import Numeric from './Numeric.vue' const props = defineProps({ selection: { type: Object, default: () => ({ start: null, end: null }) }, @@ -493,54 +494,29 @@ const recurrenceSummary = computed(() => {
Every -
- - {{ - recurrenceInterval - }} - -
+ -
- - {{ - recurrenceOccurrences === 0 ? '∞' : recurrenceOccurrences - }} - -
+
@@ -906,6 +882,9 @@ const recurrenceSummary = computed(() => { .mini-stepper.occ .value { min-width: 2rem; } +.occ-stepper.mini-stepper.occ .value { + min-width: 2rem; +} .mini-stepper .step:focus-visible { outline: 2px solid var(--input-focus); outline-offset: -2px; diff --git a/src/components/Numeric.vue b/src/components/Numeric.vue new file mode 100644 index 0000000..43dea88 --- /dev/null +++ b/src/components/Numeric.vue @@ -0,0 +1,146 @@ + + + + +