@kumix/ui 0.2.4 → 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 +2 -2
- 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 +2 -2
- 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.d.ts +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.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/empty.d.ts +1 -1
- package/dist/components/ui/empty.js +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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.js","names":["React"],"sources":["../../../src/components/ui/sidebar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { PanelLeftIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { useIsMobile } from \"../../hooks/use-mobile\";\nimport { Button } from \"./button\";\nimport { Input } from \"./input\";\nimport { Separator } from \"./separator\";\nimport { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from \"./sheet\";\nimport { Skeleton } from \"./skeleton\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./tooltip\";\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\";\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = \"16rem\";\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\";\nconst SIDEBAR_WIDTH_ICON = \"3rem\";\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\";\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\";\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n};\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null);\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext);\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\");\n }\n\n return context;\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}) {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = React.useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value;\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n _setOpen(openState);\n }\n\n // This sets the cookie to keep the sidebar state.\n // biome-ignore lint/suspicious/noDocumentCookie: <>\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n },\n [setOpenProp, open],\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);\n }, [isMobile, setOpen]);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => window.removeEventListener(\"keydown\", handleKeyDown);\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\";\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, toggleSidebar],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n data-slot=\"sidebar-wrapper\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n );\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\";\n variant?: \"sidebar\" | \"floating\" | \"inset\";\n collapsible?: \"offcanvas\" | \"icon\" | \"none\";\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === \"none\") {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n dir={dir}\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n data-side={side}\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=right]:right-0 data-[side=left]:left-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] md:flex\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className,\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\n\nfunction SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon-sm\"\n className={cn(className)}\n onClick={(event) => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn(\"h-8 w-full bg-background shadow-none\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n \"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupLabel({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0\",\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: \"sidebar-group-label\",\n sidebar: \"group-label\",\n },\n });\n}\n\nfunction SidebarGroupAction({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"button\"> & React.ComponentProps<\"button\">) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 group-data-[collapsible=icon]:hidden md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: \"sidebar-group-action\",\n sidebar: \"group-action\",\n },\n });\n}\n\nfunction SidebarGroupContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-0\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n );\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nfunction SidebarMenuButton({\n render,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n isActive?: boolean;\n tooltip?: string | React.ComponentProps<typeof TooltipContent>;\n } & VariantProps<typeof sidebarMenuButtonVariants>) {\n const { isMobile, state } = useSidebar();\n const comp = useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n },\n props,\n ),\n render: !tooltip ? render : <TooltipTrigger render={render} />,\n state: {\n slot: \"sidebar-menu-button\",\n sidebar: \"menu-button\",\n size,\n active: isActive,\n },\n });\n\n if (!tooltip) {\n return comp;\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n };\n }\n\n return (\n <Tooltip>\n {comp}\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n );\n}\n\nfunction SidebarMenuAction({\n className,\n render,\n showOnHover = false,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n showOnHover?: boolean;\n }) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground md:opacity-0\",\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: \"sidebar-menu-action\",\n sidebar: \"menu-action\",\n },\n });\n}\n\nfunction SidebarMenuBadge({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 font-medium text-sidebar-foreground text-xs tabular-nums peer-hover/menu-button:text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean;\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`;\n });\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n );\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn(\"group/menu-sub-item relative\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubButton({\n render,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: useRender.ComponentProps<\"a\"> &\n React.ComponentProps<\"a\"> & {\n size?: \"sm\" | \"md\";\n isActive?: boolean;\n }) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-[size=md]:text-sm data-[size=sm]:text-xs data-active:text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: \"sidebar-menu-sub-button\",\n sidebar: \"menu-sub-button\",\n size,\n active: isActive,\n },\n });\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAM,sBAAsB;AAC5B,MAAM,yBAAyB,OAAU,KAAK;AAC9C,MAAM,gBAAgB;AACtB,MAAM,uBAAuB;AAC7B,MAAM,qBAAqB;AAC3B,MAAM,4BAA4B;AAYlC,MAAM,iBAAiBA,QAAM,cAA0C,IAAI;AAE3E,SAAS,aAAa;CACpB,MAAM,UAAUA,QAAM,WAAW,cAAc;CAC/C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mDAAmD;CAGrE,OAAO;AACT;AAEA,SAAS,gBAAgB,EACvB,cAAc,MACd,MAAM,UACN,cAAc,aACd,WACA,OACA,UACA,GAAG,SAKF;CACD,MAAM,WAAW,YAAY;CAC7B,MAAM,CAAC,YAAY,iBAAiBA,QAAM,SAAS,KAAK;CAIxD,MAAM,CAAC,OAAO,YAAYA,QAAM,SAAS,WAAW;CACpD,MAAM,OAAO,YAAY;CACzB,MAAM,UAAUA,QAAM,aACnB,UAAmD;EAClD,MAAM,YAAY,OAAO,UAAU,aAAa,MAAM,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AC3E,OACE,oBAAC,MAAD;EACE,aAAU;EACV,gBAAa;EACb,WAAW,GACT,uIACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAqC;CAC/E,OACE,oBAAC,MAAD;EACE,aAAU;EACV,gBAAa;EACb,WAAW,GAAG,gCAAgC,SAAS;EACvD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAC5B,QACA,OAAO,MACP,WAAW,OACX,WACA,GAAG,SAKA;CACH,OAAO,UAAU;EACf,gBAAgB;EAChB,OAAO,WACL,EACE,WAAW,GACT,6oBACA,SACF,EACF,GACA,KACF;EACA;EACA,OAAO;GACL,MAAM;GACN,SAAS;GACT;GACA,QAAQ;EACV;CACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"sidebar.js","names":["React"],"sources":["../../../src/components/ui/sidebar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { PanelLeftIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { useIsMobile } from \"../../hooks/use-mobile\";\nimport { Button } from \"./button\";\nimport { Input } from \"./input\";\nimport { Separator } from \"./separator\";\nimport { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from \"./sheet\";\nimport { Skeleton } from \"./skeleton\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./tooltip\";\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\";\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = \"16rem\";\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\";\nconst SIDEBAR_WIDTH_ICON = \"3rem\";\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\";\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\";\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n};\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null);\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext);\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\");\n }\n\n return context;\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}) {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = React.useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value;\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n _setOpen(openState);\n }\n\n // This sets the cookie to keep the sidebar state.\n // biome-ignore lint/suspicious/noDocumentCookie: <>\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n },\n [setOpenProp, open],\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);\n }, [isMobile, setOpen]);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => window.removeEventListener(\"keydown\", handleKeyDown);\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\";\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, toggleSidebar],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n data-slot=\"sidebar-wrapper\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n );\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\";\n variant?: \"sidebar\" | \"floating\" | \"inset\";\n collapsible?: \"offcanvas\" | \"icon\" | \"none\";\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === \"none\") {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n dir={dir}\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n data-side={side}\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=right]:right-0 data-[side=left]:left-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] md:flex\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className,\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\n\nfunction SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon-sm\"\n className={cn(className)}\n onClick={(event) => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn(\"h-8 w-full bg-background shadow-none\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n \"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupLabel({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0\",\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: \"sidebar-group-label\",\n sidebar: \"group-label\",\n },\n });\n}\n\nfunction SidebarGroupAction({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"button\"> & React.ComponentProps<\"button\">) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 group-data-[collapsible=icon]:hidden md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: \"sidebar-group-action\",\n sidebar: \"group-action\",\n },\n });\n}\n\nfunction SidebarGroupContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-0\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n );\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nfunction SidebarMenuButton({\n render,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n isActive?: boolean;\n tooltip?: string | React.ComponentProps<typeof TooltipContent>;\n } & VariantProps<typeof sidebarMenuButtonVariants>) {\n const { isMobile, state } = useSidebar();\n const comp = useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n },\n props,\n ),\n render: !tooltip ? render : <TooltipTrigger render={render} />,\n state: {\n slot: \"sidebar-menu-button\",\n sidebar: \"menu-button\",\n size,\n active: isActive,\n },\n });\n\n if (!tooltip) {\n return comp;\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n };\n }\n\n return (\n <Tooltip>\n {comp}\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n );\n}\n\nfunction SidebarMenuAction({\n className,\n render,\n showOnHover = false,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n showOnHover?: boolean;\n }) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground md:opacity-0\",\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: \"sidebar-menu-action\",\n sidebar: \"menu-action\",\n },\n });\n}\n\nfunction SidebarMenuBadge({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 font-medium text-sidebar-foreground text-xs tabular-nums peer-hover/menu-button:text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean;\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`;\n });\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n );\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn(\"group/menu-sub-item relative\", className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubButton({\n render,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: useRender.ComponentProps<\"a\"> &\n React.ComponentProps<\"a\"> & {\n size?: \"sm\" | \"md\";\n isActive?: boolean;\n }) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-[size=md]:text-sm data-[size=sm]:text-xs data-active:text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: \"sidebar-menu-sub-button\",\n sidebar: \"menu-sub-button\",\n size,\n active: isActive,\n },\n });\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAM,sBAAsB;AAC5B,MAAM,yBAAyB;AAC/B,MAAM,gBAAgB;AACtB,MAAM,uBAAuB;AAC7B,MAAM,qBAAqB;AAC3B,MAAM,4BAA4B;AAYlC,MAAM,iBAAiBA,QAAM,cAA0C,IAAI;AAE3E,SAAS,aAAa;CACpB,MAAM,UAAUA,QAAM,WAAW,cAAc;CAC/C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mDAAmD;CAGrE,OAAO;AACT;AAEA,SAAS,gBAAgB,EACvB,cAAc,MACd,MAAM,UACN,cAAc,aACd,WACA,OACA,UACA,GAAG,SAKF;CACD,MAAM,WAAW,YAAY;CAC7B,MAAM,CAAC,YAAY,iBAAiBA,QAAM,SAAS,KAAK;CAIxD,MAAM,CAAC,OAAO,YAAYA,QAAM,SAAS,WAAW;CACpD,MAAM,OAAO,YAAY;CACzB,MAAM,UAAUA,QAAM,aACnB,UAAmD;EAClD,MAAM,YAAY,OAAO,UAAU,aAAa,MAAM,IAAI,IAAI;EAC9D,IAAI,aACF,YAAY,SAAS;OAErB,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ACb,WAAW,GACT,uIACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAqC;CAC/E,OACE,oBAAC,MAAD;EACE,aAAU;EACV,gBAAa;EACb,WAAW,GAAG,gCAAgC,SAAS;EACvD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAC5B,QACA,OAAO,MACP,WAAW,OACX,WACA,GAAG,SAKA;CACH,OAAO,UAAU;EACf,gBAAgB;EAChB,OAAO,WACL,EACE,WAAW,GACT,6oBACA,SACF,EACF,GACA,KACF;EACA;EACA,OAAO;GACL,MAAM;GACN,SAAS;GACT;GACA,QAAQ;EACV;CACF,CAAC;AACH"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "@kumix/utils";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
5
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
6
6
|
//#region src/components/ui/tabs.tsx
|
|
7
7
|
function Tabs({ className, orientation = "horizontal", ...props }) {
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
3
3
|
//#region src/components/ui/toggle.d.ts
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function Toggle({ className, variant, size, ...props }: Toggle$1.Props & VariantProps<typeof toggleVariants>): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "@kumix/utils";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
5
|
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
6
6
|
//#region src/components/ui/toggle.tsx
|
|
7
7
|
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-lg font-medium text-sm outline-none transition-all hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-pressed:bg-muted aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/hooks/use-hover-capable.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Returns true only on devices that have a true hover (mouse / trackpad).
|
|
4
|
+
* Touch devices fire phantom `:hover` on tap that sticks until tap-elsewhere
|
|
5
|
+
* — gate hover-only effects (scale lifts, magnetic pulls) behind this.
|
|
6
|
+
*/
|
|
7
|
+
declare function useHoverCapable(): boolean;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { useHoverCapable };
|
|
10
|
+
//# sourceMappingURL=use-hover-capable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-hover-capable.d.ts","names":[],"sources":["../../src/hooks/use-hover-capable.ts"],"mappings":";;;;;;iBASgB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
//#region src/hooks/use-hover-capable.ts
|
|
4
|
+
/**
|
|
5
|
+
* Returns true only on devices that have a true hover (mouse / trackpad).
|
|
6
|
+
* Touch devices fire phantom `:hover` on tap that sticks until tap-elsewhere
|
|
7
|
+
* — gate hover-only effects (scale lifts, magnetic pulls) behind this.
|
|
8
|
+
*/
|
|
9
|
+
function useHoverCapable() {
|
|
10
|
+
const [canHover, setCanHover] = useState(false);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (typeof window === "undefined" || !window.matchMedia) return;
|
|
13
|
+
const mq = window.matchMedia("(hover: hover) and (pointer: fine)");
|
|
14
|
+
const update = () => setCanHover(mq.matches);
|
|
15
|
+
update();
|
|
16
|
+
mq.addEventListener?.("change", update);
|
|
17
|
+
return () => mq.removeEventListener?.("change", update);
|
|
18
|
+
}, []);
|
|
19
|
+
return canHover;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { useHoverCapable };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=use-hover-capable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-hover-capable.js","names":[],"sources":["../../src/hooks/use-hover-capable.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\n\n/**\n * Returns true only on devices that have a true hover (mouse / trackpad).\n * Touch devices fire phantom `:hover` on tap that sticks until tap-elsewhere\n * — gate hover-only effects (scale lifts, magnetic pulls) behind this.\n */\nexport function useHoverCapable() {\n const [canHover, setCanHover] = useState(false);\n\n useEffect(() => {\n if (typeof window === \"undefined\" || !window.matchMedia) return;\n const mq = window.matchMedia(\"(hover: hover) and (pointer: fine)\");\n const update = () => setCanHover(mq.matches);\n update();\n mq.addEventListener?.(\"change\", update);\n return () => mq.removeEventListener?.(\"change\", update);\n }, []);\n\n return canHover;\n}\n"],"mappings":";;;;;;;;AASA,SAAgB,kBAAkB;CAChC,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAE9C,gBAAgB;EACd,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,YAAY;EACzD,MAAM,KAAK,OAAO,WAAW,oCAAoC;EACjE,MAAM,eAAe,YAAY,GAAG,OAAO;EAC3C,OAAO;EACP,GAAG,mBAAmB,UAAU,MAAM;EACtC,aAAa,GAAG,sBAAsB,UAAU,MAAM;CACxD,GAAG,CAAC,CAAC;CAEL,OAAO;AACT"}
|
package/dist/hooks/use-mobile.js
CHANGED
|
@@ -5,7 +5,7 @@ const MOBILE_BREAKPOINT = 768;
|
|
|
5
5
|
function useIsMobile() {
|
|
6
6
|
const [isMobile, setIsMobile] = React$1.useState(void 0);
|
|
7
7
|
React$1.useEffect(() => {
|
|
8
|
-
const mql = window.matchMedia(`(max-width:
|
|
8
|
+
const mql = window.matchMedia(`(max-width: 767px)`);
|
|
9
9
|
const onChange = () => {
|
|
10
10
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-mobile.js","names":["React"],"sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"],"mappings":";;;AAIA,MAAM,oBAAoB;AAE1B,SAAgB,cAAc;CAC5B,MAAM,CAAC,UAAU,eAAeA,QAAM,SAA8B,KAAA,CAAS;CAE7E,QAAM,gBAAgB;EACpB,MAAM,MAAM,OAAO,WAAW,
|
|
1
|
+
{"version":3,"file":"use-mobile.js","names":["React"],"sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"],"mappings":";;;AAIA,MAAM,oBAAoB;AAE1B,SAAgB,cAAc;CAC5B,MAAM,CAAC,UAAU,eAAeA,QAAM,SAA8B,KAAA,CAAS;CAE7E,QAAM,gBAAgB;EACpB,MAAM,MAAM,OAAO,WAAW,oBAAyC;EACvE,MAAM,iBAAiB;GACrB,YAAY,OAAO,aAAa,iBAAiB;EACnD;EACA,IAAI,iBAAiB,UAAU,QAAQ;EACvC,YAAY,OAAO,aAAa,iBAAiB;EACjD,aAAa,IAAI,oBAAoB,UAAU,QAAQ;CACzD,GAAG,CAAC,CAAC;CAEL,OAAO,CAAC,CAAC;AACX"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { KeyboardEvent, PointerEvent } from "react";
|
|
2
|
+
//#region src/hooks/use-slider.d.ts
|
|
3
|
+
/** Nearest legal value on [min, max] for the given step. max counts as a
|
|
4
|
+
* candidate when the step does not divide the range, so a pointer near the end
|
|
5
|
+
* does not snap back onto the last whole step. */
|
|
6
|
+
declare function snapSliderValue(next: number, min: number, max: number, step: number): number;
|
|
7
|
+
interface SliderOptions {
|
|
8
|
+
value?: number;
|
|
9
|
+
defaultValue?: number;
|
|
10
|
+
onValueChange?: (value: number) => void;
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
step?: number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
"aria-label"?: string;
|
|
16
|
+
/** Announced instead of the raw number — pass one when the value carries a
|
|
17
|
+
* unit or a suffix ("72.5 kg", "35%"); a bare number needs no valueText. */
|
|
18
|
+
formatValueText?: (value: number) => string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Shared value + input plumbing for slider designs: controlled/uncontrolled
|
|
22
|
+
* value, step snapping, pointer-capture drag along a track and arrow-key
|
|
23
|
+
* control. Visuals and motion live in the component; this only owns the number.
|
|
24
|
+
*/
|
|
25
|
+
declare function useSlider({ value, defaultValue, onValueChange, min, max, step, disabled, "aria-label": ariaLabel, formatValueText }: SliderOptions): {
|
|
26
|
+
current: number;
|
|
27
|
+
percent: number;
|
|
28
|
+
dragging: boolean;
|
|
29
|
+
min: number;
|
|
30
|
+
max: number;
|
|
31
|
+
step: number;
|
|
32
|
+
commit: (next: number) => void;
|
|
33
|
+
/** Pointer handlers for the track element — drag anywhere on it. */
|
|
34
|
+
trackProps: {
|
|
35
|
+
ref: import("react").RefObject<HTMLDivElement | null>;
|
|
36
|
+
onPointerDown: (event: PointerEvent<HTMLDivElement>) => void;
|
|
37
|
+
onPointerMove: (event: PointerEvent<HTMLDivElement>) => void;
|
|
38
|
+
onPointerUp: (event: PointerEvent<HTMLDivElement>) => void;
|
|
39
|
+
onPointerCancel: (event: PointerEvent<HTMLDivElement>) => void;
|
|
40
|
+
onLostPointerCapture: (event: PointerEvent<HTMLDivElement>) => void;
|
|
41
|
+
};
|
|
42
|
+
/** ARIA + keyboard props for the focusable slider element. */
|
|
43
|
+
sliderProps: {
|
|
44
|
+
ref: (node: HTMLElement | null) => void;
|
|
45
|
+
role: "slider";
|
|
46
|
+
tabIndex: number;
|
|
47
|
+
"aria-label": string | undefined;
|
|
48
|
+
"aria-valuemin": number;
|
|
49
|
+
"aria-valuemax": number;
|
|
50
|
+
"aria-valuenow": number;
|
|
51
|
+
"aria-valuetext": string | undefined;
|
|
52
|
+
"aria-disabled": true | undefined;
|
|
53
|
+
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { SliderOptions, snapSliderValue, useSlider };
|
|
58
|
+
//# sourceMappingURL=use-slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-slider.d.ts","names":[],"sources":["../../src/hooks/use-slider.ts"],"mappings":";;;;;iBASgB,gBAAgB,cAAc,aAAa,aAAa;UAavD;EACf;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;;;EAGA,mBAAmB;;;;;;;iBAQL,YACd,OACA,cACA,eACA,KACA,KACA,MACA,wBACc,WACd,mBACC;;;;;;;EAmBQ,SAAA;;;;IAmBC,gBAAA,OAAA,aAAa;IAcb,gBAAA,OAAA,aAAa;IAOa,cAAA,OAAA,aAAa;IAAb,kBAAA,OAAA,aAAa;IAAb,uBAAA,OAAA,aAAa;;;;IAmDjC,MAAA,MAAA;;;;;;;;;IAxCN,YAAA,OAAA,cAAc"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useRef, useState } from "react";
|
|
3
|
+
//#region src/hooks/use-slider.ts
|
|
4
|
+
const clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
|
|
5
|
+
/** Nearest legal value on [min, max] for the given step. max counts as a
|
|
6
|
+
* candidate when the step does not divide the range, so a pointer near the end
|
|
7
|
+
* does not snap back onto the last whole step. */
|
|
8
|
+
function snapSliderValue(next, min, max, step) {
|
|
9
|
+
if (!(max > min)) return min;
|
|
10
|
+
if (!(step > 0)) return clamp(next, min, max);
|
|
11
|
+
const whole = Math.floor(Number(((max - min) / step).toFixed(6)));
|
|
12
|
+
const lastWhole = Number((min + whole * step).toFixed(6));
|
|
13
|
+
const toGrid = clamp(Math.round((next - min) / step) * step + min, min, lastWhole);
|
|
14
|
+
const snapped = lastWhole < max && Math.abs(next - max) <= Math.abs(next - toGrid) ? max : toGrid;
|
|
15
|
+
return Number(snapped.toFixed(6));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Shared value + input plumbing for slider designs: controlled/uncontrolled
|
|
19
|
+
* value, step snapping, pointer-capture drag along a track and arrow-key
|
|
20
|
+
* control. Visuals and motion live in the component; this only owns the number.
|
|
21
|
+
*/
|
|
22
|
+
function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100, step = 1, disabled = false, "aria-label": ariaLabel, formatValueText }) {
|
|
23
|
+
const trackRef = useRef(null);
|
|
24
|
+
const sliderEl = useRef(null);
|
|
25
|
+
const draggingRef = useRef(false);
|
|
26
|
+
const [internal, setInternal] = useState(defaultValue);
|
|
27
|
+
const [dragging, setDragging] = useState(false);
|
|
28
|
+
const controlled = value !== void 0;
|
|
29
|
+
const lo = min;
|
|
30
|
+
const hi = max > min ? max : min;
|
|
31
|
+
const stride = step > 0 ? step : 1;
|
|
32
|
+
const current = clamp(controlled ? value : internal, lo, hi);
|
|
33
|
+
const percent = hi > lo ? (current - lo) / (hi - lo) * 100 : 0;
|
|
34
|
+
const commit = useCallback((next) => {
|
|
35
|
+
const clean = snapSliderValue(next, lo, hi, stride);
|
|
36
|
+
if (!controlled) setInternal(clean);
|
|
37
|
+
onValueChange?.(clean);
|
|
38
|
+
}, [
|
|
39
|
+
controlled,
|
|
40
|
+
onValueChange,
|
|
41
|
+
lo,
|
|
42
|
+
hi,
|
|
43
|
+
stride
|
|
44
|
+
]);
|
|
45
|
+
const commitFromX = useCallback((clientX) => {
|
|
46
|
+
const rect = trackRef.current?.getBoundingClientRect();
|
|
47
|
+
if (!rect || rect.width === 0) return;
|
|
48
|
+
const ratio = clamp((clientX - rect.left) / rect.width, 0, 1);
|
|
49
|
+
commit(lo + ratio * (hi - lo));
|
|
50
|
+
}, [
|
|
51
|
+
commit,
|
|
52
|
+
lo,
|
|
53
|
+
hi
|
|
54
|
+
]);
|
|
55
|
+
const onPointerDown = useCallback((event) => {
|
|
56
|
+
if (disabled) return;
|
|
57
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
58
|
+
draggingRef.current = true;
|
|
59
|
+
setDragging(true);
|
|
60
|
+
sliderEl.current?.focus({ preventScroll: true });
|
|
61
|
+
commitFromX(event.clientX);
|
|
62
|
+
}, [disabled, commitFromX]);
|
|
63
|
+
const onPointerMove = useCallback((event) => {
|
|
64
|
+
if (!draggingRef.current || disabled) return;
|
|
65
|
+
commitFromX(event.clientX);
|
|
66
|
+
}, [disabled, commitFromX]);
|
|
67
|
+
const endDrag = useCallback((event) => {
|
|
68
|
+
if (event.currentTarget.hasPointerCapture?.(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId);
|
|
69
|
+
draggingRef.current = false;
|
|
70
|
+
setDragging(false);
|
|
71
|
+
}, []);
|
|
72
|
+
const onKeyDown = useCallback((event) => {
|
|
73
|
+
if (disabled) return;
|
|
74
|
+
const map = {
|
|
75
|
+
ArrowRight: current + stride,
|
|
76
|
+
ArrowUp: current + stride,
|
|
77
|
+
ArrowLeft: current - stride,
|
|
78
|
+
ArrowDown: current - stride,
|
|
79
|
+
PageUp: current + stride * 10,
|
|
80
|
+
PageDown: current - stride * 10,
|
|
81
|
+
Home: lo,
|
|
82
|
+
End: hi
|
|
83
|
+
};
|
|
84
|
+
if (event.key in map) {
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
commit(map[event.key]);
|
|
87
|
+
}
|
|
88
|
+
}, [
|
|
89
|
+
disabled,
|
|
90
|
+
current,
|
|
91
|
+
stride,
|
|
92
|
+
lo,
|
|
93
|
+
hi,
|
|
94
|
+
commit
|
|
95
|
+
]);
|
|
96
|
+
return {
|
|
97
|
+
current,
|
|
98
|
+
percent,
|
|
99
|
+
dragging,
|
|
100
|
+
min: lo,
|
|
101
|
+
max: hi,
|
|
102
|
+
step: stride,
|
|
103
|
+
commit,
|
|
104
|
+
/** Pointer handlers for the track element — drag anywhere on it. */
|
|
105
|
+
trackProps: {
|
|
106
|
+
ref: trackRef,
|
|
107
|
+
onPointerDown,
|
|
108
|
+
onPointerMove,
|
|
109
|
+
onPointerUp: endDrag,
|
|
110
|
+
onPointerCancel: endDrag,
|
|
111
|
+
onLostPointerCapture: endDrag
|
|
112
|
+
},
|
|
113
|
+
/** ARIA + keyboard props for the focusable slider element. */
|
|
114
|
+
sliderProps: {
|
|
115
|
+
ref: (node) => {
|
|
116
|
+
sliderEl.current = node;
|
|
117
|
+
},
|
|
118
|
+
role: "slider",
|
|
119
|
+
tabIndex: disabled ? -1 : 0,
|
|
120
|
+
"aria-label": ariaLabel,
|
|
121
|
+
"aria-valuemin": lo,
|
|
122
|
+
"aria-valuemax": hi,
|
|
123
|
+
"aria-valuenow": current,
|
|
124
|
+
"aria-valuetext": formatValueText?.(current),
|
|
125
|
+
"aria-disabled": disabled || void 0,
|
|
126
|
+
onKeyDown
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
export { snapSliderValue, useSlider };
|
|
132
|
+
|
|
133
|
+
//# sourceMappingURL=use-slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-slider.js","names":[],"sources":["../../src/hooks/use-slider.ts"],"sourcesContent":["\"use client\";\n\nimport { type KeyboardEvent, type PointerEvent, useCallback, useRef, useState } from \"react\";\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/** Nearest legal value on [min, max] for the given step. max counts as a\n * candidate when the step does not divide the range, so a pointer near the end\n * does not snap back onto the last whole step. */\nexport function snapSliderValue(next: number, min: number, max: number, step: number): number {\n // Neither case has a grid to walk. An empty range has exactly one legal\n // point, and a non-positive step only needs a clamp, which also keeps the\n // division below away from zero.\n if (!(max > min)) return min;\n if (!(step > 0)) return clamp(next, min, max);\n const whole = Math.floor(Number(((max - min) / step).toFixed(6)));\n const lastWhole = Number((min + whole * step).toFixed(6));\n const toGrid = clamp(Math.round((next - min) / step) * step + min, min, lastWhole);\n const snapped = lastWhole < max && Math.abs(next - max) <= Math.abs(next - toGrid) ? max : toGrid;\n return Number(snapped.toFixed(6));\n}\n\nexport interface SliderOptions {\n value?: number;\n defaultValue?: number;\n onValueChange?: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n disabled?: boolean;\n \"aria-label\"?: string;\n /** Announced instead of the raw number — pass one when the value carries a\n * unit or a suffix (\"72.5 kg\", \"35%\"); a bare number needs no valueText. */\n formatValueText?: (value: number) => string;\n}\n\n/**\n * Shared value + input plumbing for slider designs: controlled/uncontrolled\n * value, step snapping, pointer-capture drag along a track and arrow-key\n * control. Visuals and motion live in the component; this only owns the number.\n */\nexport function useSlider({\n value,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = 100,\n step = 1,\n disabled = false,\n \"aria-label\": ariaLabel,\n formatValueText,\n}: SliderOptions) {\n const trackRef = useRef<HTMLDivElement>(null);\n const sliderEl = useRef<HTMLElement | null>(null);\n // The state drives visuals. Move reads this ref instead, so the first\n // pointermove after pointerdown does not have to wait on a re-render.\n const draggingRef = useRef(false);\n const [internal, setInternal] = useState(defaultValue);\n const [dragging, setDragging] = useState(false);\n const controlled = value !== undefined;\n // Collapse inverted or empty ranges and non-positive steps here, so that\n // percent, ticks and the keyboard maths never divide by zero or walk a\n // NaN grid.\n const lo = min;\n const hi = max > min ? max : min;\n const stride = step > 0 ? step : 1;\n const current = clamp(controlled ? value : internal, lo, hi);\n const percent = hi > lo ? ((current - lo) / (hi - lo)) * 100 : 0;\n\n const commit = useCallback(\n (next: number) => {\n const clean = snapSliderValue(next, lo, hi, stride);\n if (!controlled) setInternal(clean);\n onValueChange?.(clean);\n },\n [controlled, onValueChange, lo, hi, stride],\n );\n\n const commitFromX = useCallback(\n (clientX: number) => {\n const rect = trackRef.current?.getBoundingClientRect();\n if (!rect || rect.width === 0) return;\n const ratio = clamp((clientX - rect.left) / rect.width, 0, 1);\n commit(lo + ratio * (hi - lo));\n },\n [commit, lo, hi],\n );\n\n const onPointerDown = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (disabled) return;\n // optional: test DOMs and older browsers omit pointer capture\n event.currentTarget.setPointerCapture?.(event.pointerId);\n draggingRef.current = true;\n setDragging(true);\n // A click on the track should land keyboard focus on the handle.\n sliderEl.current?.focus({ preventScroll: true });\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const onPointerMove = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (!draggingRef.current || disabled) return;\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const endDrag = useCallback((event: PointerEvent<HTMLDivElement>) => {\n // Releasing without capture throws. The other pointer hooks guard it the\n // same way.\n if (event.currentTarget.hasPointerCapture?.(event.pointerId)) {\n event.currentTarget.releasePointerCapture(event.pointerId);\n }\n draggingRef.current = false;\n setDragging(false);\n }, []);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLElement>) => {\n if (disabled) return;\n const map: Record<string, number> = {\n ArrowRight: current + stride,\n ArrowUp: current + stride,\n ArrowLeft: current - stride,\n ArrowDown: current - stride,\n PageUp: current + stride * 10,\n PageDown: current - stride * 10,\n Home: lo,\n End: hi,\n };\n if (event.key in map) {\n event.preventDefault();\n commit(map[event.key]);\n }\n },\n [disabled, current, stride, lo, hi, commit],\n );\n\n return {\n current,\n percent,\n dragging,\n min: lo,\n max: hi,\n step: stride,\n commit,\n /** Pointer handlers for the track element — drag anywhere on it. */\n trackProps: {\n ref: trackRef,\n onPointerDown,\n onPointerMove,\n onPointerUp: endDrag,\n onPointerCancel: endDrag,\n onLostPointerCapture: endDrag,\n },\n /** ARIA + keyboard props for the focusable slider element. */\n sliderProps: {\n // Callback keeps the handle typed across button/div/motion hosts.\n ref: (node: HTMLElement | null) => {\n sliderEl.current = node;\n },\n role: \"slider\" as const,\n tabIndex: disabled ? -1 : 0,\n \"aria-label\": ariaLabel,\n \"aria-valuemin\": lo,\n \"aria-valuemax\": hi,\n \"aria-valuenow\": current,\n \"aria-valuetext\": formatValueText?.(current),\n \"aria-disabled\": disabled || undefined,\n onKeyDown,\n },\n };\n}\n"],"mappings":";;;AAIA,MAAM,SAAS,GAAW,IAAY,OAAe,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,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EACA;EACA;EACA,KAAK;EACL,KAAK;EACL,MAAM;EACN;;EAEA,YAAY;GACV,KAAK;GACL;GACA;GACA,aAAa;GACb,iBAAiB;GACjB,sBAAsB;EACxB;;EAEA,aAAa;GAEX,MAAM,SAA6B;IACjC,SAAS,UAAU;GACrB;GACA,MAAM;GACN,UAAU,WAAW,KAAK;GAC1B,cAAc;GACd,iBAAiB;GACjB,iBAAiB;GACjB,iBAAiB;GACjB,kBAAkB,kBAAkB,OAAO;GAC3C,iBAAiB,YAAY,KAAA;GAC7B;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region src/lib/ease.d.ts
|
|
2
|
+
declare const EASE_OUT: readonly [0.16, 1, 0.3, 1];
|
|
3
|
+
declare const EASE_IN_OUT: readonly [0.77, 0, 0.175, 1];
|
|
4
|
+
declare const EASE_DRAWER: readonly [0.32, 0.72, 0, 1];
|
|
5
|
+
/** CSS string form of EASE_OUT for inline style transitions. */
|
|
6
|
+
declare const EASE_OUT_CSS = "cubic-bezier(0.16, 1, 0.3, 1)";
|
|
7
|
+
/** Press feedback on buttons and other tappable surfaces. */
|
|
8
|
+
declare const SPRING_PRESS: {
|
|
9
|
+
readonly type: "spring";
|
|
10
|
+
readonly stiffness: 500;
|
|
11
|
+
readonly damping: 30;
|
|
12
|
+
readonly mass: 0.6;
|
|
13
|
+
};
|
|
14
|
+
/** Content swaps — label/icon slots trading places inside a control. */
|
|
15
|
+
declare const SPRING_SWAP: {
|
|
16
|
+
readonly type: "spring";
|
|
17
|
+
readonly stiffness: 460;
|
|
18
|
+
readonly damping: 30;
|
|
19
|
+
readonly mass: 0.55;
|
|
20
|
+
};
|
|
21
|
+
/** Overlay panel entrances — modals and sheets summoned by pointer. */
|
|
22
|
+
declare const SPRING_PANEL: {
|
|
23
|
+
readonly type: "spring";
|
|
24
|
+
readonly stiffness: 420;
|
|
25
|
+
readonly damping: 40;
|
|
26
|
+
readonly mass: 0.5;
|
|
27
|
+
};
|
|
28
|
+
/** Shared-layout glides — pills, indicators and panels morphing between positions. */
|
|
29
|
+
declare const SPRING_LAYOUT: {
|
|
30
|
+
readonly type: "spring";
|
|
31
|
+
readonly stiffness: 360;
|
|
32
|
+
readonly damping: 32;
|
|
33
|
+
readonly mass: 0.6;
|
|
34
|
+
};
|
|
35
|
+
/** Cursor-follow physics for decorative mouse tracking (magnetic, tilt, dock). */
|
|
36
|
+
declare const SPRING_MOUSE: {
|
|
37
|
+
readonly stiffness: 200;
|
|
38
|
+
readonly damping: 15;
|
|
39
|
+
readonly mass: 0.3;
|
|
40
|
+
};
|
|
41
|
+
/** Dragged handles and fills (sliders) — critically damped `useSpring` config,
|
|
42
|
+
* so the value follows the pointer butterily and never rebounds off an end. */
|
|
43
|
+
declare const SPRING_GLIDE: {
|
|
44
|
+
readonly stiffness: 700;
|
|
45
|
+
readonly damping: 50;
|
|
46
|
+
readonly mass: 0.5;
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
export { EASE_DRAWER, EASE_IN_OUT, EASE_OUT, EASE_OUT_CSS, SPRING_GLIDE, SPRING_LAYOUT, SPRING_MOUSE, SPRING_PANEL, SPRING_PRESS, SPRING_SWAP };
|
|
50
|
+
//# sourceMappingURL=ease.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ease.d.ts","names":[],"sources":["../../src/lib/ease.ts"],"mappings":";cAAa;cACA;cACA;;cAGA;;cAGA;;;;;;;cAQA;;;;;;;cAQA;;;;;;;cAQA;;;;;;;cAQA;;;;;;;cAQA"}
|
package/dist/lib/ease.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
//#region src/lib/ease.ts
|
|
2
|
+
const EASE_OUT = [
|
|
3
|
+
.16,
|
|
4
|
+
1,
|
|
5
|
+
.3,
|
|
6
|
+
1
|
|
7
|
+
];
|
|
8
|
+
const EASE_IN_OUT = [
|
|
9
|
+
.77,
|
|
10
|
+
0,
|
|
11
|
+
.175,
|
|
12
|
+
1
|
|
13
|
+
];
|
|
14
|
+
const EASE_DRAWER = [
|
|
15
|
+
.32,
|
|
16
|
+
.72,
|
|
17
|
+
0,
|
|
18
|
+
1
|
|
19
|
+
];
|
|
20
|
+
/** CSS string form of EASE_OUT for inline style transitions. */
|
|
21
|
+
const EASE_OUT_CSS = "cubic-bezier(0.16, 1, 0.3, 1)";
|
|
22
|
+
/** Press feedback on buttons and other tappable surfaces. */
|
|
23
|
+
const SPRING_PRESS = {
|
|
24
|
+
type: "spring",
|
|
25
|
+
stiffness: 500,
|
|
26
|
+
damping: 30,
|
|
27
|
+
mass: .6
|
|
28
|
+
};
|
|
29
|
+
/** Content swaps — label/icon slots trading places inside a control. */
|
|
30
|
+
const SPRING_SWAP = {
|
|
31
|
+
type: "spring",
|
|
32
|
+
stiffness: 460,
|
|
33
|
+
damping: 30,
|
|
34
|
+
mass: .55
|
|
35
|
+
};
|
|
36
|
+
/** Overlay panel entrances — modals and sheets summoned by pointer. */
|
|
37
|
+
const SPRING_PANEL = {
|
|
38
|
+
type: "spring",
|
|
39
|
+
stiffness: 420,
|
|
40
|
+
damping: 40,
|
|
41
|
+
mass: .5
|
|
42
|
+
};
|
|
43
|
+
/** Shared-layout glides — pills, indicators and panels morphing between positions. */
|
|
44
|
+
const SPRING_LAYOUT = {
|
|
45
|
+
type: "spring",
|
|
46
|
+
stiffness: 360,
|
|
47
|
+
damping: 32,
|
|
48
|
+
mass: .6
|
|
49
|
+
};
|
|
50
|
+
/** Cursor-follow physics for decorative mouse tracking (magnetic, tilt, dock). */
|
|
51
|
+
const SPRING_MOUSE = {
|
|
52
|
+
stiffness: 200,
|
|
53
|
+
damping: 15,
|
|
54
|
+
mass: .3
|
|
55
|
+
};
|
|
56
|
+
/** Dragged handles and fills (sliders) — critically damped `useSpring` config,
|
|
57
|
+
* so the value follows the pointer butterily and never rebounds off an end. */
|
|
58
|
+
const SPRING_GLIDE = {
|
|
59
|
+
stiffness: 700,
|
|
60
|
+
damping: 50,
|
|
61
|
+
mass: .5
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
export { EASE_DRAWER, EASE_IN_OUT, EASE_OUT, EASE_OUT_CSS, SPRING_GLIDE, SPRING_LAYOUT, SPRING_MOUSE, SPRING_PANEL, SPRING_PRESS, SPRING_SWAP };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=ease.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ease.js","names":[],"sources":["../../src/lib/ease.ts"],"sourcesContent":["export const EASE_OUT = [0.16, 1, 0.3, 1] as const;\nexport const EASE_IN_OUT = [0.77, 0, 0.175, 1] as const;\nexport const EASE_DRAWER = [0.32, 0.72, 0, 1] as const;\n\n/** CSS string form of EASE_OUT for inline style transitions. */\nexport const EASE_OUT_CSS = \"cubic-bezier(0.16, 1, 0.3, 1)\";\n\n/** Press feedback on buttons and other tappable surfaces. */\nexport const SPRING_PRESS = {\n type: \"spring\",\n stiffness: 500,\n damping: 30,\n mass: 0.6,\n} as const;\n\n/** Content swaps — label/icon slots trading places inside a control. */\nexport const SPRING_SWAP = {\n type: \"spring\",\n stiffness: 460,\n damping: 30,\n mass: 0.55,\n} as const;\n\n/** Overlay panel entrances — modals and sheets summoned by pointer. */\nexport const SPRING_PANEL = {\n type: \"spring\",\n stiffness: 420,\n damping: 40,\n mass: 0.5,\n} as const;\n\n/** Shared-layout glides — pills, indicators and panels morphing between positions. */\nexport const SPRING_LAYOUT = {\n type: \"spring\",\n stiffness: 360,\n damping: 32,\n mass: 0.6,\n} as const;\n\n/** Cursor-follow physics for decorative mouse tracking (magnetic, tilt, dock). */\nexport const SPRING_MOUSE = {\n stiffness: 200,\n damping: 15,\n mass: 0.3,\n} as const;\n\n/** Dragged handles and fills (sliders) — critically damped `useSpring` config,\n * so the value follows the pointer butterily and never rebounds off an end. */\nexport const SPRING_GLIDE = {\n stiffness: 700,\n damping: 50,\n mass: 0.5,\n} as const;\n"],"mappings":";AAAA,MAAa,WAAW;CAAC;CAAM;CAAG;CAAK;AAAC;AACxC,MAAa,cAAc;CAAC;CAAM;CAAG;CAAO;AAAC;AAC7C,MAAa,cAAc;CAAC;CAAM;CAAM;CAAG;AAAC;;AAG5C,MAAa,eAAe;;AAG5B,MAAa,eAAe;CAC1B,MAAM;CACN,WAAW;CACX,SAAS;CACT,MAAM;AACR;;AAGA,MAAa,cAAc;CACzB,MAAM;CACN,WAAW;CACX,SAAS;CACT,MAAM;AACR;;AAGA,MAAa,eAAe;CAC1B,MAAM;CACN,WAAW;CACX,SAAS;CACT,MAAM;AACR;;AAGA,MAAa,gBAAgB;CAC3B,MAAM;CACN,WAAW;CACX,SAAS;CACT,MAAM;AACR;;AAGA,MAAa,eAAe;CAC1B,WAAW;CACX,SAAS;CACT,MAAM;AACR;;;AAIA,MAAa,eAAe;CAC1B,WAAW;CACX,SAAS;CACT,MAAM;AACR"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/lib/tick-sound.d.ts
|
|
2
|
+
interface TickPlayer {
|
|
3
|
+
prepare: () => void;
|
|
4
|
+
play: () => void;
|
|
5
|
+
dispose: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Lazily-initialized tick player. No `AudioContext` is created until the first
|
|
9
|
+
* `prepare()` or `play()` call anywhere on the page. Every player shares the
|
|
10
|
+
* same context/buffer, ref-counted so `dispose()` only tears it down once the
|
|
11
|
+
* last consumer is gone. Safe during SSR or in browsers without Web Audio:
|
|
12
|
+
* `prepare()` and `play()` become silent no-ops.
|
|
13
|
+
*/
|
|
14
|
+
declare function createTickPlayer(): TickPlayer;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { createTickPlayer };
|
|
17
|
+
//# sourceMappingURL=tick-sound.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tick-sound.d.ts","names":[],"sources":["../../src/lib/tick-sound.ts"],"mappings":";UAwFU;EACR;EACA;EACA;;;;;;;;;iBAUc,oBAAoB"}
|