vuetify 3.4.7 → 3.4.9

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.
Files changed (210) hide show
  1. package/dist/_component-variables-labs.sass +1 -0
  2. package/dist/json/attributes.json +300 -40
  3. package/dist/json/importMap-labs.json +24 -0
  4. package/dist/json/importMap.json +134 -134
  5. package/dist/json/tags.json +95 -0
  6. package/dist/json/web-types.json +910 -59
  7. package/dist/vuetify-labs.css +2402 -2052
  8. package/dist/vuetify-labs.d.ts +1660 -31
  9. package/dist/vuetify-labs.esm.js +733 -106
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +733 -106
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +810 -807
  14. package/dist/vuetify.d.ts +119 -74
  15. package/dist/vuetify.esm.js +242 -106
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +242 -106
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +235 -215
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/blueprints/index.d.mts +9 -0
  23. package/lib/blueprints/md1.d.mts +9 -0
  24. package/lib/blueprints/md2.d.mts +9 -0
  25. package/lib/blueprints/md3.d.mts +9 -0
  26. package/lib/components/VDataTable/VDataTableFooter.mjs +1 -1
  27. package/lib/components/VDataTable/VDataTableFooter.mjs.map +1 -1
  28. package/lib/components/VDatePicker/VDatePicker.mjs +4 -1
  29. package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  30. package/lib/components/VDatePicker/VDatePickerMonth.mjs +12 -99
  31. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  32. package/lib/components/VDatePicker/index.d.mts +42 -30
  33. package/lib/components/VOtpInput/VOtpInput.css +3 -0
  34. package/lib/components/VOtpInput/VOtpInput.mjs +1 -0
  35. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  36. package/lib/components/VOtpInput/VOtpInput.sass +3 -0
  37. package/lib/components/VOverlay/VOverlay.mjs +11 -6
  38. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  39. package/lib/components/index.d.mts +42 -30
  40. package/lib/composables/calendar.mjs +128 -0
  41. package/lib/composables/calendar.mjs.map +1 -0
  42. package/lib/composables/date/DateAdapter.mjs.map +1 -1
  43. package/lib/composables/date/adapters/vuetify.mjs +89 -2
  44. package/lib/composables/date/adapters/vuetify.mjs.map +1 -1
  45. package/lib/composables/date/date.mjs +4 -0
  46. package/lib/composables/date/date.mjs.map +1 -1
  47. package/lib/entry-bundler.mjs +1 -1
  48. package/lib/framework.mjs +1 -1
  49. package/lib/index.d.mts +77 -44
  50. package/lib/labs/VCalendar/VCalendar.css +220 -0
  51. package/lib/labs/VCalendar/VCalendar.mjs +128 -0
  52. package/lib/labs/VCalendar/VCalendar.mjs.map +1 -0
  53. package/lib/labs/VCalendar/VCalendar.sass +168 -0
  54. package/lib/labs/VCalendar/VCalendarDay.css +10 -0
  55. package/lib/labs/VCalendar/VCalendarDay.mjs +47 -0
  56. package/lib/labs/VCalendar/VCalendarDay.mjs.map +1 -0
  57. package/lib/labs/VCalendar/VCalendarDay.sass +9 -0
  58. package/lib/labs/VCalendar/VCalendarEvent.mjs +30 -0
  59. package/lib/labs/VCalendar/VCalendarEvent.mjs.map +1 -0
  60. package/lib/labs/VCalendar/VCalendarHeader.css +14 -0
  61. package/lib/labs/VCalendar/VCalendarHeader.mjs +76 -0
  62. package/lib/labs/VCalendar/VCalendarHeader.mjs.map +1 -0
  63. package/lib/labs/VCalendar/VCalendarHeader.sass +13 -0
  64. package/lib/labs/VCalendar/VCalendarInterval.css +42 -0
  65. package/lib/labs/VCalendar/VCalendarInterval.mjs +113 -0
  66. package/lib/labs/VCalendar/VCalendarInterval.mjs.map +1 -0
  67. package/lib/labs/VCalendar/VCalendarInterval.sass +39 -0
  68. package/lib/labs/VCalendar/VCalendarIntervalEvent.mjs +76 -0
  69. package/lib/labs/VCalendar/VCalendarIntervalEvent.mjs.map +1 -0
  70. package/lib/labs/VCalendar/VCalendarMonthDay.css +61 -0
  71. package/lib/labs/VCalendar/VCalendarMonthDay.mjs +64 -0
  72. package/lib/labs/VCalendar/VCalendarMonthDay.mjs.map +1 -0
  73. package/lib/labs/VCalendar/VCalendarMonthDay.sass +65 -0
  74. package/lib/{components → labs}/VCalendar/_variables.scss +14 -6
  75. package/lib/labs/VCalendar/index.d.mts +1592 -0
  76. package/lib/labs/VCalendar/index.mjs +7 -0
  77. package/lib/labs/VCalendar/index.mjs.map +1 -0
  78. package/lib/labs/components.d.mts +1586 -2
  79. package/lib/labs/components.mjs +1 -0
  80. package/lib/labs/components.mjs.map +1 -1
  81. package/lib/locale/af.mjs +2 -1
  82. package/lib/locale/af.mjs.map +1 -1
  83. package/lib/locale/ar.mjs +2 -1
  84. package/lib/locale/ar.mjs.map +1 -1
  85. package/lib/locale/az.mjs +2 -1
  86. package/lib/locale/az.mjs.map +1 -1
  87. package/lib/locale/bg.mjs +2 -1
  88. package/lib/locale/bg.mjs.map +1 -1
  89. package/lib/locale/ca.mjs +2 -1
  90. package/lib/locale/ca.mjs.map +1 -1
  91. package/lib/locale/ckb.mjs +2 -1
  92. package/lib/locale/ckb.mjs.map +1 -1
  93. package/lib/locale/cs.mjs +21 -20
  94. package/lib/locale/cs.mjs.map +1 -1
  95. package/lib/locale/da.mjs +2 -1
  96. package/lib/locale/da.mjs.map +1 -1
  97. package/lib/locale/de.mjs +2 -1
  98. package/lib/locale/de.mjs.map +1 -1
  99. package/lib/locale/el.mjs +2 -1
  100. package/lib/locale/el.mjs.map +1 -1
  101. package/lib/locale/en.mjs +2 -1
  102. package/lib/locale/en.mjs.map +1 -1
  103. package/lib/locale/es.mjs +2 -1
  104. package/lib/locale/es.mjs.map +1 -1
  105. package/lib/locale/et.mjs +2 -1
  106. package/lib/locale/et.mjs.map +1 -1
  107. package/lib/locale/fa.mjs +2 -1
  108. package/lib/locale/fa.mjs.map +1 -1
  109. package/lib/locale/fi.mjs +2 -1
  110. package/lib/locale/fi.mjs.map +1 -1
  111. package/lib/locale/fr.mjs +2 -1
  112. package/lib/locale/fr.mjs.map +1 -1
  113. package/lib/locale/he.mjs +2 -1
  114. package/lib/locale/he.mjs.map +1 -1
  115. package/lib/locale/hr.mjs +2 -1
  116. package/lib/locale/hr.mjs.map +1 -1
  117. package/lib/locale/hu.mjs +2 -1
  118. package/lib/locale/hu.mjs.map +1 -1
  119. package/lib/locale/id.mjs +2 -1
  120. package/lib/locale/id.mjs.map +1 -1
  121. package/lib/locale/index.d.mts +42 -0
  122. package/lib/locale/it.mjs +2 -1
  123. package/lib/locale/it.mjs.map +1 -1
  124. package/lib/locale/ja.mjs +2 -1
  125. package/lib/locale/ja.mjs.map +1 -1
  126. package/lib/locale/ko.mjs +2 -1
  127. package/lib/locale/ko.mjs.map +1 -1
  128. package/lib/locale/lt.mjs +2 -1
  129. package/lib/locale/lt.mjs.map +1 -1
  130. package/lib/locale/lv.mjs +2 -1
  131. package/lib/locale/lv.mjs.map +1 -1
  132. package/lib/locale/nl.mjs +2 -1
  133. package/lib/locale/nl.mjs.map +1 -1
  134. package/lib/locale/no.mjs +2 -1
  135. package/lib/locale/no.mjs.map +1 -1
  136. package/lib/locale/pl.mjs +2 -1
  137. package/lib/locale/pl.mjs.map +1 -1
  138. package/lib/locale/pt.mjs +2 -1
  139. package/lib/locale/pt.mjs.map +1 -1
  140. package/lib/locale/ro.mjs +2 -1
  141. package/lib/locale/ro.mjs.map +1 -1
  142. package/lib/locale/ru.mjs +2 -1
  143. package/lib/locale/ru.mjs.map +1 -1
  144. package/lib/locale/sk.mjs +2 -1
  145. package/lib/locale/sk.mjs.map +1 -1
  146. package/lib/locale/sl.mjs +2 -1
  147. package/lib/locale/sl.mjs.map +1 -1
  148. package/lib/locale/sr-Cyrl.mjs +2 -1
  149. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  150. package/lib/locale/sr-Latn.mjs +2 -1
  151. package/lib/locale/sr-Latn.mjs.map +1 -1
  152. package/lib/locale/sv.mjs +2 -1
  153. package/lib/locale/sv.mjs.map +1 -1
  154. package/lib/locale/th.mjs +2 -1
  155. package/lib/locale/th.mjs.map +1 -1
  156. package/lib/locale/tr.mjs +2 -1
  157. package/lib/locale/tr.mjs.map +1 -1
  158. package/lib/locale/uk.mjs +2 -1
  159. package/lib/locale/uk.mjs.map +1 -1
  160. package/lib/locale/vi.mjs +2 -1
  161. package/lib/locale/vi.mjs.map +1 -1
  162. package/lib/locale/zh-Hans.mjs +2 -1
  163. package/lib/locale/zh-Hans.mjs.map +1 -1
  164. package/lib/locale/zh-Hant.mjs +2 -1
  165. package/lib/locale/zh-Hant.mjs.map +1 -1
  166. package/lib/util/helpers.mjs +6 -0
  167. package/lib/util/helpers.mjs.map +1 -1
  168. package/package.json +2 -2
  169. package/lib/components/VCalendar/VCalendar.mjs +0 -352
  170. package/lib/components/VCalendar/VCalendar.mjs.map +0 -1
  171. package/lib/components/VCalendar/VCalendarCategory.mjs +0 -124
  172. package/lib/components/VCalendar/VCalendarCategory.mjs.map +0 -1
  173. package/lib/components/VCalendar/VCalendarCategory.sass +0 -100
  174. package/lib/components/VCalendar/VCalendarDaily.mjs +0 -239
  175. package/lib/components/VCalendar/VCalendarDaily.mjs.map +0 -1
  176. package/lib/components/VCalendar/VCalendarDaily.sass +0 -140
  177. package/lib/components/VCalendar/VCalendarMonthly.mjs +0 -25
  178. package/lib/components/VCalendar/VCalendarMonthly.mjs.map +0 -1
  179. package/lib/components/VCalendar/VCalendarWeekly.mjs +0 -193
  180. package/lib/components/VCalendar/VCalendarWeekly.mjs.map +0 -1
  181. package/lib/components/VCalendar/VCalendarWeekly.sass +0 -118
  182. package/lib/components/VCalendar/index.mjs +0 -16
  183. package/lib/components/VCalendar/index.mjs.map +0 -1
  184. package/lib/components/VCalendar/mixins/calendar-base.mjs +0 -89
  185. package/lib/components/VCalendar/mixins/calendar-base.mjs.map +0 -1
  186. package/lib/components/VCalendar/mixins/calendar-with-events.mjs +0 -416
  187. package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +0 -1
  188. package/lib/components/VCalendar/mixins/calendar-with-events.sass +0 -67
  189. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs +0 -135
  190. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs.map +0 -1
  191. package/lib/components/VCalendar/mixins/mouse.mjs +0 -85
  192. package/lib/components/VCalendar/mixins/mouse.mjs.map +0 -1
  193. package/lib/components/VCalendar/mixins/times.mjs +0 -65
  194. package/lib/components/VCalendar/mixins/times.mjs.map +0 -1
  195. package/lib/components/VCalendar/modes/column.mjs +0 -18
  196. package/lib/components/VCalendar/modes/column.mjs.map +0 -1
  197. package/lib/components/VCalendar/modes/common.mjs +0 -112
  198. package/lib/components/VCalendar/modes/common.mjs.map +0 -1
  199. package/lib/components/VCalendar/modes/index.mjs +0 -9
  200. package/lib/components/VCalendar/modes/index.mjs.map +0 -1
  201. package/lib/components/VCalendar/modes/stack.mjs +0 -204
  202. package/lib/components/VCalendar/modes/stack.mjs.map +0 -1
  203. package/lib/components/VCalendar/util/events.mjs +0 -44
  204. package/lib/components/VCalendar/util/events.mjs.map +0 -1
  205. package/lib/components/VCalendar/util/parser.mjs +0 -21
  206. package/lib/components/VCalendar/util/parser.mjs.map +0 -1
  207. package/lib/components/VCalendar/util/props.mjs +0 -248
  208. package/lib/components/VCalendar/util/props.mjs.map +0 -1
  209. package/lib/components/VCalendar/util/timestamp.mjs +0 -407
  210. package/lib/components/VCalendar/util/timestamp.mjs.map +0 -1
