@moldable-ai/ui 0.2.19 → 0.2.21
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 +15 -0
- package/dist/catalog/catalog-coverage.d.ts.map +1 -0
- package/dist/catalog/catalog-coverage.js +44 -0
- package/dist/catalog/catalog-manifest.d.ts +6 -0
- package/dist/catalog/catalog-manifest.d.ts.map +1 -0
- package/dist/catalog/catalog-manifest.js +117 -0
- package/dist/catalog/catalog-types.d.ts +64 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -0
- package/dist/catalog/catalog-types.js +20 -0
- package/dist/catalog/component-catalog.d.ts +14 -0
- package/dist/catalog/component-catalog.d.ts.map +1 -0
- package/dist/catalog/component-catalog.js +49 -0
- package/dist/catalog/core-catalog-exclusions.d.ts +8 -0
- package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -0
- package/dist/catalog/core-catalog-exclusions.js +151 -0
- package/dist/catalog/core-catalog.d.ts +2 -0
- package/dist/catalog/core-catalog.d.ts.map +1 -0
- package/dist/catalog/core-catalog.js +19 -0
- package/dist/catalog/core-collection-stories.d.ts +3 -0
- package/dist/catalog/core-collection-stories.d.ts.map +1 -0
- package/dist/catalog/core-collection-stories.js +42 -0
- package/dist/catalog/core-control-stories.d.ts +3 -0
- package/dist/catalog/core-control-stories.d.ts.map +1 -0
- package/dist/catalog/core-control-stories.js +94 -0
- package/dist/catalog/core-feedback-stories.d.ts +3 -0
- package/dist/catalog/core-feedback-stories.d.ts.map +1 -0
- package/dist/catalog/core-feedback-stories.js +50 -0
- package/dist/catalog/core-foundation-stories.d.ts +3 -0
- package/dist/catalog/core-foundation-stories.d.ts.map +1 -0
- package/dist/catalog/core-foundation-stories.js +53 -0
- package/dist/catalog/core-navigation-stories.d.ts +3 -0
- package/dist/catalog/core-navigation-stories.d.ts.map +1 -0
- package/dist/catalog/core-navigation-stories.js +25 -0
- package/dist/catalog/core-overlay-stories.d.ts +3 -0
- package/dist/catalog/core-overlay-stories.d.ts.map +1 -0
- package/dist/catalog/core-overlay-stories.js +20 -0
- package/dist/catalog/index.d.ts +7 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +6 -0
- package/dist/components/app-error-boundary.d.ts +1 -0
- package/dist/components/app-error-boundary.d.ts.map +1 -1
- package/dist/components/app-error-boundary.js +13 -0
- package/dist/components/chat/chat-image-lightbox.d.ts +9 -0
- package/dist/components/chat/chat-image-lightbox.d.ts.map +1 -0
- package/dist/components/chat/chat-image-lightbox.js +9 -0
- package/dist/components/chat/chat-message.d.ts +19 -1
- package/dist/components/chat/chat-message.d.ts.map +1 -1
- package/dist/components/chat/chat-message.js +66 -16
- package/dist/components/chat/chat-messages.d.ts +5 -2
- package/dist/components/chat/chat-messages.d.ts.map +1 -1
- package/dist/components/chat/chat-messages.js +61 -6
- package/dist/components/chat/chat-panel.d.ts +49 -6
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +196 -163
- package/dist/components/chat/conversation-history.d.ts +39 -5
- package/dist/components/chat/conversation-history.d.ts.map +1 -1
- package/dist/components/chat/conversation-history.js +192 -26
- package/dist/components/chat/index.d.ts +2 -2
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/tool-handlers.d.ts.map +1 -1
- package/dist/components/chat/tool-handlers.js +40 -2
- package/dist/components/chat/vertical-scroll-fade.d.ts +6 -0
- package/dist/components/chat/vertical-scroll-fade.d.ts.map +1 -0
- package/dist/components/chat/vertical-scroll-fade.js +12 -0
- package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts +9 -0
- package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts.map +1 -0
- package/dist/components/native-capabilities/bluetooth-panel-helpers.js +37 -0
- package/dist/components/native-capabilities/bluetooth-panel.d.ts +56 -0
- package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/bluetooth-panel.js +470 -0
- package/dist/components/native-capabilities/camera-preview.d.ts +39 -0
- package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -0
- package/dist/components/native-capabilities/camera-preview.js +228 -0
- package/dist/components/native-capabilities/capability-badge.d.ts +23 -0
- package/dist/components/native-capabilities/capability-badge.d.ts.map +1 -0
- package/dist/components/native-capabilities/capability-badge.js +39 -0
- package/dist/components/native-capabilities/capability-matrix.d.ts +14 -0
- package/dist/components/native-capabilities/capability-matrix.d.ts.map +1 -0
- package/dist/components/native-capabilities/capability-matrix.js +97 -0
- package/dist/components/native-capabilities/clipboard-button.d.ts +26 -0
- package/dist/components/native-capabilities/clipboard-button.d.ts.map +1 -0
- package/dist/components/native-capabilities/clipboard-button.js +99 -0
- package/dist/components/native-capabilities/device-io-controls.d.ts +4 -0
- package/dist/components/native-capabilities/device-io-controls.d.ts.map +1 -0
- package/dist/components/native-capabilities/device-io-controls.js +28 -0
- package/dist/components/native-capabilities/device-list.d.ts +20 -0
- package/dist/components/native-capabilities/device-list.d.ts.map +1 -0
- package/dist/components/native-capabilities/device-list.js +14 -0
- package/dist/components/native-capabilities/display-map.d.ts +23 -0
- package/dist/components/native-capabilities/display-map.d.ts.map +1 -0
- package/dist/components/native-capabilities/display-map.js +114 -0
- package/dist/components/native-capabilities/haptic-button.d.ts +26 -0
- package/dist/components/native-capabilities/haptic-button.d.ts.map +1 -0
- package/dist/components/native-capabilities/haptic-button.js +94 -0
- package/dist/components/native-capabilities/hid-panel.d.ts +40 -0
- package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/hid-panel.js +373 -0
- package/dist/components/native-capabilities/index.d.ts +27 -0
- package/dist/components/native-capabilities/index.d.ts.map +1 -0
- package/dist/components/native-capabilities/index.js +26 -0
- package/dist/components/native-capabilities/live-indicator.d.ts +15 -0
- package/dist/components/native-capabilities/live-indicator.d.ts.map +1 -0
- package/dist/components/native-capabilities/live-indicator.js +26 -0
- package/dist/components/native-capabilities/local-auth-button.d.ts +33 -0
- package/dist/components/native-capabilities/local-auth-button.d.ts.map +1 -0
- package/dist/components/native-capabilities/local-auth-button.js +115 -0
- package/dist/components/native-capabilities/location-panel.d.ts +29 -0
- package/dist/components/native-capabilities/location-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/location-panel.js +146 -0
- package/dist/components/native-capabilities/microphone-meter.d.ts +35 -0
- package/dist/components/native-capabilities/microphone-meter.d.ts.map +1 -0
- package/dist/components/native-capabilities/microphone-meter.js +244 -0
- package/dist/components/native-capabilities/midi-monitor.d.ts +54 -0
- package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -0
- package/dist/components/native-capabilities/midi-monitor.js +534 -0
- package/dist/components/native-capabilities/native-capability-panel.d.ts +11 -0
- package/dist/components/native-capabilities/native-capability-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/native-capability-panel.js +28 -0
- package/dist/components/native-capabilities/notification-panel.d.ts +24 -0
- package/dist/components/native-capabilities/notification-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/notification-panel.js +124 -0
- package/dist/components/native-capabilities/power-blocker-controller.d.ts +19 -0
- package/dist/components/native-capabilities/power-blocker-controller.d.ts.map +1 -0
- package/dist/components/native-capabilities/power-blocker-controller.js +83 -0
- package/dist/components/native-capabilities/power-panel.d.ts +67 -0
- package/dist/components/native-capabilities/power-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/power-panel.js +309 -0
- package/dist/components/native-capabilities/readout.d.ts +10 -0
- package/dist/components/native-capabilities/readout.d.ts.map +1 -0
- package/dist/components/native-capabilities/readout.js +11 -0
- package/dist/components/native-capabilities/screen-share-preview.d.ts +36 -0
- package/dist/components/native-capabilities/screen-share-preview.d.ts.map +1 -0
- package/dist/components/native-capabilities/screen-share-preview.js +191 -0
- package/dist/components/native-capabilities/secure-storage-panel.d.ts +36 -0
- package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/secure-storage-panel.js +193 -0
- package/dist/components/native-capabilities/serial-console.d.ts +64 -0
- package/dist/components/native-capabilities/serial-console.d.ts.map +1 -0
- package/dist/components/native-capabilities/serial-console.js +399 -0
- package/dist/components/native-capabilities/shortcut-recorder.d.ts +35 -0
- package/dist/components/native-capabilities/shortcut-recorder.d.ts.map +1 -0
- package/dist/components/native-capabilities/shortcut-recorder.js +217 -0
- package/dist/components/native-capabilities/stream-log.d.ts +35 -0
- package/dist/components/native-capabilities/stream-log.d.ts.map +1 -0
- package/dist/components/native-capabilities/stream-log.js +65 -0
- package/dist/components/native-capabilities/system-audio-monitor.d.ts +34 -0
- package/dist/components/native-capabilities/system-audio-monitor.d.ts.map +1 -0
- package/dist/components/native-capabilities/system-audio-monitor.js +275 -0
- package/dist/components/native-capabilities/usb-panel.d.ts +54 -0
- package/dist/components/native-capabilities/usb-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/usb-panel.js +363 -0
- package/dist/components/native-capabilities/use-capability.d.ts +20 -0
- package/dist/components/native-capabilities/use-capability.d.ts.map +1 -0
- package/dist/components/native-capabilities/use-capability.js +61 -0
- package/dist/components/ui/alert-dialog.d.ts +7 -3
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +9 -5
- package/dist/components/ui/alert.d.ts +19 -3
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +25 -8
- package/dist/components/ui/app-frame.d.ts +28 -0
- package/dist/components/ui/app-frame.d.ts.map +1 -0
- package/dist/components/ui/app-frame.js +95 -0
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/collapsible.d.ts +9 -1
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +13 -2
- package/dist/components/ui/collection-navigation.d.ts +8 -0
- package/dist/components/ui/collection-navigation.d.ts.map +1 -0
- package/dist/components/ui/collection-navigation.js +19 -0
- package/dist/components/ui/color-well.d.ts +13 -0
- package/dist/components/ui/color-well.d.ts.map +1 -0
- package/dist/components/ui/color-well.js +30 -0
- package/dist/components/ui/command.d.ts +5 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +13 -1
- package/dist/components/ui/confirm-dialog.d.ts +19 -0
- package/dist/components/ui/confirm-dialog.d.ts.map +1 -0
- package/dist/components/ui/confirm-dialog.js +45 -0
- package/dist/components/ui/date-field.d.ts +19 -0
- package/dist/components/ui/date-field.d.ts.map +1 -0
- package/dist/components/ui/date-field.js +54 -0
- package/dist/components/ui/date-picker.d.ts +24 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/date-picker.js +92 -0
- package/dist/components/ui/dialog.d.ts +4 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +8 -5
- package/dist/components/ui/edge-fade.d.ts +11 -0
- package/dist/components/ui/edge-fade.d.ts.map +1 -0
- package/dist/components/ui/edge-fade.js +41 -0
- package/dist/components/ui/empty.d.ts +7 -2
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +20 -7
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/grid.d.ts +24 -0
- package/dist/components/ui/grid.d.ts.map +1 -0
- package/dist/components/ui/grid.js +258 -0
- package/dist/components/ui/icon-button.d.ts +15 -0
- package/dist/components/ui/icon-button.d.ts.map +1 -0
- package/dist/components/ui/icon-button.js +15 -0
- package/dist/components/ui/index.d.ts +23 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +23 -0
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/inspector.d.ts +15 -0
- package/dist/components/ui/inspector.d.ts.map +1 -0
- package/dist/components/ui/inspector.js +26 -0
- package/dist/components/ui/kbd.d.ts +1 -1
- package/dist/components/ui/list.d.ts +28 -0
- package/dist/components/ui/list.d.ts.map +1 -0
- package/dist/components/ui/list.js +235 -0
- package/dist/components/ui/material.d.ts +34 -0
- package/dist/components/ui/material.d.ts.map +1 -0
- package/dist/components/ui/material.js +34 -0
- package/dist/components/ui/message-scroller-controller.d.ts +162 -0
- package/dist/components/ui/message-scroller-controller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-controller.js +888 -0
- package/dist/components/ui/message-scroller-layout-stability.d.ts +33 -0
- package/dist/components/ui/message-scroller-layout-stability.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-layout-stability.js +153 -0
- package/dist/components/ui/message-scroller-policy.d.ts +74 -0
- package/dist/components/ui/message-scroller-policy.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-policy.js +129 -0
- package/dist/components/ui/message-scroller-primitive.d.ts +55 -0
- package/dist/components/ui/message-scroller-primitive.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-primitive.js +226 -0
- package/dist/components/ui/message-scroller.d.ts +11 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +25 -0
- package/dist/components/ui/navigation-button-group.d.ts +16 -0
- package/dist/components/ui/navigation-button-group.d.ts.map +1 -0
- package/dist/components/ui/navigation-button-group.js +9 -0
- package/dist/components/ui/notification-dot.d.ts +4 -0
- package/dist/components/ui/notification-dot.d.ts.map +1 -0
- package/dist/components/ui/notification-dot.js +7 -0
- package/dist/components/ui/number-input.d.ts +16 -0
- package/dist/components/ui/number-input.d.ts.map +1 -0
- package/dist/components/ui/number-input.js +56 -0
- package/dist/components/ui/panel.d.ts +18 -0
- package/dist/components/ui/panel.d.ts.map +1 -0
- package/dist/components/ui/panel.js +40 -0
- package/dist/components/ui/popover.d.ts +9 -2
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +14 -4
- package/dist/components/ui/scroll-area.d.ts +8 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +6 -3
- package/dist/components/ui/search-field.d.ts +19 -0
- package/dist/components/ui/search-field.d.ts.map +1 -0
- package/dist/components/ui/search-field.js +64 -0
- package/dist/components/ui/segmented-control.d.ts +21 -0
- package/dist/components/ui/segmented-control.d.ts.map +1 -0
- package/dist/components/ui/segmented-control.js +62 -0
- package/dist/components/ui/sheet.d.ts +4 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +12 -9
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/sonner.d.ts +4 -3
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +7 -6
- package/dist/components/ui/split-view.d.ts +11 -0
- package/dist/components/ui/split-view.d.ts.map +1 -0
- package/dist/components/ui/split-view.js +13 -0
- package/dist/components/ui/status.d.ts +13 -0
- package/dist/components/ui/status.d.ts.map +1 -0
- package/dist/components/ui/status.js +36 -0
- package/dist/components/ui/table.d.ts +11 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +33 -6
- package/dist/components/ui/text.d.ts +17 -0
- package/dist/components/ui/text.d.ts.map +1 -0
- package/dist/components/ui/text.js +55 -0
- package/dist/components/ui/toggle.d.ts +12 -4
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +13 -2
- package/dist/components/ui/toolbar.d.ts +27 -0
- package/dist/components/ui/toolbar.d.ts.map +1 -0
- package/dist/components/ui/toolbar.js +71 -0
- package/dist/components/ui/tooltip.d.ts +8 -3
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +11 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/lib/frame-lifecycle.d.ts +29 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +85 -0
- package/dist/lib/native-capabilities/access.d.ts +13 -0
- package/dist/lib/native-capabilities/access.d.ts.map +1 -0
- package/dist/lib/native-capabilities/access.js +53 -0
- package/dist/lib/native-capabilities/bluetooth-access.d.ts +14 -0
- package/dist/lib/native-capabilities/bluetooth-access.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-access.js +43 -0
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts +19 -0
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-connection.js +88 -0
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +7 -0
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-gatt.js +77 -0
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts +10 -0
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-internal.js +105 -0
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +33 -0
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-native-fallback.js +214 -0
- package/dist/lib/native-capabilities/bluetooth-types.d.ts +85 -0
- package/dist/lib/native-capabilities/bluetooth-types.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-types.js +2 -0
- package/dist/lib/native-capabilities/bluetooth.d.ts +7 -0
- package/dist/lib/native-capabilities/bluetooth.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth.js +4 -0
- package/dist/lib/native-capabilities/bridge.d.ts +23 -0
- package/dist/lib/native-capabilities/bridge.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bridge.js +266 -0
- package/dist/lib/native-capabilities/capabilities.d.ts +7 -0
- package/dist/lib/native-capabilities/capabilities.d.ts.map +1 -0
- package/dist/lib/native-capabilities/capabilities.js +95 -0
- package/dist/lib/native-capabilities/clipboard.d.ts +11 -0
- package/dist/lib/native-capabilities/clipboard.d.ts.map +1 -0
- package/dist/lib/native-capabilities/clipboard.js +58 -0
- package/dist/lib/native-capabilities/device-io-errors.d.ts +11 -0
- package/dist/lib/native-capabilities/device-io-errors.d.ts.map +1 -0
- package/dist/lib/native-capabilities/device-io-errors.js +82 -0
- package/dist/lib/native-capabilities/displays.d.ts +38 -0
- package/dist/lib/native-capabilities/displays.d.ts.map +1 -0
- package/dist/lib/native-capabilities/displays.js +12 -0
- package/dist/lib/native-capabilities/global-shortcuts.d.ts +86 -0
- package/dist/lib/native-capabilities/global-shortcuts.d.ts.map +1 -0
- package/dist/lib/native-capabilities/global-shortcuts.js +351 -0
- package/dist/lib/native-capabilities/haptics.d.ts +25 -0
- package/dist/lib/native-capabilities/haptics.d.ts.map +1 -0
- package/dist/lib/native-capabilities/haptics.js +18 -0
- package/dist/lib/native-capabilities/hid-native.d.ts +26 -0
- package/dist/lib/native-capabilities/hid-native.d.ts.map +1 -0
- package/dist/lib/native-capabilities/hid-native.js +229 -0
- package/dist/lib/native-capabilities/hid.d.ts +52 -0
- package/dist/lib/native-capabilities/hid.d.ts.map +1 -0
- package/dist/lib/native-capabilities/hid.js +163 -0
- package/dist/lib/native-capabilities/index.d.ts +40 -0
- package/dist/lib/native-capabilities/index.d.ts.map +1 -0
- package/dist/lib/native-capabilities/index.js +21 -0
- package/dist/lib/native-capabilities/local-authentication.d.ts +32 -0
- package/dist/lib/native-capabilities/local-authentication.d.ts.map +1 -0
- package/dist/lib/native-capabilities/local-authentication.js +46 -0
- package/dist/lib/native-capabilities/location.d.ts +49 -0
- package/dist/lib/native-capabilities/location.d.ts.map +1 -0
- package/dist/lib/native-capabilities/location.js +114 -0
- package/dist/lib/native-capabilities/media-permissions.d.ts +28 -0
- package/dist/lib/native-capabilities/media-permissions.d.ts.map +1 -0
- package/dist/lib/native-capabilities/media-permissions.js +37 -0
- package/dist/lib/native-capabilities/media.d.ts +17 -0
- package/dist/lib/native-capabilities/media.d.ts.map +1 -0
- package/dist/lib/native-capabilities/media.js +104 -0
- package/dist/lib/native-capabilities/midi-access.d.ts +13 -0
- package/dist/lib/native-capabilities/midi-access.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-access.js +68 -0
- package/dist/lib/native-capabilities/midi-internal.d.ts +12 -0
- package/dist/lib/native-capabilities/midi-internal.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-internal.js +88 -0
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts +27 -0
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-native-fallback.js +127 -0
- package/dist/lib/native-capabilities/midi-ports.d.ts +6 -0
- package/dist/lib/native-capabilities/midi-ports.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-ports.js +115 -0
- package/dist/lib/native-capabilities/midi-types.d.ts +25 -0
- package/dist/lib/native-capabilities/midi-types.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-types.js +1 -0
- package/dist/lib/native-capabilities/midi.d.ts +6 -0
- package/dist/lib/native-capabilities/midi.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi.js +3 -0
- package/dist/lib/native-capabilities/native-device-io.d.ts +28 -0
- package/dist/lib/native-capabilities/native-device-io.d.ts.map +1 -0
- package/dist/lib/native-capabilities/native-device-io.js +91 -0
- package/dist/lib/native-capabilities/native-device-lifecycle.d.ts +13 -0
- package/dist/lib/native-capabilities/native-device-lifecycle.d.ts.map +1 -0
- package/dist/lib/native-capabilities/native-device-lifecycle.js +40 -0
- package/dist/lib/native-capabilities/notifications.d.ts +38 -0
- package/dist/lib/native-capabilities/notifications.d.ts.map +1 -0
- package/dist/lib/native-capabilities/notifications.js +50 -0
- package/dist/lib/native-capabilities/power-session.d.ts +113 -0
- package/dist/lib/native-capabilities/power-session.d.ts.map +1 -0
- package/dist/lib/native-capabilities/power-session.js +264 -0
- package/dist/lib/native-capabilities/secure-storage.d.ts +36 -0
- package/dist/lib/native-capabilities/secure-storage.d.ts.map +1 -0
- package/dist/lib/native-capabilities/secure-storage.js +64 -0
- package/dist/lib/native-capabilities/serial-native.d.ts +23 -0
- package/dist/lib/native-capabilities/serial-native.d.ts.map +1 -0
- package/dist/lib/native-capabilities/serial-native.js +181 -0
- package/dist/lib/native-capabilities/serial.d.ts +76 -0
- package/dist/lib/native-capabilities/serial.d.ts.map +1 -0
- package/dist/lib/native-capabilities/serial.js +215 -0
- package/dist/lib/native-capabilities/system-audio.d.ts +127 -0
- package/dist/lib/native-capabilities/system-audio.d.ts.map +1 -0
- package/dist/lib/native-capabilities/system-audio.js +330 -0
- package/dist/lib/native-capabilities/types.d.ts +62 -0
- package/dist/lib/native-capabilities/types.d.ts.map +1 -0
- package/dist/lib/native-capabilities/types.js +27 -0
- package/dist/lib/native-capabilities/usb-native.d.ts +39 -0
- package/dist/lib/native-capabilities/usb-native.d.ts.map +1 -0
- package/dist/lib/native-capabilities/usb-native.js +217 -0
- package/dist/lib/native-capabilities/usb.d.ts +85 -0
- package/dist/lib/native-capabilities/usb.d.ts.map +1 -0
- package/dist/lib/native-capabilities/usb.js +225 -0
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +2 -1
- package/docs/README.md +39 -0
- package/docs/accessibility.md +32 -0
- package/docs/adaptive-materials.md +79 -0
- package/docs/app-anatomy.md +74 -0
- package/docs/component-catalog.md +82 -0
- package/docs/component-guide-template.md +37 -0
- package/docs/design-tokens.md +185 -0
- package/docs/foundations.md +58 -0
- package/docs/native-integration.md +33 -0
- package/docs/standalone-app-windows.md +136 -0
- package/package.json +8 -3
- package/src/components/ui/alert-dialog.md +31 -0
- package/src/components/ui/alert.md +77 -0
- package/src/components/ui/app-frame.md +38 -0
- package/src/components/ui/badge.md +57 -0
- package/src/components/ui/button.md +76 -0
- package/src/components/ui/collapsible.md +52 -0
- package/src/components/ui/color-well.md +11 -0
- package/src/components/ui/combobox.md +42 -0
- package/src/components/ui/command.md +54 -0
- package/src/components/ui/date-field.md +32 -0
- package/src/components/ui/date-picker.md +55 -0
- package/src/components/ui/dialog.md +40 -0
- package/src/components/ui/edge-fade.md +7 -0
- package/src/components/ui/empty.md +87 -0
- package/src/components/ui/field.md +77 -0
- package/src/components/ui/grid.md +109 -0
- package/src/components/ui/icon-button.md +36 -0
- package/src/components/ui/inspector.md +11 -0
- package/src/components/ui/item.md +87 -0
- package/src/components/ui/list.md +140 -0
- package/src/components/ui/material.md +51 -0
- package/src/components/ui/navigation-button-group.md +46 -0
- package/src/components/ui/notification-dot.md +7 -0
- package/src/components/ui/number-input.md +19 -0
- package/src/components/ui/panel.md +11 -0
- package/src/components/ui/popover.md +31 -0
- package/src/components/ui/resizable.md +66 -0
- package/src/components/ui/scroll-area.md +72 -0
- package/src/components/ui/search-field.md +33 -0
- package/src/components/ui/segmented-control.md +36 -0
- package/src/components/ui/sheet.md +30 -0
- package/src/components/ui/sidebar.md +113 -0
- package/src/components/ui/sonner.md +37 -0
- package/src/components/ui/split-view.md +15 -0
- package/src/components/ui/status.md +12 -0
- package/src/components/ui/table.md +37 -0
- package/src/components/ui/tabs.md +66 -0
- package/src/components/ui/text.md +17 -0
- package/src/components/ui/toggle-button.md +48 -0
- package/src/components/ui/toggle-group.md +80 -0
- package/src/components/ui/toggle.md +73 -0
- package/src/components/ui/toolbar.md +26 -0
- package/src/components/ui/tooltip.md +31 -0
- package/src/styles/index.css +704 -3
|
@@ -5,14 +5,16 @@ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogP
|
|
|
5
5
|
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
8
|
+
declare function DialogContent({ className, children, size, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
|
+
size?: 'sm' | 'default' | 'lg' | 'full';
|
|
9
10
|
showCloseButton?: boolean;
|
|
10
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DialogBody({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<'div'> & {
|
|
13
15
|
showCloseButton?: boolean;
|
|
14
16
|
}): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
19
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogBody, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
18
20
|
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnD;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAEtD;AAED,iBAAS,YAAY,CAAC,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{
|
|
20
20
|
return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50', className), ...props }));
|
|
21
21
|
}
|
|
22
|
-
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
23
|
-
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn('bg-background 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
|
|
22
|
+
function DialogContent({ className, children, size = 'default', showCloseButton = true, ...props }) {
|
|
23
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsx("div", { "data-slot": "dialog-positioner", className: "pointer-events-none fixed bottom-[max(var(--window-content-inset-bottom),var(--chat-safe-padding),1rem)] left-[max(var(--window-content-inset-inline-start),1rem)] right-[max(var(--window-content-inset-inline-end),1rem)] top-[max(var(--window-content-inset-top),1rem)] z-50 grid place-items-center", children: _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", "data-size": size, className: cn('bg-background rounded-overlay border-separator shadow-overlay pointer-events-auto relative grid max-h-full min-h-0 w-full gap-4 overflow-hidden border p-6 outline-none', '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', 'duration-[var(--motion-duration-normal)]', 'data-[size=default]:max-w-lg data-[size=lg]:max-w-2xl data-[size=sm]:max-w-sm', 'data-[size=full]:size-full data-[size=full]:max-w-none', className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", "aria-label": "Close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-control focus:outline-hidden 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:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:cursor-not-allowed [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", children: _jsx(XIcon, { "aria-hidden": "true" }) }))] }) })] }));
|
|
24
24
|
}
|
|
25
25
|
function DialogHeader({ className, ...props }) {
|
|
26
|
-
return (_jsx("div", { "data-slot": "dialog-header", className: cn('flex flex-col gap-2 text-center sm:text-left', className), ...props }));
|
|
26
|
+
return (_jsx("div", { "data-slot": "dialog-header", className: cn('flex shrink-0 flex-col gap-2 pr-8 text-center sm:text-left', className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
function DialogBody({ className, ...props }) {
|
|
29
|
+
return (_jsx("div", { "data-slot": "dialog-body", className: cn('min-h-0 overflow-y-auto overscroll-contain [scrollbar-gutter:stable]', className), ...props }));
|
|
27
30
|
}
|
|
28
31
|
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
29
|
-
return (_jsxs("div", { "data-slot": "dialog-footer", className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Close" }) }))] }));
|
|
32
|
+
return (_jsxs("div", { "data-slot": "dialog-footer", className: cn('flex shrink-0 flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:justify-end', className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Close" }) }))] }));
|
|
30
33
|
}
|
|
31
34
|
function DialogTitle({ className, ...props }) {
|
|
32
35
|
return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn('text-lg font-semibold leading-none', className), ...props }));
|
|
@@ -34,4 +37,4 @@ function DialogTitle({ className, ...props }) {
|
|
|
34
37
|
function DialogDescription({ className, ...props }) {
|
|
35
38
|
return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn('text-muted-foreground text-sm', className), ...props }));
|
|
36
39
|
}
|
|
37
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
40
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogBody, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const edgeFadeVariants: (props?: ({
|
|
4
|
+
edge?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface EdgeFadeProps extends React.ComponentProps<'div'>, VariantProps<typeof edgeFadeVariants> {
|
|
8
|
+
}
|
|
9
|
+
declare function EdgeFade({ edge, size, className, ...props }: EdgeFadeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { EdgeFade, edgeFadeVariants };
|
|
11
|
+
//# sourceMappingURL=edge-fade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-fade.d.ts","sourceRoot":"","sources":["../../../src/components/ui/edge-fade.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,gBAAgB;;;8EAmCrB,CAAA;AAED,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EACjC,YAAY,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAE5C,iBAAS,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAUnE;AAED,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
const edgeFadeVariants = cva('from-background pointer-events-none absolute z-10', {
|
|
6
|
+
variants: {
|
|
7
|
+
edge: {
|
|
8
|
+
top: 'inset-x-0 top-0 bg-gradient-to-b to-transparent',
|
|
9
|
+
bottom: 'inset-x-0 bottom-0 bg-gradient-to-t to-transparent',
|
|
10
|
+
left: 'inset-y-0 left-0 bg-gradient-to-r to-transparent',
|
|
11
|
+
right: 'inset-y-0 right-0 bg-gradient-to-l to-transparent',
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
sm: '',
|
|
15
|
+
default: '',
|
|
16
|
+
lg: '',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
compoundVariants: [
|
|
20
|
+
{ edge: 'top', size: 'sm', className: 'h-4' },
|
|
21
|
+
{ edge: 'top', size: 'default', className: 'h-8' },
|
|
22
|
+
{ edge: 'top', size: 'lg', className: 'h-12' },
|
|
23
|
+
{ edge: 'bottom', size: 'sm', className: 'h-4' },
|
|
24
|
+
{ edge: 'bottom', size: 'default', className: 'h-8' },
|
|
25
|
+
{ edge: 'bottom', size: 'lg', className: 'h-12' },
|
|
26
|
+
{ edge: 'left', size: 'sm', className: 'w-4' },
|
|
27
|
+
{ edge: 'left', size: 'default', className: 'w-8' },
|
|
28
|
+
{ edge: 'left', size: 'lg', className: 'w-12' },
|
|
29
|
+
{ edge: 'right', size: 'sm', className: 'w-4' },
|
|
30
|
+
{ edge: 'right', size: 'default', className: 'w-8' },
|
|
31
|
+
{ edge: 'right', size: 'lg', className: 'w-12' },
|
|
32
|
+
],
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
edge: 'bottom',
|
|
35
|
+
size: 'default',
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
function EdgeFade({ edge, size, className, ...props }) {
|
|
39
|
+
return (_jsx("div", { "aria-hidden": "true", "data-slot": "edge-fade", "data-edge": edge ?? 'bottom', className: cn(edgeFadeVariants({ edge, size }), className), ...props }));
|
|
40
|
+
}
|
|
41
|
+
export { EdgeFade, edgeFadeVariants };
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
declare
|
|
2
|
+
declare const emptyVariants: (props?: ({
|
|
3
|
+
variant?: "compact" | "full" | "pane" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
declare function Empty({ className, safeBottom, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof emptyVariants> & {
|
|
6
|
+
safeBottom?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
3
8
|
declare function EmptyHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
4
9
|
declare const emptyMediaVariants: (props?: ({
|
|
5
10
|
variant?: "default" | "icon" | null | undefined;
|
|
@@ -8,5 +13,5 @@ declare function EmptyMedia({ className, variant, ...props }: React.ComponentPro
|
|
|
8
13
|
declare function EmptyTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
14
|
declare function EmptyDescription({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
|
|
10
15
|
declare function EmptyContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, };
|
|
16
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, emptyVariants, };
|
|
12
17
|
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../src/components/ui/empty.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,iBAAS,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../src/components/ui/empty.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,aAAa;;8EAclB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,UAAkB,EAClB,OAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAC5B,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IACnC,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,2CAeF;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWxE;AAED,QAAA,MAAM,kBAAkB;;8EAavB,CAAA;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,2CASvE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAW3E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,aAAa,GACd,CAAA"}
|
|
@@ -2,11 +2,24 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from '../../lib/utils';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const emptyVariants = cva('group/empty flex min-w-0 flex-col items-center justify-center text-balance text-center', {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
compact: 'gap-3 p-4',
|
|
9
|
+
pane: 'flex-1 gap-4 p-6',
|
|
10
|
+
full: 'min-h-full flex-1 gap-6 p-8 md:p-10',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: 'pane',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
function Empty({ className, safeBottom = false, variant = 'pane', ...props }) {
|
|
18
|
+
return (_jsx("div", { "data-slot": "empty", "data-safe-bottom": safeBottom || undefined, "data-variant": variant, className: cn(emptyVariants({ variant }), safeBottom &&
|
|
19
|
+
'pb-[calc(var(--chat-safe-padding,0px)+var(--density-pane-padding))]', className), ...props }));
|
|
7
20
|
}
|
|
8
21
|
function EmptyHeader({ className, ...props }) {
|
|
9
|
-
return (_jsx("div", { "data-slot": "empty-header", className: cn('flex max-w-sm flex-col items-center gap-2 text-center', className), ...props }));
|
|
22
|
+
return (_jsx("div", { "data-slot": "empty-header", className: cn('flex max-w-sm flex-col items-center gap-2 text-center group-data-[variant=compact]/empty:gap-1.5', className), ...props }));
|
|
10
23
|
}
|
|
11
24
|
const emptyMediaVariants = cva('flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0', {
|
|
12
25
|
variants: {
|
|
@@ -23,12 +36,12 @@ function EmptyMedia({ className, variant = 'default', ...props }) {
|
|
|
23
36
|
return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })), ...props }));
|
|
24
37
|
}
|
|
25
38
|
function EmptyTitle({ className, ...props }) {
|
|
26
|
-
return (_jsx("div", { "data-slot": "empty-title", className: cn('
|
|
39
|
+
return (_jsx("div", { "data-slot": "empty-title", className: cn('font-medium tracking-tight group-data-[variant=compact]/empty:text-sm group-data-[variant=full]/empty:text-lg group-data-[variant=pane]/empty:text-base', className), ...props }));
|
|
27
40
|
}
|
|
28
41
|
function EmptyDescription({ className, ...props }) {
|
|
29
|
-
return (_jsx("
|
|
42
|
+
return (_jsx("p", { "data-slot": "empty-description", className: cn('text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed group-data-[variant=compact]/empty:text-xs/relaxed [&>a]:underline [&>a]:underline-offset-4', className), ...props }));
|
|
30
43
|
}
|
|
31
44
|
function EmptyContent({ className, ...props }) {
|
|
32
|
-
return (_jsx("div", { "data-slot": "empty-content", className: cn('flex w-full min-w-0 max-w-sm flex-col items-center gap-
|
|
45
|
+
return (_jsx("div", { "data-slot": "empty-content", className: cn('flex w-full min-w-0 max-w-sm flex-col items-center gap-3 text-balance text-sm group-data-[variant=compact]/empty:gap-2', className), ...props }));
|
|
33
46
|
}
|
|
34
|
-
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, };
|
|
47
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, emptyVariants, };
|
|
@@ -6,7 +6,7 @@ declare function FieldLegend({ className, variant, ...props }: React.ComponentPr
|
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
declare const fieldVariants: (props?: ({
|
|
9
|
-
orientation?: "
|
|
9
|
+
orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
declare function Field({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type GridSelectionMode = 'none' | 'single' | 'multiple';
|
|
3
|
+
type GridProps = Omit<React.ComponentProps<'div'>, 'defaultValue' | 'onChange'> & {
|
|
4
|
+
columns?: number;
|
|
5
|
+
selectionMode?: GridSelectionMode;
|
|
6
|
+
selectedValues?: Iterable<string>;
|
|
7
|
+
defaultSelectedValues?: Iterable<string>;
|
|
8
|
+
onSelectionChange?: (values: ReadonlySet<string>) => void;
|
|
9
|
+
onAction?: (value: string) => void;
|
|
10
|
+
loop?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare function Grid({ className, children, columns, selectionMode, selectedValues, defaultSelectedValues, onSelectionChange, onAction, loop, disabled, onKeyDown, style, ref, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
type GridItemProps = Omit<React.ComponentProps<'div'>, 'value'> & {
|
|
15
|
+
value: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare function GridItem({ className, children, value, disabled, onClick, onDoubleClick, onFocus, ref, ...props }: GridItemProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function GridItemMedia({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function GridItemContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function GridItemTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function GridItemDescription({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { Grid, GridItem, GridItemContent, GridItemDescription, GridItemMedia, GridItemTitle, type GridProps, type GridSelectionMode, };
|
|
24
|
+
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/components/ui/grid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,KAAK,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAA;AAuCvD,KAAK,SAAS,GAAG,IAAI,CACnB,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,cAAc,GAAG,UAAU,CAC5B,GAAG;IACF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC,cAAc,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IACjC,qBAAqB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IACxC,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IACzD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,QAAQ,EACR,OAAW,EACX,aAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,IAAY,EACZ,QAAgB,EAChB,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,2CAsRX;AAED,KAAK,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IAChE,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,OAAO,EACP,aAAa,EACb,OAAO,EACP,GAAG,EACH,GAAG,KAAK,EACT,EAAE,aAAa,2CA4Ef;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW1E;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ5E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ1E;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAQ3B;AAED,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,KAAK,SAAS,EACd,KAAK,iBAAiB,GACvB,CAAA"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { getCollectionItemsInDomOrder, isInteractiveDescendant, } from './collection-navigation';
|
|
6
|
+
const GridContext = React.createContext(null);
|
|
7
|
+
function useGridContext(component) {
|
|
8
|
+
const context = React.useContext(GridContext);
|
|
9
|
+
if (!context) {
|
|
10
|
+
throw new Error(`${component} must be used inside Grid`);
|
|
11
|
+
}
|
|
12
|
+
return context;
|
|
13
|
+
}
|
|
14
|
+
function toSelection(values) {
|
|
15
|
+
return new Set(values ?? []);
|
|
16
|
+
}
|
|
17
|
+
function sameSelection(a, b) {
|
|
18
|
+
if (a.size !== b.size)
|
|
19
|
+
return false;
|
|
20
|
+
for (const value of a) {
|
|
21
|
+
if (!b.has(value))
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
function Grid({ className, children, columns = 1, selectionMode = 'none', selectedValues, defaultSelectedValues, onSelectionChange, onAction, loop = false, disabled = false, onKeyDown, style, ref, ...props }) {
|
|
27
|
+
const itemsRef = React.useRef(new Map());
|
|
28
|
+
const [activeValue, setActiveValueState] = React.useState(null);
|
|
29
|
+
const [uncontrolledSelection, setUncontrolledSelection] = React.useState(() => toSelection(defaultSelectedValues));
|
|
30
|
+
const controlledSelection = React.useMemo(() => selectedValues === undefined ? undefined : toSelection(selectedValues), [selectedValues]);
|
|
31
|
+
const selection = controlledSelection ?? uncontrolledSelection;
|
|
32
|
+
const safeColumns = Math.max(1, Math.floor(columns));
|
|
33
|
+
const childItems = React.Children.toArray(children);
|
|
34
|
+
const rows = Array.from({ length: Math.ceil(childItems.length / safeColumns) }, (_, index) => childItems.slice(index * safeColumns, (index + 1) * safeColumns));
|
|
35
|
+
const registerItem = React.useCallback((value, node, itemDisabled) => {
|
|
36
|
+
if (!node)
|
|
37
|
+
return () => undefined;
|
|
38
|
+
itemsRef.current.set(value, { node, disabled: itemDisabled });
|
|
39
|
+
return () => {
|
|
40
|
+
itemsRef.current.delete(value);
|
|
41
|
+
setActiveValueState((current) => (current === value ? null : current));
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
44
|
+
React.useLayoutEffect(() => {
|
|
45
|
+
const items = getCollectionItemsInDomOrder(itemsRef.current).filter(([, item]) => !disabled && !item.disabled);
|
|
46
|
+
setActiveValueState((current) => {
|
|
47
|
+
if (current && items.some(([value]) => value === current))
|
|
48
|
+
return current;
|
|
49
|
+
return (items.find(([value]) => selection.has(value))?.[0] ??
|
|
50
|
+
items[0]?.[0] ??
|
|
51
|
+
null);
|
|
52
|
+
});
|
|
53
|
+
}, [children, disabled, selection]);
|
|
54
|
+
const setActiveValue = React.useCallback((value) => {
|
|
55
|
+
const item = itemsRef.current.get(value);
|
|
56
|
+
if (item && !item.disabled)
|
|
57
|
+
setActiveValueState(value);
|
|
58
|
+
}, []);
|
|
59
|
+
const commitSelection = React.useCallback((next) => {
|
|
60
|
+
if (sameSelection(selection, next))
|
|
61
|
+
return;
|
|
62
|
+
if (controlledSelection === undefined)
|
|
63
|
+
setUncontrolledSelection(next);
|
|
64
|
+
onSelectionChange?.(next);
|
|
65
|
+
}, [controlledSelection, onSelectionChange, selection]);
|
|
66
|
+
const select = React.useCallback((value) => {
|
|
67
|
+
if (disabled || selectionMode === 'none')
|
|
68
|
+
return;
|
|
69
|
+
const item = itemsRef.current.get(value);
|
|
70
|
+
if (!item || item.disabled)
|
|
71
|
+
return;
|
|
72
|
+
if (selectionMode === 'single') {
|
|
73
|
+
commitSelection(new Set([value]));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const next = new Set(selection);
|
|
77
|
+
if (next.has(value))
|
|
78
|
+
next.delete(value);
|
|
79
|
+
else
|
|
80
|
+
next.add(value);
|
|
81
|
+
commitSelection(next);
|
|
82
|
+
}, [commitSelection, disabled, selection, selectionMode]);
|
|
83
|
+
const activate = React.useCallback((value) => {
|
|
84
|
+
if (disabled || itemsRef.current.get(value)?.disabled)
|
|
85
|
+
return;
|
|
86
|
+
onAction?.(value);
|
|
87
|
+
}, [disabled, onAction]);
|
|
88
|
+
const moveFocus = React.useCallback((direction) => {
|
|
89
|
+
const entries = getCollectionItemsInDomOrder(itemsRef.current);
|
|
90
|
+
if (entries.length === 0)
|
|
91
|
+
return;
|
|
92
|
+
const currentIndex = entries.findIndex(([value]) => value === activeValue);
|
|
93
|
+
const enabledAt = (index) => entries[index] && !disabled && !entries[index][1].disabled;
|
|
94
|
+
const startIndex = currentIndex < 0 ? 0 : currentIndex;
|
|
95
|
+
const currentRow = Math.floor(startIndex / safeColumns);
|
|
96
|
+
const currentColumn = startIndex % safeColumns;
|
|
97
|
+
const rowStart = currentRow * safeColumns;
|
|
98
|
+
const rowEnd = Math.min(entries.length - 1, rowStart + safeColumns - 1);
|
|
99
|
+
let candidates = [];
|
|
100
|
+
if (direction === 'first') {
|
|
101
|
+
candidates = Array.from({ length: entries.length }, (_, index) => index);
|
|
102
|
+
}
|
|
103
|
+
else if (direction === 'last') {
|
|
104
|
+
candidates = Array.from({ length: entries.length }, (_, index) => entries.length - index - 1);
|
|
105
|
+
}
|
|
106
|
+
else if (direction === 'row-first') {
|
|
107
|
+
candidates = Array.from({ length: rowEnd - rowStart + 1 }, (_, index) => rowStart + index);
|
|
108
|
+
}
|
|
109
|
+
else if (direction === 'row-last') {
|
|
110
|
+
candidates = Array.from({ length: rowEnd - rowStart + 1 }, (_, index) => rowEnd - index);
|
|
111
|
+
}
|
|
112
|
+
else if (direction === 'left' || direction === 'right') {
|
|
113
|
+
const step = direction === 'left' ? -1 : 1;
|
|
114
|
+
for (let index = startIndex + step; index >= rowStart && index <= rowEnd; index += step) {
|
|
115
|
+
candidates.push(index);
|
|
116
|
+
}
|
|
117
|
+
if (loop && candidates.length === 0) {
|
|
118
|
+
candidates =
|
|
119
|
+
direction === 'left'
|
|
120
|
+
? Array.from({ length: entries.length }, (_, index) => (startIndex - index - 1 + entries.length) % entries.length)
|
|
121
|
+
: Array.from({ length: entries.length }, (_, index) => (startIndex + index + 1) % entries.length);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
const step = direction === 'up' ? -safeColumns : safeColumns;
|
|
126
|
+
for (let index = startIndex + step; index >= 0 && index < entries.length; index += step) {
|
|
127
|
+
candidates.push(index);
|
|
128
|
+
}
|
|
129
|
+
if (loop && candidates.length === 0) {
|
|
130
|
+
const sameColumn = entries
|
|
131
|
+
.map((_, index) => index)
|
|
132
|
+
.filter((index) => index % safeColumns === currentColumn);
|
|
133
|
+
candidates = direction === 'up' ? sameColumn.reverse() : sameColumn;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const nextIndex = candidates.find(enabledAt);
|
|
137
|
+
if (nextIndex === undefined || nextIndex === currentIndex)
|
|
138
|
+
return;
|
|
139
|
+
const [value, item] = entries[nextIndex];
|
|
140
|
+
setActiveValueState(value);
|
|
141
|
+
item.node.focus();
|
|
142
|
+
}, [activeValue, disabled, loop, safeColumns]);
|
|
143
|
+
const handleKeyDown = (event) => {
|
|
144
|
+
onKeyDown?.(event);
|
|
145
|
+
if (event.defaultPrevented || disabled)
|
|
146
|
+
return;
|
|
147
|
+
const target = event.target;
|
|
148
|
+
if (target.dataset.slot !== 'grid-item')
|
|
149
|
+
return;
|
|
150
|
+
const movement = {
|
|
151
|
+
ArrowLeft: 'left',
|
|
152
|
+
ArrowRight: 'right',
|
|
153
|
+
ArrowUp: 'up',
|
|
154
|
+
ArrowDown: 'down',
|
|
155
|
+
};
|
|
156
|
+
const direction = movement[event.key];
|
|
157
|
+
if (direction !== undefined) {
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
moveFocus(direction);
|
|
160
|
+
}
|
|
161
|
+
else if (event.key === 'Home' || event.key === 'End') {
|
|
162
|
+
event.preventDefault();
|
|
163
|
+
if (event.ctrlKey || event.metaKey) {
|
|
164
|
+
moveFocus(event.key === 'Home' ? 'first' : 'last');
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
moveFocus(event.key === 'Home' ? 'row-first' : 'row-last');
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
else if (event.key === ' ') {
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
if (activeValue)
|
|
173
|
+
select(activeValue);
|
|
174
|
+
}
|
|
175
|
+
else if (event.key === 'Enter' && activeValue) {
|
|
176
|
+
event.preventDefault();
|
|
177
|
+
if (selectionMode !== 'none')
|
|
178
|
+
select(activeValue);
|
|
179
|
+
activate(activeValue);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
const context = React.useMemo(() => ({
|
|
183
|
+
activeValue,
|
|
184
|
+
disabled,
|
|
185
|
+
isSelected: (value) => selection.has(value),
|
|
186
|
+
registerItem,
|
|
187
|
+
select,
|
|
188
|
+
selectionMode,
|
|
189
|
+
setActiveValue,
|
|
190
|
+
activate,
|
|
191
|
+
}), [
|
|
192
|
+
activeValue,
|
|
193
|
+
activate,
|
|
194
|
+
disabled,
|
|
195
|
+
registerItem,
|
|
196
|
+
select,
|
|
197
|
+
selection,
|
|
198
|
+
selectionMode,
|
|
199
|
+
setActiveValue,
|
|
200
|
+
]);
|
|
201
|
+
return (_jsx(GridContext.Provider, { value: context, children: _jsx("div", { ref: ref, role: "grid", "aria-colcount": safeColumns, "aria-rowcount": rows.length, "aria-disabled": disabled || undefined, "aria-multiselectable": selectionMode === 'multiple' ? true : undefined, "data-slot": "grid", "data-columns": safeColumns, "data-disabled": disabled || undefined, "data-selection-mode": selectionMode, style: {
|
|
202
|
+
'--grid-columns': safeColumns,
|
|
203
|
+
...style,
|
|
204
|
+
}, className: cn('grid min-w-0 grid-cols-[repeat(var(--grid-columns),minmax(0,1fr))] gap-2 outline-none', className), onKeyDown: handleKeyDown, ...props, children: rows.map((row, index) => (_jsx("div", { role: "row", className: "col-span-full grid grid-cols-subgrid gap-[inherit]", children: row }, `grid-row-${index}`))) }) }));
|
|
205
|
+
}
|
|
206
|
+
function GridItem({ className, children, value, disabled = false, onClick, onDoubleClick, onFocus, ref, ...props }) {
|
|
207
|
+
const context = useGridContext('GridItem');
|
|
208
|
+
const { registerItem } = context;
|
|
209
|
+
const itemRef = React.useRef(null);
|
|
210
|
+
const isDisabled = context.disabled || disabled;
|
|
211
|
+
const isSelected = context.isSelected(value);
|
|
212
|
+
const isActive = context.activeValue === value;
|
|
213
|
+
const setRef = React.useCallback((node) => {
|
|
214
|
+
itemRef.current = node;
|
|
215
|
+
if (typeof ref === 'function')
|
|
216
|
+
ref(node);
|
|
217
|
+
else if (ref)
|
|
218
|
+
ref.current = node;
|
|
219
|
+
}, [ref]);
|
|
220
|
+
React.useLayoutEffect(() => registerItem(value, itemRef.current, isDisabled), [isDisabled, registerItem, value]);
|
|
221
|
+
return (_jsx("div", { ref: setRef, role: "gridcell", tabIndex: isDisabled ? -1 : isActive ? 0 : -1, "aria-disabled": isDisabled || undefined, "aria-selected": context.selectionMode === 'none' ? undefined : isSelected, "data-slot": "grid-item", "data-active": isActive || undefined, "data-disabled": isDisabled || undefined, "data-selected": context.selectionMode === 'none' ? undefined : isSelected, "data-value": value, className: cn('group/grid-item border-border bg-card text-card-foreground relative min-w-0 cursor-default select-none overflow-hidden rounded-lg border outline-none transition-[background-color,border-color,box-shadow] duration-100', 'hover:bg-accent/40 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]', 'data-[selected=true]:border-ring data-[selected=true]:bg-accent/60', 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50', className), onClick: (event) => {
|
|
222
|
+
onClick?.(event);
|
|
223
|
+
if (event.defaultPrevented ||
|
|
224
|
+
isDisabled ||
|
|
225
|
+
isInteractiveDescendant(event.target, event.currentTarget)) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
context.setActiveValue(value);
|
|
229
|
+
event.currentTarget.focus();
|
|
230
|
+
context.select(value);
|
|
231
|
+
}, onDoubleClick: (event) => {
|
|
232
|
+
onDoubleClick?.(event);
|
|
233
|
+
if (event.defaultPrevented ||
|
|
234
|
+
isDisabled ||
|
|
235
|
+
isInteractiveDescendant(event.target, event.currentTarget)) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
context.activate(value);
|
|
239
|
+
}, onFocus: (event) => {
|
|
240
|
+
onFocus?.(event);
|
|
241
|
+
if (!event.defaultPrevented && !isDisabled) {
|
|
242
|
+
context.setActiveValue(value);
|
|
243
|
+
}
|
|
244
|
+
}, ...props, children: children }));
|
|
245
|
+
}
|
|
246
|
+
function GridItemMedia({ className, ...props }) {
|
|
247
|
+
return (_jsx("div", { "data-slot": "grid-item-media", className: cn('bg-muted aspect-[4/3] overflow-hidden [&>img]:size-full [&>img]:object-cover', className), ...props }));
|
|
248
|
+
}
|
|
249
|
+
function GridItemContent({ className, ...props }) {
|
|
250
|
+
return (_jsx("div", { "data-slot": "grid-item-content", className: cn('min-w-0 p-3', className), ...props }));
|
|
251
|
+
}
|
|
252
|
+
function GridItemTitle({ className, ...props }) {
|
|
253
|
+
return (_jsx("div", { "data-slot": "grid-item-title", className: cn('truncate text-sm font-medium', className), ...props }));
|
|
254
|
+
}
|
|
255
|
+
function GridItemDescription({ className, ...props }) {
|
|
256
|
+
return (_jsx("p", { "data-slot": "grid-item-description", className: cn('text-muted-foreground mt-0.5 truncate text-xs', className), ...props }));
|
|
257
|
+
}
|
|
258
|
+
export { Grid, GridItem, GridItemContent, GridItemDescription, GridItemMedia, GridItemTitle, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from './button';
|
|
3
|
+
type IconButtonSize = 'xs' | 'sm' | 'default' | 'lg';
|
|
4
|
+
interface IconButtonProps extends Omit<React.ComponentProps<typeof Button>, 'aria-label' | 'asChild' | 'size'> {
|
|
5
|
+
/** Required accessible name for the icon-only control. */
|
|
6
|
+
label: string;
|
|
7
|
+
size?: IconButtonSize;
|
|
8
|
+
shape?: 'rounded' | 'circle';
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
/** Adds a native hover hint. Prefer a shared Tooltip in dense toolbars. */
|
|
11
|
+
tooltip?: string | boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function IconButton({ children, className, disabled, label, loading, shape, size, tooltip, type, ...props }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { IconButton, type IconButtonProps, type IconButtonSize };
|
|
15
|
+
//# sourceMappingURL=icon-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/icon-button.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,KAAK,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;AASpD,UAAU,eACR,SAAQ,IAAI,CACV,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EACnC,YAAY,GAAG,SAAS,GAAG,MAAM,CAClC;IACD,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAC3B;AAED,iBAAS,UAAU,CAAC,EAClB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,KAAK,EACL,OAAe,EACf,KAAiB,EACjB,IAAgB,EAChB,OAAO,EACP,IAAe,EACf,GAAG,KAAK,EACT,EAAE,eAAe,2CAqBjB;AAED,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { LoaderCircleIcon } from 'lucide-react';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { Button } from './button';
|
|
6
|
+
const buttonSizeByIconSize = {
|
|
7
|
+
xs: 'icon-xs',
|
|
8
|
+
sm: 'icon-sm',
|
|
9
|
+
default: 'icon',
|
|
10
|
+
lg: 'icon-lg',
|
|
11
|
+
};
|
|
12
|
+
function IconButton({ children, className, disabled, label, loading = false, shape = 'rounded', size = 'default', tooltip, type = 'button', ...props }) {
|
|
13
|
+
return (_jsx(Button, { "data-slot": "icon-button", "data-loading": loading || undefined, "aria-busy": loading || undefined, "aria-label": label, title: tooltip === true ? label : tooltip || undefined, type: type, size: buttonSizeByIconSize[size], disabled: disabled || loading, className: cn(shape === 'circle' && 'rounded-full', className), ...props, children: loading ? (_jsx(LoaderCircleIcon, { "aria-hidden": "true", className: "animate-spin" })) : (children) }));
|
|
14
|
+
}
|
|
15
|
+
export { IconButton };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './accordion';
|
|
2
2
|
export * from './alert';
|
|
3
3
|
export * from './alert-dialog';
|
|
4
|
+
export * from './app-frame';
|
|
4
5
|
export * from './aspect-ratio';
|
|
5
6
|
export * from './avatar';
|
|
6
7
|
export * from './badge';
|
|
@@ -13,42 +14,64 @@ export * from './carousel';
|
|
|
13
14
|
export * from './chart';
|
|
14
15
|
export * from './checkbox';
|
|
15
16
|
export * from './collapsible';
|
|
17
|
+
export * from './color-well';
|
|
18
|
+
export * from './combobox';
|
|
16
19
|
export * from './command';
|
|
20
|
+
export * from './confirm-dialog';
|
|
17
21
|
export * from './context-menu';
|
|
18
22
|
export * from './dialog';
|
|
19
23
|
export * from './drawer';
|
|
20
24
|
export * from './dropdown-menu';
|
|
25
|
+
export * from './date-field';
|
|
26
|
+
export * from './date-picker';
|
|
21
27
|
export * from './empty';
|
|
28
|
+
export * from './edge-fade';
|
|
22
29
|
export * from './field';
|
|
23
30
|
export * from './form';
|
|
31
|
+
export * from './grid';
|
|
24
32
|
export * from './hover-card';
|
|
33
|
+
export * from './icon-button';
|
|
25
34
|
export * from './input';
|
|
26
35
|
export * from './input-group';
|
|
27
36
|
export * from './input-otp';
|
|
37
|
+
export * from './inspector';
|
|
28
38
|
export * from './item';
|
|
29
39
|
export * from './kbd';
|
|
30
40
|
export * from './label';
|
|
41
|
+
export * from './list';
|
|
31
42
|
export * from './menubar';
|
|
43
|
+
export * from './material';
|
|
44
|
+
export * from './message-scroller';
|
|
32
45
|
export * from './navigation-menu';
|
|
46
|
+
export * from './navigation-button-group';
|
|
47
|
+
export * from './notification-dot';
|
|
48
|
+
export * from './number-input';
|
|
33
49
|
export * from './pagination';
|
|
50
|
+
export * from './panel';
|
|
34
51
|
export * from './popover';
|
|
35
52
|
export * from './progress';
|
|
36
53
|
export * from './radio-group';
|
|
37
54
|
export * from './resizable';
|
|
38
55
|
export * from './scroll-area';
|
|
56
|
+
export * from './search-field';
|
|
39
57
|
export * from './select';
|
|
58
|
+
export * from './segmented-control';
|
|
40
59
|
export * from './separator';
|
|
41
60
|
export * from './sheet';
|
|
42
61
|
export * from './sidebar';
|
|
43
62
|
export * from './skeleton';
|
|
44
63
|
export * from './slider';
|
|
45
64
|
export * from './sonner';
|
|
65
|
+
export * from './split-view';
|
|
46
66
|
export * from './spinner';
|
|
67
|
+
export * from './status';
|
|
47
68
|
export * from './switch';
|
|
48
69
|
export * from './table';
|
|
49
70
|
export * from './tabs';
|
|
50
71
|
export * from './textarea';
|
|
72
|
+
export * from './text';
|
|
51
73
|
export * from './toggle';
|
|
52
74
|
export * from './toggle-group';
|
|
75
|
+
export * from './toolbar';
|
|
53
76
|
export * from './tooltip';
|
|
54
77
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AAC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