@kumix/ui 0.2.3 → 0.3.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 +32 -10
- package/dist/components/motion/action-swap-blur.d.ts +11 -0
- package/dist/components/motion/action-swap-blur.d.ts.map +1 -0
- package/dist/components/motion/action-swap-blur.js +26 -0
- package/dist/components/motion/action-swap-blur.js.map +1 -0
- package/dist/components/motion/action-swap-cascade.d.ts +11 -0
- package/dist/components/motion/action-swap-cascade.d.ts.map +1 -0
- package/dist/components/motion/action-swap-cascade.js +26 -0
- package/dist/components/motion/action-swap-cascade.js.map +1 -0
- package/dist/components/motion/action-swap-roll.d.ts +11 -0
- package/dist/components/motion/action-swap-roll.d.ts.map +1 -0
- package/dist/components/motion/action-swap-roll.js +26 -0
- package/dist/components/motion/action-swap-roll.js.map +1 -0
- package/dist/components/motion/action-swap.d.ts +41 -0
- package/dist/components/motion/action-swap.d.ts.map +1 -0
- package/dist/components/motion/action-swap.js +261 -0
- package/dist/components/motion/action-swap.js.map +1 -0
- package/dist/components/motion/animated-badge.d.ts +18 -0
- package/dist/components/motion/animated-badge.d.ts.map +1 -0
- package/dist/components/motion/animated-badge.js +206 -0
- package/dist/components/motion/animated-badge.js.map +1 -0
- package/dist/components/motion/animated-number.d.ts +12 -0
- package/dist/components/motion/animated-number.d.ts.map +1 -0
- package/dist/components/motion/animated-number.js +47 -0
- package/dist/components/motion/animated-number.js.map +1 -0
- package/dist/components/motion/animated-sidebar.d.ts +97 -0
- package/dist/components/motion/animated-sidebar.d.ts.map +1 -0
- package/dist/components/motion/animated-sidebar.js +611 -0
- package/dist/components/motion/animated-sidebar.js.map +1 -0
- package/dist/components/motion/animated-toast-stack.d.ts +65 -0
- package/dist/components/motion/animated-toast-stack.d.ts.map +1 -0
- package/dist/components/motion/animated-toast-stack.js +303 -0
- package/dist/components/motion/animated-toast-stack.js.map +1 -0
- package/dist/components/motion/bottom-sheet.d.ts +19 -0
- package/dist/components/motion/bottom-sheet.d.ts.map +1 -0
- package/dist/components/motion/bottom-sheet.js +146 -0
- package/dist/components/motion/bottom-sheet.js.map +1 -0
- package/dist/components/motion/bounce-sidebar.d.ts +26 -0
- package/dist/components/motion/bounce-sidebar.d.ts.map +1 -0
- package/dist/components/motion/bounce-sidebar.js +164 -0
- package/dist/components/motion/bounce-sidebar.js.map +1 -0
- package/dist/components/motion/bouncy-accordion.d.ts +32 -0
- package/dist/components/motion/bouncy-accordion.d.ts.map +1 -0
- package/dist/components/motion/bouncy-accordion.js +172 -0
- package/dist/components/motion/bouncy-accordion.js.map +1 -0
- package/dist/components/motion/button/base.d.ts +17 -0
- package/dist/components/motion/button/base.d.ts.map +1 -0
- package/dist/components/motion/button/base.js +86 -0
- package/dist/components/motion/button/base.js.map +1 -0
- package/dist/components/motion/button/magnetic.d.ts +12 -0
- package/dist/components/motion/button/magnetic.d.ts.map +1 -0
- package/dist/components/motion/button/magnetic.js +21 -0
- package/dist/components/motion/button/magnetic.js.map +1 -0
- package/dist/components/motion/button/stateful.d.ts +16 -0
- package/dist/components/motion/button/stateful.d.ts.map +1 -0
- package/dist/components/motion/button/stateful.js +190 -0
- package/dist/components/motion/button/stateful.js.map +1 -0
- package/dist/components/motion/center-morph-modal.d.ts +43 -0
- package/dist/components/motion/center-morph-modal.d.ts.map +1 -0
- package/dist/components/motion/center-morph-modal.js +238 -0
- package/dist/components/motion/center-morph-modal.js.map +1 -0
- package/dist/components/motion/checkbox.d.ts +15 -0
- package/dist/components/motion/checkbox.d.ts.map +1 -0
- package/dist/components/motion/checkbox.js +81 -0
- package/dist/components/motion/checkbox.js.map +1 -0
- package/dist/components/motion/chromatic-text-reveal.d.ts +31 -0
- package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -0
- package/dist/components/motion/chromatic-text-reveal.js +132 -0
- package/dist/components/motion/chromatic-text-reveal.js.map +1 -0
- package/dist/components/motion/context-menu.d.ts +71 -0
- package/dist/components/motion/context-menu.d.ts.map +1 -0
- package/dist/components/motion/context-menu.js +454 -0
- package/dist/components/motion/context-menu.js.map +1 -0
- package/dist/components/motion/cylinder-carousel.d.ts +40 -0
- package/dist/components/motion/cylinder-carousel.d.ts.map +1 -0
- package/dist/components/motion/cylinder-carousel.js +274 -0
- package/dist/components/motion/cylinder-carousel.js.map +1 -0
- package/dist/components/motion/dock.d.ts +24 -0
- package/dist/components/motion/dock.d.ts.map +1 -0
- package/dist/components/motion/dock.js +62 -0
- package/dist/components/motion/dock.js.map +1 -0
- package/dist/components/motion/drawer.d.ts +19 -0
- package/dist/components/motion/drawer.d.ts.map +1 -0
- package/dist/components/motion/drawer.js +58 -0
- package/dist/components/motion/drawer.js.map +1 -0
- package/dist/components/motion/hold-action-button.d.ts +17 -0
- package/dist/components/motion/hold-action-button.d.ts.map +1 -0
- package/dist/components/motion/hold-action-button.js +158 -0
- package/dist/components/motion/hold-action-button.js.map +1 -0
- package/dist/components/motion/input.d.ts +29 -0
- package/dist/components/motion/input.d.ts.map +1 -0
- package/dist/components/motion/input.js +126 -0
- package/dist/components/motion/input.js.map +1 -0
- package/dist/components/motion/loader.d.ts +17 -0
- package/dist/components/motion/loader.d.ts.map +1 -0
- package/dist/components/motion/loader.js +791 -0
- package/dist/components/motion/loader.js.map +1 -0
- package/dist/components/motion/magnetic.d.ts +11 -0
- package/dist/components/motion/magnetic.d.ts.map +1 -0
- package/dist/components/motion/magnetic.js +44 -0
- package/dist/components/motion/magnetic.js.map +1 -0
- package/dist/components/motion/marquee.d.ts +15 -0
- package/dist/components/motion/marquee.d.ts.map +1 -0
- package/dist/components/motion/marquee.js +35 -0
- package/dist/components/motion/marquee.js.map +1 -0
- package/dist/components/motion/morphing-modal.d.ts +15 -0
- package/dist/components/motion/morphing-modal.d.ts.map +1 -0
- package/dist/components/motion/morphing-modal.js +117 -0
- package/dist/components/motion/morphing-modal.js.map +1 -0
- package/dist/components/motion/number-ticker.d.ts +26 -0
- package/dist/components/motion/number-ticker.d.ts.map +1 -0
- package/dist/components/motion/number-ticker.js +129 -0
- package/dist/components/motion/number-ticker.js.map +1 -0
- package/dist/components/motion/parallax.d.ts +21 -0
- package/dist/components/motion/parallax.d.ts.map +1 -0
- package/dist/components/motion/parallax.js +35 -0
- package/dist/components/motion/parallax.js.map +1 -0
- package/dist/components/motion/popover-morph.d.ts +38 -0
- package/dist/components/motion/popover-morph.d.ts.map +1 -0
- package/dist/components/motion/popover-morph.js +167 -0
- package/dist/components/motion/popover-morph.js.map +1 -0
- package/dist/components/motion/popover.d.ts +40 -0
- package/dist/components/motion/popover.d.ts.map +1 -0
- package/dist/components/motion/popover.js +393 -0
- package/dist/components/motion/popover.js.map +1 -0
- package/dist/components/motion/preview-rail.d.ts +26 -0
- package/dist/components/motion/preview-rail.d.ts.map +1 -0
- package/dist/components/motion/preview-rail.js +134 -0
- package/dist/components/motion/preview-rail.js.map +1 -0
- package/dist/components/motion/pull-to-refresh.d.ts +28 -0
- package/dist/components/motion/pull-to-refresh.d.ts.map +1 -0
- package/dist/components/motion/pull-to-refresh.js +389 -0
- package/dist/components/motion/pull-to-refresh.js.map +1 -0
- package/dist/components/motion/radio.d.ts +22 -0
- package/dist/components/motion/radio.d.ts.map +1 -0
- package/dist/components/motion/radio.js +79 -0
- package/dist/components/motion/radio.js.map +1 -0
- package/dist/components/motion/range-slider-bubble.d.ts +16 -0
- package/dist/components/motion/range-slider-bubble.d.ts.map +1 -0
- package/dist/components/motion/range-slider-bubble.js +117 -0
- package/dist/components/motion/range-slider-bubble.js.map +1 -0
- package/dist/components/motion/range-slider-fluid.d.ts +18 -0
- package/dist/components/motion/range-slider-fluid.d.ts.map +1 -0
- package/dist/components/motion/range-slider-fluid.js +63 -0
- package/dist/components/motion/range-slider-fluid.js.map +1 -0
- package/dist/components/motion/range-slider-ruler.d.ts +19 -0
- package/dist/components/motion/range-slider-ruler.d.ts.map +1 -0
- package/dist/components/motion/range-slider-ruler.js +142 -0
- package/dist/components/motion/range-slider-ruler.js.map +1 -0
- package/dist/components/motion/range-slider-wave.d.ts +16 -0
- package/dist/components/motion/range-slider-wave.d.ts.map +1 -0
- package/dist/components/motion/range-slider-wave.js +57 -0
- package/dist/components/motion/range-slider-wave.js.map +1 -0
- package/dist/components/motion/range-slider.d.ts +11 -0
- package/dist/components/motion/range-slider.d.ts.map +1 -0
- package/dist/components/motion/range-slider.js +63 -0
- package/dist/components/motion/range-slider.js.map +1 -0
- package/dist/components/motion/scroll-progress.d.ts +29 -0
- package/dist/components/motion/scroll-progress.d.ts.map +1 -0
- package/dist/components/motion/scroll-progress.js +71 -0
- package/dist/components/motion/scroll-progress.js.map +1 -0
- package/dist/components/motion/scroll-reveal.d.ts +23 -0
- package/dist/components/motion/scroll-reveal.d.ts.map +1 -0
- package/dist/components/motion/scroll-reveal.js +42 -0
- package/dist/components/motion/scroll-reveal.js.map +1 -0
- package/dist/components/motion/scroll-to.d.ts +21 -0
- package/dist/components/motion/scroll-to.d.ts.map +1 -0
- package/dist/components/motion/scroll-to.js +27 -0
- package/dist/components/motion/scroll-to.js.map +1 -0
- package/dist/components/motion/select-morph.d.ts +41 -0
- package/dist/components/motion/select-morph.d.ts.map +1 -0
- package/dist/components/motion/select-morph.js +251 -0
- package/dist/components/motion/select-morph.js.map +1 -0
- package/dist/components/motion/select.d.ts +36 -0
- package/dist/components/motion/select.d.ts.map +1 -0
- package/dist/components/motion/select.js +319 -0
- package/dist/components/motion/select.js.map +1 -0
- package/dist/components/motion/shader-background.d.ts +38 -0
- package/dist/components/motion/shader-background.d.ts.map +1 -0
- package/dist/components/motion/shader-background.js +49 -0
- package/dist/components/motion/shader-background.js.map +1 -0
- package/dist/components/motion/shared-layout-bg.d.ts +17 -0
- package/dist/components/motion/shared-layout-bg.d.ts.map +1 -0
- package/dist/components/motion/shared-layout-bg.js +88 -0
- package/dist/components/motion/shared-layout-bg.js.map +1 -0
- package/dist/components/motion/slide-action-button.d.ts +15 -0
- package/dist/components/motion/slide-action-button.d.ts.map +1 -0
- package/dist/components/motion/slide-action-button.js +146 -0
- package/dist/components/motion/slide-action-button.js.map +1 -0
- package/dist/components/motion/smooth-scroll.d.ts +47 -0
- package/dist/components/motion/smooth-scroll.d.ts.map +1 -0
- package/dist/components/motion/smooth-scroll.js +182 -0
- package/dist/components/motion/smooth-scroll.js.map +1 -0
- package/dist/components/motion/switch.d.ts +13 -0
- package/dist/components/motion/switch.d.ts.map +1 -0
- package/dist/components/motion/switch.js +76 -0
- package/dist/components/motion/switch.js.map +1 -0
- package/dist/components/motion/table/editable-cell.d.ts +9 -0
- package/dist/components/motion/table/editable-cell.d.ts.map +1 -0
- package/dist/components/motion/table/editable-cell.js +17 -0
- package/dist/components/motion/table/editable-cell.js.map +1 -0
- package/dist/components/motion/table/index.d.ts +6 -0
- package/dist/components/motion/table/index.d.ts.map +1 -0
- package/dist/components/motion/table/index.js +420 -0
- package/dist/components/motion/table/index.js.map +1 -0
- package/dist/components/motion/table/row-handle.d.ts +15 -0
- package/dist/components/motion/table/row-handle.d.ts.map +1 -0
- package/dist/components/motion/table/row-handle.js +51 -0
- package/dist/components/motion/table/row-handle.js.map +1 -0
- package/dist/components/motion/table/skeleton-rows.d.ts +11 -0
- package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -0
- package/dist/components/motion/table/skeleton-rows.js +23 -0
- package/dist/components/motion/table/skeleton-rows.js.map +1 -0
- package/dist/components/motion/table/table-header.d.ts +35 -0
- package/dist/components/motion/table/table-header.d.ts.map +1 -0
- package/dist/components/motion/table/table-header.js +167 -0
- package/dist/components/motion/table/table-header.js.map +1 -0
- package/dist/components/motion/table/table-menu.d.ts +17 -0
- package/dist/components/motion/table/table-menu.d.ts.map +1 -0
- package/dist/components/motion/table/table-menu.js +92 -0
- package/dist/components/motion/table/table-menu.js.map +1 -0
- package/dist/components/motion/tabs.d.ts +29 -0
- package/dist/components/motion/tabs.d.ts.map +1 -0
- package/dist/components/motion/tabs.js +125 -0
- package/dist/components/motion/tabs.js.map +1 -0
- package/dist/components/motion/text-cascade.d.ts +15 -0
- package/dist/components/motion/text-cascade.d.ts.map +1 -0
- package/dist/components/motion/text-cascade.js +21 -0
- package/dist/components/motion/text-cascade.js.map +1 -0
- package/dist/components/motion/text-reveal.d.ts +25 -0
- package/dist/components/motion/text-reveal.d.ts.map +1 -0
- package/dist/components/motion/text-reveal.js +94 -0
- package/dist/components/motion/text-reveal.js.map +1 -0
- package/dist/components/motion/text-shimmer.d.ts +12 -0
- package/dist/components/motion/text-shimmer.d.ts.map +1 -0
- package/dist/components/motion/text-shimmer.js +15 -0
- package/dist/components/motion/text-shimmer.js.map +1 -0
- package/dist/components/motion/theme-toggle.d.ts +23 -0
- package/dist/components/motion/theme-toggle.d.ts.map +1 -0
- package/dist/components/motion/theme-toggle.js +160 -0
- package/dist/components/motion/theme-toggle.js.map +1 -0
- package/dist/components/motion/tilt-card.d.ts +12 -0
- package/dist/components/motion/tilt-card.d.ts.map +1 -0
- package/dist/components/motion/tilt-card.js +56 -0
- package/dist/components/motion/tilt-card.js.map +1 -0
- package/dist/components/motion/tooltip.d.ts +17 -0
- package/dist/components/motion/tooltip.d.ts.map +1 -0
- package/dist/components/motion/tooltip.js +194 -0
- package/dist/components/motion/tooltip.js.map +1 -0
- package/dist/components/motion/wheel-picker.d.ts +24 -0
- package/dist/components/motion/wheel-picker.d.ts.map +1 -0
- package/dist/components/motion/wheel-picker.js +442 -0
- package/dist/components/motion/wheel-picker.js.map +1 -0
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/alert.js +1 -1
- package/dist/components/reui/autocomplete.js +2 -2
- package/dist/components/reui/badge.d.ts +1 -1
- package/dist/components/reui/badge.js +10 -9
- package/dist/components/reui/badge.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +21 -19
- package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +4 -2
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +2 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.js +8 -7
- package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-dnd.js +7 -4
- package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +49 -47
- package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-lib.js +3 -2
- package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +37 -31
- package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js +2 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js +2 -1
- package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
- package/dist/components/reui/filters.js +5 -3
- package/dist/components/reui/filters.js.map +1 -1
- package/dist/components/reui/frame.d.ts +1 -1
- package/dist/components/reui/frame.js +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +52 -51
- package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
- package/dist/components/reui/gantt/gantt-lib.js +3 -2
- package/dist/components/reui/gantt/gantt-lib.js.map +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +34 -30
- package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
- package/dist/components/reui/gantt/gantt-recurrence.js +2 -2
- package/dist/components/reui/gantt/gantt-recurrence.js.map +1 -1
- package/dist/components/reui/gantt/gantt-view.js +175 -171
- package/dist/components/reui/gantt/gantt-view.js.map +1 -1
- package/dist/components/reui/icon-tile.js +12 -11
- package/dist/components/reui/icon-tile.js.map +1 -1
- package/dist/components/reui/kanban.js +42 -37
- package/dist/components/reui/kanban.js.map +1 -1
- package/dist/components/reui/number-field.js +1 -1
- package/dist/components/reui/rating.js +1 -1
- package/dist/components/reui/sortable.js +10 -9
- package/dist/components/reui/sortable.js.map +1 -1
- package/dist/components/reui/stepper.js +16 -16
- package/dist/components/reui/stepper.js.map +1 -1
- package/dist/components/reui/timeline.js +45 -38
- package/dist/components/reui/timeline.js.map +1 -1
- package/dist/components/reui/tree.js +2 -1
- package/dist/components/reui/tree.js.map +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/attachment.d.ts +1 -1
- package/dist/components/ui/attachment.js +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/bubble.js +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.js +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/empty.d.ts +1 -1
- package/dist/components/ui/empty.js +2 -2
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/item.js +1 -1
- package/dist/components/ui/marker.js +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.js +2 -2
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.js +1 -1
- package/dist/hooks/use-hover-capable.d.ts +10 -0
- package/dist/hooks/use-hover-capable.d.ts.map +1 -0
- package/dist/hooks/use-hover-capable.js +24 -0
- package/dist/hooks/use-hover-capable.js.map +1 -0
- package/dist/hooks/use-mobile.js +1 -1
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/hooks/use-slider.d.ts +58 -0
- package/dist/hooks/use-slider.d.ts.map +1 -0
- package/dist/hooks/use-slider.js +133 -0
- package/dist/hooks/use-slider.js.map +1 -0
- package/dist/lib/ease.d.ts +50 -0
- package/dist/lib/ease.d.ts.map +1 -0
- package/dist/lib/ease.js +66 -0
- package/dist/lib/ease.js.map +1 -0
- package/dist/lib/tick-sound.d.ts +17 -0
- package/dist/lib/tick-sound.d.ts.map +1 -0
- package/dist/lib/tick-sound.js +120 -0
- package/dist/lib/tick-sound.js.map +1 -0
- package/dist/popover-position-BUqYCq8X.js +54 -0
- package/dist/popover-position-BUqYCq8X.js.map +1 -0
- package/dist/theme.css +18 -58
- package/dist/types-Bah5NY44.d.ts +81 -0
- package/dist/types-Bah5NY44.d.ts.map +1 -0
- package/dist/utils-DQ7OpbYQ.js +25 -0
- package/dist/utils-DQ7OpbYQ.js.map +1 -0
- package/package.json +17 -6
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/components/motion/table/types.d.ts
|
|
3
|
+
type SortDirection = "asc" | "desc";
|
|
4
|
+
type SortState = {
|
|
5
|
+
key: string;
|
|
6
|
+
direction: SortDirection;
|
|
7
|
+
};
|
|
8
|
+
type TableColumn<T> = {
|
|
9
|
+
/** Stable key; also the default object property read for the cell + sort value. */
|
|
10
|
+
key: string;
|
|
11
|
+
/** Header content. */
|
|
12
|
+
header: ReactNode;
|
|
13
|
+
/** Allow clicking the header to sort by this column. */
|
|
14
|
+
sortable?: boolean;
|
|
15
|
+
/** Cell text alignment. */
|
|
16
|
+
align?: "left" | "center" | "right";
|
|
17
|
+
/** Column width as a CSS length, e.g. "160px" or "20%". Omit to share remaining space equally. */
|
|
18
|
+
width?: string;
|
|
19
|
+
/** Custom cell renderer. Falls back to `row[key]`. */
|
|
20
|
+
cell?: (row: T) => ReactNode;
|
|
21
|
+
/** Render an inline text input for this column's cells (ignored when `cell` is set). */
|
|
22
|
+
editable?: boolean;
|
|
23
|
+
/** Value used for sorting. Falls back to `row[key]`. */
|
|
24
|
+
sortValue?: (row: T) => string | number;
|
|
25
|
+
};
|
|
26
|
+
type InsertPosition = "before" | "after";
|
|
27
|
+
interface TableProps<T> {
|
|
28
|
+
data: T[];
|
|
29
|
+
columns: TableColumn<T>[];
|
|
30
|
+
/** Stable id per row, required for correct selection across sorts. Defaults to row index. */
|
|
31
|
+
getRowId?: (row: T, index: number) => string;
|
|
32
|
+
/** Render a leading checkbox column with select-all in the header. */
|
|
33
|
+
selectable?: boolean;
|
|
34
|
+
selectedRowIds?: string[];
|
|
35
|
+
defaultSelectedRowIds?: string[];
|
|
36
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
37
|
+
sort?: SortState | null;
|
|
38
|
+
defaultSort?: SortState | null;
|
|
39
|
+
onSortChange?: (sort: SortState | null) => void;
|
|
40
|
+
/** Allow dragging the right edge of a header to resize that column. */
|
|
41
|
+
resizable?: boolean;
|
|
42
|
+
/** Minimum column width in px when resizing. */
|
|
43
|
+
minColumnWidth?: number;
|
|
44
|
+
onColumnResize?: (key: string, width: number) => void;
|
|
45
|
+
/** Allow dragging a header grip to reorder columns. */
|
|
46
|
+
reorderable?: boolean;
|
|
47
|
+
onColumnOrderChange?: (keys: string[]) => void;
|
|
48
|
+
/** Called when an `editable` cell changes. */
|
|
49
|
+
onCellEdit?: (rowId: string, columnKey: string, value: string) => void;
|
|
50
|
+
/** When set, non-sortable headers become editable inputs for the column name. */
|
|
51
|
+
onColumnRename?: (columnKey: string, value: string) => void;
|
|
52
|
+
/** Enables the row menu (Insert before / after). Receives the target index. */
|
|
53
|
+
onInsertRow?: (index: number, position: InsertPosition) => void;
|
|
54
|
+
/** Enables Delete in the row menu. */
|
|
55
|
+
onDeleteRow?: (rowId: string, index: number) => void;
|
|
56
|
+
/** Enables the column menu (Insert before / after). Receives the target column index. */
|
|
57
|
+
onInsertColumn?: (index: number, position: InsertPosition) => void;
|
|
58
|
+
/** Enables Delete in the column menu. */
|
|
59
|
+
onDeleteColumn?: (columnKey: string, index: number) => void;
|
|
60
|
+
/** Fixed row height in px — required for virtualization. */
|
|
61
|
+
rowHeight?: number;
|
|
62
|
+
/** Scroll viewport height in px. */
|
|
63
|
+
height?: number;
|
|
64
|
+
/** Rows rendered above/below the viewport. */
|
|
65
|
+
overscan?: number;
|
|
66
|
+
/** Fires when the viewport scrolls near the bottom — load the next page. */
|
|
67
|
+
onEndReached?: () => void;
|
|
68
|
+
/** Currently fetching — shows skeleton rows and pauses `onEndReached`. */
|
|
69
|
+
loading?: boolean;
|
|
70
|
+
/** How many skeleton rows to show while loading more (default 3). */
|
|
71
|
+
skeletonRows?: number;
|
|
72
|
+
emptyState?: ReactNode;
|
|
73
|
+
className?: string;
|
|
74
|
+
}
|
|
75
|
+
/** Ref map from column key to its header cell, shared across the resize/reorder hooks. */
|
|
76
|
+
type HeaderCellRefs = {
|
|
77
|
+
current: Record<string, HTMLTableCellElement | null>;
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
export { TableColumn as a, SortState as i, InsertPosition as n, TableProps as o, SortDirection as r, HeaderCellRefs as t };
|
|
81
|
+
//# sourceMappingURL=types-Bah5NY44.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-Bah5NY44.d.ts","names":[],"sources":["../src/components/motion/table/types.ts"],"mappings":";;KAEY;KAEA;EACV;EACA,WAAW;;KAGD,YAAY;;EAEtB;;EAEA,QAAQ;;EAER;;EAEA;;EAEA;;EAEA,QAAQ,KAAK,MAAM;;EAEnB;;EAEA,aAAa,KAAK;;KAGR;UAEK,WAAW;EAC1B,MAAM;EACN,SAAS,YAAY;;EAErB,YAAY,KAAK,GAAG;;EAEpB;EACA;EACA;EACA,qBAAqB;EACrB,OAAO;EACP,cAAc;EACd,gBAAgB,MAAM;;EAEtB;;EAEA;EACA,kBAAkB,aAAa;;EAE/B;EACA,uBAAuB;;EAEvB,cAAc,eAAe,mBAAmB;;EAEhD,kBAAkB,mBAAmB;;EAErC,eAAe,eAAe,UAAU;;EAExC,eAAe,eAAe;;EAE9B,kBAAkB,eAAe,UAAU;;EAE3C,kBAAkB,mBAAmB;;EAErC;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA,aAAa;EACb;;;KAOU;EACV,SAAS,eAAe"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const CHECKBOX_WIDTH = `48px`;
|
|
2
|
+
/** Highlights the top edge of the active column's header cell. */
|
|
3
|
+
const COLUMN_ACTIVE_SHADOW = "inset 0 1px 0 var(--color-primary)";
|
|
4
|
+
function alignFlex(align) {
|
|
5
|
+
if (align === "right") return "justify-end";
|
|
6
|
+
if (align === "center") return "justify-center";
|
|
7
|
+
return "justify-start";
|
|
8
|
+
}
|
|
9
|
+
function alignText(align) {
|
|
10
|
+
if (align === "right") return "text-right";
|
|
11
|
+
if (align === "center") return "text-center";
|
|
12
|
+
return "text-left";
|
|
13
|
+
}
|
|
14
|
+
function readCell(row, column) {
|
|
15
|
+
if (column.cell) return column.cell(row);
|
|
16
|
+
return row[column.key];
|
|
17
|
+
}
|
|
18
|
+
function readSortValue(row, column) {
|
|
19
|
+
if (column.sortValue) return column.sortValue(row);
|
|
20
|
+
return row[column.key];
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { readCell as a, alignText as i, COLUMN_ACTIVE_SHADOW as n, readSortValue as o, alignFlex as r, CHECKBOX_WIDTH as t };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=utils-DQ7OpbYQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-DQ7OpbYQ.js","names":[],"sources":["../src/components/motion/table/utils.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { TableColumn } from \"./types\";\n\nexport const CHECKBOX_PX = 48;\nexport const CHECKBOX_WIDTH = `${CHECKBOX_PX}px`;\n\n/** Highlights the top edge of the active column's header cell. */\nexport const COLUMN_ACTIVE_SHADOW = \"inset 0 1px 0 var(--color-primary)\";\n\nexport function alignFlex(align: TableColumn<unknown>[\"align\"]) {\n if (align === \"right\") return \"justify-end\";\n if (align === \"center\") return \"justify-center\";\n return \"justify-start\";\n}\n\nexport function alignText(align: TableColumn<unknown>[\"align\"]) {\n if (align === \"right\") return \"text-right\";\n if (align === \"center\") return \"text-center\";\n return \"text-left\";\n}\n\nexport function readCell<T>(row: T, column: TableColumn<T>): ReactNode {\n if (column.cell) return column.cell(row);\n return (row as Record<string, ReactNode>)[column.key];\n}\n\nexport function readSortValue<T>(row: T, column: TableColumn<T>): string | number {\n if (column.sortValue) return column.sortValue(row);\n return (row as Record<string, string | number>)[column.key];\n}\n"],"mappings":"AAKA,MAAa,iBAAiB;;AAG9B,MAAa,uBAAuB;AAEpC,SAAgB,UAAU,OAAsC;CAC9D,IAAI,UAAU,SAAS,OAAO;CAC9B,IAAI,UAAU,UAAU,OAAO;CAC/B,OAAO;AACT;AAEA,SAAgB,UAAU,OAAsC;CAC9D,IAAI,UAAU,SAAS,OAAO;CAC9B,IAAI,UAAU,UAAU,OAAO;CAC/B,OAAO;AACT;AAEA,SAAgB,SAAY,KAAQ,QAAmC;CACrE,IAAI,OAAO,MAAM,OAAO,OAAO,KAAK,GAAG;CACvC,OAAQ,IAAkC,OAAO;AACnD;AAEA,SAAgB,cAAiB,KAAQ,QAAyC;CAChF,IAAI,OAAO,WAAW,OAAO,OAAO,UAAU,GAAG;CACjD,OAAQ,IAAwC,OAAO;AACzD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kumix/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Kumix React UI kit: shadcn/ui (Base UI, base-nova) + ReUI components, Tailwind tokens, and hooks. Per-file ESM exports.",
|
|
5
5
|
"author": "Kumix Labs <hai@kumix.io>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"./hooks/*": {
|
|
25
25
|
"types": "./dist/hooks/*.d.ts",
|
|
26
26
|
"default": "./dist/hooks/*.js"
|
|
27
|
+
},
|
|
28
|
+
"./lib/*": {
|
|
29
|
+
"types": "./dist/lib/*.d.ts",
|
|
30
|
+
"default": "./dist/lib/*.js"
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
33
|
"scripts": {
|
|
@@ -34,7 +38,8 @@
|
|
|
34
38
|
"build": "rimraf dist && mkdir -p dist && bun run build:css && tsdown && publint",
|
|
35
39
|
"types:check": "tsc --noEmit",
|
|
36
40
|
"add:shadcn": "shadcn add --all --overwrite",
|
|
37
|
-
"add:reui": "shadcn add @reui/alert @reui/autocomplete @reui/badge @reui/data-grid @reui/date-selector @reui/event-calendar @reui/use-file-upload @reui/filters @reui/frame @reui/gantt @reui/icon-stack @reui/icon-tile @reui/kanban @reui/number-field @reui/phone-input @reui/rating @reui/scrollspy @reui/sortable @reui/stepper @reui/timeline @reui/tree --overwrite"
|
|
41
|
+
"add:reui": "shadcn add @reui/alert @reui/autocomplete @reui/badge @reui/data-grid @reui/date-selector @reui/event-calendar @reui/use-file-upload @reui/filters @reui/frame @reui/gantt @reui/icon-stack @reui/icon-tile @reui/kanban @reui/number-field @reui/phone-input @reui/rating @reui/scrollspy @reui/sortable @reui/stepper @reui/timeline @reui/tree --overwrite",
|
|
42
|
+
"add:beui": "shadcn add @beui/marquee @beui/tabs @beui/switch @beui/input @beui/select @beui/select-morph @beui/checkbox @beui/radio @beui/bottom-sheet @beui/pull-to-refresh @beui/shared-layout-bg @beui/bounce-sidebar @beui/animated-sidebar @beui/preview-rail @beui/dock @beui/tooltip @beui/context-menu @beui/popover @beui/popover-morph @beui/morphing-modal @beui/center-morph-modal @beui/chromatic-text-reveal @beui/text-reveal @beui/text-shimmer @beui/text-cascade @beui/number-ticker @beui/animated-number @beui/animated-badge @beui/action-swap-cascade @beui/action-swap-blur @beui/action-swap-roll @beui/animated-toast-stack @beui/theme-toggle @beui/bouncy-accordion @beui/drawer @beui/smooth-scroll @beui/scroll-progress @beui/parallax @beui/scroll-to @beui/scroll-reveal @beui/range-slider @beui/range-slider-fluid @beui/range-slider-wave @beui/range-slider-bubble @beui/range-slider-ruler @beui/wheel-picker @beui/table @beui/table-editable @beui/table-async @beui/shader-background @beui/cylinder-carousel @beui/loader @beui/tilt-card @beui/button-base @beui/button-stateful @beui/button-magnetic @beui/hold-action-button @beui/slide-action-button --overwrite"
|
|
38
43
|
},
|
|
39
44
|
"homepage": "https://github.com/kumixlabs/ui",
|
|
40
45
|
"repository": {
|
|
@@ -72,17 +77,20 @@
|
|
|
72
77
|
"@dnd-kit/utilities": "^3.2.2",
|
|
73
78
|
"@headless-tree/core": "^1.7.0",
|
|
74
79
|
"@kumix/tsconfig": "^0.1.0",
|
|
75
|
-
"@kumix/utils": "^0.1.
|
|
80
|
+
"@kumix/utils": "^0.1.3",
|
|
81
|
+
"@paper-design/shaders-react": "^0.0.78",
|
|
76
82
|
"@shadcn/react": "^0.2.1",
|
|
77
83
|
"@tanstack/react-table": "^8.21.3",
|
|
78
|
-
"@tanstack/react-virtual": "^3.14.
|
|
79
|
-
"@types/react": "^19.2.
|
|
84
|
+
"@tanstack/react-virtual": "^3.14.9",
|
|
85
|
+
"@types/react": "^19.2.18",
|
|
80
86
|
"class-variance-authority": "^0.7.1",
|
|
81
87
|
"cmdk": "^1.1.1",
|
|
82
88
|
"date-fns": "^4.4.0",
|
|
83
89
|
"embla-carousel-react": "^8.6.0",
|
|
84
90
|
"input-otp": "^1.4.2",
|
|
85
|
-
"
|
|
91
|
+
"lenis": "^1.3.25",
|
|
92
|
+
"lucide-react": "^1.28.0",
|
|
93
|
+
"motion": "^12.43.0",
|
|
86
94
|
"next-themes": "^0.4.6",
|
|
87
95
|
"react": "^19.2.8",
|
|
88
96
|
"react-day-picker": "^10.0.1",
|
|
@@ -102,6 +110,7 @@
|
|
|
102
110
|
"@dnd-kit/utilities": ">=3.2.0",
|
|
103
111
|
"@headless-tree/core": ">=1.7.0",
|
|
104
112
|
"@kumix/utils": ">=0.1.0",
|
|
113
|
+
"@paper-design/shaders-react": ">=0.0.75",
|
|
105
114
|
"@shadcn/react": ">=0.2.0",
|
|
106
115
|
"@tanstack/react-table": ">=8.20.0",
|
|
107
116
|
"@tanstack/react-virtual": ">=3.10.0",
|
|
@@ -110,7 +119,9 @@
|
|
|
110
119
|
"date-fns": ">=4.4.0",
|
|
111
120
|
"embla-carousel-react": ">=8.6.0",
|
|
112
121
|
"input-otp": ">=1.4.0",
|
|
122
|
+
"lenis": ">=1.3.0",
|
|
113
123
|
"lucide-react": ">=1.20.0",
|
|
124
|
+
"motion": ">=12.40.0",
|
|
114
125
|
"next-themes": ">=0.4.5",
|
|
115
126
|
"react": ">=18.0.0 || >=19.0.0-rc.0",
|
|
116
127
|
"react-day-picker": ">=10.0.0",
|