@@ -0,0 +1,220 @@
1
+ .v-calendar-weekly {
2
+ width: 100%;
3
+ height: 100%;
4
+ display: flex;
5
+ flex-direction: column;
6
+ min-height: 0;
7
+ background-color: #fff;
8
+ }
9
+
10
+ .v-calendar__container {
11
+ border-top: thin solid #e0e0e0;
12
+ border-left: thin solid #e0e0e0;
13
+ border-right: thin solid #e0e0e0;
14
+ }
15
+
16
+ .v-calendar-weekly__head {
17
+ display: grid;
18
+ grid-template-columns: 24px repeat(7, 1fr);
19
+ user-select: none;
20
+ }
21
+ .v-calendar-weekly__head.days__0 {
22
+ grid-template-columns: 1fr;
23
+ }
24
+ .v-calendar-weekly__head.days__0.v-calendar-weekly__head-weeknumbers {
25
+ grid-template-columns: 24px 1fr;
26
+ }
27
+ .v-calendar-weekly__head.days__1 {
28
+ grid-template-columns: 1fr;
29
+ }
30
+ .v-calendar-weekly__head.days__1.v-calendar-weekly__head-weeknumbers {
31
+ grid-template-columns: 24px 1fr;
32
+ }
33
+ .v-calendar-weekly__head.days__2 {
34
+ grid-template-columns: repeat(2, 1fr);
35
+ }
36
+ .v-calendar-weekly__head.days__2.v-calendar-weekly__head-weeknumbers {
37
+ grid-template-columns: 24px repeat(2, 1fr);
38
+ }
39
+ .v-calendar-weekly__head.days__3 {
40
+ grid-template-columns: repeat(3, 1fr);
41
+ }
42
+ .v-calendar-weekly__head.days__3.v-calendar-weekly__head-weeknumbers {
43
+ grid-template-columns: 24px repeat(3, 1fr);
44
+ }
45
+ .v-calendar-weekly__head.days__4 {
46
+ grid-template-columns: repeat(4, 1fr);
47
+ }
48
+ .v-calendar-weekly__head.days__4.v-calendar-weekly__head-weeknumbers {
49
+ grid-template-columns: 24px repeat(4, 1fr);
50
+ }
51
+ .v-calendar-weekly__head.days__5 {
52
+ grid-template-columns: repeat(5, 1fr);
53
+ }
54
+ .v-calendar-weekly__head.days__5.v-calendar-weekly__head-weeknumbers {
55
+ grid-template-columns: 24px repeat(5, 1fr);
56
+ }
57
+ .v-calendar-weekly__head.days__6 {
58
+ grid-template-columns: repeat(6, 1fr);
59
+ }
60
+ .v-calendar-weekly__head.days__6.v-calendar-weekly__head-weeknumbers {
61
+ grid-template-columns: 24px repeat(6, 1fr);
62
+ }
63
+ .v-calendar-weekly__head.days__7 {
64
+ grid-template-columns: repeat(7, 1fr);
65
+ }
66
+ .v-calendar-weekly__head.days__7.v-calendar-weekly__head-weeknumbers {
67
+ grid-template-columns: 24px repeat(7, 1fr);
68
+ }
69
+
70
+ .v-calendar-weekly__head-weekday, .v-calendar-weekly__head-weekday-with-weeknumber {
71
+ flex: 1 0 20px;
72
+ user-select: none;
73
+ padding: 8px 4px 0px 4px;
74
+ font-size: 11px;
75
+ overflow: hidden;
76
+ text-align: center;
77
+ text-overflow: ellipsis;
78
+ text-transform: uppercase;
79
+ white-space: nowrap;
80
+ border-right: thin solid #e0e0e0;
81
+ }
82
+ .v-calendar-weekly__head-weekday:last-child, .v-calendar-weekly__head-weekday-with-weeknumber:last-child {
83
+ border-right: none;
84
+ }
85
+ .v-calendar-weekly__head-weekday > div .v-btn, .v-calendar-weekly__head-weekday-with-weeknumber > div .v-btn {
86
+ font-size: 1.5rem;
87
+ }
88
+
89
+ .v-calendar-weekly__head-weeknumber {
90
+ background: rgb(var(--v-theme-on-surface-variant));
91
+ }
92
+
93
+ .v-calendar-weekly__week {
94
+ display: flex;
95
+ flex: 1;
96
+ height: unset;
97
+ min-height: 0;
98
+ }
99
+
100
+ .v-calendar-month__weeknumber {
101
+ padding-top: 6px;
102
+ background: rgb(var(--v-theme-on-surface-variant));
103
+ border-bottom: thin solid #e0e0e0;
104
+ text-align: center;
105
+ font-size: 12px;
106
+ font-weight: 500;
107
+ }
108
+
109
+ .v-calendar-month__days {
110
+ display: grid;
111
+ flex: 1 1;
112
+ }
113
+ .v-calendar-month__days > .v-calendar-month__day {
114
+ min-height: 150px;
115
+ }
116
+ .v-calendar-month__days.days__0 {
117
+ grid-template-columns: 1fr;
118
+ }
119
+ .v-calendar-month__days.days__0 > .v-calendar-month__day {
120
+ border-right: none;
121
+ }
122
+ .v-calendar-month__days.days__1 {
123
+ grid-template-columns: 1fr;
124
+ }
125
+ .v-calendar-month__days.days__1 > .v-calendar-month__day {
126
+ border-right: none;
127
+ }
128
+ .v-calendar-month__days.days__2 {
129
+ grid-template-columns: repeat(2, 1fr);
130
+ }
131
+ .v-calendar-month__days.days__2 > .v-calendar-month__day:nth-child(2n) {
132
+ border-right: none;
133
+ }
134
+ .v-calendar-month__days.days__3 {
135
+ grid-template-columns: repeat(3, 1fr);
136
+ }
137
+ .v-calendar-month__days.days__3 > .v-calendar-month__day:nth-child(3n) {
138
+ border-right: none;
139
+ }
140
+ .v-calendar-month__days.days__4 {
141
+ grid-template-columns: repeat(4, 1fr);
142
+ }
143
+ .v-calendar-month__days.days__4 > .v-calendar-month__day:nth-child(4n) {
144
+ border-right: none;
145
+ }
146
+ .v-calendar-month__days.days__5 {
147
+ grid-template-columns: repeat(5, 1fr);
148
+ }
149
+ .v-calendar-month__days.days__5 > .v-calendar-month__day:nth-child(5n) {
150
+ border-right: none;
151
+ }
152
+ .v-calendar-month__days.days__6 {
153
+ grid-template-columns: repeat(6, 1fr);
154
+ }
155
+ .v-calendar-month__days.days__6 > .v-calendar-month__day:nth-child(6n) {
156
+ border-right: none;
157
+ }
158
+ .v-calendar-month__days.days__6.v-calendar-month__weeknumbers {
159
+ grid-template-columns: 24px repeat(6, 1fr);
160
+ }
161
+ .v-calendar-month__days.days__7 {
162
+ grid-template-columns: repeat(7, 1fr);
163
+ }
164
+ .v-calendar-month__days.days__7 > .v-calendar-month__day:nth-child(7n) {
165
+ border-right: none;
166
+ }
167
+ .v-calendar-month__days.days-with-weeknumbers__0 {
168
+ grid-template-columns: 24px 1fr;
169
+ }
170
+ .v-calendar-month__days.days-with-weeknumbers__0 > .v-calendar-month__day {
171
+ border-right: none;
172
+ }
173
+ .v-calendar-month__days.days-with-weeknumbers__1 {
174
+ grid-template-columns: 24px 1fr;
175
+ }
176
+ .v-calendar-month__days.days-with-weeknumbers__1 > .v-calendar-month__day {
177
+ border-right: none;
178
+ }
179
+ .v-calendar-month__days.days-with-weeknumbers__2 {
180
+ grid-template-columns: 24px repeat(2, 1fr);
181
+ }
182
+ .v-calendar-month__days.days-with-weeknumbers__2 > .v-calendar-month__day:nth-child(3n) {
183
+ border-right: none;
184
+ }
185
+ .v-calendar-month__days.days-with-weeknumbers__3 {
186
+ grid-template-columns: 24px repeat(3, 1fr);
187
+ }
188
+ .v-calendar-month__days.days-with-weeknumbers__3 > .v-calendar-month__day:nth-child(4n) {
189
+ border-right: none;
190
+ }
191
+ .v-calendar-month__days.days-with-weeknumbers__4 {
192
+ grid-template-columns: 24px repeat(4, 1fr);
193
+ }
194
+ .v-calendar-month__days.days-with-weeknumbers__4 > .v-calendar-month__day:nth-child(5n) {
195
+ border-right: none;
196
+ }
197
+ .v-calendar-month__days.days-with-weeknumbers__5 {
198
+ grid-template-columns: 24px repeat(5, 1fr);
199
+ }
200
+ .v-calendar-month__days.days-with-weeknumbers__5 > .v-calendar-month__day:nth-child(6n) {
201
+ border-right: none;
202
+ }
203
+ .v-calendar-month__days.days-with-weeknumbers__6 {
204
+ grid-template-columns: 24px repeat(6, 1fr);
205
+ }
206
+ .v-calendar-month__days.days-with-weeknumbers__6 > .v-calendar-month__day:nth-child(7n) {
207
+ border-right: none;
208
+ }
209
+ .v-calendar-month__days.days-with-weeknumbers__7 {
210
+ grid-template-columns: 24px repeat(7, 1fr);
211
+ }
212
+ .v-calendar-month__days.days-with-weeknumbers__7 > .v-calendar-month__day:nth-child(7n) {
213
+ border-right: thin solid thin;
214
+ }
215
+ .v-calendar-month__days.days-with-weeknumbers__7 > .v-calendar-month__day:nth-child(8n) {
216
+ border-right: none;
217
+ }
218
+ .v-calendar-month__days.days-with-weeknumbers__7 > .v-calendar-month__day:nth-child(8n) {
219
+ border-right: none;
220
+ }
@@ -0,0 +1,128 @@
1
+ import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
+ // Styles
3
+ import "./VCalendar.css";
4
+
5
+ // Components
6
+ import { makeVCalendarDayProps, VCalendarDay } from "./VCalendarDay.mjs";
7
+ import { makeVCalendarHeaderProps, VCalendarHeader } from "./VCalendarHeader.mjs";
8
+ import { VCalendarMonthDay } from "./VCalendarMonthDay.mjs"; // Composables
9
+ import { makeCalendarProps, useCalendar } from "../../composables/calendar.mjs";
10
+ import { getDay, useDate } from "../../composables/date/date.mjs"; // Utilities
11
+ import { computed } from 'vue';
12
+ import { chunkArray, genericComponent, propsFactory, useRender } from "../../util/index.mjs";
13
+ export const makeVCalendarProps = propsFactory({
14
+ hideHeader: Boolean,
15
+ hideWeekNumber: Boolean,
16
+ weekdays: {
17
+ type: Array,
18
+ default: () => [0, 1, 2, 3, 4, 5, 6]
19
+ },
20
+ ...makeCalendarProps(),
21
+ ...makeVCalendarDayProps(),
22
+ ...makeVCalendarHeaderProps()
23
+ }, 'VCalender');
24
+ export const VCalendar = genericComponent()({
25
+ name: 'VCalendar',
26
+ props: makeVCalendarProps(),
27
+ emits: {
28
+ next: null,
29
+ prev: null,
30
+ 'update:modelValue': null
31
+ },
32
+ setup(props, _ref) {
33
+ let {
34
+ emit,
35
+ slots
36
+ } = _ref;
37
+ const adapter = useDate();
38
+ const {
39
+ daysInMonth,
40
+ daysInWeek,
41
+ genDays,
42
+ model,
43
+ weekNumbers
44
+ } = useCalendar(props);
45
+ const dayNames = adapter.getWeekdays();
46
+ function onClickNext() {
47
+ if (props.viewMode === 'month') {
48
+ model.value = [adapter.addMonths(model.value[0], 1)];
49
+ }
50
+ if (props.viewMode === 'week') {
51
+ model.value = [adapter.addDays(model.value[0], 7)];
52
+ }
53
+ if (props.viewMode === 'day') {
54
+ model.value = [adapter.addDays(model.value[0], 1)];
55
+ }
56
+ }
57
+ function onClickPrev() {
58
+ if (props.viewMode === 'month') {
59
+ model.value = [adapter.addMonths(model.value[0], -1)];
60
+ }
61
+ if (props.viewMode === 'week') {
62
+ model.value = [adapter.addDays(model.value[0], -7)];
63
+ }
64
+ if (props.viewMode === 'day') {
65
+ model.value = [adapter.addDays(model.value[0], -1)];
66
+ }
67
+ }
68
+ function onClickToday() {
69
+ model.value = [new Date()];
70
+ }
71
+ const title = computed(() => {
72
+ return adapter.format(model.value[0], 'monthAndYear');
73
+ });
74
+ useRender(() => {
75
+ const calendarDayProps = VCalendarDay.filterProps(props);
76
+ const calendarHeaderProps = VCalendarHeader.filterProps(props);
77
+ return _createVNode("div", {
78
+ "class": ['v-calendar', {
79
+ 'v-calendar-monthly': props.viewMode === 'month',
80
+ 'v-calendar-weekly': props.viewMode === 'week',
81
+ 'v-calendar-day': props.viewMode === 'day'
82
+ }]
83
+ }, [_createVNode("div", null, [!props.hideHeader && (!slots.header ? _createVNode(VCalendarHeader, _mergeProps({
84
+ "key": "calendar-header"
85
+ }, calendarHeaderProps, {
86
+ "title": title.value,
87
+ "onClick:next": onClickNext,
88
+ "onClick:prev": onClickPrev,
89
+ "onClick:toToday": onClickToday
90
+ }), null) : slots.header({
91
+ title: title.value
92
+ }))]), _createVNode("div", {
93
+ "class": "v-calendar__container"
94
+ }, [props.viewMode === 'month' && !props.hideDayHeader && _createVNode("div", {
95
+ "class": ['v-calendar-weekly__head', `days__${props.weekdays.length}`, ...(!props.hideWeekNumber ? ['v-calendar-weekly__head-weeknumbers'] : [])],
96
+ "key": "calenderWeeklyHead"
97
+ }, [!props.hideWeekNumber ? _createVNode("div", {
98
+ "key": "weekNumber0",
99
+ "class": "v-calendar-weekly__head-weeknumber"
100
+ }, null) : '', props.weekdays.sort((a, b) => a - b).map(weekday => _createVNode("div", {
101
+ "class": `v-calendar-weekly__head-weekday${!props.hideWeekNumber ? '-with-weeknumber' : ''}`
102
+ }, [dayNames[weekday]]))]), props.viewMode === 'month' && _createVNode("div", {
103
+ "key": "VCalendarMonth",
104
+ "class": ['v-calendar-month__days', `days${!props.hideWeekNumber ? '-with-weeknumbers' : ''}__${props.weekdays.length}`, ...(!props.hideWeekNumber ? ['v-calendar-month__weeknumbers'] : [])]
105
+ }, [chunkArray(daysInMonth.value.filter(day => props.weekdays.includes(getDay(adapter, day.date))), props.weekdays.length).map((week, wi) => [!props.hideWeekNumber ? _createVNode("div", {
106
+ "class": "v-calendar-month__weeknumber"
107
+ }, [weekNumbers.value[wi]]) : '', week.filter(day => props.weekdays.includes(getDay(adapter, day.date))).map(day => _createVNode(VCalendarMonthDay, {
108
+ "color": adapter.isSameDay(new Date(), day.date) ? 'primary' : undefined,
109
+ "day": day,
110
+ "title": day ? adapter.format(day.date, 'dayOfMonth') : 'NaN',
111
+ "events": props.events?.filter(e => adapter.isSameDay(day.date, e.start) || adapter.isSameDay(day.date, e.end))
112
+ }, null))])]), props.viewMode === 'week' && daysInWeek.value.map((day, i) => _createVNode(VCalendarDay, _mergeProps(calendarDayProps, {
113
+ "day": day,
114
+ "dayIndex": i,
115
+ "events": props.events?.filter(e => adapter.isSameDay(e.start, day.date) || adapter.isSameDay(e.end, day.date))
116
+ }), null)), props.viewMode === 'day' && _createVNode(VCalendarDay, _mergeProps(calendarDayProps, {
117
+ "day": genDays([model.value[0]], adapter.date())[0],
118
+ "events": props.events?.filter(e => adapter.isSameDay(e.start, genDays([model.value[0]], adapter.date())[0].date) || adapter.isSameDay(e.end, genDays([model.value[0]], adapter.date())[0].date))
119
+ }), null)])]);
120
+ });
121
+ return {
122
+ daysInMonth,
123
+ daysInWeek,
124
+ genDays
125
+ };
126
+ }
127
+ });
128
+ //# sourceMappingURL=VCalendar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VCalendar.mjs","names":["makeVCalendarDayProps","VCalendarDay","makeVCalendarHeaderProps","VCalendarHeader","VCalendarMonthDay","makeCalendarProps","useCalendar","getDay","useDate","computed","chunkArray","genericComponent","propsFactory","useRender","makeVCalendarProps","hideHeader","Boolean","hideWeekNumber","weekdays","type","Array","default","VCalendar","name","props","emits","next","prev","setup","_ref","emit","slots","adapter","daysInMonth","daysInWeek","genDays","model","weekNumbers","dayNames","getWeekdays","onClickNext","viewMode","value","addMonths","addDays","onClickPrev","onClickToday","Date","title","format","calendarDayProps","filterProps","calendarHeaderProps","_createVNode","header","_mergeProps","hideDayHeader","length","sort","a","b","map","weekday","filter","day","includes","date","week","wi","isSameDay","undefined","events","e","start","end","i"],"sources":["../../../src/labs/VCalendar/VCalendar.tsx"],"sourcesContent":["// Styles\nimport './VCalendar.sass'\n\n// Components\nimport { makeVCalendarDayProps, VCalendarDay } from './VCalendarDay'\nimport { makeVCalendarHeaderProps, VCalendarHeader } from './VCalendarHeader'\nimport { VCalendarMonthDay } from './VCalendarMonthDay'\n\n// Composables\nimport { makeCalendarProps, useCalendar } from '@/composables/calendar'\nimport { getDay, useDate } from '@/composables/date/date'\n\n// Utilities\nimport { computed } from 'vue'\nimport { chunkArray, genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVCalendarProps = propsFactory({\n hideHeader: Boolean,\n hideWeekNumber: Boolean,\n weekdays: {\n type: Array<number>,\n default: () => [0, 1, 2, 3, 4, 5, 6],\n },\n\n ...makeCalendarProps(),\n ...makeVCalendarDayProps(),\n ...makeVCalendarHeaderProps(),\n}, 'VCalender')\n\nexport type VCalendarSlots = {\n header: { title: string }\n}\n\nexport const VCalendar = genericComponent<VCalendarSlots>()({\n name: 'VCalendar',\n\n props: makeVCalendarProps(),\n\n emits: {\n next: null,\n prev: null,\n 'update:modelValue': null,\n },\n\n setup (props, { emit, slots }) {\n const adapter = useDate()\n\n const { daysInMonth, daysInWeek, genDays, model, weekNumbers } = useCalendar(props as any)\n\n const dayNames = adapter.getWeekdays()\n\n function onClickNext () {\n if (props.viewMode === 'month') {\n model.value = [adapter.addMonths(model.value[0], 1)]\n }\n if (props.viewMode === 'week') {\n model.value = [adapter.addDays(model.value[0], 7)]\n }\n if (props.viewMode === 'day') {\n model.value = [adapter.addDays(model.value[0], 1)]\n }\n }\n\n function onClickPrev () {\n if (props.viewMode === 'month') {\n model.value = [adapter.addMonths(model.value[0], -1)]\n }\n if (props.viewMode === 'week') {\n model.value = [adapter.addDays(model.value[0], -7)]\n }\n if (props.viewMode === 'day') {\n model.value = [adapter.addDays(model.value[0], -1)]\n }\n }\n\n function onClickToday () {\n model.value = [new Date()]\n }\n\n const title = computed(() => {\n return adapter.format(model.value[0], 'monthAndYear')\n })\n\n useRender(() => {\n const calendarDayProps = VCalendarDay.filterProps(props)\n const calendarHeaderProps = VCalendarHeader.filterProps(props)\n\n return (\n <div class={[\n 'v-calendar',\n {\n 'v-calendar-monthly': props.viewMode === 'month',\n 'v-calendar-weekly': props.viewMode === 'week',\n 'v-calendar-day': props.viewMode === 'day',\n },\n ]}\n >\n <div>\n { !props.hideHeader && (\n !slots.header ? (\n <VCalendarHeader\n key=\"calendar-header\"\n { ...calendarHeaderProps }\n title={ title.value }\n onClick:next={ onClickNext }\n onClick:prev={ onClickPrev }\n onClick:toToday={ onClickToday }\n />\n ) : (\n slots.header({ title: title.value })\n )\n )}\n </div>\n\n <div class=\"v-calendar__container\">\n { props.viewMode === 'month' && !props.hideDayHeader && (\n <div\n class={\n [\n 'v-calendar-weekly__head',\n `days__${props.weekdays.length}`,\n ...(!props.hideWeekNumber ? ['v-calendar-weekly__head-weeknumbers'] : []),\n ]\n }\n key=\"calenderWeeklyHead\"\n >\n { !props.hideWeekNumber ? <div key=\"weekNumber0\" class=\"v-calendar-weekly__head-weeknumber\"></div> : '' }\n {\n props.weekdays.sort((a, b) => a - b).map(weekday => (\n <div class={ `v-calendar-weekly__head-weekday${!props.hideWeekNumber ? '-with-weeknumber' : ''}` }>\n { dayNames[weekday] }\n </div>\n ))\n }\n </div>\n )}\n\n { props.viewMode === 'month' && (\n <div\n key=\"VCalendarMonth\"\n class={\n [\n 'v-calendar-month__days',\n `days${!props.hideWeekNumber ? '-with-weeknumbers' : ''}__${props.weekdays.length}`,\n ...(!props.hideWeekNumber ? ['v-calendar-month__weeknumbers'] : []),\n ]\n }\n >\n { chunkArray(daysInMonth.value\n .filter(day => props.weekdays.includes(getDay(adapter, day.date))), props.weekdays.length)\n .map((week, wi) => (\n [\n !props.hideWeekNumber ? <div class=\"v-calendar-month__weeknumber\">{ weekNumbers.value[wi] }</div> : '',\n week.filter(day => props.weekdays.includes(getDay(adapter, day.date))).map(day => (\n <VCalendarMonthDay\n color={ adapter.isSameDay(new Date(), day.date) ? 'primary' : undefined }\n day={ day }\n title={ day ? adapter.format(day.date, 'dayOfMonth') : 'NaN' }\n events={ props.events?.filter(e => adapter.isSameDay(day.date, e.start) || adapter.isSameDay(day.date, e.end)) }\n ></VCalendarMonthDay>\n )),\n ]\n ))}\n </div>\n )}\n\n { props.viewMode === 'week' && (\n daysInWeek.value.map((day, i) => (\n <VCalendarDay\n { ...calendarDayProps }\n day={ day }\n dayIndex={ i }\n events={ props.events?.filter(e => adapter.isSameDay(e.start, day.date) || adapter.isSameDay(e.end, day.date)) }\n ></VCalendarDay>\n ))\n )}\n\n { props.viewMode === 'day' && (\n <VCalendarDay\n { ...calendarDayProps }\n day={ genDays([model.value[0] as Date], adapter.date() as Date)[0] }\n events={\n props.events?.filter(e =>\n adapter.isSameDay(e.start, genDays([model.value[0] as Date], adapter.date() as Date)[0].date) ||\n adapter.isSameDay(e.end, genDays([model.value[0] as Date], adapter.date() as Date)[0].date)\n )\n }\n ></VCalendarDay>\n )}\n </div>\n </div>\n )\n })\n\n return { daysInMonth, daysInWeek, genDays }\n },\n})\n\nexport type VCalendar = InstanceType<typeof VCalendar>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,wBAAwB,EAAEC,eAAe;AAAA,SACzCC,iBAAiB,mCAE1B;AAAA,SACSC,iBAAiB,EAAEC,WAAW;AAAA,SAC9BC,MAAM,EAAEC,OAAO,2CAExB;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,UAAU,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAE9D,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,UAAU,EAAEC,OAAO;EACnBC,cAAc,EAAED,OAAO;EACvBE,QAAQ,EAAE;IACRC,IAAI,EAAEC,KAAa;IACnBC,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;EACrC,CAAC;EA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1,168 @@
1
+ @import './_variables.scss'
2
+
3
+ .v-calendar-weekly
4
+ width: 100%
5
+ height: 100%
6
+ display: flex
7
+ flex-direction: column
8
+ // https://github.com/vuetifyjs/vuetify/issues/8319
9
+ min-height: 0
10
+ // Themed
11
+ background-color: #fff
12
+
13
+ .v-calendar__container
14
+ border-top: $calendar-line-width solid $calendar-line-color
15
+ border-left: $calendar-line-width solid $calendar-line-color
16
+ border-right: $calendar-line-width solid $calendar-line-color
17
+
18
+ .v-calendar-weekly__head
19
+ display: grid
20
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(7, 1fr)
21
+ user-select: none
22
+ &.days__0
23
+ grid-template-columns: 1fr
24
+ &.v-calendar-weekly__head-weeknumbers
25
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis 1fr
26
+ &.days__1
27
+ grid-template-columns: 1fr
28
+ &.v-calendar-weekly__head-weeknumbers
29
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis 1fr
30
+ &.days__2
31
+ grid-template-columns: repeat(2, 1fr)
32
+ &.v-calendar-weekly__head-weeknumbers
33
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(2, 1fr)
34
+ &.days__3
35
+ grid-template-columns: repeat(3, 1fr)
36
+ &.v-calendar-weekly__head-weeknumbers
37
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(3, 1fr)
38
+ &.days__4
39
+ grid-template-columns: repeat(4, 1fr)
40
+ &.v-calendar-weekly__head-weeknumbers
41
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(4, 1fr)
42
+ &.days__5
43
+ grid-template-columns: repeat(5, 1fr)
44
+ &.v-calendar-weekly__head-weeknumbers
45
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(5, 1fr)
46
+ &.days__6
47
+ grid-template-columns: repeat(6, 1fr)
48
+ &.v-calendar-weekly__head-weeknumbers
49
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(6, 1fr)
50
+ &.days__7
51
+ grid-template-columns: repeat(7, 1fr)
52
+ &.v-calendar-weekly__head-weeknumbers
53
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(7, 1fr)
54
+
55
+ .v-calendar-weekly__head-weekday, .v-calendar-weekly__head-weekday-with-weeknumber
56
+ flex: 1 0 20px
57
+ user-select: none
58
+ padding: $calendar-weekly-weekday-padding
59
+ font-size: $calendar-weekly-weekday-font-size
60
+ overflow: hidden
61
+ text-align: center
62
+ text-overflow: ellipsis
63
+ text-transform: uppercase
64
+ white-space: nowrap
65
+ // Themed
66
+ border-right: $calendar-line-width solid $calendar-line-color
67
+
68
+ &:last-child
69
+ border-right: none
70
+
71
+ // TODO change this
72
+ > div .v-btn
73
+ font-size: 1.5rem
74
+
75
+ .v-calendar-weekly__head-weeknumber
76
+ background: rgb(var(--v-theme-on-surface-variant))
77
+
78
+ .v-calendar-weekly__week
79
+ display: flex
80
+ flex: 1
81
+ height: unset
82
+ // https://github.com/vuetifyjs/vuetify/issues/8319
83
+ min-height: 0
84
+
85
+ .v-calendar-month__weeknumber
86
+ padding-top: $calendar-weekly-weeknumber-padding-top
87
+ background: rgb(var(--v-theme-on-surface-variant))
88
+ border-bottom: $calendar-line-width solid $calendar-line-color
89
+ text-align: center
90
+ font-size: $calendar-weekly-weeknumber-font-size
91
+ font-weight: $calendar-weekly-weeknumber-font-weight
92
+
93
+ .v-calendar-month__days
94
+ display: grid
95
+ flex: 1 1
96
+ > .v-calendar-month__day
97
+ min-height: $calendar-weekly-day-min-height
98
+ &.days__0
99
+ grid-template-columns: 1fr
100
+ > .v-calendar-month__day
101
+ border-right: none
102
+ &.days__1
103
+ grid-template-columns: 1fr
104
+ > .v-calendar-month__day
105
+ border-right: none
106
+ &.days__2
107
+ grid-template-columns: repeat(2, 1fr)
108
+ > .v-calendar-month__day:nth-child(2n)
109
+ border-right: none
110
+ &.days__3
111
+ grid-template-columns: repeat(3, 1fr)
112
+ > .v-calendar-month__day:nth-child(3n)
113
+ border-right: none
114
+ &.days__4
115
+ grid-template-columns: repeat(4, 1fr)
116
+ > .v-calendar-month__day:nth-child(4n)
117
+ border-right: none
118
+ &.days__5
119
+ grid-template-columns: repeat(5, 1fr)
120
+ > .v-calendar-month__day:nth-child(5n)
121
+ border-right: none
122
+ &.days__6
123
+ grid-template-columns: repeat(6, 1fr)
124
+ > .v-calendar-month__day:nth-child(6n)
125
+ border-right: none
126
+ &.v-calendar-month__weeknumbers
127
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(6, 1fr)
128
+ &.days__7
129
+ grid-template-columns: repeat(7, 1fr)
130
+ > .v-calendar-month__day:nth-child(7n)
131
+ border-right: none
132
+
133
+ &.days-with-weeknumbers__0
134
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis 1fr
135
+ > .v-calendar-month__day
136
+ border-right: none
137
+ &.days-with-weeknumbers__1
138
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis 1fr
139
+ > .v-calendar-month__day
140
+ border-right: none
141
+ &.days-with-weeknumbers__2
142
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(2, 1fr)
143
+ > .v-calendar-month__day:nth-child(3n)
144
+ border-right: none
145
+ &.days-with-weeknumbers__3
146
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(3, 1fr)
147
+ > .v-calendar-month__day:nth-child(4n)
148
+ border-right: none
149
+ &.days-with-weeknumbers__4
150
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(4, 1fr)
151
+ > .v-calendar-month__day:nth-child(5n)
152
+ border-right: none
153
+ &.days-with-weeknumbers__5
154
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(5, 1fr)
155
+ > .v-calendar-month__day:nth-child(6n)
156
+ border-right: none
157
+ &.days-with-weeknumbers__6
158
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(6, 1fr)
159
+ > .v-calendar-month__day:nth-child(7n)
160
+ border-right: none
161
+ &.days-with-weeknumbers__7
162
+ grid-template-columns: $calendar-weekly-weeknumber-flex-basis repeat(7, 1fr)
163
+ > .v-calendar-month__day:nth-child(7n)
164
+ border-right: $calendar-line-width solid $calendar-line-width
165
+ > .v-calendar-month__day:nth-child(8n)
166
+ border-right: none
167
+ > .v-calendar-month__day:nth-child(8n)
168
+ border-right: none
@@ -0,0 +1,10 @@
1
+ .v-calendar-day {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ }
6
+
7
+ .v-calendar-weekly .v-calendar__container {
8
+ display: grid;
9
+ grid-template-columns: repeat(7, 1fr);
10
+ }
@@ -0,0 +1,47 @@
1
+ import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
+ // Styles
3
+ import "./VCalendarDay.css";
4
+
5
+ // Components
6
+ import { makeVCalendarIntervalProps, VCalendarInterval } from "./VCalendarInterval.mjs";
7
+ import { VBtn } from "../../components/VBtn/index.mjs"; // Composables
8
+ import { useDate } from "../../composables/date/index.mjs"; // Utilities
9
+ import { computed } from 'vue';
10
+ import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
11
+ export const makeVCalendarDayProps = propsFactory({
12
+ hideDayHeader: Boolean,
13
+ intervals: {
14
+ type: Number,
15
+ default: 24
16
+ },
17
+ ...makeVCalendarIntervalProps()
18
+ }, 'VCalendarDay');
19
+ export const VCalendarDay = genericComponent()({
20
+ name: 'VCalendarDay',
21
+ props: makeVCalendarDayProps(),
22
+ setup(props) {
23
+ const adapter = useDate();
24
+ const intervals = computed(() => [...Array.from({
25
+ length: props.intervals
26
+ }, (v, i) => i).filter((int, index) => props.intervalDuration * (index + props.intervalStart) < 1440)]);
27
+ useRender(() => {
28
+ const calendarIntervalProps = VCalendarInterval.filterProps(props);
29
+ return _createVNode("div", {
30
+ "class": "v-calendar-day__container"
31
+ }, [!props.hideDayHeader && _createVNode("div", {
32
+ "key": "calender-week-name",
33
+ "class": "v-calendar-weekly__head-weekday"
34
+ }, [adapter.format(props.day.date, 'weekdayShort'), _createVNode("div", null, [_createVNode(VBtn, {
35
+ "icon": true,
36
+ "text": adapter.format(props.day.date, 'dayOfMonth'),
37
+ "variant": "text"
38
+ }, null)])]), intervals.value.map((_, index) => _createVNode(VCalendarInterval, _mergeProps({
39
+ "index": index
40
+ }, calendarIntervalProps), null))]);
41
+ });
42
+ return {
43
+ intervals
44
+ };
45
+ }
46
+ });
47
+ //# sourceMappingURL=VCalendarDay.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VCalendarDay.mjs","names":["makeVCalendarIntervalProps","VCalendarInterval","VBtn","useDate","computed","genericComponent","propsFactory","useRender","makeVCalendarDayProps","hideDayHeader","Boolean","intervals","type","Number","default","VCalendarDay","name","props","setup","adapter","Array","from","length","v","i","filter","int","index","intervalDuration","intervalStart","calendarIntervalProps","filterProps","_createVNode","format","day","date","value","map","_","_mergeProps"],"sources":["../../../src/labs/VCalendar/VCalendarDay.tsx"],"sourcesContent":["// Styles\nimport './VCalendarDay.sass'\n\n// Components\nimport { makeVCalendarIntervalProps, VCalendarInterval } from './VCalendarInterval'\nimport { VBtn } from '@/components/VBtn'\n\n// Composables\nimport { useDate } from '@/composables/date'\n\n// Utilities\nimport { computed } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVCalendarDayProps = propsFactory({\n hideDayHeader: Boolean,\n intervals: {\n type: Number,\n default: 24,\n },\n\n ...makeVCalendarIntervalProps(),\n}, 'VCalendarDay')\n\nexport const VCalendarDay = genericComponent()({\n name: 'VCalendarDay',\n\n props: makeVCalendarDayProps(),\n\n setup (props) {\n const adapter = useDate()\n const intervals = computed(() => [\n ...Array.from({ length: props.intervals }, (v, i) => i)\n .filter((int, index) => (props.intervalDuration * (index + props.intervalStart)) < 1440),\n ])\n\n useRender(() => {\n const calendarIntervalProps = VCalendarInterval.filterProps(props)\n\n return (\n <div class=\"v-calendar-day__container\">\n { !props.hideDayHeader && (\n <div\n key=\"calender-week-name\"\n class=\"v-calendar-weekly__head-weekday\"\n >\n { adapter.format(props.day.date, 'weekdayShort') }\n\n <div>\n <VBtn\n icon\n text={ adapter.format(props.day.date, 'dayOfMonth') }\n variant=\"text\"\n />\n </div>\n </div>\n )}\n\n { intervals.value.map((_, index) => (\n <VCalendarInterval\n index={ index }\n { ...calendarIntervalProps }\n ></VCalendarInterval>\n ))\n }\n </div>\n )\n })\n\n return { intervals }\n },\n})\n\nexport type VCalendarDay = InstanceType<typeof VCalendarDay>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,0BAA0B,EAAEC,iBAAiB;AAAA,SAC7CC,IAAI,2CAEb;AAAA,SACSC,OAAO,4CAEhB;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAElD,OAAO,MAAMC,qBAAqB,GAAGF,YAAY,CAAC;EAChDG,aAAa,EAAEC,OAAO;EACtBC,SAAS,EAAE;IACTC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EAED,GAAGd,0BAA0B,CAAC;AAChC,CAAC,EAAE,cAAc,CAAC;AAElB,OAAO,MAAMe,YAAY,GAAGV,gBAAgB,CAAC,CAAC,CAAC;EAC7CW,IAAI,EAAE,cAAc;EAEpBC,KAAK,EAAET,qBAAqB,CAAC,CAAC;EAE9BU,KAAKA,CAAED,KAAK,EAAE;IACZ,MAAME,OAAO,GAAGhB,OAAO,CAAC,CAAC;IACzB,MAAMQ,SAAS,GAAGP,QAAQ,CAAC,MAAM,CAC/B,GAAGgB,KAAK,CAACC,IAAI,CAAC;MAAEC,MAAM,EAAEL,KAAK,CAACN;IAAU,CAAC,EAAE,CAACY,CAAC,EAAEC,CAAC,KAAKA,CAAC,CAAC,CACpDC,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAMV,KAAK,CAACW,gBAAgB,IAAID,KAAK,GAAGV,KAAK,CAACY,aAAa,CAAC,GAAI,IAAI,CAAC,CAC3F,CAAC;IAEFtB,SAAS,CAAC,MAAM;MACd,MAAMuB,qBAAqB,GAAG7B,iBAAiB,CAAC8B,WAAW,CAACd,KAAK,CAAC;MAElE,OAAAe,YAAA;QAAA;MAAA,IAEM,CAACf,KAAK,CAACR,aAAa,IAAAuB,YAAA;QAAA;QAAA;MAAA,IAKhBb,OAAO,CAACc,MAAM,CAAChB,KAAK,CAACiB,GAAG,CAACC,IAAI,EAAE,cAAc,CAAC,EAAAH,YAAA,eAAAA,YAAA,CAAA9B,IAAA;QAAA;QAAA,QAKrCiB,OAAO,CAACc,MAAM,CAAChB,KAAK,CAACiB,GAAG,CAACC,IAAI,EAAE,YAAY,CAAC;QAAA;MAAA,YAK1D,EAECxB,SAAS,CAACyB,KAAK,CAACC,GAAG,CAAC,CAACC,CAAC,EAAEX,KAAK,KAAAK,YAAA,CAAA/B,iBAAA,EAAAsC,WAAA;QAAA,SAEnBZ;MAAK,GACRG,qBAAqB,QAE7B,CAAC;IAIR,CAAC,CAAC;IAEF,OAAO;MAAEnB;IAAU,CAAC;EACtB;AACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ .v-calendar-day
2
+ position: relative
3
+ display: flex
4
+ flex-direction: column
5
+
6
+ .v-calendar-weekly
7
+ .v-calendar__container
8
+ display: grid
9
+ grid-template-columns: repeat(7, 1fr)
@@ -0,0 +1,30 @@
1
+ import { createVNode as _createVNode } from "vue";
2
+ // Components
3
+ import { VBadge } from "../../components/VBadge/index.mjs";
4
+ import { VChip } from "../../components/VChip/index.mjs"; // Utilities
5
+ import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
6
+ export const makeVCalendarEventProps = propsFactory({
7
+ allDay: Boolean,
8
+ day: Object,
9
+ event: Object
10
+ }, 'VCalendarEvent');
11
+ export const VCalendarEvent = genericComponent()({
12
+ name: 'VCalendarEvent',
13
+ props: makeVCalendarEventProps(),
14
+ setup(props) {
15
+ useRender(() => _createVNode(VChip, {
16
+ "color": props.allDay ? 'primary' : undefined,
17
+ "density": "comfortable",
18
+ "label": props.allDay,
19
+ "width": "100%"
20
+ }, {
21
+ default: () => [_createVNode(VBadge, {
22
+ "inline": true,
23
+ "dot": true,
24
+ "color": props.event?.color
25
+ }, null), props.event?.title]
26
+ }));
27
+ return {};
28
+ }
29
+ });
30
+ //# sourceMappingURL=VCalendarEvent.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VCalendarEvent.mjs","names":["VBadge","VChip","genericComponent","propsFactory","useRender","makeVCalendarEventProps","allDay","Boolean","day","Object","event","VCalendarEvent","name","props","setup","_createVNode","undefined","default","color","title"],"sources":["../../../src/labs/VCalendar/VCalendarEvent.tsx"],"sourcesContent":["// Components\nimport { VBadge } from '@/components/VBadge'\nimport { VChip } from '@/components/VChip'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVCalendarEventProps = propsFactory({\n allDay: Boolean,\n day: Object,\n event: Object,\n}, 'VCalendarEvent')\n\nexport const VCalendarEvent = genericComponent()({\n name: 'VCalendarEvent',\n\n props: makeVCalendarEventProps(),\n\n setup (props) {\n useRender(() => (\n <VChip\n color={ props.allDay ? 'primary' : undefined }\n density=\"comfortable\"\n label={ props.allDay }\n width=\"100%\"\n >\n <VBadge\n inline\n dot\n color={ props.event?.color }\n />\n\n { props.event?.title }\n </VChip>\n ))\n\n return {}\n },\n\n})\n\nexport type VCalendarEvent = InstanceType<typeof VCalendarEvent>\n"],"mappings":";AAAA;AAAA,SACSA,MAAM;AAAA,SACNC,KAAK,4CAEd;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAElD,OAAO,MAAMC,uBAAuB,GAAGF,YAAY,CAAC;EAClDG,MAAM,EAAEC,OAAO;EACfC,GAAG,EAAEC,MAAM;EACXC,KAAK,EAAED;AACT,CAAC,EAAE,gBAAgB,CAAC;AAEpB,OAAO,MAAME,cAAc,GAAGT,gBAAgB,CAAC,CAAC,CAAC;EAC/CU,IAAI,EAAE,gBAAgB;EAEtBC,KAAK,EAAER,uBAAuB,CAAC,CAAC;EAEhCS,KAAKA,CAAED,KAAK,EAAE;IACZT,SAAS,CAAC,MAAAW,YAAA,CAAAd,KAAA;MAAA,SAEEY,KAAK,CAACP,MAAM,GAAG,SAAS,GAAGU,SAAS;MAAA;MAAA,SAEpCH,KAAK,CAACP,MAAM;MAAA;IAAA;MAAAW,OAAA,EAAAA,CAAA,MAAAF,YAAA,CAAAf,MAAA;QAAA;QAAA;QAAA,SAMVa,KAAK,CAACH,KAAK,EAAEQ;MAAK,UAG1BL,KAAK,CAACH,KAAK,EAAES,KAAK;IAAA,EAEvB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AAEF,CAAC,CAAC"}