@nxgt/material 3.84.1 → 3.85.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/CHANGELOG.md +10 -0
- package/dist/{components-BRJM9hd1.js → components-cgUDvVTe.js} +13727 -13651
- package/dist/components.js +1 -1
- package/dist/lib/components/ui/display/event-chip/event-chip-content.d.ts +12 -3
- package/dist/lib/components/ui/display/event-chip/event-chip.d.ts +5 -1
- package/dist/lib/components/ui/display/event-chip/index.d.ts +1 -1
- package/dist/lib/components/ui/widgets/event-calendar/index.d.ts +1 -1
- package/dist/lib/components/ui/widgets/event-calendar/types.d.ts +9 -0
- package/dist/main.js +1 -1
- package/dist/material.css +1 -1
- package/docs/components/data-display.md +2 -1
- package/docs/components/rich-widgets.md +31 -0
- package/package.json +1 -1
|
@@ -1530,9 +1530,10 @@ import { EventChip } from '@nxgt/material/components';
|
|
|
1530
1530
|
| `allDay` | `boolean` | `false` | no time |
|
|
1531
1531
|
| `compact` | `boolean` | `false` | one line, the time before the title, for month cells |
|
|
1532
1532
|
| `continuesBefore`, `continuesAfter` | `boolean` | `false` | square edges for a multi-day event |
|
|
1533
|
+
| `badge` | `{ label: string; tone?: Tone }` | — | a small tinted label after the title (neutral without a `tone`); cut with an ellipsis, and hidden visually yet still read in a box under 20px tall or 4.5rem wide. `EventCalendar` sets it from `CalendarEvent.badge` |
|
|
1533
1534
|
| `selected`, `disabled` | `boolean` | `false` | state |
|
|
1534
1535
|
|
|
1535
|
-
**Storybook:** `Data display/EventChip` · **Vue:** `EventChip` (`variant`, `endTime`: React only for now, #892)
|
|
1536
|
+
**Storybook:** `Data display/EventChip` · **Vue:** `EventChip` (`variant`, `endTime`: React only for now, #892; `badge`: #2526)
|
|
1536
1537
|
|
|
1537
1538
|
---
|
|
1538
1539
|
|
|
@@ -339,6 +339,37 @@ trade-off: each event stays reachable by keyboard (Tab and the arrow keys move
|
|
|
339
339
|
through the events), and the agenda view lists every event in full, which is the
|
|
340
340
|
accessible route.
|
|
341
341
|
|
|
342
|
+
### EventCalendar event badge
|
|
343
|
+
|
|
344
|
+
An event takes an optional `badge` (`CalendarEventBadge`: `{ label, tone? }`): a
|
|
345
|
+
small tinted label that marks it, such as a category or a follow-up. `tone` is a
|
|
346
|
+
tone of the library or one your app declared (neutral when omitted). The same
|
|
347
|
+
prop is on [`EventChip`](data-display.md).
|
|
348
|
+
|
|
349
|
+
```tsx
|
|
350
|
+
import { EventCalendar, type CalendarEvent } from '@nxgt/material/components';
|
|
351
|
+
|
|
352
|
+
const events: CalendarEvent[] = [
|
|
353
|
+
{
|
|
354
|
+
id: '1',
|
|
355
|
+
title: 'Visit',
|
|
356
|
+
start: '2026-03-12T09:00:00Z',
|
|
357
|
+
end: '2026-03-12T10:00:00Z',
|
|
358
|
+
badge: { label: 'Follow-up', tone: 'info' },
|
|
359
|
+
},
|
|
360
|
+
];
|
|
361
|
+
|
|
362
|
+
<EventCalendar events={events} />;
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
- **Where.** After the title in the day, week, workweek, month and agenda
|
|
366
|
+
views, and in the preview popover.
|
|
367
|
+
- **Accessibility.** The label is part of the event's name (`Visit, Follow-up`),
|
|
368
|
+
and the tone is never the only signal.
|
|
369
|
+
- **Small boxes.** A long label is cut with an ellipsis inside its chip. In a
|
|
370
|
+
box under 20px tall or 4.5rem wide it is hidden visually and still read by a
|
|
371
|
+
screen reader.
|
|
372
|
+
|
|
342
373
|
### EventCalendar resources
|
|
343
374
|
|
|
344
375
|
`resources` splits the **day view** into one column per room, person or team
|