v-calendar-3 1.0.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.
Files changed (147) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +142 -0
  3. package/dist/cjs/index.css +1133 -0
  4. package/dist/cjs/index.js +10699 -0
  5. package/dist/cjs/index.js.map +1 -0
  6. package/dist/cjs/package.json +1 -0
  7. package/dist/es/index.js +10678 -0
  8. package/dist/es/index.js.map +1 -0
  9. package/dist/es/style.css +1134 -0
  10. package/dist/iife/index.js +2 -0
  11. package/dist/iife/index.js.map +1 -0
  12. package/dist/mjs/index.mjs +10678 -0
  13. package/dist/mjs/index.mjs.map +1 -0
  14. package/dist/mjs/style.css +1134 -0
  15. package/dist/style.css +1134 -0
  16. package/dist/types/components/BaseIcon/BaseIcon.vue.d.ts +41 -0
  17. package/dist/types/components/BaseIcon/icons/IconChevronDown.vue.d.ts +3 -0
  18. package/dist/types/components/BaseIcon/icons/IconChevronLeft.vue.d.ts +3 -0
  19. package/dist/types/components/BaseIcon/icons/IconChevronRight.vue.d.ts +3 -0
  20. package/dist/types/components/BaseIcon/icons/IconClock.vue.d.ts +3 -0
  21. package/dist/types/components/BaseIcon/icons/index.d.ts +4 -0
  22. package/dist/types/components/BaseSelect/BaseSelect.vue.d.ts +26 -0
  23. package/dist/types/components/Calendar/Calendar.vue.d.ts +2526 -0
  24. package/dist/types/components/Calendar/CalendarDay.vue.d.ts +83 -0
  25. package/dist/types/components/Calendar/CalendarDayPopover.vue.d.ts +3 -0
  26. package/dist/types/components/Calendar/CalendarHeader.vue.d.ts +13 -0
  27. package/dist/types/components/Calendar/CalendarNav.vue.d.ts +4 -0
  28. package/dist/types/components/Calendar/CalendarNavPopover.vue.d.ts +3 -0
  29. package/dist/types/components/Calendar/CalendarPage.vue.d.ts +3 -0
  30. package/dist/types/components/Calendar/CalendarPageProvider.vue.d.ts +17 -0
  31. package/dist/types/components/Calendar/CalendarSlot.vue.d.ts +15 -0
  32. package/dist/types/components/Calendar/CalendarTitleSelect.vue.d.ts +15 -0
  33. package/dist/types/components/CalendarGrid/CalendarCell.vue.d.ts +9 -0
  34. package/dist/types/components/CalendarGrid/CalendarCellPopover.vue.d.ts +209 -0
  35. package/dist/types/components/CalendarGrid/CalendarDayCell.vue.d.ts +8 -0
  36. package/dist/types/components/CalendarGrid/CalendarEventDetails.vue.d.ts +15 -0
  37. package/dist/types/components/CalendarGrid/CalendarEventEdit.vue.d.ts +26 -0
  38. package/dist/types/components/CalendarGrid/CalendarGrid.vue.d.ts +134 -0
  39. package/dist/types/components/CalendarGrid/CalendarGridWeek.vue.d.ts +8 -0
  40. package/dist/types/components/CalendarGrid/CalendarViewSelect.vue.d.ts +3 -0
  41. package/dist/types/components/CalendarGrid/CalendarWeekCell.vue.d.ts +10 -0
  42. package/dist/types/components/CalendarGrid/Constraints.d.ts +16 -0
  43. package/dist/types/components/DatePicker/DatePicker.vue.d.ts +15251 -0
  44. package/dist/types/components/DatePicker/DatePickerBase.vue.d.ts +3 -0
  45. package/dist/types/components/DatePicker/DatePickerPopover.vue.d.ts +3 -0
  46. package/dist/types/components/DatePicker/TimePicker.vue.d.ts +10089 -0
  47. package/dist/types/components/Popover/Popover.vue.d.ts +72 -0
  48. package/dist/types/components/Popover/PopoverRow.vue.d.ts +17 -0
  49. package/dist/types/components/index.d.ts +4 -0
  50. package/dist/types/index.d.cts +40981 -0
  51. package/dist/types/index.d.mts +40981 -0
  52. package/dist/types/index.d.ts +40981 -0
  53. package/dist/types/use/base.d.ts +67 -0
  54. package/dist/types/use/calendar.d.ts +2422 -0
  55. package/dist/types/use/calendarGrid.d.ts +9370 -0
  56. package/dist/types/use/datePicker.d.ts +20210 -0
  57. package/dist/types/use/page.d.ts +20 -0
  58. package/dist/types/use/slots.d.ts +5 -0
  59. package/dist/types/use/timePicker.d.ts +10089 -0
  60. package/dist/types/utils/attribute.d.ts +49 -0
  61. package/dist/types/utils/cache.d.ts +10 -0
  62. package/dist/types/utils/calendar/event.d.ts +111 -0
  63. package/dist/types/utils/config/index.d.ts +5 -0
  64. package/dist/types/utils/date/helpers.d.ts +161 -0
  65. package/dist/types/utils/date/range.d.ts +74 -0
  66. package/dist/types/utils/date/repeat.d.ts +34 -0
  67. package/dist/types/utils/date/rules.d.ts +82 -0
  68. package/dist/types/utils/defaults/index.d.ts +30 -0
  69. package/dist/types/utils/defaults/locales.d.ts +9 -0
  70. package/dist/types/utils/glyph.d.ts +58 -0
  71. package/dist/types/utils/helpers.d.ts +49 -0
  72. package/dist/types/utils/locale.d.ts +48 -0
  73. package/dist/types/utils/page.d.ts +95 -0
  74. package/dist/types/utils/plugins/index.d.ts +4 -0
  75. package/dist/types/utils/popovers.d.ts +47 -0
  76. package/dist/types/utils/theme.d.ts +17 -0
  77. package/dist/types/utils/touch.d.ts +8 -0
  78. package/dist/types/utils/useDisplayMode.d.ts +12 -0
  79. package/dist/types/utils/watchers.d.ts +6 -0
  80. package/package.json +115 -0
  81. package/src/components/BaseIcon/BaseIcon.vue +29 -0
  82. package/src/components/BaseIcon/icons/IconChevronDown.vue +5 -0
  83. package/src/components/BaseIcon/icons/IconChevronLeft.vue +5 -0
  84. package/src/components/BaseIcon/icons/IconChevronRight.vue +5 -0
  85. package/src/components/BaseIcon/icons/IconClock.vue +11 -0
  86. package/src/components/BaseIcon/icons/index.ts +4 -0
  87. package/src/components/BaseSelect/BaseSelect.vue +136 -0
  88. package/src/components/Calendar/Calendar.vue +116 -0
  89. package/src/components/Calendar/CalendarDay.vue +422 -0
  90. package/src/components/Calendar/CalendarDayPopover.vue +44 -0
  91. package/src/components/Calendar/CalendarHeader.vue +203 -0
  92. package/src/components/Calendar/CalendarNav.vue +325 -0
  93. package/src/components/Calendar/CalendarNavPopover.vue +24 -0
  94. package/src/components/Calendar/CalendarPage.vue +140 -0
  95. package/src/components/Calendar/CalendarPageProvider.vue +15 -0
  96. package/src/components/Calendar/CalendarSlot.vue +36 -0
  97. package/src/components/Calendar/CalendarTitleSelect.vue +72 -0
  98. package/src/components/CalendarGrid/CalendarCell.vue +112 -0
  99. package/src/components/CalendarGrid/CalendarCellPopover.vue +93 -0
  100. package/src/components/CalendarGrid/CalendarDayCell.vue +57 -0
  101. package/src/components/CalendarGrid/CalendarEventDetails.vue +71 -0
  102. package/src/components/CalendarGrid/CalendarEventEdit.vue +195 -0
  103. package/src/components/CalendarGrid/CalendarGrid.vue +715 -0
  104. package/src/components/CalendarGrid/CalendarGridWeek.vue +60 -0
  105. package/src/components/CalendarGrid/CalendarViewSelect.vue +34 -0
  106. package/src/components/CalendarGrid/CalendarWeekCell.vue +52 -0
  107. package/src/components/CalendarGrid/Constraints.ts +40 -0
  108. package/src/components/DatePicker/DatePicker.vue +27 -0
  109. package/src/components/DatePicker/DatePickerBase.vue +53 -0
  110. package/src/components/DatePicker/DatePickerPopover.vue +37 -0
  111. package/src/components/DatePicker/TimePicker.vue +167 -0
  112. package/src/components/Popover/Popover.vue +572 -0
  113. package/src/components/Popover/PopoverRow.vue +94 -0
  114. package/src/components/index.ts +4 -0
  115. package/src/index.ts +24 -0
  116. package/src/styles/index.css +48 -0
  117. package/src/styles/theme.css +322 -0
  118. package/src/styles/transitions.css +77 -0
  119. package/src/use/base.ts +144 -0
  120. package/src/use/calendar.ts +796 -0
  121. package/src/use/calendarGrid.ts +954 -0
  122. package/src/use/datePicker.ts +909 -0
  123. package/src/use/page.ts +78 -0
  124. package/src/use/slots.ts +17 -0
  125. package/src/use/timePicker.ts +194 -0
  126. package/src/utils/attribute.ts +107 -0
  127. package/src/utils/cache.ts +30 -0
  128. package/src/utils/calendar/event.ts +335 -0
  129. package/src/utils/config/index.ts +11 -0
  130. package/src/utils/date/helpers.ts +1039 -0
  131. package/src/utils/date/range.ts +274 -0
  132. package/src/utils/date/repeat.ts +135 -0
  133. package/src/utils/date/rules.ts +290 -0
  134. package/src/utils/defaults/index.ts +77 -0
  135. package/src/utils/defaults/locales.ts +123 -0
  136. package/src/utils/defaults/masks.json +15 -0
  137. package/src/utils/defaults/touch.json +5 -0
  138. package/src/utils/glyph.ts +305 -0
  139. package/src/utils/helpers.ts +181 -0
  140. package/src/utils/locale.ts +275 -0
  141. package/src/utils/page.ts +608 -0
  142. package/src/utils/plugins/index.ts +24 -0
  143. package/src/utils/popovers.ts +216 -0
  144. package/src/utils/theme.ts +58 -0
  145. package/src/utils/touch.ts +72 -0
  146. package/src/utils/useDisplayMode.ts +198 -0
  147. package/src/utils/watchers.ts +26 -0
