@umituz/web-dashboard 8.5.0 → 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/web-dashboard",
3
- "version": "8.5.0",
3
+ "version": "8.6.0",
4
4
  "description": "Installable app skeleton for the fleet — layouts, analytics (dependency-free SVG charts), calendar, onboarding flow permissions/module registry; udb-* stylesheet on design-system tokens",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -37,6 +37,13 @@
37
37
  gap: var(--udb-space-3, 12px);
38
38
  }
39
39
 
40
+ .udb-cal-extra {
41
+ display: flex;
42
+ flex-wrap: wrap;
43
+ align-items: center;
44
+ gap: var(--udb-space-2, 8px);
45
+ }
46
+
40
47
  .udb-cal-legend {
41
48
  display: flex;
42
49
  flex-wrap: wrap;
@@ -65,4 +65,10 @@ describe('Calendar', () => {
65
65
  mount({ legend: [{ tone: 'success', label: 'Confirmed' }] });
66
66
  expect(screen.getByText('Confirmed')).toBeTruthy();
67
67
  });
68
+
69
+ it('renders toolbar extras inside the toolbar', () => {
70
+ mount({ toolbarExtra: <span className="calendar-count">4 appointments</span> });
71
+ const extra = screen.getByText('4 appointments').closest('.udb-cal-extra');
72
+ expect(extra).toBeTruthy();
73
+ });
68
74
  });
@@ -1,4 +1,5 @@
1
1
  import { useMemo, useState } from 'react';
2
+ import type { ReactNode } from 'react';
2
3
  import { ChevronLeft, ChevronRight } from 'lucide-react';
3
4
  import { Button, IconButton } from '@umituz/web-design-system/atoms';
4
5
  import { Segmented } from '@umituz/web-design-system/molecules';
@@ -39,6 +40,7 @@ export interface CalendarProps {
39
40
  locale?: string;
40
41
  labels?: Partial<CalendarLabels>;
41
42
  legend?: readonly CalendarLegendEntry[];
43
+ toolbarExtra?: ReactNode;
42
44
  onSelectItem?: (item: CalendarItem) => void;
43
45
  onSelectDay?: (dayKey: string) => void;
44
46
  onSlotClick?: (dayKey: string, minutes: number) => void;
@@ -60,6 +62,7 @@ export const Calendar = ({
60
62
  locale = 'en-US',
61
63
  labels,
62
64
  legend,
65
+ toolbarExtra,
63
66
  onSelectItem,
64
67
  onSelectDay,
65
68
  onSlotClick,
@@ -123,6 +126,7 @@ export const Calendar = ({
123
126
  </Button>
124
127
  </div>
125
128
  <div className="udb-cal-toolbar-side">
129
+ {toolbarExtra && <div className="udb-cal-extra">{toolbarExtra}</div>}
126
130
  {legend && legend.length > 0 && (
127
131
  <div className="udb-cal-legend">
128
132
  {legend.map((entry) => (
@@ -15,6 +15,7 @@ export interface CalendarItem {
15
15
  meta?: ReactNode;
16
16
  kind?: string;
17
17
  muted?: boolean;
18
+ payload?: unknown;
18
19
  }
19
20
 
20
21
  export interface CalendarLegendEntry {