@nxgt/material 3.91.0 → 3.93.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 (149) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +3 -3
  3. package/dist/{alert-dialog-BFk4ye-3.js → alert-dialog-D37eph4I.js} +1 -1
  4. package/dist/{async-slice-gGyfyUw2.js → async-slice-BSqwhAj-.js} +1 -1
  5. package/dist/{button-C5OEq9bi.js → button-CG9SBAT-.js} +1 -1
  6. package/dist/{calculator-Dg_L6d3R.js → calculator-YD3I3y-I.js} +10 -10
  7. package/dist/calculator-field.js +6 -6
  8. package/dist/{calculator-segment-CvAaDqKf.js → calculator-segment-Cjec9zi7.js} +1 -1
  9. package/dist/calculator.js +1 -1
  10. package/dist/charts.js +3 -3
  11. package/dist/{chip-DOxFA4BI.js → chip-BbUSBl3i.js} +2 -2
  12. package/dist/{code-editor-tiAjhXW-.js → code-editor-ZEM7AAcs.js} +4 -4
  13. package/dist/code-editor.js +4 -4
  14. package/dist/{code-language-items-CcdzQvLT.js → code-language-items-CAuHPrHd.js} +2 -2
  15. package/dist/components/components.css +1 -0
  16. package/dist/components/ui/widgets/event-calendar/event-calendar-backdrop.css +43 -0
  17. package/dist/{components-G0nEVa52.js → components-CuFTrmGy.js} +19023 -18257
  18. package/dist/components.js +38 -38
  19. package/dist/{conversion-variant-4gCdFWV-.js → conversion-variant-DmEtTCSP.js} +3 -3
  20. package/dist/{currency-field-CIqe7Wg4.js → currency-field-CabGnVO9.js} +5 -5
  21. package/dist/{dialog-d6Kdf5wc.js → dialog-Jhpx6ulb.js} +3 -3
  22. package/dist/dnd.js +1 -1
  23. package/dist/{dropdown-menu-DO5kUvof.js → dropdown-menu-nl0Q3tQ2.js} +1 -1
  24. package/dist/editor.js +7 -7
  25. package/dist/{empty-state-DQnICuun.js → empty-state-mrJuqph3.js} +1 -1
  26. package/dist/{financial-variant-D80C1hVD.js → financial-variant-P8gFA9aI.js} +5 -5
  27. package/dist/{hooks-C-yLDF39.js → hooks-CjSpziWf.js} +2 -2
  28. package/dist/hooks.js +2 -2
  29. package/dist/{hover-card-DU3TAME4.js → hover-card-BNb1M8ij.js} +1 -1
  30. package/dist/i18n.js +3 -3
  31. package/dist/{icon-badge-BGczZ4Hc.js → icon-badge-CVMHwdFm.js} +1 -1
  32. package/dist/{icon-button-D0xjBCst.js → icon-button-Ch0PThsa.js} +1 -1
  33. package/dist/{input-group-CSlXMFxu.js → input-group-CPMSQcBx.js} +1 -1
  34. package/dist/lib/components/ui/collections/day-grouped-list/day-grouped-list.d.ts +30 -2
  35. package/dist/lib/components/ui/collections/day-grouped-list/index.d.ts +7 -2
  36. package/dist/lib/components/ui/collections/day-grouped-list/partials/day-group-section.d.ts +17 -0
  37. package/dist/lib/components/ui/collections/day-grouped-list/use-day-groups.d.ts +24 -0
  38. package/dist/lib/components/ui/display/entity-header/entity-metadata.d.ts +2 -0
  39. package/dist/lib/components/ui/display/event-chip/event-chip-badges.d.ts +21 -0
  40. package/dist/lib/components/ui/display/event-chip/event-chip-content.d.ts +5 -7
  41. package/dist/lib/components/ui/display/event-chip/event-chip-title.d.ts +9 -0
  42. package/dist/lib/components/ui/display/event-chip/event-chip.classes.d.ts +9 -0
  43. package/dist/lib/components/ui/display/event-chip/event-chip.d.ts +15 -2
  44. package/dist/lib/components/ui/fields/attributes/attribute-values-form-field-set/attribute-values-form-field-set.d.ts +1 -1
  45. package/dist/lib/components/ui/fields/choice-list/choice-list-control.d.ts +1 -1
  46. package/dist/lib/components/ui/fields/choice-list/choice-list-field.d.ts +1 -1
  47. package/dist/lib/components/ui/fields/choice-list/choice-list-focus.d.ts +6 -3
  48. package/dist/lib/components/ui/fields/choice-list/choice-list-form-field.d.ts +2 -2
  49. package/dist/lib/components/ui/fields/choice-list/choice-list-names.d.ts +2 -0
  50. package/dist/lib/components/ui/fields/choice-list/choice-list.utils.d.ts +2 -0
  51. package/dist/lib/components/ui/fields/choice-list/index.d.ts +1 -1
  52. package/dist/lib/components/ui/fields/choice-list/partials/choice-row.d.ts +9 -3
  53. package/dist/lib/components/ui/fields/choice-list/types.d.ts +20 -0
  54. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  55. package/dist/lib/components/ui/layout/record-page/record-details.d.ts +6 -6
  56. package/dist/lib/components/ui/media/file-list/file-list-describe.d.ts +8 -0
  57. package/dist/lib/components/ui/media/file-list/file-list-field-row.d.ts +4 -1
  58. package/dist/lib/components/ui/media/file-list/file-list-field.d.ts +13 -0
  59. package/dist/lib/components/ui/media/file-list/index.d.ts +1 -1
  60. package/dist/lib/components/ui/media/file-list/partials/file-list-items.d.ts +5 -1
  61. package/dist/lib/components/ui/media/file-list/partials/file-list-move-buttons.d.ts +9 -0
  62. package/dist/lib/components/ui/media/file-list/partials/file-list-row-actions.d.ts +3 -1
  63. package/dist/lib/components/ui/media/file-list/types.d.ts +9 -0
  64. package/dist/lib/components/ui/media/file-list/use-file-list-field.d.ts +7 -1
  65. package/dist/lib/components/ui/media/file-list/use-file-list-move.d.ts +24 -0
  66. package/dist/lib/components/ui/media/upload/network-upload-field/network-upload-item.d.ts +7 -0
  67. package/dist/lib/components/ui/widgets/editor/extensions/marks/compact-mark-buttons.d.ts +5 -1
  68. package/dist/lib/components/ui/widgets/editor/kit/editor-features.d.ts +2 -1
  69. package/dist/lib/components/ui/widgets/editor/kit/features/marks.d.ts +6 -1
  70. package/dist/lib/components/ui/widgets/event-calendar/backdrop.types.d.ts +75 -0
  71. package/dist/lib/components/ui/widgets/event-calendar/chrome.types.d.ts +12 -0
  72. package/dist/lib/components/ui/widgets/event-calendar/event-calendar-context.d.ts +8 -1
  73. package/dist/lib/components/ui/widgets/event-calendar/event-calendar-events.utils.d.ts +3 -1
  74. package/dist/lib/components/ui/widgets/event-calendar/event-calendar-shell.d.ts +1 -1
  75. package/dist/lib/components/ui/widgets/event-calendar/event-calendar.backdrop.d.ts +38 -0
  76. package/dist/lib/components/ui/widgets/event-calendar/event-calendar.badges.d.ts +14 -0
  77. package/dist/lib/components/ui/widgets/event-calendar/event-calendar.labels.d.ts +14 -1
  78. package/dist/lib/components/ui/widgets/event-calendar/event-calendar.lanes.d.ts +9 -0
  79. package/dist/lib/components/ui/widgets/event-calendar/event-calendar.read-only.d.ts +57 -0
  80. package/dist/lib/components/ui/widgets/event-calendar/event-calendar.resources.d.ts +6 -1
  81. package/dist/lib/components/ui/widgets/event-calendar/index.d.ts +2 -1
  82. package/dist/lib/components/ui/widgets/event-calendar/partials/all-day-bars.d.ts +14 -0
  83. package/dist/lib/components/ui/widgets/event-calendar/partials/backdrop-bands.d.ts +11 -0
  84. package/dist/lib/components/ui/widgets/event-calendar/partials/backdrop-bar.d.ts +11 -0
  85. package/dist/lib/components/ui/widgets/event-calendar/partials/backdrop-cell.d.ts +13 -0
  86. package/dist/lib/components/ui/widgets/event-calendar/partials/backdrop-row.d.ts +8 -0
  87. package/dist/lib/components/ui/widgets/event-calendar/partials/calendar-badge.d.ts +16 -0
  88. package/dist/lib/components/ui/widgets/event-calendar/partials/month-day-cell.d.ts +4 -1
  89. package/dist/lib/components/ui/widgets/event-calendar/partials/month-day-parts.d.ts +12 -1
  90. package/dist/lib/components/ui/widgets/event-calendar/partials/resource-header.d.ts +2 -1
  91. package/dist/lib/components/ui/widgets/event-calendar/partials/span-event.d.ts +3 -1
  92. package/dist/lib/components/ui/widgets/event-calendar/partials/time-grid-header-day.d.ts +3 -6
  93. package/dist/lib/components/ui/widgets/event-calendar/partials/zone-corner.d.ts +10 -2
  94. package/dist/lib/components/ui/widgets/event-calendar/template.types.d.ts +7 -2
  95. package/dist/lib/components/ui/widgets/event-calendar/types.d.ts +25 -13
  96. package/dist/lib/components/ui/widgets/event-calendar/use-backdrops.d.ts +8 -0
  97. package/dist/lib/components/ui/widgets/event-calendar/use-badges.d.ts +5 -0
  98. package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +3 -2
  99. package/dist/lib/components/ui/widgets/event-calendar/use-month-day.d.ts +6 -1
  100. package/dist/lib/components/ui/widgets/event-calendar/use-time-column.d.ts +1 -0
  101. package/dist/lib/i18n/resources/en/en.d.ts +10 -0
  102. package/dist/lib/i18n/resources/en/material.json.d.ts +11 -1
  103. package/dist/lib/i18n/resources/fr/fr.d.ts +10 -0
  104. package/dist/lib/i18n/resources/fr/material.json.d.ts +11 -1
  105. package/dist/lib/i18n/resources/resources.d.ts +20 -0
  106. package/dist/lib/i18n/translator.d.ts +1 -1
  107. package/dist/lib.js +1 -1
  108. package/dist/main.js +54 -54
  109. package/dist/map.js +7 -7
  110. package/dist/material.css +1 -1
  111. package/dist/pdf-reader.js +1 -1
  112. package/dist/{percent-field-DyJ2yOH4.js → percent-field-TWyupyr_.js} +1 -1
  113. package/dist/{picker-surface-CnlOKQ3D.js → picker-surface-CoNsDWxX.js} +4 -4
  114. package/dist/{popover-BevReSHi.js → popover-BA1U82Wk.js} +1 -1
  115. package/dist/{pos-types-BrZBX0Zg.js → pos-types-BQqv-kb6.js} +1 -1
  116. package/dist/{pos-variant-G12HCSfQ.js → pos-variant-D043n5y8.js} +4 -4
  117. package/dist/print.js +1 -1
  118. package/dist/{programmer-variant-WWLwTGRF.js → programmer-variant-jneMqtLs.js} +2 -2
  119. package/dist/{public-C1a6wQ6o.js → public-DgrbdeZj.js} +9 -9
  120. package/dist/{rich-code-block-Dh9J-VZ8.js → rich-code-block-CGNjHawR.js} +5 -5
  121. package/dist/{scientific-variant-BvutlF8a.js → scientific-variant-1L7brNNT.js} +2 -2
  122. package/dist/{sortable-provider-BrA5tfJX.js → sortable-provider-DZLV_svg.js} +2 -2
  123. package/dist/{spinner-JnLLiLIO.js → spinner-CQqRWxAW.js} +1 -1
  124. package/dist/{tabs-dXCZGShv.js → tabs-DQTx3C8e.js} +1 -1
  125. package/dist/theme-picker.js +2 -2
  126. package/dist/{theme-toggle-BmcK6mXV.js → theme-toggle-3NQ3VmJH.js} +1 -1
  127. package/dist/{toolbar-items-B-kMYsDT.js → toolbar-items-BYCdJGUf.js} +4 -4
  128. package/dist/{translate-material-BmpcP1p1.js → translate-material-jxfcGlD5.js} +1 -1
  129. package/dist/{translator-CfoXTrZd.js → translator-6XuDmqUJ.js} +18 -2
  130. package/dist/{use-chat-composer-DFD_eF-r.js → use-chat-composer-1eb4I1kM.js} +32 -31
  131. package/dist/{use-heading-spy-BcNK1qvq.js → use-heading-spy-CzPujlKr.js} +4 -4
  132. package/dist/{use-material-translation-DoymV6IP.js → use-material-translation-BUPqNmAg.js} +1 -1
  133. package/dist/{use-return-focus-CLEnhfka.js → use-return-focus-B_enQxp5.js} +1 -1
  134. package/docs/README.md +1 -0
  135. package/docs/components/data-display.md +6 -1
  136. package/docs/components/data-table-filter-and-lists.md +35 -0
  137. package/docs/components/form-fields.md +38 -5
  138. package/docs/components/media-and-files.md +16 -0
  139. package/docs/components/navigation-and-layout.md +1 -0
  140. package/docs/components/rich-widgets.md +73 -5
  141. package/docs/guides/event-calendar.md +163 -0
  142. package/docs/guides/forms.md +2 -1
  143. package/docs/guides/i18n.md +2 -0
  144. package/docs/previews/data-display-eventchip.webp +0 -0
  145. package/docs/previews/rich-widgets-eventcalendar.webp +0 -0
  146. package/docs/roadmap.md +12 -0
  147. package/lib/components/components.css +1 -0
  148. package/lib/components/ui/widgets/event-calendar/event-calendar-backdrop.css +43 -0
  149. package/package.json +3 -3
