vuetify 3.4.8 → 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 (200) hide show
  1. package/dist/_component-variables-labs.sass +1 -0
  2. package/dist/json/attributes.json +252 -0
  3. package/dist/json/importMap-labs.json +24 -0
  4. package/dist/json/importMap.json +120 -120
  5. package/dist/json/tags.json +93 -0
  6. package/dist/json/web-types.json +834 -1
  7. package/dist/vuetify-labs.css +2242 -1895
  8. package/dist/vuetify-labs.d.ts +1618 -1
  9. package/dist/vuetify-labs.esm.js +608 -11
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +608 -11
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +781 -781
  14. package/dist/vuetify.d.ts +73 -40
  15. package/dist/vuetify.esm.js +117 -11
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +117 -11
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +132 -114
  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/VDatePicker/VDatePicker.mjs +4 -1
  27. package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  28. package/lib/components/VDatePicker/VDatePickerMonth.mjs +1 -1
  29. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  30. package/lib/composables/calendar.mjs +18 -3
  31. package/lib/composables/calendar.mjs.map +1 -1
  32. package/lib/composables/date/DateAdapter.mjs.map +1 -1
  33. package/lib/composables/date/adapters/vuetify.mjs +89 -2
  34. package/lib/composables/date/adapters/vuetify.mjs.map +1 -1
  35. package/lib/composables/date/date.mjs +4 -0
  36. package/lib/composables/date/date.mjs.map +1 -1
  37. package/lib/entry-bundler.mjs +1 -1
  38. package/lib/framework.mjs +1 -1
  39. package/lib/index.d.mts +73 -40
  40. package/lib/labs/VCalendar/VCalendar.css +220 -0
  41. package/lib/labs/VCalendar/VCalendar.mjs +128 -0
  42. package/lib/labs/VCalendar/VCalendar.mjs.map +1 -0
  43. package/lib/labs/VCalendar/VCalendar.sass +168 -0
  44. package/lib/labs/VCalendar/VCalendarDay.css +10 -0
  45. package/lib/labs/VCalendar/VCalendarDay.mjs +47 -0
  46. package/lib/labs/VCalendar/VCalendarDay.mjs.map +1 -0
  47. package/lib/labs/VCalendar/VCalendarDay.sass +9 -0
  48. package/lib/labs/VCalendar/VCalendarEvent.mjs +30 -0
  49. package/lib/labs/VCalendar/VCalendarEvent.mjs.map +1 -0
  50. package/lib/labs/VCalendar/VCalendarHeader.css +14 -0
  51. package/lib/labs/VCalendar/VCalendarHeader.mjs +76 -0
  52. package/lib/labs/VCalendar/VCalendarHeader.mjs.map +1 -0
  53. package/lib/labs/VCalendar/VCalendarHeader.sass +13 -0
  54. package/lib/labs/VCalendar/VCalendarInterval.css +42 -0
  55. package/lib/labs/VCalendar/VCalendarInterval.mjs +113 -0
  56. package/lib/labs/VCalendar/VCalendarInterval.mjs.map +1 -0
  57. package/lib/labs/VCalendar/VCalendarInterval.sass +39 -0
  58. package/lib/labs/VCalendar/VCalendarIntervalEvent.mjs +76 -0
  59. package/lib/labs/VCalendar/VCalendarIntervalEvent.mjs.map +1 -0
  60. package/lib/labs/VCalendar/VCalendarMonthDay.css +61 -0
  61. package/lib/labs/VCalendar/VCalendarMonthDay.mjs +64 -0
  62. package/lib/labs/VCalendar/VCalendarMonthDay.mjs.map +1 -0
  63. package/lib/labs/VCalendar/VCalendarMonthDay.sass +65 -0
  64. package/lib/{components → labs}/VCalendar/_variables.scss +14 -6
  65. package/lib/labs/VCalendar/index.d.mts +1592 -0
  66. package/lib/labs/VCalendar/index.mjs +7 -0
  67. package/lib/labs/VCalendar/index.mjs.map +1 -0
  68. package/lib/labs/components.d.mts +1586 -2
  69. package/lib/labs/components.mjs +1 -0
  70. package/lib/labs/components.mjs.map +1 -1
  71. package/lib/locale/af.mjs +2 -1
  72. package/lib/locale/af.mjs.map +1 -1
  73. package/lib/locale/ar.mjs +2 -1
  74. package/lib/locale/ar.mjs.map +1 -1
  75. package/lib/locale/az.mjs +2 -1
  76. package/lib/locale/az.mjs.map +1 -1
  77. package/lib/locale/bg.mjs +2 -1
  78. package/lib/locale/bg.mjs.map +1 -1
  79. package/lib/locale/ca.mjs +2 -1
  80. package/lib/locale/ca.mjs.map +1 -1
  81. package/lib/locale/ckb.mjs +2 -1
  82. package/lib/locale/ckb.mjs.map +1 -1
  83. package/lib/locale/cs.mjs +2 -1
  84. package/lib/locale/cs.mjs.map +1 -1
  85. package/lib/locale/da.mjs +2 -1
  86. package/lib/locale/da.mjs.map +1 -1
  87. package/lib/locale/de.mjs +2 -1
  88. package/lib/locale/de.mjs.map +1 -1
  89. package/lib/locale/el.mjs +2 -1
  90. package/lib/locale/el.mjs.map +1 -1
  91. package/lib/locale/en.mjs +2 -1
  92. package/lib/locale/en.mjs.map +1 -1
  93. package/lib/locale/es.mjs +2 -1
  94. package/lib/locale/es.mjs.map +1 -1
  95. package/lib/locale/et.mjs +2 -1
  96. package/lib/locale/et.mjs.map +1 -1
  97. package/lib/locale/fa.mjs +2 -1
  98. package/lib/locale/fa.mjs.map +1 -1
  99. package/lib/locale/fi.mjs +2 -1
  100. package/lib/locale/fi.mjs.map +1 -1
  101. package/lib/locale/fr.mjs +2 -1
  102. package/lib/locale/fr.mjs.map +1 -1
  103. package/lib/locale/he.mjs +2 -1
  104. package/lib/locale/he.mjs.map +1 -1
  105. package/lib/locale/hr.mjs +2 -1
  106. package/lib/locale/hr.mjs.map +1 -1
  107. package/lib/locale/hu.mjs +2 -1
  108. package/lib/locale/hu.mjs.map +1 -1
  109. package/lib/locale/id.mjs +2 -1
  110. package/lib/locale/id.mjs.map +1 -1
  111. package/lib/locale/index.d.mts +42 -0
  112. package/lib/locale/it.mjs +2 -1
  113. package/lib/locale/it.mjs.map +1 -1
  114. package/lib/locale/ja.mjs +2 -1
  115. package/lib/locale/ja.mjs.map +1 -1
  116. package/lib/locale/ko.mjs +2 -1
  117. package/lib/locale/ko.mjs.map +1 -1
  118. package/lib/locale/lt.mjs +2 -1
  119. package/lib/locale/lt.mjs.map +1 -1
  120. package/lib/locale/lv.mjs +2 -1
  121. package/lib/locale/lv.mjs.map +1 -1
  122. package/lib/locale/nl.mjs +2 -1
  123. package/lib/locale/nl.mjs.map +1 -1
  124. package/lib/locale/no.mjs +2 -1
  125. package/lib/locale/no.mjs.map +1 -1
  126. package/lib/locale/pl.mjs +2 -1
  127. package/lib/locale/pl.mjs.map +1 -1
  128. package/lib/locale/pt.mjs +2 -1
  129. package/lib/locale/pt.mjs.map +1 -1
  130. package/lib/locale/ro.mjs +2 -1
  131. package/lib/locale/ro.mjs.map +1 -1
  132. package/lib/locale/ru.mjs +2 -1
  133. package/lib/locale/ru.mjs.map +1 -1
  134. package/lib/locale/sk.mjs +2 -1
  135. package/lib/locale/sk.mjs.map +1 -1
  136. package/lib/locale/sl.mjs +2 -1
  137. package/lib/locale/sl.mjs.map +1 -1
  138. package/lib/locale/sr-Cyrl.mjs +2 -1
  139. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  140. package/lib/locale/sr-Latn.mjs +2 -1
  141. package/lib/locale/sr-Latn.mjs.map +1 -1
  142. package/lib/locale/sv.mjs +2 -1
  143. package/lib/locale/sv.mjs.map +1 -1
  144. package/lib/locale/th.mjs +2 -1
  145. package/lib/locale/th.mjs.map +1 -1
  146. package/lib/locale/tr.mjs +2 -1
  147. package/lib/locale/tr.mjs.map +1 -1
  148. package/lib/locale/uk.mjs +2 -1
  149. package/lib/locale/uk.mjs.map +1 -1
  150. package/lib/locale/vi.mjs +2 -1
  151. package/lib/locale/vi.mjs.map +1 -1
  152. package/lib/locale/zh-Hans.mjs +2 -1
  153. package/lib/locale/zh-Hans.mjs.map +1 -1
  154. package/lib/locale/zh-Hant.mjs +2 -1
  155. package/lib/locale/zh-Hant.mjs.map +1 -1
  156. package/lib/util/helpers.mjs +6 -0
  157. package/lib/util/helpers.mjs.map +1 -1
  158. package/package.json +2 -2
  159. package/lib/components/VCalendar/VCalendar.mjs +0 -352
  160. package/lib/components/VCalendar/VCalendar.mjs.map +0 -1
  161. package/lib/components/VCalendar/VCalendarCategory.mjs +0 -124
  162. package/lib/components/VCalendar/VCalendarCategory.mjs.map +0 -1
  163. package/lib/components/VCalendar/VCalendarCategory.sass +0 -100
  164. package/lib/components/VCalendar/VCalendarDaily.mjs +0 -239
  165. package/lib/components/VCalendar/VCalendarDaily.mjs.map +0 -1
  166. package/lib/components/VCalendar/VCalendarDaily.sass +0 -140
  167. package/lib/components/VCalendar/VCalendarMonthly.mjs +0 -25
  168. package/lib/components/VCalendar/VCalendarMonthly.mjs.map +0 -1
  169. package/lib/components/VCalendar/VCalendarWeekly.mjs +0 -193
  170. package/lib/components/VCalendar/VCalendarWeekly.mjs.map +0 -1
  171. package/lib/components/VCalendar/VCalendarWeekly.sass +0 -118
  172. package/lib/components/VCalendar/index.mjs +0 -16
  173. package/lib/components/VCalendar/index.mjs.map +0 -1
  174. package/lib/components/VCalendar/mixins/calendar-base.mjs +0 -89
  175. package/lib/components/VCalendar/mixins/calendar-base.mjs.map +0 -1
  176. package/lib/components/VCalendar/mixins/calendar-with-events.mjs +0 -416
  177. package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +0 -1
  178. package/lib/components/VCalendar/mixins/calendar-with-events.sass +0 -67
  179. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs +0 -135
  180. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs.map +0 -1
  181. package/lib/components/VCalendar/mixins/mouse.mjs +0 -85
  182. package/lib/components/VCalendar/mixins/mouse.mjs.map +0 -1
  183. package/lib/components/VCalendar/mixins/times.mjs +0 -65
  184. package/lib/components/VCalendar/mixins/times.mjs.map +0 -1
  185. package/lib/components/VCalendar/modes/column.mjs +0 -18
  186. package/lib/components/VCalendar/modes/column.mjs.map +0 -1
  187. package/lib/components/VCalendar/modes/common.mjs +0 -112
  188. package/lib/components/VCalendar/modes/common.mjs.map +0 -1
  189. package/lib/components/VCalendar/modes/index.mjs +0 -9
  190. package/lib/components/VCalendar/modes/index.mjs.map +0 -1
  191. package/lib/components/VCalendar/modes/stack.mjs +0 -204
  192. package/lib/components/VCalendar/modes/stack.mjs.map +0 -1
  193. package/lib/components/VCalendar/util/events.mjs +0 -44
  194. package/lib/components/VCalendar/util/events.mjs.map +0 -1
  195. package/lib/components/VCalendar/util/parser.mjs +0 -21
  196. package/lib/components/VCalendar/util/parser.mjs.map +0 -1
  197. package/lib/components/VCalendar/util/props.mjs +0 -248
  198. package/lib/components/VCalendar/util/props.mjs.map +0 -1
  199. package/lib/components/VCalendar/util/timestamp.mjs +0 -407
  200. package/lib/components/VCalendar/util/timestamp.mjs.map +0 -1
