vueless 1.0.2-beta.21 → 1.0.2-beta.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "1.0.2-beta.21",
3
+ "version": "1.0.2-beta.22",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -168,6 +168,8 @@ function getDayState(day: Date) {
168
168
  hoveredDay.value &&
169
169
  !props.selectedDateTo &&
170
170
  !dateIsOutOfRange(day, props.selectedDate, hoveredDay.value, props.locale, props.dateFormat);
171
+ const isLastRangePreview =
172
+ hoveredDay.value && isInRangePreview && isSameDay(day, hoveredDay.value);
171
173
 
172
174
  const isInRangePreviewAnotherMonth = isInRangePreview && isAnotherMonthDay;
173
175
 
@@ -185,6 +187,7 @@ function getDayState(day: Date) {
185
187
  isRangeSameDay,
186
188
  isInRangePreview,
187
189
  isInRangePreviewAnotherMonth,
190
+ isLastRangePreview,
188
191
  };
189
192
  }
190
193
 
@@ -341,6 +344,21 @@ defineExpose({
341
344
  @mouseover="onMouseoverDay(day)"
342
345
  />
343
346
 
347
+ <UButton
348
+ v-else-if="getDayState(day).isLastRangePreview"
349
+ tabindex="-1"
350
+ variant="ghost"
351
+ color="primary"
352
+ size="md"
353
+ square
354
+ v-bind="lastDayInRangeAttrs"
355
+ :disabled="dateIsOutOfRange(day, minDate, maxDate, locale, dateFormat)"
356
+ :label="formatDate(day, 'j', locale)"
357
+ @mousedown.prevent.capture
358
+ @click="onClickDay(day)"
359
+ @mouseover="onMouseoverDay(day)"
360
+ />
361
+
344
362
  <UButton
345
363
  v-else-if="
346
364
  getDayState(day).isAnotherMonthDayInRange ||
@@ -305,7 +305,7 @@ function activate() {
305
305
  adjustPositionY();
306
306
  adjustPositionX();
307
307
 
308
- menuRef.value?.focus();
308
+ menuRef.value?.focus({ preventScroll: true });
309
309
  });
310
310
  }
311
311