@@ -0,0 +1,16 @@
1
+ import { CalendarEventBadge } from '../types.js';
2
+ /**
3
+ * A day's or a week's badge: a small soft pill, or with `dot` (where the room
4
+ * is short, such as a phone's column) a short tone bar whose label is its tooltip
5
+ * and, hidden visually, its text. The container that names it (a button, a
6
+ * cell) holds the label in its own name.
7
+ */
8
+ export declare function CalendarBadge({ badge, slot, dot, wrap, className, }: {
9
+ badge: CalendarEventBadge;
10
+ /** The `data-slot` of the pill; the dot adds `-dot`. */
11
+ slot: string;
12
+ dot?: boolean;
13
+ /** The label may take two lines instead of one clipped (a narrow corner). */
14
+ wrap?: boolean;
15
+ className?: string;
16
+ }): import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { MutableRefObject } from 'react';
2
- export declare function MonthDayCell({ day, month, draft, draggedRef, }: {
2
+ import { CalendarEventBadge } from '../types.js';
3
+ export declare function MonthDayCell({ day, month, draft, draggedRef, weekBadge, }: {
3
4
  day: Date;
4
5
  month: Date;
5
6
  draft: {
@@ -7,4 +8,6 @@ export declare function MonthDayCell({ day, month, draft, draggedRef, }: {
7
8
  to: Date;
8
9
  } | null;
9
10
  draggedRef: MutableRefObject<boolean>;
11
+ /** The week's badge, given to the first cell of the row. */
12
+ weekBadge?: CalendarEventBadge;
10
13
  }): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { CalendarEvent } from '../types.js';
1
+ import { CalendarEvent, CalendarEventBadge } from '../types.js';
2
2
  /** The day number in a month cell: a filled disc today, a ring on the phone's chosen day. */
3
3
  export declare function MonthDayNumber({ day, isToday, isCursor, outside, }: {
4
4
  day: Date;
@@ -10,3 +10,14 @@ export declare function MonthDayNumber({ day, isToday, isCursor, outside, }: {
10
10
  export declare function MonthDayDots({ items }: {
11
11
  items: CalendarEvent[];
12
12
  }): import("react").JSX.Element;
13
+ /**
14
+ * The day number with the day's badge: a pill beside it, or on a phone (where
15
+ * the cell has no room) a tone dot in the cell's top corner.
16
+ */
17
+ export declare function MonthDayTop({ badge, ...number }: React.ComponentProps<typeof MonthDayNumber> & {
18
+ badge?: CalendarEventBadge;
19
+ }): import("react").JSX.Element;
20
+ /** The week's badge on the first cell of a row: a pill along its foot, or a dot on a phone. */
21
+ export declare function MonthWeekBadge({ badge }: {
22
+ badge: CalendarEventBadge;
23
+ }): import("react").JSX.Element;
@@ -5,7 +5,8 @@ import { ResourceColumn } from '../event-calendar.resources.js';
5
5
  * column, its label and description. It stays above the hours while they
6
6
  * scroll, and the gutter's corner names the zone's offset when there is one.
7
7
  */
8
- export declare function ResourceHeader({ columns, zoneLabel, zone, }: {
8
+ export declare function ResourceHeader({ day, columns, zoneLabel, zone, }: {
9
+ day: Date;
9
10
  columns: ResourceColumn[];
10
11
  zoneLabel?: ReactNode;
11
12
  zone?: string;
@@ -1,4 +1,6 @@
1
1
  import { SpanSegment } from '../event-calendar.spans.js';
2
- export declare function SpanEvent({ segment }: {
2
+ export declare function SpanEvent({ segment, rowOffset, }: {
3
3
  segment: SpanSegment;
4
+ /** Rows above it taken by the backdrop spans of the all-day strip. */
5
+ rowOffset?: number;
4
6
  }): import("react").JSX.Element;
@@ -1,9 +1,6 @@
1
- /**
2
- * One day of the grid's header: the weekday and a large date, today's filled.
3
- * With `canOpen` (a week that offers the day view) it is a button that opens
4
- * that day.
5
- */
6
- export declare function HeaderDay({ day, canOpen }: {
1
+ export declare function HeaderDay({ day, canOpen, dot, }: {
7
2
  day: Date;
8
3
  canOpen: boolean;
4
+ /** The day's badge is a tone dot, for a column too narrow for its pill. */
5
+ dot?: boolean;
9
6
  }): import("react").JSX.Element;
@@ -1,10 +1,18 @@
1
1
  import { ReactNode } from 'react';
2
+ import { CalendarEventBadge } from '../types.js';
2
3
  /**
3
4
  * The gutter's corner above the hours: it names the zone's offset (`UTC+1`)
4
- * when the calendar has a `timeZone`, and stays an empty cell otherwise.
5
+ * when the calendar has a `timeZone`, carries the week's badge, and stays an
6
+ * empty cell otherwise. The badges are tone dots where the gutter is narrow
7
+ * (a phone).
5
8
  */
6
- export declare function ZoneCorner({ zoneLabel, zone, className, }: {
9
+ export declare function ZoneCorner({ zoneLabel, zone, badges, className, }: {
7
10
  zoneLabel?: ReactNode;
8
11
  zone?: string;
12
+ /** The week's badge, and in a day view with resources the day's. */
13
+ badges?: {
14
+ badge: CalendarEventBadge;
15
+ slot: string;
16
+ }[];
9
17
  className?: string;
10
18
  }): import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { EventCalendarProps } from './types.js';
2
+ import { Tone } from '../../tones.js';
3
+ import { CalendarEventStatus, EventCalendarProps } from './types.js';
3
4
  /** ISO weekday: 1 is Monday, 7 is Sunday. */
4
5
  export type EventCalendarWeekday = 1 | 2 | 3 | 4 | 5 | 6 | 7;
5
6
  /**
@@ -15,6 +16,10 @@ export type EventCalendarTemplateEvent = {
15
16
  /** The alternating week it belongs to (an `EventCalendarLane` id); none: every week. */
16
17
  lane?: string;
17
18
  color?: string;
19
+ /** A tone the event is drawn in: `color` wins over it. */
20
+ tone?: Tone;
21
+ /** `'cancelled'`: struck through, muted and named so. */
22
+ status?: CalendarEventStatus;
18
23
  description?: string;
19
24
  disabled?: boolean;
20
25
  };
@@ -41,7 +46,7 @@ export type EventCalendarTemplateChange = {
41
46
  * slots and changes are keyed by weekday and time. The month, day and agenda
42
47
  * views do not apply: `view` is `week` (the default) or `workweek`.
43
48
  */
44
- export type EventCalendarTemplateProps = Pick<EventCalendarProps, 'disabled' | 'className' | 'toolbar' | 'searchable' | 'density' | 'eventVariant' | 'startHour' | 'endHour' | 'hourHeight' | 'slotDurationMinutes' | 'scrollToHour' | 'eventPreview' | 'previewFields'> & {
49
+ export type EventCalendarTemplateProps = Pick<EventCalendarProps, 'disabled' | 'readOnlyEvents' | 'className' | 'toolbar' | 'searchable' | 'density' | 'eventVariant' | 'startHour' | 'endHour' | 'hourHeight' | 'slotDurationMinutes' | 'scrollToHour' | 'eventPreview' | 'previewFields'> & {
45
50
  mode: 'template';
46
51
  events?: EventCalendarTemplateEvent[];
47
52
  defaultEvents?: EventCalendarTemplateEvent[];
@@ -2,7 +2,10 @@ import { ReactNode } from 'react';
2
2
  import { EventChipBadge } from '../../display/event-chip/event-chip.js';
3
3
  import { EventChipVariant } from '../../display/event-chip/event-chip.classes.js';
4
4
  import { Tone } from '../../tones.js';
5
+ import { EventCalendarDayMarksProps } from './backdrop.types.js';
5
6
  export type EventCalendarView = 'month' | 'week' | 'workweek' | 'day' | 'agenda';
7
+ /** Whether an event takes place: `cancelled` is drawn struck through and muted, and named so. */
8
+ export type CalendarEventStatus = 'scheduled' | 'cancelled';
6
9
  export type CalendarEvent = {
7
10
  id: string;
8
11
  title: string;
@@ -25,6 +28,19 @@ export type CalendarEvent = {
25
28
  * box is too small it is hidden visually and still read.
26
29
  */
27
30
  badge?: CalendarEventBadge;
31
+ /**
32
+ * Further badges, drawn after `badge` in the same places (a status, then a
33
+ * priority and a progress count). Each is part of the accessible name and
34
+ * becomes a tone dot where the box is narrow or short.
35
+ */
36
+ badges?: CalendarEventBadge[];
37
+ /**
38
+ * A tone of the library (`'success'`, or one an app declared) the event is
39
+ * drawn in. Colour precedence: `color`, then `tone`, then the resource's.
40
+ */
41
+ tone?: Tone;
42
+ /** `'cancelled'` strikes the title, mutes the chip and adds "Cancelled" to its name; it stays draggable. */
43
+ status?: CalendarEventStatus;
28
44
  };
29
45
  export type CalendarEventBadge = EventChipBadge;
30
46
  /** A column of the day view: a room, a person, a team. */
@@ -53,18 +69,7 @@ export type EventCalendarSlot = {
53
69
  };
54
70
  /** `comfortable` (the default) or `compact`: shorter hours and month cells. */
55
71
  export type EventCalendarDensity = 'comfortable' | 'compact';
56
- export type EventCalendarChromeState = {
57
- focusedEventId: string | null;
58
- query: string;
59
- /** The way the last move went (-1 back, 1 forward): the view slides from it. */
60
- direction: -1 | 0 | 1;
61
- /** A view was picked in the switcher: `phoneView` no longer applies. */
62
- viewPicked: boolean;
63
- /** The keyboard moved the cursor: its day takes the focus once rendered. */
64
- dayFocus: boolean;
65
- /** The resource the phone's switcher shows; `null` is the first. */
66
- resourceId: string | null;
67
- };
72
+ export type { EventCalendarChromeState } from './chrome.types.js';
68
73
  /** A field of the event preview popover. */
69
74
  export type EventCalendarPreviewField = 'title' | 'color' | 'description';
70
75
  export type EventCalendarRenderEvent = (event: CalendarEvent) => ReactNode;
@@ -107,6 +112,13 @@ export type EventCalendarProps = {
107
112
  hourHeight?: number;
108
113
  slotDurationMinutes?: number;
109
114
  disabled?: boolean;
115
+ /**
116
+ * No event can be dragged, resized, moved by key, edited or deleted, yet
117
+ * each stays focusable, clickable and at full strength; `onSlotClick` still
118
+ * fires. Not `disabled` (the whole calendar) nor `CalendarEvent.disabled`
119
+ * (dims one event, swallows its clicks). Default `false`.
120
+ */
121
+ readOnlyEvents?: boolean;
110
122
  className?: string;
111
123
  renderEvent?: EventCalendarRenderEvent;
112
124
  toolbar?: ReactNode;
@@ -147,7 +159,7 @@ export type EventCalendarProps = {
147
159
  * development). Without it, the machine's clock.
148
160
  */
149
161
  timeZone?: string;
150
- };
162
+ } & EventCalendarDayMarksProps;
151
163
  export type LaidOutEvent = {
152
164
  event: CalendarEvent;
153
165
  column: number;
@@ -0,0 +1,8 @@
1
+ import { BackdropLane, BackdropSegment } from './backdrop.types.js';
2
+ /** The spans on one day (of one resource column, when given), for the view to shade. */
3
+ export declare function useDaySpans(day: Date, resourceId?: string | null): BackdropSegment[];
4
+ /** The whole-day spans as bars over `days`, and the rows they take above the events. */
5
+ export declare function useBackdropLanes(days: Date[], resourceId?: string | null): {
6
+ lanes: BackdropLane[];
7
+ rows: number;
8
+ };
@@ -0,0 +1,5 @@
1
+ import { CalendarEventBadge } from './types.js';
2
+ /** The badge set on a day (`dayBadges`), if any. */
3
+ export declare function useDayBadge(day: Date): CalendarEventBadge | undefined;
4
+ /** The badge set on the week a day falls in (`weekBadges`, keyed by the week's first day). */
5
+ export declare function useWeekBadge(day: Date): CalendarEventBadge | undefined;
@@ -1,12 +1,12 @@
1
1
  import { CalendarEvent, EventCalendarProps, EventCalendarView } from './types.js';
2
- export type UseEventCalendarOptions = Pick<EventCalendarProps, 'events' | 'defaultEvents' | 'onEventsChange' | 'onChange' | 'view' | 'defaultView' | 'onViewChange' | 'date' | 'defaultDate' | 'onDateChange' | 'disabled' | 'startHour' | 'endHour' | 'hourHeight' | 'slotDurationMinutes' | 'weekStartsOn' | 'density' | 'now' | 'resources' | 'timeZone'>;
2
+ export type UseEventCalendarOptions = Pick<EventCalendarProps, 'events' | 'defaultEvents' | 'onEventsChange' | 'onChange' | 'view' | 'defaultView' | 'onViewChange' | 'date' | 'defaultDate' | 'onDateChange' | 'disabled' | 'readOnlyEvents' | 'startHour' | 'endHour' | 'hourHeight' | 'slotDurationMinutes' | 'weekStartsOn' | 'density' | 'now' | 'resources' | 'timeZone'>;
3
3
  export declare function useEventCalendar(options: UseEventCalendarOptions): {
4
4
  events: CalendarEvent[];
5
5
  eventsById: Map<string, CalendarEvent>;
6
6
  view: EventCalendarView;
7
7
  cursor: string;
8
8
  cursorDate: Date;
9
- chrome: import('./types.js').EventCalendarChromeState;
9
+ chrome: import('./chrome.types.js').EventCalendarChromeState;
10
10
  chromeActions: {
11
11
  setFocusedEventId: (payload: string | null) => void;
12
12
  setQuery: (payload: string) => void;
@@ -16,6 +16,7 @@ export declare function useEventCalendar(options: UseEventCalendarOptions): {
16
16
  pickView: (noArgument?: void | undefined) => void;
17
17
  };
18
18
  disabled: boolean;
19
+ readOnlyEvents: boolean;
19
20
  startHour: number;
20
21
  endHour: number;
21
22
  hourHeight: number;
@@ -1,18 +1,23 @@
1
+ import { CalendarEventBadge } from './types.js';
1
2
  /**
2
3
  * What a month cell derives and does: its events, its flags (today, outside
3
4
  * the month, the cursor, inside the dragged range), its spoken label, and
4
5
  * what a click or key does (choose the day on a phone, open the day's
5
6
  * dialog, or start a new event).
6
7
  */
7
- export declare function useMonthDay({ day, month, draft, }: {
8
+ export declare function useMonthDay({ day, month, draft, weekBadge, }: {
8
9
  day: Date;
9
10
  month: Date;
10
11
  draft: {
11
12
  from: Date;
12
13
  to: Date;
13
14
  } | null;
15
+ /** The week's badge, on the first cell of a row. */
16
+ weekBadge?: CalendarEventBadge;
14
17
  }): {
15
18
  items: import('./types.js').CalendarEvent[];
19
+ backdrop: import('./backdrop.types.js').BackdropSegment[];
20
+ dayBadge: import('../../display/index.js').EventChipBadge | undefined;
16
21
  outside: boolean;
17
22
  isToday: boolean;
18
23
  isCursor: boolean;
@@ -19,4 +19,5 @@ export declare function useTimeColumn(day: Date, axis: DayAxis, resource: Resour
19
19
  onPointerUp: (event: import('react').PointerEvent<HTMLElement>) => void;
20
20
  };
21
21
  onClick: (event: MouseEvent<HTMLDivElement>) => void;
22
+ backdrop: import('./backdrop.types.js').BackdropSegment[];
22
23
  };
@@ -1336,6 +1336,9 @@ export declare const en: {
1336
1336
  remove: string;
1337
1337
  replace: string;
1338
1338
  retry: string;
1339
+ "move-up": string;
1340
+ "move-down": string;
1341
+ moved: string;
1339
1342
  };
1340
1343
  "inline-edit": {
1341
1344
  edit: string;
@@ -1816,6 +1819,7 @@ export declare const en: {
1816
1819
  events: string;
1817
1820
  more: string;
1818
1821
  drag: string;
1822
+ label: string;
1819
1823
  add: string;
1820
1824
  resize: string;
1821
1825
  "new-event": string;
@@ -1835,8 +1839,13 @@ export declare const en: {
1835
1839
  resource: string;
1836
1840
  lane: string;
1837
1841
  "lane-all": string;
1842
+ cancelled: string;
1843
+ "week-badge": string;
1838
1844
  "time-zone": string;
1839
1845
  };
1846
+ "event-chip": {
1847
+ cancelled: string;
1848
+ };
1840
1849
  dnd: {
1841
1850
  drag: string;
1842
1851
  };
@@ -2274,6 +2283,7 @@ export declare const en: {
2274
2283
  "none-single": string;
2275
2284
  "none-multiple": string;
2276
2285
  blank: string;
2286
+ detail: string;
2277
2287
  "text-required": string;
2278
2288
  };
2279
2289
  "repeatable-group": {
@@ -1325,7 +1325,10 @@ declare const _default: {
1325
1325
  "download": "Download",
1326
1326
  "remove": "Remove",
1327
1327
  "replace": "Replace",
1328
- "retry": "Retry"
1328
+ "retry": "Retry",
1329
+ "move-up": "Move {name} up",
1330
+ "move-down": "Move {name} down",
1331
+ "moved": "Moved {name} to position {to}"
1329
1332
  },
1330
1333
  "inline-edit": {
1331
1334
  "edit": "Edit",
@@ -1806,6 +1809,7 @@ declare const _default: {
1806
1809
  "events": "{count, plural, one {# event} other {# events}}",
1807
1810
  "more": "+{count} more",
1808
1811
  "drag": "Drag event",
1812
+ "label": "Event calendar",
1809
1813
  "add": "Add event",
1810
1814
  "resize": "Resize event",
1811
1815
  "new-event": "New event",
@@ -1825,8 +1829,13 @@ declare const _default: {
1825
1829
  "resource": "Resource",
1826
1830
  "lane": "Week",
1827
1831
  "lane-all": "All weeks",
1832
+ "cancelled": "Cancelled",
1833
+ "week-badge": "Week: {label}",
1828
1834
  "time-zone": "Time zone: {zone}"
1829
1835
  },
1836
+ "event-chip": {
1837
+ "cancelled": "Cancelled"
1838
+ },
1830
1839
  "dnd": {
1831
1840
  "drag": "Drag"
1832
1841
  },
@@ -2264,6 +2273,7 @@ declare const _default: {
2264
2273
  "none-single": "Mark the correct {label}",
2265
2274
  "none-multiple": "Mark at least one correct {label}",
2266
2275
  "blank": "Fill in every {label}",
2276
+ "detail": "Explanation",
2267
2277
  "text-required": "Enter the {label}"
2268
2278
  },
2269
2279
  "repeatable-group": {
@@ -1336,6 +1336,9 @@ export declare const fr: {
1336
1336
  remove: string;
1337
1337
  replace: string;
1338
1338
  retry: string;
1339
+ "move-up": string;
1340
+ "move-down": string;
1341
+ moved: string;
1339
1342
  };
1340
1343
  "inline-edit": {
1341
1344
  edit: string;
@@ -1816,6 +1819,7 @@ export declare const fr: {
1816
1819
  events: string;
1817
1820
  more: string;
1818
1821
  drag: string;
1822
+ label: string;
1819
1823
  add: string;
1820
1824
  resize: string;
1821
1825
  "new-event": string;
@@ -1835,8 +1839,13 @@ export declare const fr: {
1835
1839
  resource: string;
1836
1840
  lane: string;
1837
1841
  "lane-all": string;
1842
+ cancelled: string;
1843
+ "week-badge": string;
1838
1844
  "time-zone": string;
1839
1845
  };
1846
+ "event-chip": {
1847
+ cancelled: string;
1848
+ };
1840
1849
  dnd: {
1841
1850
  drag: string;
1842
1851
  };
@@ -2274,6 +2283,7 @@ export declare const fr: {
2274
2283
  "none-single": string;
2275
2284
  "none-multiple": string;
2276
2285
  blank: string;
2286
+ detail: string;
2277
2287
  "text-required": string;
2278
2288
  };
2279
2289
  "repeatable-group": {
@@ -1325,7 +1325,10 @@ declare const _default: {
1325
1325
  "download": "Télécharger",
1326
1326
  "remove": "Retirer",
1327
1327
  "replace": "Remplacer",
1328
- "retry": "Réessayer"
1328
+ "retry": "Réessayer",
1329
+ "move-up": "Monter {name}",
1330
+ "move-down": "Descendre {name}",
1331
+ "moved": "{name} déplacé en position {to}"
1329
1332
  },
1330
1333
  "inline-edit": {
1331
1334
  "edit": "Modifier",
@@ -1806,6 +1809,7 @@ declare const _default: {
1806
1809
  "events": "{count, plural, one {# événement} other {# événements}}",
1807
1810
  "more": "+{count} de plus",
1808
1811
  "drag": "Déplacer l'événement",
1812
+ "label": "Calendrier d'événements",
1809
1813
  "add": "Ajouter un événement",
1810
1814
  "resize": "Redimensionner l'événement",
1811
1815
  "new-event": "Nouvel événement",
@@ -1825,8 +1829,13 @@ declare const _default: {
1825
1829
  "resource": "Ressource",
1826
1830
  "lane": "Semaine",
1827
1831
  "lane-all": "Toutes les semaines",
1832
+ "cancelled": "Annulé",
1833
+ "week-badge": "Semaine : {label}",
1828
1834
  "time-zone": "Fuseau horaire : {zone}"
1829
1835
  },
1836
+ "event-chip": {
1837
+ "cancelled": "Annulé"
1838
+ },
1830
1839
  "dnd": {
1831
1840
  "drag": "Déplacer"
1832
1841
  },
@@ -2264,6 +2273,7 @@ declare const _default: {
2264
2273
  "none-single": "Indiquez la {label} juste",
2265
2274
  "none-multiple": "Indiquez au moins une {label} juste",
2266
2275
  "blank": "Remplissez chaque {label}",
2276
+ "detail": "Explication",
2267
2277
  "text-required": "Saisissez la {label}"
2268
2278
  },
2269
2279
  "repeatable-group": {
@@ -1334,6 +1334,9 @@ export declare const resources: {
1334
1334
  remove: string;
1335
1335
  replace: string;
1336
1336
  retry: string;
1337
+ "move-up": string;
1338
+ "move-down": string;
1339
+ moved: string;
1337
1340
  };
1338
1341
  "inline-edit": {
1339
1342
  edit: string;
@@ -1814,6 +1817,7 @@ export declare const resources: {
1814
1817
  events: string;
1815
1818
  more: string;
1816
1819
  drag: string;
1820
+ label: string;
1817
1821
  add: string;
1818
1822
  resize: string;
1819
1823
  "new-event": string;
@@ -1833,8 +1837,13 @@ export declare const resources: {
1833
1837
  resource: string;
1834
1838
  lane: string;
1835
1839
  "lane-all": string;
1840
+ cancelled: string;
1841
+ "week-badge": string;
1836
1842
  "time-zone": string;
1837
1843
  };
1844
+ "event-chip": {
1845
+ cancelled: string;
1846
+ };
1838
1847
  dnd: {
1839
1848
  drag: string;
1840
1849
  };
@@ -2272,6 +2281,7 @@ export declare const resources: {
2272
2281
  "none-single": string;
2273
2282
  "none-multiple": string;
2274
2283
  blank: string;
2284
+ detail: string;
2275
2285
  "text-required": string;
2276
2286
  };
2277
2287
  "repeatable-group": {
@@ -4883,6 +4893,9 @@ export declare const resources: {
4883
4893
  remove: string;
4884
4894
  replace: string;
4885
4895
  retry: string;
4896
+ "move-up": string;
4897
+ "move-down": string;
4898
+ moved: string;
4886
4899
  };
4887
4900
  "inline-edit": {
4888
4901
  edit: string;
@@ -5363,6 +5376,7 @@ export declare const resources: {
5363
5376
  events: string;
5364
5377
  more: string;
5365
5378
  drag: string;
5379
+ label: string;
5366
5380
  add: string;
5367
5381
  resize: string;
5368
5382
  "new-event": string;
@@ -5382,8 +5396,13 @@ export declare const resources: {
5382
5396
  resource: string;
5383
5397
  lane: string;
5384
5398
  "lane-all": string;
5399
+ cancelled: string;
5400
+ "week-badge": string;
5385
5401
  "time-zone": string;
5386
5402
  };
5403
+ "event-chip": {
5404
+ cancelled: string;
5405
+ };
5387
5406
  dnd: {
5388
5407
  drag: string;
5389
5408
  };
@@ -5821,6 +5840,7 @@ export declare const resources: {
5821
5840
  "none-single": string;
5822
5841
  "none-multiple": string;
5823
5842
  blank: string;
5843
+ detail: string;
5824
5844
  "text-required": string;
5825
5845
  };
5826
5846
  "repeatable-group": {