@tak-ps/vue-tabler 3.83.3 → 3.85.0

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/CHANGELOG.md CHANGED
@@ -10,6 +10,14 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v3.85.0
14
+
15
+ - :rocket: Show time in localtime by default in Epoch Component
16
+
17
+ ### v3.84.0
18
+
19
+ - :rocket: Add Modal Fade Animation
20
+
13
21
  ### v3.83.3
14
22
 
15
23
  - :rocket: Additional Exports Options in Package.json
@@ -45,16 +45,16 @@ const display = computed(() => {
45
45
  .replace('T', ' ')
46
46
  .replace(/:[0-9]+\.[0-9]+[A-Z]/, '')
47
47
  } else if (props.format === 'Human') {
48
- const day = String(date.getUTCDate())
48
+ const day = String(date.getDate())
49
49
  let suf = suffix[day.slice(day.length - 1)] || 'th'
50
50
  if (['11', '12', '13'].includes(day)) suf = 'th'
51
51
 
52
- let res = `${months[date.getUTCMonth()]} ${date.getUTCDate()}${suf}`
52
+ let res = `${months[date.getMonth()]} ${date.getDate()}${suf}`
53
53
  if (date.getFullYear() !== new Date().getFullYear()) {
54
54
  res = res + ` ${date.getFullYear()}`
55
55
  }
56
56
 
57
- res = res + `, ${String(date.getUTCHours()).padStart(2, '0')}:${String(date.getMinutes()).padEnd(2, '0')}`
57
+ res = res + `, ${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`
58
58
 
59
59
  return res
60
60
  } else {
@@ -57,26 +57,26 @@ const display = computed(() => {
57
57
  const start = new Date(props.start)
58
58
  const end = new Date(props.end)
59
59
 
60
- const start_day = String(start.getUTCDate());
60
+ const start_day = String(start.getDate());
61
61
  let start_day_suffix = suffix[start_day.slice(start_day.length - 1)] || 'th';
62
62
  if (['11', '12', '13'].includes(start_day)) start_day_suffix = 'th';
63
- const end_day = String(end.getUTCDate());
63
+ const end_day = String(end.getDate());
64
64
  let end_day_suffix = suffix[end_day.slice(end_day.length - 1)] || 'th';
65
65
  if (['11', '12', '13'].includes(end_day)) end_day_suffix = 'th';
66
66
 
67
- const start_month = `${months[start.getUTCMonth()]} ${start.getUTCDate()}${start_day_suffix}`;
68
- const end_month = `${months[end.getUTCMonth()]} ${end.getUTCDate()}${end_day_suffix}`;
69
- const start_time = `${String(start.getUTCHours()).padStart(2, '0')}:${String(start.getMinutes()).padEnd(2, '0')}`;
70
- const end_time = `${String(end.getUTCHours()).padStart(2, '0')}:${String(end.getMinutes()).padEnd(2, '0')}`;
67
+ const start_month = `${months[start.getMonth()]} ${start.getDate()}${start_day_suffix}`;
68
+ const end_month = `${months[end.getMonth()]} ${end.getDate()}${end_day_suffix}`;
69
+ const start_time = `${String(start.getHours()).padStart(2, '0')}:${String(start.getMinutes()).padStart(2, '0')}`;
70
+ const end_time = `${String(end.getHours()).padStart(2, '0')}:${String(end.getMinutes()).padStart(2, '0')}`;
71
71
 
72
72
  if (start.getFullYear() === end.getFullYear() && start.getFullYear() === new Date().getFullYear()) {
73
- if (start.getUTCMonth() === end.getUTCMonth() && start.getUTCDate() === end.getUTCDate()) {
73
+ if (start.getMonth() === end.getMonth() && start.getDate() === end.getDate()) {
74
74
  return `${start_month} ${start_time} - ${end_time}`;
75
75
  } else {
76
76
  return `${start_month} ${start_time} - ${end_month} ${end_time}`;
77
77
  }
78
78
  } else if (start.getFullYear() === end.getFullYear()) {
79
- if (start.getUTCMonth() === end.getUTCMonth() && start.getUTCDate() === end.getUTCDate()) {
79
+ if (start.getMonth() === end.getMonth() && start.getDate() === end.getDate()) {
80
80
  return `${start_month}, ${start.getFullYear()} ${start_time} - ${end_time}`;
81
81
  } else {
82
82
  return `${start_month}, ${start.getFullYear()} ${start_time} - ${end_month} ${end_time}`;
@@ -1,28 +1,30 @@
1
1
  <template>
2
2
  <teleport to='body'>
3
- <div
4
- ref='modal'
5
- class='modal modal-blur fade show'
6
- tabindex='-1'
7
- style='display: block;'
8
- aria-modal='true'
9
- role='dialog'
10
- >
3
+ <Transition name='modal-fade' appear>
11
4
  <div
12
- class='modal-dialog modal-dialog-centered'
13
- role='document'
14
- :class='{
15
- "modal-sm": size === "sm",
16
- "modal-md": size === "md",
17
- "modal-lg": size === "lg",
18
- "modal-xl": size === "xl",
19
- }'
5
+ ref='modal'
6
+ class='modal modal-blur fade show'
7
+ tabindex='-1'
8
+ style='display: block;'
9
+ aria-modal='true'
10
+ role='dialog'
20
11
  >
21
- <div class='modal-content'>
22
- <slot />
12
+ <div
13
+ class='modal-dialog modal-dialog-centered'
14
+ role='document'
15
+ :class='{
16
+ "modal-sm": size === "sm",
17
+ "modal-md": size === "md",
18
+ "modal-lg": size === "lg",
19
+ "modal-xl": size === "xl",
20
+ }'
21
+ >
22
+ <div class='modal-content'>
23
+ <slot />
24
+ </div>
23
25
  </div>
24
26
  </div>
25
- </div>
27
+ </Transition>
26
28
  </teleport>
27
29
  </template>
28
30
 
@@ -45,3 +47,15 @@ onMounted(() => {
45
47
  })
46
48
  })
47
49
  </script>
50
+
51
+ <style scoped>
52
+ .modal-fade-enter-active,
53
+ .modal-fade-leave-active {
54
+ transition: opacity 100ms ease;
55
+ }
56
+
57
+ .modal-fade-enter-from,
58
+ .modal-fade-leave-to {
59
+ opacity: 0;
60
+ }
61
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/vue-tabler",
3
3
  "type": "module",
4
- "version": "3.83.3",
4
+ "version": "3.85.0",
5
5
  "lib": "lib.js",
6
6
  "main": "lib.js",
7
7
  "module": "lib.js",