@schukai/monster 3.112.2 → 3.112.4

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 (30) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/package.json +1 -1
  3. package/source/components/form/style/context-help.pcss +1 -1
  4. package/source/components/form/stylesheet/context-help.mjs +1 -1
  5. package/source/components/layout/popper.mjs +1 -1
  6. package/source/components/layout/stylesheet/panel.mjs +13 -6
  7. package/source/components/navigation/stylesheet/table-of-content.mjs +13 -6
  8. package/source/components/navigation/table-of-content.mjs +4 -5
  9. package/source/components/time/day.mjs +407 -0
  10. package/source/components/time/month-calendar.mjs +258 -54
  11. package/source/components/time/style/day.pcss +159 -0
  12. package/source/components/time/style/month-calendar.pcss +24 -14
  13. package/source/components/time/stylesheet/day.mjs +31 -0
  14. package/source/components/time/stylesheet/month-calendar.mjs +1 -1
  15. package/source/components/time/timeline/appointment.mjs +147 -0
  16. package/source/components/time/timeline/segment.mjs +7 -15
  17. package/source/components/time/timeline/style/appointment.pcss +25 -0
  18. package/source/components/time/timeline/style/segment.pcss +10 -1
  19. package/source/components/time/timeline/stylesheet/appointment.mjs +38 -0
  20. package/source/components/time/timeline/stylesheet/segment.mjs +1 -1
  21. package/source/data/pipe.mjs +1 -1
  22. package/source/dom/locale.mjs +3 -2
  23. package/source/i18n/internal.mjs +4 -0
  24. package/source/monster.mjs +1 -1
  25. package/source/types/version.mjs +1 -1
  26. package/test/cases/monster.mjs +1 -1
  27. package/test/web/test.html +2 -2
  28. package/test/web/tests.js +5 -5
  29. package/source/components/time/timeline/collection.mjs +0 -218
  30. package/source/components/time/timeline/item.mjs +0 -192
@@ -42,6 +42,7 @@ import { Datasource } from "../datatable/datasource.mjs";
42
42
  import { Observer } from "../../types/observer.mjs";
43
43
  import { positionPopper } from "../form/util/floating-ui.mjs";
44
44
  import { Segment as AppointmentSegment } from "./timeline/segment.mjs";
45
+ import { Appointment as AppointmentAppointment } from "./timeline/appointment.mjs";
45
46
 
46
47
  export { MonthCalendar };
47
48
 
@@ -55,7 +56,7 @@ const calendarElementSymbol = Symbol("calendarElement");
55
56
  * @private
56
57
  * @type {symbol}
57
58
  */
58
- const calendarBodyElementSymbol = Symbol("calenddarBodyElement");
59
+ const calendarBodyElementSymbol = Symbol("calendarBodyElement");
59
60
 
60
61
  /**
61
62
  * A Calendar
@@ -91,9 +92,14 @@ class MonthCalendar extends CustomElement {
91
92
  */
92
93
  [assembleMethodSymbol]() {
93
94
  super[assembleMethodSymbol]();
94
- initControlReferences.call(this);
95
- initDataSource.call(this);
96
- initEventHandler.call(this);
95
+
96
+ setTimeout(() => {
97
+ initControlReferences.call(this);
98
+ initEventHandler.call(this);
99
+ // refresh the labels for updater
100
+ this.setOption("labels.__update", true);
101
+ initDataSource.call(this);
102
+ }, 0);
97
103
  return this;
98
104
  }
99
105
 
