@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
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { LoaderCircleIcon, SearchIcon, XIcon } from 'lucide-react';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
import { IconButton } from './icon-button';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { IconButton } from './icon-button.js';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
|
-
const searchFieldVariants = cva('group/search-field border-input focus-
|
|
8
|
+
const searchFieldVariants = cva('group/search-field border-input has-[:focus-visible]:border-ring has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-ring flex w-full min-w-0 items-center rounded-control border text-foreground shadow-xs transition-[background-color,border-color,box-shadow] has-[[aria-invalid=true]]:border-destructive', {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: 'bg-background',
|
|
12
12
|
filled: 'border-transparent bg-muted/70 shadow-none',
|
|
13
13
|
},
|
|
14
14
|
density: {
|
|
15
|
-
compact: 'h-
|
|
16
|
-
default: 'h-
|
|
17
|
-
comfortable: 'h-
|
|
15
|
+
compact: 'h-control-sm',
|
|
16
|
+
default: 'h-control-md',
|
|
17
|
+
comfortable: 'h-control-md',
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
defaultVariants: {
|
|
@@ -47,7 +47,7 @@ function SearchField({ className, inputClassName, value, defaultValue = '', onCh
|
|
|
47
47
|
inputRef.current?.focus();
|
|
48
48
|
}, [commitValue, currentValue, onClear]);
|
|
49
49
|
const iconSize = density === 'compact' ? 'size-3.5' : 'size-4';
|
|
50
|
-
return (_jsxs("div", { "data-slot": "search-field", "data-density": density, "data-variant": variant, "data-disabled": disabled || undefined, "data-readonly": readOnly || undefined, className: cn(searchFieldVariants({ variant, density }), disabled && 'cursor-not-allowed opacity-50', className), children: [_jsx("span", { "aria-hidden": "true", className: "text-muted-foreground pointer-events-none flex shrink-0 items-center pl-2.5", children: loading ? (_jsx(LoaderCircleIcon, { className: cn(iconSize, 'animate-spin') })) : (_jsx(SearchIcon, { className: iconSize })) }), _jsx("input", { ref: setRefs, "data-slot": "search-field-input", type: "search", value: currentValue, disabled: disabled, readOnly: readOnly, className: cn('placeholder:text-muted-foreground min-w-0 flex-1 appearance-none bg-transparent px-2
|
|
50
|
+
return (_jsxs("div", { "data-slot": "search-field", "data-density": density, "data-variant": variant, "data-disabled": disabled || undefined, "data-readonly": readOnly || undefined, className: cn(searchFieldVariants({ variant, density }), disabled && 'cursor-not-allowed opacity-50', className), children: [_jsx("span", { "aria-hidden": "true", className: "text-muted-foreground pointer-events-none flex shrink-0 items-center pl-2.5", children: loading ? (_jsx(LoaderCircleIcon, { className: cn(iconSize, 'animate-spin') })) : (_jsx(SearchIcon, { className: iconSize })) }), _jsx("input", { ref: setRefs, "data-slot": "search-field-input", type: "search", value: currentValue, disabled: disabled, readOnly: readOnly, className: cn('placeholder:text-muted-foreground text-ui-body min-w-0 flex-1 appearance-none bg-transparent px-2 outline-none [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden', density === 'compact' && 'text-ui-caption', inputClassName), onChange: (event) => {
|
|
51
51
|
onChange?.(event);
|
|
52
52
|
commitValue(event.currentTarget.value);
|
|
53
53
|
}, onKeyDown: (event) => {
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
|
-
const segmentedControlVariants = cva('inline-flex w-fit items-center overflow-x-auto rounded-
|
|
7
|
+
const segmentedControlVariants = cva('inline-flex w-fit items-center overflow-x-auto rounded-group p-0.5 text-muted-foreground', {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
muted: 'bg-muted/70',
|
|
11
11
|
outline: 'border border-border/80 bg-background shadow-xs',
|
|
12
12
|
},
|
|
13
13
|
density: {
|
|
14
|
-
compact: 'min-h-
|
|
15
|
-
default: 'min-h-
|
|
16
|
-
comfortable: 'min-h-
|
|
14
|
+
compact: 'min-h-control-sm',
|
|
15
|
+
default: 'min-h-control-md',
|
|
16
|
+
comfortable: 'min-h-control-sm',
|
|
17
17
|
},
|
|
18
18
|
fullWidth: {
|
|
19
19
|
true: 'flex w-full',
|
|
@@ -26,12 +26,12 @@ const segmentedControlVariants = cva('inline-flex w-fit items-center overflow-x-
|
|
|
26
26
|
fullWidth: false,
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
|
-
const segmentedControlItemVariants = cva('relative inline-flex cursor-pointer select-none items-center justify-center whitespace-nowrap rounded-
|
|
29
|
+
const segmentedControlItemVariants = cva('relative inline-flex cursor-pointer select-none items-center justify-center whitespace-nowrap rounded-control font-medium outline-none transition-[background-color,color,box-shadow] hover:bg-control-hover hover:text-foreground active:bg-control-pressed active:text-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:z-10 focus-visible:ring-1 focus-visible:ring-ring data-[state=checked]:bg-background data-[state=checked]:text-foreground data-[state=checked]:shadow-xs data-[state=checked]:hover:bg-control-hover data-[state=checked]:active:bg-control-pressed [&_svg]:pointer-events-none [&_svg]:shrink-0', {
|
|
30
30
|
variants: {
|
|
31
31
|
density: {
|
|
32
|
-
compact: 'min-h-6 gap-1 px-2 text-
|
|
33
|
-
default: 'min-h-7 gap-1.5 px-2.5 text-
|
|
34
|
-
comfortable: 'min-h-8 gap-1.5 px-3 text-
|
|
32
|
+
compact: 'min-h-6 gap-1 px-2 text-ui-caption [&_svg:not([class*="size-"])]:size-3',
|
|
33
|
+
default: 'min-h-7 gap-1.5 px-2.5 text-ui-body [&_svg:not([class*="size-"])]:size-3.5',
|
|
34
|
+
comfortable: 'min-h-8 gap-1.5 px-3 text-ui-body [&_svg:not([class*="size-"])]:size-4',
|
|
35
35
|
},
|
|
36
36
|
fullWidth: {
|
|
37
37
|
true: 'min-w-0 flex-1',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEpD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,K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AyB,EACzB,KAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CA+BtD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAWpD;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAqBnD;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,2CAQxD;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,cAAc,CAAC,2CAa7D;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,gBAAgB,CAAC,2CAa/D;AAED,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
4
4
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
6
|
function Select({ ...props }) {
|
|
7
7
|
return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
8
8
|
}
|
|
@@ -13,18 +13,18 @@ function SelectValue({ ...props }) {
|
|
|
13
13
|
return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
14
14
|
}
|
|
15
15
|
function SelectTrigger({ className, size = 'default', children, ...props }) {
|
|
16
|
-
return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring
|
|
16
|
+
return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 shadow-xs rounded-control text-ui-body flex w-fit items-center justify-between gap-control-gap whitespace-nowrap border bg-transparent px-control-inline outline-none transition-[color,box-shadow] focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-control-md data-[size=sm]:h-control-sm *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-control-gap [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })] }));
|
|
17
17
|
}
|
|
18
18
|
function SelectContent({ className, children, position = 'item-aligned', align = 'center', ...props }) {
|
|
19
|
-
return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { "data-slot": "select-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 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) relative z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden
|
|
20
|
-
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), position: position, align: align, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn('p-1', position === 'popper' &&
|
|
19
|
+
return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { "data-slot": "select-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 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) rounded-overlay shadow-overlay relative z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden border', position === 'popper' &&
|
|
20
|
+
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), position: position, align: align, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { role: "group", tabIndex: 0, className: cn('p-1', position === 'popper' &&
|
|
21
21
|
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
|
|
22
22
|
}
|
|
23
23
|
function SelectLabel({ className, ...props }) {
|
|
24
|
-
return (_jsx(SelectPrimitive.Label, { "data-slot": "select-label", className: cn('text-muted-foreground px-2 py-1.5
|
|
24
|
+
return (_jsx(SelectPrimitive.Label, { "data-slot": "select-label", className: cn('text-muted-foreground text-ui-caption px-2 py-1.5', className), ...props }));
|
|
25
25
|
}
|
|
26
26
|
function SelectItem({ className, children, ...props }) {
|
|
27
|
-
return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default select-none items-center gap-2
|
|
27
|
+
return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 rounded-control text-ui-body relative flex w-full cursor-default select-none items-center gap-2 py-1.5 pl-2 pr-8 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", { "data-slot": "select-item-indicator", className: "absolute right-2 flex size-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] }));
|
|
28
28
|
}
|
|
29
29
|
function SelectSeparator({ className, ...props }) {
|
|
30
30
|
return (_jsx(SelectPrimitive.Separator, { "data-slot": "select-separator", className: cn('bg-border pointer-events-none -mx-1 my-1 h-px', className), ...props }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
5
|
function Separator({ className, orientation = 'horizontal', decorative = true, ...props }) {
|
|
6
6
|
return (_jsx(SeparatorPrimitive.Root, { "data-slot": "separator", decorative: decorative, orientation: orientation, className: cn('bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px', className), ...props }));
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
import { XIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
6
|
function Sheet({ ...props }) {
|
|
7
7
|
return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
8
8
|
}
|
|
@@ -23,7 +23,7 @@ function SheetContent({ className, children, side = 'right', size = 'default', s
|
|
|
23
23
|
'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right bottom-[max(var(--window-content-inset-bottom),var(--chat-safe-padding))] right-[var(--window-content-inset-inline-end)] top-[var(--window-content-inset-top)] w-[min(90vw,28rem)] border-l data-[size=default]:max-w-sm data-[size=lg]:max-w-lg data-[size=sm]:max-w-xs', side === 'left' &&
|
|
24
24
|
'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left bottom-[max(var(--window-content-inset-bottom),var(--chat-safe-padding))] left-[var(--window-content-inset-inline-start)] top-[var(--window-content-inset-top)] w-[min(90vw,28rem)] border-r data-[size=default]:max-w-sm data-[size=lg]:max-w-lg data-[size=sm]:max-w-xs', side === 'top' &&
|
|
25
25
|
'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top left-[var(--window-content-inset-inline-start)] right-[var(--window-content-inset-inline-end)] top-[var(--window-content-inset-top)] max-h-[min(80dvh,calc(100dvh-var(--window-content-inset-top)-max(var(--window-content-inset-bottom),var(--chat-safe-padding))))] border-b', side === 'bottom' &&
|
|
26
|
-
'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom bottom-[max(var(--window-content-inset-bottom),var(--chat-safe-padding))] left-[var(--window-content-inset-inline-start)] right-[var(--window-content-inset-inline-end)] max-h-[min(80dvh,calc(100dvh-var(--window-content-inset-top)-max(var(--window-content-inset-bottom),var(--chat-safe-padding))))] border-t', className), ...props, children: [children, showCloseButton && (_jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", "aria-label": "Close", className: "ring-offset-background
|
|
26
|
+
'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom bottom-[max(var(--window-content-inset-bottom),var(--chat-safe-padding))] left-[var(--window-content-inset-inline-start)] right-[var(--window-content-inset-inline-end)] max-h-[min(80dvh,calc(100dvh-var(--window-content-inset-top)-max(var(--window-content-inset-bottom),var(--chat-safe-padding))))] border-t', className), ...props, children: [children, showCloseButton && (_jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", "aria-label": "Close", className: "ring-offset-background data-[state=open]:bg-secondary rounded-control focus-visible:ring-ring absolute right-4 top-4 inline-flex size-7 cursor-pointer items-center justify-center opacity-70 transition-opacity duration-[var(--motion-duration-fast)] hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:cursor-not-allowed", children: _jsx(XIcon, { "aria-hidden": "true", className: "size-4" }) }))] })] }));
|
|
27
27
|
}
|
|
28
28
|
function SheetHeader({ className, ...props }) {
|
|
29
29
|
return (_jsx("div", { "data-slot": "sheet-header", className: cn('flex shrink-0 flex-col gap-1.5 p-4 pr-12', className), ...props }));
|
|
@@ -35,9 +35,9 @@ function SheetFooter({ className, ...props }) {
|
|
|
35
35
|
return (_jsx("div", { "data-slot": "sheet-footer", className: cn('mt-auto flex shrink-0 flex-col gap-2 p-4 sm:flex-row sm:flex-wrap sm:justify-end', className), ...props }));
|
|
36
36
|
}
|
|
37
37
|
function SheetTitle({ className, ...props }) {
|
|
38
|
-
return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn('text-
|
|
38
|
+
return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn('text-ui-title text-foreground', className), ...props }));
|
|
39
39
|
}
|
|
40
40
|
function SheetDescription({ className, ...props }) {
|
|
41
|
-
return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn('text-
|
|
41
|
+
return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn('text-text-secondary text-ui-body', className), ...props }));
|
|
42
42
|
}
|
|
43
43
|
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetBody, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button } from './button';
|
|
3
|
-
import { Input } from './input';
|
|
4
|
-
import { Separator } from './separator';
|
|
5
|
-
import { TooltipContent } from './tooltip';
|
|
2
|
+
import { Button } from './button.js';
|
|
3
|
+
import { Input } from './input.js';
|
|
4
|
+
import { Separator } from './separator.js';
|
|
5
|
+
import { TooltipContent } from './tooltip.js';
|
|
6
6
|
import { type VariantProps } from 'class-variance-authority';
|
|
7
7
|
type SidebarContextProps = {
|
|
8
8
|
state: 'expanded' | 'collapsed';
|
|
@@ -19,7 +19,7 @@ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: se
|
|
|
19
19
|
open?: boolean;
|
|
20
20
|
onOpenChange?: (open: boolean) => void;
|
|
21
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<'div'> & {
|
|
22
|
+
declare function Sidebar({ side, variant, collapsible, className, children, ref, ...props }: React.ComponentProps<'div'> & {
|
|
23
23
|
side?: 'left' | 'right';
|
|
24
24
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
25
25
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/sidebar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA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sx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { PanelLeftIcon } from 'lucide-react';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
6
|
+
import { MOLDABLE_MATERIAL_REGION_MESSAGE_TYPE } from '../../lib/frame-lifecycle.js';
|
|
7
|
+
import { cn } from '../../lib/utils.js';
|
|
8
|
+
import { useIsMobile } from '../../hooks/use-mobile.js';
|
|
9
|
+
import { useAppFrameRuntime } from './app-frame.js';
|
|
10
|
+
import { Button } from './button.js';
|
|
11
|
+
import { Input } from './input.js';
|
|
12
|
+
import { Separator } from './separator.js';
|
|
13
|
+
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from './sheet.js';
|
|
14
|
+
import { Skeleton } from './skeleton.js';
|
|
15
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from './tooltip.js';
|
|
14
16
|
import { cva } from 'class-variance-authority';
|
|
15
17
|
const SIDEBAR_COOKIE_NAME = 'sidebar_state';
|
|
16
18
|
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -18,6 +20,84 @@ const SIDEBAR_WIDTH = '16rem';
|
|
|
18
20
|
const SIDEBAR_WIDTH_MOBILE = '18rem';
|
|
19
21
|
const SIDEBAR_WIDTH_ICON = '3rem';
|
|
20
22
|
const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
|
|
23
|
+
const SIDEBAR_MATERIAL_MIN_WIDTH = 120;
|
|
24
|
+
const SIDEBAR_MATERIAL_MAX_WIDTH = 600;
|
|
25
|
+
function assignRef(ref, value) {
|
|
26
|
+
if (typeof ref === 'function')
|
|
27
|
+
ref(value);
|
|
28
|
+
else if (ref)
|
|
29
|
+
ref.current = value;
|
|
30
|
+
}
|
|
31
|
+
function useSidebarMaterialRegion({ enabled, forwardedRef, }) {
|
|
32
|
+
const appFrame = useAppFrameRuntime();
|
|
33
|
+
const rawRegionId = React.useId();
|
|
34
|
+
const regionId = React.useMemo(() => `sidebar-${rawRegionId.replace(/[^a-zA-Z0-9_-]/g, '')}`, [rawRegionId]);
|
|
35
|
+
const elementRef = React.useRef(null);
|
|
36
|
+
const declaredRef = React.useRef(false);
|
|
37
|
+
const widthRef = React.useRef(null);
|
|
38
|
+
const setElement = React.useCallback((element) => {
|
|
39
|
+
elementRef.current = element;
|
|
40
|
+
assignRef(forwardedRef, element);
|
|
41
|
+
}, [forwardedRef]);
|
|
42
|
+
const canDeclare = enabled &&
|
|
43
|
+
appFrame?.mode === 'window' &&
|
|
44
|
+
appFrame.sidebarMaterialAvailable === true;
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
const element = elementRef.current;
|
|
47
|
+
if (!canDeclare || !element || typeof ResizeObserver === 'undefined') {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const post = (action, width) => {
|
|
51
|
+
window.parent.postMessage({
|
|
52
|
+
type: MOLDABLE_MATERIAL_REGION_MESSAGE_TYPE,
|
|
53
|
+
action,
|
|
54
|
+
regionId,
|
|
55
|
+
role: 'sidebar',
|
|
56
|
+
side: 'leading',
|
|
57
|
+
...(width === undefined ? {} : { width }),
|
|
58
|
+
}, '*');
|
|
59
|
+
};
|
|
60
|
+
const withdraw = () => {
|
|
61
|
+
if (!declaredRef.current)
|
|
62
|
+
return;
|
|
63
|
+
declaredRef.current = false;
|
|
64
|
+
widthRef.current = null;
|
|
65
|
+
post('withdraw');
|
|
66
|
+
};
|
|
67
|
+
const measure = () => {
|
|
68
|
+
const width = element.getBoundingClientRect().width;
|
|
69
|
+
if (!Number.isFinite(width) ||
|
|
70
|
+
width < SIDEBAR_MATERIAL_MIN_WIDTH ||
|
|
71
|
+
width > SIDEBAR_MATERIAL_MAX_WIDTH) {
|
|
72
|
+
withdraw();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (!declaredRef.current) {
|
|
76
|
+
declaredRef.current = true;
|
|
77
|
+
widthRef.current = width;
|
|
78
|
+
post('declare', width);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (widthRef.current === null ||
|
|
82
|
+
Math.abs(widthRef.current - width) >= 0.5) {
|
|
83
|
+
widthRef.current = width;
|
|
84
|
+
post('update', width);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const observer = new ResizeObserver(measure);
|
|
88
|
+
observer.observe(element);
|
|
89
|
+
measure();
|
|
90
|
+
return () => {
|
|
91
|
+
observer.disconnect();
|
|
92
|
+
withdraw();
|
|
93
|
+
};
|
|
94
|
+
}, [canDeclare, regionId]);
|
|
95
|
+
return {
|
|
96
|
+
active: appFrame?.sidebarMaterialRegionId === regionId,
|
|
97
|
+
regionId,
|
|
98
|
+
setElement,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
21
101
|
const SidebarContext = React.createContext(null);
|
|
22
102
|
function useSidebar() {
|
|
23
103
|
const context = React.useContext(SidebarContext);
|
|
@@ -78,10 +158,17 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
78
158
|
...style,
|
|
79
159
|
}, className: cn('group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full', className), ...props, children: children }) }) }));
|
|
80
160
|
}
|
|
81
|
-
function Sidebar({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ...props }) {
|
|
161
|
+
function Sidebar({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ref, ...props }) {
|
|
82
162
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
163
|
+
const materialRegion = useSidebarMaterialRegion({
|
|
164
|
+
enabled: !isMobile &&
|
|
165
|
+
side === 'left' &&
|
|
166
|
+
variant === 'sidebar' &&
|
|
167
|
+
!(state === 'collapsed' && collapsible === 'offcanvas'),
|
|
168
|
+
forwardedRef: ref,
|
|
169
|
+
});
|
|
83
170
|
if (collapsible === 'none') {
|
|
84
|
-
return (_jsx("div", { "data-slot": "sidebar", className: cn('bg-sidebar text-sidebar-foreground w-(--sidebar-width) flex
|
|
171
|
+
return (_jsx("div", { ref: materialRegion.setElement, "data-slot": "sidebar", "data-material-region-id": materialRegion.regionId, "data-native-material": materialRegion.active ? 'sidebar' : undefined, className: cn(materialRegion.active ? 'bg-transparent' : 'bg-sidebar', 'text-sidebar-foreground w-(--sidebar-width) flex flex-col self-stretch', className), ...props, children: children }));
|
|
85
172
|
}
|
|
86
173
|
if (isMobile) {
|
|
87
174
|
return (_jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: _jsxs(SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden", style: {
|
|
@@ -90,13 +177,13 @@ function Sidebar({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas'
|
|
|
90
177
|
}
|
|
91
178
|
return (_jsxs("div", { className: "text-sidebar-foreground group peer hidden md:block", "data-state": state, "data-collapsible": state === 'collapsed' ? collapsible : '', "data-variant": variant, "data-side": side, "data-slot": "sidebar", children: [_jsx("div", { "data-slot": "sidebar-gap", className: cn('w-(--sidebar-width) relative bg-transparent transition-[width] duration-200 ease-linear', 'group-data-[collapsible=offcanvas]:w-0', 'group-data-[side=right]:rotate-180', variant === 'floating' || variant === 'inset'
|
|
92
179
|
? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'
|
|
93
|
-
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)') }), _jsx("div", { "data-slot": "sidebar-container", className: cn('w-(--sidebar-width) fixed inset-y-0 z-10 hidden h-svh transition-[left,right,width] duration-200 ease-linear md:flex', side === 'left'
|
|
180
|
+
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)') }), _jsx("div", { ref: materialRegion.setElement, "data-slot": "sidebar-container", "data-material-region-id": materialRegion.regionId, "data-native-material": materialRegion.active ? 'sidebar' : undefined, className: cn('w-(--sidebar-width) fixed inset-y-0 z-10 hidden h-svh transition-[left,right,width] duration-200 ease-linear md:flex', side === 'left'
|
|
94
181
|
? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'
|
|
95
182
|
: 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',
|
|
96
183
|
// Adjust the padding for floating and inset variants.
|
|
97
184
|
variant === 'floating' || variant === 'inset'
|
|
98
185
|
? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'
|
|
99
|
-
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l', className), ...props, children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className:
|
|
186
|
+
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l', className), ...props, children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: cn(materialRegion.active ? 'bg-transparent' : 'bg-sidebar', 'group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:rounded-container flex h-full w-full flex-col group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm'), children: children }) })] }));
|
|
100
187
|
}
|
|
101
188
|
function SidebarTrigger({ className, onClick, ...props }) {
|
|
102
189
|
const { toggleSidebar } = useSidebar();
|
|
@@ -110,7 +197,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
110
197
|
return (_jsx("button", { "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": "Toggle Sidebar", tabIndex: -1, onClick: toggleSidebar, title: "Toggle Sidebar", className: cn('hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 cursor-pointer transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex', 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize', '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize', 'hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full', '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2', '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2', className), ...props }));
|
|
111
198
|
}
|
|
112
199
|
function SidebarInset({ className, ...props }) {
|
|
113
|
-
return (_jsx("main", { "data-slot": "sidebar-inset", className: cn('bg-background relative flex w-full flex-1 flex-col', 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:
|
|
200
|
+
return (_jsx("main", { "data-slot": "sidebar-inset", className: cn('bg-background relative flex w-full flex-1 flex-col', 'md:peer-data-[variant=inset]:rounded-container md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:shadow-sm', className), ...props }));
|
|
114
201
|
}
|
|
115
202
|
function SidebarInput({ className, ...props }) {
|
|
116
203
|
return (_jsx(Input, { "data-slot": "sidebar-input", "data-sidebar": "input", className: cn('bg-background h-8 w-full shadow-none', className), ...props }));
|
|
@@ -132,16 +219,16 @@ function SidebarGroup({ className, ...props }) {
|
|
|
132
219
|
}
|
|
133
220
|
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
134
221
|
const Comp = asChild ? Slot : 'div';
|
|
135
|
-
return (_jsx(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn('text-sidebar-foreground/70 ring-sidebar-ring outline-hidden flex h-8 shrink-0 items-center
|
|
222
|
+
return (_jsx(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn('text-sidebar-foreground/70 ring-sidebar-ring outline-hidden rounded-control text-ui-caption flex h-8 shrink-0 items-center px-2 font-medium transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0', 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0', className), ...props }));
|
|
136
223
|
}
|
|
137
224
|
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
138
225
|
const Comp = asChild ? Slot : 'button';
|
|
139
|
-
return (_jsx(Comp, { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground outline-hidden absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center
|
|
226
|
+
return (_jsx(Comp, { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground outline-hidden rounded-control absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center p-0 transition-transform focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
140
227
|
// Increases the hit area of the button on mobile.
|
|
141
228
|
'after:absolute after:-inset-2 md:after:hidden', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
142
229
|
}
|
|
143
230
|
function SidebarGroupContent({ className, ...props }) {
|
|
144
|
-
return (_jsx("div", { "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: cn('w-full
|
|
231
|
+
return (_jsx("div", { "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: cn('text-ui-body w-full', className), ...props }));
|
|
145
232
|
}
|
|
146
233
|
function SidebarMenu({ className, ...props }) {
|
|
147
234
|
return (_jsx("ul", { "data-slot": "sidebar-menu", "data-sidebar": "menu", className: cn('flex w-full min-w-0 flex-col gap-1', className), ...props }));
|
|
@@ -149,16 +236,16 @@ function SidebarMenu({ className, ...props }) {
|
|
|
149
236
|
function SidebarMenuItem({ className, ...props }) {
|
|
150
237
|
return (_jsx("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn('group/menu-item relative', className), ...props }));
|
|
151
238
|
}
|
|
152
|
-
const sidebarMenuButtonVariants = cva('peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-
|
|
239
|
+
const sidebarMenuButtonVariants = cva('peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-control p-2 text-left text-ui-body outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-1 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=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=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', {
|
|
153
240
|
variants: {
|
|
154
241
|
variant: {
|
|
155
242
|
default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
|
156
243
|
outline: 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',
|
|
157
244
|
},
|
|
158
245
|
size: {
|
|
159
|
-
default: 'h-8 text-
|
|
160
|
-
sm: 'h-7 text-
|
|
161
|
-
lg: 'h-12 text-
|
|
246
|
+
default: 'h-8 text-ui-body',
|
|
247
|
+
sm: 'h-7 text-ui-caption',
|
|
248
|
+
lg: 'h-12 text-ui-body group-data-[collapsible=icon]:p-0!',
|
|
162
249
|
},
|
|
163
250
|
},
|
|
164
251
|
defaultVariants: {
|
|
@@ -182,20 +269,20 @@ function SidebarMenuButton({ asChild = false, isActive = false, variant = 'defau
|
|
|
182
269
|
}
|
|
183
270
|
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
184
271
|
const Comp = asChild ? Slot : 'button';
|
|
185
|
-
return (_jsx(Comp, { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: cn('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground outline-hidden absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center
|
|
272
|
+
return (_jsx(Comp, { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: cn('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground outline-hidden rounded-control absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center p-0 transition-transform focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
186
273
|
// Increases the hit area of the button on mobile.
|
|
187
274
|
'after:absolute after:-inset-2 md:after:hidden', 'peer-data-[size=sm]/menu-button:top-1', 'peer-data-[size=default]/menu-button:top-1.5', 'peer-data-[size=lg]/menu-button:top-2.5', 'group-data-[collapsible=icon]:hidden', showOnHover &&
|
|
188
275
|
'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0', className), ...props }));
|
|
189
276
|
}
|
|
190
277
|
function SidebarMenuBadge({ className, ...props }) {
|
|
191
|
-
return (_jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn('text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center
|
|
278
|
+
return (_jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn('text-sidebar-foreground rounded-control text-ui-caption pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center px-1 font-medium tabular-nums', 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground', 'peer-data-[size=sm]/menu-button:top-1', 'peer-data-[size=default]/menu-button:top-1.5', 'peer-data-[size=lg]/menu-button:top-2.5', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
192
279
|
}
|
|
193
280
|
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
194
281
|
// Random width between 50 to 90%.
|
|
195
282
|
const width = React.useMemo(() => {
|
|
196
283
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
197
284
|
}, []);
|
|
198
|
-
return (_jsxs("div", { "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: cn('flex h-8 items-center gap-2
|
|
285
|
+
return (_jsxs("div", { "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: cn('rounded-control flex h-8 items-center gap-2 px-2', className), ...props, children: [showIcon && (_jsx(Skeleton, { className: "rounded-control size-4", "data-sidebar": "menu-skeleton-icon" })), _jsx(Skeleton, { className: "max-w-(--skeleton-width) h-4 flex-1", "data-sidebar": "menu-skeleton-text", style: {
|
|
199
286
|
'--skeleton-width': width,
|
|
200
287
|
} })] }));
|
|
201
288
|
}
|
|
@@ -207,6 +294,6 @@ function SidebarMenuSubItem({ className, ...props }) {
|
|
|
207
294
|
}
|
|
208
295
|
function SidebarMenuSubButton({ asChild = false, size = 'md', isActive = false, className, ...props }) {
|
|
209
296
|
const Comp = asChild ? Slot : 'a';
|
|
210
|
-
return (_jsx(Comp, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground outline-hidden flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden
|
|
297
|
+
return (_jsx(Comp, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground outline-hidden rounded-control flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden px-2 focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground', size === 'sm' && 'text-ui-caption', size === 'md' && 'text-ui-body', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
211
298
|
}
|
|
212
299
|
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
@@ -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 Skeleton({ className, ...props }) {
|
|
5
|
-
return (_jsx("div", { "data-slot": "skeleton", className: cn('bg-accent animate-pulse
|
|
5
|
+
return (_jsx("div", { "data-slot": "skeleton", className: cn('bg-accent rounded-control animate-pulse', className), ...props }));
|
|
6
6
|
}
|
|
7
7
|
export { Skeleton };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
declare function Slider({ className, defaultValue, value, min, max, rangeContent, thumbContent, ...props }: React.ComponentProps<typeof SliderPrimitive.Root> & {
|
|
3
|
+
declare function Slider({ className, defaultValue, value, min, max, rangeContent, thumbContent, thumbAriaLabels, ...props }: React.ComponentProps<typeof SliderPrimitive.Root> & {
|
|
4
4
|
rangeContent?: React.ReactNode;
|
|
5
5
|
thumbContent?: React.ReactNode;
|
|
6
|
+
/** Accessible names for thumbs, in value order. Required for ranges. */
|
|
7
|
+
thumbAriaLabels?: readonly string[];
|
|
6
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export { Slider };
|
|
8
10
|
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/components/ui/slider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,YAAY,EACZ,KAAK,EACL,GAAO,EACP,GAAS,EACT,YAAY,EACZ,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG;IACrD,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/components/ui/slider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,YAAY,EACZ,KAAK,EACL,GAAO,EACP,GAAS,EACT,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG;IACrD,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,wEAAwE;IACxE,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACpC,2CAmDA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
function Slider({ className, defaultValue, value, min = 0, max = 100, rangeContent, thumbContent, ...props }) {
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
function Slider({ className, defaultValue, value, min = 0, max = 100, rangeContent, thumbContent, thumbAriaLabels, ...props }) {
|
|
7
7
|
const _values = React.useMemo(() => Array.isArray(value)
|
|
8
8
|
? value
|
|
9
9
|
: Array.isArray(defaultValue)
|
|
10
10
|
? defaultValue
|
|
11
11
|
: [min, max], [value, defaultValue, min, max]);
|
|
12
|
-
return (_jsxs(SliderPrimitive.Root, { "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: cn('relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50', className), ...props, children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: cn('bg-muted relative grow overflow-hidden
|
|
12
|
+
return (_jsxs(SliderPrimitive.Root, { "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: cn('relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50', className), ...props, children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: cn('bg-muted rounded-pill relative grow overflow-hidden data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5'), children: _jsx(SliderPrimitive.Range, { "data-slot": "slider-range", className: cn('bg-primary rounded-pill absolute overflow-hidden data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full'), children: rangeContent }) }), Array.from({ length: _values.length }, (_, index) => (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", "aria-label": thumbAriaLabels?.[index], className: "border-primary ring-ring focus-visible:outline-hidden rounded-pill block size-4 shrink-0 border bg-white shadow-sm transition-[color,box-shadow] focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50", children: thumbContent }, index)))] }));
|
|
13
13
|
}
|
|
14
14
|
export { Slider };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, } from 'lucide-react';
|
|
4
|
-
import { useTheme } from '../../lib/theme';
|
|
4
|
+
import { useTheme } from '../../lib/theme.js';
|
|
5
5
|
import { Toaster as Sonner, toast, } from 'sonner';
|
|
6
6
|
const Toaster = ({ style, ...props }) => {
|
|
7
7
|
const { resolvedTheme } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/spinner.tsx"],"names":[],"mappings":"AAKA,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/spinner.tsx"],"names":[],"mappings":"AAKA,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAYpE;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Loader2Icon } from 'lucide-react';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
5
|
function Spinner({ className, ...props }) {
|
|
6
|
-
return (_jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn('size-4 animate-spin', className), ...props }));
|
|
6
|
+
return (_jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn('size-4 animate-spin motion-reduce:animate-none', className), ...props }));
|
|
7
7
|
}
|
|
8
8
|
export { Spinner };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from './resizable';
|
|
3
|
+
import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from './resizable.js';
|
|
4
4
|
function SplitView({ orientation = 'horizontal', ...props }) {
|
|
5
5
|
return (_jsx(ResizablePanelGroup, { "data-slot": "split-view", orientation: orientation, ...props }));
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const statusVariants: (props?: ({
|
|
4
|
-
variant?: "error" | "
|
|
4
|
+
variant?: "error" | "neutral" | "info" | "success" | "warning" | "running" | "pending" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface StatusProps extends React.ComponentProps<'span'>, VariantProps<typeof statusVariants> {
|
|
7
7
|
asChild?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/components/ui/status.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,cAAc;;
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/components/ui/status.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,cAAc;;8EAwBnB,CAAA;AAcD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAClC,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,iBAAS,MAAM,CAAC,EACd,OAAe,EACf,aAAoB,EACpB,QAAgB,EAChB,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,2CAqBb;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|