@poodle64/ui 2026.8.7
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 +624 -0
- package/dist/components/ui/alert/alert-description.svelte +23 -0
- package/dist/components/ui/alert/alert-description.svelte.d.ts +9 -0
- package/dist/components/ui/alert/alert-title.svelte +23 -0
- package/dist/components/ui/alert/alert-title.svelte.d.ts +9 -0
- package/dist/components/ui/alert/alert.svelte +46 -0
- package/dist/components/ui/alert/alert.svelte.d.ts +28 -0
- package/dist/components/ui/alert/index.d.ts +4 -0
- package/dist/components/ui/alert/index.js +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte +27 -0
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte.d.ts +9 -0
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte +27 -0
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +9 -0
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +39 -0
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +11 -0
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte +20 -0
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte +23 -0
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte +23 -0
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/alert-dialog/alert-dialog-media.svelte +23 -0
- package/dist/components/ui/alert-dialog/alert-dialog-media.svelte.d.ts +5 -0
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte +20 -0
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-portal.svelte +7 -0
- package/dist/components/ui/alert-dialog/alert-dialog-portal.svelte.d.ts +3 -0
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte +20 -0
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-trigger.svelte +7 -0
- package/dist/components/ui/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog.svelte +7 -0
- package/dist/components/ui/alert-dialog/alert-dialog.svelte.d.ts +3 -0
- package/dist/components/ui/alert-dialog/index.d.ts +13 -0
- package/dist/components/ui/alert-dialog/index.js +15 -0
- package/dist/components/ui/app-dialog/app-dialog.svelte +111 -0
- package/dist/components/ui/app-dialog/app-dialog.svelte.d.ts +41 -0
- package/dist/components/ui/app-dialog/index.d.ts +2 -0
- package/dist/components/ui/app-dialog/index.js +2 -0
- package/dist/components/ui/app-shell/app-nav.svelte +299 -0
- package/dist/components/ui/app-shell/app-nav.svelte.d.ts +22 -0
- package/dist/components/ui/app-shell/app-shell.svelte +675 -0
- package/dist/components/ui/app-shell/app-shell.svelte.d.ts +157 -0
- package/dist/components/ui/app-shell/index.d.ts +6 -0
- package/dist/components/ui/app-shell/index.js +6 -0
- package/dist/components/ui/app-shell/measure.d.ts +28 -0
- package/dist/components/ui/app-shell/measure.js +21 -0
- package/dist/components/ui/app-shell/texture.d.ts +32 -0
- package/dist/components/ui/app-shell/texture.js +27 -0
- package/dist/components/ui/app-shell/types.d.ts +134 -0
- package/dist/components/ui/app-shell/types.js +88 -0
- package/dist/components/ui/arc-gauge/arc-gauge.svelte +112 -0
- package/dist/components/ui/arc-gauge/arc-gauge.svelte.d.ts +15 -0
- package/dist/components/ui/arc-gauge/index.d.ts +3 -0
- package/dist/components/ui/arc-gauge/index.js +2 -0
- package/dist/components/ui/avatar/avatar-fallback.svelte +26 -0
- package/dist/components/ui/avatar/avatar-fallback.svelte.d.ts +4 -0
- package/dist/components/ui/avatar/avatar-image.svelte +17 -0
- package/dist/components/ui/avatar/avatar-image.svelte.d.ts +4 -0
- package/dist/components/ui/avatar/avatar.svelte +31 -0
- package/dist/components/ui/avatar/avatar.svelte.d.ts +4 -0
- package/dist/components/ui/avatar/index.d.ts +4 -0
- package/dist/components/ui/avatar/index.js +6 -0
- package/dist/components/ui/badge/badge.svelte +50 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +38 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.js +2 -0
- package/dist/components/ui/bar-row/bar-row.svelte +42 -0
- package/dist/components/ui/bar-row/bar-row.svelte.d.ts +12 -0
- package/dist/components/ui/bar-row/index.d.ts +2 -0
- package/dist/components/ui/bar-row/index.js +2 -0
- package/dist/components/ui/button/button.svelte +89 -0
- package/dist/components/ui/button/button.svelte.d.ts +70 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +4 -0
- package/dist/components/ui/card/card-action.svelte +23 -0
- package/dist/components/ui/card/card-action.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-content.svelte +20 -0
- package/dist/components/ui/card/card-content.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-description.svelte +20 -0
- package/dist/components/ui/card/card-description.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-footer.svelte +23 -0
- package/dist/components/ui/card/card-footer.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-header.svelte +23 -0
- package/dist/components/ui/card/card-header.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-title.svelte +52 -0
- package/dist/components/ui/card/card-title.svelte.d.ts +8 -0
- package/dist/components/ui/card/card.svelte +25 -0
- package/dist/components/ui/card/card.svelte.d.ts +8 -0
- package/dist/components/ui/card/index.d.ts +8 -0
- package/dist/components/ui/card/index.js +10 -0
- package/dist/components/ui/checkbox/checkbox.svelte +36 -0
- package/dist/components/ui/checkbox/checkbox.svelte.d.ts +8 -0
- package/dist/components/ui/checkbox/index.d.ts +2 -0
- package/dist/components/ui/checkbox/index.js +2 -0
- package/dist/components/ui/command/command-dialog.svelte +42 -0
- package/dist/components/ui/command/command-dialog.svelte.d.ts +14 -0
- package/dist/components/ui/command/command-empty.svelte +17 -0
- package/dist/components/ui/command/command-empty.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-group.svelte +33 -0
- package/dist/components/ui/command/command-group.svelte.d.ts +7 -0
- package/dist/components/ui/command/command-input.svelte +36 -0
- package/dist/components/ui/command/command-input.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-item.svelte +27 -0
- package/dist/components/ui/command/command-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-link-item.svelte +20 -0
- package/dist/components/ui/command/command-link-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-list.svelte +20 -0
- package/dist/components/ui/command/command-list.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-loading.svelte +7 -0
- package/dist/components/ui/command/command-loading.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-separator.svelte +17 -0
- package/dist/components/ui/command/command-separator.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-shortcut.svelte +23 -0
- package/dist/components/ui/command/command-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/command/command.svelte +28 -0
- package/dist/components/ui/command/command.svelte.d.ts +8 -0
- package/dist/components/ui/command/index.d.ts +12 -0
- package/dist/components/ui/command/index.js +14 -0
- package/dist/components/ui/command-palette/command-palette.svelte +94 -0
- package/dist/components/ui/command-palette/command-palette.svelte.d.ts +40 -0
- package/dist/components/ui/command-palette/index.d.ts +3 -0
- package/dist/components/ui/command-palette/index.js +2 -0
- package/dist/components/ui/context-column/context-column.svelte +56 -0
- package/dist/components/ui/context-column/context-column.svelte.d.ts +14 -0
- package/dist/components/ui/context-column/index.d.ts +2 -0
- package/dist/components/ui/context-column/index.js +2 -0
- package/dist/components/ui/data-table/data-table.svelte.d.ts +40 -0
- package/dist/components/ui/data-table/data-table.svelte.js +110 -0
- package/dist/components/ui/data-table/flex-render.svelte +40 -0
- package/dist/components/ui/data-table/flex-render.svelte.d.ts +33 -0
- package/dist/components/ui/data-table/index.d.ts +3 -0
- package/dist/components/ui/data-table/index.js +3 -0
- package/dist/components/ui/data-table/render-helpers.d.ts +90 -0
- package/dist/components/ui/data-table/render-helpers.js +99 -0
- package/dist/components/ui/data-table-tanstack/data-table-tanstack.svelte +247 -0
- package/dist/components/ui/data-table-tanstack/data-table-tanstack.svelte.d.ts +79 -0
- package/dist/components/ui/data-table-tanstack/index.d.ts +3 -0
- package/dist/components/ui/data-table-tanstack/index.js +2 -0
- package/dist/components/ui/data-table-toolbar/data-table-toolbar.svelte +102 -0
- package/dist/components/ui/data-table-toolbar/data-table-toolbar.svelte.d.ts +32 -0
- package/dist/components/ui/data-table-toolbar/index.d.ts +3 -0
- package/dist/components/ui/data-table-toolbar/index.js +2 -0
- package/dist/components/ui/detail-panel/detail-panel.svelte +95 -0
- package/dist/components/ui/detail-panel/detail-panel.svelte.d.ts +26 -0
- package/dist/components/ui/detail-panel/index.d.ts +2 -0
- package/dist/components/ui/detail-panel/index.js +2 -0
- package/dist/components/ui/dialog/dialog-close.svelte +11 -0
- package/dist/components/ui/dialog/dialog-close.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-content.svelte +48 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +13 -0
- package/dist/components/ui/dialog/dialog-description.svelte +20 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +35 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +8 -0
- package/dist/components/ui/dialog/dialog-header.svelte +20 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +20 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-portal.svelte +7 -0
- package/dist/components/ui/dialog/dialog-portal.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/dialog-title.svelte +17 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte +11 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog.svelte +7 -0
- package/dist/components/ui/dialog/dialog.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/index.d.ts +11 -0
- package/dist/components/ui/dialog/index.js +13 -0
- package/dist/components/ui/dialog-section/dialog-section.svelte +20 -0
- package/dist/components/ui/dialog-section/dialog-section.svelte.d.ts +8 -0
- package/dist/components/ui/dialog-section/index.d.ts +2 -0
- package/dist/components/ui/dialog-section/index.js +2 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +16 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +44 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +9 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +31 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +10 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +22 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +27 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +27 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-portal.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-portal.svelte.d.ts +3 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +16 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +34 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +17 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +23 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +20 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +29 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub.svelte.d.ts +3 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.svelte.d.ts +3 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/index.js +18 -0
- package/dist/components/ui/empty-state/empty-state.svelte +44 -0
- package/dist/components/ui/empty-state/empty-state.svelte.d.ts +14 -0
- package/dist/components/ui/empty-state/index.d.ts +2 -0
- package/dist/components/ui/empty-state/index.js +2 -0
- package/dist/components/ui/error-state/error-state.svelte +52 -0
- package/dist/components/ui/error-state/error-state.svelte.d.ts +10 -0
- package/dist/components/ui/error-state/index.d.ts +2 -0
- package/dist/components/ui/error-state/index.js +2 -0
- package/dist/components/ui/info-tip/index.d.ts +2 -0
- package/dist/components/ui/info-tip/index.js +2 -0
- package/dist/components/ui/info-tip/info-tip.svelte +37 -0
- package/dist/components/ui/info-tip/info-tip.svelte.d.ts +10 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.js +4 -0
- package/dist/components/ui/input/input.svelte +48 -0
- package/dist/components/ui/input/input.svelte.d.ts +13 -0
- package/dist/components/ui/input-group/index.d.ts +7 -0
- package/dist/components/ui/input-group/index.js +9 -0
- package/dist/components/ui/input-group/input-group-addon.svelte +53 -0
- package/dist/components/ui/input-group/input-group-addon.svelte.d.ts +32 -0
- package/dist/components/ui/input-group/input-group-button.svelte +49 -0
- package/dist/components/ui/input-group/input-group-button.svelte.d.ts +32 -0
- package/dist/components/ui/input-group/input-group-input.svelte +23 -0
- package/dist/components/ui/input-group/input-group-input.svelte.d.ts +11 -0
- package/dist/components/ui/input-group/input-group-text.svelte +22 -0
- package/dist/components/ui/input-group/input-group-text.svelte.d.ts +5 -0
- package/dist/components/ui/input-group/input-group-textarea.svelte +23 -0
- package/dist/components/ui/input-group/input-group-textarea.svelte.d.ts +3 -0
- package/dist/components/ui/input-group/input-group.svelte +24 -0
- package/dist/components/ui/input-group/input-group.svelte.d.ts +5 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.js +4 -0
- package/dist/components/ui/label/label.svelte +20 -0
- package/dist/components/ui/label/label.svelte.d.ts +4 -0
- package/dist/components/ui/loading-state/index.d.ts +2 -0
- package/dist/components/ui/loading-state/index.js +2 -0
- package/dist/components/ui/loading-state/loading-state.svelte +28 -0
- package/dist/components/ui/loading-state/loading-state.svelte.d.ts +8 -0
- package/dist/components/ui/page-header/index.d.ts +2 -0
- package/dist/components/ui/page-header/index.js +2 -0
- package/dist/components/ui/page-header/page-header.svelte +100 -0
- package/dist/components/ui/page-header/page-header.svelte.d.ts +17 -0
- package/dist/components/ui/panel/index.d.ts +2 -0
- package/dist/components/ui/panel/index.js +2 -0
- package/dist/components/ui/panel/panel.svelte +54 -0
- package/dist/components/ui/panel/panel.svelte.d.ts +16 -0
- package/dist/components/ui/password-input/index.d.ts +2 -0
- package/dist/components/ui/password-input/index.js +4 -0
- package/dist/components/ui/password-input/password-input.svelte +48 -0
- package/dist/components/ui/password-input/password-input.svelte.d.ts +8 -0
- package/dist/components/ui/popover/index.d.ts +4 -0
- package/dist/components/ui/popover/index.js +6 -0
- package/dist/components/ui/popover/popover-content.svelte +45 -0
- package/dist/components/ui/popover/popover-content.svelte.d.ts +7 -0
- package/dist/components/ui/popover/popover-trigger.svelte +7 -0
- package/dist/components/ui/popover/popover-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover.svelte +7 -0
- package/dist/components/ui/popover/popover.svelte.d.ts +3 -0
- package/dist/components/ui/progress/index.d.ts +2 -0
- package/dist/components/ui/progress/index.js +4 -0
- package/dist/components/ui/progress/progress.svelte +30 -0
- package/dist/components/ui/progress/progress.svelte.d.ts +4 -0
- package/dist/components/ui/scorecard/index.d.ts +2 -0
- package/dist/components/ui/scorecard/index.js +2 -0
- package/dist/components/ui/scorecard/scorecard.svelte +35 -0
- package/dist/components/ui/scorecard/scorecard.svelte.d.ts +8 -0
- package/dist/components/ui/select/index.d.ts +12 -0
- package/dist/components/ui/select/index.js +14 -0
- package/dist/components/ui/select/select-content.svelte +45 -0
- package/dist/components/ui/select/select-content.svelte.d.ts +11 -0
- package/dist/components/ui/select/select-group-heading.svelte +21 -0
- package/dist/components/ui/select/select-group-heading.svelte.d.ts +10 -0
- package/dist/components/ui/select/select-group.svelte +17 -0
- package/dist/components/ui/select/select-group.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-item.svelte +38 -0
- package/dist/components/ui/select/select-item.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-label.svelte +20 -0
- package/dist/components/ui/select/select-label.svelte.d.ts +6 -0
- package/dist/components/ui/select/select-portal.svelte +7 -0
- package/dist/components/ui/select/select-portal.svelte.d.ts +3 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte +23 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte +23 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-separator.svelte +18 -0
- package/dist/components/ui/select/select-separator.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-trigger.svelte +29 -0
- package/dist/components/ui/select/select-trigger.svelte.d.ts +8 -0
- package/dist/components/ui/select/select.svelte +11 -0
- package/dist/components/ui/select/select.svelte.d.ts +3 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.js +4 -0
- package/dist/components/ui/separator/separator.svelte +23 -0
- package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.js +4 -0
- package/dist/components/ui/skeleton/skeleton.svelte +17 -0
- package/dist/components/ui/skeleton/skeleton.svelte.d.ts +5 -0
- package/dist/components/ui/sonner/index.d.ts +1 -0
- package/dist/components/ui/sonner/index.js +1 -0
- package/dist/components/ui/sonner/sonner.svelte +34 -0
- package/dist/components/ui/sonner/sonner.svelte.d.ts +4 -0
- package/dist/components/ui/sparkline/index.d.ts +3 -0
- package/dist/components/ui/sparkline/index.js +2 -0
- package/dist/components/ui/sparkline/sparkline.svelte +90 -0
- package/dist/components/ui/sparkline/sparkline.svelte.d.ts +16 -0
- package/dist/components/ui/stat-card/index.d.ts +2 -0
- package/dist/components/ui/stat-card/index.js +2 -0
- package/dist/components/ui/stat-card/stat-card.svelte +77 -0
- package/dist/components/ui/stat-card/stat-card.svelte.d.ts +34 -0
- package/dist/components/ui/stat-list/index.d.ts +3 -0
- package/dist/components/ui/stat-list/index.js +2 -0
- package/dist/components/ui/stat-list/stat-list.svelte +80 -0
- package/dist/components/ui/stat-list/stat-list.svelte.d.ts +23 -0
- package/dist/components/ui/status/index.d.ts +1 -0
- package/dist/components/ui/status/index.js +1 -0
- package/dist/components/ui/status-badge/index.d.ts +3 -0
- package/dist/components/ui/status-badge/index.js +2 -0
- package/dist/components/ui/status-badge/status-badge.svelte +53 -0
- package/dist/components/ui/status-badge/status-badge.svelte.d.ts +39 -0
- package/dist/components/ui/switch/index.d.ts +2 -0
- package/dist/components/ui/switch/index.js +4 -0
- package/dist/components/ui/switch/switch.svelte +39 -0
- package/dist/components/ui/switch/switch.svelte.d.ts +4 -0
- package/dist/components/ui/table/index.d.ts +10 -0
- package/dist/components/ui/table/index.js +12 -0
- package/dist/components/ui/table/table-body.svelte +20 -0
- package/dist/components/ui/table/table-body.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-caption.svelte +20 -0
- package/dist/components/ui/table/table-caption.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-cell.svelte +20 -0
- package/dist/components/ui/table/table-cell.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-classes.d.ts +15 -0
- package/dist/components/ui/table/table-classes.js +15 -0
- package/dist/components/ui/table/table-footer.svelte +20 -0
- package/dist/components/ui/table/table-footer.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-head.svelte +23 -0
- package/dist/components/ui/table/table-head.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-header.svelte +20 -0
- package/dist/components/ui/table/table-header.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-row.svelte +23 -0
- package/dist/components/ui/table/table-row.svelte.d.ts +5 -0
- package/dist/components/ui/table/table.svelte +37 -0
- package/dist/components/ui/table/table.svelte.d.ts +20 -0
- package/dist/components/ui/tabs/index.d.ts +5 -0
- package/dist/components/ui/tabs/index.js +7 -0
- package/dist/components/ui/tabs/tabs-content.svelte +13 -0
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-list.svelte +16 -0
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte +16 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs.svelte +19 -0
- package/dist/components/ui/tabs/tabs.svelte.d.ts +4 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/dist/components/ui/textarea/textarea.svelte +22 -0
- package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
- package/dist/components/ui/tile-grid/index.d.ts +2 -0
- package/dist/components/ui/tile-grid/index.js +2 -0
- package/dist/components/ui/tile-grid/tile-grid.svelte +66 -0
- package/dist/components/ui/tile-grid/tile-grid.svelte.d.ts +43 -0
- package/dist/components/ui/tooltip/index.d.ts +6 -0
- package/dist/components/ui/tooltip/index.js +8 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +52 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +11 -0
- package/dist/components/ui/tooltip/tooltip-portal.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip-portal.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/tooltip-provider.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip-provider.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/tooltip-trigger.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/tooltip.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip.svelte.d.ts +4 -0
- package/dist/styles.css +961 -0
- package/dist/utils.d.ts +12 -0
- package/dist/utils.js +5 -0
- package/package.json +81 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
export interface Series {
|
|
3
|
+
vals: number[];
|
|
4
|
+
color: string;
|
|
5
|
+
}
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
10
|
+
import { cn } from '../../../utils.js';
|
|
11
|
+
|
|
12
|
+
// An inline area + line trend: a compact multi-series sparkline for a
|
|
13
|
+
// row or card that has room for a trend but not a full Tier-1 chart
|
|
14
|
+
// (see the household charting rule). Each series carries its own colour,
|
|
15
|
+
// so the component owns no palette of its own.
|
|
16
|
+
let {
|
|
17
|
+
series,
|
|
18
|
+
width,
|
|
19
|
+
height,
|
|
20
|
+
pad = 8,
|
|
21
|
+
ref = $bindable(null),
|
|
22
|
+
class: className,
|
|
23
|
+
...restProps
|
|
24
|
+
}: Omit<SVGAttributes<SVGSVGElement>, 'class' | 'width' | 'height'> & {
|
|
25
|
+
series: Series[];
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
pad?: number;
|
|
29
|
+
ref?: SVGSVGElement | null;
|
|
30
|
+
class?: string;
|
|
31
|
+
} = $props();
|
|
32
|
+
|
|
33
|
+
function buildPaths(vals: number[], w: number, h: number, p: number) {
|
|
34
|
+
// A series with 0 or 1 points has no interval to spread across the
|
|
35
|
+
// width, and an all-zero series has no range to spread across the
|
|
36
|
+
// height — both zero denominators a real caller can legitimately hand
|
|
37
|
+
// in (a freshly-created lane, a metric that hasn't moved yet), so they
|
|
38
|
+
// degrade to a flat/empty render rather than emitting NaN coordinates
|
|
39
|
+
// into the path data.
|
|
40
|
+
const n = vals.length;
|
|
41
|
+
if (n === 0) {
|
|
42
|
+
return { line: '', area: '', lastX: p, lastY: h - p };
|
|
43
|
+
}
|
|
44
|
+
const max = Math.max(...vals) * 1.12 || 1;
|
|
45
|
+
const min = 0;
|
|
46
|
+
const xFn = (i: number) => (n === 1 ? p : p + (i / (n - 1)) * (w - 2 * p));
|
|
47
|
+
const yFn = (v: number) => h - p - ((v - min) / (max - min)) * (h - 2 * p);
|
|
48
|
+
|
|
49
|
+
let line = '';
|
|
50
|
+
vals.forEach((v, i) => {
|
|
51
|
+
const coord = `${xFn(i).toFixed(1)},${yFn(v).toFixed(1)}`;
|
|
52
|
+
line += (i ? 'L' : 'M') + coord + ' ';
|
|
53
|
+
});
|
|
54
|
+
const area =
|
|
55
|
+
line +
|
|
56
|
+
`L ${xFn(n - 1).toFixed(1)},${(h - p).toFixed(1)} L ${xFn(0).toFixed(1)},${(h - p).toFixed(1)} Z`;
|
|
57
|
+
const lastX = xFn(n - 1);
|
|
58
|
+
const lastY = yFn(vals[n - 1]);
|
|
59
|
+
return { line, area, lastX, lastY };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const gridLines = $derived.by(() => {
|
|
63
|
+
const lines: string[] = [];
|
|
64
|
+
for (let g = 1; g <= 3; g++) {
|
|
65
|
+
const yy = height - pad - (g / 4) * (height - 2 * pad);
|
|
66
|
+
lines.push(`M${pad},${yy.toFixed(1)} L${(width - pad).toFixed(1)},${yy.toFixed(1)}`);
|
|
67
|
+
}
|
|
68
|
+
return lines;
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const paths = $derived(series.map((s) => ({ ...buildPaths(s.vals, width, height, pad), color: s.color })));
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<svg
|
|
75
|
+
bind:this={ref}
|
|
76
|
+
viewBox="0 0 {width} {height}"
|
|
77
|
+
preserveAspectRatio="none"
|
|
78
|
+
style="display:block;width:100%;height:{height}px"
|
|
79
|
+
class={cn(className)}
|
|
80
|
+
{...restProps}
|
|
81
|
+
>
|
|
82
|
+
{#each gridLines as d}
|
|
83
|
+
<path {d} stroke="var(--ds-color-border)" stroke-width="0.5" opacity="0.5" fill="none" />
|
|
84
|
+
{/each}
|
|
85
|
+
{#each paths as p}
|
|
86
|
+
<path d={p.area} fill={p.color} opacity="0.13" />
|
|
87
|
+
<path d={p.line} fill="none" stroke={p.color} stroke-width="1.8" stroke-linejoin="round" />
|
|
88
|
+
<circle cx={p.lastX.toFixed(1)} cy={p.lastY.toFixed(1)} r="2.4" fill={p.color} />
|
|
89
|
+
{/each}
|
|
90
|
+
</svg>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Series {
|
|
2
|
+
vals: number[];
|
|
3
|
+
color: string;
|
|
4
|
+
}
|
|
5
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
6
|
+
type $$ComponentProps = Omit<SVGAttributes<SVGSVGElement>, 'class' | 'width' | 'height'> & {
|
|
7
|
+
series: Series[];
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
pad?: number;
|
|
11
|
+
ref?: SVGSVGElement | null;
|
|
12
|
+
class?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const Sparkline: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
15
|
+
type Sparkline = ReturnType<typeof Sparkline>;
|
|
16
|
+
export default Sparkline;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Status } from '../status/index.js';
|
|
3
|
+
import type { Component } from 'svelte';
|
|
4
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
5
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
6
|
+
|
|
7
|
+
// A single metric, reserved for a figure that earns the space with real
|
|
8
|
+
// context. A bare integer belongs in a StatList.
|
|
9
|
+
let {
|
|
10
|
+
label,
|
|
11
|
+
value,
|
|
12
|
+
unit,
|
|
13
|
+
sub,
|
|
14
|
+
status,
|
|
15
|
+
valueTone,
|
|
16
|
+
icon: Icon,
|
|
17
|
+
ref = $bindable(null),
|
|
18
|
+
class: className,
|
|
19
|
+
...restProps
|
|
20
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
21
|
+
label: string;
|
|
22
|
+
value: string | number;
|
|
23
|
+
unit?: string;
|
|
24
|
+
sub?: string;
|
|
25
|
+
/** Lights the dot beside the LABEL: the state of the thing being measured. */
|
|
26
|
+
status?: Status;
|
|
27
|
+
/**
|
|
28
|
+
* Colours the FIGURE itself: the sign of the number, not the health of its
|
|
29
|
+
* source. They are different claims and a card often makes both — a feed
|
|
30
|
+
* that is connected (`status="success"`) reporting a loss (`valueTone
|
|
31
|
+
* "error"`).
|
|
32
|
+
*
|
|
33
|
+
* Without it, a negative P&L rendered in the default foreground with a
|
|
34
|
+
* coloured dot beside the label, which is the wrong element carrying the
|
|
35
|
+
* meaning: the eye goes to the figure, and the figure said nothing. Apps
|
|
36
|
+
* were reaching for a local StatCard for exactly this.
|
|
37
|
+
*
|
|
38
|
+
* Colour is a refinement, never the message — the figure still carries its
|
|
39
|
+
* own sign, so a reader who cannot tell the tones apart loses nothing
|
|
40
|
+
* (WCAG 1.4.1).
|
|
41
|
+
*/
|
|
42
|
+
valueTone?: Status;
|
|
43
|
+
icon?: Component<{ class?: string }>;
|
|
44
|
+
} = $props();
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<div
|
|
48
|
+
bind:this={ref}
|
|
49
|
+
class={cn('bg-card border-border ds-edge flex flex-col gap-1.5 rounded-lg border p-4', className)}
|
|
50
|
+
{...restProps}
|
|
51
|
+
>
|
|
52
|
+
<div class="flex items-center gap-2">
|
|
53
|
+
{#if Icon}
|
|
54
|
+
<Icon class="text-muted-foreground size-4" />
|
|
55
|
+
{/if}
|
|
56
|
+
<span class="text-muted-foreground text-2xs tracking-eyebrow font-medium uppercase">
|
|
57
|
+
{label}
|
|
58
|
+
</span>
|
|
59
|
+
{#if status}
|
|
60
|
+
<span class="ds-dot ds-dot-{status} ml-auto"></span>
|
|
61
|
+
{/if}
|
|
62
|
+
</div>
|
|
63
|
+
<div class="flex items-baseline gap-1.5">
|
|
64
|
+
<span
|
|
65
|
+
class="ds-tabular text-display font-mono leading-none font-semibold {valueTone
|
|
66
|
+
? `ds-ink-${valueTone}`
|
|
67
|
+
: ''}"
|
|
68
|
+
data-tone={valueTone}>{value}</span
|
|
69
|
+
>
|
|
70
|
+
{#if unit}
|
|
71
|
+
<span class="text-muted-foreground text-sm">{unit}</span>
|
|
72
|
+
{/if}
|
|
73
|
+
</div>
|
|
74
|
+
{#if sub}
|
|
75
|
+
<p class="text-muted-foreground text-xs">{sub}</p>
|
|
76
|
+
{/if}
|
|
77
|
+
</div>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Status } from '../status/index.js';
|
|
2
|
+
import type { Component } from 'svelte';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
5
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string | number;
|
|
8
|
+
unit?: string;
|
|
9
|
+
sub?: string;
|
|
10
|
+
/** Lights the dot beside the LABEL: the state of the thing being measured. */
|
|
11
|
+
status?: Status;
|
|
12
|
+
/**
|
|
13
|
+
* Colours the FIGURE itself: the sign of the number, not the health of its
|
|
14
|
+
* source. They are different claims and a card often makes both — a feed
|
|
15
|
+
* that is connected (`status="success"`) reporting a loss (`valueTone
|
|
16
|
+
* "error"`).
|
|
17
|
+
*
|
|
18
|
+
* Without it, a negative P&L rendered in the default foreground with a
|
|
19
|
+
* coloured dot beside the label, which is the wrong element carrying the
|
|
20
|
+
* meaning: the eye goes to the figure, and the figure said nothing. Apps
|
|
21
|
+
* were reaching for a local StatCard for exactly this.
|
|
22
|
+
*
|
|
23
|
+
* Colour is a refinement, never the message — the figure still carries its
|
|
24
|
+
* own sign, so a reader who cannot tell the tones apart loses nothing
|
|
25
|
+
* (WCAG 1.4.1).
|
|
26
|
+
*/
|
|
27
|
+
valueTone?: Status;
|
|
28
|
+
icon?: Component<{
|
|
29
|
+
class?: string;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
declare const StatCard: Component<$$ComponentProps, {}, "ref">;
|
|
33
|
+
type StatCard = ReturnType<typeof StatCard>;
|
|
34
|
+
export default StatCard;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { Status } from '../status/index.js';
|
|
3
|
+
|
|
4
|
+
export interface StatItem {
|
|
5
|
+
/** Uppercase eyebrow label. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** The figure. Numbers render mono + tabular. */
|
|
8
|
+
value: string | number;
|
|
9
|
+
/** Optional status; shows a dot beside the value, unless muted. */
|
|
10
|
+
status?: Status;
|
|
11
|
+
/** Render quiet (e.g. a healthy zero): dims the value and suppresses the dot. */
|
|
12
|
+
muted?: boolean;
|
|
13
|
+
/** Optional small trailing unit/sub next to the value (e.g. "/ 1"). */
|
|
14
|
+
sub?: string;
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
20
|
+
import type { WithElementRef } from '../../../utils.js';
|
|
21
|
+
import InfoTip from '../info-tip/info-tip.svelte';
|
|
22
|
+
|
|
23
|
+
// The standing metric card for the right-hand context column: a route's
|
|
24
|
+
// low-context integers stacked as a vertical label→value list inside one card,
|
|
25
|
+
// in place of a full-width metric band. One per route, titled identically, so
|
|
26
|
+
// the context column reads the same everywhere. Zero-aware: pass muted for a
|
|
27
|
+
// healthy zero so it stays quiet and a real non-zero stands out.
|
|
28
|
+
let {
|
|
29
|
+
items,
|
|
30
|
+
title = 'At a glance',
|
|
31
|
+
info,
|
|
32
|
+
class: klass = '',
|
|
33
|
+
ref = $bindable(null),
|
|
34
|
+
...restProps
|
|
35
|
+
}: WithElementRef<HTMLAttributes<HTMLElement>> & {
|
|
36
|
+
items: StatItem[];
|
|
37
|
+
title?: string;
|
|
38
|
+
info?: string;
|
|
39
|
+
} = $props();
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<section
|
|
43
|
+
bind:this={ref}
|
|
44
|
+
class="bg-card border-border ds-edge flex shrink-0 flex-col overflow-hidden rounded-lg border {klass}"
|
|
45
|
+
{...restProps}
|
|
46
|
+
>
|
|
47
|
+
<header class="border-border flex items-center gap-2 border-b px-4 py-3">
|
|
48
|
+
<h2 class="text-body leading-tight font-semibold tracking-tight">{title}</h2>
|
|
49
|
+
{#if info}
|
|
50
|
+
<InfoTip
|
|
51
|
+
text={info}
|
|
52
|
+
class="text-muted-foreground/50 hover:text-muted-foreground size-3.5 transition-colors"
|
|
53
|
+
/>
|
|
54
|
+
{/if}
|
|
55
|
+
</header>
|
|
56
|
+
<dl class="flex flex-col">
|
|
57
|
+
{#each items as item (item.label)}
|
|
58
|
+
<div
|
|
59
|
+
class="border-border/60 flex items-center justify-between gap-3 border-b px-4 py-2.5 last:border-0"
|
|
60
|
+
>
|
|
61
|
+
<dt class="text-muted-foreground text-2xs tracking-eyebrow font-medium uppercase">
|
|
62
|
+
{item.label}
|
|
63
|
+
</dt>
|
|
64
|
+
<dd class="flex items-center gap-1.5">
|
|
65
|
+
{#if item.status && !item.muted}
|
|
66
|
+
<span class="ds-dot ds-dot-{item.status}"></span>
|
|
67
|
+
{/if}
|
|
68
|
+
<span
|
|
69
|
+
class="ds-tabular text-stat font-mono leading-none font-semibold {item.muted
|
|
70
|
+
? 'text-muted-foreground/60'
|
|
71
|
+
: ''}">{item.value}</span
|
|
72
|
+
>
|
|
73
|
+
{#if item.sub}
|
|
74
|
+
<span class="text-muted-foreground text-xs">{item.sub}</span>
|
|
75
|
+
{/if}
|
|
76
|
+
</dd>
|
|
77
|
+
</div>
|
|
78
|
+
{/each}
|
|
79
|
+
</dl>
|
|
80
|
+
</section>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Status } from '../status/index.js';
|
|
2
|
+
export interface StatItem {
|
|
3
|
+
/** Uppercase eyebrow label. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** The figure. Numbers render mono + tabular. */
|
|
6
|
+
value: string | number;
|
|
7
|
+
/** Optional status; shows a dot beside the value, unless muted. */
|
|
8
|
+
status?: Status;
|
|
9
|
+
/** Render quiet (e.g. a healthy zero): dims the value and suppresses the dot. */
|
|
10
|
+
muted?: boolean;
|
|
11
|
+
/** Optional small trailing unit/sub next to the value (e.g. "/ 1"). */
|
|
12
|
+
sub?: string;
|
|
13
|
+
}
|
|
14
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
15
|
+
import type { WithElementRef } from '../../../utils.js';
|
|
16
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLElement>> & {
|
|
17
|
+
items: StatItem[];
|
|
18
|
+
title?: string;
|
|
19
|
+
info?: string;
|
|
20
|
+
};
|
|
21
|
+
declare const StatList: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
22
|
+
type StatList = ReturnType<typeof StatList>;
|
|
23
|
+
export default StatList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Status = 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Status } from '../status/index.js';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
// The one state chip: a coloured dot plus a label on a tinted pill. Styling
|
|
6
|
+
// comes from .ds-chip / .ds-dot in @poodle64/ui/styles.css, so the whole app's
|
|
7
|
+
// status vocabulary changes in one place.
|
|
8
|
+
let {
|
|
9
|
+
status,
|
|
10
|
+
label,
|
|
11
|
+
pulse = false,
|
|
12
|
+
class: className
|
|
13
|
+
}: {
|
|
14
|
+
/**
|
|
15
|
+
* The shared five-state Status vocabulary, plus `'primary'` — a
|
|
16
|
+
* StatusBadge-only extension for brand-emphasis chips (not a health
|
|
17
|
+
* state), backed by `.ds-chip-primary`/`.ds-dot-primary`. The shared
|
|
18
|
+
* `Status` type itself stays closed at five states; StatCard, StatList
|
|
19
|
+
* and DataTableToolbar never see `'primary'`.
|
|
20
|
+
*/
|
|
21
|
+
status: Status | 'primary';
|
|
22
|
+
label: string;
|
|
23
|
+
/**
|
|
24
|
+
* Animate the dot, for a state that is still moving.
|
|
25
|
+
*
|
|
26
|
+
* The vocabulary is five settled states, and an app kept a local badge
|
|
27
|
+
* purely because none of them says "in progress": a sync that is running
|
|
28
|
+
* and a sync that has finished are both `info`, and the chip reads
|
|
29
|
+
* identically. Motion is the axis that separates them, and it is the right
|
|
30
|
+
* axis — it carries no colour meaning, so it composes with all five without
|
|
31
|
+
* adding a sixth state to a vocabulary that is deliberately closed.
|
|
32
|
+
*
|
|
33
|
+
* Motion is honoured only where it is welcome: under
|
|
34
|
+
* `prefers-reduced-motion: reduce` the dot goes still (`.ds-dot-pulse` in
|
|
35
|
+
* styles.css). It is therefore never the only carrier of meaning — the
|
|
36
|
+
* label still says what is happening (WCAG 1.4.1).
|
|
37
|
+
*/
|
|
38
|
+
pulse?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Extra classes on the chip. The same chip lands in a table cell, a card
|
|
41
|
+
* header and a toolbar, and only the call site knows the alignment or
|
|
42
|
+
* measure its row needs; without this an app wraps the chip in a
|
|
43
|
+
* positioning div or keeps a local copy. Placement is the call site's;
|
|
44
|
+
* colour and shape stay this package's.
|
|
45
|
+
*/
|
|
46
|
+
class?: string;
|
|
47
|
+
} = $props();
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<span class={cn('ds-chip', `ds-chip-${status}`, className)}>
|
|
51
|
+
<span class={cn('ds-dot', `ds-dot-${status}`, pulse && 'ds-dot-pulse')}></span>
|
|
52
|
+
{label}
|
|
53
|
+
</span>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Status } from '../status/index.js';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The shared five-state Status vocabulary, plus `'primary'` — a
|
|
5
|
+
* StatusBadge-only extension for brand-emphasis chips (not a health
|
|
6
|
+
* state), backed by `.ds-chip-primary`/`.ds-dot-primary`. The shared
|
|
7
|
+
* `Status` type itself stays closed at five states; StatCard, StatList
|
|
8
|
+
* and DataTableToolbar never see `'primary'`.
|
|
9
|
+
*/
|
|
10
|
+
status: Status | 'primary';
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* Animate the dot, for a state that is still moving.
|
|
14
|
+
*
|
|
15
|
+
* The vocabulary is five settled states, and an app kept a local badge
|
|
16
|
+
* purely because none of them says "in progress": a sync that is running
|
|
17
|
+
* and a sync that has finished are both `info`, and the chip reads
|
|
18
|
+
* identically. Motion is the axis that separates them, and it is the right
|
|
19
|
+
* axis — it carries no colour meaning, so it composes with all five without
|
|
20
|
+
* adding a sixth state to a vocabulary that is deliberately closed.
|
|
21
|
+
*
|
|
22
|
+
* Motion is honoured only where it is welcome: under
|
|
23
|
+
* `prefers-reduced-motion: reduce` the dot goes still (`.ds-dot-pulse` in
|
|
24
|
+
* styles.css). It is therefore never the only carrier of meaning — the
|
|
25
|
+
* label still says what is happening (WCAG 1.4.1).
|
|
26
|
+
*/
|
|
27
|
+
pulse?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Extra classes on the chip. The same chip lands in a table cell, a card
|
|
30
|
+
* header and a toolbar, and only the call site knows the alignment or
|
|
31
|
+
* measure its row needs; without this an app wraps the chip in a
|
|
32
|
+
* positioning div or keeps a local copy. Placement is the call site's;
|
|
33
|
+
* colour and shape stay this package's.
|
|
34
|
+
*/
|
|
35
|
+
class?: string;
|
|
36
|
+
};
|
|
37
|
+
declare const StatusBadge: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
38
|
+
type StatusBadge = ReturnType<typeof StatusBadge>;
|
|
39
|
+
export default StatusBadge;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Switch as SwitchPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn, type WithoutChildrenOrChild } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
checked = $bindable(false),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildrenOrChild<SwitchPrimitive.RootProps> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<!--
|
|
14
|
+
Standard shadcn-svelte Switch, rem-based (h-5/w-9/border-2, thumb h-4/w-4/
|
|
15
|
+
translate-x-4) so it scales with the consuming app's root font-size instead
|
|
16
|
+
of a fixed pixel size. The thumb is darkened to dark:bg-foreground so the
|
|
17
|
+
ball stays light on the dark-first theme. The track colour comes from the
|
|
18
|
+
project tokens. An app with a non-standard root font-size (a dense console
|
|
19
|
+
running an 18px root, say) compensates in its own override layer, not here.
|
|
20
|
+
-->
|
|
21
|
+
<SwitchPrimitive.Root
|
|
22
|
+
bind:ref
|
|
23
|
+
bind:checked
|
|
24
|
+
class={cn(
|
|
25
|
+
'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors',
|
|
26
|
+
'focus-visible:ring-ring focus-visible:ring-offset-background focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none',
|
|
27
|
+
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
28
|
+
'data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
|
|
29
|
+
className
|
|
30
|
+
)}
|
|
31
|
+
{...restProps}
|
|
32
|
+
>
|
|
33
|
+
<SwitchPrimitive.Thumb
|
|
34
|
+
class={cn(
|
|
35
|
+
'bg-background dark:bg-foreground pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform',
|
|
36
|
+
'data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0'
|
|
37
|
+
)}
|
|
38
|
+
/>
|
|
39
|
+
</SwitchPrimitive.Root>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Root from './table.svelte';
|
|
2
|
+
import Body from './table-body.svelte';
|
|
3
|
+
import Caption from './table-caption.svelte';
|
|
4
|
+
import Cell from './table-cell.svelte';
|
|
5
|
+
import Footer from './table-footer.svelte';
|
|
6
|
+
import Head from './table-head.svelte';
|
|
7
|
+
import Header from './table-header.svelte';
|
|
8
|
+
import Row from './table-row.svelte';
|
|
9
|
+
export { Root, Body, Caption, Cell, Footer, Head, Header, Row, Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow };
|
|
10
|
+
export { TH_CLASS, TD_CLASS, TH_HIDDEN_UNTIL_XL } from './table-classes.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Root from './table.svelte';
|
|
2
|
+
import Body from './table-body.svelte';
|
|
3
|
+
import Caption from './table-caption.svelte';
|
|
4
|
+
import Cell from './table-cell.svelte';
|
|
5
|
+
import Footer from './table-footer.svelte';
|
|
6
|
+
import Head from './table-head.svelte';
|
|
7
|
+
import Header from './table-header.svelte';
|
|
8
|
+
import Row from './table-row.svelte';
|
|
9
|
+
export { Root, Body, Caption, Cell, Footer, Head, Header, Row,
|
|
10
|
+
//
|
|
11
|
+
Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow };
|
|
12
|
+
export { TH_CLASS, TD_CLASS, TH_HIDDEN_UNTIL_XL } from './table-classes.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<tbody
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="table-body"
|
|
16
|
+
class={cn('[&_tr:last-child]:border-0', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</tbody>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableBody: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableBody = ReturnType<typeof TableBody>;
|
|
5
|
+
export default TableBody;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<caption
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="table-caption"
|
|
16
|
+
class={cn('text-muted-foreground mt-4 text-sm', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</caption>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableCaption: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLElement>>, {}, "ref">;
|
|
4
|
+
type TableCaption = ReturnType<typeof TableCaption>;
|
|
5
|
+
export default TableCaption;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
3
|
+
import type { HTMLTdAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLTdAttributes> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<td
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="table-cell"
|
|
16
|
+
class={cn('p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</td>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLTdAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableCell: import("svelte").Component<WithElementRef<HTMLTdAttributes>, {}, "ref">;
|
|
4
|
+
type TableCell = ReturnType<typeof TableCell>;
|
|
5
|
+
export default TableCell;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared class constants for the hand-rolled raw <table> idiom — the escape
|
|
3
|
+
* hatch for a small, static table that does not earn a full TanStack instance.
|
|
4
|
+
* Centralised here so routes don't re-type the strings and so a change to the
|
|
5
|
+
* header treatment reaches every app at once.
|
|
6
|
+
*
|
|
7
|
+
* For anything sortable, filterable or selectable, use DataTableTanstack
|
|
8
|
+
* (`@poodle64/ui/data-table-tanstack`) instead.
|
|
9
|
+
*/
|
|
10
|
+
/** Header cell. */
|
|
11
|
+
export declare const TH_CLASS = "text-muted-foreground border-border border-b px-3 py-2 text-left text-2xs font-medium tracking-eyebrow uppercase";
|
|
12
|
+
/** Body cell. */
|
|
13
|
+
export declare const TD_CLASS = "px-3 py-2.5";
|
|
14
|
+
/** Append to TH_CLASS for columns hidden below xl. */
|
|
15
|
+
export declare const TH_HIDDEN_UNTIL_XL = "hidden xl:table-cell";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared class constants for the hand-rolled raw <table> idiom — the escape
|
|
3
|
+
* hatch for a small, static table that does not earn a full TanStack instance.
|
|
4
|
+
* Centralised here so routes don't re-type the strings and so a change to the
|
|
5
|
+
* header treatment reaches every app at once.
|
|
6
|
+
*
|
|
7
|
+
* For anything sortable, filterable or selectable, use DataTableTanstack
|
|
8
|
+
* (`@poodle64/ui/data-table-tanstack`) instead.
|
|
9
|
+
*/
|
|
10
|
+
/** Header cell. */
|
|
11
|
+
export const TH_CLASS = 'text-muted-foreground border-border border-b px-3 py-2 text-left text-2xs font-medium tracking-eyebrow uppercase';
|
|
12
|
+
/** Body cell. */
|
|
13
|
+
export const TD_CLASS = 'px-3 py-2.5';
|
|
14
|
+
/** Append to TH_CLASS for columns hidden below xl. */
|
|
15
|
+
export const TH_HIDDEN_UNTIL_XL = 'hidden xl:table-cell';
|