@adea-ai/ui 0.60.4 → 0.61.0
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 +23 -0
- package/dist/r/account-menu.json +25 -0
- package/dist/r/alert-dialog.json +22 -0
- package/dist/r/alert.json +22 -0
- package/dist/r/app-shell.json +20 -0
- package/dist/r/aspect-ratio.json +20 -0
- package/dist/r/avatar.json +20 -0
- package/dist/r/badge.json +22 -0
- package/dist/r/board.json +20 -0
- package/dist/r/breadcrumb.json +22 -0
- package/dist/r/button-group.json +22 -0
- package/dist/r/button.json +22 -0
- package/dist/r/calendar.json +25 -0
- package/dist/r/card.json +20 -0
- package/dist/r/carousel.json +26 -0
- package/dist/r/chart.json +23 -0
- package/dist/r/checkbox.json +23 -0
- package/dist/r/code-block.json +24 -0
- package/dist/r/collapsible.json +22 -0
- package/dist/r/combobox.json +23 -0
- package/dist/r/command.json +23 -0
- package/dist/r/context-menu.json +23 -0
- package/dist/r/conversation.json +48 -0
- package/dist/r/detail-panel.json +24 -0
- package/dist/r/dialog.json +23 -0
- package/dist/r/diff-block.json +20 -0
- package/dist/r/drawer.json +22 -0
- package/dist/r/dropdown-menu.json +23 -0
- package/dist/r/empty.json +20 -0
- package/dist/r/entity-icon.json +20 -0
- package/dist/r/field.json +22 -0
- package/dist/r/hover-card.json +22 -0
- package/dist/r/input-group.json +20 -0
- package/dist/r/input-otp.json +22 -0
- package/dist/r/input.json +20 -0
- package/dist/r/item.json +20 -0
- package/dist/r/kbd.json +20 -0
- package/dist/r/label.json +20 -0
- package/dist/r/list-row.json +22 -0
- package/dist/r/menubar.json +23 -0
- package/dist/r/modal-dialog.json +22 -0
- package/dist/r/navigation-menu.json +23 -0
- package/dist/r/page.json +20 -0
- package/dist/r/pagination.json +23 -0
- package/dist/r/panel.json +20 -0
- package/dist/r/popover.json +22 -0
- package/dist/r/progress.json +22 -0
- package/dist/r/radio-group.json +23 -0
- package/dist/r/registry.json +1676 -0
- package/dist/r/resizable.json +23 -0
- package/dist/r/scroll-area.json +20 -0
- package/dist/r/select.json +23 -0
- package/dist/r/separator.json +22 -0
- package/dist/r/settings.json +20 -0
- package/dist/r/sheet.json +25 -0
- package/dist/r/side-rail.json +27 -0
- package/dist/r/sidebar-nav.json +23 -0
- package/dist/r/skeleton.json +20 -0
- package/dist/r/slider.json +22 -0
- package/dist/r/spinner.json +22 -0
- package/dist/r/stat.json +22 -0
- package/dist/r/status-bar.json +20 -0
- package/dist/r/status-chip.json +22 -0
- package/dist/r/switch.json +22 -0
- package/dist/r/table.json +20 -0
- package/dist/r/tabs.json +22 -0
- package/dist/r/textarea.json +20 -0
- package/dist/r/theme.json +36 -0
- package/dist/r/toast.json +23 -0
- package/dist/r/toggle-group.json +24 -0
- package/dist/r/toggle.json +22 -0
- package/dist/r/tooltip.json +22 -0
- package/dist/r/top-bar.json +20 -0
- package/dist/r/update-dialog.json +27 -0
- package/dist/r/workspace-mark.json +22 -0
- package/package.json +75 -21
- package/registry.json +1676 -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,309 @@
|
|
|
1
|
+
import type { JSX } from 'solid-js'
|
|
2
|
+
import {
|
|
3
|
+
createContext,
|
|
4
|
+
createEffect,
|
|
5
|
+
createMemo,
|
|
6
|
+
createSignal,
|
|
7
|
+
onCleanup,
|
|
8
|
+
splitProps,
|
|
9
|
+
useContext,
|
|
10
|
+
} from 'solid-js'
|
|
11
|
+
import { accentPresets, fontOptions } from '#lib/tokens'
|
|
12
|
+
import {
|
|
13
|
+
accentVariables,
|
|
14
|
+
builtinThemes,
|
|
15
|
+
defaultDarkThemeId,
|
|
16
|
+
defaultLightThemeId,
|
|
17
|
+
themeById,
|
|
18
|
+
themeCssVariables,
|
|
19
|
+
type ThemeAppearance,
|
|
20
|
+
type ThemeVariant,
|
|
21
|
+
} from '#lib/themes'
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* ThemeProvider.
|
|
25
|
+
*
|
|
26
|
+
* Owns the appearance preference and applies it to the document. One provider near
|
|
27
|
+
* the root; everything below reads it.
|
|
28
|
+
*
|
|
29
|
+
* ## What a preference is
|
|
30
|
+
*
|
|
31
|
+
* Four independent choices, and keeping them independent is the point:
|
|
32
|
+
*
|
|
33
|
+
* - **appearance** — light, dark, or follow the system.
|
|
34
|
+
* - **a theme per appearance** — so a user can run Catppuccin Mocha by night and
|
|
35
|
+
* Solarized Light by day without re-choosing when the system flips.
|
|
36
|
+
* - **an accent** — adea's six presets, which re-colour the interactive roles on
|
|
37
|
+
* top of whichever theme is active.
|
|
38
|
+
* - **a font** — the interface face.
|
|
39
|
+
*
|
|
40
|
+
* Four axes rather than one list of presets, because they compose: a user who wants
|
|
41
|
+
* Nord with a violet accent and the system font should not need someone to author
|
|
42
|
+
* that combination.
|
|
43
|
+
*
|
|
44
|
+
* ## Why the variants are applied as inline properties
|
|
45
|
+
*
|
|
46
|
+
* The catalogue is data, and a theme is applied by writing its roles onto
|
|
47
|
+
* `<html>` as custom properties. That is what makes an imported palette work
|
|
48
|
+
* without a hand-written `[data-theme]` block per theme, and it is why a settings
|
|
49
|
+
* UI can show a preview by reading the same object rather than by loading a
|
|
50
|
+
* stylesheet. `theme.css` keeps the default theme's values so the first paint is
|
|
51
|
+
* correct before any script runs.
|
|
52
|
+
*/
|
|
53
|
+
export type ThemeSelection = {
|
|
54
|
+
/** `system` follows `prefers-color-scheme` and updates when it changes. */
|
|
55
|
+
appearance: ThemeAppearance | 'system'
|
|
56
|
+
/** The variant to use when the resolved appearance is light. */
|
|
57
|
+
lightThemeId: string
|
|
58
|
+
/** The variant to use when the resolved appearance is dark. */
|
|
59
|
+
darkThemeId: string
|
|
60
|
+
/** An `accentPresets` id, or `theme` for the variant's own primary. */
|
|
61
|
+
accent: string
|
|
62
|
+
/** A `fontOptions` id, or `space-grotesk` for the default. */
|
|
63
|
+
font: string
|
|
64
|
+
/**
|
|
65
|
+
* `comfortable` is the system's default geometry; `compact` moves the control
|
|
66
|
+
* ladder down one rung.
|
|
67
|
+
*
|
|
68
|
+
* Optional, and defaulted on read, so a preference stored before density existed
|
|
69
|
+
* keeps working and `ThemeSelection` stays assignable without it.
|
|
70
|
+
*/
|
|
71
|
+
density?: ThemeDensity
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const defaultThemeSelection: ThemeSelection = {
|
|
75
|
+
appearance: 'system',
|
|
76
|
+
lightThemeId: defaultLightThemeId,
|
|
77
|
+
darkThemeId: defaultDarkThemeId,
|
|
78
|
+
accent: 'theme',
|
|
79
|
+
font: 'space-grotesk',
|
|
80
|
+
density: 'comfortable',
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The two density rungs.
|
|
85
|
+
*
|
|
86
|
+
* `comfortable` is the geometry in `theme.css`, so it is the absence of an
|
|
87
|
+
* attribute rather than a value: a document that ships no `data-density` at all
|
|
88
|
+
* renders correctly, which is what keeps this additive.
|
|
89
|
+
*/
|
|
90
|
+
export type ThemeDensity = 'comfortable' | 'compact'
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* A stored selection's density, defaulted.
|
|
94
|
+
*
|
|
95
|
+
* The stored value is read through here rather than trusted, because a preference
|
|
96
|
+
* written before density existed has no `density` key and a hand-edited store may
|
|
97
|
+
* hold anything.
|
|
98
|
+
*/
|
|
99
|
+
export function resolvedDensity(selection: ThemeSelection): ThemeDensity {
|
|
100
|
+
return selection.density === 'compact' ? 'compact' : 'comfortable'
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type ThemeContextValue = {
|
|
104
|
+
/** The preference as stored. */
|
|
105
|
+
selection: () => ThemeSelection
|
|
106
|
+
/** What the preference resolves to right now, after `system`. */
|
|
107
|
+
resolvedAppearance: () => ThemeAppearance
|
|
108
|
+
/** The variant in use. */
|
|
109
|
+
variant: () => ThemeVariant
|
|
110
|
+
/** Update part of the preference. */
|
|
111
|
+
setSelection: (patch: Partial<ThemeSelection>) => void
|
|
112
|
+
/** The catalogue, so a picker does not import it separately. */
|
|
113
|
+
themes: readonly ThemeVariant[]
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const ThemeContext = createContext<ThemeContextValue>()
|
|
117
|
+
|
|
118
|
+
export function useTheme(): ThemeContextValue {
|
|
119
|
+
const value = useContext(ThemeContext)
|
|
120
|
+
if (!value) throw new Error('useTheme must be called inside a <ThemeProvider>.')
|
|
121
|
+
return value
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** The stored preference, validated against the catalogue. */
|
|
125
|
+
function readSelection(storageKey: string): ThemeSelection {
|
|
126
|
+
if (typeof localStorage === 'undefined') return defaultThemeSelection
|
|
127
|
+
try {
|
|
128
|
+
const raw = localStorage.getItem(storageKey)
|
|
129
|
+
if (!raw) return defaultThemeSelection
|
|
130
|
+
const parsed = JSON.parse(raw) as Partial<ThemeSelection>
|
|
131
|
+
return {
|
|
132
|
+
appearance:
|
|
133
|
+
parsed.appearance === 'light' ||
|
|
134
|
+
parsed.appearance === 'dark' ||
|
|
135
|
+
parsed.appearance === 'system'
|
|
136
|
+
? parsed.appearance
|
|
137
|
+
: defaultThemeSelection.appearance,
|
|
138
|
+
// An unknown id would leave the document with no theme at all, so a stale
|
|
139
|
+
// preference from an older catalogue falls back rather than applying nothing.
|
|
140
|
+
lightThemeId:
|
|
141
|
+
themeById(parsed.lightThemeId ?? '')?.appearance === 'light'
|
|
142
|
+
? (parsed.lightThemeId as string)
|
|
143
|
+
: defaultLightThemeId,
|
|
144
|
+
darkThemeId:
|
|
145
|
+
themeById(parsed.darkThemeId ?? '')?.appearance === 'dark'
|
|
146
|
+
? (parsed.darkThemeId as string)
|
|
147
|
+
: defaultDarkThemeId,
|
|
148
|
+
accent: accentPresets.some((preset) => preset.id === parsed.accent)
|
|
149
|
+
? (parsed.accent as string)
|
|
150
|
+
: defaultThemeSelection.accent,
|
|
151
|
+
font: fontOptions.some((option) => option.id === parsed.font)
|
|
152
|
+
? (parsed.font as string)
|
|
153
|
+
: defaultThemeSelection.font,
|
|
154
|
+
}
|
|
155
|
+
} catch {
|
|
156
|
+
return defaultThemeSelection
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type ThemeProviderProps = {
|
|
161
|
+
children?: JSX.Element
|
|
162
|
+
/** Where the preference is persisted. Distinct per application. */
|
|
163
|
+
storageKey?: string
|
|
164
|
+
/** Start from this instead of the stored preference. */
|
|
165
|
+
initial?: Partial<ThemeSelection>
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export function ThemeProvider(props: ThemeProviderProps) {
|
|
169
|
+
const [local] = splitProps(props, ['children', 'storageKey', 'initial'])
|
|
170
|
+
const storageKey = () => local.storageKey ?? 'adea-appearance'
|
|
171
|
+
|
|
172
|
+
const [selection, setSelectionState] = createSignal<ThemeSelection>({
|
|
173
|
+
...readSelection(storageKey()),
|
|
174
|
+
...local.initial,
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
const [systemAppearance, setSystemAppearance] = createSignal<ThemeAppearance>('light')
|
|
178
|
+
|
|
179
|
+
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') {
|
|
180
|
+
const query = window.matchMedia('(prefers-color-scheme: dark)')
|
|
181
|
+
setSystemAppearance(query.matches ? 'dark' : 'light')
|
|
182
|
+
const onChange = (event: MediaQueryListEvent) =>
|
|
183
|
+
setSystemAppearance(event.matches ? 'dark' : 'light')
|
|
184
|
+
query.addEventListener('change', onChange)
|
|
185
|
+
onCleanup(() => query.removeEventListener('change', onChange))
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const resolvedAppearance = createMemo<ThemeAppearance>(() => {
|
|
189
|
+
const preference = selection().appearance
|
|
190
|
+
if (preference === 'system') return systemAppearance()
|
|
191
|
+
return preference
|
|
192
|
+
})
|
|
193
|
+
|
|
194
|
+
const variant = createMemo<ThemeVariant>(() => {
|
|
195
|
+
const id = resolvedAppearance() === 'dark' ? selection().darkThemeId : selection().lightThemeId
|
|
196
|
+
return themeById(id) ?? builtinThemes[0]!
|
|
197
|
+
})
|
|
198
|
+
|
|
199
|
+
createEffect(() => {
|
|
200
|
+
if (typeof document === 'undefined') return
|
|
201
|
+
const root = document.documentElement
|
|
202
|
+
const active = variant()
|
|
203
|
+
|
|
204
|
+
// The variant's roles, as properties. `--primary` and `--ring` are written here
|
|
205
|
+
// too, and an accent selection is layered over them below.
|
|
206
|
+
//
|
|
207
|
+
// The accent is applied *here* rather than left to the `[data-accent]` blocks in
|
|
208
|
+
// `theme.css`, because this loop writes inline custom properties and an inline
|
|
209
|
+
// declaration outranks every stylesheet selector however specific it is. The
|
|
210
|
+
// blocks still exist and are still correct — they are what styles the window
|
|
211
|
+
// before this runs — but they cannot win from here, so leaving the accent to
|
|
212
|
+
// them meant the attribute was set, the rules were present, and nothing
|
|
213
|
+
// changed on screen.
|
|
214
|
+
const properties = { ...themeCssVariables(active) }
|
|
215
|
+
const accent = accentVariables(selection().accent, resolvedAppearance())
|
|
216
|
+
if (accent) Object.assign(properties, accent)
|
|
217
|
+
|
|
218
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
219
|
+
root.style.setProperty(name, value)
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
root.classList.toggle('dark', resolvedAppearance() === 'dark')
|
|
223
|
+
root.dataset['theme'] = active.id
|
|
224
|
+
root.dataset['appearance'] = resolvedAppearance()
|
|
225
|
+
root.style.colorScheme = resolvedAppearance()
|
|
226
|
+
|
|
227
|
+
if (selection().accent === 'theme') root.removeAttribute('data-accent')
|
|
228
|
+
else root.dataset['accent'] = selection().accent
|
|
229
|
+
|
|
230
|
+
if (selection().font === 'space-grotesk') root.removeAttribute('data-font')
|
|
231
|
+
else root.dataset['font'] = selection().font
|
|
232
|
+
|
|
233
|
+
// Density is a pure token shift, so unlike the colour axes there is nothing to
|
|
234
|
+
// compute: the attribute selects a block in `theme.css`. It is applied here for
|
|
235
|
+
// the same reason as the others — this is the one place that knows what the
|
|
236
|
+
// current selection is, and it is the only writer of these attributes.
|
|
237
|
+
if (resolvedDensity(selection()) === 'comfortable') root.removeAttribute('data-density')
|
|
238
|
+
else root.dataset['density'] = resolvedDensity(selection())
|
|
239
|
+
})
|
|
240
|
+
|
|
241
|
+
const value: ThemeContextValue = {
|
|
242
|
+
selection,
|
|
243
|
+
resolvedAppearance,
|
|
244
|
+
variant,
|
|
245
|
+
themes: builtinThemes,
|
|
246
|
+
setSelection(patch) {
|
|
247
|
+
const next = { ...selection(), ...patch }
|
|
248
|
+
setSelectionState(next)
|
|
249
|
+
if (typeof localStorage !== 'undefined') {
|
|
250
|
+
try {
|
|
251
|
+
localStorage.setItem(storageKey(), JSON.stringify(next))
|
|
252
|
+
} catch {
|
|
253
|
+
// A full or unavailable store must not break the switch: the preference
|
|
254
|
+
// simply does not survive the reload.
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return <ThemeContext.Provider value={value}>{local.children}</ThemeContext.Provider>
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* A string as a JavaScript literal that is also safe inside an inline `<script>`.
|
|
265
|
+
*
|
|
266
|
+
* `JSON.stringify` produces a correct JavaScript literal, and it is **not** safe
|
|
267
|
+
* here: it leaves `<` and `>` alone, so a value containing `</script>` ends the tag
|
|
268
|
+
* early and everything after it is parsed as HTML. That is the classic inline-script
|
|
269
|
+
* injection, and it is a real one even though the value is a developer-supplied prop
|
|
270
|
+
* rather than user input — a prop can come from configuration, and a key that happens
|
|
271
|
+
* to contain a closing tag should not be able to execute.
|
|
272
|
+
*
|
|
273
|
+
* The escape is also correct JavaScript: `\u003c` is `<` to the parser, so the value
|
|
274
|
+
* is byte-identical at runtime and inert to the HTML tokenizer. `\u2028` and `\u2029`
|
|
275
|
+
* are escaped for the neighbouring reason — they are legal inside a JSON string and
|
|
276
|
+
* were, before ES2019, line terminators to a JavaScript parser.
|
|
277
|
+
*
|
|
278
|
+
* CodeQL flags the unescaped form as `js/bad-code-sanitization`, which is how this
|
|
279
|
+
* was found; `tests/theme-script.test.ts` pins it so it cannot come back.
|
|
280
|
+
*/
|
|
281
|
+
export function inlineScriptLiteral(value: string): string {
|
|
282
|
+
return JSON.stringify(value).replace(
|
|
283
|
+
/[<>\u2028\u2029]/g,
|
|
284
|
+
(character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`
|
|
285
|
+
)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* The no-flash script.
|
|
290
|
+
*
|
|
291
|
+
* Rendered inline in `<head>` before any stylesheet that matters. Without it a dark
|
|
292
|
+
* preference paints the light theme first and then swaps, which is the flash every
|
|
293
|
+
* themed application has to solve and the one thing a provider cannot do from
|
|
294
|
+
* inside the body.
|
|
295
|
+
*
|
|
296
|
+
* Deliberately tiny and dependency-free: it reads the stored preference, resolves
|
|
297
|
+
* `system`, and sets the class. It does not apply the variant's roles — the default
|
|
298
|
+
* theme in `theme.css` covers the first paint, and the provider writes the rest on
|
|
299
|
+
* mount.
|
|
300
|
+
*
|
|
301
|
+
* The script reads two values out of `localStorage` and writes them to `dataset`,
|
|
302
|
+
* which is a *property* assignment rather than code: a stored accent or font id can
|
|
303
|
+
* set an attribute and cannot execute. The one value that reaches the source as text
|
|
304
|
+
* is `storageKey`, and it goes through {@link inlineScriptLiteral} for the reason
|
|
305
|
+
* documented there.
|
|
306
|
+
*/
|
|
307
|
+
export function themeScript(storageKey = 'adea-appearance'): string {
|
|
308
|
+
return `(function(){try{var s=localStorage.getItem(${inlineScriptLiteral(storageKey)});var p=s?JSON.parse(s):{};var a=p.appearance||'system';var d=a==='dark'||(a==='system'&&window.matchMedia('(prefers-color-scheme: dark)').matches);var r=document.documentElement;if(d)r.classList.add('dark');r.style.colorScheme=d?'dark':'light';if(p.accent&&p.accent!=='theme')r.dataset.accent=p.accent;if(p.font&&p.font!=='space-grotesk')r.dataset.font=p.font;if(p.density==='compact')r.dataset.density='compact';}catch(e){}})();`
|
|
309
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Monitor, Moon, Sun } from 'lucide-solid'
|
|
2
|
+
import type { ComponentProps } from 'solid-js'
|
|
3
|
+
import { For, splitProps } from 'solid-js'
|
|
4
|
+
import { cn } from '#lib/utils'
|
|
5
|
+
import { ToggleGroup, ToggleGroupItem } from '../ui/toggle-group/toggle-group'
|
|
6
|
+
import { useTheme } from './theme-provider'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ThemeToggle.
|
|
10
|
+
*
|
|
11
|
+
* Three states, not two: light, dark, and follow the system. A two-state switch is
|
|
12
|
+
* the common mistake — it forces a choice on someone who wanted the application to
|
|
13
|
+
* track their OS, and it has no way to say "I have not decided", so the first click
|
|
14
|
+
* silently overrides a system preference the user set deliberately.
|
|
15
|
+
*
|
|
16
|
+
* The icons carry the state and the accessible name comes from the label, so the
|
|
17
|
+
* control is usable without seeing which glyph is lit.
|
|
18
|
+
*/
|
|
19
|
+
export type ThemeToggleProps = Omit<ComponentProps<typeof ToggleGroup>, 'children'> & {
|
|
20
|
+
/** Draw labels beside the icons. Off by default: a toolbar wants icons. */
|
|
21
|
+
withLabels?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const APPEARANCES = [
|
|
25
|
+
{ value: 'light', label: 'Light', icon: Sun },
|
|
26
|
+
{ value: 'dark', label: 'Dark', icon: Moon },
|
|
27
|
+
{ value: 'system', label: 'System', icon: Monitor },
|
|
28
|
+
] as const
|
|
29
|
+
|
|
30
|
+
export function ThemeToggle(props: ThemeToggleProps) {
|
|
31
|
+
const [local, rest] = splitProps(props, ['class', 'withLabels'])
|
|
32
|
+
const { selection, setSelection } = useTheme()
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<ToggleGroup
|
|
36
|
+
attached
|
|
37
|
+
value={selection().appearance}
|
|
38
|
+
onChange={(value: string | null) => {
|
|
39
|
+
// A toggle group reports the pressed value or null; null would leave the
|
|
40
|
+
// appearance unset, so a re-press keeps the current one.
|
|
41
|
+
if (typeof value === 'string') {
|
|
42
|
+
setSelection({ appearance: value as 'light' | 'dark' | 'system' })
|
|
43
|
+
}
|
|
44
|
+
}}
|
|
45
|
+
aria-label="Appearance"
|
|
46
|
+
class={cn(local.class)}
|
|
47
|
+
{...rest}
|
|
48
|
+
>
|
|
49
|
+
<For each={APPEARANCES}>
|
|
50
|
+
{(appearance) => (
|
|
51
|
+
<ToggleGroupItem
|
|
52
|
+
value={appearance.value}
|
|
53
|
+
variant="outline"
|
|
54
|
+
size={local.withLabels ? 'sm' : 'icon-sm'}
|
|
55
|
+
aria-label={appearance.label}
|
|
56
|
+
>
|
|
57
|
+
<appearance.icon />
|
|
58
|
+
{local.withLabels ? <span>{appearance.label}</span> : null}
|
|
59
|
+
</ToggleGroupItem>
|
|
60
|
+
)}
|
|
61
|
+
</For>
|
|
62
|
+
</ToggleGroup>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Accordion as KobalteAccordion } from '@kobalte/core/accordion'
|
|
2
|
+
import { ChevronDown } from 'lucide-solid'
|
|
3
|
+
import type { ComponentProps } from 'solid-js'
|
|
4
|
+
import { splitProps } from 'solid-js'
|
|
5
|
+
import { cn } from '#lib/utils'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Accordion.
|
|
9
|
+
*
|
|
10
|
+
* A list of collapsible sections. `collapsible` (the default) lets the user
|
|
11
|
+
* close the open section; without it one section is always open, which is what
|
|
12
|
+
* a settings page usually wants and a FAQ usually does not.
|
|
13
|
+
*
|
|
14
|
+
* The trigger is a real button with `aria-expanded` and the panel is
|
|
15
|
+
* `aria-labelledby` the trigger, so the relationship survives even when the
|
|
16
|
+
* panel is empty.
|
|
17
|
+
*/
|
|
18
|
+
export function Accordion(props: ComponentProps<typeof KobalteAccordion>) {
|
|
19
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
20
|
+
return <KobalteAccordion class={cn('flex w-full flex-col', local.class)} {...rest} />
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function AccordionItem(props: ComponentProps<typeof KobalteAccordion.Item>) {
|
|
24
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
25
|
+
return (
|
|
26
|
+
<KobalteAccordion.Item
|
|
27
|
+
class={cn('border-b border-border last:border-b-0', local.class)}
|
|
28
|
+
{...rest}
|
|
29
|
+
/>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function AccordionTrigger(props: ComponentProps<typeof KobalteAccordion.Trigger>) {
|
|
34
|
+
const [local, rest] = splitProps(props, ['class', 'children'])
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<KobalteAccordion.Header class="flex">
|
|
38
|
+
<KobalteAccordion.Trigger
|
|
39
|
+
class={cn(
|
|
40
|
+
'flex flex-1 items-center justify-between gap-2 py-3 text-left text-sm font-medium',
|
|
41
|
+
'transition-colors ease-out outline-none',
|
|
42
|
+
'hover:text-foreground',
|
|
43
|
+
'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',
|
|
44
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
45
|
+
local.class
|
|
46
|
+
)}
|
|
47
|
+
{...rest}
|
|
48
|
+
>
|
|
49
|
+
{local.children}
|
|
50
|
+
<ChevronDown
|
|
51
|
+
class="text-muted-foreground size-4 shrink-0 transition-transform ease-out group-data-[expanded]/accordion:rotate-180"
|
|
52
|
+
aria-hidden="true"
|
|
53
|
+
/>
|
|
54
|
+
</KobalteAccordion.Trigger>
|
|
55
|
+
</KobalteAccordion.Header>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function AccordionContent(props: ComponentProps<typeof KobalteAccordion.Content>) {
|
|
60
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
61
|
+
return (
|
|
62
|
+
<KobalteAccordion.Content class={cn('overflow-hidden text-sm', local.class)} {...rest}>
|
|
63
|
+
<div class="pt-0 pb-3">{props.children}</div>
|
|
64
|
+
</KobalteAccordion.Content>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion'
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { AlertCircle, CheckCircle2, Info, TriangleAlert } from 'lucide-solid'
|
|
2
|
+
import type { ComponentProps, JSX } from 'solid-js'
|
|
3
|
+
import { splitProps } from 'solid-js'
|
|
4
|
+
import { Dynamic } from 'solid-js/web'
|
|
5
|
+
import { cva, type VariantProps } from '#lib/variants'
|
|
6
|
+
import { cn } from '#lib/utils'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Alert.
|
|
10
|
+
*
|
|
11
|
+
* A message about the whole surface it sits in — a form's validation summary,
|
|
12
|
+
* a failed sync banner, a permission notice. It is deliberately not a dialog:
|
|
13
|
+
* an alert that must be dismissed before the user can continue is a Dialog.
|
|
14
|
+
*
|
|
15
|
+
* The glyph follows the tone rather than being passed in, so an alert cannot
|
|
16
|
+
* be given a green checkmark on a destructive fill. A caller that genuinely
|
|
17
|
+
* needs a different icon passes `icon`; `icon={null}` removes it.
|
|
18
|
+
*/
|
|
19
|
+
const alertVariants = cva(
|
|
20
|
+
'relative grid w-full grid-cols-[auto_1fr] items-start gap-x-3 gap-y-1 rounded-lg border px-3 py-2.5 text-sm',
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
default: 'bg-card text-card-foreground border-border',
|
|
25
|
+
destructive: 'bg-destructive-subtle text-destructive border-destructive/30',
|
|
26
|
+
success: 'bg-success-subtle text-success border-success/30',
|
|
27
|
+
warning: 'bg-warning-subtle text-warning border-warning/30',
|
|
28
|
+
info: 'bg-info-subtle text-info border-info/30',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: { variant: 'default' },
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
const alertIcons = {
|
|
36
|
+
default: Info,
|
|
37
|
+
destructive: AlertCircle,
|
|
38
|
+
success: CheckCircle2,
|
|
39
|
+
warning: TriangleAlert,
|
|
40
|
+
info: Info,
|
|
41
|
+
} as const
|
|
42
|
+
|
|
43
|
+
type AlertVariantProps = VariantProps<typeof alertVariants>
|
|
44
|
+
|
|
45
|
+
export type AlertProps = ComponentProps<'div'> &
|
|
46
|
+
AlertVariantProps & {
|
|
47
|
+
/** Replace the tone's glyph with your own element. `null` removes it. */
|
|
48
|
+
icon?: JSX.Element | null
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function Alert(props: AlertProps) {
|
|
52
|
+
const [local, rest] = splitProps(props, ['class', 'variant', 'icon', 'children'])
|
|
53
|
+
|
|
54
|
+
const tone = () => local.variant ?? 'default'
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div
|
|
58
|
+
data-slot="alert"
|
|
59
|
+
role="alert"
|
|
60
|
+
class={cn(alertVariants({ variant: local.variant }), local.class)}
|
|
61
|
+
{...rest}
|
|
62
|
+
>
|
|
63
|
+
{local.icon === null ? null : (
|
|
64
|
+
<span data-slot="alert-icon" class="row-span-2 pt-0.5 [&_svg]:size-4">
|
|
65
|
+
{local.icon ?? <Dynamic component={alertIcons[tone()]} />}
|
|
66
|
+
</span>
|
|
67
|
+
)}
|
|
68
|
+
{local.children}
|
|
69
|
+
</div>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function AlertTitle(props: ComponentProps<'div'>) {
|
|
74
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
75
|
+
return (
|
|
76
|
+
<div
|
|
77
|
+
data-slot="alert-title"
|
|
78
|
+
class={cn('col-start-2 font-medium tracking-tight', local.class)}
|
|
79
|
+
{...rest}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function AlertDescription(props: ComponentProps<'div'>) {
|
|
85
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
86
|
+
return (
|
|
87
|
+
<div
|
|
88
|
+
data-slot="alert-description"
|
|
89
|
+
class={cn('col-start-2 text-sm opacity-90 [&_p]:leading-relaxed', local.class)}
|
|
90
|
+
{...rest}
|
|
91
|
+
/>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export { alertVariants }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert, AlertDescription, AlertTitle, alertVariants, type AlertProps } from './alert'
|