calendarkit-prov2 2.0.9 → 2.0.11

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/README.md CHANGED
@@ -175,6 +175,7 @@ import type {
175
175
  | `language` | `LanguageCode` | `'tr'` | UI language (15+ locales) |
176
176
  | `onLanguageChange` | `(lang) => void` | — | Language change handler |
177
177
  | `hideLanguageSwitcher` | `boolean` | `false` | Hide the language dropdown from the header. The `language` prop still sets the active locale. |
178
+ | `hourCount` | `number` | — | Optional hour total shown as a clock badge next to the event count. Hidden when omitted. |
178
179
  | `locale` | `Locale` | — | date-fns locale for date formatting |
179
180
  | `isDarkMode` | `boolean` | — | Dark mode state |
180
181
  | `onThemeToggle` | `() => void` | — | Theme toggle handler |
@@ -208,6 +209,19 @@ The header automatically displays a **live event count badge** next to the view
208
209
 
209
210
  The badge updates automatically when you navigate or filter calendars.
210
211
 
212
+ ### Hour count badge
213
+
214
+ Pass `hourCount` to show a **clock badge** next to the event count. The library does not calculate this number — you decide what it means (booked hours, remaining hours, billable hours, etc.).
215
+
216
+ ```tsx
217
+ <ProScheduler
218
+ hourCount={12.5}
219
+ ...
220
+ />
221
+ ```
222
+
223
+ Omit the prop to hide the badge. Decimal values are supported.
224
+
211
225
  ### Create Event button
212
226
 
213
227
  The **Create Event** button in the header displays only the `+` icon. Hovering over it reveals a tooltip with the label. On mobile, a floating action button (FAB) is shown instead.
package/dist/index.d.mts CHANGED
@@ -221,6 +221,8 @@ interface CalendarTranslations {
221
221
  tomorrow: string;
222
222
  eventCount: string;
223
223
  eventsCount: string;
224
+ hourCount: string;
225
+ hoursCount: string;
224
226
  timezone: string;
225
227
  localTime: string;
226
228
  operations: string;
@@ -270,9 +272,10 @@ interface CalendarProps {
270
272
  */
271
273
  hideFab?: boolean;
272
274
  /**
273
- * When true (default), short timed events hide secondary details (time range, description)
274
- * to fit the card: Week under 60 min, Day under 45 min.
275
- * Set to false to always show title + time (+ description when space allows).
275
+ * When true (default), short timed events show title only on the card;
276
+ * hovering reveals a popover with time, description, badge, and meta.
277
+ * Thresholds: Week under 60 min, Day under 45 min.
278
+ * Set to false to always show details inline on the card.
276
279
  */
277
280
  compactShortEvents?: boolean;
278
281
  /**
@@ -293,6 +296,13 @@ interface CalendarProps {
293
296
  * The `language` prop still sets the active locale; it just won't be user-changeable.
294
297
  */
295
298
  hideLanguageSwitcher?: boolean;
299
+ /**
300
+ * Optional hour total shown as a clock badge next to the event-count badge
301
+ * in the header. The library does not compute this — pass whatever number
302
+ * your app wants to display (e.g. booked hours in the current view).
303
+ * Hidden when omitted.
304
+ */
305
+ hourCount?: number;
296
306
  /**
297
307
  * Replace the default event form/modal with a fully custom component.
298
308
  * Receives open state, the event being edited, and save/delete handlers.
package/dist/index.d.ts CHANGED
@@ -221,6 +221,8 @@ interface CalendarTranslations {
221
221
  tomorrow: string;
222
222
  eventCount: string;
223
223
  eventsCount: string;
224
+ hourCount: string;
225
+ hoursCount: string;
224
226
  timezone: string;
225
227
  localTime: string;
226
228
  operations: string;
@@ -270,9 +272,10 @@ interface CalendarProps {
270
272
  */
271
273
  hideFab?: boolean;
272
274
  /**
273
- * When true (default), short timed events hide secondary details (time range, description)
274
- * to fit the card: Week under 60 min, Day under 45 min.
275
- * Set to false to always show title + time (+ description when space allows).
275
+ * When true (default), short timed events show title only on the card;
276
+ * hovering reveals a popover with time, description, badge, and meta.
277
+ * Thresholds: Week under 60 min, Day under 45 min.
278
+ * Set to false to always show details inline on the card.
276
279
  */
277
280
  compactShortEvents?: boolean;
278
281
  /**
@@ -293,6 +296,13 @@ interface CalendarProps {
293
296
  * The `language` prop still sets the active locale; it just won't be user-changeable.
294
297
  */
295
298
  hideLanguageSwitcher?: boolean;
299
+ /**
300
+ * Optional hour total shown as a clock badge next to the event-count badge
301
+ * in the header. The library does not compute this — pass whatever number
302
+ * your app wants to display (e.g. booked hours in the current view).
303
+ * Hidden when omitted.
304
+ */
305
+ hourCount?: number;
296
306
  /**
297
307
  * Replace the default event form/modal with a fully custom component.
298
308
  * Receives open state, the event being edited, and save/delete handlers.