@webjsdev/ui 0.3.17 → 0.5.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 +67 -8
- 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 +644 -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/dom.ts +3 -4
- 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 +52 -8
- 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 +266 -14
- package/src/commands/diff.js +34 -20
- package/src/commands/info.js +7 -0
- package/src/commands/init.js +127 -10
- package/src/commands/list.js +43 -11
- package/src/commands/view.js +33 -5
- package/src/lint/rules/no-restyle.js +1 -1
- package/src/registry/extract.js +194 -5
- 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,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-15 favorites list: one link per favorite page, each with a
|
|
3
|
+
* "More" menu that shows on hover, and a trailing "More" item. A fragment
|
|
4
|
+
* helper; the menus are the kit's `<ui-dropdown-menu>`. Ported from
|
|
5
|
+
* shadcn/ui's sidebar-15.
|
|
6
|
+
*
|
|
7
|
+
* Each "More" button sits right after its link, a sibling of it, because the
|
|
8
|
+
* kit's styles place it with `peer-*` selectors that need exactly that. The
|
|
9
|
+
* menu names it through `trigger="<id>"`, so the ids must be unique on the page.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import { cn } from '../../../lib/utils.ts';
|
|
13
|
+
import '../../../components/dropdown-menu.ts';
|
|
14
|
+
import {
|
|
15
|
+
sidebarGroupClass,
|
|
16
|
+
sidebarGroupLabelClass,
|
|
17
|
+
sidebarMenuActionClass,
|
|
18
|
+
sidebarMenuButtonClass,
|
|
19
|
+
sidebarMenuClass,
|
|
20
|
+
sidebarMenuItemClass,
|
|
21
|
+
} from '../../../components/sidebar.ts';
|
|
22
|
+
import { ArrowUpRightIcon, LinkIcon, MoreHorizontalIcon, StarOffIcon, Trash2Icon } from '../../../lib/icons.ts';
|
|
23
|
+
|
|
24
|
+
export interface Favorite {
|
|
25
|
+
name: string;
|
|
26
|
+
url: string;
|
|
27
|
+
emoji: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function navFavorites({ favorites }: { favorites: Favorite[] }) {
|
|
31
|
+
return html`
|
|
32
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${cn(sidebarGroupClass(), 'group-data-[collapsible=icon]:hidden')}>
|
|
33
|
+
<div data-slot="sidebar-group-label" data-sidebar="group-label" class=${sidebarGroupLabelClass()}>Favorites</div>
|
|
34
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
35
|
+
${favorites.map((item, i) => html`
|
|
36
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
37
|
+
<a href=${item.url} title=${item.name} data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${sidebarMenuButtonClass()}>
|
|
38
|
+
<span>${item.emoji}</span>
|
|
39
|
+
<span>${item.name}</span>
|
|
40
|
+
</a>
|
|
41
|
+
<button type="button" id=${`nav-favorite-more-${i}`} data-slot="sidebar-menu-action" data-sidebar="menu-action" class=${cn(sidebarMenuActionClass({ showOnHover: true }), 'aria-expanded:bg-muted')}>
|
|
42
|
+
${MoreHorizontalIcon()}
|
|
43
|
+
<span class="sr-only">More</span>
|
|
44
|
+
</button>
|
|
45
|
+
<ui-dropdown-menu trigger=${`nav-favorite-more-${i}`}>
|
|
46
|
+
<ui-dropdown-menu-content class="w-56 rounded-lg" side="right" align="start">
|
|
47
|
+
<ui-dropdown-menu-item>${StarOffIcon('text-muted-foreground')}<span>Remove from Favorites</span></ui-dropdown-menu-item>
|
|
48
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
49
|
+
<ui-dropdown-menu-item>${LinkIcon('text-muted-foreground')}<span>Copy Link</span></ui-dropdown-menu-item>
|
|
50
|
+
<ui-dropdown-menu-item>${ArrowUpRightIcon('text-muted-foreground')}<span>Open in New Tab</span></ui-dropdown-menu-item>
|
|
51
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
52
|
+
<ui-dropdown-menu-item>${Trash2Icon('text-muted-foreground')}<span>Delete</span></ui-dropdown-menu-item>
|
|
53
|
+
</ui-dropdown-menu-content>
|
|
54
|
+
</ui-dropdown-menu>
|
|
55
|
+
</li>
|
|
56
|
+
`)}
|
|
57
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
58
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${cn(sidebarMenuButtonClass(), 'text-sidebar-foreground/70')}>
|
|
59
|
+
${MoreHorizontalIcon()}
|
|
60
|
+
<span>More</span>
|
|
61
|
+
</button>
|
|
62
|
+
</li>
|
|
63
|
+
</ul>
|
|
64
|
+
</div>
|
|
65
|
+
`;
|
|
66
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-15 main nav: a short list of top-level links (search, ask AI,
|
|
3
|
+
* home, inbox) under the team switcher. A fragment helper. Ported from
|
|
4
|
+
* shadcn/ui's sidebar-15.
|
|
5
|
+
*/
|
|
6
|
+
import { html, nothing } from '@webjsdev/core';
|
|
7
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
8
|
+
import {
|
|
9
|
+
sidebarMenuButtonClass,
|
|
10
|
+
sidebarMenuClass,
|
|
11
|
+
sidebarMenuItemClass,
|
|
12
|
+
} from '../../../components/sidebar.ts';
|
|
13
|
+
|
|
14
|
+
export interface NavMainItem {
|
|
15
|
+
title: string;
|
|
16
|
+
url: string;
|
|
17
|
+
icon: (cls?: string) => TemplateResult;
|
|
18
|
+
isActive?: boolean;
|
|
19
|
+
badge?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function navMain({ items }: { items: NavMainItem[] }) {
|
|
23
|
+
return html`
|
|
24
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
25
|
+
${items.map((item) => html`
|
|
26
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
27
|
+
<a href=${item.url} data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" data-active=${item.isActive ? 'true' : 'false'} aria-current=${item.isActive ? 'page' : nothing} class=${sidebarMenuButtonClass()}>
|
|
28
|
+
${item.icon()}
|
|
29
|
+
<span>${item.title}</span>
|
|
30
|
+
</a>
|
|
31
|
+
</li>
|
|
32
|
+
`)}
|
|
33
|
+
</ul>
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-15 secondary nav: calendar, settings, templates, trash and
|
|
3
|
+
* help at the foot of the left sidebar, each with an optional badge. A
|
|
4
|
+
* fragment helper. Ported from shadcn/ui's sidebar-15.
|
|
5
|
+
*/
|
|
6
|
+
import { html } from '@webjsdev/core';
|
|
7
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
8
|
+
import { cn } from '../../../lib/utils.ts';
|
|
9
|
+
import {
|
|
10
|
+
sidebarGroupClass,
|
|
11
|
+
sidebarGroupContentClass,
|
|
12
|
+
sidebarMenuBadgeClass,
|
|
13
|
+
sidebarMenuButtonClass,
|
|
14
|
+
sidebarMenuClass,
|
|
15
|
+
sidebarMenuItemClass,
|
|
16
|
+
} from '../../../components/sidebar.ts';
|
|
17
|
+
|
|
18
|
+
export interface NavSecondaryItem {
|
|
19
|
+
title: string;
|
|
20
|
+
url: string;
|
|
21
|
+
icon: (cls?: string) => TemplateResult;
|
|
22
|
+
badge?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function navSecondary({ items, class: className }: { items: NavSecondaryItem[]; class?: string }) {
|
|
26
|
+
return html`
|
|
27
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${cn(sidebarGroupClass(), className)}>
|
|
28
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${sidebarGroupContentClass()}>
|
|
29
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
30
|
+
${items.map((item) => html`
|
|
31
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
32
|
+
<a href=${item.url} data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${sidebarMenuButtonClass()}>
|
|
33
|
+
${item.icon()}
|
|
34
|
+
<span>${item.title}</span>
|
|
35
|
+
</a>
|
|
36
|
+
${item.badge ? html`<div data-slot="sidebar-menu-badge" data-sidebar="menu-badge" class=${sidebarMenuBadgeClass()}>${item.badge}</div>` : ''}
|
|
37
|
+
</li>
|
|
38
|
+
`)}
|
|
39
|
+
</ul>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-15 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-15.
|
|
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="start">
|
|
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,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-15 workspaces list: one link per workspace with two hover
|
|
3
|
+
* actions, a toggle over its emoji that opens its pages in a submenu and a
|
|
4
|
+
* "+" to add a page, and a trailing "More" item. A fragment helper; each
|
|
5
|
+
* toggle is the `<summary>` of a native `<details>`, so the submenus open and
|
|
6
|
+
* close with no JavaScript. Ported from shadcn/ui's sidebar-15.
|
|
7
|
+
*/
|
|
8
|
+
import { html } from '@webjsdev/core';
|
|
9
|
+
import { cn } from '../../../lib/utils.ts';
|
|
10
|
+
import { collapsibleClass, collapsibleContentClass } from '../../../components/collapsible.ts';
|
|
11
|
+
import {
|
|
12
|
+
sidebarGroupClass,
|
|
13
|
+
sidebarGroupContentClass,
|
|
14
|
+
sidebarGroupLabelClass,
|
|
15
|
+
sidebarMenuActionClass,
|
|
16
|
+
sidebarMenuButtonClass,
|
|
17
|
+
sidebarMenuClass,
|
|
18
|
+
sidebarMenuItemClass,
|
|
19
|
+
sidebarMenuSubButtonClass,
|
|
20
|
+
sidebarMenuSubClass,
|
|
21
|
+
sidebarMenuSubItemClass,
|
|
22
|
+
} from '../../../components/sidebar.ts';
|
|
23
|
+
import { ChevronRightIcon, MoreHorizontalIcon, PlusIcon } from '../../../lib/icons.ts';
|
|
24
|
+
|
|
25
|
+
export interface Workspace {
|
|
26
|
+
name: string;
|
|
27
|
+
emoji: string;
|
|
28
|
+
pages: { name: string; url: string; emoji: string }[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function navWorkspaces({ workspaces }: { workspaces: Workspace[] }) {
|
|
32
|
+
return html`
|
|
33
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${sidebarGroupClass()}>
|
|
34
|
+
<div data-slot="sidebar-group-label" data-sidebar="group-label" class=${sidebarGroupLabelClass()}>Workspaces</div>
|
|
35
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${sidebarGroupContentClass()}>
|
|
36
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
37
|
+
${workspaces.map((workspace) => html`
|
|
38
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
39
|
+
<a href="#" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${sidebarMenuButtonClass()}>
|
|
40
|
+
<span>${workspace.emoji}</span>
|
|
41
|
+
<span>${workspace.name}</span>
|
|
42
|
+
</a>
|
|
43
|
+
<button type="button" data-slot="sidebar-menu-action" data-sidebar="menu-action" aria-label=${`Add a page to ${workspace.name}`} class=${sidebarMenuActionClass({ showOnHover: true })}>
|
|
44
|
+
${PlusIcon()}
|
|
45
|
+
</button>
|
|
46
|
+
<details data-slot="collapsible" class=${cn(collapsibleClass(), 'group/collapsible')}>
|
|
47
|
+
<summary data-slot="sidebar-menu-action" data-sidebar="menu-action" aria-label=${`Show the pages of ${workspace.name}`} class=${cn(sidebarMenuActionClass({ showOnHover: true }), 'top-1.5 left-2 cursor-pointer list-none bg-sidebar-accent text-sidebar-accent-foreground group-open/collapsible:rotate-90 group-open/collapsible:opacity-100 [&::-webkit-details-marker]:hidden')}>
|
|
48
|
+
${ChevronRightIcon()}
|
|
49
|
+
</summary>
|
|
50
|
+
<div data-slot="collapsible-content" class=${collapsibleContentClass()}>
|
|
51
|
+
<ul data-slot="sidebar-menu-sub" data-sidebar="menu-sub" class=${sidebarMenuSubClass()}>
|
|
52
|
+
${workspace.pages.map((page) => html`
|
|
53
|
+
<li data-slot="sidebar-menu-sub-item" data-sidebar="menu-sub-item" class=${sidebarMenuSubItemClass()}>
|
|
54
|
+
<a href=${page.url} data-slot="sidebar-menu-sub-button" data-sidebar="menu-sub-button" data-size="md" class=${sidebarMenuSubButtonClass()}>
|
|
55
|
+
<span>${page.emoji}</span>
|
|
56
|
+
<span>${page.name}</span>
|
|
57
|
+
</a>
|
|
58
|
+
</li>
|
|
59
|
+
`)}
|
|
60
|
+
</ul>
|
|
61
|
+
</div>
|
|
62
|
+
</details>
|
|
63
|
+
</li>
|
|
64
|
+
`)}
|
|
65
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
66
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${cn(sidebarMenuButtonClass(), 'text-sidebar-foreground/70')}>
|
|
67
|
+
${MoreHorizontalIcon()}
|
|
68
|
+
<span>More</span>
|
|
69
|
+
</button>
|
|
70
|
+
</li>
|
|
71
|
+
</ul>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-15 left sidebar: the team switcher and main nav in the header,
|
|
3
|
+
* then the favorites, the workspaces and a secondary nav. A fragment helper,
|
|
4
|
+
* so the markup is rendered by the server; the sidebar, its rail and the
|
|
5
|
+
* menus are the kit's elements. Ported from shadcn/ui's sidebar-15.
|
|
6
|
+
*
|
|
7
|
+
* The data below is sample data. Replace it with your own, and point each
|
|
8
|
+
* `url` at a real route.
|
|
9
|
+
*/
|
|
10
|
+
import { html } from '@webjsdev/core';
|
|
11
|
+
import {
|
|
12
|
+
sidebarContentClass,
|
|
13
|
+
sidebarHeaderClass,
|
|
14
|
+
} from '../../../components/sidebar.ts';
|
|
15
|
+
import { navFavorites, type Favorite } from './nav-favorites.ts';
|
|
16
|
+
import { navMain, type NavMainItem } from './nav-main.ts';
|
|
17
|
+
import { navSecondary, type NavSecondaryItem } from './nav-secondary.ts';
|
|
18
|
+
import { navWorkspaces, type Workspace } from './nav-workspaces.ts';
|
|
19
|
+
import { teamSwitcher, type Team } from './team-switcher.ts';
|
|
20
|
+
import { AudioLinesIcon, BlocksIcon, CalendarIcon, HomeIcon, InboxIcon, MessageCircleQuestionIcon, SearchIcon, Settings2Icon, SparklesIcon, TerminalIcon, Trash2Icon } from '../../../lib/icons.ts';
|
|
21
|
+
|
|
22
|
+
// This is sample data.
|
|
23
|
+
const data: {
|
|
24
|
+
teams: Team[];
|
|
25
|
+
navMain: NavMainItem[];
|
|
26
|
+
navSecondary: NavSecondaryItem[];
|
|
27
|
+
favorites: Favorite[];
|
|
28
|
+
workspaces: Workspace[];
|
|
29
|
+
} = {
|
|
30
|
+
teams: [
|
|
31
|
+
{ name: 'Acme Inc', logo: TerminalIcon, plan: 'Enterprise' },
|
|
32
|
+
{ name: 'Acme Corp.', logo: AudioLinesIcon, plan: 'Startup' },
|
|
33
|
+
{ name: 'Evil Corp.', logo: TerminalIcon, plan: 'Free' },
|
|
34
|
+
],
|
|
35
|
+
navMain: [
|
|
36
|
+
{ title: 'Search', url: '#', icon: SearchIcon },
|
|
37
|
+
{ title: 'Ask AI', url: '#', icon: SparklesIcon },
|
|
38
|
+
{ title: 'Home', url: '#', icon: HomeIcon, isActive: true },
|
|
39
|
+
{ title: 'Inbox', url: '#', icon: InboxIcon, badge: '10' },
|
|
40
|
+
],
|
|
41
|
+
navSecondary: [
|
|
42
|
+
{ title: 'Calendar', url: '#', icon: CalendarIcon },
|
|
43
|
+
{ title: 'Settings', url: '#', icon: Settings2Icon },
|
|
44
|
+
{ title: 'Templates', url: '#', icon: BlocksIcon },
|
|
45
|
+
{ title: 'Trash', url: '#', icon: Trash2Icon },
|
|
46
|
+
{ title: 'Help', url: '#', icon: MessageCircleQuestionIcon },
|
|
47
|
+
],
|
|
48
|
+
favorites: [
|
|
49
|
+
{ name: 'Project Management & Task Tracking', url: '#', emoji: '📊' },
|
|
50
|
+
{ name: 'Family Recipe Collection & Meal Planning', url: '#', emoji: '🍳' },
|
|
51
|
+
{ name: 'Fitness Tracker & Workout Routines', url: '#', emoji: '💪' },
|
|
52
|
+
{ name: 'Book Notes & Reading List', url: '#', emoji: '📚' },
|
|
53
|
+
{ name: 'Sustainable Gardening Tips & Plant Care', url: '#', emoji: '🌱' },
|
|
54
|
+
{ name: 'Language Learning Progress & Resources', url: '#', emoji: '🗣️' },
|
|
55
|
+
{ name: 'Home Renovation Ideas & Budget Tracker', url: '#', emoji: '🏠' },
|
|
56
|
+
{ name: 'Personal Finance & Investment Portfolio', url: '#', emoji: '💰' },
|
|
57
|
+
{ name: 'Movie & TV Show Watchlist with Reviews', url: '#', emoji: '🎬' },
|
|
58
|
+
{ name: 'Daily Habit Tracker & Goal Setting', url: '#', emoji: '✅' },
|
|
59
|
+
],
|
|
60
|
+
workspaces: [
|
|
61
|
+
{
|
|
62
|
+
name: 'Personal Life Management',
|
|
63
|
+
emoji: '🏠',
|
|
64
|
+
pages: [
|
|
65
|
+
{ name: 'Daily Journal & Reflection', url: '#', emoji: '📔' },
|
|
66
|
+
{ name: 'Health & Wellness Tracker', url: '#', emoji: '🍏' },
|
|
67
|
+
{ name: 'Personal Growth & Learning Goals', url: '#', emoji: '🌟' },
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Professional Development',
|
|
72
|
+
emoji: '💼',
|
|
73
|
+
pages: [
|
|
74
|
+
{ name: 'Career Objectives & Milestones', url: '#', emoji: '🎯' },
|
|
75
|
+
{ name: 'Skill Acquisition & Training Log', url: '#', emoji: '🧠' },
|
|
76
|
+
{ name: 'Networking Contacts & Events', url: '#', emoji: '🤝' },
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Creative Projects',
|
|
81
|
+
emoji: '🎨',
|
|
82
|
+
pages: [
|
|
83
|
+
{ name: 'Writing Ideas & Story Outlines', url: '#', emoji: '✍️' },
|
|
84
|
+
{ name: 'Art & Design Portfolio', url: '#', emoji: '🖼️' },
|
|
85
|
+
{ name: 'Music Composition & Practice Log', url: '#', emoji: '🎵' },
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'Home Management',
|
|
90
|
+
emoji: '🏡',
|
|
91
|
+
pages: [
|
|
92
|
+
{ name: 'Household Budget & Expense Tracking', url: '#', emoji: '💰' },
|
|
93
|
+
{ name: 'Home Maintenance Schedule & Tasks', url: '#', emoji: '🔧' },
|
|
94
|
+
{ name: 'Family Calendar & Event Planning', url: '#', emoji: '📅' },
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'Travel & Adventure',
|
|
99
|
+
emoji: '🧳',
|
|
100
|
+
pages: [
|
|
101
|
+
{ name: 'Trip Planning & Itineraries', url: '#', emoji: '🗺️' },
|
|
102
|
+
{ name: 'Travel Bucket List & Inspiration', url: '#', emoji: '🌎' },
|
|
103
|
+
{ name: 'Travel Journal & Photo Gallery', url: '#', emoji: '📸' },
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export function sidebarLeft() {
|
|
110
|
+
// shadcn's className lands on the sidebar's fixed container, which the
|
|
111
|
+
// kit's <ui-sidebar> renders as its data-slot="sidebar-container" child.
|
|
112
|
+
return html`
|
|
113
|
+
<ui-sidebar class="[&>[data-slot=sidebar-container]]:border-r-0">
|
|
114
|
+
<div data-slot="sidebar-header" data-sidebar="header" class=${sidebarHeaderClass()}>
|
|
115
|
+
${teamSwitcher({ teams: data.teams })}
|
|
116
|
+
${navMain({ items: data.navMain })}
|
|
117
|
+
</div>
|
|
118
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
119
|
+
${navFavorites({ favorites: data.favorites })}
|
|
120
|
+
${navWorkspaces({ workspaces: data.workspaces })}
|
|
121
|
+
${navSecondary({ items: data.navSecondary, class: 'mt-auto' })}
|
|
122
|
+
</div>
|
|
123
|
+
<ui-sidebar-rail></ui-sidebar-rail>
|
|
124
|
+
</ui-sidebar>
|
|
125
|
+
`;
|
|
126
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-15 right sidebar: the signed-in user, a calendar, the list of
|
|
3
|
+
* calendars and a "New Calendar" button, in a sidebar that does not collapse
|
|
4
|
+
* and shows from the large breakpoint up. A fragment helper, so the markup is
|
|
5
|
+
* rendered by the server. Ported from shadcn/ui's sidebar-15.
|
|
6
|
+
*
|
|
7
|
+
* The data below is sample data. Replace it with your own.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import { cn } from '../../../lib/utils.ts';
|
|
11
|
+
import {
|
|
12
|
+
sidebarContentClass,
|
|
13
|
+
sidebarFooterClass,
|
|
14
|
+
sidebarHeaderClass,
|
|
15
|
+
sidebarMenuButtonClass,
|
|
16
|
+
sidebarMenuClass,
|
|
17
|
+
sidebarMenuItemClass,
|
|
18
|
+
sidebarSeparatorClass,
|
|
19
|
+
} from '../../../components/sidebar.ts';
|
|
20
|
+
import { calendars } from './calendars.ts';
|
|
21
|
+
import { datePicker } from './date-picker.ts';
|
|
22
|
+
import { navUser } from './nav-user.ts';
|
|
23
|
+
import { PlusIcon } from '../../../lib/icons.ts';
|
|
24
|
+
|
|
25
|
+
// This is sample data.
|
|
26
|
+
const data = {
|
|
27
|
+
user: {
|
|
28
|
+
name: 'vivek',
|
|
29
|
+
email: 'vivek@example.com',
|
|
30
|
+
avatar: 'https://webjs.dev/avatars/vivek.jpg',
|
|
31
|
+
},
|
|
32
|
+
calendars: [
|
|
33
|
+
{ name: 'My Calendars', items: ['Personal', 'Work', 'Family'] },
|
|
34
|
+
{ name: 'Favorites', items: ['Holidays', 'Birthdays'] },
|
|
35
|
+
{ name: 'Other', items: ['Travel', 'Reminders', 'Deadlines'] },
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export function sidebarRight() {
|
|
40
|
+
return html`
|
|
41
|
+
<ui-sidebar collapsible="none" class="sticky top-0 hidden h-svh border-l lg:flex">
|
|
42
|
+
<div data-slot="sidebar-header" data-sidebar="header" class=${cn(sidebarHeaderClass(), 'h-16 border-b border-sidebar-border')}>
|
|
43
|
+
${navUser({ user: data.user })}
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
46
|
+
${datePicker()}
|
|
47
|
+
<div role="none" data-slot="sidebar-separator" data-sidebar="separator" data-orientation="horizontal" class=${cn(sidebarSeparatorClass(), 'mx-0')}></div>
|
|
48
|
+
${calendars({ calendars: data.calendars })}
|
|
49
|
+
</div>
|
|
50
|
+
<div data-slot="sidebar-footer" data-sidebar="footer" class=${sidebarFooterClass()}>
|
|
51
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
52
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
53
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${sidebarMenuButtonClass()}>
|
|
54
|
+
${PlusIcon()}
|
|
55
|
+
<span>New Calendar</span>
|
|
56
|
+
</button>
|
|
57
|
+
</li>
|
|
58
|
+
</ul>
|
|
59
|
+
</div>
|
|
60
|
+
</ui-sidebar>
|
|
61
|
+
`;
|
|
62
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-15 team switcher: a compact button with the active team's logo
|
|
3
|
+
* and name, opening a menu of the teams. A fragment helper; the menu is the
|
|
4
|
+
* kit's `<ui-dropdown-menu>`. Ported from shadcn/ui's sidebar-15.
|
|
5
|
+
*
|
|
6
|
+
* It renders the first team as the active one. shadcn keeps the choice in
|
|
7
|
+
* React state; in your app the active team is server data (a session value or
|
|
8
|
+
* a route segment), so render the right one on the server and make each item
|
|
9
|
+
* a link or a form that switches it.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
13
|
+
import { cn } from '../../../lib/utils.ts';
|
|
14
|
+
import '../../../components/dropdown-menu.ts';
|
|
15
|
+
import {
|
|
16
|
+
sidebarMenuButtonClass,
|
|
17
|
+
sidebarMenuClass,
|
|
18
|
+
sidebarMenuItemClass,
|
|
19
|
+
} from '../../../components/sidebar.ts';
|
|
20
|
+
import { ChevronDownIcon, PlusIcon } from '../../../lib/icons.ts';
|
|
21
|
+
|
|
22
|
+
export interface Team {
|
|
23
|
+
name: string;
|
|
24
|
+
logo: (cls?: string) => TemplateResult;
|
|
25
|
+
plan: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function teamSwitcher({ teams }: { teams: Team[] }) {
|
|
29
|
+
const active = teams[0];
|
|
30
|
+
if (!active) return '';
|
|
31
|
+
return html`
|
|
32
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
33
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
34
|
+
<ui-dropdown-menu>
|
|
35
|
+
<ui-dropdown-menu-trigger>
|
|
36
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${cn(sidebarMenuButtonClass(), 'w-fit px-1.5')}>
|
|
37
|
+
<div class="flex aspect-square size-5 items-center justify-center rounded-md bg-sidebar-primary text-sidebar-primary-foreground">
|
|
38
|
+
${active.logo()}
|
|
39
|
+
</div>
|
|
40
|
+
<span class="truncate font-medium">${active.name}</span>
|
|
41
|
+
${ChevronDownIcon('opacity-50')}
|
|
42
|
+
</button>
|
|
43
|
+
</ui-dropdown-menu-trigger>
|
|
44
|
+
<ui-dropdown-menu-content class="w-64 rounded-lg" side="bottom" align="start">
|
|
45
|
+
<ui-dropdown-menu-label class="text-xs text-muted-foreground">Teams</ui-dropdown-menu-label>
|
|
46
|
+
${teams.map((team, index) => html`
|
|
47
|
+
<ui-dropdown-menu-item class="gap-2 p-2">
|
|
48
|
+
<div class="flex size-6 items-center justify-center rounded-xs border">${team.logo()}</div>
|
|
49
|
+
${team.name}
|
|
50
|
+
<ui-dropdown-menu-shortcut>⌘${index + 1}</ui-dropdown-menu-shortcut>
|
|
51
|
+
</ui-dropdown-menu-item>
|
|
52
|
+
`)}
|
|
53
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
54
|
+
<ui-dropdown-menu-item class="gap-2 p-2">
|
|
55
|
+
<div class="flex size-6 items-center justify-center rounded-md border bg-background">${PlusIcon('size-4')}</div>
|
|
56
|
+
<div class="font-medium text-muted-foreground">Add team</div>
|
|
57
|
+
</ui-dropdown-menu-item>
|
|
58
|
+
</ui-dropdown-menu-content>
|
|
59
|
+
</ui-dropdown-menu>
|
|
60
|
+
</li>
|
|
61
|
+
</ul>
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-15 block's page: a collapsible sidebar on the left and a
|
|
3
|
+
* calendar sidebar on the right, around a sticky header and a document-like
|
|
4
|
+
* content column.
|
|
5
|
+
*
|
|
6
|
+
* Installed by `npx @webjsdev/ui add sidebar-15` at `app/dashboard/page.ts`.
|
|
7
|
+
* It is app code you own, so edit it freely. Ported from shadcn/ui's
|
|
8
|
+
* sidebar-15.
|
|
9
|
+
*/
|
|
10
|
+
import { html } from '@webjsdev/core';
|
|
11
|
+
import type { Metadata } from '@webjsdev/core';
|
|
12
|
+
import { cn } from '../../lib/utils.ts';
|
|
13
|
+
import { breadcrumbItemClass, breadcrumbListClass, breadcrumbPageClass } from '../../components/breadcrumb.ts';
|
|
14
|
+
import { separatorClass } from '../../components/separator.ts';
|
|
15
|
+
import '../../components/sidebar.ts';
|
|
16
|
+
import { sidebarLeft } from './components/sidebar-left.ts';
|
|
17
|
+
import { sidebarRight } from './components/sidebar-right.ts';
|
|
18
|
+
|
|
19
|
+
export const metadata: Metadata = { title: 'Dashboard' };
|
|
20
|
+
|
|
21
|
+
export default function DashboardPage() {
|
|
22
|
+
return html`
|
|
23
|
+
<ui-sidebar-provider>
|
|
24
|
+
${sidebarLeft()}
|
|
25
|
+
<ui-sidebar-inset>
|
|
26
|
+
<header class="sticky top-0 flex h-14 shrink-0 items-center gap-2 bg-background">
|
|
27
|
+
<div class="flex flex-1 items-center gap-2 px-3">
|
|
28
|
+
<ui-sidebar-trigger></ui-sidebar-trigger>
|
|
29
|
+
<div role="none" data-slot="separator" data-orientation="vertical" class=${cn(separatorClass(), 'mr-2 data-vertical:h-4 data-vertical:self-auto')}></div>
|
|
30
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb">
|
|
31
|
+
<ol data-slot="breadcrumb-list" class=${breadcrumbListClass()}>
|
|
32
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
33
|
+
<span data-slot="breadcrumb-page" class=${cn(breadcrumbPageClass(), 'line-clamp-1')} aria-current="page">Project Management & Task Tracking</span>
|
|
34
|
+
</li>
|
|
35
|
+
</ol>
|
|
36
|
+
</nav>
|
|
37
|
+
</div>
|
|
38
|
+
</header>
|
|
39
|
+
<div class="flex flex-1 flex-col gap-4 p-4">
|
|
40
|
+
<div class="mx-auto h-24 w-full max-w-3xl rounded-xl bg-muted/50"></div>
|
|
41
|
+
<div class="mx-auto h-screen w-full max-w-3xl rounded-xl bg-muted/50"></div>
|
|
42
|
+
</div>
|
|
43
|
+
</ui-sidebar-inset>
|
|
44
|
+
${sidebarRight()}
|
|
45
|
+
</ui-sidebar-provider>
|
|
46
|
+
`;
|
|
47
|
+
}
|