@moldable-ai/ui 0.2.19 → 0.2.20
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-manifest.d.ts +6 -0
- package/dist/catalog/catalog-manifest.d.ts.map +1 -0
- package/dist/catalog/catalog-manifest.js +105 -0
- package/dist/catalog/catalog-types.d.ts +54 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -0
- package/dist/catalog/catalog-types.js +14 -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 +39 -0
- package/dist/catalog/core-catalog.d.ts +6 -0
- package/dist/catalog/core-catalog.d.ts.map +1 -0
- package/dist/catalog/core-catalog.js +105 -0
- package/dist/catalog/index.d.ts +5 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +4 -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 +50 -6
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +200 -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/app-frame.d.ts +22 -0
- package/dist/components/ui/app-frame.d.ts.map +1 -0
- package/dist/components/ui/app-frame.js +56 -0
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- 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/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/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.js +1 -1
- 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 +234 -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 +19 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +19 -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 +24 -0
- package/dist/components/ui/list.d.ts.map +1 -0
- package/dist/components/ui/list.js +224 -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.d.ts +11 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +37 -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.js +1 -1
- 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 +61 -0
- 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 +28 -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.js +1 -1
- package/dist/components/ui/toolbar.d.ts +20 -0
- package/dist/components/ui/toolbar.d.ts.map +1 -0
- package/dist/components/ui/toolbar.js +52 -0
- 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 +28 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +84 -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/docs/README.md +37 -0
- package/docs/accessibility.md +32 -0
- package/docs/app-anatomy.md +72 -0
- package/docs/component-catalog.md +59 -0
- package/docs/component-guide-template.md +37 -0
- package/docs/design-tokens.md +172 -0
- package/docs/foundations.md +56 -0
- package/docs/native-integration.md +33 -0
- package/docs/standalone-app-windows.md +128 -0
- package/package.json +9 -3
- package/src/components/ui/alert.md +55 -0
- package/src/components/ui/app-frame.md +33 -0
- package/src/components/ui/badge.md +57 -0
- package/src/components/ui/button.md +76 -0
- package/src/components/ui/color-well.md +11 -0
- package/src/components/ui/combobox.md +43 -0
- package/src/components/ui/date-field.md +32 -0
- package/src/components/ui/edge-fade.md +7 -0
- package/src/components/ui/empty.md +82 -0
- package/src/components/ui/field.md +77 -0
- package/src/components/ui/grid.md +105 -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 +107 -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/resizable.md +66 -0
- package/src/components/ui/scroll-area.md +68 -0
- package/src/components/ui/search-field.md +33 -0
- package/src/components/ui/segmented-control.md +39 -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 +35 -0
- package/src/components/ui/tabs.md +66 -0
- package/src/components/ui/text.md +17 -0
- package/src/components/ui/toggle-group.md +80 -0
- package/src/components/ui/toggle.md +73 -0
- package/src/components/ui/toolbar.md +21 -0
- package/src/styles/index.css +491 -3
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CalendarDaysIcon, XIcon } from 'lucide-react';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
import { IconButton } from './icon-button';
|
|
7
|
+
import { cva } from 'class-variance-authority';
|
|
8
|
+
const dateFieldVariants = cva('group/date-field border-input focus-within:border-ring focus-within:ring-ring/50 flex w-full min-w-0 items-center rounded-md border text-foreground shadow-xs transition-[background-color,border-color,box-shadow] focus-within:ring-[3px] has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-destructive/20', {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: 'bg-background',
|
|
12
|
+
filled: 'border-transparent bg-muted/70 shadow-none',
|
|
13
|
+
},
|
|
14
|
+
density: {
|
|
15
|
+
compact: 'h-7',
|
|
16
|
+
default: 'h-9',
|
|
17
|
+
comfortable: 'h-10',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: 'default',
|
|
22
|
+
density: 'default',
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
function DateField({ className, inputClassName, value, defaultValue = '', onChange, onValueChange, onClear, clearable = false, clearLabel = 'Clear date', variant = 'default', density = 'default', disabled, readOnly, ref, ...props }) {
|
|
26
|
+
const controlled = value !== undefined;
|
|
27
|
+
const [internalValue, setInternalValue] = React.useState(defaultValue);
|
|
28
|
+
const inputRef = React.useRef(null);
|
|
29
|
+
const currentValue = controlled ? value : internalValue;
|
|
30
|
+
const setRefs = React.useCallback((node) => {
|
|
31
|
+
inputRef.current = node;
|
|
32
|
+
if (typeof ref === 'function')
|
|
33
|
+
ref(node);
|
|
34
|
+
else if (ref)
|
|
35
|
+
ref.current = node;
|
|
36
|
+
}, [ref]);
|
|
37
|
+
const commitValue = React.useCallback((nextValue) => {
|
|
38
|
+
if (!controlled)
|
|
39
|
+
setInternalValue(nextValue);
|
|
40
|
+
onValueChange?.(nextValue);
|
|
41
|
+
}, [controlled, onValueChange]);
|
|
42
|
+
const clear = React.useCallback(() => {
|
|
43
|
+
if (!currentValue)
|
|
44
|
+
return;
|
|
45
|
+
commitValue('');
|
|
46
|
+
onClear?.();
|
|
47
|
+
inputRef.current?.focus();
|
|
48
|
+
}, [commitValue, currentValue, onClear]);
|
|
49
|
+
return (_jsxs("div", { "data-slot": "date-field", "data-density": density, "data-variant": variant, "data-disabled": disabled || undefined, "data-readonly": readOnly || undefined, className: cn(dateFieldVariants({ variant, density }), disabled && 'cursor-not-allowed opacity-50', className), children: [_jsx(CalendarDaysIcon, { "aria-hidden": "true", className: cn('text-muted-foreground pointer-events-none ml-2.5 shrink-0', density === 'compact' ? 'size-3.5' : 'size-4') }), _jsx("input", { ref: setRefs, "data-slot": "date-field-input", type: "date", value: currentValue, disabled: disabled, readOnly: readOnly, className: cn('min-w-0 flex-1 bg-transparent px-2 text-sm outline-none dark:[color-scheme:dark] [&::-webkit-calendar-picker-indicator]:cursor-pointer [&::-webkit-calendar-picker-indicator]:opacity-60 [&::-webkit-calendar-picker-indicator]:hover:opacity-100', density === 'compact' && 'text-xs', inputClassName), onChange: (event) => {
|
|
50
|
+
onChange?.(event);
|
|
51
|
+
commitValue(event.currentTarget.value);
|
|
52
|
+
}, ...props }), clearable && currentValue && !readOnly ? (_jsx(IconButton, { label: clearLabel, size: "xs", variant: "ghost", disabled: disabled, className: "mr-0.5 shrink-0", onClick: clear, children: _jsx(XIcon, {}) })) : null] }));
|
|
53
|
+
}
|
|
54
|
+
export { DateField, dateFieldVariants };
|
|
@@ -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 };
|
|
@@ -26,7 +26,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
26
26
|
return (_jsx("div", { "data-slot": "empty-title", className: cn('text-lg font-medium tracking-tight', className), ...props }));
|
|
27
27
|
}
|
|
28
28
|
function EmptyDescription({ className, ...props }) {
|
|
29
|
-
return (_jsx("
|
|
29
|
+
return (_jsx("p", { "data-slot": "empty-description", className: cn('text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4', className), ...props }));
|
|
30
30
|
}
|
|
31
31
|
function EmptyContent({ className, ...props }) {
|
|
32
32
|
return (_jsx("div", { "data-slot": "empty-content", className: cn('flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm', className), ...props }));
|
|
@@ -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;AAG9B,KAAK,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAA;AAmDvD,KAAK,SAAS,GAAG,IA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AAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;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,234 @@
|
|
|
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
|
+
const GridContext = React.createContext(null);
|
|
6
|
+
function useGridContext(component) {
|
|
7
|
+
const context = React.useContext(GridContext);
|
|
8
|
+
if (!context) {
|
|
9
|
+
throw new Error(`${component} must be used inside Grid`);
|
|
10
|
+
}
|
|
11
|
+
return context;
|
|
12
|
+
}
|
|
13
|
+
function toSelection(values) {
|
|
14
|
+
return new Set(values ?? []);
|
|
15
|
+
}
|
|
16
|
+
function sameSelection(a, b) {
|
|
17
|
+
if (a.size !== b.size)
|
|
18
|
+
return false;
|
|
19
|
+
for (const value of a) {
|
|
20
|
+
if (!b.has(value))
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
function isInteractiveDescendant(target, currentTarget) {
|
|
26
|
+
if (!(target instanceof HTMLElement) || target === currentTarget)
|
|
27
|
+
return false;
|
|
28
|
+
return Boolean(target.closest('a,button,input,select,textarea,[contenteditable="true"],[role="button"],[role="link"]'));
|
|
29
|
+
}
|
|
30
|
+
function Grid({ className, children, columns = 1, selectionMode = 'none', selectedValues, defaultSelectedValues, onSelectionChange, onAction, loop = false, disabled = false, onKeyDown, style, ref, ...props }) {
|
|
31
|
+
const itemsRef = React.useRef(new Map());
|
|
32
|
+
const [activeValue, setActiveValueState] = React.useState(null);
|
|
33
|
+
const [uncontrolledSelection, setUncontrolledSelection] = React.useState(() => toSelection(defaultSelectedValues));
|
|
34
|
+
const controlledSelection = React.useMemo(() => selectedValues === undefined ? undefined : toSelection(selectedValues), [selectedValues]);
|
|
35
|
+
const selection = controlledSelection ?? uncontrolledSelection;
|
|
36
|
+
const safeColumns = Math.max(1, Math.floor(columns));
|
|
37
|
+
const childItems = React.Children.toArray(children);
|
|
38
|
+
const rows = Array.from({ length: Math.ceil(childItems.length / safeColumns) }, (_, index) => childItems.slice(index * safeColumns, (index + 1) * safeColumns));
|
|
39
|
+
const registerItem = React.useCallback((value, node, itemDisabled) => {
|
|
40
|
+
if (!node)
|
|
41
|
+
return () => undefined;
|
|
42
|
+
itemsRef.current.set(value, { node, disabled: itemDisabled });
|
|
43
|
+
if (!disabled && !itemDisabled) {
|
|
44
|
+
setActiveValueState((current) => current ?? value);
|
|
45
|
+
}
|
|
46
|
+
return () => {
|
|
47
|
+
itemsRef.current.delete(value);
|
|
48
|
+
setActiveValueState((current) => {
|
|
49
|
+
if (current !== value)
|
|
50
|
+
return current;
|
|
51
|
+
return ([...itemsRef.current.entries()].find(([, item]) => !disabled && !item.disabled)?.[0] ?? null);
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
}, [disabled]);
|
|
55
|
+
const setActiveValue = React.useCallback((value) => {
|
|
56
|
+
const item = itemsRef.current.get(value);
|
|
57
|
+
if (item && !item.disabled)
|
|
58
|
+
setActiveValueState(value);
|
|
59
|
+
}, []);
|
|
60
|
+
const commitSelection = React.useCallback((next) => {
|
|
61
|
+
if (sameSelection(selection, next))
|
|
62
|
+
return;
|
|
63
|
+
if (controlledSelection === undefined)
|
|
64
|
+
setUncontrolledSelection(next);
|
|
65
|
+
onSelectionChange?.(next);
|
|
66
|
+
}, [controlledSelection, onSelectionChange, selection]);
|
|
67
|
+
const select = React.useCallback((value) => {
|
|
68
|
+
if (disabled || selectionMode === 'none')
|
|
69
|
+
return;
|
|
70
|
+
const item = itemsRef.current.get(value);
|
|
71
|
+
if (!item || item.disabled)
|
|
72
|
+
return;
|
|
73
|
+
if (selectionMode === 'single') {
|
|
74
|
+
commitSelection(new Set([value]));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const next = new Set(selection);
|
|
78
|
+
if (next.has(value))
|
|
79
|
+
next.delete(value);
|
|
80
|
+
else
|
|
81
|
+
next.add(value);
|
|
82
|
+
commitSelection(next);
|
|
83
|
+
}, [commitSelection, disabled, selection, selectionMode]);
|
|
84
|
+
const activate = React.useCallback((value) => {
|
|
85
|
+
if (disabled || itemsRef.current.get(value)?.disabled)
|
|
86
|
+
return;
|
|
87
|
+
onAction?.(value);
|
|
88
|
+
}, [disabled, onAction]);
|
|
89
|
+
const moveFocus = React.useCallback((offset) => {
|
|
90
|
+
const entries = [...itemsRef.current.entries()];
|
|
91
|
+
if (entries.length === 0)
|
|
92
|
+
return;
|
|
93
|
+
const currentIndex = entries.findIndex(([value]) => value === activeValue);
|
|
94
|
+
const enabledAt = (index) => entries[index] && !disabled && !entries[index][1].disabled;
|
|
95
|
+
let nextIndex = offset === 'first'
|
|
96
|
+
? 0
|
|
97
|
+
: offset === 'last'
|
|
98
|
+
? entries.length - 1
|
|
99
|
+
: (currentIndex < 0 ? 0 : currentIndex) + offset;
|
|
100
|
+
if (loop && typeof offset === 'number') {
|
|
101
|
+
nextIndex =
|
|
102
|
+
((nextIndex % entries.length) + entries.length) % entries.length;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
nextIndex = Math.min(entries.length - 1, Math.max(0, nextIndex));
|
|
106
|
+
}
|
|
107
|
+
const direction = offset === 'first' ? 1 : offset === 'last' ? -1 : Math.sign(offset);
|
|
108
|
+
let attempts = 0;
|
|
109
|
+
while (!enabledAt(nextIndex) && attempts < entries.length) {
|
|
110
|
+
nextIndex += direction || 1;
|
|
111
|
+
if (loop) {
|
|
112
|
+
nextIndex =
|
|
113
|
+
((nextIndex % entries.length) + entries.length) % entries.length;
|
|
114
|
+
}
|
|
115
|
+
else if (nextIndex < 0 || nextIndex >= entries.length) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
attempts += 1;
|
|
119
|
+
}
|
|
120
|
+
const [value, item] = entries[nextIndex];
|
|
121
|
+
setActiveValueState(value);
|
|
122
|
+
item.node.focus();
|
|
123
|
+
}, [activeValue, disabled, loop]);
|
|
124
|
+
const handleKeyDown = (event) => {
|
|
125
|
+
onKeyDown?.(event);
|
|
126
|
+
if (event.defaultPrevented || disabled)
|
|
127
|
+
return;
|
|
128
|
+
const target = event.target;
|
|
129
|
+
if (target.dataset.slot !== 'grid-item')
|
|
130
|
+
return;
|
|
131
|
+
const movement = {
|
|
132
|
+
ArrowLeft: -1,
|
|
133
|
+
ArrowRight: 1,
|
|
134
|
+
ArrowUp: -safeColumns,
|
|
135
|
+
ArrowDown: safeColumns,
|
|
136
|
+
};
|
|
137
|
+
const offset = movement[event.key];
|
|
138
|
+
if (offset !== undefined) {
|
|
139
|
+
event.preventDefault();
|
|
140
|
+
moveFocus(offset);
|
|
141
|
+
}
|
|
142
|
+
else if (event.key === 'Home' || event.key === 'End') {
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
moveFocus(event.key === 'Home' ? 'first' : 'last');
|
|
145
|
+
}
|
|
146
|
+
else if (event.key === ' ') {
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
if (activeValue)
|
|
149
|
+
select(activeValue);
|
|
150
|
+
}
|
|
151
|
+
else if (event.key === 'Enter' && activeValue) {
|
|
152
|
+
event.preventDefault();
|
|
153
|
+
if (selectionMode !== 'none')
|
|
154
|
+
select(activeValue);
|
|
155
|
+
activate(activeValue);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const context = React.useMemo(() => ({
|
|
159
|
+
activeValue,
|
|
160
|
+
disabled,
|
|
161
|
+
isSelected: (value) => selection.has(value),
|
|
162
|
+
registerItem,
|
|
163
|
+
select,
|
|
164
|
+
selectionMode,
|
|
165
|
+
setActiveValue,
|
|
166
|
+
activate,
|
|
167
|
+
}), [
|
|
168
|
+
activeValue,
|
|
169
|
+
activate,
|
|
170
|
+
disabled,
|
|
171
|
+
registerItem,
|
|
172
|
+
select,
|
|
173
|
+
selection,
|
|
174
|
+
selectionMode,
|
|
175
|
+
setActiveValue,
|
|
176
|
+
]);
|
|
177
|
+
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: {
|
|
178
|
+
'--grid-columns': safeColumns,
|
|
179
|
+
...style,
|
|
180
|
+
}, 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}`))) }) }));
|
|
181
|
+
}
|
|
182
|
+
function GridItem({ className, children, value, disabled = false, onClick, onDoubleClick, onFocus, ref, ...props }) {
|
|
183
|
+
const context = useGridContext('GridItem');
|
|
184
|
+
const { registerItem } = context;
|
|
185
|
+
const itemRef = React.useRef(null);
|
|
186
|
+
const isDisabled = context.disabled || disabled;
|
|
187
|
+
const isSelected = context.isSelected(value);
|
|
188
|
+
const isActive = context.activeValue === value;
|
|
189
|
+
const setRef = React.useCallback((node) => {
|
|
190
|
+
itemRef.current = node;
|
|
191
|
+
if (typeof ref === 'function')
|
|
192
|
+
ref(node);
|
|
193
|
+
else if (ref)
|
|
194
|
+
ref.current = node;
|
|
195
|
+
}, [ref]);
|
|
196
|
+
React.useLayoutEffect(() => registerItem(value, itemRef.current, isDisabled), [isDisabled, registerItem, value]);
|
|
197
|
+
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 relative min-w-0 cursor-default select-none overflow-hidden rounded-lg border border-border bg-card text-card-foreground 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) => {
|
|
198
|
+
onClick?.(event);
|
|
199
|
+
if (event.defaultPrevented ||
|
|
200
|
+
isDisabled ||
|
|
201
|
+
isInteractiveDescendant(event.target, event.currentTarget)) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
context.setActiveValue(value);
|
|
205
|
+
event.currentTarget.focus();
|
|
206
|
+
context.select(value);
|
|
207
|
+
}, onDoubleClick: (event) => {
|
|
208
|
+
onDoubleClick?.(event);
|
|
209
|
+
if (event.defaultPrevented ||
|
|
210
|
+
isDisabled ||
|
|
211
|
+
isInteractiveDescendant(event.target, event.currentTarget)) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
context.activate(value);
|
|
215
|
+
}, onFocus: (event) => {
|
|
216
|
+
onFocus?.(event);
|
|
217
|
+
if (!event.defaultPrevented && !isDisabled) {
|
|
218
|
+
context.setActiveValue(value);
|
|
219
|
+
}
|
|
220
|
+
}, ...props, children: children }));
|
|
221
|
+
}
|
|
222
|
+
function GridItemMedia({ className, ...props }) {
|
|
223
|
+
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 }));
|
|
224
|
+
}
|
|
225
|
+
function GridItemContent({ className, ...props }) {
|
|
226
|
+
return (_jsx("div", { "data-slot": "grid-item-content", className: cn('min-w-0 p-3', className), ...props }));
|
|
227
|
+
}
|
|
228
|
+
function GridItemTitle({ className, ...props }) {
|
|
229
|
+
return (_jsx("div", { "data-slot": "grid-item-title", className: cn('truncate text-sm font-medium', className), ...props }));
|
|
230
|
+
}
|
|
231
|
+
function GridItemDescription({ className, ...props }) {
|
|
232
|
+
return (_jsx("p", { "data-slot": "grid-item-description", className: cn('text-muted-foreground mt-0.5 truncate text-xs', className), ...props }));
|
|
233
|
+
}
|
|
234
|
+
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,60 @@ 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';
|
|
17
20
|
export * from './context-menu';
|
|
18
21
|
export * from './dialog';
|
|
19
22
|
export * from './drawer';
|
|
20
23
|
export * from './dropdown-menu';
|
|
24
|
+
export * from './date-field';
|
|
21
25
|
export * from './empty';
|
|
26
|
+
export * from './edge-fade';
|
|
22
27
|
export * from './field';
|
|
23
28
|
export * from './form';
|
|
29
|
+
export * from './grid';
|
|
24
30
|
export * from './hover-card';
|
|
31
|
+
export * from './icon-button';
|
|
25
32
|
export * from './input';
|
|
26
33
|
export * from './input-group';
|
|
27
34
|
export * from './input-otp';
|
|
35
|
+
export * from './inspector';
|
|
28
36
|
export * from './item';
|
|
29
37
|
export * from './kbd';
|
|
30
38
|
export * from './label';
|
|
39
|
+
export * from './list';
|
|
31
40
|
export * from './menubar';
|
|
41
|
+
export * from './message-scroller';
|
|
32
42
|
export * from './navigation-menu';
|
|
43
|
+
export * from './notification-dot';
|
|
44
|
+
export * from './number-input';
|
|
33
45
|
export * from './pagination';
|
|
46
|
+
export * from './panel';
|
|
34
47
|
export * from './popover';
|
|
35
48
|
export * from './progress';
|
|
36
49
|
export * from './radio-group';
|
|
37
50
|
export * from './resizable';
|
|
38
51
|
export * from './scroll-area';
|
|
52
|
+
export * from './search-field';
|
|
39
53
|
export * from './select';
|
|
54
|
+
export * from './segmented-control';
|
|
40
55
|
export * from './separator';
|
|
41
56
|
export * from './sheet';
|
|
42
57
|
export * from './sidebar';
|
|
43
58
|
export * from './skeleton';
|
|
44
59
|
export * from './slider';
|
|
45
60
|
export * from './sonner';
|
|
61
|
+
export * from './split-view';
|
|
46
62
|
export * from './spinner';
|
|
63
|
+
export * from './status';
|
|
47
64
|
export * from './switch';
|
|
48
65
|
export * from './table';
|
|
49
66
|
export * from './tabs';
|
|
50
67
|
export * from './textarea';
|
|
68
|
+
export * from './text';
|
|
51
69
|
export * from './toggle';
|
|
52
70
|
export * from './toggle-group';
|
|
71
|
+
export * from './toolbar';
|
|
53
72
|
export * from './tooltip';
|
|
54
73
|
//# 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;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,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AU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA"}
|
|
@@ -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,41 +14,59 @@ 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';
|
|
17
20
|
export * from './context-menu';
|
|
18
21
|
export * from './dialog';
|
|
19
22
|
export * from './drawer';
|
|
20
23
|
export * from './dropdown-menu';
|
|
24
|
+
export * from './date-field';
|
|
21
25
|
export * from './empty';
|
|
26
|
+
export * from './edge-fade';
|
|
22
27
|
export * from './field';
|
|
23
28
|
export * from './form';
|
|
29
|
+
export * from './grid';
|
|
24
30
|
export * from './hover-card';
|
|
31
|
+
export * from './icon-button';
|
|
25
32
|
export * from './input';
|
|
26
33
|
export * from './input-group';
|
|
27
34
|
export * from './input-otp';
|
|
35
|
+
export * from './inspector';
|
|
28
36
|
export * from './item';
|
|
29
37
|
export * from './kbd';
|
|
30
38
|
export * from './label';
|
|
39
|
+
export * from './list';
|
|
31
40
|
export * from './menubar';
|
|
41
|
+
export * from './message-scroller';
|
|
32
42
|
export * from './navigation-menu';
|
|
43
|
+
export * from './notification-dot';
|
|
44
|
+
export * from './number-input';
|
|
33
45
|
export * from './pagination';
|
|
46
|
+
export * from './panel';
|
|
34
47
|
export * from './popover';
|
|
35
48
|
export * from './progress';
|
|
36
49
|
export * from './radio-group';
|
|
37
50
|
export * from './resizable';
|
|
38
51
|
export * from './scroll-area';
|
|
52
|
+
export * from './search-field';
|
|
39
53
|
export * from './select';
|
|
54
|
+
export * from './segmented-control';
|
|
40
55
|
export * from './separator';
|
|
41
56
|
export * from './sheet';
|
|
42
57
|
export * from './sidebar';
|
|
43
58
|
export * from './skeleton';
|
|
44
59
|
export * from './slider';
|
|
45
60
|
export * from './sonner';
|
|
61
|
+
export * from './split-view';
|
|
46
62
|
export * from './spinner';
|
|
63
|
+
export * from './status';
|
|
47
64
|
export * from './switch';
|
|
48
65
|
export * from './table';
|
|
49
66
|
export * from './tabs';
|
|
50
67
|
export * from './textarea';
|
|
68
|
+
export * from './text';
|
|
51
69
|
export * from './toggle';
|
|
52
70
|
export * from './toggle-group';
|
|
71
|
+
export * from './toolbar';
|
|
53
72
|
export * from './tooltip';
|
|
@@ -3,7 +3,7 @@ import { Button } from './button';
|
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
4
|
declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
-
align?: "inline-end" | "inline-start" | "block-
|
|
6
|
+
align?: "inline-end" | "inline-start" | "block-start" | "block-end" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare const inputGroupButtonVariants: (props?: ({
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text } from './text';
|
|
3
|
+
declare function Inspector({ className, ...props }: React.ComponentProps<'aside'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function InspectorHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function InspectorContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export interface InspectorSectionProps extends Omit<React.ComponentProps<'section'>, 'title'> {
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
actions?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function InspectorSection({ title, actions, className, children, ...props }: InspectorSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function InspectorRow({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function InspectorLabel({ className, ...props }: React.ComponentProps<typeof Text>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function InspectorValue({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { Inspector, InspectorContent, InspectorHeader, InspectorLabel, InspectorRow, InspectorSection, InspectorValue, };
|
|
15
|
+
//# sourceMappingURL=inspector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspector.d.ts","sourceRoot":"","sources":["../../../src/components/ui/inspector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAWxE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW5E;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW7B;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,KAAK,CA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