@webjsdev/ui 0.3.17 β 0.4.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 +66 -7
- package/THIRD_PARTY_NOTICES.md +349 -0
- package/package.json +4 -2
- package/packages/registry/blocks/_shared/placeholder.svg +1 -0
- package/packages/registry/blocks/charts/chart-area-axes.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-default.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-gradient.ts +82 -0
- package/packages/registry/blocks/charts/chart-area-icons.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-interactive.ts +204 -0
- package/packages/registry/blocks/charts/chart-area-legend.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-linear.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-stacked-expand.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-stacked.ts +71 -0
- package/packages/registry/blocks/charts/chart-area-step.ts +68 -0
- package/packages/registry/blocks/charts/chart-bar-active.ts +93 -0
- package/packages/registry/blocks/charts/chart-bar-default.ts +60 -0
- package/packages/registry/blocks/charts/chart-bar-horizontal.ts +62 -0
- package/packages/registry/blocks/charts/chart-bar-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-bar-label-custom.ts +78 -0
- package/packages/registry/blocks/charts/chart-bar-label.ts +66 -0
- package/packages/registry/blocks/charts/chart-bar-mixed.ts +87 -0
- package/packages/registry/blocks/charts/chart-bar-multiple.ts +67 -0
- package/packages/registry/blocks/charts/chart-bar-negative.ts +61 -0
- package/packages/registry/blocks/charts/chart-bar-stacked.ts +68 -0
- package/packages/registry/blocks/charts/chart-line-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-dots-colors.ts +86 -0
- package/packages/registry/blocks/charts/chart-line-dots-custom.ts +75 -0
- package/packages/registry/blocks/charts/chart-line-dots.ts +65 -0
- package/packages/registry/blocks/charts/chart-line-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-line-label-custom.ts +94 -0
- package/packages/registry/blocks/charts/chart-line-label.ts +73 -0
- package/packages/registry/blocks/charts/chart-line-linear.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-multiple.ts +71 -0
- package/packages/registry/blocks/charts/chart-line-step.ts +61 -0
- package/packages/registry/blocks/charts/chart-pie-donut-active.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-donut-text.ts +89 -0
- package/packages/registry/blocks/charts/chart-pie-donut.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-interactive.ts +120 -0
- package/packages/registry/blocks/charts/chart-pie-label-custom.ts +82 -0
- package/packages/registry/blocks/charts/chart-pie-label-list.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-label.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-legend.ts +79 -0
- package/packages/registry/blocks/charts/chart-pie-separator-none.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-simple.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-stacked.ts +99 -0
- package/packages/registry/blocks/charts/chart-radar-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-dots.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-no-lines.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-custom.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-none.ts +60 -0
- package/packages/registry/blocks/charts/chart-radar-icons.ts +76 -0
- package/packages/registry/blocks/charts/chart-radar-label-custom.ts +77 -0
- package/packages/registry/blocks/charts/chart-radar-legend.ts +70 -0
- package/packages/registry/blocks/charts/chart-radar-lines-only.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-multiple.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-radius.ts +68 -0
- package/packages/registry/blocks/charts/chart-radial-grid.ts +80 -0
- package/packages/registry/blocks/charts/chart-radial-label.ts +85 -0
- package/packages/registry/blocks/charts/chart-radial-shape.ts +81 -0
- package/packages/registry/blocks/charts/chart-radial-simple.ts +79 -0
- package/packages/registry/blocks/charts/chart-radial-stacked.ts +69 -0
- package/packages/registry/blocks/charts/chart-radial-text.ts +82 -0
- package/packages/registry/blocks/charts/chart-tooltip-advanced.ts +84 -0
- package/packages/registry/blocks/charts/chart-tooltip-default.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-formatter.ts +75 -0
- package/packages/registry/blocks/charts/chart-tooltip-icons.ts +68 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-line.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-none.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-custom.ts +65 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-formatter.ts +66 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-none.ts +62 -0
- package/packages/registry/blocks/dashboard-01/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/dashboard-01/components/chart-area-interactive.ts +276 -0
- package/packages/registry/blocks/dashboard-01/components/dashboard-data.ts +89 -0
- package/packages/registry/blocks/dashboard-01/components/data-table.ts +637 -0
- package/packages/registry/blocks/dashboard-01/components/nav-documents.ts +65 -0
- package/packages/registry/blocks/dashboard-01/components/nav-main.ts +61 -0
- package/packages/registry/blocks/dashboard-01/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/dashboard-01/components/nav-user.ts +66 -0
- package/packages/registry/blocks/dashboard-01/components/section-cards.ts +59 -0
- package/packages/registry/blocks/dashboard-01/components/site-header.ts +52 -0
- package/packages/registry/blocks/dashboard-01/page.ts +39 -0
- package/packages/registry/blocks/login-01/components/login-form.ts +70 -0
- package/packages/registry/blocks/login-01/page.ts +19 -0
- package/packages/registry/blocks/login-02/components/login-form.ts +68 -0
- package/packages/registry/blocks/login-02/page.ts +36 -0
- package/packages/registry/blocks/login-03/components/login-form.ts +89 -0
- package/packages/registry/blocks/login-03/page.ts +28 -0
- package/packages/registry/blocks/login-04/components/login-form.ts +91 -0
- package/packages/registry/blocks/login-04/page.ts +20 -0
- package/packages/registry/blocks/login-05/components/login-form.ts +75 -0
- package/packages/registry/blocks/login-05/page.ts +19 -0
- package/packages/registry/blocks/preview/cards/activate-agent-dialog.ts +77 -0
- package/packages/registry/blocks/preview/cards/analytics-card.ts +64 -0
- package/packages/registry/blocks/preview/cards/anomaly-alert.ts +35 -0
- package/packages/registry/blocks/preview/cards/bar-chart-card.ts +91 -0
- package/packages/registry/blocks/preview/cards/book-appointment.ts +51 -0
- package/packages/registry/blocks/preview/cards/codespaces-card.ts +172 -0
- package/packages/registry/blocks/preview/cards/contributions-activity.ts +63 -0
- package/packages/registry/blocks/preview/cards/contributors.ts +51 -0
- package/packages/registry/blocks/preview/cards/environment-variables.ts +47 -0
- package/packages/registry/blocks/preview/cards/feedback-form.ts +61 -0
- package/packages/registry/blocks/preview/cards/file-upload.ts +51 -0
- package/packages/registry/blocks/preview/cards/github-profile.ts +66 -0
- package/packages/registry/blocks/preview/cards/icon-preview-grid.ts +47 -0
- package/packages/registry/blocks/preview/cards/invite-team.ts +78 -0
- package/packages/registry/blocks/preview/cards/invoice.ts +91 -0
- package/packages/registry/blocks/preview/cards/live-waveform.ts +330 -0
- package/packages/registry/blocks/preview/cards/no-team-members.ts +61 -0
- package/packages/registry/blocks/preview/cards/not-found.ts +46 -0
- package/packages/registry/blocks/preview/cards/observability-card.ts +44 -0
- package/packages/registry/blocks/preview/cards/pie-chart-card.ts +84 -0
- package/packages/registry/blocks/preview/cards/report-bug.ts +71 -0
- package/packages/registry/blocks/preview/cards/shipping-address.ts +79 -0
- package/packages/registry/blocks/preview/cards/shortcuts.ts +57 -0
- package/packages/registry/blocks/preview/cards/skeleton-loading.ts +37 -0
- package/packages/registry/blocks/preview/cards/sleep-report.ts +85 -0
- package/packages/registry/blocks/preview/cards/style-overview.ts +64 -0
- package/packages/registry/blocks/preview/cards/typography-specimen.ts +107 -0
- package/packages/registry/blocks/preview/cards/ui-elements.ts +164 -0
- package/packages/registry/blocks/preview/cards/usage-card.ts +63 -0
- package/packages/registry/blocks/preview/cards/visitors.ts +71 -0
- package/packages/registry/blocks/preview/cards/weekly-fitness-summary.ts +54 -0
- package/packages/registry/blocks/preview/page.ts +103 -0
- package/packages/registry/blocks/preview-02/cards/account-access.ts +70 -0
- package/packages/registry/blocks/preview-02/cards/card-overview.ts +75 -0
- package/packages/registry/blocks/preview-02/cards/claimable-balance.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/contribution-history.ts +80 -0
- package/packages/registry/blocks/preview-02/cards/cover-art.ts +41 -0
- package/packages/registry/blocks/preview-02/cards/dividend-income.ts +76 -0
- package/packages/registry/blocks/preview-02/cards/empty-connect-bank.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-distribute-track.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-explore-catalog.ts +39 -0
- package/packages/registry/blocks/preview-02/cards/faq.ts +79 -0
- package/packages/registry/blocks/preview-02/cards/front-door.ts +40 -0
- package/packages/registry/blocks/preview-02/cards/index-investing.ts +31 -0
- package/packages/registry/blocks/preview-02/cards/kitchen-island.ts +90 -0
- package/packages/registry/blocks/preview-02/cards/loading-card.ts +34 -0
- package/packages/registry/blocks/preview-02/cards/new-milestone.ts +53 -0
- package/packages/registry/blocks/preview-02/cards/notification-settings.ts +126 -0
- package/packages/registry/blocks/preview-02/cards/payments.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/payout-threshold.ts +92 -0
- package/packages/registry/blocks/preview-02/cards/power-usage.ts +84 -0
- package/packages/registry/blocks/preview-02/cards/preferences.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/qr-connect.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/receiving-method.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/recent-transactions.ts +101 -0
- package/packages/registry/blocks/preview-02/cards/release-catalog.ts +73 -0
- package/packages/registry/blocks/preview-02/cards/roller-shades.ts +110 -0
- package/packages/registry/blocks/preview-02/cards/savings-progress.ts +68 -0
- package/packages/registry/blocks/preview-02/cards/savings-targets.ts +132 -0
- package/packages/registry/blocks/preview-02/cards/sidebar-nav.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/social-links.ts +57 -0
- package/packages/registry/blocks/preview-02/cards/stock-performance.ts +106 -0
- package/packages/registry/blocks/preview-02/cards/syncing-state.ts +37 -0
- package/packages/registry/blocks/preview-02/cards/transfer-funds.ts +111 -0
- package/packages/registry/blocks/preview-02/cards/upcoming-payments.ts +69 -0
- package/packages/registry/blocks/preview-02/page.ts +111 -0
- package/packages/registry/blocks/preview-03/cards/files-chat.ts +75 -0
- package/packages/registry/blocks/preview-03/cards/group-chat.ts +114 -0
- package/packages/registry/blocks/preview-03/cards/reasoning-chat.ts +88 -0
- package/packages/registry/blocks/preview-03/cards/simple-chat.ts +53 -0
- package/packages/registry/blocks/preview-03/components/chat-card.ts +126 -0
- package/packages/registry/blocks/preview-03/components/chat-player.ts +174 -0
- package/packages/registry/blocks/preview-03/components/part-file.ts +77 -0
- package/packages/registry/blocks/preview-03/components/part-reasoning.ts +25 -0
- package/packages/registry/blocks/preview-03/components/part-source.ts +48 -0
- package/packages/registry/blocks/preview-03/components/part-text.ts +69 -0
- package/packages/registry/blocks/preview-03/components/part-tool.ts +71 -0
- package/packages/registry/blocks/preview-03/components/prompt-input.ts +86 -0
- package/packages/registry/blocks/preview-03/page.ts +39 -0
- package/packages/registry/blocks/sidebar-01/components/app-sidebar.ts +113 -0
- package/packages/registry/blocks/sidebar-01/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-01/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-01/page.ts +58 -0
- package/packages/registry/blocks/sidebar-02/components/app-sidebar.ts +131 -0
- package/packages/registry/blocks/sidebar-02/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-02/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-02/page.ts +53 -0
- package/packages/registry/blocks/sidebar-03/components/app-sidebar.ts +134 -0
- package/packages/registry/blocks/sidebar-03/page.ts +60 -0
- package/packages/registry/blocks/sidebar-04/components/app-sidebar.ts +136 -0
- package/packages/registry/blocks/sidebar-04/page.ts +58 -0
- package/packages/registry/blocks/sidebar-05/components/app-sidebar.ts +147 -0
- package/packages/registry/blocks/sidebar-05/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-05/page.ts +58 -0
- package/packages/registry/blocks/sidebar-06/components/app-sidebar.ts +105 -0
- package/packages/registry/blocks/sidebar-06/components/nav-main.ts +56 -0
- package/packages/registry/blocks/sidebar-06/components/sidebar-opt-in-form.ts +44 -0
- package/packages/registry/blocks/sidebar-06/page.ts +57 -0
- package/packages/registry/blocks/sidebar-07/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/sidebar-07/components/nav-main.ts +61 -0
- package/packages/registry/blocks/sidebar-07/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-07/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-07/components/team-switcher.ts +66 -0
- package/packages/registry/blocks/sidebar-07/page.ts +59 -0
- package/packages/registry/blocks/sidebar-08/components/app-sidebar.ts +122 -0
- package/packages/registry/blocks/sidebar-08/components/nav-main.ts +68 -0
- package/packages/registry/blocks/sidebar-08/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-08/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-08/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-08/page.ts +59 -0
- package/packages/registry/blocks/sidebar-09/components/app-sidebar.ts +213 -0
- package/packages/registry/blocks/sidebar-09/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-09/page.ts +52 -0
- package/packages/registry/blocks/sidebar-10/components/app-sidebar.ts +125 -0
- package/packages/registry/blocks/sidebar-10/components/nav-actions.ts +84 -0
- package/packages/registry/blocks/sidebar-10/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-10/components/nav-main.ts +37 -0
- package/packages/registry/blocks/sidebar-10/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-10/components/nav-workspaces.ts +78 -0
- package/packages/registry/blocks/sidebar-10/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-10/page.ts +46 -0
- package/packages/registry/blocks/sidebar-11/components/app-sidebar.ts +114 -0
- package/packages/registry/blocks/sidebar-11/page.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/app-sidebar.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-12/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-12/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-12/page.ts +43 -0
- package/packages/registry/blocks/sidebar-13/components/settings-dialog.ts +114 -0
- package/packages/registry/blocks/sidebar-13/page.ts +21 -0
- package/packages/registry/blocks/sidebar-14/components/app-sidebar.ts +120 -0
- package/packages/registry/blocks/sidebar-14/page.ts +55 -0
- package/packages/registry/blocks/sidebar-15/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-15/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-15/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-15/components/nav-main.ts +35 -0
- package/packages/registry/blocks/sidebar-15/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-15/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-15/components/nav-workspaces.ts +75 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-left.ts +126 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-right.ts +62 -0
- package/packages/registry/blocks/sidebar-15/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-15/page.ts +47 -0
- package/packages/registry/blocks/sidebar-16/components/app-sidebar.ts +124 -0
- package/packages/registry/blocks/sidebar-16/components/nav-main.ts +67 -0
- package/packages/registry/blocks/sidebar-16/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-16/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-16/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-16/components/search-form.ts +27 -0
- package/packages/registry/blocks/sidebar-16/components/site-header.ts +42 -0
- package/packages/registry/blocks/sidebar-16/page.ts +38 -0
- package/packages/registry/blocks/signup-01/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-01/page.ts +19 -0
- package/packages/registry/blocks/signup-02/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-02/page.ts +36 -0
- package/packages/registry/blocks/signup-03/components/signup-form.ts +79 -0
- package/packages/registry/blocks/signup-03/page.ts +28 -0
- package/packages/registry/blocks/signup-04/components/signup-form.ts +100 -0
- package/packages/registry/blocks/signup-04/page.ts +20 -0
- package/packages/registry/blocks/signup-05/components/signup-form.ts +75 -0
- package/packages/registry/blocks/signup-05/page.ts +20 -0
- package/packages/registry/components/accordion.ts +20 -7
- package/packages/registry/components/alert-dialog.ts +58 -13
- package/packages/registry/components/alert.ts +11 -6
- package/packages/registry/components/attachment.ts +119 -0
- package/packages/registry/components/avatar.ts +17 -8
- package/packages/registry/components/badge.ts +16 -9
- package/packages/registry/components/breadcrumb.ts +6 -6
- package/packages/registry/components/bubble.ts +95 -0
- package/packages/registry/components/button-group.ts +73 -0
- package/packages/registry/components/button.ts +35 -25
- package/packages/registry/components/calendar.ts +566 -0
- package/packages/registry/components/card.ts +8 -8
- package/packages/registry/components/carousel.ts +352 -0
- package/packages/registry/components/chart-element.ts +547 -0
- package/packages/registry/components/chart-geometry.ts +457 -0
- package/packages/registry/components/chart.ts +932 -0
- package/packages/registry/components/checkbox.ts +22 -84
- package/packages/registry/components/code-block.ts +191 -0
- package/packages/registry/components/collapsible.ts +5 -2
- package/packages/registry/components/combobox.ts +802 -0
- package/packages/registry/components/command.ts +618 -0
- package/packages/registry/components/context-menu.ts +302 -0
- package/packages/registry/components/dialog.ts +156 -45
- package/packages/registry/components/direction.ts +43 -0
- package/packages/registry/components/drawer.ts +226 -0
- package/packages/registry/components/dropdown-menu.ts +262 -83
- package/packages/registry/components/empty.ts +8 -8
- package/packages/registry/components/field.ts +20 -18
- package/packages/registry/components/floating.ts +124 -0
- package/packages/registry/components/hover-card.ts +19 -8
- package/packages/registry/components/input-group.ts +118 -0
- package/packages/registry/components/input-otp.ts +365 -0
- package/packages/registry/components/input.ts +3 -3
- package/packages/registry/components/item.ts +134 -0
- package/packages/registry/components/kbd.ts +2 -2
- package/packages/registry/components/label.ts +1 -1
- package/packages/registry/components/marker.ts +63 -0
- package/packages/registry/components/menubar.ts +388 -0
- package/packages/registry/components/message-scroller.ts +470 -0
- package/packages/registry/components/message.ts +69 -0
- package/packages/registry/components/native-select.ts +5 -5
- package/packages/registry/components/navigation-menu.ts +564 -0
- package/packages/registry/components/pagination.ts +5 -5
- package/packages/registry/components/popover.ts +30 -84
- package/packages/registry/components/progress.ts +7 -3
- package/packages/registry/components/questionnaire.ts +840 -0
- package/packages/registry/components/radio-group.ts +18 -73
- package/packages/registry/components/resizable.ts +330 -0
- package/packages/registry/components/scroll-area.ts +46 -0
- package/packages/registry/components/select.ts +650 -0
- package/packages/registry/components/separator.ts +1 -1
- package/packages/registry/components/sheet.ts +128 -0
- package/packages/registry/components/sidebar.ts +457 -0
- package/packages/registry/components/skeleton.ts +1 -1
- package/packages/registry/components/slider.ts +333 -0
- package/packages/registry/components/sonner.ts +74 -7
- package/packages/registry/components/spinner.ts +7 -4
- package/packages/registry/components/switch.ts +117 -9
- package/packages/registry/components/table.ts +11 -9
- package/packages/registry/components/tabs.ts +76 -25
- package/packages/registry/components/textarea.ts +1 -1
- package/packages/registry/components/toggle-group.ts +30 -11
- package/packages/registry/components/toggle.ts +20 -13
- package/packages/registry/components/tooltip.ts +68 -7
- package/packages/registry/components/trace.ts +75 -0
- package/packages/registry/lib/icons-hugeicons.ts +955 -0
- package/packages/registry/lib/icons-phosphor.ts +955 -0
- package/packages/registry/lib/icons-remixicon.ts +955 -0
- package/packages/registry/lib/icons-tabler.ts +955 -0
- package/packages/registry/lib/icons.ts +768 -0
- package/packages/registry/lib/utils.ts +49 -4
- package/packages/registry/registry.json +4056 -72
- package/packages/registry/styles/shadcn-tailwind.css +654 -0
- package/packages/registry/styles/style-luma.css +1987 -0
- package/packages/registry/styles/style-lyra.css +1965 -0
- package/packages/registry/styles/style-maia.css +1987 -0
- package/packages/registry/styles/style-mira.css +1992 -0
- package/packages/registry/styles/style-new-york.css +1597 -0
- package/packages/registry/styles/style-nova.css +1990 -0
- package/packages/registry/styles/style-rhea.css +1987 -0
- package/packages/registry/styles/style-sera.css +1977 -0
- package/packages/registry/styles/style-vega.css +1990 -0
- package/packages/registry/styles/supplement.json +54 -0
- package/packages/registry/styles/tw-animate.css +6 -0
- package/packages/registry/themes/base-colors.js +8 -2
- package/packages/registry/themes/fonts.js +120 -0
- package/packages/registry/themes/index.css +2 -0
- package/packages/registry/themes/items.js +61 -0
- package/packages/registry/themes/preset.js +302 -0
- package/packages/registry/themes/themes.js +1193 -0
- package/src/commands/add.js +236 -12
- package/src/commands/diff.js +34 -20
- package/src/commands/info.js +7 -0
- package/src/commands/init.js +125 -8
- package/src/commands/list.js +43 -11
- package/src/commands/view.js +33 -5
- package/src/registry/extract.js +192 -2
- package/src/registry/icons.js +31 -0
- package/src/registry/local.js +15 -1
- package/src/registry/schema.js +13 -0
- package/src/registry/style-bake.js +506 -0
- package/src/utils/theme.js +110 -21
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-08 user menu: the signed-in user's avatar, name and email,
|
|
3
|
+
* opening an account menu. A fragment helper; the menu is the kit's
|
|
4
|
+
* `<ui-dropdown-menu>`. Ported from shadcn/ui's sidebar-08.
|
|
5
|
+
*
|
|
6
|
+
* The menu items are placeholders. Make "Log out" a form that posts to your
|
|
7
|
+
* sign-out action, and the others links to your account pages.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import { cn } from '../../../lib/utils.ts';
|
|
11
|
+
import { avatarClass, avatarFallbackClass, avatarImageClass } from '../../../components/avatar.ts';
|
|
12
|
+
import '../../../components/dropdown-menu.ts';
|
|
13
|
+
import {
|
|
14
|
+
sidebarMenuButtonClass,
|
|
15
|
+
sidebarMenuClass,
|
|
16
|
+
sidebarMenuItemClass,
|
|
17
|
+
} from '../../../components/sidebar.ts';
|
|
18
|
+
import { BadgeCheckIcon, BellIcon, ChevronsUpDownIcon, CreditCardIcon, LogOutIcon, SparklesIcon } from '../../../lib/icons.ts';
|
|
19
|
+
|
|
20
|
+
function userAvatar(user: { name: string; avatar: string }) {
|
|
21
|
+
return html`<span data-slot="avatar" data-size="default" class=${cn(avatarClass(), 'h-8 w-8 rounded-lg')}>
|
|
22
|
+
<span data-slot="avatar-fallback" class=${cn(avatarFallbackClass(), 'rounded-lg')}>VK</span>
|
|
23
|
+
<img data-slot="avatar-image" src=${user.avatar} alt="@vivek" class=${avatarImageClass()}>
|
|
24
|
+
</span>`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function userText(user: { name: string; email: string }) {
|
|
28
|
+
return html`<div class="grid flex-1 text-left text-sm leading-tight">
|
|
29
|
+
<span class="truncate font-medium">${user.name}</span>
|
|
30
|
+
<span class="truncate text-xs">${user.email}</span>
|
|
31
|
+
</div>`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function navUser({ user }: { user: { name: string; email: string; avatar: string } }) {
|
|
35
|
+
return html`
|
|
36
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
37
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
38
|
+
<ui-dropdown-menu>
|
|
39
|
+
<ui-dropdown-menu-trigger>
|
|
40
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class=${cn(sidebarMenuButtonClass({ size: 'lg' }), 'aria-expanded:bg-sidebar-accent aria-expanded:text-sidebar-accent-foreground')}>
|
|
41
|
+
${userAvatar(user)}
|
|
42
|
+
${userText(user)}
|
|
43
|
+
${ChevronsUpDownIcon('ml-auto size-4')}
|
|
44
|
+
</button>
|
|
45
|
+
</ui-dropdown-menu-trigger>
|
|
46
|
+
<ui-dropdown-menu-content class="w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg" side="right" align="end">
|
|
47
|
+
<ui-dropdown-menu-label class="p-0 font-normal">
|
|
48
|
+
<div class="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
|
|
49
|
+
${userAvatar(user)}
|
|
50
|
+
${userText(user)}
|
|
51
|
+
</div>
|
|
52
|
+
</ui-dropdown-menu-label>
|
|
53
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
54
|
+
<ui-dropdown-menu-group>
|
|
55
|
+
<ui-dropdown-menu-item>${SparklesIcon()}Upgrade to Pro</ui-dropdown-menu-item>
|
|
56
|
+
</ui-dropdown-menu-group>
|
|
57
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
58
|
+
<ui-dropdown-menu-group>
|
|
59
|
+
<ui-dropdown-menu-item>${BadgeCheckIcon()}Account</ui-dropdown-menu-item>
|
|
60
|
+
<ui-dropdown-menu-item>${CreditCardIcon()}Billing</ui-dropdown-menu-item>
|
|
61
|
+
<ui-dropdown-menu-item>${BellIcon()}Notifications</ui-dropdown-menu-item>
|
|
62
|
+
</ui-dropdown-menu-group>
|
|
63
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
64
|
+
<ui-dropdown-menu-item>${LogOutIcon()}Log out</ui-dropdown-menu-item>
|
|
65
|
+
</ui-dropdown-menu-content>
|
|
66
|
+
</ui-dropdown-menu>
|
|
67
|
+
</li>
|
|
68
|
+
</ul>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-08 block's page: an inset sidebar with a secondary nav, beside a
|
|
3
|
+
* header with a breadcrumb and a placeholder content grid.
|
|
4
|
+
*
|
|
5
|
+
* Installed by `npx @webjsdev/ui add sidebar-08` at `app/dashboard/page.ts`.
|
|
6
|
+
* It is app code you own, so edit it freely. Ported from shadcn/ui's
|
|
7
|
+
* sidebar-08.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import type { Metadata } from '@webjsdev/core';
|
|
11
|
+
import { cn } from '../../lib/utils.ts';
|
|
12
|
+
import {
|
|
13
|
+
breadcrumbItemClass,
|
|
14
|
+
breadcrumbLinkClass,
|
|
15
|
+
breadcrumbListClass,
|
|
16
|
+
breadcrumbPageClass,
|
|
17
|
+
breadcrumbSeparatorClass,
|
|
18
|
+
} from '../../components/breadcrumb.ts';
|
|
19
|
+
import { separatorClass } from '../../components/separator.ts';
|
|
20
|
+
import '../../components/sidebar.ts';
|
|
21
|
+
import { appSidebar } from './components/app-sidebar.ts';
|
|
22
|
+
import { ChevronRightIcon } from '../../lib/icons.ts';
|
|
23
|
+
|
|
24
|
+
export const metadata: Metadata = { title: 'Dashboard' };
|
|
25
|
+
|
|
26
|
+
export default function DashboardPage() {
|
|
27
|
+
return html`
|
|
28
|
+
<ui-sidebar-provider>
|
|
29
|
+
${appSidebar()}
|
|
30
|
+
<ui-sidebar-inset>
|
|
31
|
+
<header class="flex h-16 shrink-0 items-center gap-2">
|
|
32
|
+
<div class="flex items-center gap-2 px-4">
|
|
33
|
+
<ui-sidebar-trigger class="-ml-1"></ui-sidebar-trigger>
|
|
34
|
+
<div role="none" data-slot="separator" data-orientation="vertical" class=${cn(separatorClass(), 'mr-2 data-vertical:h-4 data-vertical:self-auto')}></div>
|
|
35
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb">
|
|
36
|
+
<ol data-slot="breadcrumb-list" class=${breadcrumbListClass()}>
|
|
37
|
+
<li data-slot="breadcrumb-item" class=${cn(breadcrumbItemClass(), 'hidden md:block')}>
|
|
38
|
+
<a data-slot="breadcrumb-link" class=${breadcrumbLinkClass()} href="#">Build Your Application</a>
|
|
39
|
+
</li>
|
|
40
|
+
<li data-slot="breadcrumb-separator" role="presentation" aria-hidden="true" class=${cn(breadcrumbSeparatorClass(), 'hidden md:block')}>${ChevronRightIcon()}</li>
|
|
41
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
42
|
+
<span data-slot="breadcrumb-page" class=${breadcrumbPageClass()} aria-current="page">Data Fetching</span>
|
|
43
|
+
</li>
|
|
44
|
+
</ol>
|
|
45
|
+
</nav>
|
|
46
|
+
</div>
|
|
47
|
+
</header>
|
|
48
|
+
<div class="flex flex-1 flex-col gap-4 p-4 pt-0">
|
|
49
|
+
<div class="grid auto-rows-min gap-4 md:grid-cols-3">
|
|
50
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
51
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
52
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="min-h-screen flex-1 rounded-xl bg-muted/50 md:min-h-min"></div>
|
|
55
|
+
</div>
|
|
56
|
+
</ui-sidebar-inset>
|
|
57
|
+
</ui-sidebar-provider>
|
|
58
|
+
`;
|
|
59
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-09 app sidebar: two sidebars nested in one. The first is an
|
|
3
|
+
* icon rail of mail folders with the user menu; the second lists the open
|
|
4
|
+
* folder's messages with an unread filter and a search field. The whole
|
|
5
|
+
* sidebar collapses to the rail. A fragment helper, so the markup is rendered
|
|
6
|
+
* by the server; the sidebars and the menu are the kit's elements. Ported
|
|
7
|
+
* from shadcn/ui's sidebar-09.
|
|
8
|
+
*
|
|
9
|
+
* shadcn keeps the open folder and its messages in React state and reshuffles
|
|
10
|
+
* the list on each click. Here the first folder renders as the open one and
|
|
11
|
+
* each folder is a link: in your app the folder is a route segment or a
|
|
12
|
+
* search param, so render its messages on the server and mark its link
|
|
13
|
+
* `data-active="true"` and `aria-current="page"`.
|
|
14
|
+
*
|
|
15
|
+
* The data below is sample data. Replace it with your own.
|
|
16
|
+
*/
|
|
17
|
+
import { html } from '@webjsdev/core';
|
|
18
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
19
|
+
import { cn } from '../../../lib/utils.ts';
|
|
20
|
+
import { labelClass } from '../../../components/label.ts';
|
|
21
|
+
import '../../../components/switch.ts';
|
|
22
|
+
import {
|
|
23
|
+
sidebarContentClass,
|
|
24
|
+
sidebarFooterClass,
|
|
25
|
+
sidebarGroupClass,
|
|
26
|
+
sidebarGroupContentClass,
|
|
27
|
+
sidebarHeaderClass,
|
|
28
|
+
sidebarInputClass,
|
|
29
|
+
sidebarMenuButtonClass,
|
|
30
|
+
sidebarMenuClass,
|
|
31
|
+
sidebarMenuItemClass,
|
|
32
|
+
} from '../../../components/sidebar.ts';
|
|
33
|
+
import { navUser } from './nav-user.ts';
|
|
34
|
+
import { ArchiveXIcon, CommandIcon, FileIcon, InboxIcon, SendIcon, Trash2Icon } from '../../../lib/icons.ts';
|
|
35
|
+
|
|
36
|
+
interface Folder {
|
|
37
|
+
title: string;
|
|
38
|
+
url: string;
|
|
39
|
+
icon: (cls?: string) => TemplateResult;
|
|
40
|
+
isActive: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface Mail {
|
|
44
|
+
name: string;
|
|
45
|
+
email: string;
|
|
46
|
+
subject: string;
|
|
47
|
+
date: string;
|
|
48
|
+
teaser: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// This is sample data.
|
|
52
|
+
const data: {
|
|
53
|
+
user: { name: string; email: string; avatar: string };
|
|
54
|
+
navMain: Folder[];
|
|
55
|
+
mails: Mail[];
|
|
56
|
+
} = {
|
|
57
|
+
user: {
|
|
58
|
+
name: 'vivek',
|
|
59
|
+
email: 'vivek@example.com',
|
|
60
|
+
avatar: 'https://webjs.dev/public/avatars/vivek.jpg',
|
|
61
|
+
},
|
|
62
|
+
navMain: [
|
|
63
|
+
{ title: 'Inbox', url: '#', icon: InboxIcon, isActive: true },
|
|
64
|
+
{ title: 'Drafts', url: '#', icon: FileIcon, isActive: false },
|
|
65
|
+
{ title: 'Sent', url: '#', icon: SendIcon, isActive: false },
|
|
66
|
+
{ title: 'Junk', url: '#', icon: ArchiveXIcon, isActive: false },
|
|
67
|
+
{ title: 'Trash', url: '#', icon: Trash2Icon, isActive: false },
|
|
68
|
+
],
|
|
69
|
+
mails: [
|
|
70
|
+
{
|
|
71
|
+
name: 'William Smith',
|
|
72
|
+
email: 'williamsmith@example.com',
|
|
73
|
+
subject: 'Meeting Tomorrow',
|
|
74
|
+
date: '09:34 AM',
|
|
75
|
+
teaser: 'Hi team, just a reminder about our meeting tomorrow at 10 AM.\nPlease come prepared with your project updates.',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Alice Smith',
|
|
79
|
+
email: 'alicesmith@example.com',
|
|
80
|
+
subject: 'Re: Project Update',
|
|
81
|
+
date: 'Yesterday',
|
|
82
|
+
teaser: "Thanks for the update. The progress looks great so far.\nLet's schedule a call to discuss the next steps.",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Bob Johnson',
|
|
86
|
+
email: 'bobjohnson@example.com',
|
|
87
|
+
subject: 'Weekend Plans',
|
|
88
|
+
date: '2 days ago',
|
|
89
|
+
teaser: "Hey everyone! I'm thinking of organizing a team outing this weekend.\nWould you be interested in a hiking trip or a beach day?",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'Emily Davis',
|
|
93
|
+
email: 'emilydavis@example.com',
|
|
94
|
+
subject: 'Re: Question about Budget',
|
|
95
|
+
date: '2 days ago',
|
|
96
|
+
teaser: "I've reviewed the budget numbers you sent over.\nCan we set up a quick call to discuss some potential adjustments?",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Michael Wilson',
|
|
100
|
+
email: 'michaelwilson@example.com',
|
|
101
|
+
subject: 'Important Announcement',
|
|
102
|
+
date: '1 week ago',
|
|
103
|
+
teaser: "Please join us for an all-hands meeting this Friday at 3 PM.\nWe have some exciting news to share about the company's future.",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'Sarah Brown',
|
|
107
|
+
email: 'sarahbrown@example.com',
|
|
108
|
+
subject: 'Re: Feedback on Proposal',
|
|
109
|
+
date: '1 week ago',
|
|
110
|
+
teaser: "Thank you for sending over the proposal. I've reviewed it and have some thoughts.\nCould we schedule a meeting to discuss my feedback in detail?",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'David Lee',
|
|
114
|
+
email: 'davidlee@example.com',
|
|
115
|
+
subject: 'New Project Idea',
|
|
116
|
+
date: '1 week ago',
|
|
117
|
+
teaser: "I've been brainstorming and came up with an interesting project concept.\nDo you have time this week to discuss its potential impact and feasibility?",
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'Olivia Wilson',
|
|
121
|
+
email: 'oliviawilson@example.com',
|
|
122
|
+
subject: 'Vacation Plans',
|
|
123
|
+
date: '1 week ago',
|
|
124
|
+
teaser: "Just a heads up that I'll be taking a two-week vacation next month.\nI'll make sure all my projects are up to date before I leave.",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'James Martin',
|
|
128
|
+
email: 'jamesmartin@example.com',
|
|
129
|
+
subject: 'Re: Conference Registration',
|
|
130
|
+
date: '1 week ago',
|
|
131
|
+
teaser: "I've completed the registration for the upcoming tech conference.\nLet me know if you need any additional information from my end.",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'Sophia White',
|
|
135
|
+
email: 'sophiawhite@example.com',
|
|
136
|
+
subject: 'Team Dinner',
|
|
137
|
+
date: '1 week ago',
|
|
138
|
+
teaser: "To celebrate our recent project success, I'd like to organize a team dinner.\nAre you available next Friday evening? Please let me know your preferences.",
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export function appSidebar() {
|
|
144
|
+
const active = data.navMain.find((item) => item.isActive) ?? data.navMain[0];
|
|
145
|
+
return html`
|
|
146
|
+
<ui-sidebar collapsible="icon" class="overflow-hidden **:data-[slot=sidebar-inner]:flex-row" style="--sidebar-width: 350px">
|
|
147
|
+
<ui-sidebar collapsible="none" class="w-[calc(var(--sidebar-width-icon)+1px)]! border-r">
|
|
148
|
+
<div data-slot="sidebar-header" data-sidebar="header" class=${sidebarHeaderClass()}>
|
|
149
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
150
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
151
|
+
<a href="#" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class=${cn(sidebarMenuButtonClass({ size: 'lg' }), 'md:h-8 md:p-0')}>
|
|
152
|
+
<div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
|
153
|
+
${CommandIcon('size-4')}
|
|
154
|
+
</div>
|
|
155
|
+
<div class="grid flex-1 text-left text-sm leading-tight">
|
|
156
|
+
<span class="truncate font-medium">Acme Inc</span>
|
|
157
|
+
<span class="truncate text-xs">Enterprise</span>
|
|
158
|
+
</div>
|
|
159
|
+
</a>
|
|
160
|
+
</li>
|
|
161
|
+
</ul>
|
|
162
|
+
</div>
|
|
163
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
164
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${sidebarGroupClass()}>
|
|
165
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${cn(sidebarGroupContentClass(), 'px-1.5 md:px-0')}>
|
|
166
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
167
|
+
${data.navMain.map((item) => html`
|
|
168
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
169
|
+
<a href=${item.url} title=${item.title} data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" data-active=${item === active ? 'true' : 'false'} aria-current=${item === active ? 'page' : null} class=${cn(sidebarMenuButtonClass(), 'px-2.5 md:px-2')}>
|
|
170
|
+
${item.icon()}
|
|
171
|
+
<span>${item.title}</span>
|
|
172
|
+
</a>
|
|
173
|
+
</li>
|
|
174
|
+
`)}
|
|
175
|
+
</ul>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
<div data-slot="sidebar-footer" data-sidebar="footer" class=${sidebarFooterClass()}>
|
|
180
|
+
${navUser({ user: data.user })}
|
|
181
|
+
</div>
|
|
182
|
+
</ui-sidebar>
|
|
183
|
+
|
|
184
|
+
<ui-sidebar collapsible="none" class="hidden flex-1 md:flex">
|
|
185
|
+
<div data-slot="sidebar-header" data-sidebar="header" class=${cn(sidebarHeaderClass(), 'gap-3.5 border-b p-4')}>
|
|
186
|
+
<div class="flex w-full items-center justify-between">
|
|
187
|
+
<div class="text-base font-medium text-foreground">${active.title}</div>
|
|
188
|
+
<label class=${cn(labelClass(), 'flex items-center gap-2 text-sm')}>
|
|
189
|
+
<span>Unreads</span>
|
|
190
|
+
<ui-switch name="unreads" class="shadow-none"></ui-switch>
|
|
191
|
+
</label>
|
|
192
|
+
</div>
|
|
193
|
+
<input type="search" name="q" placeholder="Type to search..." aria-label="Search mail" data-slot="sidebar-input" data-sidebar="input" class=${sidebarInputClass()}>
|
|
194
|
+
</div>
|
|
195
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
196
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${cn(sidebarGroupClass(), 'px-0')}>
|
|
197
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${sidebarGroupContentClass()}>
|
|
198
|
+
${data.mails.map((mail) => html`
|
|
199
|
+
<a href="#" class="flex flex-col items-start gap-2 border-b p-4 text-sm leading-tight whitespace-nowrap text-inherit no-underline last:border-b-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground">
|
|
200
|
+
<div class="flex w-full items-center gap-2">
|
|
201
|
+
<span>${mail.name}</span> <span class="ml-auto text-xs">${mail.date}</span>
|
|
202
|
+
</div>
|
|
203
|
+
<span class="font-medium">${mail.subject}</span>
|
|
204
|
+
<span class="line-clamp-2 w-[260px] text-xs whitespace-break-spaces">${mail.teaser}</span>
|
|
205
|
+
</a>
|
|
206
|
+
`)}
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
</ui-sidebar>
|
|
211
|
+
</ui-sidebar>
|
|
212
|
+
`;
|
|
213
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-09 user menu: the signed-in user's avatar, name and email,
|
|
3
|
+
* opening an account menu. A fragment helper; the menu is the kit's
|
|
4
|
+
* `<ui-dropdown-menu>`. Ported from shadcn/ui's sidebar-09.
|
|
5
|
+
*
|
|
6
|
+
* The menu items are placeholders. Make "Log out" a form that posts to your
|
|
7
|
+
* sign-out action, and the others links to your account pages.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import { cn } from '../../../lib/utils.ts';
|
|
11
|
+
import { avatarClass, avatarFallbackClass, avatarImageClass } from '../../../components/avatar.ts';
|
|
12
|
+
import '../../../components/dropdown-menu.ts';
|
|
13
|
+
import {
|
|
14
|
+
sidebarMenuButtonClass,
|
|
15
|
+
sidebarMenuClass,
|
|
16
|
+
sidebarMenuItemClass,
|
|
17
|
+
} from '../../../components/sidebar.ts';
|
|
18
|
+
import { BadgeCheckIcon, BellIcon, ChevronsUpDownIcon, CreditCardIcon, LogOutIcon, SparklesIcon } from '../../../lib/icons.ts';
|
|
19
|
+
|
|
20
|
+
function userAvatar(user: { name: string; avatar: string }) {
|
|
21
|
+
return html`<span data-slot="avatar" data-size="default" class=${cn(avatarClass(), 'h-8 w-8 rounded-lg')}>
|
|
22
|
+
<span data-slot="avatar-fallback" class=${cn(avatarFallbackClass(), 'rounded-lg')}>VK</span>
|
|
23
|
+
<img data-slot="avatar-image" src=${user.avatar} alt="@vivek" class=${avatarImageClass()}>
|
|
24
|
+
</span>`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function userText(user: { name: string; email: string }) {
|
|
28
|
+
return html`<div class="grid flex-1 text-left text-sm leading-tight">
|
|
29
|
+
<span class="truncate font-medium">${user.name}</span>
|
|
30
|
+
<span class="truncate text-xs">${user.email}</span>
|
|
31
|
+
</div>`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function navUser({ user }: { user: { name: string; email: string; avatar: string } }) {
|
|
35
|
+
return html`
|
|
36
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
37
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
38
|
+
<ui-dropdown-menu>
|
|
39
|
+
<ui-dropdown-menu-trigger>
|
|
40
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class=${cn(sidebarMenuButtonClass({ size: 'lg' }), 'aria-expanded:bg-sidebar-accent aria-expanded:text-sidebar-accent-foreground md:h-8 md:p-0')}>
|
|
41
|
+
${userAvatar(user)}
|
|
42
|
+
${userText(user)}
|
|
43
|
+
${ChevronsUpDownIcon('ml-auto size-4')}
|
|
44
|
+
</button>
|
|
45
|
+
</ui-dropdown-menu-trigger>
|
|
46
|
+
<ui-dropdown-menu-content class="w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg" side="right" align="end">
|
|
47
|
+
<ui-dropdown-menu-label class="p-0 font-normal">
|
|
48
|
+
<div class="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
|
|
49
|
+
${userAvatar(user)}
|
|
50
|
+
${userText(user)}
|
|
51
|
+
</div>
|
|
52
|
+
</ui-dropdown-menu-label>
|
|
53
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
54
|
+
<ui-dropdown-menu-group>
|
|
55
|
+
<ui-dropdown-menu-item>${SparklesIcon()}Upgrade to Pro</ui-dropdown-menu-item>
|
|
56
|
+
</ui-dropdown-menu-group>
|
|
57
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
58
|
+
<ui-dropdown-menu-group>
|
|
59
|
+
<ui-dropdown-menu-item>${BadgeCheckIcon()}Account</ui-dropdown-menu-item>
|
|
60
|
+
<ui-dropdown-menu-item>${CreditCardIcon()}Billing</ui-dropdown-menu-item>
|
|
61
|
+
<ui-dropdown-menu-item>${BellIcon()}Notifications</ui-dropdown-menu-item>
|
|
62
|
+
</ui-dropdown-menu-group>
|
|
63
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
64
|
+
<ui-dropdown-menu-item>${LogOutIcon()}Log out</ui-dropdown-menu-item>
|
|
65
|
+
</ui-dropdown-menu-content>
|
|
66
|
+
</ui-dropdown-menu>
|
|
67
|
+
</li>
|
|
68
|
+
</ul>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-09 block's page: a mail layout with collapsible nested
|
|
3
|
+
* sidebars, beside a header with a breadcrumb and a placeholder message list.
|
|
4
|
+
*
|
|
5
|
+
* Installed by `npx @webjsdev/ui add sidebar-09` at `app/dashboard/page.ts`.
|
|
6
|
+
* It is app code you own, so edit it freely. Ported from shadcn/ui's
|
|
7
|
+
* sidebar-09.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import type { Metadata } from '@webjsdev/core';
|
|
11
|
+
import { cn } from '../../lib/utils.ts';
|
|
12
|
+
import {
|
|
13
|
+
breadcrumbItemClass,
|
|
14
|
+
breadcrumbLinkClass,
|
|
15
|
+
breadcrumbListClass,
|
|
16
|
+
breadcrumbPageClass,
|
|
17
|
+
breadcrumbSeparatorClass,
|
|
18
|
+
} from '../../components/breadcrumb.ts';
|
|
19
|
+
import { separatorClass } from '../../components/separator.ts';
|
|
20
|
+
import '../../components/sidebar.ts';
|
|
21
|
+
import { appSidebar } from './components/app-sidebar.ts';
|
|
22
|
+
import { ChevronRightIcon } from '../../lib/icons.ts';
|
|
23
|
+
|
|
24
|
+
export const metadata: Metadata = { title: 'Inbox' };
|
|
25
|
+
|
|
26
|
+
export default function DashboardPage() {
|
|
27
|
+
return html`
|
|
28
|
+
<ui-sidebar-provider>
|
|
29
|
+
${appSidebar()}
|
|
30
|
+
<ui-sidebar-inset>
|
|
31
|
+
<header class="sticky top-0 flex shrink-0 items-center gap-2 border-b bg-background p-4">
|
|
32
|
+
<ui-sidebar-trigger class="-ml-1"></ui-sidebar-trigger>
|
|
33
|
+
<div role="none" data-slot="separator" data-orientation="vertical" class=${cn(separatorClass(), 'mr-2 data-vertical:h-4 data-vertical:self-auto')}></div>
|
|
34
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb">
|
|
35
|
+
<ol data-slot="breadcrumb-list" class=${breadcrumbListClass()}>
|
|
36
|
+
<li data-slot="breadcrumb-item" class=${cn(breadcrumbItemClass(), 'hidden md:block')}>
|
|
37
|
+
<a data-slot="breadcrumb-link" class=${breadcrumbLinkClass()} href="#">All Inboxes</a>
|
|
38
|
+
</li>
|
|
39
|
+
<li data-slot="breadcrumb-separator" role="presentation" aria-hidden="true" class=${cn(breadcrumbSeparatorClass(), 'hidden md:block')}>${ChevronRightIcon()}</li>
|
|
40
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
41
|
+
<span data-slot="breadcrumb-page" class=${breadcrumbPageClass()} aria-current="page">Inbox</span>
|
|
42
|
+
</li>
|
|
43
|
+
</ol>
|
|
44
|
+
</nav>
|
|
45
|
+
</header>
|
|
46
|
+
<div class="flex flex-1 flex-col gap-4 p-4">
|
|
47
|
+
${Array.from({ length: 24 }, () => html`<div class="aspect-video h-12 w-full rounded-lg bg-muted/50"></div>`)}
|
|
48
|
+
</div>
|
|
49
|
+
</ui-sidebar-inset>
|
|
50
|
+
</ui-sidebar-provider>
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-10 app sidebar: a notes app's team switcher and main links,
|
|
3
|
+
* the favourite pages, the workspaces with their pages, and a secondary nav
|
|
4
|
+
* pinned to the bottom. A fragment helper, so the markup is rendered by the
|
|
5
|
+
* server; the sidebar, its rail and the menus are the kit's elements. Ported
|
|
6
|
+
* from shadcn/ui's sidebar-10.
|
|
7
|
+
*
|
|
8
|
+
* The data below is sample data. Replace it with your own, and point each
|
|
9
|
+
* `url` at a real route.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import {
|
|
13
|
+
sidebarContentClass,
|
|
14
|
+
sidebarHeaderClass,
|
|
15
|
+
} from '../../../components/sidebar.ts';
|
|
16
|
+
import { navFavorites, type Favorite } from './nav-favorites.ts';
|
|
17
|
+
import { navMain, type NavMainItem } from './nav-main.ts';
|
|
18
|
+
import { navSecondary, type NavSecondaryItem } from './nav-secondary.ts';
|
|
19
|
+
import { navWorkspaces, type Workspace } from './nav-workspaces.ts';
|
|
20
|
+
import { teamSwitcher, type Team } from './team-switcher.ts';
|
|
21
|
+
import { AudioLinesIcon, BlocksIcon, CalendarIcon, CommandIcon, HomeIcon, InboxIcon, MessageCircleQuestionIcon, SearchIcon, Settings2Icon, SparklesIcon, Trash2Icon } from '../../../lib/icons.ts';
|
|
22
|
+
|
|
23
|
+
// This is sample data.
|
|
24
|
+
const data: {
|
|
25
|
+
teams: Team[];
|
|
26
|
+
navMain: NavMainItem[];
|
|
27
|
+
navSecondary: NavSecondaryItem[];
|
|
28
|
+
favorites: Favorite[];
|
|
29
|
+
workspaces: Workspace[];
|
|
30
|
+
} = {
|
|
31
|
+
teams: [
|
|
32
|
+
{ name: 'Acme Inc', logo: CommandIcon, plan: 'Enterprise' },
|
|
33
|
+
{ name: 'Acme Corp.', logo: AudioLinesIcon, plan: 'Startup' },
|
|
34
|
+
{ name: 'Evil Corp.', logo: CommandIcon, plan: 'Free' },
|
|
35
|
+
],
|
|
36
|
+
navMain: [
|
|
37
|
+
{ title: 'Search', url: '#', icon: SearchIcon },
|
|
38
|
+
{ title: 'Ask AI', url: '#', icon: SparklesIcon },
|
|
39
|
+
{ title: 'Home', url: '#', icon: HomeIcon, isActive: true },
|
|
40
|
+
{ title: 'Inbox', url: '#', icon: InboxIcon, badge: '10' },
|
|
41
|
+
],
|
|
42
|
+
navSecondary: [
|
|
43
|
+
{ title: 'Calendar', url: '#', icon: CalendarIcon },
|
|
44
|
+
{ title: 'Settings', url: '#', icon: Settings2Icon },
|
|
45
|
+
{ title: 'Templates', url: '#', icon: BlocksIcon },
|
|
46
|
+
{ title: 'Trash', url: '#', icon: Trash2Icon },
|
|
47
|
+
{ title: 'Help', url: '#', icon: MessageCircleQuestionIcon },
|
|
48
|
+
],
|
|
49
|
+
favorites: [
|
|
50
|
+
{ name: 'Project Management & Task Tracking', url: '#', emoji: 'π' },
|
|
51
|
+
{ name: 'Family Recipe Collection & Meal Planning', url: '#', emoji: 'π³' },
|
|
52
|
+
{ name: 'Fitness Tracker & Workout Routines', url: '#', emoji: 'πͺ' },
|
|
53
|
+
{ name: 'Book Notes & Reading List', url: '#', emoji: 'π' },
|
|
54
|
+
{ name: 'Sustainable Gardening Tips & Plant Care', url: '#', emoji: 'π±' },
|
|
55
|
+
{ name: 'Language Learning Progress & Resources', url: '#', emoji: 'π£οΈ' },
|
|
56
|
+
{ name: 'Home Renovation Ideas & Budget Tracker', url: '#', emoji: 'π ' },
|
|
57
|
+
{ name: 'Personal Finance & Investment Portfolio', url: '#', emoji: 'π°' },
|
|
58
|
+
{ name: 'Movie & TV Show Watchlist with Reviews', url: '#', emoji: 'π¬' },
|
|
59
|
+
{ name: 'Daily Habit Tracker & Goal Setting', url: '#', emoji: 'β
' },
|
|
60
|
+
],
|
|
61
|
+
workspaces: [
|
|
62
|
+
{
|
|
63
|
+
name: 'Personal Life Management',
|
|
64
|
+
emoji: 'π ',
|
|
65
|
+
pages: [
|
|
66
|
+
{ name: 'Daily Journal & Reflection', url: '#', emoji: 'π' },
|
|
67
|
+
{ name: 'Health & Wellness Tracker', url: '#', emoji: 'π' },
|
|
68
|
+
{ name: 'Personal Growth & Learning Goals', url: '#', emoji: 'π' },
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'Professional Development',
|
|
73
|
+
emoji: 'πΌ',
|
|
74
|
+
pages: [
|
|
75
|
+
{ name: 'Career Objectives & Milestones', url: '#', emoji: 'π―' },
|
|
76
|
+
{ name: 'Skill Acquisition & Training Log', url: '#', emoji: 'π§ ' },
|
|
77
|
+
{ name: 'Networking Contacts & Events', url: '#', emoji: 'π€' },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Creative Projects',
|
|
82
|
+
emoji: 'π¨',
|
|
83
|
+
pages: [
|
|
84
|
+
{ name: 'Writing Ideas & Story Outlines', url: '#', emoji: 'βοΈ' },
|
|
85
|
+
{ name: 'Art & Design Portfolio', url: '#', emoji: 'πΌοΈ' },
|
|
86
|
+
{ name: 'Music Composition & Practice Log', url: '#', emoji: 'π΅' },
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Home Management',
|
|
91
|
+
emoji: 'π‘',
|
|
92
|
+
pages: [
|
|
93
|
+
{ name: 'Household Budget & Expense Tracking', url: '#', emoji: 'π°' },
|
|
94
|
+
{ name: 'Home Maintenance Schedule & Tasks', url: '#', emoji: 'π§' },
|
|
95
|
+
{ name: 'Family Calendar & Event Planning', url: '#', emoji: 'π
' },
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Travel & Adventure',
|
|
100
|
+
emoji: 'π§³',
|
|
101
|
+
pages: [
|
|
102
|
+
{ name: 'Trip Planning & Itineraries', url: '#', emoji: 'πΊοΈ' },
|
|
103
|
+
{ name: 'Travel Bucket List & Inspiration', url: '#', emoji: 'π' },
|
|
104
|
+
{ name: 'Travel Journal & Photo Gallery', url: '#', emoji: 'πΈ' },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export function appSidebar() {
|
|
111
|
+
return html`
|
|
112
|
+
<ui-sidebar class="border-r-0">
|
|
113
|
+
<div data-slot="sidebar-header" data-sidebar="header" class=${sidebarHeaderClass()}>
|
|
114
|
+
${teamSwitcher({ teams: data.teams })}
|
|
115
|
+
${navMain({ items: data.navMain })}
|
|
116
|
+
</div>
|
|
117
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
118
|
+
${navFavorites({ favorites: data.favorites })}
|
|
119
|
+
${navWorkspaces({ workspaces: data.workspaces })}
|
|
120
|
+
${navSecondary({ items: data.navSecondary, class: 'mt-auto' })}
|
|
121
|
+
</div>
|
|
122
|
+
<ui-sidebar-rail></ui-sidebar-rail>
|
|
123
|
+
</ui-sidebar>
|
|
124
|
+
`;
|
|
125
|
+
}
|