@@ -0,0 +1,715 @@
1
+ <template>
2
+ <div
3
+ v-if="weeks.length"
4
+ class="vc-grid-container"
5
+ :class="[`vc-${color}`, `vc-${displayMode}`, `vc-${view}`]"
6
+ ref="containerRef"
7
+ @keydown="onKeydown"
8
+ >
9
+ <!--Calendar header-->
10
+ <div class="vc-grid-header-layout">
11
+ <CalendarHeader :page="page" layout="pnt-" is-2xl />
12
+ <CalendarViewSelect />
13
+ </div>
14
+ <div class="vc-grid-layout">
15
+ <div class="vc-grid-layout-left">
16
+ <!--Monthly grid-->
17
+ <template v-if="isMonthly">
18
+ <Transition
19
+ :name="`vc-${transitionName}`"
20
+ @before-enter="onTransitionBeforeEnter"
21
+ @after-enter="onTransitionAfterEnter"
22
+ >
23
+ <div
24
+ class="vc-grid-content"
25
+ :class="{
26
+ 'is-resizing': resizing,
27
+ 'is-dragging': dragging,
28
+ }"
29
+ @mousedown="onGridMouseDown"
30
+ ref="weeklyGridRef"
31
+ >
32
+ <!--Weeks-->
33
+ <div
34
+ v-for="week in weeks"
35
+ :key="week.id"
36
+ class="vc-grid-week"
37
+ :class="[`week-position-${week.weekPosition}`]"
38
+ >
39
+ <!--Week headers-->
40
+ <div
41
+ v-for="day in week.days"
42
+ :key="day.id"
43
+ class="vc-grid-day"
44
+ :class="[`weekday-${day.weekdayPosition}`]"
45
+ >
46
+ <!--Day header-->
47
+ <div class="vc-grid-day-header">
48
+ <!--Day header month label (first day in month)-->
49
+ <div v-if="day.day === 1" class="vc-grid-day-header-month">
50
+ {{ locale.formatDate(day.date, 'MMM') }}
51
+ </div>
52
+ <!--Day header weekday label (first week in month)-->
53
+ <div
54
+ v-if="week.weekPosition === 1"
55
+ class="vc-grid-day-header-weekday"
56
+ >
57
+ {{ locale.formatDate(day.date, 'WWW') }}
58
+ </div>
59
+ <!--Day header day (every day)-->
60
+ <div
61
+ tabindex="1"
62
+ role="button"
63
+ class="vc-grid-day-header-day-number vc-focusable"
64
+ @mousedown.stop
65
+ @click.stop="onDayNumberClick(day)"
66
+ @keydown="onDayKeydown(day, $event)"
67
+ @keydown.space.enter="onDayNumberClick(day)"
68
+ >
69
+ {{ day.day }}
70
+ </div>
71
+ </div>
72
+ </div>
73
+ <!--Week events-->
74
+ <CalendarGridWeek :days="week.days" />
75
+ </div>
76
+ <!--Cell popover-->
77
+ <CalendarCellPopover ref="cellPopoverRef" @mousedown.stop />
78
+ </div>
79
+ </Transition>
80
+ </template>
81
+ <!--Weekly/Daily grid-->
82
+ <template v-else>
83
+ <div class="vc-grid-header">
84
+ <div class="vc-grid-header-days">
85
+ <div
86
+ v-if="weeks[0].weeknumberDisplay"
87
+ class="vc-grid-header-timezone"
88
+ >
89
+ {{ weeks[0].weeknumberDisplay }}
90
+ </div>
91
+ <template v-for="day in weeks[0].days" :key="day.id">
92
+ <div
93
+ class="vc-grid-header-day"
94
+ :class="{
95
+ 'is-today': day.isToday,
96
+ 'is-active': day.day === page.day,
97
+ 'is-inactive': page.day && day.day !== page.day,
98
+ }"
99
+ >
100
+ <div class="vc-grid-header-day-label">
101
+ {{ locale.formatDate(day.date, 'WWW') }}
102
+ </div>
103
+ <span
104
+ tabindex="1"
105
+ role="button"
106
+ class="vc-grid-header-day-number vc-focusable"
107
+ :class="`id-${day.id}`"
108
+ @click="onDayNumberClick(day)"
109
+ @keydown="onDayKeydown(day, $event)"
110
+ @keydown.space.enter="onDayNumberClick(day)"
111
+ >{{ day.day }}</span
112
+ >
113
+ </div>
114
+ </template>
115
+ </div>
116
+ </div>
117
+ <div class="vc-grid-content">
118
+ <Transition
119
+ :name="`vc-${transitionName}`"
120
+ @before-enter="onTransitionBeforeEnter"
121
+ @after-enter="onTransitionAfterEnter"
122
+ >
123
+ <div class="vc-grid-inset" :key="page.id">
124
+ <!--All-day/Multi-day event cells-->
125
+ <div
126
+ :class="{
127
+ 'is-resizing': resizing,
128
+ 'is-dragging': dragging,
129
+ }"
130
+ @mousedown="onGridMouseDown"
131
+ @touchstart.passive="onGridTouchStart"
132
+ @touchmove.passive="onGridTouchMove"
133
+ @touchend="onGridTouchEnd"
134
+ @keydown.escape="onGridEscapeKeydown"
135
+ ref="weeklyGridRef"
136
+ >
137
+ <CalendarGridWeek :days="days" />
138
+ <div class="vc-grid-label vc-all-day">All-Day</div>
139
+ </div>
140
+ <!--Partial-day event cells-->
141
+ <div
142
+ :class="{
143
+ 'is-resizing': resizing,
144
+ 'is-dragging': dragging,
145
+ }"
146
+ @mousedown="onGridMouseDown($event)"
147
+ @touchstart.passive="onGridTouchStart($event)"
148
+ @touchmove.passive="onGridTouchMove"
149
+ @touchend="onGridTouchEnd"
150
+ @keydown.escape="onGridEscapeKeydown"
151
+ ref="dailyGridRef"
152
+ >
153
+ <div class="vc-grid-day-content" :style="gridStyle">
154
+ <!--Grid lines-->
155
+ <div class="vc-grid-layer vc-grid-lines">
156
+ <svg v-for="n in 25" :key="n" class="vc-grid-line-hour">
157
+ <line x1="0%" y1="0" x2="100%" y2="0" />
158
+ </svg>
159
+ </div>
160
+ <!--Hour labels-->
161
+ <div class="vc-grid-layer vc-grid-hours">
162
+ <div
163
+ v-for="label in locale.hourLabels"
164
+ :key="label"
165
+ class="vc-grid-label"
166
+ >
167
+ {{ label }}
168
+ </div>
169
+ </div>
170
+ <!--Daily event cells-->
171
+ <div class="vc-grid-layer vc-events-layer">
172
+ <div
173
+ class="vc-grid-day"
174
+ v-for="(cells, i) in dayCells"
175
+ :key="i"
176
+ >
177
+ <CalendarDayCell
178
+ v-for="cell in cells"
179
+ :key="cell.data.key"
180
+ :cell="cell"
181
+ />
182
+ </div>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ <!--Cell popover-->
187
+ <CalendarCellPopover ref="cellPopoverRef" @mousedown.prevent />
188
+ </div>
189
+ </Transition>
190
+ </div>
191
+ </template>
192
+ </div>
193
+ <div v-if="isDaily" class="vc-grid-layout-right">
194
+ <CalendarEventDetails :events="selectedEvents" />
195
+ </div>
196
+ </div>
197
+ </div>
198
+ <!--Nav popover-->
199
+ <CalendarNavPopover />
200
+ </template>
201
+
202
+ <script lang="ts">
203
+ export default {
204
+ name: 'CalendarGrid',
205
+ };
206
+ </script>
207
+
208
+ <script setup lang="ts">
209
+ import { useSlots, computed } from 'vue';
210
+ import CalendarNavPopover from '../Calendar/CalendarNavPopover.vue';
211
+ import CalendarHeader from '../Calendar/CalendarHeader.vue';
212
+ import CalendarViewSelect from './CalendarViewSelect.vue';
213
+ import CalendarGridWeek from './CalendarGridWeek.vue';
214
+ import CalendarDayCell from './CalendarDayCell.vue';
215
+ import CalendarCellPopover from './CalendarCellPopover.vue';
216
+ import CalendarEventDetails from './CalendarEventDetails.vue';
217
+ import { propsDef, emits, createCalendarGrid } from '../../use/calendarGrid';
218
+ import type { DateRangeCell } from '../../utils/date/range';
219
+ import type { Event } from '../../utils/calendar/event';
220
+
221
+ const emit = defineEmits(emits);
222
+ const props = defineProps(propsDef);
223
+ const slots = useSlots();
224
+ const {
225
+ containerRef,
226
+ cellPopoverRef,
227
+ dailyGridRef,
228
+ weeklyGridRef,
229
+ color,
230
+ displayMode,
231
+ locale,
232
+ isDaily,
233
+ isMonthly,
234
+ gridStyle,
235
+ transitionName,
236
+ resizing,
237
+ dragging,
238
+ page,
239
+ weeks,
240
+ days,
241
+ view,
242
+ eventsContext,
243
+ selectedEvents,
244
+ onKeydown,
245
+ onDayNumberClick,
246
+ onDayKeydown,
247
+ onGridMouseDown,
248
+ onGridTouchStart,
249
+ onGridTouchMove,
250
+ onGridTouchEnd,
251
+ onGridEscapeKeydown,
252
+ onTransitionBeforeEnter,
253
+ onTransitionAfterEnter,
254
+ } = createCalendarGrid(props, {
255
+ emit,
256
+ slots,
257
+ });
258
+
259
+ const dayCells = computed(() => {
260
+ const result: DateRangeCell<Event>[][] = [];
261
+ days.value.forEach(day => {
262
+ const cells = eventsContext.value.getCells(day);
263
+ result.push(cells.filter(cell => !cell.data.isWeekly));
264
+ });
265
+ return result;
266
+ });
267
+ </script>
268
+
269
+ <style lang="css">
270
+ .vc-grid-container {
271
+ --width: 1000px;
272
+ --gutter-left: 50px;
273
+ --gutter-right: 16px;
274
+ --gutter-top: 8px;
275
+ --gutter-bottom: 8px;
276
+
277
+ --grid-height: 500px;
278
+
279
+ width: var(--width);
280
+
281
+ .vc-grid-content {
282
+ position: relative;
283
+ overflow: hidden;
284
+ &.is-resizing,
285
+ .is-resizing {
286
+ cursor: ns-resize;
287
+ }
288
+ &.is-dragging,
289
+ .is-dragging {
290
+ cursor: grabbing;
291
+ }
292
+ }
293
+
294
+ &.vc-monthly {
295
+ .vc-grid-content {
296
+ margin-top: 0.75rem;
297
+ }
298
+ .vc-grid-week {
299
+ position: relative;
300
+ display: flex;
301
+ border-bottom: 1px solid var(--vc-gray-300);
302
+ &.week-position-1 {
303
+ border-top: 1px solid var(--vc-gray-300);
304
+ .vc-grid-week-cells {
305
+ top: 46px;
306
+ }
307
+ }
308
+ }
309
+ .vc-grid-week-cells {
310
+ position: absolute;
311
+ top: 28px;
312
+ bottom: 14px;
313
+ }
314
+ .vc-grid-day {
315
+ flex-grow: 1;
316
+ height: 125px;
317
+ border-right: 1px solid var(--vc-gray-300);
318
+ &.weekday-1 {
319
+ border-left: 1px solid var(--vc-gray-300);
320
+ }
321
+ }
322
+ .vc-grid-day-header {
323
+ position: relative;
324
+ display: flex;
325
+ flex-direction: column;
326
+ justify-content: center;
327
+ align-items: center;
328
+ font-size: var(--vc-text-xs);
329
+ margin: 4px 0;
330
+ .vc-grid-day-header-month {
331
+ position: absolute;
332
+ line-height: 1rem;
333
+ color: var(--vc-gray-500);
334
+ font-weight: var(--vc-font-medium);
335
+ left: 10px;
336
+ top: 3px;
337
+ }
338
+ .vc-grid-day-header-weekday {
339
+ margin-top: 3px;
340
+ line-height: 1rem;
341
+ color: var(--vc-gray-600);
342
+ font-weight: var(--vc-font-medium);
343
+ }
344
+ .vc-grid-day-header-day-number {
345
+ display: flex;
346
+ justify-content: center;
347
+ align-items: center;
348
+ font-weight: var(--vc-font-medium);
349
+ width: 24px;
350
+ height: 24px;
351
+ border-radius: var(--vc-rounded-full);
352
+ cursor: pointer;
353
+ user-select: none;
354
+ &:hover {
355
+ background-color: var(--vc-gray-200);
356
+ }
357
+ &:focus {
358
+ outline: 2px solid var(--vc-accent-400) !important;
359
+ }
360
+ }
361
+ }
362
+ .vc-grid-event {
363
+ margin: 0 2px;
364
+ }
365
+ }
366
+
367
+ &:not(.vc-monthly) {
368
+ .vc-grid-header-day {
369
+ position: relative;
370
+ height: 100%;
371
+ display: flex;
372
+ flex-direction: column;
373
+ align-items: center;
374
+ flex-grow: 1;
375
+ user-select: none;
376
+ .vc-grid-header-day-label {
377
+ display: flex;
378
+ justify-content: center;
379
+ color: var(--vc-gray-500);
380
+ font-size: 0.75rem;
381
+ font-weight: var(--vc-font-bold);
382
+ line-height: 1rem;
383
+ letter-spacing: 0.025em;
384
+ text-transform: uppercase;
385
+ }
386
+ .vc-grid-header-day-number {
387
+ display: flex;
388
+ justify-content: center;
389
+ align-items: center;
390
+ font-size: 1.25rem;
391
+ font-weight: 500;
392
+ line-height: 1.75rem;
393
+ margin: 0.25rem 0 0.25rem 0;
394
+ width: 2.25rem;
395
+ height: 2.25rem;
396
+ border-radius: var(--vc-rounded-full);
397
+ cursor: pointer;
398
+ &:hover {
399
+ background-color: var(--vc-gray-200);
400
+ }
401
+ &:focus {
402
+ outline: 2px solid var(--vc-accent-400) !important;
403
+ }
404
+ }
405
+ &.is-today {
406
+ & .vc-grid-header-day-label {
407
+ color: var(--vc-accent-600);
408
+ }
409
+ .vc-grid-header-day-number {
410
+ background-color: var(--vc-accent-100);
411
+ color: var(--vc-accent-600);
412
+ }
413
+ }
414
+ &.is-active {
415
+ .vc-grid-header-day-number {
416
+ background-color: var(--vc-accent-600);
417
+ color: var(--vc-white);
418
+ &:hover {
419
+ background-color: var(--vc-accent-600);
420
+ }
421
+ }
422
+ }
423
+ &.is-inactive {
424
+ opacity: 0.2;
425
+ .vc-grid-header-day-number {
426
+ }
427
+ }
428
+ }
429
+ .vc-grid-day {
430
+ position: relative;
431
+ flex-grow: 1;
432
+ height: 100%;
433
+ margin: 0 2px 0 0;
434
+ }
435
+ .vc-grid-event {
436
+ width: 100%;
437
+ }
438
+ }
439
+
440
+ .vc-grid-header-layout {
441
+ display: flex;
442
+ justify-content: space-between;
443
+ align-items: flex-start;
444
+ }
445
+
446
+ .vc-grid-header {
447
+ margin-top: 10px;
448
+ z-index: 2;
449
+ }
450
+
451
+ .vc-grid-header-days {
452
+ display: flex;
453
+ position: relative;
454
+ border-bottom: 1px solid var(--vc-gray-300);
455
+ padding-left: var(--gutter-left);
456
+ padding-right: var(--gutter-right);
457
+ }
458
+
459
+ .vc-grid-header-timezone {
460
+ display: flex;
461
+ flex-direction: column;
462
+ justify-content: flex-end;
463
+ align-items: center;
464
+ font-size: var(--vc-text-xs);
465
+ font-weight: var(--vc-font-normal);
466
+ color: var(--vc-gray-500);
467
+ position: absolute;
468
+ left: 0;
469
+ bottom: 0.25rem;
470
+ width: var(--gutter-left);
471
+ height: 100%;
472
+ user-select: none;
473
+ }
474
+
475
+ .vc-grid-event {
476
+ position: absolute;
477
+ min-height: 20px;
478
+ cursor: pointer;
479
+ border-radius: 5px;
480
+ border-width: 2px;
481
+ border-style: solid;
482
+ border-color: transparent;
483
+ font-size: var(--vc-text-xs);
484
+ color: var(--vc-gray-700);
485
+ font-weight: var(--vc-font-medium);
486
+ &:hover {
487
+ background-color: var(--vc-accent-100);
488
+ }
489
+ &.is-selected {
490
+ background-color: var(--vc-accent-200);
491
+ border-width: 2px;
492
+ }
493
+ &.is-resizing,
494
+ &.is-dragging {
495
+ pointer-events: none;
496
+ }
497
+ .vc-grid-event-start-date-label,
498
+ .vc-grid-event-date-label {
499
+ color: var(--vc-gray-500);
500
+ user-select: none;
501
+ }
502
+ .vc-grid-event-start-date-label {
503
+ display: none;
504
+ }
505
+ &.is-solid {
506
+ font-weight: var(--vc-font-semibold);
507
+ color: var(--vc-white);
508
+ background-color: var(--vc-accent-600);
509
+ border-color: var(--vc-accent-400);
510
+ &.is-selected,
511
+ &.is-resizing {
512
+ background-color: var(--vc-accent-700);
513
+ border-color: var(--vc-gray-100);
514
+ outline: 2px solid var(--vc-accent-400);
515
+ }
516
+ &:hover {
517
+ background-color: var(--vc-accent-700);
518
+ }
519
+ .vc-grid-event-date-label {
520
+ color: var(--vc-gray-300);
521
+ }
522
+ }
523
+ &.is-light {
524
+ font-weight: var(--vc-font-semibold);
525
+ color: var(--vc-gray-800);
526
+ background-color: var(--vc-accent-100);
527
+ border-color: var(--vc-accent-200);
528
+ &.is-selected,
529
+ &.is-resizing {
530
+ border-color: var(--vc-gray-100);
531
+ outline: 2px solid var(--vc-accent-400);
532
+ }
533
+ &:hover {
534
+ background-color: var(--vc-accent-200);
535
+ }
536
+ .vc-grid-event-date-label {
537
+ color: var(--vc-accent-700);
538
+ }
539
+ }
540
+ * {
541
+ touch-action: none;
542
+ }
543
+ &.is-2xs {
544
+ &.is-selected {
545
+ }
546
+ .vc-grid-event-content {
547
+ padding-top: 0px;
548
+ padding-bottom: 0px;
549
+ }
550
+ }
551
+ &.is-2xs,
552
+ &.is-xs {
553
+ line-height: var(--vc-leading-none);
554
+ .vc-grid-event-start-date-label {
555
+ display: block;
556
+ }
557
+ .vc-grid-event-date-label {
558
+ display: none;
559
+ }
560
+ .vc-grid-event-content {
561
+ display: flex;
562
+ align-items: center;
563
+ > * + * {
564
+ margin-left: 3px;
565
+ }
566
+ .vc-grid-event-summary {
567
+ flex-grow: 1;
568
+ }
569
+ }
570
+ }
571
+ &.is-2xs,
572
+ &.is-xs,
573
+ &.is-sm {
574
+ .vc-grid-event-content {
575
+ overflow-y: hidden;
576
+ }
577
+ }
578
+ &.is-dragging,
579
+ &.is-resizing,
580
+ &.is-selected {
581
+ z-index: 1;
582
+ }
583
+ .vc-grid-event-content-wrapper {
584
+ width: 100%;
585
+ height: 100%;
586
+ position: relative;
587
+ }
588
+ .vc-grid-event-content {
589
+ height: 100%;
590
+ padding: 2px 6px;
591
+ overflow-y: auto;
592
+ }
593
+ .vc-grid-event-indicator {
594
+ width: 8px;
595
+ height: 8px;
596
+ background-color: var(--vc-accent-700);
597
+ border-radius: var(--vc-rounded-full);
598
+ margin-right: 3px;
599
+ }
600
+ .vc-grid-event-summary {
601
+ user-select: none;
602
+ line-height: var(--leading-tight);
603
+ }
604
+ .vc-grid-event-resizer {
605
+ position: absolute;
606
+ &.is-horizontal {
607
+ top: 0px;
608
+ height: 100%;
609
+ width: 7px;
610
+ cursor: ew-resize;
611
+ &.is-start {
612
+ left: -5px;
613
+ }
614
+ &.is-end {
615
+ right: -5px;
616
+ }
617
+ }
618
+ &.is-vertical {
619
+ left: 0px;
620
+ width: 100%;
621
+ height: 7px;
622
+ cursor: ns-resize;
623
+ &.is-start {
624
+ top: -5px;
625
+ }
626
+ &.is-end {
627
+ bottom: -5px;
628
+ }
629
+ }
630
+ }
631
+ }
632
+
633
+ .vc-grid-week-cells {
634
+ display: grid;
635
+ grid-auto-rows: max-content;
636
+ grid-auto-flow: row dense;
637
+ width: 100%;
638
+ margin: 2px 0;
639
+ .vc-grid-event {
640
+ position: initial;
641
+ height: 20px;
642
+ margin-top: 2px;
643
+ }
644
+ }
645
+
646
+ .vc-grid-layout {
647
+ display: flex;
648
+ .vc-grid-layout-left {
649
+ flex-grow: 1;
650
+ }
651
+ .vc-grid-layout-right {
652
+ flex-shrink: 0;
653
+ }
654
+ }
655
+
656
+ .vc-grid-inset {
657
+ padding-left: var(--gutter-left);
658
+ padding-right: 4px;
659
+ padding-top: var(--gutter-top);
660
+ padding-bottom: var(--gutter-bottom);
661
+ height: var(--grid-height);
662
+ overflow-y: auto;
663
+ }
664
+
665
+ .vc-grid-day-content {
666
+ position: relative;
667
+ }
668
+
669
+ .vc-grid-layer {
670
+ position: absolute;
671
+ width: 100%;
672
+ top: 0px;
673
+ bottom: 0px;
674
+ padding-right: 4px;
675
+ &.vc-grid-hours,
676
+ &.vc-grid-lines {
677
+ display: flex;
678
+ flex-direction: column;
679
+ justify-content: space-between;
680
+ align-items: stretch;
681
+ }
682
+ &.vc-grid-hours {
683
+ top: -6px;
684
+ bottom: -6px;
685
+ }
686
+ }
687
+
688
+ .vc-events-layer {
689
+ display: flex;
690
+ justify-content: stretch;
691
+ }
692
+
693
+ .vc-grid-line-hour {
694
+ stroke: var(--vc-gray-300);
695
+ stroke-width: 1px;
696
+ height: 2px;
697
+ }
698
+
699
+ .vc-grid-label {
700
+ color: var(--vc-gray-700);
701
+ font-size: var(--vc-text-2xs);
702
+ left: 0px;
703
+ width: var(--gutter-left);
704
+ text-align: right;
705
+ padding-right: 0.5rem;
706
+ transform: translateX(-50px);
707
+ user-select: none;
708
+ &.vc-all-day {
709
+ color: var(--vc-gray-500);
710
+ position: absolute;
711
+ top: -6px;
712
+ }
713
+ }
714
+ }
715
+ </style>