@kumix/ui 0.1.3 → 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 +115 -95
- 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/style.css +0 -247
- package/dist/theme.css +244 -0
- package/dist/theme.css.d.ts +3 -0
- package/package.json +101 -40
- 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/source.css +0 -1
- package/dist/source.css.d.ts +0 -3
- package/dist/use-is-mobile-Dln4-L1O.js +0 -210
- package/dist/use-is-mobile-Dln4-L1O.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
//#region src/components/reui/timeline.d.ts
|
|
3
|
+
interface TimelineProps extends useRender.ComponentProps<"div"> {
|
|
4
|
+
defaultValue?: number;
|
|
5
|
+
value?: number;
|
|
6
|
+
onValueChange?: (value: number) => void;
|
|
7
|
+
orientation?: "horizontal" | "vertical";
|
|
8
|
+
}
|
|
9
|
+
declare function Timeline({ defaultValue, value, onValueChange, orientation, className, render, children, ...props }: TimelineProps): import("react").JSX.Element;
|
|
10
|
+
declare function TimelineContent({ className, render, children, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
11
|
+
type TimelineDateProps = useRender.ComponentProps<"time">;
|
|
12
|
+
declare function TimelineDate({ className, render, children, ...props }: TimelineDateProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
13
|
+
declare function TimelineHeader({ className, render, children, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
14
|
+
type TimelineIndicatorProps = useRender.ComponentProps<"div">;
|
|
15
|
+
declare function TimelineIndicator({ className, children, render, ...props }: TimelineIndicatorProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
16
|
+
interface TimelineItemProps extends useRender.ComponentProps<"div"> {
|
|
17
|
+
step: number;
|
|
18
|
+
}
|
|
19
|
+
declare function TimelineItem({ step, className, render, children, ...props }: TimelineItemProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
20
|
+
declare function TimelineSeparator({ className, render, children, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
21
|
+
declare function TimelineTitle({ className, render, children, ...props }: useRender.ComponentProps<"h3">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Timeline, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle };
|
|
24
|
+
//# sourceMappingURL=timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.d.ts","names":[],"sources":["../../../src/components/reui/timeline.tsx"],"mappings":";;UA0BU,sBAAsB,UAAU;EACxC;EACA;EACA,iBAAiB;EACjB;;iBAGO,WACP,cACA,OACA,eACA,aACA,WACA,QACA,aACG,SACF,gCAAa,IAAA;iBAqCP,kBACP,WACA,QACA,aACG,SACF,UAAU,wCAAqB,+CAAA;KAe7B,oBAAoB,UAAU;iBAE1B,eAAe,WAAW,QAAQ,aAAa,SAAS,oCAAiB,+CAAA;iBAkBzE,iBACP,WACA,QACA,aACG,SACF,UAAU,wCAAqB,+CAAA;KAe7B,yBAAyB,UAAU;iBAE/B,oBAAoB,WAAW,UAAU,WAAW,SAAS,yCAAsB,+CAAA;UAmBlF,0BAA0B,UAAU;EAC5C;;iBAGO,eAAe,MAAM,WAAW,QAAQ,aAAa,SAAS,oCAAiB,+CAAA;iBAqB/E,oBACP,WACA,QACA,aACG,SACF,UAAU,wCAAqB,+CAAA;iBAmBzB,gBAAgB,WAAW,QAAQ,aAAa,SAAS,UAAU,uCAAoB,+CAAA"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useCallback, useContext, useState } from "react";
|
|
3
|
+
import { cn } from "@kumix/utils";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
7
|
+
//#region src/components/reui/timeline.tsx
|
|
8
|
+
const TimelineContext = createContext(void 0);
|
|
9
|
+
const useTimeline = () => {
|
|
10
|
+
const context = useContext(TimelineContext);
|
|
11
|
+
if (!context) throw new Error("useTimeline must be used within a Timeline");
|
|
12
|
+
return context;
|
|
13
|
+
};
|
|
14
|
+
function Timeline({ defaultValue = 1, value, onValueChange, orientation = "vertical", className, render, children, ...props }) {
|
|
15
|
+
const [activeStep, setInternalStep] = useState(defaultValue);
|
|
16
|
+
const setActiveStep = useCallback((step) => {
|
|
17
|
+
if (value === void 0) setInternalStep(step);
|
|
18
|
+
onValueChange?.(step);
|
|
19
|
+
}, [value, onValueChange]);
|
|
20
|
+
const currentStep = value ?? activeStep;
|
|
21
|
+
const defaultProps = {
|
|
22
|
+
className: cn("group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col", className),
|
|
23
|
+
"data-orientation": orientation,
|
|
24
|
+
"data-slot": "timeline",
|
|
25
|
+
children
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsx(TimelineContext.Provider, {
|
|
28
|
+
value: {
|
|
29
|
+
activeStep: currentStep,
|
|
30
|
+
setActiveStep
|
|
31
|
+
},
|
|
32
|
+
children: useRender({
|
|
33
|
+
defaultTagName: "div",
|
|
34
|
+
render,
|
|
35
|
+
props: mergeProps(defaultProps, props)
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function TimelineContent({ className, render, children, ...props }) {
|
|
40
|
+
return useRender({
|
|
41
|
+
defaultTagName: "div",
|
|
42
|
+
render,
|
|
43
|
+
props: mergeProps({
|
|
44
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
45
|
+
"data-slot": "timeline-content",
|
|
46
|
+
children
|
|
47
|
+
}, props)
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function TimelineDate({ className, render, children, ...props }) {
|
|
51
|
+
return useRender({
|
|
52
|
+
defaultTagName: "time",
|
|
53
|
+
render,
|
|
54
|
+
props: mergeProps({
|
|
55
|
+
className: cn("mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4", className),
|
|
56
|
+
"data-slot": "timeline-date",
|
|
57
|
+
children
|
|
58
|
+
}, props)
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function TimelineHeader({ className, render, children, ...props }) {
|
|
62
|
+
return useRender({
|
|
63
|
+
defaultTagName: "div",
|
|
64
|
+
render,
|
|
65
|
+
props: mergeProps({
|
|
66
|
+
className: cn(className),
|
|
67
|
+
"data-slot": "timeline-header",
|
|
68
|
+
children
|
|
69
|
+
}, props)
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function TimelineIndicator({ className, children, render, ...props }) {
|
|
73
|
+
return useRender({
|
|
74
|
+
defaultTagName: "div",
|
|
75
|
+
render,
|
|
76
|
+
props: mergeProps({
|
|
77
|
+
"aria-hidden": true,
|
|
78
|
+
className: cn("absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary", className),
|
|
79
|
+
"data-slot": "timeline-indicator",
|
|
80
|
+
children
|
|
81
|
+
}, props)
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function TimelineItem({ step, className, render, children, ...props }) {
|
|
85
|
+
const { activeStep } = useTimeline();
|
|
86
|
+
return useRender({
|
|
87
|
+
defaultTagName: "div",
|
|
88
|
+
render,
|
|
89
|
+
props: mergeProps({
|
|
90
|
+
className: cn("group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6", className),
|
|
91
|
+
"data-completed": step <= activeStep || void 0,
|
|
92
|
+
"data-slot": "timeline-item",
|
|
93
|
+
children
|
|
94
|
+
}, props)
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function TimelineSeparator({ className, render, children, ...props }) {
|
|
98
|
+
return useRender({
|
|
99
|
+
defaultTagName: "div",
|
|
100
|
+
render,
|
|
101
|
+
props: mergeProps({
|
|
102
|
+
"aria-hidden": true,
|
|
103
|
+
className: cn("absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5", className),
|
|
104
|
+
"data-slot": "timeline-separator",
|
|
105
|
+
children
|
|
106
|
+
}, props)
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function TimelineTitle({ className, render, children, ...props }) {
|
|
110
|
+
return useRender({
|
|
111
|
+
defaultTagName: "h3",
|
|
112
|
+
render,
|
|
113
|
+
props: mergeProps({
|
|
114
|
+
className: cn("font-medium text-sm", className),
|
|
115
|
+
"data-slot": "timeline-title",
|
|
116
|
+
children
|
|
117
|
+
}, props)
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { Timeline, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle };
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.js","names":[],"sources":["../../../src/components/reui/timeline.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useCallback, useContext, useState } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nimport { cn } from \"@kumix/utils\";\n\n// Types\ntype TimelineContextValue = {\n activeStep: number;\n setActiveStep: (step: number) => void;\n};\n\n// Context\nconst TimelineContext = createContext<TimelineContextValue | undefined>(undefined);\n\nconst useTimeline = () => {\n const context = useContext(TimelineContext);\n if (!context) {\n throw new Error(\"useTimeline must be used within a Timeline\");\n }\n return context;\n};\n\n// Components\ninterface TimelineProps extends useRender.ComponentProps<\"div\"> {\n defaultValue?: number;\n value?: number;\n onValueChange?: (value: number) => void;\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nfunction Timeline({\n defaultValue = 1,\n value,\n onValueChange,\n orientation = \"vertical\",\n className,\n render,\n children,\n ...props\n}: TimelineProps) {\n const [activeStep, setInternalStep] = useState(defaultValue);\n\n const setActiveStep = useCallback(\n (step: number) => {\n if (value === undefined) {\n setInternalStep(step);\n }\n onValueChange?.(step);\n },\n [value, onValueChange],\n );\n\n const currentStep = value ?? activeStep;\n\n const defaultProps = {\n className: cn(\n \"group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col\",\n className,\n ),\n \"data-orientation\": orientation,\n \"data-slot\": \"timeline\",\n children,\n };\n\n return (\n <TimelineContext.Provider value={{ activeStep: currentStep, setActiveStep }}>\n {useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n })}\n </TimelineContext.Provider>\n );\n}\n\n// TimelineContent\nfunction TimelineContent({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(\"text-muted-foreground text-sm\", className),\n \"data-slot\": \"timeline-content\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineDate\ntype TimelineDateProps = useRender.ComponentProps<\"time\">;\n\nfunction TimelineDate({ className, render, children, ...props }: TimelineDateProps) {\n const defaultProps = {\n className: cn(\n \"mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4\",\n className,\n ),\n \"data-slot\": \"timeline-date\",\n children,\n };\n\n return useRender({\n defaultTagName: \"time\",\n render,\n props: mergeProps<\"time\">(defaultProps, props),\n });\n}\n\n// TimelineHeader\nfunction TimelineHeader({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(className),\n \"data-slot\": \"timeline-header\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineIndicator\ntype TimelineIndicatorProps = useRender.ComponentProps<\"div\">;\n\nfunction TimelineIndicator({ className, children, render, ...props }: TimelineIndicatorProps) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary\",\n className,\n ),\n \"data-slot\": \"timeline-indicator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineItem\ninterface TimelineItemProps extends useRender.ComponentProps<\"div\"> {\n step: number;\n}\n\nfunction TimelineItem({ step, className, render, children, ...props }: TimelineItemProps) {\n const { activeStep } = useTimeline();\n\n const defaultProps = {\n className: cn(\n \"group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6\",\n className,\n ),\n \"data-completed\": step <= activeStep || undefined,\n \"data-slot\": \"timeline-item\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineSeparator\nfunction TimelineSeparator({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5\",\n className,\n ),\n \"data-slot\": \"timeline-separator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineTitle\nfunction TimelineTitle({ className, render, children, ...props }: useRender.ComponentProps<\"h3\">) {\n const defaultProps = {\n className: cn(\"font-medium text-sm\", className),\n \"data-slot\": \"timeline-title\",\n children,\n };\n\n return useRender({\n defaultTagName: \"h3\",\n render,\n props: mergeProps<\"h3\">(defaultProps, props),\n });\n}\n\nexport {\n Timeline,\n TimelineContent,\n TimelineDate,\n TimelineHeader,\n TimelineIndicator,\n TimelineItem,\n TimelineSeparator,\n TimelineTitle,\n};\n"],"mappings":";;;;;;;AAeA,MAAM,kBAAkB,cAAgD,KAAA,CAAS;AAEjF,MAAM,oBAAoB;CACxB,MAAM,UAAU,WAAW,eAAe;CAC1C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,4CAA4C;CAE9D,OAAO;AACT;AAUA,SAAS,SAAS,EAChB,eAAe,GACf,OACA,eACA,cAAc,YACd,WACA,QACA,UACA,GAAG,SACa;CAChB,MAAM,CAAC,YAAY,mBAAmB,SAAS,YAAY;CAE3D,MAAM,gBAAgB,aACnB,SAAiB;EAChB,IAAI,UAAU,KAAA,GACZ,gBAAgB,IAAI;EAEtB,gBAAgB,IAAI;CACtB,GACA,CAAC,OAAO,aAAa,CACvB;CAEA,MAAM,cAAc,SAAS;CAE7B,MAAM,eAAe;EACnB,WAAW,GACT,wIACA,SACF;EACA,oBAAoB;EACpB,aAAa;EACb;CACF;CAEA,OACE,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;GAAE,YAAY;GAAa;EAAc;EACvE,UAAA,UAAU;GACT,gBAAgB;GAChB;GACA,OAAO,WAAkB,cAAc,KAAK;EAC9C,CAAC;CACuB,CAAA;AAE9B;AAGA,SAAS,gBAAgB,EACvB,WACA,QACA,UACA,GAAG,SAC+B;CAOlC,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB;GARzB,WAAW,GAAG,iCAAiC,SAAS;GACxD,aAAa;GACb;EAMoC,GAAG,KAAK;CAC9C,CAAC;AACH;AAKA,SAAS,aAAa,EAAE,WAAW,QAAQ,UAAU,GAAG,SAA4B;CAUlF,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAmB;GAX1B,WAAW,GACT,8GACA,SACF;GACA,aAAa;GACb;EAMqC,GAAG,KAAK;CAC/C,CAAC;AACH;AAGA,SAAS,eAAe,EACtB,WACA,QACA,UACA,GAAG,SAC+B;CAOlC,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB;GARzB,WAAW,GAAG,SAAS;GACvB,aAAa;GACb;EAMoC,GAAG,KAAK;CAC9C,CAAC;AACH;AAKA,SAAS,kBAAkB,EAAE,WAAW,UAAU,QAAQ,GAAG,SAAiC;CAW5F,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB;GAZzB,eAAe;GACf,WAAW,GACT,mbACA,SACF;GACA,aAAa;GACb;EAMoC,GAAG,KAAK;CAC9C,CAAC;AACH;AAOA,SAAS,aAAa,EAAE,MAAM,WAAW,QAAQ,UAAU,GAAG,SAA4B;CACxF,MAAM,EAAE,eAAe,YAAY;CAYnC,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB;GAZzB,WAAW,GACT,wVACA,SACF;GACA,kBAAkB,QAAQ,cAAc,KAAA;GACxC,aAAa;GACb;EAMoC,GAAG,KAAK;CAC9C,CAAC;AACH;AAGA,SAAS,kBAAkB,EACzB,WACA,QACA,UACA,GAAG,SAC+B;CAWlC,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB;GAZzB,eAAe;GACf,WAAW,GACT,kpBACA,SACF;GACA,aAAa;GACb;EAMoC,GAAG,KAAK;CAC9C,CAAC;AACH;AAGA,SAAS,cAAc,EAAE,WAAW,QAAQ,UAAU,GAAG,SAAyC;CAOhG,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAiB;GARxB,WAAW,GAAG,uBAAuB,SAAS;GAC9C,aAAa;GACb;EAMmC,GAAG,KAAK;CAC7C,CAAC;AACH"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import { ItemInstance } from "@headless-tree/core";
|
|
3
|
+
//#region src/components/reui/tree.d.ts
|
|
4
|
+
type ToggleIconType = "chevron" | "plus-minus";
|
|
5
|
+
interface TreeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
indent?: number;
|
|
7
|
+
tree?: any;
|
|
8
|
+
toggleIconType?: ToggleIconType;
|
|
9
|
+
}
|
|
10
|
+
declare function Tree({ indent, tree, className, toggleIconType, ...props }: TreeProps): import("react").JSX.Element;
|
|
11
|
+
interface TreeItemProps<T = any> extends Omit<useRender.ComponentProps<"button">, "indent"> {
|
|
12
|
+
item: ItemInstance<T>;
|
|
13
|
+
indent?: number;
|
|
14
|
+
}
|
|
15
|
+
declare function TreeItem<T = any>({ item, className, render, children, ...props }: TreeItemProps<T>): import("react").JSX.Element;
|
|
16
|
+
interface TreeItemLabelProps<T = any> extends React.HTMLAttributes<HTMLSpanElement> {
|
|
17
|
+
item?: ItemInstance<T>;
|
|
18
|
+
}
|
|
19
|
+
declare function TreeItemLabel<T = any>({ item: propItem, children, className, ...props }: TreeItemLabelProps<T>): import("react").JSX.Element | null;
|
|
20
|
+
declare function TreeDragLine({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react").JSX.Element | null;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Tree, TreeDragLine, TreeItem, TreeItemLabel };
|
|
23
|
+
//# sourceMappingURL=tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.d.ts","names":[],"sources":["../../../src/components/reui/tree.tsx"],"mappings":";;;KAYK;UAoBK,kBAAkB,MAAM,eAAe;EAC/C;EACA;EACA,iBAAiB;;iBAGV,OAAO,QAAa,MAAM,WAAW,mBAA+B,SAAS,4BAAS,IAAA;UA0BrF,cAAc,iBAAiB,KAAK,UAAU;EACtD,MAAM,aAAa;EACnB;;iBAGO,SAAS,WAAW,MAAM,WAAW,QAAQ,aAAa,SAAS,cAAc,qBAAE,IAAA;UA4ClF,mBAAmB,iBAAiB,MAAM,eAAe;EACjE,OAAO,aAAa;;iBAGb,cAAc,WACrB,MAAM,UACN,UACA,cACG,SACF,mBAAmB,qBAAE,IAAA;iBA6Cf,eAAe,cAAc,SAAS,MAAM,eAAe,kCAAe,IAAA"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { cn } from "@kumix/utils";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronDownIcon, MinusIcon, PlusIcon } from "lucide-react";
|
|
6
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
+
//#region src/components/reui/tree.tsx
|
|
9
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: <> */
|
|
10
|
+
const TreeContext = createContext({
|
|
11
|
+
indent: 20,
|
|
12
|
+
currentItem: void 0,
|
|
13
|
+
tree: void 0,
|
|
14
|
+
toggleIconType: "plus-minus"
|
|
15
|
+
});
|
|
16
|
+
function useTreeContext() {
|
|
17
|
+
return useContext(TreeContext);
|
|
18
|
+
}
|
|
19
|
+
function Tree({ indent = 20, tree, className, toggleIconType = "chevron", ...props }) {
|
|
20
|
+
const containerProps = tree && typeof tree.getContainerProps === "function" ? tree.getContainerProps() : {};
|
|
21
|
+
const { style: propStyle, ...otherProps } = {
|
|
22
|
+
...props,
|
|
23
|
+
...containerProps
|
|
24
|
+
};
|
|
25
|
+
const mergedStyle = {
|
|
26
|
+
...propStyle,
|
|
27
|
+
"--tree-indent": `${indent}px`
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ jsx(TreeContext.Provider, {
|
|
30
|
+
value: {
|
|
31
|
+
indent,
|
|
32
|
+
tree,
|
|
33
|
+
toggleIconType
|
|
34
|
+
},
|
|
35
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
36
|
+
"data-slot": "tree",
|
|
37
|
+
style: mergedStyle,
|
|
38
|
+
className: cn("flex flex-col", className),
|
|
39
|
+
...otherProps
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function TreeItem({ item, className, render, children, ...props }) {
|
|
44
|
+
const parentContext = useTreeContext();
|
|
45
|
+
const { indent } = parentContext;
|
|
46
|
+
const itemProps = typeof item.getProps === "function" ? item.getProps() : {};
|
|
47
|
+
const { style: propStyle, ...otherProps } = {
|
|
48
|
+
...props,
|
|
49
|
+
children,
|
|
50
|
+
...itemProps
|
|
51
|
+
};
|
|
52
|
+
const defaultProps = {
|
|
53
|
+
"data-slot": "tree-item",
|
|
54
|
+
style: {
|
|
55
|
+
...propStyle,
|
|
56
|
+
"--tree-padding": `${item.getItemMeta().level * indent}px`
|
|
57
|
+
},
|
|
58
|
+
className: cn("z-10 select-none ps-(--tree-padding) not-last:pb-0.5 outline-hidden focus:z-20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
|
|
59
|
+
"data-focus": typeof item.isFocused === "function" ? item.isFocused() || false : void 0,
|
|
60
|
+
"data-folder": typeof item.isFolder === "function" ? item.isFolder() || false : void 0,
|
|
61
|
+
"data-selected": typeof item.isSelected === "function" ? item.isSelected() || false : void 0,
|
|
62
|
+
"data-drag-target": typeof item.isDragTarget === "function" ? item.isDragTarget() || false : void 0,
|
|
63
|
+
"data-search-match": typeof item.isMatchingSearch === "function" ? item.isMatchingSearch() || false : void 0,
|
|
64
|
+
"aria-expanded": item.isExpanded()
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ jsx(TreeContext.Provider, {
|
|
67
|
+
value: {
|
|
68
|
+
...parentContext,
|
|
69
|
+
currentItem: item
|
|
70
|
+
},
|
|
71
|
+
children: useRender({
|
|
72
|
+
defaultTagName: "button",
|
|
73
|
+
render,
|
|
74
|
+
props: mergeProps(defaultProps, otherProps)
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function TreeItemLabel({ item: propItem, children, className, ...props }) {
|
|
79
|
+
const { currentItem, toggleIconType } = useTreeContext();
|
|
80
|
+
const item = propItem || currentItem;
|
|
81
|
+
if (!item) {
|
|
82
|
+
console.warn("TreeItemLabel: No item provided via props or context");
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
86
|
+
"data-slot": "tree-item-label",
|
|
87
|
+
className: cn("flex items-center gap-1 bg-background in-data-[drag-target=true]:bg-accent in-data-[search-match=true]:bg-blue-50! in-data-[selected=true]:bg-accent not-in-data-[folder=true]:ps-7 in-data-[selected=true]:text-accent-foreground in-focus-visible:ring-[3px] in-focus-visible:ring-ring/50 transition-colors hover:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0", "rounded-md", "py-1.5", "px-2", "text-sm", className),
|
|
88
|
+
...props,
|
|
89
|
+
children: [item.isFolder() && (toggleIconType === "plus-minus" ? item.isExpanded() ? /* @__PURE__ */ jsx(MinusIcon, {
|
|
90
|
+
className: "size-3.5 text-muted-foreground",
|
|
91
|
+
stroke: "currentColor",
|
|
92
|
+
strokeWidth: "1"
|
|
93
|
+
}) : /* @__PURE__ */ jsx(PlusIcon, {
|
|
94
|
+
className: "size-3.5 text-muted-foreground",
|
|
95
|
+
stroke: "currentColor",
|
|
96
|
+
strokeWidth: "1"
|
|
97
|
+
}) : /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 in-aria-[expanded=false]:-rotate-90 text-muted-foreground" })), children || (typeof item.getItemName === "function" ? item.getItemName() : null)]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function TreeDragLine({ className, ...props }) {
|
|
101
|
+
const { tree } = useTreeContext();
|
|
102
|
+
if (!tree || typeof tree.getDragLineStyle !== "function") {
|
|
103
|
+
console.warn("TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method");
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
return /* @__PURE__ */ jsx("div", {
|
|
107
|
+
style: tree.getDragLineStyle(),
|
|
108
|
+
className: cn("absolute z-30 -mt-px h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:border-2 before:border-primary before:bg-background", "before:rounded-full", className),
|
|
109
|
+
...props
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
export { Tree, TreeDragLine, TreeItem, TreeItemLabel };
|
|
114
|
+
|
|
115
|
+
//# sourceMappingURL=tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.js","names":[],"sources":["../../../src/components/reui/tree.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: <> */\n\n\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ItemInstance } from \"@headless-tree/core\";\nimport { ChevronDownIcon, MinusIcon, PlusIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\n\ntype ToggleIconType = \"chevron\" | \"plus-minus\";\n\ninterface TreeContextValue<T = any> {\n indent: number;\n currentItem?: ItemInstance<T>;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nconst TreeContext = createContext<TreeContextValue>({\n indent: 20,\n currentItem: undefined,\n tree: undefined,\n toggleIconType: \"plus-minus\",\n});\n\nfunction useTreeContext<T = any>() {\n return useContext(TreeContext) as TreeContextValue<T>;\n}\n\ninterface TreeProps extends React.HTMLAttributes<HTMLDivElement> {\n indent?: number;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nfunction Tree({ indent = 20, tree, className, toggleIconType = \"chevron\", ...props }: TreeProps) {\n const containerProps =\n tree && typeof tree.getContainerProps === \"function\" ? tree.getContainerProps() : {};\n const mergedProps = { ...props, ...containerProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-indent\": `${indent}px`,\n } as React.CSSProperties;\n\n return (\n <TreeContext.Provider value={{ indent, tree, toggleIconType }}>\n <div\n data-slot=\"tree\"\n style={mergedStyle}\n className={cn(\"flex flex-col\", className)}\n {...otherProps}\n />\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemProps<T = any> extends Omit<useRender.ComponentProps<\"button\">, \"indent\"> {\n item: ItemInstance<T>;\n indent?: number;\n}\n\nfunction TreeItem<T = any>({ item, className, render, children, ...props }: TreeItemProps<T>) {\n const parentContext = useTreeContext<T>();\n const { indent } = parentContext;\n\n const itemProps = typeof item.getProps === \"function\" ? item.getProps() : {};\n const mergedProps = { ...props, children, ...itemProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-padding\": `${item.getItemMeta().level * indent}px`,\n } as React.CSSProperties;\n\n const defaultProps = {\n \"data-slot\": \"tree-item\",\n style: mergedStyle,\n className: cn(\n \"z-10 select-none ps-(--tree-padding) not-last:pb-0.5 outline-hidden focus:z-20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n ),\n \"data-focus\": typeof item.isFocused === \"function\" ? item.isFocused() || false : undefined,\n \"data-folder\": typeof item.isFolder === \"function\" ? item.isFolder() || false : undefined,\n \"data-selected\": typeof item.isSelected === \"function\" ? item.isSelected() || false : undefined,\n \"data-drag-target\":\n typeof item.isDragTarget === \"function\" ? item.isDragTarget() || false : undefined,\n \"data-search-match\":\n typeof item.isMatchingSearch === \"function\" ? item.isMatchingSearch() || false : undefined,\n \"aria-expanded\": item.isExpanded(),\n };\n\n return (\n <TreeContext.Provider value={{ ...parentContext, currentItem: item }}>\n {useRender({\n defaultTagName: \"button\",\n render,\n props: mergeProps<\"button\">(defaultProps, otherProps),\n })}\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemLabelProps<T = any> extends React.HTMLAttributes<HTMLSpanElement> {\n item?: ItemInstance<T>;\n}\n\nfunction TreeItemLabel<T = any>({\n item: propItem,\n children,\n className,\n ...props\n}: TreeItemLabelProps<T>) {\n const { currentItem, toggleIconType } = useTreeContext<T>();\n const item = propItem || currentItem;\n\n if (!item) {\n console.warn(\"TreeItemLabel: No item provided via props or context\");\n return null;\n }\n\n return (\n <span\n data-slot=\"tree-item-label\"\n className={cn(\n \"flex items-center gap-1 bg-background in-data-[drag-target=true]:bg-accent in-data-[search-match=true]:bg-blue-50! in-data-[selected=true]:bg-accent not-in-data-[folder=true]:ps-7 in-data-[selected=true]:text-accent-foreground in-focus-visible:ring-[3px] in-focus-visible:ring-ring/50 transition-colors hover:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n \"rounded-md\",\n \"py-1.5\",\n \"px-2\",\n \"text-sm\",\n className,\n )}\n {...props}\n >\n {item.isFolder() &&\n (toggleIconType === \"plus-minus\" ? (\n item.isExpanded() ? (\n <MinusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n ) : (\n <PlusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n )\n ) : (\n <ChevronDownIcon className=\"size-4 in-aria-[expanded=false]:-rotate-90 text-muted-foreground\" />\n ))}\n {children || (typeof item.getItemName === \"function\" ? item.getItemName() : null)}\n </span>\n );\n}\n\nfunction TreeDragLine({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n const { tree } = useTreeContext();\n\n if (!tree || typeof tree.getDragLineStyle !== \"function\") {\n console.warn(\n \"TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method\",\n );\n return null;\n }\n\n const dragLine = tree.getDragLineStyle();\n return (\n <div\n style={dragLine}\n className={cn(\n \"absolute z-30 -mt-px h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:border-2 before:border-primary before:bg-background\",\n \"before:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Tree, TreeDragLine, TreeItem, TreeItemLabel };\n"],"mappings":";;;;;;;;;AAqBA,MAAM,cAAc,cAAgC;CAClD,QAAQ;CACR,aAAa,KAAA;CACb,MAAM,KAAA;CACN,gBAAgB;AAClB,CAAC;AAED,SAAS,iBAA0B;CACjC,OAAO,WAAW,WAAW;AAC/B;AAQA,SAAS,KAAK,EAAE,SAAS,IAAI,MAAM,WAAW,iBAAiB,WAAW,GAAG,SAAoB;CAC/F,MAAM,iBACJ,QAAQ,OAAO,KAAK,sBAAsB,aAAa,KAAK,kBAAkB,IAAI,CAAC;CAIrF,MAAM,EAAE,OAAO,WAAW,GAAG,eAAe;EAHtB,GAAG;EAAO,GAAG;CAGmB;CAGtD,MAAM,cAAc;EAClB,GAAG;EACH,iBAAiB,GAAG,OAAO;CAC7B;CAEA,OACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;GAAE;GAAQ;GAAM;EAAe;EAC1D,UAAA,oBAAC,OAAD;GACE,aAAU;GACV,OAAO;GACP,WAAW,GAAG,iBAAiB,SAAS;GACxC,GAAI;EACL,CAAA;CACmB,CAAA;AAE1B;AAOA,SAAS,SAAkB,EAAE,MAAM,WAAW,QAAQ,UAAU,GAAG,SAA2B;CAC5F,MAAM,gBAAgB,eAAkB;CACxC,MAAM,EAAE,WAAW;CAEnB,MAAM,YAAY,OAAO,KAAK,aAAa,aAAa,KAAK,SAAS,IAAI,CAAC;CAI3E,MAAM,EAAE,OAAO,WAAW,GAAG,eAAe;EAHtB,GAAG;EAAO;EAAU,GAAG;CAGS;CAQtD,MAAM,eAAe;EACnB,aAAa;EACb,OAAO;GANP,GAAG;GACH,kBAAkB,GAAG,KAAK,YAAY,CAAC,CAAC,QAAQ,OAAO;EAKtC;EACjB,WAAW,GACT,iJACA,SACF;EACA,cAAc,OAAO,KAAK,cAAc,aAAa,KAAK,UAAU,KAAK,QAAQ,KAAA;EACjF,eAAe,OAAO,KAAK,aAAa,aAAa,KAAK,SAAS,KAAK,QAAQ,KAAA;EAChF,iBAAiB,OAAO,KAAK,eAAe,aAAa,KAAK,WAAW,KAAK,QAAQ,KAAA;EACtF,oBACE,OAAO,KAAK,iBAAiB,aAAa,KAAK,aAAa,KAAK,QAAQ,KAAA;EAC3E,qBACE,OAAO,KAAK,qBAAqB,aAAa,KAAK,iBAAiB,KAAK,QAAQ,KAAA;EACnF,iBAAiB,KAAK,WAAW;CACnC;CAEA,OACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;GAAE,GAAG;GAAe,aAAa;EAAK;EAChE,UAAA,UAAU;GACT,gBAAgB;GAChB;GACA,OAAO,WAAqB,cAAc,UAAU;EACtD,CAAC;CACmB,CAAA;AAE1B;AAMA,SAAS,cAAuB,EAC9B,MAAM,UACN,UACA,WACA,GAAG,SACqB;CACxB,MAAM,EAAE,aAAa,mBAAmB,eAAkB;CAC1D,MAAM,OAAO,YAAY;CAEzB,IAAI,CAAC,MAAM;EACT,QAAQ,KAAK,sDAAsD;EACnE,OAAO;CACT;CAEA,OACE,qBAAC,QAAD;EACE,aAAU;EACV,WAAW,GACT,+WACA,cACA,UACA,QACA,WACA,SACF;EACA,GAAI;EAVN,UAAA,CAYG,KAAK,SAAS,MACZ,mBAAmB,eAClB,KAAK,WAAW,IACd,oBAAC,WAAD;GACE,WAAU;GACV,QAAO;GACP,aAAY;EACb,CAAA,IAED,oBAAC,UAAD;GACE,WAAU;GACV,QAAO;GACP,aAAY;EACb,CAAA,IAGH,oBAAC,iBAAD,EAAiB,WAAU,mEAAoE,CAAA,IAElG,aAAa,OAAO,KAAK,gBAAgB,aAAa,KAAK,YAAY,IAAI,KACxE;;AAEV;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA+C;CACnF,MAAM,EAAE,SAAS,eAAe;CAEhC,IAAI,CAAC,QAAQ,OAAO,KAAK,qBAAqB,YAAY;EACxD,QAAQ,KACN,0FACF;EACA,OAAO;CACT;CAGA,OACE,oBAAC,OAAD;EACE,OAHa,KAAK,iBAGJ;EACd,WAAW,GACT,4KACA,uBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
2
|
+
//#region src/components/ui/accordion.d.ts
|
|
3
|
+
declare function Accordion({ className, ...props }: Accordion$1.Root.Props): import("react").JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: Accordion$1.Item.Props): import("react").JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: Accordion$1.Trigger.Props): import("react").JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: Accordion$1.Panel.Props): import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
9
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","names":[],"sources":["../../../src/components/ui/accordion.tsx"],"mappings":";;iBAOS,YAAY,cAAc,SAAS,YAAmB,KAAK,wBAAK,IAAA;iBAUhE,gBAAgB,cAAc,SAAS,YAAmB,KAAK,wBAAK,IAAA;iBAUpE,mBAAmB,WAAW,aAAa,SAAS,YAAmB,QAAQ,wBAAK,IAAA;iBAyBpF,mBAAmB,WAAW,aAAa,SAAS,YAAmB,MAAM,wBAAK,IAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "@kumix/utils";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5
|
+
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
6
|
+
//#region src/components/ui/accordion.tsx
|
|
7
|
+
function Accordion({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Accordion$1.Root, {
|
|
9
|
+
"data-slot": "accordion",
|
|
10
|
+
className: cn("flex w-full flex-col", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function AccordionItem({ className, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Accordion$1.Item, {
|
|
16
|
+
"data-slot": "accordion-item",
|
|
17
|
+
className: cn("not-last:border-b", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Accordion$1.Header, {
|
|
23
|
+
className: "flex",
|
|
24
|
+
children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
|
|
25
|
+
"data-slot": "accordion-trigger",
|
|
26
|
+
className: cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left font-medium text-sm outline-none transition-all hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", className),
|
|
27
|
+
...props,
|
|
28
|
+
children: [
|
|
29
|
+
children,
|
|
30
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
31
|
+
"data-slot": "accordion-trigger-icon",
|
|
32
|
+
className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx(ChevronUpIcon, {
|
|
35
|
+
"data-slot": "accordion-trigger-icon",
|
|
36
|
+
className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function AccordionContent({ className, children, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsx(Accordion$1.Panel, {
|
|
44
|
+
"data-slot": "accordion-content",
|
|
45
|
+
className: "overflow-hidden text-sm data-closed:animate-accordion-up data-open:animate-accordion-down",
|
|
46
|
+
...props,
|
|
47
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: cn("h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
|
|
49
|
+
children
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.js","names":["AccordionPrimitive"],"sources":["../../../src/components/ui/accordion.tsx"],"sourcesContent":["\"use client\";\n\nimport { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\";\nimport { ChevronDownIcon, ChevronUpIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\n\nfunction Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\"flex w-full flex-col\", className)}\n {...props}\n />\n );\n}\n\nfunction AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"not-last:border-b\", className)}\n {...props}\n />\n );\n}\n\nfunction AccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n \"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left font-medium text-sm outline-none transition-all hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon\n data-slot=\"accordion-trigger-icon\"\n className=\"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden\"\n />\n <ChevronUpIcon\n data-slot=\"accordion-trigger-icon\"\n className=\"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline\"\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n}\n\nfunction AccordionContent({ className, children, ...props }: AccordionPrimitive.Panel.Props) {\n return (\n <AccordionPrimitive.Panel\n data-slot=\"accordion-content\"\n className=\"overflow-hidden text-sm data-closed:animate-accordion-up data-open:animate-accordion-down\"\n {...props}\n >\n <div\n className={cn(\n \"h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n className,\n )}\n >\n {children}\n </div>\n </AccordionPrimitive.Panel>\n );\n}\n\nexport { Accordion, AccordionContent, AccordionItem, AccordionTrigger };\n"],"mappings":";;;;;;AAOA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAwC;CACzE,OACE,oBAACA,YAAmB,MAApB;EACE,aAAU;EACV,WAAW,GAAG,wBAAwB,SAAS;EAC/C,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAwC;CAC7E,OACE,oBAACA,YAAmB,MAApB;EACE,aAAU;EACV,WAAW,GAAG,qBAAqB,SAAS;EAC5C,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EAAE,WAAW,UAAU,GAAG,SAA2C;CAC7F,OACE,oBAACA,YAAmB,QAApB;EAA2B,WAAU;EACnC,UAAA,qBAACA,YAAmB,SAApB;GACE,aAAU;GACV,WAAW,GACT,8fACA,SACF;GACA,GAAI;GANN,UAAA;IAQG;IACD,oBAAC,iBAAD;KACE,aAAU;KACV,WAAU;IACX,CAAA;IACD,oBAAC,eAAD;KACE,aAAU;KACV,WAAU;IACX,CAAA;GACyB;;CACH,CAAA;AAE/B;AAEA,SAAS,iBAAiB,EAAE,WAAW,UAAU,GAAG,SAAyC;CAC3F,OACE,oBAACA,YAAmB,OAApB;EACE,aAAU;EACV,WAAU;EACV,GAAI;EAEJ,UAAA,oBAAC,OAAD;GACE,WAAW,GACT,2LACA,SACF;GAEC;EACE,CAAA;CACmB,CAAA;AAE9B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
4
|
+
//#region src/components/ui/alert-dialog.d.ts
|
|
5
|
+
declare function AlertDialog({ ...props }: AlertDialog$1.Root.Props): React$1.JSX.Element;
|
|
6
|
+
declare function AlertDialogTrigger({ ...props }: AlertDialog$1.Trigger.Props): React$1.JSX.Element;
|
|
7
|
+
declare function AlertDialogPortal({ ...props }: AlertDialog$1.Portal.Props): React$1.JSX.Element;
|
|
8
|
+
declare function AlertDialogOverlay({ className, ...props }: AlertDialog$1.Backdrop.Props): React$1.JSX.Element;
|
|
9
|
+
declare function AlertDialogContent({ className, size, ...props }: AlertDialog$1.Popup.Props & {
|
|
10
|
+
size?: "default" | "sm";
|
|
11
|
+
}): React$1.JSX.Element;
|
|
12
|
+
declare function AlertDialogHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
13
|
+
declare function AlertDialogFooter({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
14
|
+
declare function AlertDialogMedia({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
15
|
+
declare function AlertDialogTitle({ className, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Title>): React$1.JSX.Element;
|
|
16
|
+
declare function AlertDialogDescription({ className, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Description>): React$1.JSX.Element;
|
|
17
|
+
declare function AlertDialogAction({ className, ...props }: React$1.ComponentProps<typeof Button>): React$1.JSX.Element;
|
|
18
|
+
declare function AlertDialogCancel({ className, variant, size, ...props }: AlertDialog$1.Close.Props & Pick<React$1.ComponentProps<typeof Button>, "variant" | "size">): React$1.JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
21
|
+
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","names":[],"sources":["../../../src/components/ui/alert-dialog.tsx"],"mappings":";;;;iBAQS,iBAAiB,SAAS,cAAqB,KAAK,QAAK,QAAA,IAAA;iBAIzD,wBAAwB,SAAS,cAAqB,QAAQ,QAAK,QAAA,IAAA;iBAInE,uBAAuB,SAAS,cAAqB,OAAO,QAAK,QAAA,IAAA;iBAIjE,qBAAqB,cAAc,SAAS,cAAqB,SAAS,QAAK,QAAA,IAAA;iBAa/E,qBACP,WACA,SACG,SACF,cAAqB,MAAM;EAC5B;IACD,QAAA,IAAA;iBAiBQ,oBAAoB,cAAc,SAAS,QAAM,wBAAqB,QAAA,IAAA;iBAatE,oBAAoB,cAAc,SAAS,QAAM,wBAAqB,QAAA,IAAA;iBAatE,mBAAmB,cAAc,SAAS,QAAM,wBAAqB,QAAA,IAAA;iBAarE,mBACP,cACG,SACF,QAAM,sBAAsB,cAAqB,SAAM,QAAA,IAAA;iBAajD,yBACP,cACG,SACF,QAAM,sBAAsB,cAAqB,eAAY,QAAA,IAAA;iBAavD,oBAAoB,cAAc,SAAS,QAAM,sBAAsB,UAAO,QAAA,IAAA;iBAI9E,oBACP,WACA,SACA,SACG,SACF,cAAqB,MAAM,QAC5B,KAAK,QAAM,sBAAsB,+BAA4B,QAAA,IAAA"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "./button.js";
|
|
3
|
+
import { cn } from "@kumix/utils";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
6
|
+
//#region src/components/ui/alert-dialog.tsx
|
|
7
|
+
function AlertDialog({ ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
|
|
9
|
+
"data-slot": "alert-dialog",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function AlertDialogTrigger({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
|
|
15
|
+
"data-slot": "alert-dialog-trigger",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function AlertDialogPortal({ ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Portal, {
|
|
21
|
+
"data-slot": "alert-dialog-portal",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
|
|
27
|
+
"data-slot": "alert-dialog-overlay",
|
|
28
|
+
className: cn("data-open:fade-in-0 data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function AlertDialogContent({ className, size = "default", ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
|
|
34
|
+
"data-slot": "alert-dialog-content",
|
|
35
|
+
"data-size": size,
|
|
36
|
+
className: cn("group/alert-dialog-content data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm", className),
|
|
37
|
+
...props
|
|
38
|
+
})] });
|
|
39
|
+
}
|
|
40
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx("div", {
|
|
42
|
+
"data-slot": "alert-dialog-header",
|
|
43
|
+
className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx("div", {
|
|
49
|
+
"data-slot": "alert-dialog-footer",
|
|
50
|
+
className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function AlertDialogMedia({ className, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx("div", {
|
|
56
|
+
"data-slot": "alert-dialog-media",
|
|
57
|
+
className: cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
|
|
63
|
+
"data-slot": "alert-dialog-title",
|
|
64
|
+
className: cn("font-medium text-base sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
|
|
70
|
+
"data-slot": "alert-dialog-description",
|
|
71
|
+
className: cn("text-balance text-muted-foreground text-sm md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function AlertDialogAction({ className, ...props }) {
|
|
76
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
77
|
+
"data-slot": "alert-dialog-action",
|
|
78
|
+
className: cn(className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }) {
|
|
83
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
|
|
84
|
+
"data-slot": "alert-dialog-cancel",
|
|
85
|
+
className: cn(className),
|
|
86
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
87
|
+
variant,
|
|
88
|
+
size
|
|
89
|
+
}),
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","names":["AlertDialogPrimitive"],"sources":["../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Button } from \"./button\";\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-open:fade-in-0 data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\";\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm\",\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogMedia({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"font-medium text-base sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n \"text-balance text-muted-foreground text-sm md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof Button>) {\n return <Button data-slot=\"alert-dialog-action\" className={cn(className)} {...props} />;\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"mappings":";;;;;;AAQA,SAAS,YAAY,EAAE,GAAG,SAA0C;CAClE,OAAO,oBAACA,cAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,mBAAmB,EAAE,GAAG,SAA6C;CAC5E,OAAO,oBAACA,cAAqB,SAAtB;EAA8B,aAAU;EAAuB,GAAI;CAAQ,CAAA;AACpF;AAEA,SAAS,kBAAkB,EAAE,GAAG,SAA4C;CAC1E,OAAO,oBAACA,cAAqB,QAAtB;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA8C;CACxF,OACE,oBAACA,cAAqB,UAAtB;EACE,aAAU;EACV,WAAW,GACT,yLACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,mBAAmB,EAC1B,WACA,OAAO,WACP,GAAG,SAGF;CACD,OACE,qBAAC,mBAAD,EAAA,UAAA,CACE,oBAAC,oBAAD,CAAqB,CAAA,GACrB,oBAACA,cAAqB,OAAtB;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT,8aACA,SACF;EACA,GAAI;CACL,CAAA,CACgB,EAAA,CAAA;AAEvB;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAsC;CAC/E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,sZACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAsC;CAC/E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,iNACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAsC;CAC9E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,8KACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,cAAqB,OAAtB;EACE,aAAU;EACV,WAAW,GACT,qJACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,oBAACA,cAAqB,aAAtB;EACE,aAAU;EACV,WAAW,GACT,kIACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAA8C;CACvF,OAAO,oBAAC,QAAD;EAAQ,aAAU;EAAsB,WAAW,GAAG,SAAS;EAAG,GAAI;CAAQ,CAAA;AACvF;AAEA,SAAS,kBAAkB,EACzB,WACA,UAAU,WACV,OAAO,WACP,GAAG,SAE4D;CAC/D,OACE,oBAACA,cAAqB,OAAtB;EACE,aAAU;EACV,WAAW,GAAG,SAAS;EACvB,QAAQ,oBAAC,QAAD;GAAiB;GAAe;EAAO,CAAA;EAC/C,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
//#region src/components/ui/alert.d.ts
|
|
4
|
+
declare const alertVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Alert({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React$1.JSX.Element;
|
|
8
|
+
declare function AlertTitle({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
9
|
+
declare function AlertDescription({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
10
|
+
declare function AlertAction({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Alert, AlertAction, AlertDescription, AlertTitle };
|
|
13
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","names":[],"sources":["../../../src/components/ui/alert.tsx"],"mappings":";;;cAOM,gBAAa;;6CAclB;iBAEQ,QACP,WACA,YACG,SACF,QAAM,wBAAwB,oBAAoB,iBAAc,QAAA,IAAA;iBAW1D,aAAa,cAAc,SAAS,QAAM,wBAAqB,QAAA,IAAA;iBAa/D,mBAAmB,cAAc,SAAS,QAAM,wBAAqB,QAAA,IAAA;iBAarE,cAAc,cAAc,SAAS,QAAM,wBAAqB,QAAA,IAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "@kumix/utils";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/alert.tsx
|
|
6
|
+
const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 has-data-[slot=alert-action]:pr-18 *:[svg:not([class*='size-'])]:size-4 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current", {
|
|
7
|
+
variants: { variant: {
|
|
8
|
+
default: "bg-card text-card-foreground",
|
|
9
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
10
|
+
} },
|
|
11
|
+
defaultVariants: { variant: "default" }
|
|
12
|
+
});
|
|
13
|
+
function Alert({ className, variant, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx("div", {
|
|
15
|
+
"data-slot": "alert",
|
|
16
|
+
role: "alert",
|
|
17
|
+
className: cn(alertVariants({ variant }), className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function AlertTitle({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx("div", {
|
|
23
|
+
"data-slot": "alert-title",
|
|
24
|
+
className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function AlertDescription({ className, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx("div", {
|
|
30
|
+
"data-slot": "alert-description",
|
|
31
|
+
className: cn("text-balance text-muted-foreground text-sm md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function AlertAction({ className, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsx("div", {
|
|
37
|
+
"data-slot": "alert-action",
|
|
38
|
+
className: cn("absolute top-2 right-2", className),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { Alert, AlertAction, AlertDescription, AlertTitle };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=alert.js.map
|