@adea-ai/ui 0.60.4 → 0.61.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -34
- package/dist/components/composites/account-menu/account-menu.d.ts +48 -0
- package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -0
- package/dist/components/composites/account-menu/account-menu.js +119 -0
- package/dist/components/composites/account-menu/account-menu.js.map +1 -0
- package/dist/components/composites/account-menu/index.d.ts +2 -0
- package/dist/components/composites/account-menu/index.d.ts.map +1 -0
- package/dist/components/composites/list-row/index.d.ts +2 -0
- package/dist/components/composites/list-row/index.d.ts.map +1 -0
- package/dist/components/composites/list-row/list-row.d.ts +44 -0
- package/dist/components/composites/list-row/list-row.d.ts.map +1 -0
- package/dist/components/composites/list-row/list-row.js +124 -0
- package/dist/components/composites/list-row/list-row.js.map +1 -0
- package/dist/components/composites/settings/index.d.ts +2 -0
- package/dist/components/composites/settings/index.d.ts.map +1 -0
- package/dist/components/composites/settings/settings.d.ts +49 -0
- package/dist/components/composites/settings/settings.d.ts.map +1 -0
- package/dist/components/composites/settings/settings.js +148 -0
- package/dist/components/composites/settings/settings.js.map +1 -0
- package/dist/components/composites/stat/index.d.ts +2 -0
- package/dist/components/composites/stat/index.d.ts.map +1 -0
- package/dist/components/composites/stat/stat.d.ts +48 -0
- package/dist/components/composites/stat/stat.d.ts.map +1 -0
- package/dist/components/composites/stat/stat.js +148 -0
- package/dist/components/composites/stat/stat.js.map +1 -0
- package/dist/components/composites/update-dialog/index.d.ts +2 -0
- package/dist/components/composites/update-dialog/index.d.ts.map +1 -0
- package/dist/components/composites/update-dialog/update-dialog.d.ts +108 -0
- package/dist/components/composites/update-dialog/update-dialog.d.ts.map +1 -0
- package/dist/components/composites/update-dialog/update-dialog.js +452 -0
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -0
- package/dist/components/composites/workspace-mark/index.d.ts +2 -0
- package/dist/components/composites/workspace-mark/index.d.ts.map +1 -0
- package/dist/components/composites/workspace-mark/workspace-mark.d.ts +24 -0
- package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -0
- package/dist/components/composites/workspace-mark/workspace-mark.js +76 -0
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -0
- package/dist/components/conversation/conversation-avatar.d.ts +21 -0
- package/dist/components/conversation/conversation-avatar.d.ts.map +1 -0
- package/dist/components/conversation/conversation-avatar.js +52 -0
- package/dist/components/conversation/conversation-avatar.js.map +1 -0
- package/dist/components/conversation/conversation-surface.d.ts +27 -0
- package/dist/components/conversation/conversation-surface.d.ts.map +1 -0
- package/dist/components/conversation/conversation-surface.js +118 -0
- package/dist/components/conversation/conversation-surface.js.map +1 -0
- package/dist/components/conversation/index.d.ts +6 -0
- package/dist/components/conversation/index.d.ts.map +1 -0
- package/dist/components/conversation/message-composer.d.ts +70 -0
- package/dist/components/conversation/message-composer.d.ts.map +1 -0
- package/dist/components/conversation/message-composer.js +235 -0
- package/dist/components/conversation/message-composer.js.map +1 -0
- package/dist/components/conversation/message-row.d.ts +101 -0
- package/dist/components/conversation/message-row.d.ts.map +1 -0
- package/dist/components/conversation/message-row.js +389 -0
- package/dist/components/conversation/message-row.js.map +1 -0
- package/dist/components/conversation/thread-panel.d.ts +45 -0
- package/dist/components/conversation/thread-panel.d.ts.map +1 -0
- package/dist/components/conversation/thread-panel.js +123 -0
- package/dist/components/conversation/thread-panel.js.map +1 -0
- package/dist/components/layout/app-shell/app-shell.d.ts +45 -0
- package/dist/components/layout/app-shell/app-shell.d.ts.map +1 -0
- package/dist/components/layout/app-shell/app-shell.js +89 -0
- package/dist/components/layout/app-shell/app-shell.js.map +1 -0
- package/dist/components/layout/app-shell/index.d.ts +2 -0
- package/dist/components/layout/app-shell/index.d.ts.map +1 -0
- package/dist/components/layout/page/index.d.ts +2 -0
- package/dist/components/layout/page/index.d.ts.map +1 -0
- package/dist/components/layout/page/page.d.ts +31 -0
- package/dist/components/layout/page/page.d.ts.map +1 -0
- package/dist/components/layout/page/page.js +143 -0
- package/dist/components/layout/page/page.js.map +1 -0
- package/dist/components/layout/panel/index.d.ts +2 -0
- package/dist/components/layout/panel/index.d.ts.map +1 -0
- package/dist/components/layout/panel/panel.d.ts +44 -0
- package/dist/components/layout/panel/panel.d.ts.map +1 -0
- package/dist/components/layout/panel/panel.js +151 -0
- package/dist/components/layout/panel/panel.js.map +1 -0
- package/dist/components/layout/side-rail/index.d.ts +3 -0
- package/dist/components/layout/side-rail/index.d.ts.map +1 -0
- package/dist/components/layout/side-rail/side-rail-context.d.ts +23 -0
- package/dist/components/layout/side-rail/side-rail-context.d.ts.map +1 -0
- package/dist/components/layout/side-rail/side-rail-context.js +18 -0
- package/dist/components/layout/side-rail/side-rail-context.js.map +1 -0
- package/dist/components/layout/side-rail/side-rail.d.ts +101 -0
- package/dist/components/layout/side-rail/side-rail.d.ts.map +1 -0
- package/dist/components/layout/side-rail/side-rail.js +336 -0
- package/dist/components/layout/side-rail/side-rail.js.map +1 -0
- package/dist/components/layout/sidebar-nav/index.d.ts +2 -0
- package/dist/components/layout/sidebar-nav/index.d.ts.map +1 -0
- package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts +62 -0
- package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -0
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +231 -0
- package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -0
- package/dist/components/layout/status-bar/index.d.ts +2 -0
- package/dist/components/layout/status-bar/index.d.ts.map +1 -0
- package/dist/components/layout/status-bar/status-bar.d.ts +23 -0
- package/dist/components/layout/status-bar/status-bar.d.ts.map +1 -0
- package/dist/components/layout/status-bar/status-bar.js +68 -0
- package/dist/components/layout/status-bar/status-bar.js.map +1 -0
- package/dist/components/layout/top-bar/index.d.ts +2 -0
- package/dist/components/layout/top-bar/index.d.ts.map +1 -0
- package/dist/components/layout/top-bar/top-bar.d.ts +59 -0
- package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -0
- package/dist/components/layout/top-bar/top-bar.js +118 -0
- package/dist/components/layout/top-bar/top-bar.js.map +1 -0
- package/dist/components/motion/index.d.ts +3 -0
- package/dist/components/motion/index.d.ts.map +1 -0
- package/dist/components/motion/index.js +3 -0
- package/dist/components/motion/presence.d.ts +29 -0
- package/dist/components/motion/presence.d.ts.map +1 -0
- package/dist/components/motion/presence.js +10 -0
- package/dist/components/motion/presence.js.map +1 -0
- package/dist/components/theme/appearance-panel.d.ts +25 -0
- package/dist/components/theme/appearance-panel.d.ts.map +1 -0
- package/dist/components/theme/appearance-panel.js +162 -0
- package/dist/components/theme/appearance-panel.js.map +1 -0
- package/dist/components/theme/index.d.ts +5 -0
- package/dist/components/theme/index.d.ts.map +1 -0
- package/dist/components/theme/theme-picker.d.ts +54 -0
- package/dist/components/theme/theme-picker.d.ts.map +1 -0
- package/dist/components/theme/theme-picker.js +156 -0
- package/dist/components/theme/theme-picker.js.map +1 -0
- package/dist/components/theme/theme-provider.d.ts +130 -0
- package/dist/components/theme/theme-provider.d.ts.map +1 -0
- package/dist/components/theme/theme-provider.js +164 -0
- package/dist/components/theme/theme-provider.js.map +1 -0
- package/dist/components/theme/theme-toggle.d.ts +19 -0
- package/dist/components/theme/theme-toggle.d.ts.map +1 -0
- package/dist/components/theme/theme-toggle.js +69 -0
- package/dist/components/theme/theme-toggle.js.map +1 -0
- package/dist/components/ui/accordion/accordion.d.ts +18 -0
- package/dist/components/ui/accordion/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion/accordion.js +60 -0
- package/dist/components/ui/accordion/accordion.js.map +1 -0
- package/dist/components/ui/accordion/index.d.ts +2 -0
- package/dist/components/ui/accordion/index.d.ts.map +1 -0
- package/dist/components/ui/alert/alert.d.ts +26 -0
- package/dist/components/ui/alert/alert.d.ts.map +1 -0
- package/dist/components/ui/alert/alert.js +89 -0
- package/dist/components/ui/alert/alert.js.map +1 -0
- package/dist/components/ui/alert/index.d.ts +2 -0
- package/dist/components/ui/alert/index.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +29 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog/alert-dialog.js +155 -0
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert-dialog/index.d.ts +2 -0
- package/dist/components/ui/alert-dialog/index.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio/aspect-ratio.d.ts +22 -0
- package/dist/components/ui/aspect-ratio/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio/aspect-ratio.js +29 -0
- package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -0
- package/dist/components/ui/aspect-ratio/index.d.ts +2 -0
- package/dist/components/ui/aspect-ratio/index.d.ts.map +1 -0
- package/dist/components/ui/avatar/avatar.d.ts +41 -0
- package/dist/components/ui/avatar/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar/avatar.js +106 -0
- package/dist/components/ui/avatar/avatar.js.map +1 -0
- package/dist/components/ui/avatar/index.d.ts +2 -0
- package/dist/components/ui/avatar/index.d.ts.map +1 -0
- package/dist/components/ui/badge/badge.d.ts +22 -0
- package/dist/components/ui/badge/badge.d.ts.map +1 -0
- package/dist/components/ui/badge/badge.js +58 -0
- package/dist/components/ui/badge/badge.js.map +1 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.d.ts.map +1 -0
- package/dist/components/ui/board/board.d.ts +78 -0
- package/dist/components/ui/board/board.d.ts.map +1 -0
- package/dist/components/ui/board/board.js +200 -0
- package/dist/components/ui/board/board.js.map +1 -0
- package/dist/components/ui/board/index.d.ts +2 -0
- package/dist/components/ui/board/index.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts +24 -0
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb/breadcrumb.js +109 -0
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/ui/breadcrumb/index.d.ts +2 -0
- package/dist/components/ui/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/ui/button/button.d.ts +30 -0
- package/dist/components/ui/button/button.d.ts.map +1 -0
- package/dist/components/ui/button/button.js +80 -0
- package/dist/components/ui/button/button.js.map +1 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.d.ts.map +1 -0
- package/dist/components/ui/button-group/button-group.d.ts +39 -0
- package/dist/components/ui/button-group/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group/button-group.js +63 -0
- package/dist/components/ui/button-group/button-group.js.map +1 -0
- package/dist/components/ui/button-group/index.d.ts +2 -0
- package/dist/components/ui/button-group/index.d.ts.map +1 -0
- package/dist/components/ui/calendar/calendar.d.ts +93 -0
- package/dist/components/ui/calendar/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar/calendar.js +243 -0
- package/dist/components/ui/calendar/calendar.js.map +1 -0
- package/dist/components/ui/calendar/index.d.ts +2 -0
- package/dist/components/ui/calendar/index.d.ts.map +1 -0
- package/dist/components/ui/card/card.d.ts +23 -0
- package/dist/components/ui/card/card.d.ts.map +1 -0
- package/dist/components/ui/card/card.js +98 -0
- package/dist/components/ui/card/card.js.map +1 -0
- package/dist/components/ui/card/index.d.ts +2 -0
- package/dist/components/ui/card/index.d.ts.map +1 -0
- package/dist/components/ui/carousel/carousel.d.ts +66 -0
- package/dist/components/ui/carousel/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel/carousel.js +178 -0
- package/dist/components/ui/carousel/carousel.js.map +1 -0
- package/dist/components/ui/carousel/index.d.ts +2 -0
- package/dist/components/ui/carousel/index.d.ts.map +1 -0
- package/dist/components/ui/chart/chart.d.ts +154 -0
- package/dist/components/ui/chart/chart.d.ts.map +1 -0
- package/dist/components/ui/chart/chart.js +373 -0
- package/dist/components/ui/chart/chart.js.map +1 -0
- package/dist/components/ui/chart/index.d.ts +2 -0
- package/dist/components/ui/chart/index.d.ts.map +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +33 -0
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox/checkbox.js +76 -0
- package/dist/components/ui/checkbox/checkbox.js.map +1 -0
- package/dist/components/ui/checkbox/index.d.ts +2 -0
- package/dist/components/ui/checkbox/index.d.ts.map +1 -0
- package/dist/components/ui/code-block/code-block.d.ts +75 -0
- package/dist/components/ui/code-block/code-block.d.ts.map +1 -0
- package/dist/components/ui/code-block/code-block.js +186 -0
- package/dist/components/ui/code-block/code-block.js.map +1 -0
- package/dist/components/ui/code-block/index.d.ts +2 -0
- package/dist/components/ui/code-block/index.d.ts.map +1 -0
- package/dist/components/ui/collapsible/collapsible.d.ts +17 -0
- package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible/collapsible.js +38 -0
- package/dist/components/ui/collapsible/collapsible.js.map +1 -0
- package/dist/components/ui/collapsible/index.d.ts +2 -0
- package/dist/components/ui/collapsible/index.d.ts.map +1 -0
- package/dist/components/ui/combobox/combobox.d.ts +28 -0
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox/combobox.js +102 -0
- package/dist/components/ui/combobox/combobox.js.map +1 -0
- package/dist/components/ui/combobox/index.d.ts +2 -0
- package/dist/components/ui/combobox/index.d.ts.map +1 -0
- package/dist/components/ui/command/command.d.ts +53 -0
- package/dist/components/ui/command/command.d.ts.map +1 -0
- package/dist/components/ui/command/command.js +137 -0
- package/dist/components/ui/command/command.js.map +1 -0
- package/dist/components/ui/command/index.d.ts +2 -0
- package/dist/components/ui/command/index.d.ts.map +1 -0
- package/dist/components/ui/context-menu/context-menu.d.ts +32 -0
- package/dist/components/ui/context-menu/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu/context-menu.js +119 -0
- package/dist/components/ui/context-menu/context-menu.js.map +1 -0
- package/dist/components/ui/context-menu/index.d.ts +2 -0
- package/dist/components/ui/context-menu/index.d.ts.map +1 -0
- package/dist/components/ui/detail-panel/detail-panel.d.ts +61 -0
- package/dist/components/ui/detail-panel/detail-panel.d.ts.map +1 -0
- package/dist/components/ui/detail-panel/detail-panel.js +132 -0
- package/dist/components/ui/detail-panel/detail-panel.js.map +1 -0
- package/dist/components/ui/detail-panel/index.d.ts +2 -0
- package/dist/components/ui/detail-panel/index.d.ts.map +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +40 -0
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog/dialog.js +125 -0
- package/dist/components/ui/dialog/dialog.js.map +1 -0
- package/dist/components/ui/dialog/index.d.ts +2 -0
- package/dist/components/ui/dialog/index.d.ts.map +1 -0
- package/dist/components/ui/diff-block/diff-block.d.ts +95 -0
- package/dist/components/ui/diff-block/diff-block.d.ts.map +1 -0
- package/dist/components/ui/diff-block/diff-block.js +230 -0
- package/dist/components/ui/diff-block/diff-block.js.map +1 -0
- package/dist/components/ui/diff-block/diff-block.test.d.ts +2 -0
- package/dist/components/ui/diff-block/diff-block.test.d.ts.map +1 -0
- package/dist/components/ui/diff-block/index.d.ts +2 -0
- package/dist/components/ui/diff-block/index.d.ts.map +1 -0
- package/dist/components/ui/drawer/drawer.d.ts +39 -0
- package/dist/components/ui/drawer/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer/drawer.js +106 -0
- package/dist/components/ui/drawer/drawer.js.map +1 -0
- package/dist/components/ui/drawer/index.d.ts +2 -0
- package/dist/components/ui/drawer/index.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +48 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +151 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +2 -0
- package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/ui/empty/empty.d.ts +27 -0
- package/dist/components/ui/empty/empty.d.ts.map +1 -0
- package/dist/components/ui/{empty.js → empty/empty.js} +28 -23
- package/dist/components/ui/empty/empty.js.map +1 -0
- package/dist/components/ui/empty/index.d.ts +2 -0
- package/dist/components/ui/empty/index.d.ts.map +1 -0
- package/dist/components/ui/entity-icon/entity-icon.d.ts +59 -0
- package/dist/components/ui/entity-icon/entity-icon.d.ts.map +1 -0
- package/dist/components/ui/entity-icon/entity-icon.js +145 -0
- package/dist/components/ui/entity-icon/entity-icon.js.map +1 -0
- package/dist/components/ui/entity-icon/index.d.ts +2 -0
- package/dist/components/ui/entity-icon/index.d.ts.map +1 -0
- package/dist/components/ui/field/field.d.ts +39 -0
- package/dist/components/ui/field/field.d.ts.map +1 -0
- package/dist/components/ui/field/field.js +111 -0
- package/dist/components/ui/field/field.js.map +1 -0
- package/dist/components/ui/field/index.d.ts +2 -0
- package/dist/components/ui/field/index.d.ts.map +1 -0
- package/dist/components/ui/hover-card/hover-card.d.ts +17 -0
- package/dist/components/ui/hover-card/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card/hover-card.js +40 -0
- package/dist/components/ui/hover-card/hover-card.js.map +1 -0
- package/dist/components/ui/hover-card/index.d.ts +2 -0
- package/dist/components/ui/hover-card/index.d.ts.map +1 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.d.ts.map +1 -0
- package/dist/components/ui/input/input.d.ts +15 -0
- package/dist/components/ui/input/input.d.ts.map +1 -0
- package/dist/components/ui/input/input.js +36 -0
- package/dist/components/ui/input/input.js.map +1 -0
- package/dist/components/ui/input-group/index.d.ts +2 -0
- package/dist/components/ui/input-group/index.d.ts.map +1 -0
- package/dist/components/ui/input-group/input-group.d.ts +34 -0
- package/dist/components/ui/input-group/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group/input-group.js +93 -0
- package/dist/components/ui/input-group/input-group.js.map +1 -0
- package/dist/components/ui/input-otp/index.d.ts +2 -0
- package/dist/components/ui/input-otp/index.d.ts.map +1 -0
- package/dist/components/ui/input-otp/input-otp.d.ts +37 -0
- package/dist/components/ui/input-otp/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp/input-otp.js +92 -0
- package/dist/components/ui/input-otp/input-otp.js.map +1 -0
- package/dist/components/ui/item/index.d.ts +2 -0
- package/dist/components/ui/item/index.d.ts.map +1 -0
- package/dist/components/ui/item/item.d.ts +49 -0
- package/dist/components/ui/item/item.d.ts.map +1 -0
- package/dist/components/ui/item/item.js +163 -0
- package/dist/components/ui/item/item.js.map +1 -0
- package/dist/components/ui/kbd/index.d.ts +2 -0
- package/dist/components/ui/kbd/index.d.ts.map +1 -0
- package/dist/components/ui/kbd/kbd.d.ts +14 -0
- package/dist/components/ui/kbd/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd/kbd.js +40 -0
- package/dist/components/ui/kbd/kbd.js.map +1 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.d.ts.map +1 -0
- package/dist/components/ui/label/label.d.ts +17 -0
- package/dist/components/ui/label/label.d.ts.map +1 -0
- package/dist/components/ui/label/label.js +33 -0
- package/dist/components/ui/label/label.js.map +1 -0
- package/dist/components/ui/menubar/index.d.ts +2 -0
- package/dist/components/ui/menubar/index.d.ts.map +1 -0
- package/dist/components/ui/menubar/menubar.d.ts +38 -0
- package/dist/components/ui/menubar/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar/menubar.js +138 -0
- package/dist/components/ui/menubar/menubar.js.map +1 -0
- package/dist/components/ui/modal-dialog/index.d.ts +2 -0
- package/dist/components/ui/modal-dialog/index.d.ts.map +1 -0
- package/dist/components/ui/modal-dialog/modal-dialog.d.ts +35 -0
- package/dist/components/ui/modal-dialog/modal-dialog.d.ts.map +1 -0
- package/dist/components/ui/modal-dialog/modal-dialog.js +78 -0
- package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -0
- package/dist/components/ui/navigation-menu/index.d.ts +2 -0
- package/dist/components/ui/navigation-menu/index.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts +77 -0
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu/navigation-menu.js +116 -0
- package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination/index.d.ts +2 -0
- package/dist/components/ui/pagination/index.d.ts.map +1 -0
- package/dist/components/ui/pagination/pagination.d.ts +33 -0
- package/dist/components/ui/pagination/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination/pagination.js +92 -0
- package/dist/components/ui/pagination/pagination.js.map +1 -0
- package/dist/components/ui/popover/index.d.ts +2 -0
- package/dist/components/ui/popover/index.d.ts.map +1 -0
- package/dist/components/ui/popover/popover.d.ts +26 -0
- package/dist/components/ui/popover/popover.d.ts.map +1 -0
- package/dist/components/ui/popover/popover.js +66 -0
- package/dist/components/ui/popover/popover.js.map +1 -0
- package/dist/components/ui/progress/index.d.ts +2 -0
- package/dist/components/ui/progress/index.d.ts.map +1 -0
- package/dist/components/ui/progress/progress.d.ts +29 -0
- package/dist/components/ui/progress/progress.d.ts.map +1 -0
- package/dist/components/ui/progress/progress.js +53 -0
- package/dist/components/ui/progress/progress.js.map +1 -0
- package/dist/components/ui/radio-group/index.d.ts +2 -0
- package/dist/components/ui/radio-group/index.d.ts.map +1 -0
- package/dist/components/ui/radio-group/radio-group.d.ts +26 -0
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group/radio-group.js +77 -0
- package/dist/components/ui/radio-group/radio-group.js.map +1 -0
- package/dist/components/ui/resizable/index.d.ts +2 -0
- package/dist/components/ui/resizable/index.d.ts.map +1 -0
- package/dist/components/ui/resizable/resizable.d.ts +33 -0
- package/dist/components/ui/resizable/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable/resizable.js +57 -0
- package/dist/components/ui/resizable/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area/index.d.ts +2 -0
- package/dist/components/ui/scroll-area/index.d.ts.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.d.ts +26 -0
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.js +36 -0
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/ui/select/index.d.ts +2 -0
- package/dist/components/ui/select/index.d.ts.map +1 -0
- package/dist/components/ui/select/select.d.ts +63 -0
- package/dist/components/ui/select/select.d.ts.map +1 -0
- package/dist/components/ui/select/select.js +142 -0
- package/dist/components/ui/select/select.js.map +1 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.d.ts.map +1 -0
- package/dist/components/ui/separator/separator.d.ts +17 -0
- package/dist/components/ui/separator/separator.d.ts.map +1 -0
- package/dist/components/ui/separator/separator.js +24 -0
- package/dist/components/ui/separator/separator.js.map +1 -0
- package/dist/components/ui/sheet/index.d.ts +2 -0
- package/dist/components/ui/sheet/index.d.ts.map +1 -0
- package/dist/components/ui/sheet/sheet.d.ts +32 -0
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet/sheet.js +118 -0
- package/dist/components/ui/sheet/sheet.js.map +1 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.d.ts.map +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts +15 -0
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton/skeleton.js +31 -0
- package/dist/components/ui/skeleton/skeleton.js.map +1 -0
- package/dist/components/ui/slider/index.d.ts +2 -0
- package/dist/components/ui/slider/index.d.ts.map +1 -0
- package/dist/components/ui/slider/slider.d.ts +22 -0
- package/dist/components/ui/slider/slider.d.ts.map +1 -0
- package/dist/components/ui/slider/slider.js +59 -0
- package/dist/components/ui/slider/slider.js.map +1 -0
- package/dist/components/ui/spinner/index.d.ts +2 -0
- package/dist/components/ui/spinner/index.d.ts.map +1 -0
- package/dist/components/ui/spinner/spinner.d.ts +25 -0
- package/dist/components/ui/spinner/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner/spinner.js +57 -0
- package/dist/components/ui/spinner/spinner.js.map +1 -0
- package/dist/components/ui/status-chip/index.d.ts +2 -0
- package/dist/components/ui/status-chip/index.d.ts.map +1 -0
- package/dist/components/ui/status-chip/status-chip.d.ts +70 -0
- package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -0
- package/dist/components/ui/status-chip/status-chip.js +140 -0
- package/dist/components/ui/status-chip/status-chip.js.map +1 -0
- package/dist/components/ui/switch/index.d.ts +2 -0
- package/dist/components/ui/switch/index.d.ts.map +1 -0
- package/dist/components/ui/switch/switch.d.ts +36 -0
- package/dist/components/ui/switch/switch.d.ts.map +1 -0
- package/dist/components/ui/switch/switch.js +74 -0
- package/dist/components/ui/switch/switch.js.map +1 -0
- package/dist/components/ui/table/index.d.ts +2 -0
- package/dist/components/ui/table/index.d.ts.map +1 -0
- package/dist/components/ui/table/table.d.ts +29 -0
- package/dist/components/ui/table/table.d.ts.map +1 -0
- package/dist/components/ui/table/table.js +129 -0
- package/dist/components/ui/table/table.js.map +1 -0
- package/dist/components/ui/tabs/index.d.ts +2 -0
- package/dist/components/ui/tabs/index.d.ts.map +1 -0
- package/dist/components/ui/tabs/tabs.d.ts +23 -0
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs/tabs.js +43 -0
- package/dist/components/ui/tabs/tabs.js.map +1 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.d.ts.map +1 -0
- package/dist/components/ui/textarea/textarea.d.ts +14 -0
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea/textarea.js +30 -0
- package/dist/components/ui/textarea/textarea.js.map +1 -0
- package/dist/components/ui/toast/index.d.ts +2 -0
- package/dist/components/ui/toast/index.d.ts.map +1 -0
- package/dist/components/ui/toast/toast.d.ts +68 -0
- package/dist/components/ui/toast/toast.d.ts.map +1 -0
- package/dist/components/ui/toast/toast.js +186 -0
- package/dist/components/ui/toast/toast.js.map +1 -0
- package/dist/components/ui/toggle/index.d.ts +2 -0
- package/dist/components/ui/toggle/index.d.ts.map +1 -0
- package/dist/components/ui/toggle/toggle.d.ts +22 -0
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle/toggle.js +64 -0
- package/dist/components/ui/toggle/toggle.js.map +1 -0
- package/dist/components/ui/toggle-group/index.d.ts +2 -0
- package/dist/components/ui/toggle-group/index.d.ts.map +1 -0
- package/dist/components/ui/toggle-group/toggle-group.d.ts +35 -0
- package/dist/components/ui/toggle-group/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group/toggle-group.js +38 -0
- package/dist/components/ui/toggle-group/toggle-group.js.map +1 -0
- package/dist/components/ui/tooltip/index.d.ts +2 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -0
- package/dist/components/ui/tooltip/tooltip.d.ts +18 -0
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip/tooltip.js +67 -0
- package/dist/components/ui/tooltip/tooltip.js.map +1 -0
- package/dist/index.d.ts +96 -19
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +90 -20
- package/dist/lib/keyed-rows.d.ts +36 -0
- package/dist/lib/keyed-rows.d.ts.map +1 -0
- package/dist/lib/keyed-rows.js +53 -0
- package/dist/lib/keyed-rows.js.map +1 -0
- package/dist/lib/keyed-rows.test.d.ts +2 -0
- package/dist/lib/keyed-rows.test.d.ts.map +1 -0
- package/dist/lib/overlay.d.ts +44 -0
- package/dist/lib/overlay.d.ts.map +1 -0
- package/dist/lib/overlay.js +57 -0
- package/dist/lib/overlay.js.map +1 -0
- package/dist/lib/themes.d.ts +197 -0
- package/dist/lib/themes.d.ts.map +1 -0
- package/dist/lib/themes.js +303 -0
- package/dist/lib/themes.js.map +1 -0
- package/dist/lib/tokens.d.ts +103 -0
- package/dist/lib/tokens.d.ts.map +1 -0
- package/dist/lib/tokens.js +805 -0
- package/dist/lib/tokens.js.map +1 -0
- package/dist/lib/utils.d.ts +27 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +61 -3
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/variants.d.ts +57 -0
- package/dist/lib/variants.d.ts.map +1 -0
- package/dist/lib/variants.js +49 -0
- package/dist/lib/variants.js.map +1 -0
- package/dist/lib/version-notes.d.ts +24 -0
- package/dist/lib/version-notes.d.ts.map +1 -0
- package/dist/lib/version-notes.js +41 -1
- package/dist/lib/version-notes.js.map +1 -0
- package/dist/r/accordion.json +25 -0
- package/dist/r/account-menu.json +26 -0
- package/dist/r/alert-dialog.json +24 -0
- package/dist/r/alert.json +24 -0
- package/dist/r/app-shell.json +22 -0
- package/dist/r/aspect-ratio.json +22 -0
- package/dist/r/avatar.json +22 -0
- package/dist/r/badge.json +24 -0
- package/dist/r/board.json +22 -0
- package/dist/r/breadcrumb.json +24 -0
- package/dist/r/button-group.json +23 -0
- package/dist/r/button.json +24 -0
- package/dist/r/calendar.json +26 -0
- package/dist/r/card.json +22 -0
- package/dist/r/carousel.json +27 -0
- package/dist/r/chart.json +25 -0
- package/dist/r/checkbox.json +25 -0
- package/dist/r/code-block.json +25 -0
- package/dist/r/collapsible.json +24 -0
- package/dist/r/combobox.json +25 -0
- package/dist/r/command.json +25 -0
- package/dist/r/context-menu.json +25 -0
- package/dist/r/conversation.json +49 -0
- package/dist/r/detail-panel.json +25 -0
- package/dist/r/dialog.json +25 -0
- package/dist/r/diff-block.json +22 -0
- package/dist/r/drawer.json +24 -0
- package/dist/r/dropdown-menu.json +25 -0
- package/dist/r/empty.json +22 -0
- package/dist/r/entity-icon.json +22 -0
- package/dist/r/field.json +24 -0
- package/dist/r/hover-card.json +24 -0
- package/dist/r/input-group.json +22 -0
- package/dist/r/input-otp.json +24 -0
- package/dist/r/input.json +22 -0
- package/dist/r/item.json +22 -0
- package/dist/r/kbd.json +22 -0
- package/dist/r/label.json +22 -0
- package/dist/r/lib.json +50 -0
- package/dist/r/list-row.json +24 -0
- package/dist/r/menubar.json +25 -0
- package/dist/r/modal-dialog.json +23 -0
- package/dist/r/motion.json +22 -0
- package/dist/r/navigation-menu.json +25 -0
- package/dist/r/page.json +22 -0
- package/dist/r/pagination.json +25 -0
- package/dist/r/panel.json +22 -0
- package/dist/r/popover.json +24 -0
- package/dist/r/progress.json +24 -0
- package/dist/r/radio-group.json +25 -0
- package/dist/r/registry.json +1923 -0
- package/dist/r/resizable.json +25 -0
- package/dist/r/scroll-area.json +22 -0
- package/dist/r/select.json +25 -0
- package/dist/r/separator.json +24 -0
- package/dist/r/settings.json +22 -0
- package/dist/r/sheet.json +26 -0
- package/dist/r/side-rail.json +29 -0
- package/dist/r/sidebar-nav.json +25 -0
- package/dist/r/skeleton.json +22 -0
- package/dist/r/slider.json +24 -0
- package/dist/r/spinner.json +24 -0
- package/dist/r/src/components/composites/account-menu/account-menu.tsx +150 -0
- package/dist/r/src/components/composites/account-menu/index.ts +1 -0
- package/dist/r/src/components/composites/list-row/index.ts +1 -0
- package/dist/r/src/components/composites/list-row/list-row.tsx +116 -0
- package/dist/r/src/components/composites/settings/index.ts +1 -0
- package/dist/r/src/components/composites/settings/settings.tsx +142 -0
- package/dist/r/src/components/composites/stat/index.ts +9 -0
- package/dist/r/src/components/composites/stat/stat.tsx +155 -0
- package/dist/r/src/components/composites/update-dialog/index.ts +7 -0
- package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +529 -0
- package/dist/r/src/components/composites/workspace-mark/index.ts +1 -0
- package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +72 -0
- package/dist/r/src/components/conversation/conversation-avatar.tsx +60 -0
- package/dist/r/src/components/conversation/conversation-surface.tsx +107 -0
- package/dist/r/src/components/conversation/index.ts +25 -0
- package/dist/r/src/components/conversation/message-composer.tsx +239 -0
- package/dist/r/src/components/conversation/message-row.tsx +387 -0
- package/dist/r/src/components/conversation/thread-panel.tsx +141 -0
- package/dist/r/src/components/layout/app-shell/app-shell.tsx +92 -0
- package/dist/r/src/components/layout/app-shell/index.ts +1 -0
- package/dist/r/src/components/layout/page/index.ts +9 -0
- package/dist/r/src/components/layout/page/page.tsx +122 -0
- package/dist/r/src/components/layout/panel/index.ts +12 -0
- package/dist/r/src/components/layout/panel/panel.tsx +166 -0
- package/dist/r/src/components/layout/side-rail/index.ts +12 -0
- package/dist/r/src/components/layout/side-rail/side-rail-context.ts +42 -0
- package/dist/r/src/components/layout/side-rail/side-rail.tsx +405 -0
- package/dist/r/src/components/layout/sidebar-nav/index.ts +14 -0
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +244 -0
- package/dist/r/src/components/layout/status-bar/index.ts +1 -0
- package/dist/r/src/components/layout/status-bar/status-bar.tsx +73 -0
- package/dist/r/src/components/layout/top-bar/index.ts +10 -0
- package/dist/r/src/components/layout/top-bar/top-bar.tsx +166 -0
- package/dist/r/src/components/motion/index.ts +2 -0
- package/dist/r/src/components/motion/presence.tsx +32 -0
- package/dist/r/src/components/theme/appearance-panel.tsx +179 -0
- package/dist/r/src/components/theme/index.ts +22 -0
- package/dist/r/src/components/theme/theme-picker.tsx +174 -0
- package/dist/r/src/components/theme/theme-provider.tsx +309 -0
- package/dist/r/src/components/theme/theme-toggle.tsx +64 -0
- package/dist/r/src/components/ui/accordion/accordion.tsx +66 -0
- package/dist/r/src/components/ui/accordion/index.ts +1 -0
- package/dist/r/src/components/ui/alert/alert.tsx +95 -0
- package/dist/r/src/components/ui/alert/index.ts +1 -0
- package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +176 -0
- package/dist/r/src/components/ui/alert-dialog/index.ts +13 -0
- package/dist/r/src/components/ui/aspect-ratio/aspect-ratio.tsx +38 -0
- package/dist/r/src/components/ui/aspect-ratio/index.ts +1 -0
- package/dist/r/src/components/ui/avatar/avatar.tsx +114 -0
- package/dist/r/src/components/ui/avatar/index.ts +9 -0
- package/dist/r/src/components/ui/badge/badge.tsx +59 -0
- package/dist/r/src/components/ui/badge/index.ts +1 -0
- package/dist/r/src/components/ui/board/board.tsx +254 -0
- package/dist/r/src/components/ui/board/index.ts +10 -0
- package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +117 -0
- package/dist/r/src/components/ui/breadcrumb/index.ts +9 -0
- package/dist/r/src/components/ui/button/button.tsx +89 -0
- package/dist/r/src/components/ui/button/index.ts +1 -0
- package/dist/r/src/components/ui/button-group/button-group.tsx +92 -0
- package/dist/r/src/components/ui/button-group/index.ts +6 -0
- package/dist/r/src/components/ui/calendar/calendar.tsx +277 -0
- package/dist/r/src/components/ui/calendar/index.ts +1 -0
- package/dist/r/src/components/ui/card/card.tsx +82 -0
- package/dist/r/src/components/ui/card/index.ts +10 -0
- package/dist/r/src/components/ui/carousel/carousel.tsx +209 -0
- package/dist/r/src/components/ui/carousel/index.ts +1 -0
- package/dist/r/src/components/ui/chart/chart.tsx +413 -0
- package/dist/r/src/components/ui/chart/index.ts +17 -0
- package/dist/r/src/components/ui/checkbox/checkbox.tsx +99 -0
- package/dist/r/src/components/ui/checkbox/index.ts +1 -0
- package/dist/r/src/components/ui/code-block/code-block.tsx +238 -0
- package/dist/r/src/components/ui/code-block/index.ts +1 -0
- package/dist/r/src/components/ui/collapsible/collapsible.tsx +54 -0
- package/dist/r/src/components/ui/collapsible/index.ts +1 -0
- package/dist/r/src/components/ui/combobox/combobox.tsx +142 -0
- package/dist/r/src/components/ui/combobox/index.ts +10 -0
- package/dist/r/src/components/ui/command/command.tsx +214 -0
- package/dist/r/src/components/ui/command/index.ts +12 -0
- package/dist/r/src/components/ui/context-menu/context-menu.tsx +163 -0
- package/dist/r/src/components/ui/context-menu/index.ts +15 -0
- package/dist/r/src/components/ui/detail-panel/detail-panel.tsx +161 -0
- package/dist/r/src/components/ui/detail-panel/index.ts +9 -0
- package/dist/r/src/components/ui/dialog/dialog.tsx +138 -0
- package/dist/r/src/components/ui/dialog/index.ts +14 -0
- package/dist/r/src/components/ui/diff-block/diff-block.tsx +286 -0
- package/dist/r/src/components/ui/diff-block/index.ts +11 -0
- package/dist/r/src/components/ui/drawer/drawer.tsx +144 -0
- package/dist/r/src/components/ui/drawer/index.ts +13 -0
- package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +203 -0
- package/dist/r/src/components/ui/dropdown-menu/index.ts +18 -0
- package/dist/r/src/components/ui/empty/empty.tsx +104 -0
- package/dist/r/src/components/ui/empty/index.ts +10 -0
- package/dist/r/src/components/ui/entity-icon/entity-icon.tsx +154 -0
- package/dist/r/src/components/ui/entity-icon/index.ts +1 -0
- package/dist/r/src/components/ui/field/field.tsx +131 -0
- package/dist/r/src/components/ui/field/index.ts +11 -0
- package/dist/r/src/components/ui/hover-card/hover-card.tsx +48 -0
- package/dist/r/src/components/ui/hover-card/index.ts +1 -0
- package/dist/r/src/components/ui/input/index.ts +1 -0
- package/dist/r/src/components/ui/input/input.tsx +41 -0
- package/dist/r/src/components/ui/input-group/index.ts +8 -0
- package/dist/r/src/components/ui/input-group/input-group.tsx +111 -0
- package/dist/r/src/components/ui/input-otp/index.ts +1 -0
- package/dist/r/src/components/ui/input-otp/input-otp.tsx +108 -0
- package/dist/r/src/components/ui/item/index.ts +10 -0
- package/dist/r/src/components/ui/item/item.tsx +146 -0
- package/dist/r/src/components/ui/kbd/index.ts +1 -0
- package/dist/r/src/components/ui/kbd/kbd.tsx +42 -0
- package/dist/r/src/components/ui/label/index.ts +1 -0
- package/dist/r/src/components/ui/label/label.tsx +36 -0
- package/dist/r/src/components/ui/menubar/index.ts +16 -0
- package/dist/r/src/components/ui/menubar/menubar.tsx +190 -0
- package/dist/r/src/components/ui/modal-dialog/index.ts +1 -0
- package/dist/r/src/components/ui/modal-dialog/modal-dialog.tsx +95 -0
- package/dist/r/src/components/ui/navigation-menu/index.ts +13 -0
- package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +229 -0
- package/dist/r/src/components/ui/pagination/index.ts +8 -0
- package/dist/r/src/components/ui/pagination/pagination.tsx +144 -0
- package/dist/r/src/components/ui/popover/index.ts +10 -0
- package/dist/r/src/components/ui/popover/popover.tsx +81 -0
- package/dist/r/src/components/ui/progress/index.ts +1 -0
- package/dist/r/src/components/ui/progress/progress.tsx +67 -0
- package/dist/r/src/components/ui/radio-group/index.ts +1 -0
- package/dist/r/src/components/ui/radio-group/radio-group.tsx +78 -0
- package/dist/r/src/components/ui/resizable/index.ts +6 -0
- package/dist/r/src/components/ui/resizable/resizable.tsx +74 -0
- package/dist/r/src/components/ui/scroll-area/index.ts +1 -0
- package/dist/r/src/components/ui/scroll-area/scroll-area.tsx +66 -0
- package/dist/r/src/components/ui/select/index.ts +11 -0
- package/dist/r/src/components/ui/select/select.tsx +188 -0
- package/dist/r/src/components/ui/separator/index.ts +1 -0
- package/dist/r/src/components/ui/separator/separator.tsx +40 -0
- package/dist/r/src/components/ui/sheet/index.ts +13 -0
- package/dist/r/src/components/ui/sheet/sheet.tsx +132 -0
- package/dist/r/src/components/ui/skeleton/index.ts +1 -0
- package/dist/r/src/components/ui/skeleton/skeleton.tsx +28 -0
- package/dist/r/src/components/ui/slider/index.ts +1 -0
- package/dist/r/src/components/ui/slider/slider.tsx +81 -0
- package/dist/r/src/components/ui/spinner/index.ts +1 -0
- package/dist/r/src/components/ui/spinner/spinner.tsx +58 -0
- package/dist/r/src/components/ui/status-chip/index.ts +8 -0
- package/dist/r/src/components/ui/status-chip/status-chip.tsx +142 -0
- package/dist/r/src/components/ui/switch/index.ts +1 -0
- package/dist/r/src/components/ui/switch/switch.tsx +100 -0
- package/dist/r/src/components/ui/table/index.ts +11 -0
- package/dist/r/src/components/ui/table/table.tsx +125 -0
- package/dist/r/src/components/ui/tabs/index.ts +8 -0
- package/dist/r/src/components/ui/tabs/tabs.tsx +77 -0
- package/dist/r/src/components/ui/textarea/index.ts +1 -0
- package/dist/r/src/components/ui/textarea/textarea.tsx +36 -0
- package/dist/r/src/components/ui/toast/index.ts +1 -0
- package/dist/r/src/components/ui/toast/toast.tsx +220 -0
- package/dist/r/src/components/ui/toggle/index.ts +1 -0
- package/dist/r/src/components/ui/toggle/toggle.tsx +60 -0
- package/dist/r/src/components/ui/toggle-group/index.ts +6 -0
- package/dist/r/src/components/ui/toggle-group/toggle-group.tsx +66 -0
- package/dist/r/src/components/ui/tooltip/index.ts +9 -0
- package/dist/r/src/components/ui/tooltip/tooltip.tsx +102 -0
- package/dist/r/src/lib/keyed-rows.ts +68 -0
- package/dist/r/src/lib/overlay.ts +70 -0
- package/dist/r/src/lib/themes.ts +490 -0
- package/dist/r/src/lib/tokens.ts +688 -0
- package/dist/r/src/lib/utils.ts +76 -0
- package/dist/r/src/lib/variants.ts +62 -0
- package/dist/r/src/lib/version-notes.ts +65 -0
- package/dist/r/src/styles/base.css +644 -0
- package/dist/r/src/styles/fonts.css +26 -0
- package/dist/r/src/styles/globals.css +18 -0
- package/dist/r/src/styles/theme.css +864 -0
- package/dist/r/stat.json +24 -0
- package/dist/r/status-bar.json +22 -0
- package/dist/r/status-chip.json +23 -0
- package/dist/r/switch.json +24 -0
- package/dist/r/table.json +22 -0
- package/dist/r/tabs.json +24 -0
- package/dist/r/textarea.json +22 -0
- package/dist/r/theme.json +36 -0
- package/dist/r/theming.json +42 -0
- package/dist/r/toast.json +25 -0
- package/dist/r/toggle-group.json +25 -0
- package/dist/r/toggle.json +24 -0
- package/dist/r/tooltip.json +24 -0
- package/dist/r/top-bar.json +22 -0
- package/dist/r/update-dialog.json +28 -0
- package/dist/r/workspace-mark.json +23 -0
- package/package.json +75 -21
- package/registry.json +1923 -0
- package/src/components/composites/account-menu/account-menu.tsx +150 -0
- package/src/components/composites/account-menu/index.ts +1 -0
- package/src/components/composites/list-row/index.ts +1 -0
- package/src/components/composites/list-row/list-row.tsx +116 -0
- package/src/components/composites/settings/index.ts +1 -0
- package/src/components/composites/settings/settings.tsx +142 -0
- package/src/components/composites/stat/index.ts +9 -0
- package/src/components/composites/stat/stat.tsx +155 -0
- package/src/components/composites/update-dialog/index.ts +7 -0
- package/src/components/composites/update-dialog/update-dialog.tsx +529 -0
- package/src/components/composites/workspace-mark/index.ts +1 -0
- package/src/components/composites/workspace-mark/workspace-mark.tsx +72 -0
- package/src/components/conversation/conversation-avatar.tsx +60 -0
- package/src/components/conversation/conversation-surface.tsx +107 -0
- package/src/components/conversation/index.ts +25 -0
- package/src/components/conversation/message-composer.tsx +239 -0
- package/src/components/conversation/message-row.tsx +387 -0
- package/src/components/conversation/thread-panel.tsx +141 -0
- package/src/components/layout/app-shell/app-shell.tsx +92 -0
- package/src/components/layout/app-shell/index.ts +1 -0
- package/src/components/layout/page/index.ts +9 -0
- package/src/components/layout/page/page.tsx +122 -0
- package/src/components/layout/panel/index.ts +12 -0
- package/src/components/layout/panel/panel.tsx +166 -0
- package/src/components/layout/side-rail/index.ts +12 -0
- package/src/components/layout/side-rail/side-rail-context.ts +42 -0
- package/src/components/layout/side-rail/side-rail.tsx +405 -0
- package/src/components/layout/sidebar-nav/index.ts +14 -0
- package/src/components/layout/sidebar-nav/sidebar-nav.tsx +244 -0
- package/src/components/layout/status-bar/index.ts +1 -0
- package/src/components/layout/status-bar/status-bar.tsx +73 -0
- package/src/components/layout/top-bar/index.ts +10 -0
- package/src/components/layout/top-bar/top-bar.tsx +166 -0
- package/src/components/motion/index.ts +2 -0
- package/src/components/motion/presence.tsx +32 -0
- package/src/components/theme/appearance-panel.tsx +179 -0
- package/src/components/theme/index.ts +22 -0
- package/src/components/theme/theme-picker.tsx +174 -0
- package/src/components/theme/theme-provider.tsx +309 -0
- package/src/components/theme/theme-toggle.tsx +64 -0
- package/src/components/ui/accordion/accordion.tsx +66 -0
- package/src/components/ui/accordion/index.ts +1 -0
- package/src/components/ui/alert/alert.tsx +95 -0
- package/src/components/ui/alert/index.ts +1 -0
- package/src/components/ui/alert-dialog/alert-dialog.tsx +176 -0
- package/src/components/ui/alert-dialog/index.ts +13 -0
- package/src/components/ui/aspect-ratio/aspect-ratio.tsx +38 -0
- package/src/components/ui/aspect-ratio/index.ts +1 -0
- package/src/components/ui/avatar/avatar.tsx +114 -0
- package/src/components/ui/avatar/index.ts +9 -0
- package/src/components/ui/badge/badge.tsx +59 -0
- package/src/components/ui/badge/index.ts +1 -0
- package/src/components/ui/board/board.tsx +254 -0
- package/src/components/ui/board/index.ts +10 -0
- package/src/components/ui/breadcrumb/breadcrumb.tsx +117 -0
- package/src/components/ui/breadcrumb/index.ts +9 -0
- package/src/components/ui/button/button.tsx +89 -0
- package/src/components/ui/button/index.ts +1 -0
- package/src/components/ui/button-group/button-group.tsx +92 -0
- package/src/components/ui/button-group/index.ts +6 -0
- package/src/components/ui/calendar/calendar.tsx +277 -0
- package/src/components/ui/calendar/index.ts +1 -0
- package/src/components/ui/card/card.tsx +82 -0
- package/src/components/ui/card/index.ts +10 -0
- package/src/components/ui/carousel/carousel.tsx +209 -0
- package/src/components/ui/carousel/index.ts +1 -0
- package/src/components/ui/chart/chart.tsx +413 -0
- package/src/components/ui/chart/index.ts +17 -0
- package/src/components/ui/checkbox/checkbox.tsx +99 -0
- package/src/components/ui/checkbox/index.ts +1 -0
- package/src/components/ui/code-block/code-block.tsx +238 -0
- package/src/components/ui/code-block/index.ts +1 -0
- package/src/components/ui/collapsible/collapsible.tsx +54 -0
- package/src/components/ui/collapsible/index.ts +1 -0
- package/src/components/ui/combobox/combobox.tsx +142 -0
- package/src/components/ui/combobox/index.ts +10 -0
- package/src/components/ui/command/command.tsx +214 -0
- package/src/components/ui/command/index.ts +12 -0
- package/src/components/ui/context-menu/context-menu.tsx +163 -0
- package/src/components/ui/context-menu/index.ts +15 -0
- package/src/components/ui/detail-panel/detail-panel.tsx +161 -0
- package/src/components/ui/detail-panel/index.ts +9 -0
- package/src/components/ui/dialog/dialog.tsx +138 -0
- package/src/components/ui/dialog/index.ts +14 -0
- package/src/components/ui/diff-block/diff-block.tsx +286 -0
- package/src/components/ui/diff-block/index.ts +11 -0
- package/src/components/ui/drawer/drawer.tsx +144 -0
- package/src/components/ui/drawer/index.ts +13 -0
- package/src/components/ui/dropdown-menu/dropdown-menu.tsx +203 -0
- package/src/components/ui/dropdown-menu/index.ts +18 -0
- package/src/components/ui/empty/empty.tsx +104 -0
- package/src/components/ui/empty/index.ts +10 -0
- package/src/components/ui/entity-icon/entity-icon.tsx +154 -0
- package/src/components/ui/entity-icon/index.ts +1 -0
- package/src/components/ui/field/field.tsx +131 -0
- package/src/components/ui/field/index.ts +11 -0
- package/src/components/ui/hover-card/hover-card.tsx +48 -0
- package/src/components/ui/hover-card/index.ts +1 -0
- package/src/components/ui/input/index.ts +1 -0
- package/src/components/ui/input/input.tsx +41 -0
- package/src/components/ui/input-group/index.ts +8 -0
- package/src/components/ui/input-group/input-group.tsx +111 -0
- package/src/components/ui/input-otp/index.ts +1 -0
- package/src/components/ui/input-otp/input-otp.tsx +108 -0
- package/src/components/ui/item/index.ts +10 -0
- package/src/components/ui/item/item.tsx +146 -0
- package/src/components/ui/kbd/index.ts +1 -0
- package/src/components/ui/kbd/kbd.tsx +42 -0
- package/src/components/ui/label/index.ts +1 -0
- package/src/components/ui/label/label.tsx +36 -0
- package/src/components/ui/menubar/index.ts +16 -0
- package/src/components/ui/menubar/menubar.tsx +190 -0
- package/src/components/ui/modal-dialog/index.ts +1 -0
- package/src/components/ui/modal-dialog/modal-dialog.tsx +95 -0
- package/src/components/ui/navigation-menu/index.ts +13 -0
- package/src/components/ui/navigation-menu/navigation-menu.tsx +229 -0
- package/src/components/ui/pagination/index.ts +8 -0
- package/src/components/ui/pagination/pagination.tsx +144 -0
- package/src/components/ui/popover/index.ts +10 -0
- package/src/components/ui/popover/popover.tsx +81 -0
- package/src/components/ui/progress/index.ts +1 -0
- package/src/components/ui/progress/progress.tsx +67 -0
- package/src/components/ui/radio-group/index.ts +1 -0
- package/src/components/ui/radio-group/radio-group.tsx +78 -0
- package/src/components/ui/resizable/index.ts +6 -0
- package/src/components/ui/resizable/resizable.tsx +74 -0
- package/src/components/ui/scroll-area/index.ts +1 -0
- package/src/components/ui/scroll-area/scroll-area.tsx +66 -0
- package/src/components/ui/select/index.ts +11 -0
- package/src/components/ui/select/select.tsx +188 -0
- package/src/components/ui/separator/index.ts +1 -0
- package/src/components/ui/separator/separator.tsx +40 -0
- package/src/components/ui/sheet/index.ts +13 -0
- package/src/components/ui/sheet/sheet.tsx +132 -0
- package/src/components/ui/skeleton/index.ts +1 -0
- package/src/components/ui/skeleton/skeleton.tsx +28 -0
- package/src/components/ui/slider/index.ts +1 -0
- package/src/components/ui/slider/slider.tsx +81 -0
- package/src/components/ui/spinner/index.ts +1 -0
- package/src/components/ui/spinner/spinner.tsx +58 -0
- package/src/components/ui/status-chip/index.ts +8 -0
- package/src/components/ui/status-chip/status-chip.tsx +142 -0
- package/src/components/ui/switch/index.ts +1 -0
- package/src/components/ui/switch/switch.tsx +100 -0
- package/src/components/ui/table/index.ts +11 -0
- package/src/components/ui/table/table.tsx +125 -0
- package/src/components/ui/tabs/index.ts +8 -0
- package/src/components/ui/tabs/tabs.tsx +77 -0
- package/src/components/ui/textarea/index.ts +1 -0
- package/src/components/ui/textarea/textarea.tsx +36 -0
- package/src/components/ui/toast/index.ts +1 -0
- package/src/components/ui/toast/toast.tsx +220 -0
- package/src/components/ui/toggle/index.ts +1 -0
- package/src/components/ui/toggle/toggle.tsx +60 -0
- package/src/components/ui/toggle-group/index.ts +6 -0
- package/src/components/ui/toggle-group/toggle-group.tsx +66 -0
- package/src/components/ui/tooltip/index.ts +9 -0
- package/src/components/ui/tooltip/tooltip.tsx +102 -0
- package/src/index.ts +154 -0
- package/src/lib/keyed-rows.ts +68 -0
- package/src/lib/overlay.ts +70 -0
- package/src/lib/themes.ts +490 -0
- package/src/lib/tokens.ts +688 -0
- package/src/lib/utils.ts +74 -4
- package/src/lib/variants.ts +62 -0
- package/src/lib/version-notes.ts +35 -0
- package/src/styles/base.css +489 -484
- package/src/styles/fonts.css +26 -0
- package/src/styles/globals.css +14 -3
- package/src/styles/theme.css +838 -229
- package/LICENSE +0 -201
- package/dist/components/account-drawer.d.ts +0 -11
- package/dist/components/account-drawer.js +0 -120
- package/dist/components/appearance.d.ts +0 -261
- package/dist/components/appearance.js +0 -802
- package/dist/components/on-screen-controls.d.ts +0 -8
- package/dist/components/on-screen-controls.js +0 -162
- package/dist/components/scene-settings.d.ts +0 -33
- package/dist/components/scene-settings.js +0 -253
- package/dist/components/theme-preview.d.ts +0 -40
- package/dist/components/theme-preview.js +0 -210
- package/dist/components/theme-provider.d.ts +0 -52
- package/dist/components/theme-provider.js +0 -128
- package/dist/components/theme-swatch.d.ts +0 -12
- package/dist/components/theme-swatch.js +0 -66
- package/dist/components/theme-toggle.d.ts +0 -7
- package/dist/components/theme-toggle.js +0 -64
- package/dist/components/ui/badge.d.ts +0 -8
- package/dist/components/ui/badge.js +0 -34
- package/dist/components/ui/button.d.ts +0 -9
- package/dist/components/ui/button.js +0 -52
- package/dist/components/ui/card.d.ts +0 -4
- package/dist/components/ui/card.js +0 -28
- package/dist/components/ui/dialog.d.ts +0 -15
- package/dist/components/ui/dialog.js +0 -104
- package/dist/components/ui/drawer.d.ts +0 -24
- package/dist/components/ui/drawer.js +0 -120
- package/dist/components/ui/dropdown-menu.d.ts +0 -35
- package/dist/components/ui/dropdown-menu.js +0 -180
- package/dist/components/ui/empty.d.ts +0 -12
- package/dist/components/ui/field.d.ts +0 -25
- package/dist/components/ui/field.js +0 -188
- package/dist/components/ui/input.d.ts +0 -3
- package/dist/components/ui/input.js +0 -22
- package/dist/components/ui/label.d.ts +0 -3
- package/dist/components/ui/label.js +0 -17
- package/dist/components/ui/radio-group.d.ts +0 -5
- package/dist/components/ui/radio-group.js +0 -39
- package/dist/components/ui/separator.d.ts +0 -7
- package/dist/components/ui/separator.js +0 -20
- package/dist/components/ui/skeleton.d.ts +0 -3
- package/dist/components/ui/skeleton.js +0 -17
- package/dist/components/ui/spinner.d.ts +0 -5
- package/dist/components/ui/spinner.js +0 -17
- package/dist/components/ui/switch.d.ts +0 -8
- package/dist/components/ui/switch.js +0 -59
- package/dist/components/ui/tabs.d.ts +0 -11
- package/dist/components/ui/tabs.js +0 -57
- package/dist/components/ui/toggle-group.d.ts +0 -13
- package/dist/components/ui/toggle-group.js +0 -95
- package/dist/components/ui/toggle.d.ts +0 -10
- package/dist/components/ui/toggle.js +0 -41
- package/dist/components/ui/tooltip.d.ts +0 -15
- package/dist/components/ui/tooltip.js +0 -55
- package/dist/components/version-dialog.d.ts +0 -25
- package/dist/components/version-dialog.js +0 -330
- package/dist/components/workspace-brand.d.ts +0 -5
- package/dist/components/workspace-brand.js +0 -13
- package/dist/components/workspace-logo.d.ts +0 -3
- package/dist/components/workspace-logo.js +0 -17
- package/src/components/account-drawer.tsx +0 -114
- package/src/components/appearance.ts +0 -1112
- package/src/components/on-screen-controls.tsx +0 -149
- package/src/components/scene-settings.tsx +0 -199
- package/src/components/theme-preview.tsx +0 -170
- package/src/components/theme-provider.tsx +0 -214
- package/src/components/theme-swatch.tsx +0 -49
- package/src/components/theme-toggle.tsx +0 -48
- package/src/components/ui/badge.tsx +0 -40
- package/src/components/ui/button.tsx +0 -58
- package/src/components/ui/card.tsx +0 -21
- package/src/components/ui/dialog.tsx +0 -132
- package/src/components/ui/drawer.tsx +0 -168
- package/src/components/ui/dropdown-menu.tsx +0 -235
- package/src/components/ui/empty.tsx +0 -97
- package/src/components/ui/field.tsx +0 -220
- package/src/components/ui/input.tsx +0 -20
- package/src/components/ui/label.tsx +0 -19
- package/src/components/ui/radio-group.tsx +0 -41
- package/src/components/ui/separator.tsx +0 -28
- package/src/components/ui/skeleton.tsx +0 -16
- package/src/components/ui/spinner.tsx +0 -20
- package/src/components/ui/switch.tsx +0 -59
- package/src/components/ui/tabs.tsx +0 -76
- package/src/components/ui/toggle-group.tsx +0 -98
- package/src/components/ui/toggle.tsx +0 -42
- package/src/components/ui/tooltip.tsx +0 -61
- package/src/components/version-dialog.tsx +0 -368
- package/src/components/workspace-brand.tsx +0 -18
- package/src/components/workspace-logo.tsx +0 -21
- package/src/index.tsx +0 -53
- package/src/styles/auth-shell.css +0 -167
- package/src/styles/conventional-workspace.css +0 -2858
- package/src/styles/dev-view.css +0 -899
- package/src/styles/workspace-shell.css +0 -82
- package/tsconfig.json +0 -11
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { AlertDialog as KobalteAlertDialog } from '@kobalte/core/alert-dialog'
|
|
2
|
+
import type { ComponentProps } from 'solid-js'
|
|
3
|
+
import { createEffect, createSignal, splitProps } from 'solid-js'
|
|
4
|
+
import { overlayMotion, overlayPositioner, overlayScrim, overlaySurface } from '#lib/overlay'
|
|
5
|
+
import { cn } from '#lib/utils'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* AlertDialog.
|
|
9
|
+
*
|
|
10
|
+
* A dialog that cannot be dismissed by accident: Escape and a click on the scrim
|
|
11
|
+
* do nothing, and the user must choose one of the actions. That is the whole
|
|
12
|
+
* difference from Dialog, and it is why this exists as its own component rather
|
|
13
|
+
* than a prop — a caller has to reach for it deliberately.
|
|
14
|
+
*
|
|
15
|
+
* The consequence is a rule of use: this is for confirming a destructive or
|
|
16
|
+
* irreversible step. Wrapping an ordinary form in an AlertDialog traps someone who
|
|
17
|
+
* wants to back out.
|
|
18
|
+
*
|
|
19
|
+
* There is deliberately no close button in the corner. An X has no label, and the
|
|
20
|
+
* point of this surface is that every exit is a named choice.
|
|
21
|
+
*/
|
|
22
|
+
export function AlertDialog(props: ComponentProps<typeof KobalteAlertDialog>) {
|
|
23
|
+
return <KobalteAlertDialog {...props} />
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function AlertDialogTrigger(props: ComponentProps<typeof KobalteAlertDialog.Trigger>) {
|
|
27
|
+
return <KobalteAlertDialog.Trigger {...props} />
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function AlertDialogPortal(props: ComponentProps<typeof KobalteAlertDialog.Portal>) {
|
|
31
|
+
return <KobalteAlertDialog.Portal {...props} />
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function AlertDialogOverlay(props: ComponentProps<typeof KobalteAlertDialog.Overlay>) {
|
|
35
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
36
|
+
return (
|
|
37
|
+
<KobalteAlertDialog.Overlay
|
|
38
|
+
class={cn(
|
|
39
|
+
overlayScrim,
|
|
40
|
+
'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
|
|
41
|
+
local.class
|
|
42
|
+
)}
|
|
43
|
+
{...rest}
|
|
44
|
+
/>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The panel.
|
|
50
|
+
*
|
|
51
|
+
* Kobalte's `AlertDialog.Content` is `Dialog.Content` with `role="alertdialog"`
|
|
52
|
+
* and nothing else — Escape and an outside click dismiss it exactly as they
|
|
53
|
+
* dismiss a Dialog. That is a real gap in the primitive, so the blocking is
|
|
54
|
+
* implemented here, and it is the whole difference between this component and a
|
|
55
|
+
* Dialog:
|
|
56
|
+
*
|
|
57
|
+
* - Escape is prevented, because a key that closes a confirmation is a key that
|
|
58
|
+
* makes "confirm" meaningless.
|
|
59
|
+
* - Pointer and focus interactions outside are prevented, including the scrim
|
|
60
|
+
* click, for the same reason.
|
|
61
|
+
*
|
|
62
|
+
* There is deliberately no prop to turn this off. A surface that can be escaped
|
|
63
|
+
* accidentally does not need to be an AlertDialog; it is a Dialog, and using this
|
|
64
|
+
* one would be a claim about the flow that is not true.
|
|
65
|
+
*/
|
|
66
|
+
const blockDismissal = {
|
|
67
|
+
onEscapeKeyDown: (event: KeyboardEvent) => event.preventDefault(),
|
|
68
|
+
onPointerDownOutside: (event: Event) => event.preventDefault(),
|
|
69
|
+
onFocusOutside: (event: Event) => event.preventDefault(),
|
|
70
|
+
onInteractOutside: (event: Event) => event.preventDefault(),
|
|
71
|
+
} as const
|
|
72
|
+
|
|
73
|
+
export function AlertDialogContent(props: ComponentProps<typeof KobalteAlertDialog.Content>) {
|
|
74
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<KobalteAlertDialog.Portal>
|
|
78
|
+
<AlertDialogOverlay />
|
|
79
|
+
<div class={overlayPositioner}>
|
|
80
|
+
<KobalteAlertDialog.Content
|
|
81
|
+
{...blockDismissal}
|
|
82
|
+
class={cn(overlaySurface, overlayMotion, 'grid w-full max-w-md gap-4 p-5', local.class)}
|
|
83
|
+
{...rest}
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
</KobalteAlertDialog.Portal>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function AlertDialogHeader(props: ComponentProps<'div'>) {
|
|
91
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
92
|
+
return (
|
|
93
|
+
<div
|
|
94
|
+
data-slot="alert-dialog-header"
|
|
95
|
+
class={cn('flex flex-col gap-1.5 text-start', local.class)}
|
|
96
|
+
{...rest}
|
|
97
|
+
/>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function AlertDialogFooter(props: ComponentProps<'div'>) {
|
|
102
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
103
|
+
return (
|
|
104
|
+
<div
|
|
105
|
+
data-slot="alert-dialog-footer"
|
|
106
|
+
class={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', local.class)}
|
|
107
|
+
{...rest}
|
|
108
|
+
/>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function AlertDialogTitle(props: ComponentProps<typeof KobalteAlertDialog.Title>) {
|
|
113
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
114
|
+
return (
|
|
115
|
+
<KobalteAlertDialog.Title
|
|
116
|
+
class={cn('text-base leading-none font-semibold tracking-tight', local.class)}
|
|
117
|
+
{...rest}
|
|
118
|
+
/>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function AlertDialogDescription(
|
|
123
|
+
props: ComponentProps<typeof KobalteAlertDialog.Description>
|
|
124
|
+
) {
|
|
125
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
126
|
+
return (
|
|
127
|
+
<KobalteAlertDialog.Description
|
|
128
|
+
class={cn('text-muted-foreground text-sm', local.class)}
|
|
129
|
+
{...rest}
|
|
130
|
+
/>
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* One of the dialog's two named choices.
|
|
136
|
+
*
|
|
137
|
+
* Kobalte labels its close button "Dismiss" by default, because a generic close
|
|
138
|
+
* button is usually an icon with no text of its own. In an AlertDialog it is
|
|
139
|
+
* something else: the named choices. An `aria-label` there *replaces* the visible
|
|
140
|
+
* text, so a screen reader hears "Dismiss" twice and the user cannot tell the
|
|
141
|
+
* destructive action from the safe one.
|
|
142
|
+
*
|
|
143
|
+
* The injected label is removed rather than overridden with an empty one. An empty
|
|
144
|
+
* `aria-label` is not reliably ignored — some name computations treat its presence
|
|
145
|
+
* as an explicit empty name, which leaves the button unnamed — so the attribute
|
|
146
|
+
* has to go, and the visible text becomes the name. A caller whose button is an
|
|
147
|
+
* icon passes its own `aria-label`, and that one is left alone.
|
|
148
|
+
*
|
|
149
|
+
* Applied through a layout-neutral wrapper because Kobalte keeps the `ref` for its
|
|
150
|
+
* own dismissable layer and does not forward it. The wrapper is `display: contents`
|
|
151
|
+
* so the button remains the flex item its parent lays out.
|
|
152
|
+
*/
|
|
153
|
+
function AlertDialogChoice(props: ComponentProps<typeof KobalteAlertDialog.CloseButton>) {
|
|
154
|
+
const [local, rest] = splitProps(props, ['class', 'aria-label'])
|
|
155
|
+
const [wrapper, setWrapper] = createSignal<HTMLSpanElement>()
|
|
156
|
+
|
|
157
|
+
createEffect(() => {
|
|
158
|
+
const root = wrapper()
|
|
159
|
+
if (!root || local['aria-label'] !== undefined) return
|
|
160
|
+
root.querySelector('button')?.removeAttribute('aria-label')
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<span ref={setWrapper} class="contents">
|
|
165
|
+
<KobalteAlertDialog.CloseButton class={cn(local.class)} {...rest} />
|
|
166
|
+
</span>
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function AlertDialogAction(props: ComponentProps<typeof KobalteAlertDialog.CloseButton>) {
|
|
171
|
+
return <AlertDialogChoice {...props} />
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function AlertDialogCancel(props: ComponentProps<typeof KobalteAlertDialog.CloseButton>) {
|
|
175
|
+
return <AlertDialogChoice {...props} />
|
|
176
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AlertDialog,
|
|
3
|
+
AlertDialogAction,
|
|
4
|
+
AlertDialogCancel,
|
|
5
|
+
AlertDialogContent,
|
|
6
|
+
AlertDialogDescription,
|
|
7
|
+
AlertDialogFooter,
|
|
8
|
+
AlertDialogHeader,
|
|
9
|
+
AlertDialogOverlay,
|
|
10
|
+
AlertDialogPortal,
|
|
11
|
+
AlertDialogTitle,
|
|
12
|
+
AlertDialogTrigger,
|
|
13
|
+
} from './alert-dialog'
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ComponentProps } from 'solid-js'
|
|
2
|
+
import { splitProps } from 'solid-js'
|
|
3
|
+
import { cn } from '#lib/utils'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* AspectRatio.
|
|
7
|
+
*
|
|
8
|
+
* Holds a box to a ratio so its content cannot change the layout as it loads. The
|
|
9
|
+
* problem it solves is a specific one: an image or an embed whose intrinsic size is
|
|
10
|
+
* unknown until it arrives pushes everything below it down when it does, and a
|
|
11
|
+
* preview or a grid of cards is where that is most visible.
|
|
12
|
+
*
|
|
13
|
+
* CSS `aspect-ratio` rather than the padding-top trick a decade of libraries used:
|
|
14
|
+
* the property is supported everywhere this system runs, it does not require a
|
|
15
|
+
* wrapper element, and it does not break when the child is positioned.
|
|
16
|
+
*
|
|
17
|
+
* The child fills the box, so a caller passes the image, video or iframe directly
|
|
18
|
+
* and never sizes it.
|
|
19
|
+
*/
|
|
20
|
+
export type AspectRatioProps = ComponentProps<'div'> & {
|
|
21
|
+
/** Width divided by height, e.g. `16 / 9` or `1`. */
|
|
22
|
+
ratio?: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function AspectRatio(props: AspectRatioProps) {
|
|
26
|
+
const [local, rest] = splitProps(props, ['class', 'ratio', 'children'])
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div
|
|
30
|
+
data-slot="aspect-ratio"
|
|
31
|
+
style={{ 'aspect-ratio': String(local.ratio ?? 16 / 9) }}
|
|
32
|
+
class={cn('relative w-full [&>*]:absolute [&>*]:inset-0 [&>*]:size-full', local.class)}
|
|
33
|
+
{...rest}
|
|
34
|
+
>
|
|
35
|
+
{local.children}
|
|
36
|
+
</div>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AspectRatio, type AspectRatioProps } from './aspect-ratio'
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { ComponentProps } from 'solid-js'
|
|
2
|
+
import { createSignal, Show, splitProps } from 'solid-js'
|
|
3
|
+
import { cn } from '#lib/utils'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Avatar.
|
|
7
|
+
*
|
|
8
|
+
* The fallback is painted *under* the image and the image is removed on error,
|
|
9
|
+
* which is the arrangement that avoids every flicker case: a cached image
|
|
10
|
+
* covers the fallback on the first paint, a slow image shows the fallback
|
|
11
|
+
* until it arrives, and a broken image leaves the fallback in place instead of
|
|
12
|
+
* a browser glyph.
|
|
13
|
+
*
|
|
14
|
+
* Initials are derived here so the rule lives in one place rather than in
|
|
15
|
+
* every caller's string slicing: two words give two letters, one word gives
|
|
16
|
+
* one, and a name with no letters gives nothing rather than a stray dot.
|
|
17
|
+
*/
|
|
18
|
+
export function initialsFrom(name: string): string {
|
|
19
|
+
const parts = name.trim().split(/\s+/).filter(Boolean)
|
|
20
|
+
const first = parts[0]?.[0] ?? ''
|
|
21
|
+
if (!first) return ''
|
|
22
|
+
const last = parts.length > 1 ? (parts[parts.length - 1]?.[0] ?? '') : ''
|
|
23
|
+
return (first + last).toUpperCase()
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const avatarSizes = {
|
|
27
|
+
xs: 'size-5 text-2xs',
|
|
28
|
+
sm: 'size-6 text-2xs',
|
|
29
|
+
md: 'size-8 text-xs',
|
|
30
|
+
lg: 'size-10 text-sm',
|
|
31
|
+
xl: 'size-12 text-base',
|
|
32
|
+
} as const
|
|
33
|
+
|
|
34
|
+
export type AvatarProps = ComponentProps<'span'> & {
|
|
35
|
+
size?: keyof typeof avatarSizes
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function Avatar(props: AvatarProps) {
|
|
39
|
+
const [local, rest] = splitProps(props, ['class', 'size'])
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<span
|
|
43
|
+
data-slot="avatar"
|
|
44
|
+
class={cn(
|
|
45
|
+
'relative flex shrink-0 overflow-hidden rounded-full select-none',
|
|
46
|
+
avatarSizes[local.size ?? 'md'],
|
|
47
|
+
local.class
|
|
48
|
+
)}
|
|
49
|
+
{...rest}
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type AvatarImageProps = Omit<ComponentProps<'img'>, 'onError'> & {
|
|
55
|
+
onLoadingStatusChange?: (status: 'loading' | 'loaded' | 'error') => void
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function AvatarImage(props: AvatarImageProps) {
|
|
59
|
+
const [local, rest] = splitProps(props, ['class', 'alt', 'onLoadingStatusChange'])
|
|
60
|
+
const [status, setStatus] = createSignal<'loading' | 'loaded' | 'error'>('loading')
|
|
61
|
+
|
|
62
|
+
const update = (next: 'loading' | 'loaded' | 'error') => {
|
|
63
|
+
setStatus(next)
|
|
64
|
+
local.onLoadingStatusChange?.(next)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<Show when={status() !== 'error'}>
|
|
69
|
+
<img
|
|
70
|
+
data-slot="avatar-image"
|
|
71
|
+
alt={local.alt ?? ''}
|
|
72
|
+
class={cn('absolute inset-0 z-10 aspect-square size-full object-cover', local.class)}
|
|
73
|
+
onLoad={() => update('loaded')}
|
|
74
|
+
onError={() => update('error')}
|
|
75
|
+
{...rest}
|
|
76
|
+
/>
|
|
77
|
+
</Show>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type AvatarFallbackProps = ComponentProps<'span'> & {
|
|
82
|
+
/** A person or entity name. Initials are derived from it. */
|
|
83
|
+
name?: string
|
|
84
|
+
/** Replace the derived initials with a glyph or emoji string. */
|
|
85
|
+
content?: string
|
|
86
|
+
/** How long to wait before showing the fallback, in ms. 0 shows it at once. */
|
|
87
|
+
delay?: number
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function AvatarFallback(props: AvatarFallbackProps) {
|
|
91
|
+
const [local, rest] = splitProps(props, ['class', 'name', 'content', 'delay'])
|
|
92
|
+
const [revealed, setRevealed] = createSignal((local.delay ?? 0) <= 0)
|
|
93
|
+
|
|
94
|
+
if ((local.delay ?? 0) > 0) {
|
|
95
|
+
setTimeout(() => setRevealed(true), local.delay)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const label = () => local.content ?? initialsFrom(local.name ?? '')
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<span
|
|
102
|
+
data-slot="avatar-fallback"
|
|
103
|
+
class={cn(
|
|
104
|
+
'bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full font-medium',
|
|
105
|
+
{ 'opacity-0': !revealed() },
|
|
106
|
+
local.class
|
|
107
|
+
)}
|
|
108
|
+
{...rest}
|
|
109
|
+
>
|
|
110
|
+
<span aria-hidden="true">{label()}</span>
|
|
111
|
+
{local.name ? <span class="visually-hidden">{local.name}</span> : null}
|
|
112
|
+
</span>
|
|
113
|
+
)
|
|
114
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Polymorphic, type PolymorphicProps } from '@kobalte/core/polymorphic'
|
|
2
|
+
import { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'
|
|
3
|
+
import { cva, type VariantProps } from '#lib/variants'
|
|
4
|
+
import { cn } from '#lib/utils'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Badge.
|
|
8
|
+
*
|
|
9
|
+
* A short, non-interactive status label. If it can be clicked it is a Button
|
|
10
|
+
* with `size="2xs"`, not a Badge — the difference matters because a Badge
|
|
11
|
+
* carries no focus or pressed state and must never be the only way to reach an
|
|
12
|
+
* action.
|
|
13
|
+
*/
|
|
14
|
+
export const badgeVariants = cva(
|
|
15
|
+
'inline-flex w-fit shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-md border border-transparent font-medium transition-colors [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-3',
|
|
16
|
+
{
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
default: 'bg-primary text-primary-foreground',
|
|
20
|
+
secondary: 'bg-secondary text-secondary-foreground',
|
|
21
|
+
outline: 'border-border text-foreground',
|
|
22
|
+
/** Tinted status fills, for counts and states rather than actions. */
|
|
23
|
+
success: 'bg-success-subtle text-success',
|
|
24
|
+
warning: 'bg-warning-subtle text-warning',
|
|
25
|
+
destructive: 'bg-destructive-subtle text-destructive',
|
|
26
|
+
info: 'bg-info-subtle text-info',
|
|
27
|
+
subtle: 'bg-primary-subtle text-primary',
|
|
28
|
+
},
|
|
29
|
+
size: {
|
|
30
|
+
sm: 'h-4 px-1.5 text-2xs',
|
|
31
|
+
md: 'h-5 px-2 text-xs',
|
|
32
|
+
lg: 'h-6 px-2.5 text-xs',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
variant: 'default',
|
|
37
|
+
size: 'md',
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
type BadgeVariantProps = VariantProps<typeof badgeVariants>
|
|
43
|
+
|
|
44
|
+
export type BadgeProps<T extends ValidComponent = 'span'> = PolymorphicProps<
|
|
45
|
+
T,
|
|
46
|
+
BadgeVariantProps & { class?: string }
|
|
47
|
+
>
|
|
48
|
+
|
|
49
|
+
export function Badge<T extends ValidComponent = 'span'>(props: BadgeProps<T>) {
|
|
50
|
+
const [local, rest] = splitProps(props as BadgeProps, ['variant', 'size', 'class'])
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Polymorphic
|
|
54
|
+
as="span"
|
|
55
|
+
class={cn(badgeVariants({ variant: local.variant, size: local.size }), local.class)}
|
|
56
|
+
{...(rest as ComponentProps<'span'>)}
|
|
57
|
+
/>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge, badgeVariants, type BadgeProps } from './badge'
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { createMemo, createSignal, For, Show, splitProps, type JSX } from 'solid-js'
|
|
2
|
+
import { cva, type VariantProps } from '#lib/variants'
|
|
3
|
+
import { cn } from '#lib/utils'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Board.
|
|
7
|
+
*
|
|
8
|
+
* Columns of cards, with drag between them — the shape a task tracker, a CRM
|
|
9
|
+
* pipeline, a support queue and a release plan all share. It is generic in the
|
|
10
|
+
* one place that matters: the *column ids are the caller's*, and so is the rule
|
|
11
|
+
* that decides which moves are legal. The component knows nothing about tasks.
|
|
12
|
+
*
|
|
13
|
+
* The transitions are a predicate rather than a derived table because the legal
|
|
14
|
+
* moves in a real product are not "any column to any column". A task that is
|
|
15
|
+
* `completed` may be archived but not re-queued; a lead may become a customer but
|
|
16
|
+
* not a stranger again. A board that let you drop anything anywhere would encode
|
|
17
|
+
* a state machine in the UI that the server rejects — so `canDrop` is required,
|
|
18
|
+
* and a column that cannot receive the dragged card renders as unavailable rather
|
|
19
|
+
* than silently accepting a drop that will fail.
|
|
20
|
+
*
|
|
21
|
+
* Three input methods, because a drag-only board is unusable by keyboard:
|
|
22
|
+
* dragging with the pointer, `Ctrl`/`Cmd` + arrow keys to move a focused card
|
|
23
|
+
* between columns, and whatever the caller wires into `actions`. The card is
|
|
24
|
+
* focusable and its move is announced through a live region, so the board is
|
|
25
|
+
* operable without a mouse.
|
|
26
|
+
*
|
|
27
|
+
* The card is rendered by the caller through `children`, given the item and a set
|
|
28
|
+
* of drag props. That is deliberate: a card's contents are domain — a title, a
|
|
29
|
+
* priority tag, an assignee — and a board that rendered them itself could only
|
|
30
|
+
* ever serve one product.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export type BoardColumn = Readonly<{
|
|
34
|
+
id: string
|
|
35
|
+
label: string
|
|
36
|
+
/** A count or a limit, shown beside the label. */
|
|
37
|
+
meta?: JSX.Element
|
|
38
|
+
/** Dim the column and refuse drops — a lane that is closed or read-only. */
|
|
39
|
+
disabled?: boolean
|
|
40
|
+
}>
|
|
41
|
+
|
|
42
|
+
export type BoardMove = Readonly<{
|
|
43
|
+
itemId: string
|
|
44
|
+
from: string
|
|
45
|
+
to: string
|
|
46
|
+
}>
|
|
47
|
+
|
|
48
|
+
export type BoardProps<T> = {
|
|
49
|
+
columns: readonly BoardColumn[]
|
|
50
|
+
items: readonly T[]
|
|
51
|
+
/** The item's stable id. */
|
|
52
|
+
itemId: (item: T) => string
|
|
53
|
+
/** The id of the column the item currently sits in. */
|
|
54
|
+
itemColumn: (item: T) => string
|
|
55
|
+
/** Whether `item` may move from `from` to `to`. Required: see the note above. */
|
|
56
|
+
canDrop: (item: T, from: string, to: string) => boolean
|
|
57
|
+
onMove: (move: BoardMove) => void
|
|
58
|
+
/** The card body. `dragging` is true while this card is the one being dragged. */
|
|
59
|
+
children: (item: T, state: { dragging: boolean }) => JSX.Element
|
|
60
|
+
/** Shown when a column has no items. */
|
|
61
|
+
emptyColumn?: (column: BoardColumn) => JSX.Element
|
|
62
|
+
/** The board's accessible name. Defaults to "Board". */
|
|
63
|
+
label?: string
|
|
64
|
+
class?: string
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const cardDragState = {
|
|
68
|
+
idle: '',
|
|
69
|
+
dragging: 'opacity-40',
|
|
70
|
+
} as const
|
|
71
|
+
|
|
72
|
+
export function Board<T>(props: BoardProps<T>) {
|
|
73
|
+
const [local] = splitProps(props, [
|
|
74
|
+
'columns',
|
|
75
|
+
'items',
|
|
76
|
+
'itemId',
|
|
77
|
+
'itemColumn',
|
|
78
|
+
'canDrop',
|
|
79
|
+
'onMove',
|
|
80
|
+
'children',
|
|
81
|
+
'emptyColumn',
|
|
82
|
+
'label',
|
|
83
|
+
'class',
|
|
84
|
+
])
|
|
85
|
+
|
|
86
|
+
// The dragged item, not its id: `canDrop` takes the item itself, and the
|
|
87
|
+
// pointer may leave the card before it is dropped.
|
|
88
|
+
const [dragging, setDragging] = createSignal<T | null>(null)
|
|
89
|
+
const [overColumn, setOverColumn] = createSignal<string | null>(null)
|
|
90
|
+
const [announcement, setAnnouncement] = createSignal('')
|
|
91
|
+
|
|
92
|
+
const byColumn = createMemo(() => {
|
|
93
|
+
const grouped = new Map<string, T[]>()
|
|
94
|
+
for (const column of local.columns) grouped.set(column.id, [])
|
|
95
|
+
for (const item of local.items) grouped.get(local.itemColumn(item))?.push(item)
|
|
96
|
+
return grouped
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
const accepts = (column: BoardColumn) => {
|
|
100
|
+
const item = dragging()
|
|
101
|
+
return Boolean(
|
|
102
|
+
item && !column.disabled && local.canDrop(item, local.itemColumn(item), column.id)
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const drop = (column: BoardColumn) => {
|
|
107
|
+
const item = dragging()
|
|
108
|
+
const from = item ? local.itemColumn(item) : null
|
|
109
|
+
setDragging(null)
|
|
110
|
+
setOverColumn(null)
|
|
111
|
+
if (!item || !from || from === column.id || !accepts(column)) return
|
|
112
|
+
local.onMove({ itemId: local.itemId(item), from, to: column.id })
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Keyboard move. `Ctrl`/`Cmd` plus an arrow is the convention for "reorder this
|
|
117
|
+
* thing within its container" that does not collide with scrolling or with the
|
|
118
|
+
* text caret, and it is the same chord a browser tab or a spreadsheet uses.
|
|
119
|
+
*/
|
|
120
|
+
const moveByKeyboard = (item: T, direction: -1 | 1) => {
|
|
121
|
+
const from = local.itemColumn(item)
|
|
122
|
+
const index = local.columns.findIndex((column) => column.id === from)
|
|
123
|
+
const candidates = local.columns.slice(index + direction)
|
|
124
|
+
const ordered = direction === 1 ? candidates : candidates.toReversed()
|
|
125
|
+
const target = ordered.find(
|
|
126
|
+
(column) => !column.disabled && local.canDrop(item, from, column.id)
|
|
127
|
+
)
|
|
128
|
+
if (!target) {
|
|
129
|
+
setAnnouncement(`No column after ${from} accepts this item`)
|
|
130
|
+
return
|
|
131
|
+
}
|
|
132
|
+
local.onMove({ itemId: local.itemId(item), from, to: target.id })
|
|
133
|
+
setAnnouncement(`Moved to ${target.label}`)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return (
|
|
137
|
+
/*
|
|
138
|
+
`role="region"` + `tabindex="0"` because the board scrolls horizontally and a
|
|
139
|
+
keyboard user has to be able to scroll it — axe's `scrollable-region-focusable`.
|
|
140
|
+
It is not enough that the cards are focusable: a board with empty columns, or
|
|
141
|
+
with more columns than fit, has nothing focusable to scroll from.
|
|
142
|
+
*/
|
|
143
|
+
<div
|
|
144
|
+
class={cn('flex min-h-0 gap-4 overflow-x-auto pb-2', local.class)}
|
|
145
|
+
role="region"
|
|
146
|
+
aria-label={local.label ?? 'Board'}
|
|
147
|
+
tabindex="0"
|
|
148
|
+
>
|
|
149
|
+
<For each={local.columns}>
|
|
150
|
+
{(column) => {
|
|
151
|
+
const items = () => byColumn().get(column.id) ?? []
|
|
152
|
+
return (
|
|
153
|
+
<section
|
|
154
|
+
class={cn(
|
|
155
|
+
'flex w-72 shrink-0 flex-col gap-2 rounded-lg border border-border bg-muted/40 p-2',
|
|
156
|
+
accepts(column) && 'border-ring bg-muted',
|
|
157
|
+
overColumn() === column.id && !accepts(column) && 'border-dashed opacity-60',
|
|
158
|
+
column.disabled && 'opacity-50'
|
|
159
|
+
)}
|
|
160
|
+
aria-label={column.label}
|
|
161
|
+
onDragOver={(event) => {
|
|
162
|
+
setOverColumn(column.id)
|
|
163
|
+
if (accepts(column)) event.preventDefault()
|
|
164
|
+
}}
|
|
165
|
+
onDragLeave={() =>
|
|
166
|
+
setOverColumn((current) => (current === column.id ? null : current))
|
|
167
|
+
}
|
|
168
|
+
onDrop={(event) => {
|
|
169
|
+
event.preventDefault()
|
|
170
|
+
drop(column)
|
|
171
|
+
}}
|
|
172
|
+
>
|
|
173
|
+
<header class="flex items-center justify-between gap-2 px-1 py-0.5">
|
|
174
|
+
<h3 class="text-xs font-semibold text-foreground">{column.label}</h3>
|
|
175
|
+
<Show when={column.meta}>
|
|
176
|
+
<span class="text-2xs text-muted-foreground">{column.meta}</span>
|
|
177
|
+
</Show>
|
|
178
|
+
</header>
|
|
179
|
+
<div class="flex min-h-16 flex-col gap-2">
|
|
180
|
+
<For each={items()}>
|
|
181
|
+
{(item) => {
|
|
182
|
+
const isDragging = () => {
|
|
183
|
+
const current = dragging()
|
|
184
|
+
return Boolean(current && local.itemId(current) === local.itemId(item))
|
|
185
|
+
}
|
|
186
|
+
return (
|
|
187
|
+
<article
|
|
188
|
+
class={cn(
|
|
189
|
+
'rounded-md border border-border bg-card text-sm shadow-xs',
|
|
190
|
+
cardDragState[isDragging() ? 'dragging' : 'idle']
|
|
191
|
+
)}
|
|
192
|
+
// A board card is a control that can be moved, so it is
|
|
193
|
+
// focusable and carries the chord it responds to.
|
|
194
|
+
tabindex="0"
|
|
195
|
+
aria-roledescription="Draggable card"
|
|
196
|
+
draggable={true}
|
|
197
|
+
onDragStart={() => setDragging(() => item)}
|
|
198
|
+
onDragEnd={() => {
|
|
199
|
+
setDragging(null)
|
|
200
|
+
setOverColumn(null)
|
|
201
|
+
}}
|
|
202
|
+
onKeyDown={(event) => {
|
|
203
|
+
if (!(event.ctrlKey || event.metaKey)) return
|
|
204
|
+
if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return
|
|
205
|
+
event.preventDefault()
|
|
206
|
+
moveByKeyboard(item, event.key === 'ArrowRight' ? 1 : -1)
|
|
207
|
+
}}
|
|
208
|
+
>
|
|
209
|
+
{local.children(item, { dragging: isDragging() })}
|
|
210
|
+
</article>
|
|
211
|
+
)
|
|
212
|
+
}}
|
|
213
|
+
</For>
|
|
214
|
+
<Show when={items().length === 0}>
|
|
215
|
+
<p class="rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground">
|
|
216
|
+
{local.emptyColumn?.(column) ?? 'Nothing here'}
|
|
217
|
+
</p>
|
|
218
|
+
</Show>
|
|
219
|
+
</div>
|
|
220
|
+
</section>
|
|
221
|
+
)
|
|
222
|
+
}}
|
|
223
|
+
</For>
|
|
224
|
+
{/*
|
|
225
|
+
The keyboard move's result, announced. A drag speaks for itself — the card
|
|
226
|
+
visibly moves — while a keyboard move happens with the focus elsewhere.
|
|
227
|
+
*/}
|
|
228
|
+
<div class="visually-hidden" role="status" aria-live="polite">
|
|
229
|
+
{announcement()}
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export const boardCardTitleVariants = cva('truncate font-medium text-foreground', {
|
|
236
|
+
variants: { size: { sm: 'text-xs', md: 'text-sm' } },
|
|
237
|
+
defaultVariants: { size: 'md' },
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
export type BoardCardTitleProps = { class?: string; children: JSX.Element } & VariantProps<
|
|
241
|
+
typeof boardCardTitleVariants
|
|
242
|
+
>
|
|
243
|
+
|
|
244
|
+
/** The card's title line, at the size a board card uses. */
|
|
245
|
+
export function BoardCardTitle(props: BoardCardTitleProps) {
|
|
246
|
+
return (
|
|
247
|
+
<h4 class={cn(boardCardTitleVariants({ size: props.size }), props.class)}>{props.children}</h4>
|
|
248
|
+
)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** A card's padding, so every card in an application is the same shape. */
|
|
252
|
+
export function BoardCardBody(props: { class?: string; children: JSX.Element }) {
|
|
253
|
+
return <div class={cn('grid gap-1.5 p-2.5', props.class)}>{props.children}</div>
|
|
254
|
+
}
|