@webjsdev/ui 0.3.16 → 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 +71 -10
- 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 +88 -0
- package/packages/registry/components/field.ts +165 -0
- 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 +66 -0
- 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 +4092 -60
- 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,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-10 page actions: the last-edited date, a favourite button and a
|
|
3
|
+
* "More" button opening a menu of page actions, laid out as a small sidebar
|
|
4
|
+
* in a popover. A fragment helper; the popover is the native Popover API, so
|
|
5
|
+
* it opens, light-dismisses and closes on Escape with no JavaScript. Ported
|
|
6
|
+
* from shadcn/ui's sidebar-10.
|
|
7
|
+
*
|
|
8
|
+
* shadcn opens the popover once the page has mounted. Here it starts closed,
|
|
9
|
+
* since a native popover cannot be open in server-rendered HTML. The actions
|
|
10
|
+
* are placeholders: make each one a link or a form posting to an action.
|
|
11
|
+
*/
|
|
12
|
+
import { html } from '@webjsdev/core';
|
|
13
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
14
|
+
import { cn } from '../../../lib/utils.ts';
|
|
15
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
16
|
+
import { popoverContentClass } from '../../../components/popover.ts';
|
|
17
|
+
import {
|
|
18
|
+
sidebarContentClass,
|
|
19
|
+
sidebarGroupClass,
|
|
20
|
+
sidebarGroupContentClass,
|
|
21
|
+
sidebarMenuButtonClass,
|
|
22
|
+
sidebarMenuClass,
|
|
23
|
+
sidebarMenuItemClass,
|
|
24
|
+
} from '../../../components/sidebar.ts';
|
|
25
|
+
import { ArrowDownIcon, ArrowUpIcon, BellIcon, ChartLineIcon, CopyIcon, CornerUpLeftIcon, CornerUpRightIcon, FileTextIcon, GalleryVerticalEndIcon, LinkIcon, MoreHorizontalIcon, Settings2Icon, StarIcon, Trash2Icon, TrashIcon } from '../../../lib/icons.ts';
|
|
26
|
+
|
|
27
|
+
const data: { label: string; icon: (cls?: string) => TemplateResult }[][] = [
|
|
28
|
+
[
|
|
29
|
+
{ label: 'Customize Page', icon: Settings2Icon },
|
|
30
|
+
{ label: 'Turn into wiki', icon: FileTextIcon },
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
{ label: 'Copy Link', icon: LinkIcon },
|
|
34
|
+
{ label: 'Duplicate', icon: CopyIcon },
|
|
35
|
+
{ label: 'Move to', icon: CornerUpRightIcon },
|
|
36
|
+
{ label: 'Move to Trash', icon: Trash2Icon },
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
{ label: 'Undo', icon: CornerUpLeftIcon },
|
|
40
|
+
{ label: 'View analytics', icon: ChartLineIcon },
|
|
41
|
+
{ label: 'Version History', icon: GalleryVerticalEndIcon },
|
|
42
|
+
{ label: 'Show delete pages', icon: TrashIcon },
|
|
43
|
+
{ label: 'Notifications', icon: BellIcon },
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
{ label: 'Import', icon: ArrowUpIcon },
|
|
47
|
+
{ label: 'Export', icon: ArrowDownIcon },
|
|
48
|
+
],
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
export function navActions() {
|
|
52
|
+
return html`
|
|
53
|
+
<div class="flex items-center gap-2 text-sm">
|
|
54
|
+
<div class="hidden font-medium text-muted-foreground md:inline-block">Edit Oct 08</div>
|
|
55
|
+
<button type="button" data-slot="button" aria-label="Add to favorites" class=${cn(buttonClass({ variant: 'ghost', size: 'icon' }), 'h-7 w-7')}>
|
|
56
|
+
${StarIcon()}
|
|
57
|
+
</button>
|
|
58
|
+
<button type="button" data-slot="button" popovertarget="nav-actions" aria-haspopup="dialog" aria-label="More actions" class=${cn(buttonClass({ variant: 'ghost', size: 'icon' }), 'h-7 w-7')}>
|
|
59
|
+
${MoreHorizontalIcon()}
|
|
60
|
+
</button>
|
|
61
|
+
<div id="nav-actions" popover role="dialog" aria-label="Page actions" data-slot="popover-content" class=${cn(popoverContentClass({ side: 'bottom', align: 'end' }), 'w-56 overflow-hidden rounded-lg p-0')}>
|
|
62
|
+
<ui-sidebar collapsible="none" class="bg-transparent">
|
|
63
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
64
|
+
${data.map((group) => html`
|
|
65
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${cn(sidebarGroupClass(), 'border-b last:border-none')}>
|
|
66
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${cn(sidebarGroupContentClass(), 'gap-0')}>
|
|
67
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
68
|
+
${group.map((item) => html`
|
|
69
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
70
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${sidebarMenuButtonClass()}>
|
|
71
|
+
${item.icon()} <span>${item.label}</span>
|
|
72
|
+
</button>
|
|
73
|
+
</li>
|
|
74
|
+
`)}
|
|
75
|
+
</ul>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
`)}
|
|
79
|
+
</div>
|
|
80
|
+
</ui-sidebar>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-10 favorites: one link per favourite page, each with a "More"
|
|
3
|
+
* menu that shows on hover, and a trailing "More" item. Hidden while the
|
|
4
|
+
* sidebar is collapsed to icons. A fragment helper; the menus are the kit's
|
|
5
|
+
* `<ui-dropdown-menu>`. Ported from shadcn/ui's sidebar-10.
|
|
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,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-10 main nav: search, the assistant, home and the inbox, as
|
|
3
|
+
* plain links. A fragment helper. Ported from shadcn/ui's sidebar-10.
|
|
4
|
+
*
|
|
5
|
+
* Mark the current page's link `data-active="true"` and `aria-current="page"`
|
|
6
|
+
* (the `isActive` field below does it for the sample).
|
|
7
|
+
*/
|
|
8
|
+
import { html } from '@webjsdev/core';
|
|
9
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
10
|
+
import {
|
|
11
|
+
sidebarMenuButtonClass,
|
|
12
|
+
sidebarMenuClass,
|
|
13
|
+
sidebarMenuItemClass,
|
|
14
|
+
} from '../../../components/sidebar.ts';
|
|
15
|
+
|
|
16
|
+
export interface NavMainItem {
|
|
17
|
+
title: string;
|
|
18
|
+
url: string;
|
|
19
|
+
icon: (cls?: string) => TemplateResult;
|
|
20
|
+
isActive?: boolean;
|
|
21
|
+
badge?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function navMain({ items }: { items: NavMainItem[] }) {
|
|
25
|
+
return html`
|
|
26
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
27
|
+
${items.map((item) => html`
|
|
28
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
29
|
+
<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' : null} class=${sidebarMenuButtonClass()}>
|
|
30
|
+
${item.icon()}
|
|
31
|
+
<span>${item.title}</span>
|
|
32
|
+
</a>
|
|
33
|
+
</li>
|
|
34
|
+
`)}
|
|
35
|
+
</ul>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-10 secondary nav: calendar, settings, templates, trash and
|
|
3
|
+
* help at the bottom of the sidebar, each an optional badge. A fragment
|
|
4
|
+
* helper. Ported from shadcn/ui's sidebar-10.
|
|
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: cls }: { items: NavSecondaryItem[]; class?: string }) {
|
|
26
|
+
return html`
|
|
27
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${cn(sidebarGroupClass(), cls)}>
|
|
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,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-10 workspaces: one link per workspace with a chevron that
|
|
3
|
+
* shows its pages and a "+" to add one, both showing on hover, and a
|
|
4
|
+
* trailing "More" item. A fragment helper; each workspace is a native
|
|
5
|
+
* `<details>` whose `<summary>` is the chevron, so its pages open and close
|
|
6
|
+
* with no JavaScript. Ported from shadcn/ui's sidebar-10.
|
|
7
|
+
*
|
|
8
|
+
* The "+" button is a placeholder: make it a link or a form posting to the
|
|
9
|
+
* action that creates a page.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import { cn } from '../../../lib/utils.ts';
|
|
13
|
+
import { collapsibleClass, collapsibleContentClass } from '../../../components/collapsible.ts';
|
|
14
|
+
import {
|
|
15
|
+
sidebarGroupClass,
|
|
16
|
+
sidebarGroupContentClass,
|
|
17
|
+
sidebarGroupLabelClass,
|
|
18
|
+
sidebarMenuActionClass,
|
|
19
|
+
sidebarMenuButtonClass,
|
|
20
|
+
sidebarMenuClass,
|
|
21
|
+
sidebarMenuItemClass,
|
|
22
|
+
sidebarMenuSubButtonClass,
|
|
23
|
+
sidebarMenuSubClass,
|
|
24
|
+
sidebarMenuSubItemClass,
|
|
25
|
+
} from '../../../components/sidebar.ts';
|
|
26
|
+
import { ChevronRightIcon, MoreHorizontalIcon, PlusIcon } from '../../../lib/icons.ts';
|
|
27
|
+
|
|
28
|
+
export interface Workspace {
|
|
29
|
+
name: string;
|
|
30
|
+
emoji: string;
|
|
31
|
+
pages: { name: string; url: string; emoji: string }[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function navWorkspaces({ workspaces }: { workspaces: Workspace[] }) {
|
|
35
|
+
return html`
|
|
36
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${sidebarGroupClass()}>
|
|
37
|
+
<div data-slot="sidebar-group-label" data-sidebar="group-label" class=${sidebarGroupLabelClass()}>Workspaces</div>
|
|
38
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${sidebarGroupContentClass()}>
|
|
39
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
40
|
+
${workspaces.map((workspace) => html`
|
|
41
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
42
|
+
<a href="#" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${sidebarMenuButtonClass()}>
|
|
43
|
+
<span>${workspace.emoji}</span>
|
|
44
|
+
<span>${workspace.name}</span>
|
|
45
|
+
</a>
|
|
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 in ${workspace.name}`} class=${cn(sidebarMenuActionClass({ showOnHover: true }), 'top-1.5 left-2 h-5 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
|
+
<button type="button" data-slot="sidebar-menu-action" data-sidebar="menu-action" aria-label=${`Add a page to ${workspace.name}`} class=${sidebarMenuActionClass({ showOnHover: true })}>
|
|
64
|
+
${PlusIcon()}
|
|
65
|
+
</button>
|
|
66
|
+
</li>
|
|
67
|
+
`)}
|
|
68
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
69
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${cn(sidebarMenuButtonClass(), 'text-sidebar-foreground/70')}>
|
|
70
|
+
${MoreHorizontalIcon()}
|
|
71
|
+
<span>More</span>
|
|
72
|
+
</button>
|
|
73
|
+
</li>
|
|
74
|
+
</ul>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-10 team switcher: a compact button with the active team's logo
|
|
3
|
+
* and name, opening a menu of the teams below it. A fragment helper; the menu
|
|
4
|
+
* is the kit's `<ui-dropdown-menu>`. Ported from shadcn/ui's sidebar-10.
|
|
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,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-10 block's page: a notes-app sidebar beside a header with the
|
|
3
|
+
* page title and its actions menu, over a placeholder document.
|
|
4
|
+
*
|
|
5
|
+
* Installed by `npx @webjsdev/ui add sidebar-10` at `app/dashboard/page.ts`.
|
|
6
|
+
* It is app code you own, so edit it freely. Ported from shadcn/ui's
|
|
7
|
+
* sidebar-10.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import type { Metadata } from '@webjsdev/core';
|
|
11
|
+
import { cn } from '../../lib/utils.ts';
|
|
12
|
+
import { breadcrumbItemClass, breadcrumbListClass, breadcrumbPageClass } from '../../components/breadcrumb.ts';
|
|
13
|
+
import { separatorClass } from '../../components/separator.ts';
|
|
14
|
+
import '../../components/sidebar.ts';
|
|
15
|
+
import { appSidebar } from './components/app-sidebar.ts';
|
|
16
|
+
import { navActions } from './components/nav-actions.ts';
|
|
17
|
+
|
|
18
|
+
export const metadata: Metadata = { title: 'Project Management & Task Tracking' };
|
|
19
|
+
|
|
20
|
+
export default function DashboardPage() {
|
|
21
|
+
return html`
|
|
22
|
+
<ui-sidebar-provider>
|
|
23
|
+
${appSidebar()}
|
|
24
|
+
<ui-sidebar-inset>
|
|
25
|
+
<header class="flex h-14 shrink-0 items-center gap-2">
|
|
26
|
+
<div class="flex flex-1 items-center gap-2 px-3">
|
|
27
|
+
<ui-sidebar-trigger></ui-sidebar-trigger>
|
|
28
|
+
<div role="none" data-slot="separator" data-orientation="vertical" class=${cn(separatorClass(), 'mr-2 data-vertical:h-4 data-vertical:self-auto')}></div>
|
|
29
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb">
|
|
30
|
+
<ol data-slot="breadcrumb-list" class=${breadcrumbListClass()}>
|
|
31
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
32
|
+
<span data-slot="breadcrumb-page" class=${cn(breadcrumbPageClass(), 'line-clamp-1')} aria-current="page">Project Management & Task Tracking</span>
|
|
33
|
+
</li>
|
|
34
|
+
</ol>
|
|
35
|
+
</nav>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="ml-auto px-3">${navActions()}</div>
|
|
38
|
+
</header>
|
|
39
|
+
<div class="flex flex-1 flex-col gap-4 px-4 py-10">
|
|
40
|
+
<div class="mx-auto h-24 w-full max-w-3xl rounded-xl bg-muted/50"></div>
|
|
41
|
+
<div class="mx-auto h-full w-full max-w-3xl rounded-xl bg-muted/50"></div>
|
|
42
|
+
</div>
|
|
43
|
+
</ui-sidebar-inset>
|
|
44
|
+
</ui-sidebar-provider>
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-11 app sidebar: a list of changed files with their git state,
|
|
3
|
+
* and the project's files as a collapsible tree. A fragment helper, so the
|
|
4
|
+
* markup is rendered by the server; each folder is a native `<details>`, so
|
|
5
|
+
* the tree opens and closes with no JavaScript. Ported from shadcn/ui's
|
|
6
|
+
* sidebar-11.
|
|
7
|
+
*
|
|
8
|
+
* The data below is sample data. Replace it with your own, and make each
|
|
9
|
+
* file a link to where it opens.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import { cn } from '../../../lib/utils.ts';
|
|
13
|
+
import { collapsibleClass, collapsibleContentClass } from '../../../components/collapsible.ts';
|
|
14
|
+
import {
|
|
15
|
+
sidebarContentClass,
|
|
16
|
+
sidebarGroupClass,
|
|
17
|
+
sidebarGroupContentClass,
|
|
18
|
+
sidebarGroupLabelClass,
|
|
19
|
+
sidebarMenuBadgeClass,
|
|
20
|
+
sidebarMenuButtonClass,
|
|
21
|
+
sidebarMenuClass,
|
|
22
|
+
sidebarMenuItemClass,
|
|
23
|
+
sidebarMenuSubClass,
|
|
24
|
+
} from '../../../components/sidebar.ts';
|
|
25
|
+
import { ChevronRightIcon, FileIcon, FolderIcon } from '../../../lib/icons.ts';
|
|
26
|
+
|
|
27
|
+
/** A file name, or a folder as `[name, ...children]`. */
|
|
28
|
+
type TreeItem = string | TreeItem[];
|
|
29
|
+
|
|
30
|
+
// This is sample data.
|
|
31
|
+
const data: { changes: { file: string; state: string }[]; tree: TreeItem[] } = {
|
|
32
|
+
changes: [
|
|
33
|
+
{ file: 'README.md', state: 'M' },
|
|
34
|
+
{ file: 'api/hello/route.ts', state: 'U' },
|
|
35
|
+
{ file: 'app/layout.tsx', state: 'M' },
|
|
36
|
+
],
|
|
37
|
+
tree: [
|
|
38
|
+
['app', ['api', ['hello', ['route.ts']], 'page.tsx', 'layout.tsx', ['blog', ['page.tsx']]]],
|
|
39
|
+
['components', ['ui', 'button.tsx', 'card.tsx'], 'header.tsx', 'footer.tsx'],
|
|
40
|
+
['lib', ['util.ts']],
|
|
41
|
+
['public', 'favicon.ico', 'vercel.svg'],
|
|
42
|
+
'.eslintrc.json',
|
|
43
|
+
'.gitignore',
|
|
44
|
+
'next.config.js',
|
|
45
|
+
'tailwind.config.js',
|
|
46
|
+
'package.json',
|
|
47
|
+
'README.md',
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
function tree(item: TreeItem): unknown {
|
|
52
|
+
const [name, ...items] = Array.isArray(item) ? item : [item];
|
|
53
|
+
if (!items.length) {
|
|
54
|
+
const active = name === 'button.tsx';
|
|
55
|
+
return html`
|
|
56
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
57
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" data-active=${active ? 'true' : 'false'} class=${cn(sidebarMenuButtonClass(), 'data-[active=true]:bg-transparent')}>
|
|
58
|
+
${FileIcon()}
|
|
59
|
+
${name}
|
|
60
|
+
</button>
|
|
61
|
+
</li>
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
64
|
+
return html`
|
|
65
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
66
|
+
<details data-slot="collapsible" class=${cn(collapsibleClass(), 'group/collapsible [&[open]>summary>svg:first-child]:rotate-90')} ?open=${name === 'components' || name === 'ui'}>
|
|
67
|
+
<summary data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${cn(sidebarMenuButtonClass(), 'cursor-pointer list-none [&::-webkit-details-marker]:hidden')}>
|
|
68
|
+
${ChevronRightIcon('transition-transform')}
|
|
69
|
+
${FolderIcon()}
|
|
70
|
+
${name}
|
|
71
|
+
</summary>
|
|
72
|
+
<div data-slot="collapsible-content" class=${collapsibleContentClass()}>
|
|
73
|
+
<ul data-slot="sidebar-menu-sub" data-sidebar="menu-sub" class=${sidebarMenuSubClass()}>
|
|
74
|
+
${items.map((sub) => tree(sub))}
|
|
75
|
+
</ul>
|
|
76
|
+
</div>
|
|
77
|
+
</details>
|
|
78
|
+
</li>
|
|
79
|
+
`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function appSidebar() {
|
|
83
|
+
return html`
|
|
84
|
+
<ui-sidebar>
|
|
85
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
86
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${sidebarGroupClass()}>
|
|
87
|
+
<div data-slot="sidebar-group-label" data-sidebar="group-label" class=${sidebarGroupLabelClass()}>Changes</div>
|
|
88
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${sidebarGroupContentClass()}>
|
|
89
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
90
|
+
${data.changes.map((item) => html`
|
|
91
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
92
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${sidebarMenuButtonClass()}>
|
|
93
|
+
${FileIcon()}
|
|
94
|
+
${item.file}
|
|
95
|
+
</button>
|
|
96
|
+
<div data-slot="sidebar-menu-badge" data-sidebar="menu-badge" class=${sidebarMenuBadgeClass()}>${item.state}</div>
|
|
97
|
+
</li>
|
|
98
|
+
`)}
|
|
99
|
+
</ul>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${sidebarGroupClass()}>
|
|
103
|
+
<div data-slot="sidebar-group-label" data-sidebar="group-label" class=${sidebarGroupLabelClass()}>Files</div>
|
|
104
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${sidebarGroupContentClass()}>
|
|
105
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
106
|
+
${data.tree.map((item) => tree(item))}
|
|
107
|
+
</ul>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<ui-sidebar-rail></ui-sidebar-rail>
|
|
112
|
+
</ui-sidebar>
|
|
113
|
+
`;
|
|
114
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-11 block's page: a sidebar with a collapsible file tree,
|
|
3
|
+
* beside a header with the open file's path and a placeholder content grid.
|
|
4
|
+
*
|
|
5
|
+
* Installed by `npx @webjsdev/ui add sidebar-11` at `app/dashboard/page.ts`.
|
|
6
|
+
* It is app code you own, so edit it freely. Ported from shadcn/ui's
|
|
7
|
+
* sidebar-11.
|
|
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
|
+
const separator = html`<li data-slot="breadcrumb-separator" role="presentation" aria-hidden="true" class=${cn(breadcrumbSeparatorClass(), 'hidden md:block')}>${ChevronRightIcon()}</li>`;
|
|
27
|
+
|
|
28
|
+
export default function DashboardPage() {
|
|
29
|
+
return html`
|
|
30
|
+
<ui-sidebar-provider>
|
|
31
|
+
${appSidebar()}
|
|
32
|
+
<ui-sidebar-inset>
|
|
33
|
+
<header class="flex h-16 shrink-0 items-center gap-2 border-b px-4">
|
|
34
|
+
<ui-sidebar-trigger class="-ml-1"></ui-sidebar-trigger>
|
|
35
|
+
<div role="none" data-slot="separator" data-orientation="vertical" class=${cn(separatorClass(), 'mr-2 data-vertical:h-4 data-vertical:self-auto')}></div>
|
|
36
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb">
|
|
37
|
+
<ol data-slot="breadcrumb-list" class=${breadcrumbListClass()}>
|
|
38
|
+
<li data-slot="breadcrumb-item" class=${cn(breadcrumbItemClass(), 'hidden md:block')}>
|
|
39
|
+
<a data-slot="breadcrumb-link" class=${breadcrumbLinkClass()} href="#">components</a>
|
|
40
|
+
</li>
|
|
41
|
+
${separator}
|
|
42
|
+
<li data-slot="breadcrumb-item" class=${cn(breadcrumbItemClass(), 'hidden md:block')}>
|
|
43
|
+
<a data-slot="breadcrumb-link" class=${breadcrumbLinkClass()} href="#">ui</a>
|
|
44
|
+
</li>
|
|
45
|
+
${separator}
|
|
46
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
47
|
+
<span data-slot="breadcrumb-page" class=${breadcrumbPageClass()} aria-current="page">button.tsx</span>
|
|
48
|
+
</li>
|
|
49
|
+
</ol>
|
|
50
|
+
</nav>
|
|
51
|
+
</header>
|
|
52
|
+
<div class="flex flex-1 flex-col gap-4 p-4">
|
|
53
|
+
<div class="grid auto-rows-min gap-4 md:grid-cols-3">
|
|
54
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
55
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
56
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="min-h-screen flex-1 rounded-xl bg-muted/50 md:min-h-min"></div>
|
|
59
|
+
</div>
|
|
60
|
+
</ui-sidebar-inset>
|
|
61
|
+
</ui-sidebar-provider>
|
|
62
|
+
`;
|
|
63
|
+
}
|