@@ -0,0 +1,14 @@
1
+ .v-calendar-header {
2
+ align-items: center;
3
+ display: flex;
4
+ min-height: 64px;
5
+ }
6
+
7
+ .v-calendar-header__today {
8
+ margin-inline-end: 24px;
9
+ }
10
+
11
+ .v-calendar-header__title {
12
+ font-size: 1.5rem;
13
+ margin-inline-start: 24px;
14
+ }
@@ -0,0 +1,76 @@
1
+ import { createVNode as _createVNode } from "vue";
2
+ // Styles
3
+ import "./VCalendarHeader.css";
4
+
5
+ // Components
6
+ import { VBtn } from "../../components/VBtn/index.mjs"; // Composables
7
+ import { useLocale } from "../../composables/locale.mjs"; // Utilities
8
+ import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
9
+ export const makeVCalendarHeaderProps = propsFactory({
10
+ nextIcon: {
11
+ type: String,
12
+ default: '$next'
13
+ },
14
+ prevIcon: {
15
+ type: String,
16
+ default: '$prev'
17
+ },
18
+ title: String,
19
+ text: {
20
+ type: String,
21
+ default: '$vuetify.calendar.today'
22
+ },
23
+ viewMode: {
24
+ type: String,
25
+ default: 'month'
26
+ }
27
+ }, 'VCalendarHeader');
28
+ export const VCalendarHeader = genericComponent()({
29
+ name: 'VCalendarHeader',
30
+ props: makeVCalendarHeaderProps(),
31
+ emits: {
32
+ 'click:next': () => true,
33
+ 'click:prev': () => true,
34
+ 'click:toToday': () => true
35
+ },
36
+ setup(props, _ref) {
37
+ let {
38
+ emit
39
+ } = _ref;
40
+ const {
41
+ t
42
+ } = useLocale();
43
+ function prev() {
44
+ emit('click:prev');
45
+ }
46
+ function next() {
47
+ emit('click:next');
48
+ }
49
+ function toToday() {
50
+ emit('click:toToday');
51
+ }
52
+ useRender(() => _createVNode("div", {
53
+ "class": "v-calendar-header"
54
+ }, [props.text && _createVNode(VBtn, {
55
+ "key": "today",
56
+ "class": "v-calendar-header__today",
57
+ "text": t(props.text),
58
+ "variant": "outlined",
59
+ "onClick": toToday
60
+ }, null), _createVNode(VBtn, {
61
+ "density": "comfortable",
62
+ "icon": props.prevIcon,
63
+ "variant": "text",
64
+ "onClick": prev
65
+ }, null), _createVNode(VBtn, {
66
+ "density": "comfortable",
67
+ "icon": props.nextIcon,
68
+ "variant": "text",
69
+ "onClick": next
70
+ }, null), _createVNode("div", {
71
+ "class": "v-calendar-header__title"
72
+ }, [props.title])]));
73
+ return {};
74
+ }
75
+ });
76
+ //# sourceMappingURL=VCalendarHeader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VCalendarHeader.mjs","names":["VBtn","useLocale","genericComponent","propsFactory","useRender","makeVCalendarHeaderProps","nextIcon","type","String","default","prevIcon","title","text","viewMode","VCalendarHeader","name","props","emits","click:next","click:prev","click:toToday","setup","_ref","emit","t","prev","next","toToday","_createVNode"],"sources":["../../../src/labs/VCalendar/VCalendarHeader.tsx"],"sourcesContent":["// Styles\nimport './VCalendarHeader.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\n\n// Composables\nimport { useLocale } from '@/composables/locale'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport const makeVCalendarHeaderProps = propsFactory({\n nextIcon: {\n type: String,\n default: '$next',\n },\n prevIcon: {\n type: String,\n default: '$prev',\n },\n title: String,\n text: {\n type: String,\n default: '$vuetify.calendar.today',\n },\n viewMode: {\n type: String as PropType<'month' | 'week' | 'day'>,\n default: 'month',\n },\n}, 'VCalendarHeader')\n\nexport const VCalendarHeader = genericComponent()({\n name: 'VCalendarHeader',\n\n props: makeVCalendarHeaderProps(),\n\n emits: {\n 'click:next': () => true,\n 'click:prev': () => true,\n 'click:toToday': () => true,\n },\n\n setup (props, { emit }) {\n const { t } = useLocale()\n\n function prev () {\n emit('click:prev')\n }\n\n function next () {\n emit('click:next')\n }\n\n function toToday () {\n emit('click:toToday')\n }\n\n useRender(() => (\n <div class=\"v-calendar-header\">\n { props.text && (\n <VBtn\n key=\"today\"\n class=\"v-calendar-header__today\"\n text={ t(props.text) }\n variant=\"outlined\"\n onClick={ toToday }\n />\n )}\n\n <VBtn\n density=\"comfortable\"\n icon={ props.prevIcon }\n variant=\"text\"\n onClick={ prev }\n />\n\n <VBtn\n density=\"comfortable\"\n icon={ props.nextIcon }\n variant=\"text\"\n onClick={ next }\n />\n\n <div class=\"v-calendar-header__title\">{ props.title }</div>\n </div>\n ))\n\n return {}\n },\n})\n\nexport type VCalendarHeader = InstanceType<typeof VCalendarHeader>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI,2CAEb;AAAA,SACSC,SAAS,wCAElB;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAGA,OAAO,MAAMC,wBAAwB,GAAGF,YAAY,CAAC;EACnDG,QAAQ,EAAE;IACRC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDC,QAAQ,EAAE;IACRH,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDE,KAAK,EAAEH,MAAM;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AK,IAEtD,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ @import './_variables.scss'
2
+
3
+ .v-calendar-header
4
+ align-items: $calendar-header-align
5
+ display: $calendar-header-display
6
+ min-height: $calendar-header-min-height
7
+
8
+ .v-calendar-header__today
9
+ margin-inline-end: $calendar-header-today-margin-end
10
+
11
+ .v-calendar-header__title
12
+ font-size: $calendar-header-title-font-size
13
+ margin-inline-start: $calendar-header-title-margin-start
@@ -0,0 +1,42 @@
1
+ .v-calendar-day__row-with-label {
2
+ display: grid;
3
+ grid-template-columns: 48px 8px 1fr;
4
+ border-right: thin solid #e0e0e0;
5
+ }
6
+ .v-calendar-day__row-with-label .v-calendar-day__row-hairline {
7
+ position: relative;
8
+ border-right: thin solid #e0e0e0;
9
+ }
10
+ .v-calendar-day__row-with-label .v-calendar-day__row-hairline:after {
11
+ content: "";
12
+ border-bottom: thin solid #e0e0e0;
13
+ position: absolute;
14
+ width: 100%;
15
+ margin-top: -1px;
16
+ z-index: 3;
17
+ pointer-events: none;
18
+ }
19
+ .v-calendar-day__row-with-label .v-calendar-day__row-label {
20
+ font-size: 10px;
21
+ text-align: center;
22
+ position: relative;
23
+ top: -8px;
24
+ }
25
+ .v-calendar-day__row-with-label .v-calendar-day__row-content {
26
+ border-bottom: thin solid #e0e0e0;
27
+ }
28
+ .v-calendar-day__row-with-label .v-calendar-day__row-content.v-calendar-day__row-content-through {
29
+ border-bottom: none;
30
+ }
31
+
32
+ .v-calendar-day__row-without-label {
33
+ display: grid;
34
+ grid-template-columns: 1fr;
35
+ border-right: thin solid #e0e0e0;
36
+ }
37
+ .v-calendar-day__row-without-label .v-calendar-day__row-content {
38
+ border-bottom: thin solid #e0e0e0;
39
+ }
40
+ .v-calendar-day__row-without-label .v-calendar-day__row-content.v-calendar-day__row-content-through {
41
+ border-bottom: none;
42
+ }
@@ -0,0 +1,113 @@
1
+ import { createVNode as _createVNode } from "vue";
2
+ // Styles
3
+ import "./VCalendarInterval.css";
4
+
5
+ // Components
6
+ import { VCalendarIntervalEvent } from "./VCalendarIntervalEvent.mjs"; // Composables
7
+ import { useDate } from "../../composables/date/index.mjs"; // Utilities
8
+ import { computed } from 'vue';
9
+ import { convertToUnit, genericComponent, propsFactory, useRender } from "../../util/index.mjs";
10
+ export const makeVCalendarIntervalProps = propsFactory({
11
+ day: {
12
+ type: Object,
13
+ default: () => ({})
14
+ },
15
+ dayIndex: Number,
16
+ events: Array,
17
+ intervalDivisions: {
18
+ type: Number,
19
+ default: 2
20
+ },
21
+ intervalDuration: {
22
+ type: Number,
23
+ default: 60
24
+ },
25
+ intervalHeight: {
26
+ type: Number,
27
+ default: 48
28
+ },
29
+ intervalFormat: {
30
+ type: [String, Function],
31
+ default: 'fullTime12h'
32
+ },
33
+ intervalStart: {
34
+ type: Number,
35
+ default: 0
36
+ }
37
+ }, 'VCalendarInterval');
38
+ export const VCalendarInterval = genericComponent()({
39
+ name: 'VCalendarInterval',
40
+ props: {
41
+ index: {
42
+ type: Number,
43
+ required: true
44
+ },
45
+ ...makeVCalendarIntervalProps()
46
+ },
47
+ setup(props, _ref) {
48
+ let {
49
+ emit,
50
+ slots
51
+ } = _ref;
52
+ const adapter = useDate();
53
+ const interval = computed(() => {
54
+ const start = adapter.addMinutes(adapter.startOfDay(props.day.date), props.intervalDuration * (props.index + props.intervalStart));
55
+ const end = adapter.addMinutes(adapter.startOfDay(props.day.date), props.intervalDuration * (props.index + props.intervalStart + 1) - 1);
56
+ return {
57
+ ...props.day,
58
+ label: adapter.format(start, 'fullTime24h'),
59
+ start,
60
+ end,
61
+ events: props.events ? props.events.filter(e => !e.allDay && (adapter.isEqual(start, e.start) || adapter.isWithinRange(e.start, [start, end]) || adapter.isWithinRange(start, [e.start, e.end]) || adapter.isEqual(end, e.end))).map(e => {
62
+ return {
63
+ ...e,
64
+ first: adapter.isEqual(start, e.start) || adapter.isWithinRange(e.start, [start, end]),
65
+ last: adapter.isEqual(end, e.end) || adapter.isWithinRange(e.end, [start, end])
66
+ };
67
+ }) : []
68
+ };
69
+ });
70
+ useRender(() => {
71
+ return props.dayIndex === 0 ? _createVNode("div", {
72
+ "class": "v-calendar-day__row-with-label",
73
+ "style": `height: ${convertToUnit(props.intervalHeight)}`
74
+ }, [_createVNode("div", {
75
+ "class": "v-calendar-day__row-label"
76
+ }, [_createVNode("slot", {
77
+ "name": "intervalFormat",
78
+ "interval": interval.value
79
+ }, [props.index ? props.intervalFormat ? typeof props.intervalFormat === 'string' ? adapter.format(interval.value.start, 'hours12h') : props.intervalFormat(interval.value) : interval.value.label : ''])]), _createVNode("div", {
80
+ "class": "v-calendar-day__row-hairline"
81
+ }, null), _createVNode("div", {
82
+ "class": ['v-calendar-day__row-content', interval.value.events.some(e => !e.last) ? 'v-calendar-day__row-content-through' : '']
83
+ }, [_createVNode("slot", {
84
+ "name": "intervalBody",
85
+ "interval": interval.value
86
+ }, [interval.value.events?.map(event => _createVNode(VCalendarIntervalEvent, {
87
+ "event": event,
88
+ "interval": interval.value,
89
+ "intervalDivisions": props.intervalDivisions,
90
+ "intervalDuration": props.intervalDuration,
91
+ "intervalHeight": props.intervalHeight
92
+ }, null))])])]) : _createVNode("div", {
93
+ "class": "v-calendar-day__row-without-label",
94
+ "style": `height: ${convertToUnit(props.intervalHeight)}`
95
+ }, [_createVNode("div", {
96
+ "class": ['v-calendar-day__row-content', interval.value.events.some(e => !e.last) ? 'v-calendar-day__row-content-through' : '']
97
+ }, [_createVNode("slot", {
98
+ "name": "intervalBody",
99
+ "interval": interval.value
100
+ }, [interval.value.events?.filter(event => !event.allDay).map(event => _createVNode(VCalendarIntervalEvent, {
101
+ "event": event,
102
+ "interval": interval.value,
103
+ "intervalDivisions": props.intervalDivisions,
104
+ "intervalDuration": props.intervalDuration,
105
+ "intervalHeight": props.intervalHeight
106
+ }, null))])])]);
107
+ });
108
+ return {
109
+ interval
110
+ };
111
+ }
112
+ });
113
+ //# sourceMappingURL=VCalendarInterval.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VCalendarInterval.mjs","names":["VCalendarIntervalEvent","useDate","computed","convertToUnit","genericComponent","propsFactory","useRender","makeVCalendarIntervalProps","day","type","Object","default","dayIndex","Number","events","Array","intervalDivisions","intervalDuration","intervalHeight","intervalFormat","String","Function","intervalStart","VCalendarInterval","name","props","index","required","setup","_ref","emit","slots","adapter","interval","start","addMinutes","startOfDay","date","end","label","format","filter","e","allDay","isEqual","isWithinRange","map","first","last","_createVNode","value","some","event"],"sources":["../../../src/labs/VCalendar/VCalendarInterval.tsx"],"sourcesContent":["// Styles\nimport './VCalendarInterval.sass'\n\n// Components\nimport { VCalendarIntervalEvent } from './VCalendarIntervalEvent'\n\n// Composables\nimport { useDate } from '@/composables/date'\n\n// Utilities\nimport { computed } from 'vue'\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVCalendarIntervalProps = propsFactory({\n day: {\n type: Object,\n default: () => ({}),\n },\n dayIndex: Number,\n events: Array<any>,\n intervalDivisions: {\n type: Number,\n default: 2,\n },\n intervalDuration: {\n type: Number,\n default: 60,\n },\n intervalHeight: {\n type: Number,\n default: 48,\n },\n intervalFormat: {\n type: [String, Function],\n default: 'fullTime12h',\n },\n intervalStart: {\n type: Number,\n default: 0,\n },\n}, 'VCalendarInterval')\n\nexport const VCalendarInterval = genericComponent()({\n name: 'VCalendarInterval',\n\n props: {\n index: {\n type: Number,\n required: true,\n },\n\n ...makeVCalendarIntervalProps(),\n },\n\n setup (props, { emit, slots }) {\n const adapter = useDate()\n const interval = computed(() => {\n const start = adapter.addMinutes(adapter.startOfDay(props.day.date), (props.intervalDuration * (props.index + props.intervalStart)))\n const end = adapter.addMinutes(\n adapter.startOfDay(props.day.date),\n (props.intervalDuration * (props.index + props.intervalStart + 1)) - 1\n )\n return {\n ...props.day,\n label: adapter.format(start, 'fullTime24h'),\n start,\n end,\n events: props.events\n ? props.events\n .filter(e => !e.allDay &&\n (adapter.isEqual(start, e.start) ||\n adapter.isWithinRange(e.start, [start, end]) ||\n adapter.isWithinRange(start, [e.start, e.end]) ||\n adapter.isEqual(end, e.end))\n )\n .map(e => {\n return {\n ...e,\n first: adapter.isEqual(start, e.start) || adapter.isWithinRange(e.start, [start, end]),\n last: adapter.isEqual(end, e.end) || adapter.isWithinRange(e.end, [start, end]),\n }\n })\n : [],\n }\n })\n\n useRender(() => {\n return (\n props.dayIndex === 0 ? (\n <div class=\"v-calendar-day__row-with-label\" style={ `height: ${convertToUnit(props.intervalHeight)}` }>\n <div class=\"v-calendar-day__row-label\">\n <slot name=\"intervalFormat\" interval={ interval.value }>\n { props.index\n ? props.intervalFormat\n ? typeof props.intervalFormat === 'string'\n ? adapter.format(interval.value.start, 'hours12h')\n : props.intervalFormat(interval.value)\n : interval.value.label\n : ''\n }\n </slot>\n </div>\n <div class=\"v-calendar-day__row-hairline\"></div>\n <div class={['v-calendar-day__row-content', interval.value.events.some(e => !e.last)\n ? 'v-calendar-day__row-content-through'\n : '']}\n >\n <slot name=\"intervalBody\" interval={ interval.value }>\n { interval.value.events?.map(event => (\n <VCalendarIntervalEvent\n event={ event }\n interval={ interval.value }\n intervalDivisions={ props.intervalDivisions }\n intervalDuration={ props.intervalDuration }\n intervalHeight={ props.intervalHeight }\n />\n ))}\n </slot>\n </div>\n </div>\n ) : (\n <div class=\"v-calendar-day__row-without-label\" style={ `height: ${convertToUnit(props.intervalHeight)}` }>\n <div class={['v-calendar-day__row-content', interval.value.events.some(e => !e.last)\n ? 'v-calendar-day__row-content-through'\n : '']}\n >\n <slot name=\"intervalBody\" interval={ interval.value }>\n { interval.value.events?.filter(event => !event.allDay).map(event => (\n <VCalendarIntervalEvent\n event={ event }\n interval={ interval.value }\n intervalDivisions={ props.intervalDivisions }\n intervalDuration={ props.intervalDuration }\n intervalHeight={ props.intervalHeight }\n />\n ))}\n </slot>\n </div>\n </div>\n )\n )\n })\n\n return { interval }\n },\n})\n\nexport type VCalendarInterval = InstanceType<type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,CAACiB,KAAK;QAAA,qBACLzB,KAAK,CAACT,iBAAiB;QAAA,oBACxBS,KAAK,CAACR,gBAAgB;QAAA,kBACxBQ,KAAK,CAACP;MAAc,QAExC,CAAC,SAAA+B,YAAA;QAAA;QAAA,SAK8C,WAAU9C,aAAa,CAACsB,KAAK,CAACP,cAAc,CAAE;MAAC,IAAA+B,YAAA;QAAA,SACzF,CAAC,6BAA6B,EAAEhB,QAAQ,CAACiB,KAAK,CAACpC,MAAM,CAACqC,IAAI,CAACT,CAAC,IAAI,CAACA,CAAC,CAACM,IAAI,CAAC,GAChF,qCAAqC,GACrC,EAAE;MAAC,IAAAC,YAAA;QAAA;QAAA,YAEgChB,QAAQ,CAACiB;MAAK,IAC7CjB,QAAQ,CAACiB,KAAK,CAACpC,MAAM,EAAE2B,MAAM,CAACW,KAAK,IAAI,CAACA,KAAK,CAACT,MAAM,CAAC,CAACG,GAAG,CAACM,KAAK,IAAAH,YAAA,CAAAjD,sBAAA;QAAA,SAErDoD,KAAK;QAAA,YACFnB,QAAQ,CAACiB,KAAK;QAAA,qBACLzB,KAAK,CAACT,iBAAiB;QAAA,oBACxBS,KAAK,CAACR,gBAAgB;QAAA,kBACxBQ,KAAK,CAACP;MAAc,QAExC,CAAC,MAIX;IAEL,CAAC,CAAC;IAEF,OAAO;MAAEe;IAAS,CAAC;EACrB;AACF,CAAC,CAAC"}
@@ -0,0 +1,39 @@
1
+ @import './_variables.scss'
2
+
3
+ .v-calendar-day__row-with-label
4
+ display: grid
5
+ grid-template-columns: 48px 8px 1fr
6
+ border-right: $calendar-line-width solid $calendar-line-color
7
+
8
+ .v-calendar-day__row-hairline
9
+ position: relative
10
+ border-right: $calendar-line-width solid $calendar-line-color
11
+ &:after
12
+ content: ''
13
+ border-bottom: $calendar-line-width solid $calendar-line-color
14
+ position: absolute
15
+ width: 100%
16
+ margin-top: -1px
17
+ z-index: 3
18
+ pointer-events: none
19
+
20
+ .v-calendar-day__row-label
21
+ font-size: 10px
22
+ text-align: center
23
+ position: relative
24
+ top: -8px
25
+ .v-calendar-day__row-content
26
+ border-bottom: $calendar-line-width solid $calendar-line-color
27
+ &.v-calendar-day__row-content-through
28
+ border-bottom: none
29
+
30
+ .v-calendar-day__row-without-label
31
+ display: grid
32
+ grid-template-columns: 1fr
33
+ border-right: $calendar-line-width solid $calendar-line-color
34
+
35
+ .v-calendar-day__row-content
36
+ border-bottom: $calendar-line-width solid $calendar-line-color
37
+
38
+ &.v-calendar-day__row-content-through
39
+ border-bottom: none
@@ -0,0 +1,76 @@
1
+ import { createVNode as _createVNode } from "vue";
2
+ // Components
3
+ import { VSheet } from "../../components/VSheet/index.mjs"; // Composables
4
+ import { useDate } from "../../composables/date/index.mjs"; // Utilities
5
+ import { convertToUnit, genericComponent, propsFactory, useRender } from "../../util/index.mjs";
6
+ export const makeVCalendarIntervalEventProps = propsFactory({
7
+ allDay: Boolean,
8
+ interval: Object,
9
+ intervalDivisions: {
10
+ type: Number,
11
+ required: true
12
+ },
13
+ intervalDuration: {
14
+ type: Number,
15
+ required: true
16
+ },
17
+ intervalHeight: {
18
+ type: Number,
19
+ required: true
20
+ },
21
+ event: Object
22
+ }, 'VCalendarIntervalEvent');
23
+ export const VCalendarIntervalEvent = genericComponent()({
24
+ name: 'VCalendarIntervalEvent',
25
+ props: makeVCalendarIntervalEventProps(),
26
+ setup(props) {
27
+ const adapter = useDate();
28
+ const calcHeight = () => {
29
+ if (!props.event?.first && !props.event?.last || adapter.isEqual(props.event?.start, props.interval?.start)) {
30
+ return {
31
+ height: '100%',
32
+ margin: convertToUnit(0)
33
+ };
34
+ } else {
35
+ const {
36
+ height,
37
+ margin
38
+ } = Array.from({
39
+ length: props.intervalDivisions
40
+ }, x => x * (props.intervalDuration / props.intervalDivisions)).reduce((total, div, index) => {
41
+ if (adapter.isBefore(adapter.addMinutes(props.interval?.start, div), props.event?.start)) {
42
+ return {
43
+ height: convertToUnit(props.intervalHeight / props.intervalDivisions * index),
44
+ margin: convertToUnit(props.intervalHeight / props.intervalDivisions * index)
45
+ };
46
+ }
47
+ return {
48
+ height: total.height,
49
+ margin: total.margin
50
+ };
51
+ }, {
52
+ height: '',
53
+ margin: ''
54
+ });
55
+ return {
56
+ height,
57
+ margin
58
+ };
59
+ }
60
+ };
61
+ useRender(() => {
62
+ return _createVNode(VSheet, {
63
+ "height": calcHeight().height,
64
+ "density": "comfortable",
65
+ "style": `width: 100%; margin-top: ${calcHeight().margin}`,
66
+ "class": "align-center pa-1",
67
+ "color": props.event?.color ?? undefined,
68
+ "rounded": props.event?.first && props.event?.last ? true : props.event?.first ? 't' : props.event?.last ? 'b' : false
69
+ }, {
70
+ default: () => [props.event?.first ? props.event?.title : '']
71
+ });
72
+ });
73
+ return {};
74
+ }
75
+ });
76
+ //# sourceMappingURL=VCalendarIntervalEvent.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VCalendarIntervalEvent.mjs","names":["VSheet","useDate","convertToUnit","genericComponent","propsFactory","useRender","makeVCalendarIntervalEventProps","allDay","Boolean","interval","Object","intervalDivisions","type","Number","required","intervalDuration","intervalHeight","event","VCalendarIntervalEvent","name","props","setup","adapter","calcHeight","first","last","isEqual","start","height","margin","Array","from","length","x","reduce","total","div","index","isBefore","addMinutes","_createVNode","color","undefined","default","title"],"sources":["../../../src/labs/VCalendar/VCalendarIntervalEvent.tsx"],"sourcesContent":["// Components\nimport { VSheet } from '@/components/VSheet'\n\n// Composables\nimport { useDate } from '@/composables/date'\n\n// Utilities\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVCalendarIntervalEventProps = propsFactory({\n allDay: Boolean,\n interval: Object,\n intervalDivisions: {\n type: Number,\n required: true,\n },\n intervalDuration: {\n type: Number,\n required: true,\n },\n intervalHeight: {\n type: Number,\n required: true,\n },\n event: Object,\n}, 'VCalendarIntervalEvent')\n\nexport const VCalendarIntervalEvent = genericComponent()({\n name: 'VCalendarIntervalEvent',\n\n props: makeVCalendarIntervalEventProps(),\n\n setup (props) {\n const adapter = useDate()\n const calcHeight = () => {\n if ((!props.event?.first && !props.event?.last) || adapter.isEqual(props.event?.start, props.interval?.start)) {\n return { height: '100%', margin: convertToUnit(0) }\n } else {\n const { height, margin } = Array.from({ length: props.intervalDivisions },\n (x: number) => x * (props.intervalDuration / props.intervalDivisions)).reduce((total, div, index) => {\n if (adapter.isBefore(adapter.addMinutes(props.interval?.start, div), props.event?.start)) {\n return {\n height: convertToUnit((props.intervalHeight / props.intervalDivisions) * index),\n margin: convertToUnit((props.intervalHeight / props.intervalDivisions) * index),\n }\n }\n return { height: total.height, margin: total.margin }\n }, { height: '', margin: '' })\n return { height, margin }\n }\n }\n\n useRender(() => {\n return (\n <VSheet\n height={ calcHeight().height }\n density=\"comfortable\"\n style={ `width: 100%; margin-top: ${calcHeight().margin}` }\n class=\"align-center pa-1\"\n color={ props.event?.color ?? undefined }\n rounded={ props.event?.first && props.event?.last\n ? true\n : props.event?.first\n ? 't'\n : props.event?.last\n ? 'b'\n : false }\n >\n { props.event?.first ? props.event?.title : '' }\n </VSheet>\n )\n })\n\n return {}\n },\n\n})\n\nexport type VCalendarIntervalEvent = InstanceType<typeof VCalendarIntervalEvent>\n"],"mappings":";AAAA;AAAA,SACSA,MAAM,6CAEf;AAAA,SACSC,OAAO,4CAEhB;AAAA,SACSC,aAAa,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAEjE,OAAO,MAAMC,+BAA+B,GAAGF,YAAY,CAAC;EAC1DG,MAAM,EAAEC,OAAO;EACfC,QAAQ,EAAEC,MAAM;EAChBC,iBAAiB,EAAE;IACjBC,IAAI,EAAEC,MAAM;IACZC,QAAQ,EAAE;EACZ,CAAC;EACDC,gBAAgB,EAAE;IAChBH,IAAI,EAAEC,MAAM;IACZC,QAAQ,EAAE;EACZ,CAAC;EACDE,cAAc,EAAE;IACdJ,IAAI,EAAEC,MAAM;IACZC,QAAQ,EAAE;EACZ,CAAC;EACDG,KAAK,EAAEP;AACT,CAAC,EA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BAAiB,GAAI0B,KAAK;YAChF,CAAC;UACH;UACA,OAAO;YAAET,MAAM,EAAEO,KAAK,CAACP,MAAM;YAAEC,MAAM,EAAEM,KAAK,CAACN;UAAO,CAAC;QACvD,CAAC,EAAE;UAAED,MAAM,EAAE,EAAE;UAAEC,MAAM,EAAE;QAAG,CAAC,CAAC;QAC9B,OAAO;UAAED,MAAM;UAAEC;QAAO,CAAC;MAC3B;IACF,CAAC;IAEDxB,SAAS,CAAC,MAAM;MACd,OAAAmC,YAAA,CAAAxC,MAAA;QAAA,UAEauB,UAAU,CAAC,CAAC,CAACK,MAAM;QAAA;QAAA,SAEnB,4BAA2BL,UAAU,CAAC,CAAC,CAACM,MAAO,EAAC;QAAA;QAAA,SAEjDT,KAAK,CAACH,KAAK,EAAEwB,KAAK,IAAIC,SAAS;QAAA,WAC7BtB,KAAK,CAACH,KAAK,EAAEO,KAAK,IAAIJ,KAAK,CAACH,KAAK,EAAEQ,IAAI,GAC7C,IAAI,GACJL,KAAK,CAACH,KAAK,EAAEO,KAAK,GAChB,GAAG,GACHJ,KAAK,CAACH,KAAK,EAAEQ,IAAI,GACf,GAAG,GACH;MAAK;QAAAkB,OAAA,EAAAA,CAAA,MAEXvB,KAAK,CAACH,KAAK,EAAEO,KAAK,GAAGJ,KAAK,CAACH,KAAK,EAAE2B,KAAK,GAAG,EAAE;MAAA;IAGpD,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AAEF,CAAC,CAAC"}
@@ -0,0 +1,61 @@
1
+ .v-calendar-month__day {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ min-width: 0;
6
+ min-height: 150px;
7
+ border-right: thin solid #e0e0e0;
8
+ border-bottom: thin solid #e0e0e0;
9
+ flex: 1 1 auto;
10
+ border-inline-end: thin solid #e0e0e0;
11
+ }
12
+
13
+ .v-calendar-weekly__day {
14
+ flex: 1;
15
+ width: 0;
16
+ overflow: hidden;
17
+ user-select: none;
18
+ position: relative;
19
+ padding: 0px 0px 0px 0px;
20
+ min-width: 0;
21
+ min-height: 150px;
22
+ border-right: thin solid #e0e0e0;
23
+ border-bottom: thin solid #e0e0e0;
24
+ flex: 1 1 auto;
25
+ border-inline-end: thin solid #e0e0e0;
26
+ text-align: center;
27
+ }
28
+ .v-calendar-weekly__day.v-present .v-calendar-weekly__day-month {
29
+ color: currentColor;
30
+ }
31
+
32
+ .v-calendar-weekly__day-label {
33
+ text-decoration: none;
34
+ user-select: none;
35
+ cursor: pointer;
36
+ box-shadow: none;
37
+ text-align: center;
38
+ }
39
+ .v-calendar-weekly__day-label .v-btn {
40
+ font-size: 12px;
41
+ text-transform: none !important;
42
+ }
43
+ .v-calendar-weekly__day-label .v-btn.v-calendar-weekly__day-label__today {
44
+ background: rgba(var(--v-theme-surface-variant), var(--v-medium-emphasis-opacity));
45
+ color: rgb(var(--v-theme-on-surface-variant));
46
+ }
47
+
48
+ .v-calendar-weekly__day-month {
49
+ position: absolute;
50
+ text-decoration: none;
51
+ user-select: none;
52
+ box-shadow: none;
53
+ top: 0;
54
+ left: 36px;
55
+ height: 32px;
56
+ line-height: 32px;
57
+ }
58
+
59
+ .v-calendar-weekly__day-alldayevents-container {
60
+ min-height: 24px;
61
+ }
@@ -0,0 +1,64 @@
1
+ import { createVNode as _createVNode } from "vue";
2
+ // Styles
3
+ import "./VCalendarMonthDay.css";
4
+
5
+ // Components
6
+ import { VCalendarEvent } from "./VCalendarEvent.mjs";
7
+ import { VBtn } from "../../components/VBtn/index.mjs"; // Utilities
8
+ import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
9
+ export const makeVCalendarMonthDayProps = propsFactory({
10
+ active: Boolean,
11
+ color: String,
12
+ day: Object,
13
+ disabled: Boolean,
14
+ events: Array,
15
+ title: [Number, String]
16
+ }, 'VCalendarMonthDay');
17
+ export const VCalendarMonthDay = genericComponent()({
18
+ name: 'VCalendarMonthDay',
19
+ props: makeVCalendarMonthDayProps(),
20
+ setup(props, _ref) {
21
+ let {
22
+ emit,
23
+ slots
24
+ } = _ref;
25
+ useRender(() => {
26
+ const hasTitle = !!(props.title || slots.title?.({
27
+ title: props.title
28
+ }));
29
+ return _createVNode("div", {
30
+ "class": ['v-calendar-month__day']
31
+ }, [!props.day?.isHidden && hasTitle && _createVNode("div", {
32
+ "key": "title",
33
+ "class": "v-calendar-weekly__day-label"
34
+ }, [slots.title?.({
35
+ title: props.title
36
+ }) ?? _createVNode(VBtn, {
37
+ "class": props.day?.isToday ? 'v-calendar-weekly__day-label__today' : undefined,
38
+ "color": props.color,
39
+ "disabled": props.disabled,
40
+ "icon": true,
41
+ "size": "x-small",
42
+ "variant": props.day?.isToday ? undefined : 'flat'
43
+ }, {
44
+ default: () => [props.title]
45
+ })]), _createVNode("div", {
46
+ "key": "content",
47
+ "class": "v-calendar-weekly__day-content"
48
+ }, [slots.content?.() ?? _createVNode("div", null, [_createVNode("div", {
49
+ "class": "v-calendar-weekly__day-alldayevents-container"
50
+ }, [props.events?.filter(event => event.allDay).map(event => _createVNode(VCalendarEvent, {
51
+ "day": props.day,
52
+ "event": event,
53
+ "allDay": true
54
+ }, null))]), _createVNode("div", {
55
+ "class": "v-calendar-weekly__day-events-container"
56
+ }, [props.events?.filter(event => !event.allDay).map(event => _createVNode(VCalendarEvent, {
57
+ "day": props.day,
58
+ "event": event
59
+ }, null))])])]), slots.default?.()]);
60
+ });
61
+ return {};
62
+ }
63
+ });
64
+ //# sourceMappingURL=VCalendarMonthDay.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VCalendarMonthDay.mjs","names":["VCalendarEvent","VBtn","genericComponent","propsFactory","useRender","makeVCalendarMonthDayProps","active","Boolean","color","String","day","Object","disabled","events","Array","title","Number","VCalendarMonthDay","name","props","setup","_ref","emit","slots","hasTitle","_createVNode","isHidden","isToday","undefined","default","content","filter","event","allDay","map"],"sources":["../../../src/labs/VCalendar/VCalendarMonthDay.tsx"],"sourcesContent":["// Styles\nimport './VCalendarMonthDay.sass'\n\n// Components\nimport { VCalendarEvent } from './VCalendarEvent'\nimport { VBtn } from '@/components/VBtn'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport type VCalendarMonthDaySlots = {\n default: never\n content: never\n title: { title?: number | string }\n}\n\nexport const makeVCalendarMonthDayProps = propsFactory({\n active: Boolean,\n color: String,\n day: Object,\n disabled: Boolean,\n events: Array<any>,\n title: [Number, String],\n}, 'VCalendarMonthDay')\n\nexport const VCalendarMonthDay = genericComponent< VCalendarMonthDaySlots >()({\n name: 'VCalendarMonthDay',\n\n props: makeVCalendarMonthDayProps(),\n\n setup (props, { emit, slots }) {\n useRender(() => {\n const hasTitle = !!(props.title || slots.title?.({ title: props.title }))\n\n return (\n <div\n class={[\n 'v-calendar-month__day',\n ]}\n >\n { !props.day?.isHidden && hasTitle && (\n <div key=\"title\" class=\"v-calendar-weekly__day-label\">\n { slots.title?.({ title: props.title }) ?? (\n <VBtn\n class={ props.day?.isToday ? 'v-calendar-weekly__day-label__today' : undefined }\n color={ props.color }\n disabled={ props.disabled }\n icon\n size=\"x-small\"\n variant={ props.day?.isToday ? undefined : 'flat' }\n >\n { props.title }\n </VBtn>\n )}\n </div>\n )}\n <div key=\"content\" class=\"v-calendar-weekly__day-content\">\n { slots.content?.() ?? (\n <div>\n <div class=\"v-calendar-weekly__day-alldayevents-container\">\n { props.events?.filter(event => event.allDay).map(event => (\n <VCalendarEvent day={ props.day } event={ event } allDay />\n ))}\n </div>\n <div class=\"v-calendar-weekly__day-events-container\">\n { props.events?.filter(event => !event.allDay).map(event => (\n <VCalendarEvent day={ props.day } event={ event } />\n ))}\n </div>\n </div>\n )}\n </div>\n\n { slots.default?.() }\n </div>\n )\n })\n\n return {}\n },\n})\n\nexport type VCalendarMonthDay = InstanceType<typeof VCalendarMonthDay>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,cAAc;AAAA,SACdC,IAAI,2CAEb;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAQ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AA;QAAA;QAAA;MAAA,IAEGF,KAAK,CAACO,OAAO,GAAG,CAAC,IAAAL,YAAA,eAAAA,YAAA;QAAA;MAAA,IAGXN,KAAK,CAACN,MAAM,EAAEkB,MAAM,CAACC,KAAK,IAAIA,KAAK,CAACC,MAAM,CAAC,CAACC,GAAG,CAACF,KAAK,IAAAP,YAAA,CAAAzB,cAAA;QAAA,OAC/BmB,KAAK,CAACT,GAAG;QAAA,SAAWsB,KAAK;QAAA;MAAA,QAChD,CAAC,IAAAP,YAAA;QAAA;MAAA,IAGAN,KAAK,CAACN,MAAM,EAAEkB,MAAM,CAACC,KAAK,IAAI,CAACA,KAAK,CAACC,MAAM,CAAC,CAACC,GAAG,CAACF,KAAK,IAAAP,YAAA,CAAAzB,cAAA;QAAA,OAChCmB,KAAK,CAACT,GAAG;QAAA,SAAWsB;MAAK,QAChD,CAAC,IAGP,IAGDT,KAAK,CAACM,OAAO,GAAG,CAAC;IAGzB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
@@ -0,0 +1,65 @@
1
+ @import './_variables.scss'
2
+
3
+ .v-calendar-month__day
4
+ position: relative
5
+ display: flex
6
+ flex-direction: column
7
+ // https://github.com/vuetifyjs/vuetify/issues/9058
8
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1114904
9
+ min-width: 0
10
+ min-height: $calendar-weekly-day-min-height
11
+ // Themed
12
+ border-right: $calendar-line-width solid $calendar-line-color
13
+ border-bottom: $calendar-line-width solid $calendar-line-color
14
+ flex: 1 1 auto
15
+ border-inline-end: $calendar-line-width solid $calendar-line-color
16
+
17
+ .v-calendar-weekly__day
18
+ flex: 1
19
+ width: 0
20
+ overflow: hidden
21
+ user-select: none
22
+ position: relative
23
+ padding: $calendar-weekly-day-padding
24
+ // https://github.com/vuetifyjs/vuetify/issues/9058
25
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1114904
26
+ min-width: 0
27
+ min-height: $calendar-weekly-day-min-height
28
+ // Themed
29
+ border-right: $calendar-line-width solid $calendar-line-color
30
+ border-bottom: $calendar-line-width solid $calendar-line-color
31
+ flex: 1 1 auto
32
+ border-inline-end: $calendar-line-width solid $calendar-line-color
33
+ text-align: center
34
+
35
+ &.v-present
36
+ .v-calendar-weekly__day-month
37
+ color: currentColor
38
+
39
+ .v-calendar-weekly__day-label
40
+ text-decoration: none
41
+ user-select: none
42
+ cursor: pointer
43
+ box-shadow: none
44
+ text-align: center
45
+
46
+ .v-btn
47
+ font-size: $calendar-weekly-day-label-font-size
48
+ text-transform: none !important
49
+
50
+ &.v-calendar-weekly__day-label__today
51
+ background: rgba(var(--v-theme-surface-variant), var(--v-medium-emphasis-opacity))
52
+ color: rgb(var(--v-theme-on-surface-variant))
53
+
54
+ .v-calendar-weekly__day-month
55
+ position: absolute
56
+ text-decoration: none
57
+ user-select: none
58
+ box-shadow: none
59
+ top: 0
60
+ left: $calendar-weekly-day-month-left
61
+ height: $calendar-weekly-day-label-size
62
+ line-height: $calendar-weekly-day-label-size
63
+
64
+ .v-calendar-weekly__day-alldayevents-container
65
+ min-height: 24px