@varlet/ui 3.20.1 → 3.20.2

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.
@@ -3,5 +3,5 @@ import '../../icon/icon.css'
3
3
  import '../../ripple/ripple.css'
4
4
  import '../../popup/popup.css'
5
5
  import '../actionSheet.css'
6
- import '../ActionSheetSfc.css'
7
6
  import '../ActionItemSfc.css'
7
+ import '../ActionSheetSfc.css'
@@ -359,9 +359,7 @@ const __sfc__ = defineComponent({
359
359
  var _a, _b, _c, _d;
360
360
  const { multiple, range } = props2;
361
361
  if (range) {
362
- const formattedDays = selectionState.selectedRangeDays.map(
363
- (date) => dayjs(date).format(DatePickerFormats.DayPadded)
364
- );
362
+ const formattedDays = selectionState.selectedRangeDays.map((date) => dayjs(date).format(DatePickerFormats.Day));
365
363
  return formattedDays.length ? formattedDays.join(" ~ ") : "";
366
364
  }
367
365
  if (multiple) {
@@ -380,7 +378,7 @@ const __sfc__ = defineComponent({
380
378
  if ((pt || t)("lang") === "zh-CN") {
381
379
  return `${selectionState.selectedMonth}-${showDay} ${weekName.slice(0, 3)}`;
382
380
  }
383
- return `${weekName.slice(0, 3)}, ${monthName.slice(0, 3)} ${selectionState.selectedDay}`;
381
+ return `${weekName.slice(0, 3)}, ${monthName.slice(0, 3)} ${toNumber(selectionState.selectedDay)}`;
384
382
  });
385
383
  const dateSlotProps = computed(() => {
386
384
  var _a, _b;
@@ -396,7 +394,7 @@ const __sfc__ = defineComponent({
396
394
  };
397
395
  });
398
396
  const formattedRangeDays = computed(
399
- () => selectionState.selectedRangeDays.map((date) => dayjs(date).format(DatePickerFormats.DayPadded))
397
+ () => selectionState.selectedRangeDays.map((date) => dayjs(date).format(DatePickerFormats.Day))
400
398
  );
401
399
  const selectedYearInPreview = computed(() => selectionState.selectedYear === previewYear.value);
402
400
  const selectedMonthInPreview = computed(() => selectionState.selectedMonth === previewMonth.value);
@@ -526,7 +524,7 @@ const __sfc__ = defineComponent({
526
524
  }
527
525
  function updateMultiple(selectedValue, pickerType) {
528
526
  const selectedMultipleValues = getMultipleValuesByType(pickerType);
529
- const valueFormat = pickerType === DatePickerTypes.Year ? DatePickerFormats.Year : pickerType === DatePickerTypes.Month ? DatePickerFormats.Month : DatePickerFormats.DayPadded;
527
+ const valueFormat = pickerType === DatePickerTypes.Year ? DatePickerFormats.Year : pickerType === DatePickerTypes.Month ? DatePickerFormats.Month : DatePickerFormats.Day;
530
528
  const nextMultipleValues = selectedMultipleValues.map((date) => dayjs(date).format(valueFormat));
531
529
  const index = nextMultipleValues.findIndex((multipleValue) => multipleValue === selectedValue);
532
530
  const alreadySelected = index !== -1;
@@ -582,7 +580,7 @@ const __sfc__ = defineComponent({
582
580
  monthOffset,
583
581
  DatePickerUnits.Month
584
582
  );
585
- const dayValue = `${targetMonthDayjsObject.format(DatePickerFormats.Month)}-${day}`;
583
+ const dayValue = targetMonthDayjsObject.date(day).format(DatePickerFormats.Day);
586
584
  if (!isSelectableDate(dayValue, DatePickerUnits.Day)) {
587
585
  return;
588
586
  }
@@ -592,7 +590,7 @@ const __sfc__ = defineComponent({
592
590
  previewMonth.value = targetMonthDayjsObject.format(DatePickerFormats.Month).split("-")[1];
593
591
  emitPreview();
594
592
  }
595
- selectValue(dayjs(dayValue).format(DatePickerFormats.DayPadded), DatePickerTypes.Date);
593
+ selectValue(dayValue, DatePickerTypes.Date);
596
594
  }
597
595
  function selectMonthFromPanel(month) {
598
596
  const { type: pickerType, readonly } = props2;
@@ -14,8 +14,7 @@ const WeekHeader = ["0", "1", "2", "3", "4", "5", "6"];
14
14
  const DatePickerFormats = {
15
15
  Year: "YYYY",
16
16
  Month: "YYYY-MM",
17
- Day: "YYYY-MM-D",
18
- DayPadded: "YYYY-MM-DD"
17
+ Day: "YYYY-MM-DD"
19
18
  };
20
19
  const ShiftDirections = enumOf({
21
20
  Prev: "prev",
@@ -310,7 +310,7 @@ import './tree-menu/style/index.mjs'
310
310
  import './uploader/style/index.mjs'
311
311
  import './watermark/style/index.mjs'
312
312
 
313
- const version = '3.20.1'
313
+ const version = '3.20.2'
314
314
 
315
315
  function install(app) {
316
316
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -206,7 +206,7 @@ export * from './tree-menu/index.mjs'
206
206
  export * from './uploader/index.mjs'
207
207
  export * from './watermark/index.mjs'
208
208
 
209
- const version = '3.20.1'
209
+ const version = '3.20.2'
210
210
 
211
211
  function install(app) {
212
212
  ActionSheet.install && app.use(ActionSheet)
@@ -1,7 +1,7 @@
1
1
  import '../../styles/common.css'
2
+ import '../SnackbarSfc.css'
2
3
  import '../../styles/elevation.css'
3
4
  import '../../loading/loading.css'
4
5
  import '../../icon/icon.css'
5
6
  import '../snackbar.css'
6
7
  import '../coreSfc.css'
7
- import '../SnackbarSfc.css'