@@ -105,12 +111,19 @@ class MonthCalendar extends CustomElement {
105
111
  *
106
112
  * @property {Object} templates Template definitions
107
113
  * @property {string} templates.main Main template
108
- * @property {Object} labels Label definitions
109
- * @property {Object} actions Callbacks
110
- * @property {string} actions.click="throw Error" Callback when clicked
111
- * @property {Object} features Features
112
- * @property {Object} classes CSS classes
113
- * @property {boolean} disabled=false Disabled state
114
+ * @property {Object} labels Labels for the control
115
+ * @property {Object} classes Classes for the control
116
+ * @property {boolean} disabled Disables the control
117
+ * @property {Object} features Features for the control
118
+ * @property {boolean} features.showWeekend Show the weekend
119
+ * @property {boolean} features.monthOneLine Show the month in one line
120
+ * @property {Object} actions Actions for the control
121
+ * @property {Object} locale Locale for the control
122
+ * @property {string} locale.weekdayFormat Weekday format
123
+ * @property {string} startDate Start date
124
+ * @property {string} endDate End date
125
+ * @property {Object} datasource Datasource
126
+ * @property {string} datasource.selector Datasource selector
114
127
  */
115
128
  get defaults() {
116
129
  const startDate = new Date();
@@ -125,7 +138,7 @@ class MonthCalendar extends CustomElement {
125
138
  templates: {
126
139
  main: getTemplate(),
127
140
  },
128
- labels: {},
141
+ labels: getTranslations(),
129
142
  classes: {},
130
143
 
131
144
  disabled: false,
@@ -133,6 +146,7 @@ class MonthCalendar extends CustomElement {
133
146
  showWeekend: true,
134
147
  monthOneLine: false,
135
148
  },
149
+
136
150
  actions: {},
137
151
 
138
152
  locale: {
@@ -183,6 +197,24 @@ class MonthCalendar extends CustomElement {
183
197
  }
184
198
  }
185
199
 
200
+ /**
201
+ * @private
202
+ * @returns {object}
203
+ */
204
+ function getTranslations() {
205
+ const locale = getLocaleOfDocument();
206
+ switch (locale.language) {
207
+ case "de":
208
+ return {
209
+ more: "weitere Termin",
210
+ };
211
+ default:
212
+ return {
213
+ more: "more appointments",
214
+ };
215
+ }
216
+ }
217
+
186
218
  /**
187
219
  * Calculates how many days of an appointment are distributed across calendar rows (weeks).
188
220
  * Uses the start date of the calendar grid (e.g., from generateCalendarData()) as a reference.
@@ -350,6 +382,19 @@ function initDataSource() {
350
382
  }, 10);
351
383
  }
352
384
 
385
+ /**
386
+ * Places and organizes appointments within a calendar grid according to their start and end dates,
387
+ * ensuring proper alignment and rendering within the calendar day containers.
388
+ *
389
+ * Appointments are evaluated to determine their appropriate positions, lengths, and styles based on calendar
390
+ * configuration and available rendering space.
391
+ *
392
+ * Errors are logged for invalid appointment data or when
393
+ * rendering issues are encountered.
394
+ *
395
+ * @private
396
+ * @return {void} No return value; the method operates on the DOM and internal state of the calendar element to render appointments visually.
397
+ */
353
398
  function placeAppointments() {
354
399
  const self = this;
355
400
 
@@ -370,6 +415,7 @@ function placeAppointments() {
370
415
  calenderStartDate,
371
416
  calenderEndDate,
372
417
  );
418
+
373
419
  calendarDays.forEach((day) => {
374
420
  const k =
375
421
  day.date.getFullYear() +
@@ -387,17 +433,6 @@ function placeAppointments() {
387
433
  }
388
434
 
389
435
  const startDate = appointment?.startDate;
390
- let container = self.shadowRoot.querySelector(
391
- `[data-monster-day="${startDate}"]`,
392
- );
393
-
394
- if (!container) {
395
- addErrorAttribute(
396
- this,
397
- "Invalid, missing or out of range date in appointment" + startDate,
398
- );
399
- return;
400
- }
401
436
 
402
437
  // calc length of appointment
403
438
  const start = new Date(startDate);
@@ -454,13 +489,15 @@ function placeAppointments() {
454
489
 
455
490
  maxLineHeight = Math.max(maxLineHeight, getTextHeight.call(this, label));
456
491
 
457
- const nextKeyDate = new Date(start.setDate(start.getDate() + cols));
492
+ const k = new Date(start.setDate(start.getDate() + cols));
493
+
494
+ // calc from k to next day
458
495
  date =
459
- nextKeyDate.getFullYear() +
496
+ k.getFullYear() +
460
497
  "-" +
461
- ("00" + (nextKeyDate.getMonth() + 1)).slice(-2) +
498
+ ("00" + (k.getMonth() + 1)).slice(-2) +
462
499
  "-" +
463
- ("00" + nextKeyDate.getDate()).slice(-2);
500
+ ("00" + k.getDate()).slice(-2);
464
501
  }
465
502
  });
466
503
 
@@ -468,18 +505,59 @@ function placeAppointments() {
468
505
 
469
506
  const sortedSegments = assignLinesToSegments(segments);
470
507
 
471
- for (let i = 0; i < sortedSegments.length; i++) {
472
- const segment = sortedSegments[i];
508
+ const h = calcHeaderAndFooterHeight.call(this);
509
+ const marginAppointmentContainer = h.maxFooterHeight + h.maxHeaderHeight;
473
510
 
474
- if (segment.line > 3) {
475
- continue;
476
- } else {
511
+ const popper = self.shadowRoot.querySelectorAll(
512
+ "monster-appointment-segment",
513
+ );
514
+ if (popper) {
515
+ for (const p of popper) {
516
+ p.remove();
477
517
  }
518
+ }
519
+
520
+ const daysWithMoreAppointments = new Set();
521
+ const moreAppointments = new Map();
522
+
523
+ for (let i = 0; i < sortedSegments.length; i++) {
524
+ const segment = sortedSegments[i];
478
525
 
479
526
  container = self.shadowRoot.querySelector(
480
527
  `[data-monster-day="${segment.start}"]`,
481
528
  );
482
529
 
530
+ if (!container) {
531
+ continue;
532
+ }
533
+
534
+ let containerHeight = container?.getBoundingClientRect()?.height || 0;
535
+ if (containerHeight === 0) {
536
+ addErrorAttribute(this, "Unable to retrieve container height");
537
+ continue;
538
+ }
539
+
540
+ let availableHeight =
541
+ containerHeight - maxLineHeight - marginAppointmentContainer;
542
+ let linesThatCanBeShown = Math.floor(availableHeight / maxLineHeight);
543
+
544
+ if (segment.line > linesThatCanBeShown) {
545
+ daysWithMoreAppointments.add(segment.start);
546
+
547
+ const calendarDays = this.getOption("calendarDays");
548
+ const currentDay = calendarDays.find((day) => day.day === segment.start);
549
+
550
+ if (currentDay) {
551
+ if (!moreAppointments.has(currentDay.index)) {
552
+ moreAppointments.set(currentDay.index, []);
553
+ }
554
+
555
+ moreAppointments.get(currentDay.index).push(segment);
556
+ }
557
+
558
+ continue;
559
+ }
560
+
483
561
  if (!container) {
484
562
  addErrorAttribute(
485
563
  this,
@@ -511,12 +589,129 @@ function placeAppointments() {
511
589
 
512
590
  appointmentSegment.style.width = `${currentWithOfGridCell * segment.columns}px`;
513
591
  appointmentSegment.style.height = maxLineHeight + "px";
514
- appointmentSegment.style.top = `${segment.line * maxLineHeight + maxLineHeight + 4}px`;
592
+ appointmentSegment.style.top = `${segment.line * maxLineHeight + h.maxHeaderHeight}px`;
515
593
 
516
594
  appointmentSegment.setOption("labels.text", segment.label);
517
595
 
518
596
  container.appendChild(appointmentSegment);
519
597
  }
598
+
599
+ // mark days with more appointments, show a hint / link
600
+ for (const day of daysWithMoreAppointments) {
601
+ for (const cell of this.getOption("calendarDays")) {
602
+ if (cell.day === day) {
603
+ this.setOption(
604
+ "calendarDays." + cell.index + ".classes.more-appointments",
605
+ "visible",
606
+ );
607
+ }
608
+ }
609
+ }
610
+
611
+ // get popper
612
+ for (const [index, appointments] of moreAppointments) {
613
+ const moreAppointmentsContainer = this.shadowRoot.querySelector(
614
+ `[data-monster-role=day-cell][data-monster-index="${index}"] > [data-monster-role="appointment-popper"] `,
615
+ );
616
+
617
+ if (!moreAppointmentsContainer) {
618
+ continue;
619
+ }
620
+
621
+ moreAppointmentsContainer.innerHTML = "";
622
+
623
+ for (const appointment of appointments) {
624
+ const appointmentSegment = document.createElement("monster-appointment");
625
+ appointmentSegment.style.backgroundColor = appointment.appointment.color;
626
+ appointmentSegment.style.position = "relative";
627
+ appointmentSegment.style.top = "unset";
628
+
629
+ // search a color that is readable on the background color
630
+ const rgb = appointmentSegment.style.backgroundColor.match(/\d+/g);
631
+ const brightness = Math.round(
632
+ (parseInt(rgb[0]) * 299 +
633
+ parseInt(rgb[1]) * 587 +
634
+ parseInt(rgb[2]) * 114) /
635
+ 1000,
636
+ );
637
+
638
+ if (brightness > 125) {
639
+ appointmentSegment.style.color = "#000000";
640
+ } else {
641
+ appointmentSegment.style.color = "#ffffff";
642
+ }
643
+
644
+ appointmentSegment.style.width = "100%";
645
+ appointmentSegment.style.height = maxLineHeight + "px";
646
+
647
+ appointmentSegment.setOption("labels.text", appointment.label);
648
+
649
+ moreAppointmentsContainer.appendChild(appointmentSegment);
650
+ }
651
+ }
652
+ }
653
+
654
+ /**
655
+ * @private
656
+ * @returns {{maxHeaderHeight: number, maxFooterHeight: number}}
657
+ */
658
+ function calcHeaderAndFooterHeight() {
659
+ let maxHeaderHeight = 0;
660
+ let maxFooterHeight = 0;
661
+
662
+ const days = this.getOption("calendarDays");
663
+ for (const day of days) {
664
+ const current = day.date;
665
+
666
+ const dayKey =
667
+ current.getFullYear() +
668
+ "-" +
669
+ ("00" + (current.getMonth() + 1)).slice(-2) +
670
+ "-" +
671
+ ("00" + current.getDate()).slice(-2);
672
+
673
+ const cell = this.shadowRoot.querySelector(
674
+ `[data-monster-day="${dayKey}"]`,
675
+ );
676
+
677
+ if (!(cell instanceof HTMLDivElement)) {
678
+ continue;
679
+ }
680
+
681
+ const header = cell.querySelector("[data-monster-role='day-header']");
682
+
683
+ if (header instanceof HTMLDivElement) {
684
+ maxHeaderHeight = Math.max(
685
+ maxHeaderHeight,
686
+ header.getBoundingClientRect().height +
687
+ parseFloat(getComputedStyle(header).paddingTop) +
688
+ parseFloat(getComputedStyle(header).paddingBottom) +
689
+ parseFloat(getComputedStyle(header).marginTop) +
690
+ parseFloat(getComputedStyle(header).marginBottom) +
691
+ parseFloat(getComputedStyle(header.parentElement).paddingTop) +
692
+ parseFloat(getComputedStyle(header.parentElement).paddingBottom) +
693
+ parseFloat(getComputedStyle(header.parentElement).marginTop),
694
+ );
695
+ }
696
+
697
+ const footer = cell.querySelector("[data-monster-role='day-footer']");
698
+
699
+ if (footer instanceof HTMLDivElement) {
700
+ maxFooterHeight = Math.max(
701
+ maxFooterHeight,
702
+ footer.getBoundingClientRect().height +
703
+ parseFloat(getComputedStyle(footer).paddingTop) +
704
+ parseFloat(getComputedStyle(footer).paddingBottom) +
705
+ parseFloat(getComputedStyle(footer).marginTop) +
706
+ parseFloat(getComputedStyle(footer).marginBottom) +
707
+ parseFloat(getComputedStyle(footer.parentElement).paddingTop) +
708
+ parseFloat(getComputedStyle(footer.parentElement).paddingBottom) +
709
+ parseFloat(getComputedStyle(footer.parentElement).marginTop),
710
+ );
711
+ }
712
+ }
713
+
714
+ return { maxHeaderHeight, maxFooterHeight };
520
715
  }
521
716
 
522
717
  /**
@@ -588,12 +783,16 @@ function generateCalendarData() {
588
783
  label: label,
589
784
  index: i,
590
785
  day: dayKey,
591
-
592
- classes:
593
- "day-cell " +
594
- (current.getMonth() === month ? "current-month" : "other-month") +
595
- (current.getDay() === 0 || current.getDay() === 6 ? " weekend" : "") +
596
- (current.toDateString() === new Date().toDateString() ? " today" : ""),
786
+ classes: {
787
+ "more-appointments": "hidden",
788
+ cell:
789
+ "day-cell " +
790
+ (current.getMonth() === month ? "current-month" : "other-month") +
791
+ (current.getDay() === 0 || current.getDay() === 6 ? " weekend" : "") +
792
+ (current.toDateString() === new Date().toDateString()
793
+ ? " today"
794
+ : ""),
795
+ },
597
796
  appointments: [],
598
797
  });
599
798
  }
@@ -669,7 +868,6 @@ function getAppointmentsPerDay(appointments, start, end) {
669
868
  /**
670
869
  * @private
671
870
  * @return {initEventHandler}
672
- * @fires monster-calendar-clicked
673
871
  */
674
872
  function initEventHandler() {
675
873
  const self = this;
@@ -685,13 +883,11 @@ function initEventHandler() {
685
883
  .querySelectorAll("[data-monster-role='day-cell']")
686
884
  .forEach((element) => {
687
885
  element.addEventListener("click", (event) => {
688
- console.log(event.relatedTarget, "event1");
689
- console.log(event.composedPath(), "event");
690
-
691
886
  const hoveredElement = this.shadowRoot.elementFromPoint(
692
887
  event.clientX,
693
888
  event.clientY,
694
889
  );
890
+
695
891
  if (hoveredElement instanceof AppointmentSegment) {
696
892
  return;
697
893
  }
@@ -699,14 +895,15 @@ function initEventHandler() {
699
895
  const element = findTargetElementFromEvent(
700
896
  event,
701
897
  "data-monster-role",
702
- "day-cell",
898
+ "more-appointments",
703
899
  );
704
900
 
705
901
  if (!element) {
706
902
  return;
707
903
  }
708
904
 
709
- const popper = element.querySelector(
905
+ // parent is footer, and parent of footer is cell
906
+ const popper = element.parentElement.parentElement.querySelector(
710
907
  '[data-monster-role="appointment-popper"]',
711
908
  );
712
909
 
@@ -714,13 +911,14 @@ function initEventHandler() {
714
911
  return;
715
912
  }
716
913
 
717
- positionPopper(element, popper, {
914
+ //const appointments = getAppointmentsPerDay() || [];
915
+ const container = element.parentElement.parentElement;
916
+
917
+ positionPopper(container, popper, {
718
918
  placement: "bottom",
719
919
  });
720
920
 
721
- //const appointments = getAppointmentsPerDay() || [];
722
-
723
- popper.style.width = element.getBoundingClientRect().width + "px";
921
+ popper.style.width = container.getBoundingClientRect().width + "px";
724
922
  popper.style.zIndex = 1000;
725
923
 
726
924
  popper.style.display = "block";
@@ -792,14 +990,20 @@ function getTemplate() {
792
990
  return `
793
991
  <template id="cell">
794
992
  <div data-monster-role="day-cell"
795
- data-monster-attributes="class path:cell.classes,
993
+ data-monster-attributes="class path:cell.classes.cell,
994
+ data-monster-day path:cell.day,
796
995
  data-monster-index path:cell.index">
797
- <div data-monster-replace="path:cell.label"></div>
798
- <div data-monster-role="appointment-container"
799
- data-monster-attributes="data-monster-day path:cell.day,
800
- data-monster-calendar-index path:cell.index"></div>
996
+ <div class="header" data-monster-role="day-header">
997
+ <div data-monster-replace="path:cell.label"></div>
998
+ </div>
999
+
1000
+ <div class="footer" data-monster-role="day-footer">
1001
+ <div data-monster-replace="path:labels.more"
1002
+ data-monster-attributes="class path:cell.classes.more-appointments"
1003
+ data-monster-role="more-appointments"></div>
1004
+ </div>
801
1005
  <div data-monster-role="appointment-popper"
802
- class="popper" data-monster-replace="path:cell.appointments"></div>
1006
+ class="popper"></div>
803
1007
  </div>
804
1008
  </template>
805
1009
 
@@ -0,0 +1,159 @@
1
+ @import "../../style/control.pcss";
2
+ @import "../../style/accessibility.pcss";
3
+ @import "../../style/button.pcss";
4
+ @import "../../style/border.pcss";
5
+ @import "../../style/typography.pcss";
6
+ @import "../../style/theme.pcss";
7
+ @import "../../style/color.pcss";
8
+
9
+
10
+ :host {
11
+ display: flex;
12
+ width: 100%;
13
+ justify-content: center;
14
+ }
15
+
16
+ [data-monster-role="control"] {
17
+ user-select: none;
18
+ display: flex;
19
+
20
+ width: 8rem;
21
+
22
+ box-sizing: border-box;
23
+ padding: 0;
24
+ margin: 0;
25
+
26
+ text-align: center;
27
+ flex-direction: column;
28
+ align-items: center;
29
+ flex-wrap: nowrap;
30
+
31
+
32
+ }
33
+
34
+ [data-monster-role="month"] {
35
+ background-color: var(--monster-bg-color-primary-2);
36
+
37
+ color: var(--monster-color-primary-2);
38
+ font-size: 1.2rem;
39
+ font-weight: bold;
40
+ text-transform: uppercase;
41
+
42
+ width: 8rem;
43
+
44
+ box-sizing: border-box;
45
+ padding: 0;
46
+ margin: 0;
47
+ }
48
+
49
+ [data-monster-role="day"] {
50
+ font-size: 2rem;
51
+ font-weight: bold;
52
+ color: var(--monster-color-secondary-1);
53
+ background-color: var(--monster-bg-color-primary-1);
54
+
55
+ width: 8rem;
56
+
57
+ box-sizing: border-box;
58
+ padding: 0;
59
+ margin: 0;
60
+ }
61
+
62
+ [data-monster-role="weekday"] {
63
+ font-size: 0.8rem;
64
+ color: var(--monster-color-primary-1);
65
+ background-color: var(--monster-bg-color-primary-1);
66
+
67
+ width: 8rem;
68
+
69
+ box-sizing: border-box;
70
+ padding: 0;
71
+ margin: 0;
72
+ }
73
+
74
+
75
+ [data-monster-role="label"] {
76
+ background-color: var(--monster-bg-color-secondary-1);
77
+ color: var(--monster-color-secondary-2);
78
+ padding: 0.2rem 0;
79
+ margin: 0.5rem 0;
80
+ width: 8rem;
81
+ font-size: 1rem;
82
+ text-align: center;
83
+ height: 1.5rem;
84
+ }
85
+
86
+ [data-monster-role="label"]:not(:empty) {
87
+ border-top: 1px solid var(--monster-color-secondary-1);
88
+ height: calc(1.5rem - 1px);
89
+ }
90
+
91
+ :host(.small) [data-monster-role="control"] {
92
+ flex-flow: row;
93
+ flex-wrap: wrap;
94
+
95
+ gap: 0 4px;
96
+
97
+ width: fit-content;
98
+ }
99
+
100
+ :host(.small) [data-monster-role="control"] > div {
101
+ text-align: left;
102
+ width: auto;
103
+ }
104
+
105
+ :host(.small) div[data-monster-role="day"] {
106
+ flex-grow: 20;
107
+ }
108
+
109
+ :host(.small) div[data-monster-role="month"],
110
+ :host(.small) div[data-monster-role="day"] {
111
+
112
+ background-color: var(--monster-bg-color-primary-1);
113
+ color: var(--monster-color-primary-1);
114
+ font-size: 1.1rem;
115
+ font-weight: bold;
116
+ text-transform: uppercase;
117
+
118
+ box-sizing: border-box;
119
+ padding: 0;
120
+ margin: 0;
121
+ }
122
+
123
+ :host(.small) div[data-monster-role="weekday"] {
124
+ }
125
+
126
+ :host(.small) div[data-monster-role="weekday"],
127
+ :host(.small) div[data-monster-role="label"] {
128
+ }
129
+
130
+ :host(.small) div[data-monster-role="weekday"] {
131
+ border: none;
132
+ padding: 0;
133
+ margin: 0;
134
+ font-size: 1rem;
135
+ text-wrap: nowrap;
136
+ }
137
+
138
+ :host(.small) div[data-monster-role="label"] {
139
+ text-align: center;
140
+ display: flex;
141
+ justify-content: center;
142
+ align-items: center;
143
+ padding: 0 12px;
144
+
145
+ border: none;
146
+ background-color: var(--monster-bg-color-secondary-2);
147
+ color: var(--monster-color-secondary-2);
148
+ margin: 0 4px;
149
+ font-size: 0.8rem;
150
+
151
+ text-wrap: nowrap;
152
+
153
+ }
154
+
155
+ :host(.small) div[data-monster-role="label"]:empty {
156
+ display: none;
157
+ }
158
+
159
+
@@ -47,32 +47,42 @@
47
47
 
48
48
  div.popper {
49
49
  position: absolute;
50
- z-index: var(--monster-theme-control-z-index);
50
+ z-index: var(--monster-z-index-dropdown);
51
51
  background-color: var(--monster-bg-color-primary-1);
52
52
  color: var(--monster-color-primary-1);
53
- border-radius: var(--monster-theme-control-border-radius);
54
- border-width: var(--monster-theme-control-border-width);
55
- border-color: var(--monster-theme-control-border-color);
56
- border-style: var(--monster-theme-control-border-style);
57
- box-shadow: var(--monster-theme-control-box-shadow);
58
- padding: 0.5em;
53
+ border: none;
54
+ box-shadow: var(--monster-box-shadow-1);
55
+ padding: 0;
59
56
  display: none;
60
57
  box-sizing: border-box;
58
+ outline: 1px solid var(--monster-color-primary-1);
61
59
  }
62
60
 
63
61
  div.day-cell {
64
62
  display: flex;
65
63
  align-items: start;
66
- justify-content: start;
64
+ justify-content: space-between;
67
65
  box-sizing: border-box;
68
66
  padding: 0.3em;
69
67
  position: relative;
70
-
68
+ flex-direction: column;
71
69
  transition: background-color 0.3s;
72
70
  background-color: var(--monster-bg-color-primary-2);
73
71
  color: var(--monster-color-primary-2);
74
72
 
75
- aspect-ratio: 1 / 1;
73
+ aspect-ratio: 1 / 1.26;
74
+ }
75
+
76
+ div.footer {
77
+ font-size: xx-small;
78
+ }
79
+
80
+ [data-monster-role="more-appointments"] {
81
+ cursor: pointer;
82
+ }
83
+
84
+ .hidden {
85
+ display: none;
76
86
  }
77
87
 
78
88
  div.current-month {
@@ -90,11 +100,11 @@ div.today {
90
100
  color : var(--monster-color-primary-4);
91
101
  }
92
102
 
93
-
94
103
  [data-monster-role=appointment-container] {
95
104
  position: absolute;
96
- top: 0;
105
+ box-sizing: border-box;
106
+ bottom: 0;
107
+ top: 0 ;
97
108
  left: 0;
98
- width: 100%;
99
- height: 100%;
109
+ right: 0;
100
110
  }