@kumix/ui 0.1.2 → 0.2.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/README.md +118 -88
- package/dist/components/reui/alert.d.ts +12 -0
- package/dist/components/reui/alert.d.ts.map +1 -0
- package/dist/components/reui/alert.js +58 -0
- package/dist/components/reui/alert.js.map +1 -0
- package/dist/components/reui/autocomplete.d.ts +43 -0
- package/dist/components/reui/autocomplete.d.ts.map +1 -0
- package/dist/components/reui/autocomplete.js +165 -0
- package/dist/components/reui/autocomplete.js.map +1 -0
- package/dist/components/reui/badge.d.ts +17 -0
- package/dist/components/reui/badge.d.ts.map +1 -0
- package/dist/components/reui/badge.js +75 -0
- package/dist/components/reui/badge.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-column-filter.d.ts +17 -0
- package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-column-filter.js +127 -0
- package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-column-header.d.ts +18 -0
- package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-column-header.js +228 -0
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts +10 -0
- package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-column-visibility.js +28 -0
- package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-pagination.d.ts +22 -0
- package/dist/components/reui/data-grid/data-grid-pagination.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-pagination.js +144 -0
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts +12 -0
- package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +289 -0
- package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts +14 -0
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +166 -0
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts +10 -0
- package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +171 -0
- package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +29 -0
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +269 -0
- package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-table.d.ts +116 -0
- package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-table.js +864 -0
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid.d.ts +112 -0
- package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid.js +134 -0
- package/dist/components/reui/data-grid/data-grid.js.map +1 -0
- package/dist/components/reui/date-selector.d.ts +131 -0
- package/dist/components/reui/date-selector.d.ts.map +1 -0
- package/dist/components/reui/date-selector.js +783 -0
- package/dist/components/reui/date-selector.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts +7 -0
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +108 -0
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-content.d.ts +15 -0
- package/dist/components/reui/event-calendar/event-calendar-content.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-content.js +44 -0
- package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts +30 -0
- package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-dnd.js +581 -0
- package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-event.d.ts +73 -0
- package/dist/components/reui/event-calendar/event-calendar-event.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-event.js +299 -0
- package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts +103 -0
- package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-i18n.js +141 -0
- package/dist/components/reui/event-calendar/event-calendar-i18n.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-lib.d.ts +111 -0
- package/dist/components/reui/event-calendar/event-calendar-lib.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-lib.js +398 -0
- package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts +29 -0
- package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-month-view.js +530 -0
- package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-nav.d.ts +71 -0
- package/dist/components/reui/event-calendar/event-calendar-nav.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-nav.js +319 -0
- package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts +32 -0
- package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-recurrence.js +300 -0
- package/dist/components/reui/event-calendar/event-calendar-recurrence.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts +14 -0
- package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js +355 -0
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts +35 -0
- package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js +651 -0
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-types.d.ts +236 -0
- package/dist/components/reui/event-calendar/event-calendar-types.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-types.js +2 -0
- package/dist/components/reui/event-calendar/event-calendar.d.ts +561 -0
- package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar.js +817 -0
- package/dist/components/reui/event-calendar/event-calendar.js.map +1 -0
- package/dist/components/reui/filters.d.ts +176 -0
- package/dist/components/reui/filters.d.ts.map +1 -0
- package/dist/components/reui/filters.js +1216 -0
- package/dist/components/reui/filters.js.map +1 -0
- package/dist/components/reui/frame.d.ts +32 -0
- package/dist/components/reui/frame.d.ts.map +1 -0
- package/dist/components/reui/frame.js +115 -0
- package/dist/components/reui/frame.js.map +1 -0
- package/dist/components/reui/gantt/gantt-bar.d.ts +44 -0
- package/dist/components/reui/gantt/gantt-bar.d.ts.map +1 -0
- package/dist/components/reui/gantt/gantt-bar.js +229 -0
- package/dist/components/reui/gantt/gantt-bar.js.map +1 -0
- package/dist/components/reui/gantt/gantt-dnd.d.ts +36 -0
- package/dist/components/reui/gantt/gantt-dnd.d.ts.map +1 -0
- package/dist/components/reui/gantt/gantt-dnd.js +615 -0
- package/dist/components/reui/gantt/gantt-dnd.js.map +1 -0
- package/dist/components/reui/gantt/gantt-i18n.d.ts +91 -0
- package/dist/components/reui/gantt/gantt-i18n.d.ts.map +1 -0
- package/dist/components/reui/gantt/gantt-i18n.js +131 -0
- package/dist/components/reui/gantt/gantt-i18n.js.map +1 -0
- package/dist/components/reui/gantt/gantt-lib.d.ts +123 -0
- package/dist/components/reui/gantt/gantt-lib.d.ts.map +1 -0
- package/dist/components/reui/gantt/gantt-lib.js +354 -0
- package/dist/components/reui/gantt/gantt-lib.js.map +1 -0
- package/dist/components/reui/gantt/gantt-nav.d.ts +60 -0
- package/dist/components/reui/gantt/gantt-nav.d.ts.map +1 -0
- package/dist/components/reui/gantt/gantt-nav.js +266 -0
- package/dist/components/reui/gantt/gantt-nav.js.map +1 -0
- package/dist/components/reui/gantt/gantt-recurrence.d.ts +37 -0
- package/dist/components/reui/gantt/gantt-recurrence.d.ts.map +1 -0
- package/dist/components/reui/gantt/gantt-recurrence.js +230 -0
- package/dist/components/reui/gantt/gantt-recurrence.js.map +1 -0
- package/dist/components/reui/gantt/gantt-types.d.ts +251 -0
- package/dist/components/reui/gantt/gantt-types.d.ts.map +1 -0
- package/dist/components/reui/gantt/gantt-types.js +2 -0
- package/dist/components/reui/gantt/gantt-view.d.ts +10 -0
- package/dist/components/reui/gantt/gantt-view.d.ts.map +1 -0
- package/dist/components/reui/gantt/gantt-view.js +2193 -0
- package/dist/components/reui/gantt/gantt-view.js.map +1 -0
- package/dist/components/reui/gantt/gantt.d.ts +602 -0
- package/dist/components/reui/gantt/gantt.d.ts.map +1 -0
- package/dist/components/reui/gantt/gantt.js +796 -0
- package/dist/components/reui/gantt/gantt.js.map +1 -0
- package/dist/components/reui/icon-stack.d.ts +7 -0
- package/dist/components/reui/icon-stack.d.ts.map +1 -0
- package/dist/components/reui/icon-stack.js +76 -0
- package/dist/components/reui/icon-stack.js.map +1 -0
- package/dist/components/reui/kanban.d.ts +70 -0
- package/dist/components/reui/kanban.d.ts.map +1 -0
- package/dist/components/reui/kanban.js +519 -0
- package/dist/components/reui/kanban.js.map +1 -0
- package/dist/components/reui/number-field.d.ts +29 -0
- package/dist/components/reui/number-field.d.ts.map +1 -0
- package/dist/components/reui/number-field.js +127 -0
- package/dist/components/reui/number-field.js.map +1 -0
- package/dist/components/reui/phone-input.d.ts +13 -0
- package/dist/components/reui/phone-input.d.ts.map +1 -0
- package/dist/components/reui/phone-input.js +126 -0
- package/dist/components/reui/phone-input.js.map +1 -0
- package/dist/components/reui/rating.d.ts +34 -0
- package/dist/components/reui/rating.d.ts.map +1 -0
- package/dist/components/reui/rating.js +94 -0
- package/dist/components/reui/rating.js.map +1 -0
- package/dist/components/reui/scrollspy.d.ts +17 -0
- package/dist/components/reui/scrollspy.d.ts.map +1 -0
- package/dist/components/reui/scrollspy.js +130 -0
- package/dist/components/reui/scrollspy.js.map +1 -0
- package/dist/components/reui/sortable.d.ts +48 -0
- package/dist/components/reui/sortable.d.ts.map +1 -0
- package/dist/components/reui/sortable.js +230 -0
- package/dist/components/reui/sortable.js.map +1 -0
- package/dist/components/reui/stepper.d.ts +63 -0
- package/dist/components/reui/stepper.d.ts.map +1 -0
- package/dist/components/reui/stepper.js +234 -0
- package/dist/components/reui/stepper.js.map +1 -0
- package/dist/components/reui/timeline.d.ts +24 -0
- package/dist/components/reui/timeline.d.ts.map +1 -0
- package/dist/components/reui/timeline.js +123 -0
- package/dist/components/reui/timeline.js.map +1 -0
- package/dist/components/reui/tree.d.ts +23 -0
- package/dist/components/reui/tree.d.ts.map +1 -0
- package/dist/components/reui/tree.js +115 -0
- package/dist/components/reui/tree.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +9 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +56 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +96 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +13 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +45 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +8 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +16 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/attachment.d.ts +26 -0
- package/dist/components/ui/attachment.d.ts.map +1 -0
- package/dist/components/ui/attachment.js +106 -0
- package/dist/components/ui/attachment.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +14 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +52 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +32 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +13 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +72 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/bubble.d.ts +19 -0
- package/dist/components/ui/bubble.d.ts.map +1 -0
- package/dist/components/ui/bubble.js +75 -0
- package/dist/components/ui/bubble.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +14 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +44 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +47 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +13 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +110 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +14 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +58 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +31 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +135 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +47 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +151 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +22 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +8 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +26 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +27 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +164 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +22 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +89 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +32 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +134 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +93 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.js +3 -0
- package/dist/components/ui/drawer.d.ts +19 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +125 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +32 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +138 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +15 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +62 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +28 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +112 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +8 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +38 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +21 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +80 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +14 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +49 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +6 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +17 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +25 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +123 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +7 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +22 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +15 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/marker.d.ts +13 -0
- package/dist/components/ui/marker.d.ts.map +1 -0
- package/dist/components/ui/marker.js +45 -0
- package/dist/components/ui/marker.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +32 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +137 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/message-scroller.d.ts +13 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +62 -0
- package/dist/components/ui/message-scroller.js.map +1 -0
- package/dist/components/ui/message.d.ts +13 -0
- package/dist/components/ui/message.d.ts.map +1 -0
- package/dist/components/ui/message.js +51 -0
- package/dist/components/ui/message.js.map +1 -0
- package/dist/components/ui/native-select.d.ts +11 -0
- package/dist/components/ui/native-select.d.ts.map +1 -0
- package/dist/components/ui/native-select.js +40 -0
- package/dist/components/ui/native-select.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +85 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +20 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +81 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +12 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +56 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +10 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +46 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +8 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +29 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +10 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +7 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +38 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +99 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +6 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +17 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +17 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +90 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +66 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +383 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +6 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +15 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +6 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +36 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +7 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +32 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +6 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +18 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +21 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +13 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +68 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +13 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +47 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +6 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +15 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +14 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +54 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +11 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +38 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +43 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/hooks/use-body-classes.d.ts +27 -0
- package/dist/hooks/use-body-classes.d.ts.map +1 -0
- package/dist/hooks/use-body-classes.js +52 -0
- package/dist/hooks/use-body-classes.js.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +43 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.js +69 -0
- package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
- package/dist/hooks/use-file-upload.d.ts +49 -0
- package/dist/hooks/use-file-upload.d.ts.map +1 -0
- package/dist/hooks/use-file-upload.js +227 -0
- package/dist/hooks/use-file-upload.js.map +1 -0
- package/dist/hooks/use-hydrated.d.ts +37 -0
- package/dist/hooks/use-hydrated.d.ts.map +1 -0
- package/dist/hooks/use-hydrated.js +50 -0
- package/dist/hooks/use-hydrated.js.map +1 -0
- package/dist/hooks/use-intersection-observer.d.ts +55 -0
- package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
- package/dist/hooks/use-intersection-observer.js +144 -0
- package/dist/hooks/use-intersection-observer.js.map +1 -0
- package/dist/hooks/use-is-mac.d.ts +28 -0
- package/dist/hooks/use-is-mac.d.ts.map +1 -0
- package/dist/hooks/use-is-mac.js +38 -0
- package/dist/hooks/use-is-mac.js.map +1 -0
- package/dist/hooks/use-media-query.d.ts +44 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +58 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-meta-color.d.ts +78 -0
- package/dist/hooks/use-meta-color.d.ts.map +1 -0
- package/dist/hooks/use-meta-color.js +138 -0
- package/dist/hooks/use-meta-color.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +5 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +21 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-mutation-observer.d.ts +61 -0
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
- package/dist/hooks/use-mutation-observer.js +96 -0
- package/dist/hooks/use-mutation-observer.js.map +1 -0
- package/dist/hooks/use-scroll-position.d.ts +76 -0
- package/dist/hooks/use-scroll-position.d.ts.map +1 -0
- package/dist/hooks/use-scroll-position.js +97 -0
- package/dist/hooks/use-scroll-position.js.map +1 -0
- package/dist/hooks/use-slider-input.d.ts +94 -0
- package/dist/hooks/use-slider-input.d.ts.map +1 -0
- package/dist/hooks/use-slider-input.js +116 -0
- package/dist/hooks/use-slider-input.js.map +1 -0
- package/dist/hooks/use-viewport.d.ts +72 -0
- package/dist/hooks/use-viewport.d.ts.map +1 -0
- package/dist/hooks/use-viewport.js +91 -0
- package/dist/hooks/use-viewport.js.map +1 -0
- package/dist/theme.css +244 -0
- package/dist/theme.css.d.ts +3 -0
- package/package.json +105 -36
- package/dist/hooks.d.ts +0 -957
- package/dist/hooks.d.ts.map +0 -1
- package/dist/hooks.js +0 -1391
- package/dist/hooks.js.map +0 -1
- package/dist/index.d.ts +0 -1993
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -10647
- package/dist/index.js.map +0 -1
- package/dist/use-is-mobile-Dln4-L1O.js +0 -210
- package/dist/use-is-mobile-Dln4-L1O.js.map +0 -1
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ScrollArea } from "../../ui/scroll-area.js";
|
|
3
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
4
|
+
import { getDayKey, getRangeKey, resolveOffDay, toZoned, zonedStartOfDay } from "./event-calendar-lib.js";
|
|
5
|
+
import { EventCalendarViewContext, useEventCalendar, useEventCalendarDay, useEventCalendarSelector, useEventCalendarSettings, useEventCalendarViewConfig, useEventCalendarViewSettings, useEventCalendarWeek } from "./event-calendar.js";
|
|
6
|
+
import { useEventCalendarGestures, wasRecentChipPress, wasRecentDrag } from "./event-calendar-dnd.js";
|
|
7
|
+
import { EVENT_CALENDAR_GHOST, EventCalendarEvent } from "./event-calendar-event.js";
|
|
8
|
+
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
|
+
import { cn } from "@kumix/utils";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { PlusIcon } from "lucide-react";
|
|
12
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
13
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
14
|
+
import { addDays, format, getWeek } from "date-fns";
|
|
15
|
+
//#region src/components/reui/event-calendar/event-calendar-month-view.tsx
|
|
16
|
+
const useIsoLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
17
|
+
function EventCalendarMonthView({ className, render, maxEventsPerCell, ...props }) {
|
|
18
|
+
const instance = useEventCalendar();
|
|
19
|
+
const settings = useEventCalendarSettings();
|
|
20
|
+
const viewConfig = useEventCalendarViewConfig();
|
|
21
|
+
const visibleRange = useEventCalendarSelector((state) => state.visibleRange, { isEqual: (a, b) => getRangeKey(a) === getRangeKey(b) });
|
|
22
|
+
const anchorDate = useEventCalendarSelector((state) => state.date);
|
|
23
|
+
const { effective } = useEventCalendarViewSettings();
|
|
24
|
+
const weeks = useMemo(() => {
|
|
25
|
+
const days = [];
|
|
26
|
+
let cursor = zonedStartOfDay(visibleRange.start, settings.timeZone);
|
|
27
|
+
while (cursor < visibleRange.end) {
|
|
28
|
+
days.push(cursor);
|
|
29
|
+
cursor = zonedStartOfDay(addDays(toZoned(cursor, settings.timeZone), 1), settings.timeZone);
|
|
30
|
+
}
|
|
31
|
+
const rows = [];
|
|
32
|
+
for (let i = 0; i < days.length; i += 7) rows.push(days.slice(i, i + 7));
|
|
33
|
+
if (effective.weekends) return rows;
|
|
34
|
+
return rows.map((row) => row.filter((day) => !settings.weekendDays.includes(toZoned(day, settings.timeZone).getDay())));
|
|
35
|
+
}, [
|
|
36
|
+
visibleRange,
|
|
37
|
+
settings.timeZone,
|
|
38
|
+
settings.weekendDays,
|
|
39
|
+
effective.weekends
|
|
40
|
+
]);
|
|
41
|
+
const headerDays = weeks[0] ?? [];
|
|
42
|
+
const title = settings.i18n.functions.formatTitle("month", {
|
|
43
|
+
date: toZoned(anchorDate, settings.timeZone),
|
|
44
|
+
activeRange: instance.api.getActiveRange(),
|
|
45
|
+
visibleRange,
|
|
46
|
+
locale: settings.locale
|
|
47
|
+
});
|
|
48
|
+
const gridTemplateColumns = `${effective.weekNumbers ? "var(--ec-week-number-w, 2.75rem) " : ""}repeat(${headerDays.length}, minmax(0, 1fr))`;
|
|
49
|
+
const cap = maxEventsPerCell ?? viewConfig.maxEventsPerCell;
|
|
50
|
+
const contained = viewConfig.scrollMode !== "page";
|
|
51
|
+
const autoFit = cap === "auto" && contained;
|
|
52
|
+
const slotProbeRef = useRef(null);
|
|
53
|
+
const contentProbeRef = useRef(null);
|
|
54
|
+
const [autoCap, setAutoCap] = useState(null);
|
|
55
|
+
const measureCap = useCallback(() => {
|
|
56
|
+
const content = contentProbeRef.current;
|
|
57
|
+
const slot = slotProbeRef.current;
|
|
58
|
+
if (!content || !slot) return;
|
|
59
|
+
const laneH = slot.getBoundingClientRect().height;
|
|
60
|
+
if (laneH <= 0) return;
|
|
61
|
+
const cs = getComputedStyle(content);
|
|
62
|
+
const inner = content.clientHeight - (parseFloat(cs.paddingTop) || 0);
|
|
63
|
+
const gap = parseFloat(cs.rowGap) || 0;
|
|
64
|
+
setAutoCap(Math.max(1, Math.floor((inner + gap) / laneH)));
|
|
65
|
+
}, []);
|
|
66
|
+
useIsoLayoutEffect(() => {
|
|
67
|
+
if (!autoFit) {
|
|
68
|
+
setAutoCap(null);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const content = contentProbeRef.current;
|
|
72
|
+
if (!content || typeof ResizeObserver === "undefined") return;
|
|
73
|
+
measureCap();
|
|
74
|
+
const observer = new ResizeObserver(measureCap);
|
|
75
|
+
observer.observe(content);
|
|
76
|
+
return () => observer.disconnect();
|
|
77
|
+
}, [
|
|
78
|
+
autoFit,
|
|
79
|
+
measureCap,
|
|
80
|
+
weeks.length,
|
|
81
|
+
anchorDate
|
|
82
|
+
]);
|
|
83
|
+
const resolvedCap = cap === "auto" ? autoFit ? autoCap ?? 3 : 3 : cap;
|
|
84
|
+
const defaultProps = {
|
|
85
|
+
"data-slot": "event-calendar-month-view",
|
|
86
|
+
"data-view": "month",
|
|
87
|
+
role: "grid",
|
|
88
|
+
"aria-label": title,
|
|
89
|
+
className: cn("flex flex-col border-t", contained && "min-h-0 flex-1 overflow-hidden", viewConfig.classNames?.monthView, className),
|
|
90
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
91
|
+
/* @__PURE__ */ jsxs("div", {
|
|
92
|
+
role: "row",
|
|
93
|
+
"data-slot": "event-calendar-month-header",
|
|
94
|
+
className: cn("@container grid border-b", viewConfig.classNames?.monthHeader),
|
|
95
|
+
style: { gridTemplateColumns },
|
|
96
|
+
children: [effective.weekNumbers && /* @__PURE__ */ jsx("div", {
|
|
97
|
+
role: "columnheader",
|
|
98
|
+
"aria-hidden": true,
|
|
99
|
+
className: cn("border-e px-2 py-1.5", viewConfig.classNames?.weekNumber)
|
|
100
|
+
}), headerDays.map((day) => /* @__PURE__ */ jsx("div", {
|
|
101
|
+
role: "columnheader",
|
|
102
|
+
className: cn("truncate px-2 py-1.5 font-medium text-muted-foreground", viewConfig.classNames?.monthDayHeader),
|
|
103
|
+
children: viewConfig.renderDayHeader?.({
|
|
104
|
+
day,
|
|
105
|
+
view: "month",
|
|
106
|
+
isToday: getDayKey(day, settings.timeZone) === getDayKey(/* @__PURE__ */ new Date(), settings.timeZone)
|
|
107
|
+
}) ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
108
|
+
className: "@max-[36rem]:hidden",
|
|
109
|
+
children: format(toZoned(day, settings.timeZone), settings.i18n.formats.monthDayHeader, { locale: settings.locale })
|
|
110
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
111
|
+
className: "@max-[36rem]:inline hidden",
|
|
112
|
+
children: format(toZoned(day, settings.timeZone), settings.i18n.formats.monthDayHeaderNarrow, { locale: settings.locale })
|
|
113
|
+
})] })
|
|
114
|
+
}, day.getTime()))]
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ jsx("div", {
|
|
117
|
+
"data-slot": "event-calendar-month-body",
|
|
118
|
+
className: cn("grid", contained && "min-h-0 flex-1", viewConfig.classNames?.monthBody),
|
|
119
|
+
style: { gridTemplateRows: contained ? `repeat(${weeks.length}, minmax(0, 1fr))` : `repeat(${weeks.length}, minmax(var(--ec-month-row-min-h, 8rem), auto))` },
|
|
120
|
+
children: weeks.map((week, rowIndex) => /* @__PURE__ */ jsx(EventCalendarMonthWeek, {
|
|
121
|
+
week,
|
|
122
|
+
gridTemplateColumns,
|
|
123
|
+
showWeekNumber: effective.weekNumbers,
|
|
124
|
+
cap: resolvedCap,
|
|
125
|
+
autoFit,
|
|
126
|
+
contentRef: rowIndex === 0 ? contentProbeRef : void 0
|
|
127
|
+
}, rowIndex))
|
|
128
|
+
}),
|
|
129
|
+
autoFit && /* @__PURE__ */ jsx("div", {
|
|
130
|
+
ref: slotProbeRef,
|
|
131
|
+
"aria-hidden": true,
|
|
132
|
+
className: "pointer-events-none invisible absolute h-(--ec-month-bar-h,1.75rem) w-0"
|
|
133
|
+
})
|
|
134
|
+
] })
|
|
135
|
+
};
|
|
136
|
+
return /* @__PURE__ */ jsx(EventCalendarViewContext.Provider, {
|
|
137
|
+
value: { view: "month" },
|
|
138
|
+
children: useRender({
|
|
139
|
+
defaultTagName: "div",
|
|
140
|
+
render,
|
|
141
|
+
props: mergeProps(defaultProps, props)
|
|
142
|
+
})
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* One month week row. Multi-day / all-day events render as CONTINUOUS bars in
|
|
147
|
+
* an overlay grid that spans day columns (colStart -> colSpan) and stacks by
|
|
148
|
+
* lane; single-day timed events render inside each cell below the reserved bar
|
|
149
|
+
* lanes. This is what makes a cross-day event read as one whole block instead
|
|
150
|
+
* of a chip repeated per cell.
|
|
151
|
+
*/
|
|
152
|
+
function EventCalendarMonthWeek({ week, gridTemplateColumns, showWeekNumber, cap, autoFit, contentRef }) {
|
|
153
|
+
const settings = useEventCalendarSettings();
|
|
154
|
+
const viewConfig = useEventCalendarViewConfig();
|
|
155
|
+
const { bars, rowStart } = useEventCalendarWeek(week[0]);
|
|
156
|
+
const colOffset = showWeekNumber ? 1 : 0;
|
|
157
|
+
const dayMs = 864e5;
|
|
158
|
+
const rowStartMs = zonedStartOfDay(rowStart ?? week[0], settings.timeZone).getTime();
|
|
159
|
+
const offsets = week.map((d) => Math.round((zonedStartOfDay(d, settings.timeZone).getTime() - rowStartMs) / dayMs));
|
|
160
|
+
/** Clamp a day-offset span onto the visible columns; null = fully hidden. */
|
|
161
|
+
const gridPos = (colStart, colSpan) => {
|
|
162
|
+
let start = -1;
|
|
163
|
+
let end = -1;
|
|
164
|
+
for (let o = colStart; o < colStart + colSpan; o++) {
|
|
165
|
+
const col = offsets.indexOf(o);
|
|
166
|
+
if (col === -1) continue;
|
|
167
|
+
if (start === -1) start = col;
|
|
168
|
+
end = col;
|
|
169
|
+
}
|
|
170
|
+
return start === -1 ? null : {
|
|
171
|
+
col: start,
|
|
172
|
+
span: end - start + 1
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
const visibleBars = bars.filter((b) => (b.lane ?? 0) < cap);
|
|
176
|
+
const covers = (b, dayOffset) => (b.colStart ?? 0) <= dayOffset && dayOffset < (b.colStart ?? 0) + (b.colSpan ?? 1);
|
|
177
|
+
const hiddenBarKeysByCol = week.map((_, col) => new Set(bars.filter((b) => (b.lane ?? 0) >= cap && covers(b, offsets[col])).map((b) => b.occurrence.key)));
|
|
178
|
+
const dragGhost = useEventCalendarSelector((state) => {
|
|
179
|
+
const drag = state.drag;
|
|
180
|
+
if (!drag) return null;
|
|
181
|
+
const rowEndMs = rowStartMs + 7 * dayMs;
|
|
182
|
+
const startDayMs = zonedStartOfDay(drag.proposedStart, settings.timeZone).getTime();
|
|
183
|
+
const lastDayMs = zonedStartOfDay(/* @__PURE__ */ new Date(drag.proposedEnd.getTime() - 1), settings.timeZone).getTime();
|
|
184
|
+
if (startDayMs >= rowEndMs || lastDayMs < rowStartMs) return null;
|
|
185
|
+
const startCol = Math.max(0, Math.round((startDayMs - rowStartMs) / dayMs));
|
|
186
|
+
const endCol = Math.min(6, Math.round((lastDayMs - rowStartMs) / dayMs));
|
|
187
|
+
if (endCol < startCol) return null;
|
|
188
|
+
return {
|
|
189
|
+
kind: drag.kind,
|
|
190
|
+
valid: drag.valid,
|
|
191
|
+
occurrence: drag.occurrence,
|
|
192
|
+
proposedStart: drag.proposedStart,
|
|
193
|
+
proposedEnd: drag.proposedEnd,
|
|
194
|
+
proposedAllDay: drag.proposedAllDay,
|
|
195
|
+
colStart: startCol,
|
|
196
|
+
colSpan: endCol - startCol + 1,
|
|
197
|
+
isStart: startDayMs >= rowStartMs,
|
|
198
|
+
isEnd: lastDayMs < rowEndMs,
|
|
199
|
+
color: drag.occurrence.event.color
|
|
200
|
+
};
|
|
201
|
+
}, { isEqual: (a, b) => a === b || a !== null && b !== null && a.colStart === b.colStart && a.colSpan === b.colSpan && a.valid === b.valid && a.kind === b.kind && a.proposedAllDay === b.proposedAllDay && a.proposedStart.getTime() === b.proposedStart.getTime() && a.proposedEnd.getTime() === b.proposedEnd.getTime() });
|
|
202
|
+
const ghostPos = dragGhost ? gridPos(dragGhost.colStart, dragGhost.colSpan) : null;
|
|
203
|
+
const ghostLane = dragGhost ? bars.find((b) => b.occurrence.key === dragGhost.occurrence.key)?.lane ?? 0 : 0;
|
|
204
|
+
const ghostIsBar = !!dragGhost && (dragGhost.kind !== "move" || dragGhost.proposedAllDay || dragGhost.proposedEnd.getTime() - dragGhost.proposedStart.getTime() > dayMs);
|
|
205
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
206
|
+
role: "row",
|
|
207
|
+
"data-slot": "event-calendar-month-row",
|
|
208
|
+
className: cn("relative grid min-h-0 border-b last:border-b-0", viewConfig.classNames?.monthRow),
|
|
209
|
+
style: { gridTemplateColumns },
|
|
210
|
+
children: [
|
|
211
|
+
showWeekNumber && /* @__PURE__ */ jsx("div", {
|
|
212
|
+
role: "rowheader",
|
|
213
|
+
"data-slot": "event-calendar-week-number",
|
|
214
|
+
className: cn("border-e px-2 pt-1 text-muted-foreground tabular-nums", viewConfig.classNames?.weekNumber),
|
|
215
|
+
children: settings.i18n.labels.week(getWeek(toZoned(week[0], settings.timeZone), { weekStartsOn: settings.weekStartsOn }))
|
|
216
|
+
}),
|
|
217
|
+
week.map((day, col) => /* @__PURE__ */ jsx(EventCalendarMonthCell, {
|
|
218
|
+
day,
|
|
219
|
+
cap,
|
|
220
|
+
reservedLanes: visibleBars.reduce((max, b) => covers(b, offsets[col]) ? Math.max(max, (b.lane ?? 0) + 1) : max, 0),
|
|
221
|
+
hiddenBarKeys: hiddenBarKeysByCol[col],
|
|
222
|
+
isLast: col === week.length - 1,
|
|
223
|
+
autoFit,
|
|
224
|
+
contentRef: col === 0 ? contentRef : void 0
|
|
225
|
+
}, day.getTime())),
|
|
226
|
+
(visibleBars.length > 0 || dragGhost && ghostPos && ghostIsBar) && /* @__PURE__ */ jsxs("div", {
|
|
227
|
+
"data-slot": "event-calendar-month-bar-overlay",
|
|
228
|
+
className: cn("pointer-events-none absolute inset-x-0 top-0 z-10 grid pt-1.5", viewConfig.classNames?.monthBarOverlay),
|
|
229
|
+
style: {
|
|
230
|
+
gridTemplateColumns,
|
|
231
|
+
gridAutoRows: "var(--ec-month-bar-h, 1.75rem)"
|
|
232
|
+
},
|
|
233
|
+
children: [visibleBars.map((bar) => {
|
|
234
|
+
const pos = gridPos(bar.colStart ?? 0, bar.colSpan ?? 1);
|
|
235
|
+
if (!pos) return null;
|
|
236
|
+
return /* @__PURE__ */ jsx("div", {
|
|
237
|
+
className: cn("pointer-events-auto min-w-0 px-1", viewConfig.classNames?.monthBar),
|
|
238
|
+
style: {
|
|
239
|
+
gridColumn: `${colOffset + pos.col + 1} / span ${pos.span}`,
|
|
240
|
+
gridRow: (bar.lane ?? 0) + 1
|
|
241
|
+
},
|
|
242
|
+
children: /* @__PURE__ */ jsx(EventCalendarEvent, {
|
|
243
|
+
segment: bar,
|
|
244
|
+
className: "h-[calc(var(--ec-month-bar-h,1.75rem)-0.125rem)]"
|
|
245
|
+
})
|
|
246
|
+
}, bar.occurrence.key);
|
|
247
|
+
}), dragGhost && ghostPos && ghostIsBar && /* @__PURE__ */ jsx("div", {
|
|
248
|
+
"aria-hidden": true,
|
|
249
|
+
className: cn("min-w-0 px-1", viewConfig.classNames?.monthBar),
|
|
250
|
+
style: {
|
|
251
|
+
gridColumn: `${colOffset + ghostPos.col + 1} / span ${ghostPos.span}`,
|
|
252
|
+
gridRow: ghostLane + 1
|
|
253
|
+
},
|
|
254
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
255
|
+
"data-slot": "event-calendar-drag-ghost",
|
|
256
|
+
"data-kind": dragGhost.kind,
|
|
257
|
+
"data-drop-invalid": !dragGhost.valid || void 0,
|
|
258
|
+
className: cn("h-[calc(var(--ec-month-bar-h,1.75rem)-0.125rem)]", dragGhost.kind === "move" ? cn(EVENT_CALENDAR_GHOST.move, !dragGhost.valid && EVENT_CALENDAR_GHOST.invalid) : cn(EVENT_CALENDAR_GHOST.resize, !dragGhost.valid && EVENT_CALENDAR_GHOST.invalidResize), viewConfig.classNames?.dragGhost),
|
|
259
|
+
style: { "--ec-event-color": dragGhost.color ?? "var(--color-primary)" },
|
|
260
|
+
children: dragGhost.kind !== "move" && /* @__PURE__ */ jsx(EventCalendarEvent, {
|
|
261
|
+
preview: true,
|
|
262
|
+
segment: {
|
|
263
|
+
occurrence: {
|
|
264
|
+
...dragGhost.occurrence,
|
|
265
|
+
start: dragGhost.proposedStart,
|
|
266
|
+
end: dragGhost.proposedEnd
|
|
267
|
+
},
|
|
268
|
+
day: week[ghostPos.col] ?? week[0],
|
|
269
|
+
isStart: dragGhost.isStart,
|
|
270
|
+
isEnd: dragGhost.isEnd,
|
|
271
|
+
continuesBefore: !dragGhost.isStart,
|
|
272
|
+
continuesAfter: !dragGhost.isEnd
|
|
273
|
+
},
|
|
274
|
+
className: cn("inset-ring-0 h-full", !dragGhost.valid && EVENT_CALENDAR_GHOST.invalidContent)
|
|
275
|
+
})
|
|
276
|
+
})
|
|
277
|
+
})]
|
|
278
|
+
})
|
|
279
|
+
]
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
function EventCalendarMonthCell({ day, cap, reservedLanes, hiddenBarKeys, isLast, autoFit, contentRef }) {
|
|
283
|
+
const settings = useEventCalendarSettings();
|
|
284
|
+
const viewConfig = useEventCalendarViewConfig();
|
|
285
|
+
const gestures = useEventCalendarGestures();
|
|
286
|
+
const { segments, isToday, isOutside } = useEventCalendarDay(day);
|
|
287
|
+
const dayStart = zonedStartOfDay(day, settings.timeZone);
|
|
288
|
+
const dayEnd = addDays(toZoned(dayStart, settings.timeZone), 1);
|
|
289
|
+
const { effective } = useEventCalendarViewSettings();
|
|
290
|
+
const isOff = resolveOffDay(day, settings.timeZone, effective.offDays ? typeof viewConfig.offDays === "object" ? viewConfig.offDays : true : false);
|
|
291
|
+
const offClassName = typeof viewConfig.offDays === "object" && viewConfig.offDays.className || "bg-muted/25";
|
|
292
|
+
const isDropTarget = useEventCalendarSelector((state) => {
|
|
293
|
+
const drag = state.drag;
|
|
294
|
+
if (!drag) return null;
|
|
295
|
+
if (!(drag.proposedStart < dayEnd && drag.proposedEnd > dayStart)) return null;
|
|
296
|
+
return drag.valid ? "valid" : "invalid";
|
|
297
|
+
});
|
|
298
|
+
const isInteracting = useEventCalendarSelector((state) => state.drag !== null || state.slotDraft !== null);
|
|
299
|
+
const inDraft = useEventCalendarSelector((state) => {
|
|
300
|
+
const draft = state.slotDraft;
|
|
301
|
+
if (!draft?.allDay) return null;
|
|
302
|
+
if (draft.start >= dayEnd || draft.end <= dayStart) return null;
|
|
303
|
+
return {
|
|
304
|
+
isStart: draft.start >= dayStart,
|
|
305
|
+
isEnd: draft.end <= dayEnd
|
|
306
|
+
};
|
|
307
|
+
}, { isEqual: (a, b) => a === b || a !== null && b !== null && a.isStart === b.isStart && a.isEnd === b.isEnd });
|
|
308
|
+
const inlineDrop = useEventCalendarSelector((state) => {
|
|
309
|
+
const drag = state.drag;
|
|
310
|
+
if (drag?.kind !== "move" || drag.proposedAllDay) return null;
|
|
311
|
+
if (drag.proposedEnd.getTime() - drag.proposedStart.getTime() > 864e5) return null;
|
|
312
|
+
const dropDayMs = zonedStartOfDay(drag.proposedStart, settings.timeZone).getTime();
|
|
313
|
+
if (dropDayMs !== dayStart.getTime()) return null;
|
|
314
|
+
if (zonedStartOfDay(drag.occurrence.start, settings.timeZone).getTime() === dayStart.getTime()) return null;
|
|
315
|
+
return {
|
|
316
|
+
min: (drag.proposedStart.getTime() - dropDayMs) / 6e4,
|
|
317
|
+
valid: drag.valid,
|
|
318
|
+
color: drag.occurrence.event.color
|
|
319
|
+
};
|
|
320
|
+
}, { isEqual: (a, b) => a === b || a !== null && b !== null && a.min === b.min && a.valid === b.valid && a.color === b.color });
|
|
321
|
+
const extraHidden = hiddenBarKeys.size;
|
|
322
|
+
const hiddenBarSegs = segments.allDay.filter((s) => hiddenBarKeys.has(s.occurrence.key));
|
|
323
|
+
const m = segments.timed.length;
|
|
324
|
+
const timedSlots = Math.max(0, cap - reservedLanes);
|
|
325
|
+
const staticShown = autoFit && (extraHidden > 0 || m > timedSlots) ? Math.max(0, timedSlots - 1) : timedSlots;
|
|
326
|
+
const overflowSegments = [...hiddenBarSegs, ...segments.timed.slice(staticShown)];
|
|
327
|
+
let visibleTimed;
|
|
328
|
+
let overflowCount;
|
|
329
|
+
let placeholderIndex;
|
|
330
|
+
let placeholderAtMore;
|
|
331
|
+
if (!inlineDrop) {
|
|
332
|
+
visibleTimed = segments.timed.slice(0, staticShown);
|
|
333
|
+
overflowCount = overflowSegments.length;
|
|
334
|
+
placeholderIndex = -1;
|
|
335
|
+
placeholderAtMore = false;
|
|
336
|
+
} else {
|
|
337
|
+
const insertRank = segments.timed.filter((s) => (s.startMin ?? 0) <= inlineDrop.min).length;
|
|
338
|
+
const vis = !(extraHidden > 0 || m + 1 > timedSlots) ? m + 1 : autoFit ? Math.max(0, timedSlots - 1) : timedSlots;
|
|
339
|
+
placeholderAtMore = insertRank >= vis;
|
|
340
|
+
visibleTimed = placeholderAtMore ? segments.timed.slice(0, vis) : segments.timed.slice(0, Math.max(0, vis - 1));
|
|
341
|
+
placeholderIndex = placeholderAtMore ? -1 : insertRank;
|
|
342
|
+
overflowCount = extraHidden + (m - visibleTimed.length) + (placeholderAtMore ? 1 : 0);
|
|
343
|
+
}
|
|
344
|
+
const dropPlaceholder = inlineDrop ? /* @__PURE__ */ jsx("div", {
|
|
345
|
+
"aria-hidden": true,
|
|
346
|
+
"data-slot": "event-calendar-drop-placeholder",
|
|
347
|
+
"data-drop-invalid": !inlineDrop.valid || void 0,
|
|
348
|
+
className: cn("shrink-0 rounded-sm border border-dashed", inlineDrop.valid ? "border-(--ec-event-color)/50 bg-(--ec-event-color)/8" : "border-destructive/70 bg-destructive/10", viewConfig.classNames?.dragGhost),
|
|
349
|
+
style: {
|
|
350
|
+
"--ec-event-color": inlineDrop.color ?? "var(--color-primary)",
|
|
351
|
+
height: "calc(var(--ec-month-bar-h, 1.75rem) - 0.125rem)"
|
|
352
|
+
}
|
|
353
|
+
}, "ec-drop-placeholder") : null;
|
|
354
|
+
const defaultContent = /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
|
|
355
|
+
ref: contentRef,
|
|
356
|
+
className: cn("flex min-h-0 flex-1 flex-col gap-0.5 overflow-hidden px-1 pt-1.5", viewConfig.classNames?.monthCellContent),
|
|
357
|
+
children: [
|
|
358
|
+
reservedLanes > 0 && /* @__PURE__ */ jsx("div", {
|
|
359
|
+
"aria-hidden": true,
|
|
360
|
+
className: "shrink-0",
|
|
361
|
+
style: { height: `calc(${reservedLanes} * var(--ec-month-bar-h, 1.75rem) - 0.125rem)` }
|
|
362
|
+
}),
|
|
363
|
+
visibleTimed.flatMap((segment, i) => {
|
|
364
|
+
const chip = /* @__PURE__ */ jsx(EventCalendarEvent, {
|
|
365
|
+
segment,
|
|
366
|
+
className: "shrink-0"
|
|
367
|
+
}, segment.occurrence.key);
|
|
368
|
+
return i === placeholderIndex ? [dropPlaceholder, chip] : [chip];
|
|
369
|
+
}),
|
|
370
|
+
placeholderIndex >= 0 && placeholderIndex >= visibleTimed.length && dropPlaceholder,
|
|
371
|
+
overflowCount > 0 && /* @__PURE__ */ jsx(EventCalendarMoreIndicator, {
|
|
372
|
+
day,
|
|
373
|
+
count: overflowCount,
|
|
374
|
+
segments: overflowSegments,
|
|
375
|
+
dropInto: placeholderAtMore && inlineDrop ? {
|
|
376
|
+
color: inlineDrop.color,
|
|
377
|
+
valid: inlineDrop.valid
|
|
378
|
+
} : void 0
|
|
379
|
+
})
|
|
380
|
+
]
|
|
381
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
382
|
+
className: cn("flex items-center justify-end gap-1 px-2 pb-1.5", viewConfig.classNames?.monthCellFooter),
|
|
383
|
+
children: [viewConfig.showDayAddButton && !isInteracting && /* @__PURE__ */ jsx("button", {
|
|
384
|
+
type: "button",
|
|
385
|
+
"data-slot": "event-calendar-day-add",
|
|
386
|
+
"aria-label": settings.i18n.labels.addEvent,
|
|
387
|
+
className: cn("flex size-5 cursor-pointer items-center justify-center rounded-sm bg-primary text-primary-foreground opacity-0 transition-opacity focus-visible:opacity-100 group-hover/ec-cell:opacity-100", viewConfig.classNames?.dayAddButton),
|
|
388
|
+
onClick: (e) => {
|
|
389
|
+
e.stopPropagation();
|
|
390
|
+
settings.onSlotClick?.({
|
|
391
|
+
date: day,
|
|
392
|
+
allDay: true,
|
|
393
|
+
view: "month"
|
|
394
|
+
}, e);
|
|
395
|
+
},
|
|
396
|
+
children: /* @__PURE__ */ jsx(PlusIcon, {
|
|
397
|
+
className: "size-3.5",
|
|
398
|
+
"aria-hidden": "true"
|
|
399
|
+
})
|
|
400
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
401
|
+
"data-slot": "event-calendar-month-day-number",
|
|
402
|
+
className: cn("flex size-5 items-center justify-center rounded-full", isOutside && "text-muted-foreground", isToday && "bg-primary font-light text-primary-foreground", viewConfig.classNames?.monthDayNumber),
|
|
403
|
+
children: format(toZoned(day, settings.timeZone), settings.i18n.formats.monthCellDay, { locale: settings.locale })
|
|
404
|
+
})]
|
|
405
|
+
})] });
|
|
406
|
+
const content = viewConfig.renderMonthCell?.({
|
|
407
|
+
day,
|
|
408
|
+
segments,
|
|
409
|
+
isToday,
|
|
410
|
+
isOutside,
|
|
411
|
+
overflowCount,
|
|
412
|
+
defaultContent
|
|
413
|
+
}) ?? defaultContent;
|
|
414
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
415
|
+
role: "gridcell",
|
|
416
|
+
"data-slot": "event-calendar-month-cell",
|
|
417
|
+
"data-today": isToday || void 0,
|
|
418
|
+
"data-outside": isOutside || void 0,
|
|
419
|
+
"data-weekend": settings.weekendDays.includes(toZoned(day, settings.timeZone).getDay()) || void 0,
|
|
420
|
+
"data-ec-day": dayStart.getTime(),
|
|
421
|
+
"data-drop-target": isDropTarget ?? void 0,
|
|
422
|
+
"data-off": isOff || void 0,
|
|
423
|
+
"data-draft": inDraft ? "" : void 0,
|
|
424
|
+
"aria-label": format(toZoned(day, settings.timeZone), settings.i18n.formats.monthCellAriaLabel, { locale: settings.locale }),
|
|
425
|
+
className: cn("group/ec-cell relative flex min-h-0 min-w-0 flex-col overflow-hidden", !isLast && "border-e", isOutside && !settings.showOutsideDays && "invisible", isOff && offClassName, isToday && cn("relative border-b-2 border-b-primary/40 bg-primary/3", viewConfig.todayClassName), viewConfig.dayClassName?.(day), inDraft && "bg-primary/5", viewConfig.classNames?.monthCell),
|
|
426
|
+
onPointerDown: (e) => {
|
|
427
|
+
const target = e.target;
|
|
428
|
+
if (target.closest("[data-slot=event-calendar-event]")) return;
|
|
429
|
+
if (target.closest("[data-slot=event-calendar-more]")) return;
|
|
430
|
+
gestures.beginCreate(e, day, true);
|
|
431
|
+
},
|
|
432
|
+
onClick: (e) => {
|
|
433
|
+
if (wasRecentDrag() || wasRecentChipPress()) return;
|
|
434
|
+
settings.onSlotClick?.({
|
|
435
|
+
date: day,
|
|
436
|
+
allDay: true,
|
|
437
|
+
view: "month"
|
|
438
|
+
}, e);
|
|
439
|
+
},
|
|
440
|
+
children: [inDraft && /* @__PURE__ */ jsx("span", {
|
|
441
|
+
"aria-hidden": true,
|
|
442
|
+
"data-slot": "event-calendar-slot-draft",
|
|
443
|
+
className: cn("pointer-events-none absolute inset-0 z-10 border-primary/40 border-y border-dashed", inDraft.isStart && "border-s", inDraft.isEnd && "border-e", viewConfig.classNames?.slotDraft)
|
|
444
|
+
}), content]
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* "+N more" trigger opening a popover with the day's full event list.
|
|
449
|
+
* onMoreClick returning false suppresses the built-in popover.
|
|
450
|
+
*/
|
|
451
|
+
function EventCalendarMoreIndicator({ day, count, segments, dropInto }) {
|
|
452
|
+
const settings = useEventCalendarSettings();
|
|
453
|
+
const viewConfig = useEventCalendarViewConfig();
|
|
454
|
+
const [open, setOpen] = useState(false);
|
|
455
|
+
const isDragging = useEventCalendarSelector((state) => state.drag !== null);
|
|
456
|
+
useEffect(() => {
|
|
457
|
+
if (isDragging) setOpen(false);
|
|
458
|
+
}, [isDragging]);
|
|
459
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
460
|
+
open,
|
|
461
|
+
onOpenChange: setOpen,
|
|
462
|
+
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
463
|
+
"data-slot": "event-calendar-more",
|
|
464
|
+
"data-drop-into": dropInto ? "" : void 0,
|
|
465
|
+
"data-drop-invalid": dropInto && !dropInto.valid ? "" : void 0,
|
|
466
|
+
className: cn("cursor-pointer truncate rounded-sm px-1.5 text-start text-muted-foreground hover:text-foreground", dropInto && cn("flex shrink-0 items-center border border-dashed", dropInto.valid ? "border-(--ec-event-color)/50 bg-(--ec-event-color)/8 text-foreground" : "border-destructive/70 bg-destructive/10 text-destructive"), viewConfig.classNames?.moreIndicator),
|
|
467
|
+
style: dropInto ? {
|
|
468
|
+
"--ec-event-color": dropInto.color ?? "var(--color-primary)",
|
|
469
|
+
height: "calc(var(--ec-month-bar-h, 1.75rem) - 0.125rem)"
|
|
470
|
+
} : void 0,
|
|
471
|
+
onClick: (e) => {
|
|
472
|
+
e.stopPropagation();
|
|
473
|
+
if (settings.onMoreClick?.(day, segments.map((segment) => segment.occurrence), e) === false) {
|
|
474
|
+
e.preventDefault();
|
|
475
|
+
setOpen(false);
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
children: viewConfig.renderMoreIndicator?.({
|
|
479
|
+
day,
|
|
480
|
+
count,
|
|
481
|
+
segments
|
|
482
|
+
}) ?? settings.i18n.labels.more(count)
|
|
483
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
484
|
+
"data-slot": "event-calendar-more-popover",
|
|
485
|
+
align: viewConfig.morePopoverAlign,
|
|
486
|
+
className: cn("w-64 gap-1! p-2! text-xs", viewConfig.classNames?.morePopover),
|
|
487
|
+
onClick: (e) => e.stopPropagation(),
|
|
488
|
+
children: viewConfig.renderMoreContent ? viewConfig.renderMoreContent({
|
|
489
|
+
day,
|
|
490
|
+
segments,
|
|
491
|
+
close: () => setOpen(false)
|
|
492
|
+
}) : /* @__PURE__ */ jsx(EventCalendarMoreDefaultContent, {
|
|
493
|
+
day,
|
|
494
|
+
segments
|
|
495
|
+
})
|
|
496
|
+
})]
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
/** Built-in "+N more" popover body: day header + the day's chips. */
|
|
500
|
+
function EventCalendarMoreDefaultContent({ day, segments }) {
|
|
501
|
+
const settings = useEventCalendarSettings();
|
|
502
|
+
const viewConfig = useEventCalendarViewConfig();
|
|
503
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
504
|
+
className: cn("px-1 py-1 font-medium text-muted-foreground text-xs", viewConfig.classNames?.morePopoverHeader),
|
|
505
|
+
children: format(toZoned(day, settings.timeZone), settings.i18n.formats.moreDayHeader, { locale: settings.locale })
|
|
506
|
+
}), viewConfig.scrollbars === "native" ? /* @__PURE__ */ jsx("div", {
|
|
507
|
+
"data-ec-native-scroll": "",
|
|
508
|
+
className: "-me-2 max-h-(--ec-more-max-height,16rem) min-h-0 overflow-y-auto",
|
|
509
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
510
|
+
className: "flex flex-col gap-1 py-1 ps-1 pe-4",
|
|
511
|
+
children: segments.map((segment) => /* @__PURE__ */ jsx(EventCalendarEvent, {
|
|
512
|
+
segment,
|
|
513
|
+
className: "py-0.5"
|
|
514
|
+
}, segment.occurrence.key))
|
|
515
|
+
})
|
|
516
|
+
}) : /* @__PURE__ */ jsx(ScrollArea, {
|
|
517
|
+
className: "-me-2 min-h-0 **:data-[slot=scroll-area-viewport]:max-h-(--ec-more-max-height,16rem)",
|
|
518
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
519
|
+
className: "flex flex-col gap-1 py-1 ps-1 pe-4",
|
|
520
|
+
children: segments.map((segment) => /* @__PURE__ */ jsx(EventCalendarEvent, {
|
|
521
|
+
segment,
|
|
522
|
+
className: "py-0.5"
|
|
523
|
+
}, segment.occurrence.key))
|
|
524
|
+
})
|
|
525
|
+
})] });
|
|
526
|
+
}
|
|
527
|
+
//#endregion
|
|
528
|
+
export { EventCalendarMonthView, EventCalendarMoreIndicator };
|
|
529
|
+
|
|
530
|
+
//# sourceMappingURL=event-calendar-month-view.js.map
|