vueless 0.0.735 → 0.0.737

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": "0.0.735",
3
+ "version": "0.0.737",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -357,7 +357,7 @@ function isShownDateDivider(rowIndex: number) {
357
357
  const isPrevSameDate = prevItem?.rowDate === currentItem?.rowDate;
358
358
  const isNextSameDate = nextItem?.rowDate === currentItem?.rowDate;
359
359
 
360
- return isPrevSameDate && !isNextSameDate && props.dateDivider;
360
+ return !isPrevSameDate && isNextSameDate && props.dateDivider;
361
361
  }
362
362
 
363
363
  function onClickRow(row: Row) {
@@ -81,7 +81,7 @@ export default /*tw*/ {
81
81
  },
82
82
  bodySelectedDateDivider: {
83
83
  base: "{>bodyDateDivider}",
84
- label: "bg-gray-200 transition",
84
+ label: "bg-gray-100 transition",
85
85
  },
86
86
  bodyEmptyState: "{UEmpty} my-8",
87
87
  footer: {
@@ -148,6 +148,7 @@ function getDayState(day: Date) {
148
148
  const isSelectedDay = isSameDay(day, localSelectedDate.value) && props.selectedDate !== null;
149
149
  const isCurrentDay = isToday(day);
150
150
  const isAnotherMonthDay = isAnotherMothDay(day, activeMonthDate.value);
151
+ const isAnotherMonthDayInRange = isAnotherMonthDay && isDayInRange;
151
152
  const isCurrentDayInRange = isCurrentDay && isDayInRange;
152
153
  const isFirstDayInRange = props.range && isSameDay(day, localSelectedDate.value);
153
154
  const isLastDayInRange =
@@ -171,6 +172,7 @@ function getDayState(day: Date) {
171
172
  isAnotherMonthFirstDayInRange,
172
173
  isAnotherMonthLastDayInRange,
173
174
  isActiveDay,
175
+ isAnotherMonthDayInRange,
174
176
  };
175
177
  }
176
178
 
@@ -213,6 +215,7 @@ const {
213
215
  activeDayAttrs,
214
216
  currentLastDayInRangeAttrs,
215
217
  currentFirstDayInRangeAttrs,
218
+ anotherMonthDayInRangeAttrs,
216
219
  } = useUI<Config>(defaultConfig);
217
220
  </script>
218
221
 
@@ -355,6 +358,20 @@ const {
355
358
  @click="onClickDay(day)"
356
359
  />
357
360
 
361
+ <UButton
362
+ v-else-if="getDayState(day).isAnotherMonthDayInRange"
363
+ tabindex="-1"
364
+ variant="thirdary"
365
+ color="blue"
366
+ size="md"
367
+ square
368
+ v-bind="anotherMonthDayInRangeAttrs"
369
+ :disabled="dateIsOutOfRange(day, minDate, maxDate, locale, dateFormat)"
370
+ :label="formatDate(day, 'j', locale)"
371
+ @mousedown.prevent.capture
372
+ @click="onClickDay(day)"
373
+ />
374
+
358
375
  <UButton
359
376
  v-else-if="getDayState(day).isDayInRange"
360
377
  tabindex="-1"
@@ -14,7 +14,7 @@ export default /*tw*/ {
14
14
  },
15
15
  },
16
16
  },
17
- dateInRange: "bg-brand-600/10 !text-brand-900 hover:bg-brand/15 rounded-none",
17
+ dateInRange: "bg-brand-600/10 text-brand-900 hover:bg-brand/15 rounded-none",
18
18
  edgeDateInRange: "",
19
19
  firstDateInRange: "rounded-r-none",
20
20
  lastDateInRange: "rounded-l-none",
@@ -27,6 +27,7 @@ export default /*tw*/ {
27
27
  dayInRange: "{>day} {>dateInRange}",
28
28
  currentDayInRange: "{>day} {>dateInRange} {>currentDate}",
29
29
  anotherMonthDay: "{>day} {>anotherMonthDate} font-normal",
30
+ anotherMonthDayInRange: "{>day} {>dateInRange} {>anotherMonthDate} font-normal",
30
31
  firstDayInRange: "{>day} {>edgeDateInRange} {>firstDateInRange}",
31
32
  anotherMonthFirstDayInRange: "{>day} {>anotherMonthDay} {>edgeDateInRange} {>firstDateInRange}",
32
33
  lastDayInRange: "{>day} {>edgeDateInRange} {>lastDateInRange}",