@moldable-ai/ui 0.2.21 → 0.2.24
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/dist/catalog/catalog-coverage.d.ts +1 -1
- package/dist/catalog/catalog-manifest.d.ts +1 -1
- package/dist/catalog/catalog-manifest.js +1 -1
- package/dist/catalog/catalog-types.d.ts +7 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -1
- package/dist/catalog/catalog-types.js +1 -0
- package/dist/catalog/component-catalog.d.ts +1 -1
- package/dist/catalog/component-catalog.js +2 -2
- package/dist/catalog/core-catalog-exclusions.d.ts +1 -1
- package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -1
- package/dist/catalog/core-catalog-exclusions.js +1 -146
- package/dist/catalog/core-catalog.d.ts +1 -1
- package/dist/catalog/core-catalog.d.ts.map +1 -1
- package/dist/catalog/core-catalog.js +11 -7
- package/dist/catalog/core-collection-stories.d.ts +1 -1
- package/dist/catalog/core-collection-stories.d.ts.map +1 -1
- package/dist/catalog/core-collection-stories.js +41 -9
- package/dist/catalog/core-control-stories.d.ts +1 -1
- package/dist/catalog/core-control-stories.d.ts.map +1 -1
- package/dist/catalog/core-control-stories.js +53 -22
- package/dist/catalog/core-feedback-stories.d.ts +1 -1
- package/dist/catalog/core-feedback-stories.d.ts.map +1 -1
- package/dist/catalog/core-feedback-stories.js +89 -10
- package/dist/catalog/core-form-stories.d.ts +3 -0
- package/dist/catalog/core-form-stories.d.ts.map +1 -0
- package/dist/catalog/core-form-stories.js +56 -0
- package/dist/catalog/core-foundation-stories.d.ts +1 -1
- package/dist/catalog/core-foundation-stories.js +7 -7
- package/dist/catalog/core-layout-stories.d.ts +3 -0
- package/dist/catalog/core-layout-stories.d.ts.map +1 -0
- package/dist/catalog/core-layout-stories.js +78 -0
- package/dist/catalog/core-navigation-stories.d.ts +1 -1
- package/dist/catalog/core-navigation-stories.d.ts.map +1 -1
- package/dist/catalog/core-navigation-stories.js +25 -3
- package/dist/catalog/core-overlay-stories.d.ts +1 -1
- package/dist/catalog/core-overlay-stories.d.ts.map +1 -1
- package/dist/catalog/core-overlay-stories.js +113 -8
- package/dist/catalog/index.d.ts +6 -6
- package/dist/catalog/index.js +6 -6
- package/dist/components/app-error-boundary.d.ts.map +1 -1
- package/dist/components/app-error-boundary.js +4 -3
- package/dist/components/chat/chat-image-lightbox.js +3 -3
- package/dist/components/chat/chat-input.js +5 -5
- package/dist/components/chat/chat-message.js +17 -17
- package/dist/components/chat/chat-messages.d.ts +1 -1
- package/dist/components/chat/chat-messages.js +3 -3
- package/dist/components/chat/chat-panel.d.ts +6 -6
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +33 -33
- package/dist/components/chat/checkpoint-badge.js +3 -3
- package/dist/components/chat/conversation-history.d.ts.map +1 -1
- package/dist/components/chat/conversation-history.js +13 -13
- package/dist/components/chat/index.d.ts +20 -15
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +20 -15
- package/dist/components/chat/markdown.js +1 -1
- package/dist/components/chat/model-effort-selector.js +10 -10
- package/dist/components/chat/model-selector.js +4 -4
- package/dist/components/chat/reasoning-effort-selector.js +4 -4
- package/dist/components/chat/restore-dialog.js +3 -3
- package/dist/components/chat/thinking-timeline.js +2 -2
- package/dist/components/chat/tool-approval.d.ts +1 -1
- package/dist/components/chat/tool-approval.d.ts.map +1 -1
- package/dist/components/chat/tool-approval.js +9 -9
- package/dist/components/chat/tool-handlers.d.ts +2 -2
- package/dist/components/chat/tool-handlers.js +90 -90
- package/dist/components/chat/voice-orb-audio.d.ts +16 -0
- package/dist/components/chat/voice-orb-audio.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-audio.js +110 -0
- package/dist/components/chat/voice-orb-renderer.d.ts +51 -0
- package/dist/components/chat/voice-orb-renderer.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-renderer.js +410 -0
- package/dist/components/chat/voice-orb-shaders.d.ts +3 -0
- package/dist/components/chat/voice-orb-shaders.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-shaders.js +355 -0
- package/dist/components/chat/voice-orb-types.d.ts +24 -0
- package/dist/components/chat/voice-orb-types.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-types.js +73 -0
- package/dist/components/chat/voice-orb.d.ts +20 -0
- package/dist/components/chat/voice-orb.d.ts.map +1 -0
- package/dist/components/chat/voice-orb.js +67 -0
- package/dist/components/code-block.js +1 -1
- package/dist/components/hardware/bluetooth-panel.d.ts +2 -2
- package/dist/components/hardware/bluetooth-panel.js +10 -10
- package/dist/components/hardware/camera-preview.js +6 -6
- package/dist/components/hardware/capability-badge.d.ts +2 -2
- package/dist/components/hardware/capability-badge.js +2 -2
- package/dist/components/hardware/capability-matrix.d.ts +1 -1
- package/dist/components/hardware/capability-matrix.js +5 -5
- package/dist/components/hardware/clipboard-button.d.ts +1 -1
- package/dist/components/hardware/clipboard-button.js +2 -2
- package/dist/components/hardware/device-list.js +1 -1
- package/dist/components/hardware/display-map.d.ts +1 -1
- package/dist/components/hardware/display-map.js +7 -7
- package/dist/components/hardware/haptic-button.d.ts +2 -2
- package/dist/components/hardware/haptic-button.js +3 -3
- package/dist/components/hardware/hardware-panel.js +1 -1
- package/dist/components/hardware/hid-panel.d.ts +2 -2
- package/dist/components/hardware/hid-panel.js +10 -10
- package/dist/components/hardware/index.d.ts +26 -26
- package/dist/components/hardware/index.js +26 -26
- package/dist/components/hardware/live-indicator.js +1 -1
- package/dist/components/hardware/local-auth-button.d.ts +2 -2
- package/dist/components/hardware/local-auth-button.js +4 -4
- package/dist/components/hardware/location-panel.d.ts +1 -1
- package/dist/components/hardware/location-panel.js +6 -6
- package/dist/components/hardware/microphone-meter.js +7 -7
- package/dist/components/hardware/midi-monitor.d.ts +2 -2
- package/dist/components/hardware/midi-monitor.js +9 -9
- package/dist/components/hardware/notification-panel.d.ts +1 -1
- package/dist/components/hardware/notification-panel.js +8 -8
- package/dist/components/hardware/power-blocker-controller.d.ts +1 -1
- package/dist/components/hardware/power-blocker-controller.js +1 -1
- package/dist/components/hardware/power-panel.d.ts +1 -1
- package/dist/components/hardware/power-panel.js +9 -9
- package/dist/components/hardware/readout.js +1 -1
- package/dist/components/hardware/screen-share-preview.js +5 -5
- package/dist/components/hardware/secure-storage-panel.d.ts +1 -1
- package/dist/components/hardware/secure-storage-panel.js +9 -9
- package/dist/components/hardware/serial-console.d.ts +2 -2
- package/dist/components/hardware/serial-console.js +10 -10
- package/dist/components/hardware/shortcut-recorder.d.ts +1 -1
- package/dist/components/hardware/shortcut-recorder.js +4 -4
- package/dist/components/hardware/stream-log.js +1 -1
- package/dist/components/hardware/system-audio-monitor.d.ts +1 -1
- package/dist/components/hardware/system-audio-monitor.js +9 -9
- package/dist/components/hardware/usb-panel.d.ts +5 -5
- package/dist/components/hardware/usb-panel.js +10 -10
- package/dist/components/hardware/use-capability.d.ts +1 -1
- package/dist/components/hardware/use-capability.js +1 -1
- package/dist/components/markdown.js +5 -5
- package/dist/components/native-capabilities/bluetooth-panel.d.ts +2 -2
- package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/bluetooth-panel.js +17 -17
- package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -1
- package/dist/components/native-capabilities/camera-preview.js +7 -7
- package/dist/components/native-capabilities/capability-badge.d.ts +2 -2
- package/dist/components/native-capabilities/capability-badge.js +4 -4
- package/dist/components/native-capabilities/capability-matrix.d.ts +1 -1
- package/dist/components/native-capabilities/capability-matrix.js +7 -7
- package/dist/components/native-capabilities/clipboard-button.d.ts +1 -1
- package/dist/components/native-capabilities/clipboard-button.js +2 -2
- package/dist/components/native-capabilities/device-list.js +4 -4
- package/dist/components/native-capabilities/display-map.d.ts +1 -1
- package/dist/components/native-capabilities/display-map.d.ts.map +1 -1
- package/dist/components/native-capabilities/display-map.js +11 -11
- package/dist/components/native-capabilities/haptic-button.d.ts +2 -2
- package/dist/components/native-capabilities/haptic-button.js +3 -3
- package/dist/components/native-capabilities/hid-panel.d.ts +2 -2
- package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/hid-panel.js +14 -14
- package/dist/components/native-capabilities/index.d.ts +26 -26
- package/dist/components/native-capabilities/index.js +26 -26
- package/dist/components/native-capabilities/live-indicator.js +3 -3
- package/dist/components/native-capabilities/local-auth-button.d.ts +2 -2
- package/dist/components/native-capabilities/local-auth-button.js +4 -4
- package/dist/components/native-capabilities/location-panel.d.ts +1 -1
- package/dist/components/native-capabilities/location-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/location-panel.js +8 -8
- package/dist/components/native-capabilities/microphone-meter.js +9 -9
- package/dist/components/native-capabilities/midi-monitor.d.ts +2 -2
- package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -1
- package/dist/components/native-capabilities/midi-monitor.js +11 -11
- package/dist/components/native-capabilities/native-capability-panel.js +6 -6
- package/dist/components/native-capabilities/notification-panel.d.ts +1 -1
- package/dist/components/native-capabilities/notification-panel.js +9 -9
- package/dist/components/native-capabilities/power-blocker-controller.d.ts +1 -1
- package/dist/components/native-capabilities/power-blocker-controller.js +1 -1
- package/dist/components/native-capabilities/power-panel.d.ts +1 -1
- package/dist/components/native-capabilities/power-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/power-panel.js +12 -12
- package/dist/components/native-capabilities/readout.d.ts.map +1 -1
- package/dist/components/native-capabilities/readout.js +2 -2
- package/dist/components/native-capabilities/screen-share-preview.js +6 -6
- package/dist/components/native-capabilities/secure-storage-panel.d.ts +1 -1
- package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/secure-storage-panel.js +11 -11
- package/dist/components/native-capabilities/serial-console.d.ts +2 -2
- package/dist/components/native-capabilities/serial-console.d.ts.map +1 -1
- package/dist/components/native-capabilities/serial-console.js +11 -11
- package/dist/components/native-capabilities/shortcut-recorder.d.ts +1 -1
- package/dist/components/native-capabilities/shortcut-recorder.js +5 -5
- package/dist/components/native-capabilities/stream-log.js +3 -3
- package/dist/components/native-capabilities/system-audio-monitor.d.ts +1 -1
- package/dist/components/native-capabilities/system-audio-monitor.js +12 -12
- package/dist/components/native-capabilities/usb-panel.d.ts +5 -5
- package/dist/components/native-capabilities/usb-panel.js +15 -15
- package/dist/components/native-capabilities/use-capability.d.ts +1 -1
- package/dist/components/native-capabilities/use-capability.js +1 -1
- package/dist/components/rich-media-player.js +3 -3
- package/dist/components/ui/accordion.js +3 -3
- package/dist/components/ui/alert-dialog.d.ts +5 -3
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +20 -10
- package/dist/components/ui/alert.d.ts +2 -2
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +11 -11
- package/dist/components/ui/app-frame.d.ts +7 -1
- package/dist/components/ui/app-frame.d.ts.map +1 -1
- package/dist/components/ui/app-frame.js +52 -16
- package/dist/components/ui/avatar.js +5 -5
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +4 -4
- package/dist/components/ui/breadcrumb.js +2 -2
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.js +4 -4
- package/dist/components/ui/button.d.ts +6 -4
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +50 -18
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +15 -15
- package/dist/components/ui/card.js +3 -3
- package/dist/components/ui/carousel.d.ts +1 -1
- package/dist/components/ui/carousel.js +4 -4
- package/dist/components/ui/chart.js +5 -5
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/collapsible.js +3 -3
- package/dist/components/ui/color-well.js +2 -2
- package/dist/components/ui/combobox.js +9 -9
- package/dist/components/ui/command.d.ts +1 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +9 -9
- package/dist/components/ui/confirm-dialog.d.ts +1 -1
- package/dist/components/ui/confirm-dialog.d.ts.map +1 -1
- package/dist/components/ui/confirm-dialog.js +2 -2
- package/dist/components/ui/context-menu.d.ts +16 -5
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +92 -16
- package/dist/components/ui/date-field.d.ts.map +1 -1
- package/dist/components/ui/date-field.js +8 -8
- package/dist/components/ui/date-picker.d.ts +2 -2
- package/dist/components/ui/date-picker.js +7 -7
- package/dist/components/ui/dialog-primary-action.d.ts +4 -0
- package/dist/components/ui/dialog-primary-action.d.ts.map +1 -0
- package/dist/components/ui/dialog-primary-action.js +37 -0
- package/dist/components/ui/dialog.d.ts +6 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +20 -7
- package/dist/components/ui/drawer.js +4 -4
- package/dist/components/ui/dropdown-menu.d.ts +15 -5
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +98 -16
- package/dist/components/ui/edge-fade.js +1 -1
- package/dist/components/ui/empty.d.ts +1 -1
- package/dist/components/ui/empty.js +5 -5
- package/dist/components/ui/error-boundary-view.d.ts +12 -0
- package/dist/components/ui/error-boundary-view.d.ts.map +1 -0
- package/dist/components/ui/error-boundary-view.js +8 -0
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/field.d.ts.map +1 -1
- package/dist/components/ui/field.js +9 -9
- package/dist/components/ui/form.js +4 -4
- package/dist/components/ui/grid.d.ts.map +1 -1
- package/dist/components/ui/grid.js +5 -5
- package/dist/components/ui/hover-card.js +2 -2
- package/dist/components/ui/icon-button.d.ts +1 -1
- package/dist/components/ui/icon-button.d.ts.map +1 -1
- package/dist/components/ui/icon-button.js +3 -4
- package/dist/components/ui/index.d.ts +77 -76
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +77 -76
- package/dist/components/ui/input-group.d.ts +3 -3
- package/dist/components/ui/input-group.js +14 -14
- package/dist/components/ui/input-otp.js +3 -3
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/inspector.d.ts +1 -1
- package/dist/components/ui/inspector.js +6 -6
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/item.js +7 -7
- package/dist/components/ui/kbd.js +2 -2
- package/dist/components/ui/label.js +2 -2
- package/dist/components/ui/list.d.ts.map +1 -1
- package/dist/components/ui/list.js +5 -5
- package/dist/components/ui/material.js +3 -3
- package/dist/components/ui/menu-items.d.ts +28 -0
- package/dist/components/ui/menu-items.d.ts.map +1 -0
- package/dist/components/ui/menu-items.js +111 -0
- package/dist/components/ui/menubar.js +11 -11
- package/dist/components/ui/message-scroller-controller.d.ts +1 -1
- package/dist/components/ui/message-scroller-controller.js +1 -1
- package/dist/components/ui/message-scroller-primitive.d.ts +1 -1
- package/dist/components/ui/message-scroller-primitive.js +1 -1
- package/dist/components/ui/message-scroller.d.ts +2 -2
- package/dist/components/ui/message-scroller.js +3 -3
- package/dist/components/ui/navigation-button-group.d.ts +2 -2
- package/dist/components/ui/navigation-button-group.js +2 -2
- package/dist/components/ui/navigation-menu.js +6 -6
- package/dist/components/ui/notification-dot.js +2 -2
- package/dist/components/ui/number-input.js +8 -8
- package/dist/components/ui/pagination.d.ts +1 -1
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/panel.d.ts +1 -1
- package/dist/components/ui/panel.js +3 -3
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/popover.js +3 -3
- package/dist/components/ui/progress.js +2 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +2 -2
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +15 -4
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +3 -3
- package/dist/components/ui/search-field.js +7 -7
- package/dist/components/ui/segmented-control.js +9 -9
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +6 -6
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sheet.js +4 -4
- package/dist/components/ui/sidebar.d.ts +5 -5
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +111 -24
- package/dist/components/ui/skeleton.js +2 -2
- package/dist/components/ui/slider.d.ts +3 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +3 -3
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +2 -2
- package/dist/components/ui/split-view.js +1 -1
- package/dist/components/ui/status.d.ts +1 -1
- package/dist/components/ui/status.d.ts.map +1 -1
- package/dist/components/ui/status.js +10 -9
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +7 -7
- package/dist/components/ui/tabs.js +3 -3
- package/dist/components/ui/text.d.ts +2 -2
- package/dist/components/ui/text.js +19 -19
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/toggle-group.d.ts +1 -1
- package/dist/components/ui/toggle-group.js +4 -4
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.js +10 -10
- package/dist/components/ui/toolbar.d.ts +7 -7
- package/dist/components/ui/toolbar.js +7 -7
- package/dist/components/ui/tooltip.d.ts +2 -2
- package/dist/components/ui/tooltip.js +5 -5
- package/dist/index.d.ts +21 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -15
- package/dist/lib/frame-lifecycle.d.ts +49 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +163 -1
- package/dist/lib/host-date-time-picker.d.ts +36 -0
- package/dist/lib/host-date-time-picker.d.ts.map +1 -0
- package/dist/lib/host-date-time-picker.js +162 -0
- package/dist/lib/host-file-dialog.d.ts +66 -0
- package/dist/lib/host-file-dialog.d.ts.map +1 -0
- package/dist/lib/host-file-dialog.js +221 -0
- package/dist/lib/host-native-menu.d.ts +116 -0
- package/dist/lib/host-native-menu.d.ts.map +1 -0
- package/dist/lib/host-native-menu.js +242 -0
- package/dist/lib/host-services.d.ts +13 -0
- package/dist/lib/host-services.d.ts.map +1 -0
- package/dist/lib/host-services.js +161 -0
- package/dist/lib/host-share.d.ts +39 -0
- package/dist/lib/host-share.d.ts.map +1 -0
- package/dist/lib/host-share.js +161 -0
- package/dist/lib/host-web-surface.d.ts +31 -0
- package/dist/lib/host-web-surface.d.ts.map +1 -0
- package/dist/lib/host-web-surface.js +116 -0
- package/dist/lib/native-capabilities/access.d.ts +2 -2
- package/dist/lib/native-capabilities/access.js +2 -2
- package/dist/lib/native-capabilities/bluetooth-access.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-access.js +2 -2
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-connection.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-gatt.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts +2 -2
- package/dist/lib/native-capabilities/bluetooth-internal.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +2 -2
- package/dist/lib/native-capabilities/bluetooth-native-fallback.js +2 -2
- package/dist/lib/native-capabilities/bluetooth.d.ts +6 -6
- package/dist/lib/native-capabilities/bluetooth.js +4 -4
- package/dist/lib/native-capabilities/bridge.d.ts +1 -1
- package/dist/lib/native-capabilities/bridge.js +2 -2
- package/dist/lib/native-capabilities/capabilities.d.ts +1 -1
- package/dist/lib/native-capabilities/capabilities.js +1 -1
- package/dist/lib/native-capabilities/clipboard.js +2 -2
- package/dist/lib/native-capabilities/device-io-errors.d.ts +1 -1
- package/dist/lib/native-capabilities/device-io-errors.js +1 -1
- package/dist/lib/native-capabilities/displays.d.ts +1 -1
- package/dist/lib/native-capabilities/displays.js +1 -1
- package/dist/lib/native-capabilities/global-shortcuts.d.ts +2 -2
- package/dist/lib/native-capabilities/global-shortcuts.js +1 -1
- package/dist/lib/native-capabilities/haptics.d.ts +1 -1
- package/dist/lib/native-capabilities/haptics.js +1 -1
- package/dist/lib/native-capabilities/hid-native.d.ts +2 -2
- package/dist/lib/native-capabilities/hid-native.js +3 -3
- package/dist/lib/native-capabilities/hid.js +5 -5
- package/dist/lib/native-capabilities/index.d.ts +39 -39
- package/dist/lib/native-capabilities/index.js +21 -21
- package/dist/lib/native-capabilities/local-authentication.d.ts +1 -1
- package/dist/lib/native-capabilities/local-authentication.js +1 -1
- package/dist/lib/native-capabilities/location.js +1 -1
- package/dist/lib/native-capabilities/media-permissions.d.ts +1 -1
- package/dist/lib/native-capabilities/media-permissions.js +1 -1
- package/dist/lib/native-capabilities/media.d.ts +1 -1
- package/dist/lib/native-capabilities/media.js +2 -2
- package/dist/lib/native-capabilities/midi-access.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-access.js +3 -3
- package/dist/lib/native-capabilities/midi-internal.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-internal.js +1 -1
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-native-fallback.js +2 -2
- package/dist/lib/native-capabilities/midi-ports.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-ports.js +1 -1
- package/dist/lib/native-capabilities/midi.d.ts +5 -5
- package/dist/lib/native-capabilities/midi.js +3 -3
- package/dist/lib/native-capabilities/native-device-io.d.ts +1 -1
- package/dist/lib/native-capabilities/native-device-io.js +1 -1
- package/dist/lib/native-capabilities/native-device-lifecycle.js +1 -1
- package/dist/lib/native-capabilities/notifications.d.ts +2 -2
- package/dist/lib/native-capabilities/notifications.js +1 -1
- package/dist/lib/native-capabilities/power-session.d.ts +2 -2
- package/dist/lib/native-capabilities/power-session.js +1 -1
- package/dist/lib/native-capabilities/secure-storage.d.ts +1 -1
- package/dist/lib/native-capabilities/secure-storage.js +1 -1
- package/dist/lib/native-capabilities/serial-native.d.ts +2 -2
- package/dist/lib/native-capabilities/serial-native.js +3 -3
- package/dist/lib/native-capabilities/serial.js +5 -5
- package/dist/lib/native-capabilities/system-audio.d.ts +1 -1
- package/dist/lib/native-capabilities/system-audio.js +1 -1
- package/dist/lib/native-capabilities/usb-native.d.ts +2 -2
- package/dist/lib/native-capabilities/usb-native.js +3 -3
- package/dist/lib/native-capabilities/usb.js +5 -5
- package/dist/lib/native-hardware/bluetooth-access.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-access.js +1 -1
- package/dist/lib/native-hardware/bluetooth-connection.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-connection.js +1 -1
- package/dist/lib/native-hardware/bluetooth-gatt.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-gatt.js +1 -1
- package/dist/lib/native-hardware/bluetooth-internal.d.ts +2 -2
- package/dist/lib/native-hardware/bluetooth-internal.js +1 -1
- package/dist/lib/native-hardware/bluetooth-native-fallback.d.ts +2 -2
- package/dist/lib/native-hardware/bluetooth-native-fallback.js +2 -2
- package/dist/lib/native-hardware/bluetooth.d.ts +6 -6
- package/dist/lib/native-hardware/bluetooth.js +4 -4
- package/dist/lib/native-hardware/bridge.d.ts +1 -1
- package/dist/lib/native-hardware/bridge.js +2 -2
- package/dist/lib/native-hardware/capabilities.d.ts +1 -1
- package/dist/lib/native-hardware/capabilities.js +1 -1
- package/dist/lib/native-hardware/clipboard.js +1 -1
- package/dist/lib/native-hardware/device-io-errors.d.ts +1 -1
- package/dist/lib/native-hardware/device-io-errors.js +1 -1
- package/dist/lib/native-hardware/displays.d.ts +1 -1
- package/dist/lib/native-hardware/displays.js +1 -1
- package/dist/lib/native-hardware/global-shortcuts.d.ts +2 -2
- package/dist/lib/native-hardware/global-shortcuts.js +1 -1
- package/dist/lib/native-hardware/haptics.d.ts +1 -1
- package/dist/lib/native-hardware/haptics.js +1 -1
- package/dist/lib/native-hardware/hid-native.d.ts +2 -2
- package/dist/lib/native-hardware/hid-native.js +3 -3
- package/dist/lib/native-hardware/hid.js +4 -4
- package/dist/lib/native-hardware/index.d.ts +37 -37
- package/dist/lib/native-hardware/index.js +20 -20
- package/dist/lib/native-hardware/local-authentication.d.ts +1 -1
- package/dist/lib/native-hardware/local-authentication.js +1 -1
- package/dist/lib/native-hardware/location.js +1 -1
- package/dist/lib/native-hardware/media-permissions.d.ts +1 -1
- package/dist/lib/native-hardware/media-permissions.js +1 -1
- package/dist/lib/native-hardware/media.d.ts +1 -1
- package/dist/lib/native-hardware/media.js +1 -1
- package/dist/lib/native-hardware/midi-access.d.ts +1 -1
- package/dist/lib/native-hardware/midi-access.js +2 -2
- package/dist/lib/native-hardware/midi-internal.d.ts +1 -1
- package/dist/lib/native-hardware/midi-internal.js +1 -1
- package/dist/lib/native-hardware/midi-native-fallback.d.ts +1 -1
- package/dist/lib/native-hardware/midi-native-fallback.js +2 -2
- package/dist/lib/native-hardware/midi-ports.d.ts +1 -1
- package/dist/lib/native-hardware/midi-ports.js +1 -1
- package/dist/lib/native-hardware/midi.d.ts +5 -5
- package/dist/lib/native-hardware/midi.js +3 -3
- package/dist/lib/native-hardware/native-device-io.d.ts +1 -1
- package/dist/lib/native-hardware/native-device-io.js +1 -1
- package/dist/lib/native-hardware/native-device-lifecycle.js +1 -1
- package/dist/lib/native-hardware/notifications.d.ts +2 -2
- package/dist/lib/native-hardware/notifications.js +1 -1
- package/dist/lib/native-hardware/power-session.d.ts +2 -2
- package/dist/lib/native-hardware/power-session.js +1 -1
- package/dist/lib/native-hardware/secure-storage.d.ts +1 -1
- package/dist/lib/native-hardware/secure-storage.js +1 -1
- package/dist/lib/native-hardware/serial-native.d.ts +2 -2
- package/dist/lib/native-hardware/serial-native.js +3 -3
- package/dist/lib/native-hardware/serial.js +4 -4
- package/dist/lib/native-hardware/system-audio.d.ts +1 -1
- package/dist/lib/native-hardware/system-audio.js +1 -1
- package/dist/lib/native-hardware/usb-native.d.ts +2 -2
- package/dist/lib/native-hardware/usb-native.js +3 -3
- package/dist/lib/native-hardware/usb.js +4 -4
- package/dist/lib/theme.js +1 -1
- package/docs/README.md +1 -0
- package/docs/design-tokens.md +28 -6
- package/docs/foundations.md +4 -2
- package/docs/visual-regression.md +78 -0
- package/package.json +15 -4
- package/src/components/ui/alert-dialog.md +27 -0
- package/src/components/ui/button.md +10 -3
- package/src/components/ui/confirm-dialog.md +97 -0
- package/src/components/ui/context-menu.md +158 -0
- package/src/components/ui/dialog.md +23 -4
- package/src/components/ui/dropdown-menu.md +165 -0
- package/src/components/ui/error-boundary-view.md +98 -0
- package/src/components/ui/hover-card.md +90 -0
- package/src/components/ui/select.md +111 -0
- package/src/lib/host-date-time-picker.md +29 -0
- package/src/lib/host-file-dialog.md +76 -0
- package/src/lib/host-native-menu.md +67 -0
- package/src/lib/host-share.md +36 -0
- package/src/lib/host-web-surface.md +66 -0
- package/src/styles/index.css +141 -68
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { toNativeMenuItems, useHostNativeMenu, } from '../../lib/host-native-menu.js';
|
|
5
|
+
import { Kbd } from './kbd.js';
|
|
6
|
+
const SHORTCUT_MODIFIER_LABELS = {
|
|
7
|
+
cmd: '⌘',
|
|
8
|
+
shift: '⇧',
|
|
9
|
+
alt: '⌥',
|
|
10
|
+
ctrl: '⌃',
|
|
11
|
+
};
|
|
12
|
+
export function useDeclarativeMenuState({ items, onSelectItem, open, defaultOpen, onOpenChange, onFallback, }) {
|
|
13
|
+
const { available: nativeAvailable, open: openNativeMenu } = useHostNativeMenu();
|
|
14
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen ?? false);
|
|
15
|
+
const [nativeOpen, setNativeOpen] = React.useState(false);
|
|
16
|
+
const nativeOpenRef = React.useRef(false);
|
|
17
|
+
const onPortableOpenChange = React.useCallback((nextOpen) => {
|
|
18
|
+
if (open === undefined)
|
|
19
|
+
setUncontrolledOpen(nextOpen);
|
|
20
|
+
onOpenChange?.(nextOpen);
|
|
21
|
+
}, [onOpenChange, open]);
|
|
22
|
+
const requestNativeMenu = React.useCallback((options) => {
|
|
23
|
+
if (!items || !nativeAvailable)
|
|
24
|
+
return false;
|
|
25
|
+
if (nativeOpenRef.current)
|
|
26
|
+
return true;
|
|
27
|
+
nativeOpenRef.current = true;
|
|
28
|
+
setNativeOpen(true);
|
|
29
|
+
if (open === undefined)
|
|
30
|
+
setUncontrolledOpen(false);
|
|
31
|
+
else if (open)
|
|
32
|
+
onOpenChange?.(false);
|
|
33
|
+
void openNativeMenu(toNativeMenuItems(items), options)
|
|
34
|
+
.then((result) => {
|
|
35
|
+
if (result.status === 'completed') {
|
|
36
|
+
onSelectItem?.(result.selectedId);
|
|
37
|
+
}
|
|
38
|
+
else if (result.status === 'fallback') {
|
|
39
|
+
if (onFallback)
|
|
40
|
+
onFallback();
|
|
41
|
+
else
|
|
42
|
+
onPortableOpenChange(true);
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
.catch((error) => {
|
|
46
|
+
console.error('Native menu request failed; opening portable menu.', error);
|
|
47
|
+
if (onFallback)
|
|
48
|
+
onFallback();
|
|
49
|
+
else
|
|
50
|
+
onPortableOpenChange(true);
|
|
51
|
+
})
|
|
52
|
+
.finally(() => {
|
|
53
|
+
nativeOpenRef.current = false;
|
|
54
|
+
setNativeOpen(false);
|
|
55
|
+
});
|
|
56
|
+
return true;
|
|
57
|
+
}, [
|
|
58
|
+
items,
|
|
59
|
+
nativeAvailable,
|
|
60
|
+
onOpenChange,
|
|
61
|
+
onFallback,
|
|
62
|
+
onPortableOpenChange,
|
|
63
|
+
onSelectItem,
|
|
64
|
+
openNativeMenu,
|
|
65
|
+
open,
|
|
66
|
+
]);
|
|
67
|
+
return {
|
|
68
|
+
nativeOpen,
|
|
69
|
+
portableOpen: nativeOpen ? false : (open ?? uncontrolledOpen),
|
|
70
|
+
onPortableOpenChange,
|
|
71
|
+
requestNativeMenu,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export function formatMenuShortcut(shortcut) {
|
|
75
|
+
if (!shortcut)
|
|
76
|
+
return null;
|
|
77
|
+
const modifiers = shortcut.modifiers
|
|
78
|
+
?.map((modifier) => SHORTCUT_MODIFIER_LABELS[modifier])
|
|
79
|
+
.join('');
|
|
80
|
+
const key = shortcut.key.length === 1 ? shortcut.key.toUpperCase() : shortcut.key;
|
|
81
|
+
return `${modifiers ?? ''}${key}`;
|
|
82
|
+
}
|
|
83
|
+
export function MenuItemContents({ item, shortcutSlot, }) {
|
|
84
|
+
const Icon = item.icon;
|
|
85
|
+
const shortcut = formatMenuShortcut(item.shortcut);
|
|
86
|
+
return (_jsxs(_Fragment, { children: [Icon ? _jsx(Icon, { "aria-hidden": "true" }) : null, _jsx("span", { children: item.label }), shortcut ? (_jsx("span", { "data-slot": shortcutSlot, className: "text-muted-foreground text-ui-caption ml-auto tracking-widest", children: _jsx(Kbd, { children: shortcut }) })) : null] }));
|
|
87
|
+
}
|
|
88
|
+
export function hasMenuContentChild(children, contentType) {
|
|
89
|
+
return React.Children.toArray(children).some((child) => {
|
|
90
|
+
if (!React.isValidElement(child))
|
|
91
|
+
return false;
|
|
92
|
+
if (child.type === contentType)
|
|
93
|
+
return true;
|
|
94
|
+
if (child.type !== React.Fragment)
|
|
95
|
+
return false;
|
|
96
|
+
return hasMenuContentChild(child.props.children, contentType);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
export function withoutMenuContentChild(children, contentType) {
|
|
100
|
+
return React.Children.map(children, (child) => {
|
|
101
|
+
if (!React.isValidElement(child))
|
|
102
|
+
return child;
|
|
103
|
+
if (child.type === contentType)
|
|
104
|
+
return null;
|
|
105
|
+
if (child.type !== React.Fragment)
|
|
106
|
+
return child;
|
|
107
|
+
const fragmentChildren = child.props
|
|
108
|
+
.children;
|
|
109
|
+
return React.cloneElement(child, undefined, withoutMenuContentChild(fragmentChildren, contentType));
|
|
110
|
+
});
|
|
111
|
+
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
4
4
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
6
|
function Menubar({ className, ...props }) {
|
|
7
|
-
return (_jsx(MenubarPrimitive.Root, { "data-slot": "menubar", className: cn('bg-background shadow-xs flex h-
|
|
7
|
+
return (_jsx(MenubarPrimitive.Root, { "data-slot": "menubar", className: cn('bg-background shadow-xs rounded-group flex h-control-md items-center gap-control-gap border p-1', className), ...props }));
|
|
8
8
|
}
|
|
9
9
|
function MenubarMenu({ ...props }) {
|
|
10
10
|
return _jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
@@ -19,36 +19,36 @@ function MenubarRadioGroup({ ...props }) {
|
|
|
19
19
|
return (_jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props }));
|
|
20
20
|
}
|
|
21
21
|
function MenubarTrigger({ className, ...props }) {
|
|
22
|
-
return (_jsx(MenubarPrimitive.Trigger, { "data-slot": "menubar-trigger", className: cn('focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground outline-hidden flex select-none items-center
|
|
22
|
+
return (_jsx(MenubarPrimitive.Trigger, { "data-slot": "menubar-trigger", className: cn('focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground outline-hidden rounded-control text-ui-body flex select-none items-center px-2 py-1 font-medium', className), ...props }));
|
|
23
23
|
}
|
|
24
24
|
function MenubarContent({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }) {
|
|
25
|
-
return (_jsx(MenubarPortal, { children: _jsx(MenubarPrimitive.Content, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-menubar-content-transform-origin) z-50 min-w-[12rem] overflow-hidden
|
|
25
|
+
return (_jsx(MenubarPortal, { children: _jsx(MenubarPrimitive.Content, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-menubar-content-transform-origin) rounded-overlay shadow-overlay z-50 min-w-[12rem] overflow-hidden border p-1', className), ...props }) }));
|
|
26
26
|
}
|
|
27
27
|
function MenubarItem({ className, inset, variant = 'default', ...props }) {
|
|
28
|
-
return (_jsx(MenubarPrimitive.Item, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2
|
|
28
|
+
return (_jsx(MenubarPrimitive.Item, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden rounded-control text-ui-body relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props }));
|
|
29
29
|
}
|
|
30
30
|
function MenubarCheckboxItem({ className, children, checked, ...props }) {
|
|
31
|
-
return (_jsxs(MenubarPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground rounded-
|
|
31
|
+
return (_jsxs(MenubarPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground rounded-control outline-hidden text-ui-body relative flex cursor-default select-none items-center gap-2 py-1.5 pl-8 pr-2 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
32
32
|
}
|
|
33
33
|
function MenubarRadioItem({ className, children, ...props }) {
|
|
34
|
-
return (_jsxs(MenubarPrimitive.RadioItem, { "data-slot": "menubar-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground rounded-
|
|
34
|
+
return (_jsxs(MenubarPrimitive.RadioItem, { "data-slot": "menubar-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground rounded-control outline-hidden text-ui-body relative flex cursor-default select-none items-center gap-2 py-1.5 pl-8 pr-2 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
35
35
|
}
|
|
36
36
|
function MenubarLabel({ className, inset, ...props }) {
|
|
37
|
-
return (_jsx(MenubarPrimitive.Label, { "data-slot": "menubar-label", "data-inset": inset, className: cn('px-2 py-1.5
|
|
37
|
+
return (_jsx(MenubarPrimitive.Label, { "data-slot": "menubar-label", "data-inset": inset, className: cn('text-ui-body px-2 py-1.5 font-medium data-[inset]:pl-8', className), ...props }));
|
|
38
38
|
}
|
|
39
39
|
function MenubarSeparator({ className, ...props }) {
|
|
40
40
|
return (_jsx(MenubarPrimitive.Separator, { "data-slot": "menubar-separator", className: cn('bg-border -mx-1 my-1 h-px', className), ...props }));
|
|
41
41
|
}
|
|
42
42
|
function MenubarShortcut({ className, ...props }) {
|
|
43
|
-
return (_jsx("span", { "data-slot": "menubar-shortcut", className: cn('text-muted-foreground ml-auto
|
|
43
|
+
return (_jsx("span", { "data-slot": "menubar-shortcut", className: cn('text-muted-foreground text-ui-caption ml-auto tracking-widest', className), ...props }));
|
|
44
44
|
}
|
|
45
45
|
function MenubarSub({ ...props }) {
|
|
46
46
|
return _jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
47
47
|
}
|
|
48
48
|
function MenubarSubTrigger({ className, inset, children, ...props }) {
|
|
49
|
-
return (_jsxs(MenubarPrimitive.SubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, className: cn('focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center
|
|
49
|
+
return (_jsxs(MenubarPrimitive.SubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, className: cn('focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground rounded-control text-ui-body flex cursor-default select-none items-center px-2 py-1.5 outline-none data-[inset]:pl-8', className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })] }));
|
|
50
50
|
}
|
|
51
51
|
function MenubarSubContent({ className, ...props }) {
|
|
52
|
-
return (_jsx(MenubarPrimitive.SubContent, { "data-slot": "menubar-sub-content", className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-menubar-content-transform-origin) z-50 min-w-[8rem] overflow-hidden
|
|
52
|
+
return (_jsx(MenubarPrimitive.SubContent, { "data-slot": "menubar-sub-content", className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-menubar-content-transform-origin) rounded-overlay shadow-overlay z-50 min-w-[8rem] overflow-hidden border p-1', className), ...props }));
|
|
53
53
|
}
|
|
54
54
|
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MessageScrollerPolicy } from './message-scroller-policy';
|
|
1
|
+
import { MessageScrollerPolicy } from './message-scroller-policy.js';
|
|
2
2
|
export type MessageScrollerDefaultScrollPosition = 'start' | 'end' | 'last-anchor';
|
|
3
3
|
export type MessageScrollerScrollAlign = 'start' | 'center' | 'end' | 'nearest';
|
|
4
4
|
export type MessageScrollerScrollOptions = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MessageScrollerDefaultScrollPosition, type MessageScrollerScrollAlign, type MessageScrollerScrollOptions, type MessageScrollerScrollable, type MessageScrollerVisibilityState } from './message-scroller-controller';
|
|
2
|
+
import { type MessageScrollerDefaultScrollPosition, type MessageScrollerScrollAlign, type MessageScrollerScrollOptions, type MessageScrollerScrollable, type MessageScrollerVisibilityState } from './message-scroller-controller.js';
|
|
3
3
|
type MessageScrollerProviderProps = {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
autoScroll?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { MessageScrollerController, } from './message-scroller-controller';
|
|
4
|
+
import { MessageScrollerController, } from './message-scroller-controller.js';
|
|
5
5
|
/**
|
|
6
6
|
* The transcript scroller primitive, owned in-repo. Drop-in compatible with
|
|
7
7
|
* the `@shadcn/react/message-scroller` surface it replaces, but built around
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button } from './button';
|
|
3
|
-
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from './message-scroller-primitive';
|
|
2
|
+
import { Button } from './button.js';
|
|
3
|
+
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from './message-scroller-primitive.js';
|
|
4
4
|
declare function MessageScrollerProvider(props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function MessageScroller({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function MessageScrollerViewport({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowDown } from 'lucide-react';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { Button } from './button';
|
|
6
|
-
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, } from './message-scroller-primitive';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { Button } from './button.js';
|
|
6
|
+
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, } from './message-scroller-primitive.js';
|
|
7
7
|
function MessageScrollerProvider(props) {
|
|
8
8
|
return _jsx(MessageScrollerPrimitive.Provider, { ...props });
|
|
9
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ButtonGroup } from './button-group';
|
|
3
|
-
import { type IconButtonProps, type IconButtonSize } from './icon-button';
|
|
2
|
+
import { ButtonGroup } from './button-group.js';
|
|
3
|
+
import { type IconButtonProps, type IconButtonSize } from './icon-button.js';
|
|
4
4
|
export interface NavigationButtonGroupProps extends Omit<React.ComponentProps<typeof ButtonGroup>, 'children' | 'orientation'> {
|
|
5
5
|
canGoBack?: boolean;
|
|
6
6
|
canGoForward?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
|
|
4
|
-
import { ButtonGroup } from './button-group';
|
|
5
|
-
import { IconButton, } from './icon-button';
|
|
4
|
+
import { ButtonGroup } from './button-group.js';
|
|
5
|
+
import { IconButton, } from './icon-button.js';
|
|
6
6
|
function NavigationButtonGroup({ canGoBack = true, canGoForward = true, onBack, onForward, backLabel = 'Go back', forwardLabel = 'Go forward', size = 'sm', variant = 'ghost', 'aria-label': ariaLabel = 'Navigation', ...props }) {
|
|
7
7
|
return (_jsxs(ButtonGroup, { "aria-label": ariaLabel, orientation: "horizontal", ...props, children: [_jsx(IconButton, { label: backLabel, tooltip: true, size: size, variant: variant, disabled: !canGoBack, onClick: onBack, children: _jsx(ChevronLeftIcon, {}) }), _jsx(IconButton, { label: forwardLabel, tooltip: true, size: size, variant: variant, disabled: !canGoForward, onClick: onForward, children: _jsx(ChevronRightIcon, {}) })] }));
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
4
4
|
import { ChevronDownIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
7
|
function NavigationMenu({ className, children, viewport = true, ...props }) {
|
|
8
8
|
return (_jsxs(NavigationMenuPrimitive.Root, { "data-slot": "navigation-menu", "data-viewport": viewport, className: cn('group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', className), ...props, children: [children, viewport && _jsx(NavigationMenuViewport, {})] }));
|
|
@@ -13,20 +13,20 @@ function NavigationMenuList({ className, ...props }) {
|
|
|
13
13
|
function NavigationMenuItem({ className, ...props }) {
|
|
14
14
|
return (_jsx(NavigationMenuPrimitive.Item, { "data-slot": "navigation-menu-item", className: cn('relative', className), ...props }));
|
|
15
15
|
}
|
|
16
|
-
const navigationMenuTriggerStyle = cva('group inline-flex h-
|
|
16
|
+
const navigationMenuTriggerStyle = cva('group inline-flex h-control-md w-max items-center justify-center rounded-control bg-background px-control-inline text-ui-body font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring outline-none transition-[color,box-shadow] focus-visible:ring-1');
|
|
17
17
|
function NavigationMenuTrigger({ className, children, ...props }) {
|
|
18
18
|
return (_jsxs(NavigationMenuPrimitive.Trigger, { "data-slot": "navigation-menu-trigger", className: cn(navigationMenuTriggerStyle(), 'group', className), ...props, children: [children, ' ', _jsx(ChevronDownIcon, { className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180", "aria-hidden": "true" })] }));
|
|
19
19
|
}
|
|
20
20
|
function NavigationMenuContent({ className, ...props }) {
|
|
21
|
-
return (_jsx(NavigationMenuPrimitive.Content, { "data-slot": "navigation-menu-content", className: cn('data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 left-0 top-0 w-full p-2 pr-2.5 md:absolute md:w-auto', 'group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0
|
|
21
|
+
return (_jsx(NavigationMenuPrimitive.Content, { "data-slot": "navigation-menu-content", className: cn('data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 left-0 top-0 w-full p-2 pr-2.5 md:absolute md:w-auto', 'group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-overlay group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:rounded-overlay group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:duration-200', className), ...props }));
|
|
22
22
|
}
|
|
23
23
|
function NavigationMenuViewport({ className, ...props }) {
|
|
24
|
-
return (_jsx("div", { className: cn('absolute left-0 top-full isolate z-50 flex justify-center'), children: _jsx(NavigationMenuPrimitive.Viewport, { "data-slot": "navigation-menu-viewport", className: cn('origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden
|
|
24
|
+
return (_jsx("div", { className: cn('absolute left-0 top-full isolate z-50 flex justify-center'), children: _jsx(NavigationMenuPrimitive.Viewport, { "data-slot": "navigation-menu-viewport", className: cn('origin-top-center bg-popover text-popover-foreground shadow-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 rounded-overlay relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden border md:w-[var(--radix-navigation-menu-viewport-width)]', className), ...props }) }));
|
|
25
25
|
}
|
|
26
26
|
function NavigationMenuLink({ className, ...props }) {
|
|
27
|
-
return (_jsx(NavigationMenuPrimitive.Link, { "data-slot": "navigation-menu-link", className: cn("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring
|
|
27
|
+
return (_jsx(NavigationMenuPrimitive.Link, { "data-slot": "navigation-menu-link", className: cn("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring [&_svg:not([class*='text-'])]:text-muted-foreground rounded-control text-ui-body flex flex-col gap-1 p-2 outline-none transition-all focus-visible:ring-1 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
28
28
|
}
|
|
29
29
|
function NavigationMenuIndicator({ className, ...props }) {
|
|
30
|
-
return (_jsx(NavigationMenuPrimitive.Indicator, { "data-slot": "navigation-menu-indicator", className: cn('data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden', className), ...props, children: _jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45
|
|
30
|
+
return (_jsx(NavigationMenuPrimitive.Indicator, { "data-slot": "navigation-menu-indicator", className: cn('data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden', className), ...props, children: _jsx("div", { className: "bg-border rounded-tl-control relative top-[60%] h-2 w-2 rotate-45 shadow-md" }) }));
|
|
31
31
|
}
|
|
32
32
|
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
4
|
function NotificationDot({ className, ...props }) {
|
|
5
|
-
return (_jsx("span", { "aria-hidden": "true", "data-slot": "notification-dot", className: cn('bg-
|
|
5
|
+
return (_jsx("span", { "aria-hidden": "true", "data-slot": "notification-dot", className: cn('bg-info rounded-pill inline-block size-1.5 shrink-0', className), ...props }));
|
|
6
6
|
}
|
|
7
7
|
export { NotificationDot };
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
import { Button } from './button';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { Button } from './button.js';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
|
-
const numberInputVariants = cva('border-input bg-transparent focus-
|
|
8
|
+
const numberInputVariants = cva('border-input bg-transparent has-[:focus-visible]:border-ring has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-ring flex items-stretch overflow-hidden rounded-control border shadow-xs transition-[color,box-shadow] has-[[aria-invalid=true]]:border-destructive', {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: 'bg-background',
|
|
12
12
|
filled: 'bg-muted/60 border-transparent shadow-none',
|
|
13
13
|
},
|
|
14
14
|
size: {
|
|
15
|
-
sm: 'h-
|
|
16
|
-
default: 'h-
|
|
17
|
-
lg: 'h-
|
|
15
|
+
sm: 'h-control-sm',
|
|
16
|
+
default: 'h-control-md',
|
|
17
|
+
lg: 'h-control-lg',
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
defaultVariants: {
|
|
@@ -46,11 +46,11 @@ function NumberInput({ className, value, defaultValue, onValueChange, unit, step
|
|
|
46
46
|
}
|
|
47
47
|
commitValue(nextValue);
|
|
48
48
|
}, [commitValue, currentValue, max, min, step]);
|
|
49
|
-
return (_jsxs("div", { "data-slot": "number-input", "data-size": size ?? 'default', "data-variant": variant ?? 'default', className: cn(numberInputVariants({ variant, size }), className), children: [_jsx("input", { "data-slot": "number-input-field", type: "number", value: currentValue ?? '', min: min, max: max, step: step, disabled: disabled, className: "placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent px-
|
|
49
|
+
return (_jsxs("div", { "data-slot": "number-input", "data-size": size ?? 'default', "data-variant": variant ?? 'default', className: cn(numberInputVariants({ variant, size }), className), children: [_jsx("input", { "data-slot": "number-input-field", type: "number", value: currentValue ?? '', min: min, max: max, step: step, disabled: disabled, className: "placeholder:text-muted-foreground text-ui-body min-w-0 flex-1 bg-transparent px-control-inline outline-none disabled:cursor-not-allowed", onChange: (event) => {
|
|
50
50
|
const nextValue = event.currentTarget.value === ''
|
|
51
51
|
? null
|
|
52
52
|
: event.currentTarget.valueAsNumber;
|
|
53
53
|
commitValue(Number.isNaN(nextValue) ? null : nextValue);
|
|
54
|
-
}, ...props }), unit ? (_jsx("span", { "data-slot": "number-input-unit", className: "text-muted-foreground flex shrink-0 items-center pr-2
|
|
54
|
+
}, ...props }), unit ? (_jsx("span", { "data-slot": "number-input-unit", className: "text-muted-foreground text-ui-caption flex shrink-0 items-center pr-2", children: unit })) : null, steppers ? (_jsxs("span", { "data-slot": "number-input-steppers", className: "border-border/70 flex shrink-0 items-center border-l px-1", children: [_jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", disabled: disabled, "aria-label": "Increase value", className: "rounded-none", onClick: () => changeByStep(1), children: _jsx(ChevronUpIcon, {}) }), _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", disabled: disabled, "aria-label": "Decrease value", className: "rounded-none", onClick: () => changeByStep(-1), children: _jsx(ChevronDownIcon, {}) })] })) : null] }));
|
|
55
55
|
}
|
|
56
56
|
export { NumberInput, numberInputVariants };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type Button } from './button';
|
|
2
|
+
import { type Button } from './button.js';
|
|
3
3
|
declare function Pagination({ className, ...props }: React.ComponentProps<'nav'>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function PaginationItem({ ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon, } from 'lucide-react';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { buttonVariants } from './button';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { buttonVariants } from './button.js';
|
|
6
6
|
function Pagination({ className, ...props }) {
|
|
7
7
|
return (_jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn('mx-auto flex w-full justify-center', className), ...props }));
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const panelVariants: (props?: ({
|
|
4
|
-
surface?: "default" | "
|
|
4
|
+
surface?: "default" | "muted" | "sidebar" | "transparent" | null | undefined;
|
|
5
5
|
border?: "all" | "none" | "inline" | "block" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface PanelGroupProps extends React.ComponentProps<'div'> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
const panelVariants = cva('flex min-h-0 min-w-0 flex-col overflow-hidden', {
|
|
6
6
|
variants: {
|
|
@@ -29,12 +29,12 @@ function Panel({ surface, border, className, ...props }) {
|
|
|
29
29
|
return (_jsx("section", { "data-slot": "panel", "data-surface": surface ?? 'default', className: cn(panelVariants({ surface, border }), className), ...props }));
|
|
30
30
|
}
|
|
31
31
|
function PanelHeader({ className, ...props }) {
|
|
32
|
-
return (_jsx("header", { "data-slot": "panel-header", className: cn('border-border/70 flex min-h-
|
|
32
|
+
return (_jsx("header", { "data-slot": "panel-header", className: cn('border-border/70 flex min-h-row shrink-0 items-center gap-control-gap border-b px-control-inline py-1', className), ...props }));
|
|
33
33
|
}
|
|
34
34
|
function PanelContent({ className, ...props }) {
|
|
35
35
|
return (_jsx("div", { "data-slot": "panel-content", className: cn('min-h-0 min-w-0 flex-1 overflow-auto', className), ...props }));
|
|
36
36
|
}
|
|
37
37
|
function PanelFooter({ className, ...props }) {
|
|
38
|
-
return (_jsx("footer", { "data-slot": "panel-footer", className: cn('border-border/70 flex shrink-0 items-center gap-
|
|
38
|
+
return (_jsx("footer", { "data-slot": "panel-footer", className: cn('border-border/70 flex min-h-row shrink-0 items-center gap-control-gap border-t px-control-inline py-1', className), ...props }));
|
|
39
39
|
}
|
|
40
40
|
export { Panel, PanelContent, PanelFooter, PanelGroup, PanelHeader, panelVariants, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { type MaterialVariant } from './material';
|
|
3
|
+
import { type MaterialVariant } from './material.js';
|
|
4
4
|
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function PopoverPortal({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { Material } from './material';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { Material } from './material.js';
|
|
6
6
|
function Popover({ ...props }) {
|
|
7
7
|
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
8
8
|
}
|
|
@@ -22,7 +22,7 @@ function PopoverAnchor({ ...props }) {
|
|
|
22
22
|
return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
23
23
|
}
|
|
24
24
|
function PopoverHeader({ className, ...props }) {
|
|
25
|
-
return (_jsx("div", { "data-slot": "popover-header", className: cn('flex flex-col gap-1
|
|
25
|
+
return (_jsx("div", { "data-slot": "popover-header", className: cn('text-ui-body flex flex-col gap-1', className), ...props }));
|
|
26
26
|
}
|
|
27
27
|
function PopoverTitle({ className, ...props }) {
|
|
28
28
|
return (_jsx("h2", { "data-slot": "popover-title", className: cn('font-medium', className), ...props }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
5
|
function Progress({ className, value, ...props }) {
|
|
6
|
-
return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress", className: cn('bg-primary/20 relative h-2 w-full overflow-hidden
|
|
6
|
+
return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress", className: cn('bg-primary/20 rounded-pill relative h-2 w-full overflow-hidden', className), ...props, children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "bg-primary h-full w-full flex-1 transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) }));
|
|
7
7
|
}
|
|
8
8
|
export { Progress };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAElE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,2CAQvD;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAElE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,2CAQvD;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,2CAmBvD;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
4
4
|
import { CircleIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
6
|
function RadioGroup({ className, ...props }) {
|
|
7
7
|
return (_jsx(RadioGroupPrimitive.Root, { "data-slot": "radio-group", className: cn('grid gap-3', className), ...props }));
|
|
8
8
|
}
|
|
9
9
|
function RadioGroupItem({ className, ...props }) {
|
|
10
|
-
return (_jsx(RadioGroupPrimitive.Item, { "data-slot": "radio-group-item", className: cn('
|
|
10
|
+
return (_jsx(RadioGroupPrimitive.Item, { "data-slot": "radio-group-item", className: cn('group/radio text-primary focus-visible:border-ring focus-visible:ring-ring aria-invalid:before:border-destructive rounded-pill relative size-control-xs shrink-0 cursor-pointer border border-transparent bg-transparent p-1 outline-none transition-[color,box-shadow] before:pointer-events-none before:absolute before:left-1/2 before:top-1/2 before:size-4 before:-translate-x-1/2 before:-translate-y-1/2 before:rounded-pill before:border before:border-input before:bg-transparent before:shadow-xs dark:before:bg-input/30 focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { forceMount: true, "data-slot": "radio-group-indicator", className: "pointer-events-none absolute left-1/2 top-1/2 z-10 flex size-4 -translate-x-1/2 -translate-y-1/2 items-center justify-center group-data-[state=unchecked]/radio:opacity-0", children: _jsx(CircleIcon, { className: "fill-primary absolute left-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2" }) }) }));
|
|
11
11
|
}
|
|
12
12
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type GroupProps, type PanelProps, type SeparatorProps } from 'react-resizable-panels';
|
|
2
|
-
declare function ResizablePanelGroup({ className, ...props }: GroupProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function ResizablePanelGroup({ className, elementRef, ...props }: GroupProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
type ResizablePanelProps = PanelProps & {
|
|
4
4
|
groupResizeBehavior?: string;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizable.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,UAAU,EAEf,KAAK,UAAU,EAEf,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAA;AAG/B,iBAAS,mBAAmB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizable.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,UAAU,EAEf,KAAK,UAAU,EAEf,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAA;AAG/B,iBAAS,mBAAmB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAwB3E;AAED,KAAK,mBAAmB,GAAG,UAAU,GAAG;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAA;AAED,iBAAS,cAAc,CAAC,EACtB,mBAAmB,EAAE,oBAAoB,EACzC,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAErB;AAED,iBAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,2CAiBA;AAED,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { GripVerticalIcon } from 'lucide-react';
|
|
4
|
+
import * as React from 'react';
|
|
4
5
|
import { Group, Panel, Separator, } from 'react-resizable-panels';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
function ResizablePanelGroup({ className, ...props }) {
|
|
7
|
-
|
|
6
|
+
import { cn } from '../../lib/utils.js';
|
|
7
|
+
function ResizablePanelGroup({ className, elementRef, ...props }) {
|
|
8
|
+
const setElementRef = React.useCallback((element) => {
|
|
9
|
+
// react-resizable-panels 4.4.1 emits aria-orientation on a generic
|
|
10
|
+
// container, where the attribute is invalid. Orientation belongs on
|
|
11
|
+
// the focusable separator rendered by ResizableHandle.
|
|
12
|
+
element?.removeAttribute('aria-orientation');
|
|
13
|
+
if (typeof elementRef === 'function')
|
|
14
|
+
elementRef(element);
|
|
15
|
+
else if (elementRef)
|
|
16
|
+
elementRef.current = element;
|
|
17
|
+
}, [elementRef]);
|
|
18
|
+
return (_jsx(Group, { "data-slot": "resizable-panel-group", elementRef: setElementRef, className: cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className), ...props }));
|
|
8
19
|
}
|
|
9
20
|
function ResizablePanel({ groupResizeBehavior: _groupResizeBehavior, ...props }) {
|
|
10
21
|
return _jsx(Panel, { "data-slot": "resizable-panel", ...props });
|
|
11
22
|
}
|
|
12
23
|
function ResizableHandle({ withHandle, className, ...props }) {
|
|
13
|
-
return (_jsx(Separator, { "data-slot": "resizable-handle", className: cn('bg-border focus-visible:ring-ring focus-visible:outline-hidden relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90', className), ...props, children: withHandle && (_jsx("div", { className: "bg-border rounded-
|
|
24
|
+
return (_jsx(Separator, { "data-slot": "resizable-handle", className: cn('bg-border focus-visible:ring-ring focus-visible:outline-hidden relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90', className), ...props, children: withHandle && (_jsx("div", { className: "bg-border rounded-control z-10 flex h-4 w-3 items-center justify-center border", children: _jsx(GripVerticalIcon, { className: "size-2.5" }) })) }));
|
|
14
25
|
}
|
|
15
26
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,oBAAoB,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,MAAM,CAAA;AAEvE,UAAU,eACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACvE,UAAU,CAAC,EAAE,oBAAoB,CAAA;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,oBAAoB,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,MAAM,CAAA;AAEvE,UAAU,eACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACvE,UAAU,CAAC,EAAE,oBAAoB,CAAA;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,QAAA,MAAM,UAAU,wFA+Cf,CAAA;AAGD,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,2CAqBtE;AAED,OAAO,EACL,UAAU,EACV,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,CAAA"}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
6
|
const ScrollArea = React.forwardRef(({ className, children, safeBottom = false, scrollbars = 'vertical', viewportClassName, ...props }, ref) => {
|
|
7
7
|
const hasVertical = scrollbars === 'vertical' || scrollbars === 'both';
|
|
8
8
|
const hasHorizontal = scrollbars === 'horizontal' || scrollbars === 'both';
|
|
9
|
-
return (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, "data-slot": "scroll-area", "data-scrollbars": scrollbars, className: cn('relative', className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", "data-safe-bottom": safeBottom || undefined, className: cn('focus-visible:ring-ring
|
|
9
|
+
return (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, "data-slot": "scroll-area", "data-scrollbars": scrollbars, className: cn('relative', className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", "data-safe-bottom": safeBottom || undefined, tabIndex: 0, className: cn('focus-visible:ring-ring size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-1', safeBottom &&
|
|
10
10
|
'pb-[calc(var(--chat-safe-padding,0px)+var(--density-pane-padding))]', viewportClassName), children: children }), hasVertical ? _jsx(ScrollBar, { orientation: "vertical" }) : null, hasHorizontal ? _jsx(ScrollBar, { orientation: "horizontal" }) : null, hasVertical && hasHorizontal ? (_jsx(ScrollAreaPrimitive.Corner, { "data-slot": "scroll-area-corner" })) : null] }));
|
|
11
11
|
});
|
|
12
12
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
13
13
|
function ScrollBar({ className, orientation = 'vertical', ...props }) {
|
|
14
14
|
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn('flex touch-none select-none p-px transition-colors', orientation === 'vertical' &&
|
|
15
15
|
'h-full w-2.5 border-l border-l-transparent', orientation === 'horizontal' &&
|
|
16
|
-
'h-2.5 flex-col border-t border-t-transparent', className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1
|
|
16
|
+
'h-2.5 flex-col border-t border-t-transparent', className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border rounded-pill relative flex-1" }) }));
|
|
17
17
|
}
|
|
18
18
|
export { ScrollArea, ScrollBar, };
|