@webjsdev/ui 0.3.17 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -7
- package/THIRD_PARTY_NOTICES.md +349 -0
- package/package.json +4 -2
- package/packages/registry/blocks/_shared/placeholder.svg +1 -0
- package/packages/registry/blocks/charts/chart-area-axes.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-default.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-gradient.ts +82 -0
- package/packages/registry/blocks/charts/chart-area-icons.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-interactive.ts +204 -0
- package/packages/registry/blocks/charts/chart-area-legend.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-linear.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-stacked-expand.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-stacked.ts +71 -0
- package/packages/registry/blocks/charts/chart-area-step.ts +68 -0
- package/packages/registry/blocks/charts/chart-bar-active.ts +93 -0
- package/packages/registry/blocks/charts/chart-bar-default.ts +60 -0
- package/packages/registry/blocks/charts/chart-bar-horizontal.ts +62 -0
- package/packages/registry/blocks/charts/chart-bar-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-bar-label-custom.ts +78 -0
- package/packages/registry/blocks/charts/chart-bar-label.ts +66 -0
- package/packages/registry/blocks/charts/chart-bar-mixed.ts +87 -0
- package/packages/registry/blocks/charts/chart-bar-multiple.ts +67 -0
- package/packages/registry/blocks/charts/chart-bar-negative.ts +61 -0
- package/packages/registry/blocks/charts/chart-bar-stacked.ts +68 -0
- package/packages/registry/blocks/charts/chart-line-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-dots-colors.ts +86 -0
- package/packages/registry/blocks/charts/chart-line-dots-custom.ts +75 -0
- package/packages/registry/blocks/charts/chart-line-dots.ts +65 -0
- package/packages/registry/blocks/charts/chart-line-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-line-label-custom.ts +94 -0
- package/packages/registry/blocks/charts/chart-line-label.ts +73 -0
- package/packages/registry/blocks/charts/chart-line-linear.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-multiple.ts +71 -0
- package/packages/registry/blocks/charts/chart-line-step.ts +61 -0
- package/packages/registry/blocks/charts/chart-pie-donut-active.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-donut-text.ts +89 -0
- package/packages/registry/blocks/charts/chart-pie-donut.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-interactive.ts +120 -0
- package/packages/registry/blocks/charts/chart-pie-label-custom.ts +82 -0
- package/packages/registry/blocks/charts/chart-pie-label-list.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-label.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-legend.ts +79 -0
- package/packages/registry/blocks/charts/chart-pie-separator-none.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-simple.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-stacked.ts +99 -0
- package/packages/registry/blocks/charts/chart-radar-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-dots.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-no-lines.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-custom.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-none.ts +60 -0
- package/packages/registry/blocks/charts/chart-radar-icons.ts +76 -0
- package/packages/registry/blocks/charts/chart-radar-label-custom.ts +77 -0
- package/packages/registry/blocks/charts/chart-radar-legend.ts +70 -0
- package/packages/registry/blocks/charts/chart-radar-lines-only.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-multiple.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-radius.ts +68 -0
- package/packages/registry/blocks/charts/chart-radial-grid.ts +80 -0
- package/packages/registry/blocks/charts/chart-radial-label.ts +85 -0
- package/packages/registry/blocks/charts/chart-radial-shape.ts +81 -0
- package/packages/registry/blocks/charts/chart-radial-simple.ts +79 -0
- package/packages/registry/blocks/charts/chart-radial-stacked.ts +69 -0
- package/packages/registry/blocks/charts/chart-radial-text.ts +82 -0
- package/packages/registry/blocks/charts/chart-tooltip-advanced.ts +84 -0
- package/packages/registry/blocks/charts/chart-tooltip-default.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-formatter.ts +75 -0
- package/packages/registry/blocks/charts/chart-tooltip-icons.ts +68 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-line.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-none.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-custom.ts +65 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-formatter.ts +66 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-none.ts +62 -0
- package/packages/registry/blocks/dashboard-01/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/dashboard-01/components/chart-area-interactive.ts +276 -0
- package/packages/registry/blocks/dashboard-01/components/dashboard-data.ts +89 -0
- package/packages/registry/blocks/dashboard-01/components/data-table.ts +637 -0
- package/packages/registry/blocks/dashboard-01/components/nav-documents.ts +65 -0
- package/packages/registry/blocks/dashboard-01/components/nav-main.ts +61 -0
- package/packages/registry/blocks/dashboard-01/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/dashboard-01/components/nav-user.ts +66 -0
- package/packages/registry/blocks/dashboard-01/components/section-cards.ts +59 -0
- package/packages/registry/blocks/dashboard-01/components/site-header.ts +52 -0
- package/packages/registry/blocks/dashboard-01/page.ts +39 -0
- package/packages/registry/blocks/login-01/components/login-form.ts +70 -0
- package/packages/registry/blocks/login-01/page.ts +19 -0
- package/packages/registry/blocks/login-02/components/login-form.ts +68 -0
- package/packages/registry/blocks/login-02/page.ts +36 -0
- package/packages/registry/blocks/login-03/components/login-form.ts +89 -0
- package/packages/registry/blocks/login-03/page.ts +28 -0
- package/packages/registry/blocks/login-04/components/login-form.ts +91 -0
- package/packages/registry/blocks/login-04/page.ts +20 -0
- package/packages/registry/blocks/login-05/components/login-form.ts +75 -0
- package/packages/registry/blocks/login-05/page.ts +19 -0
- package/packages/registry/blocks/preview/cards/activate-agent-dialog.ts +77 -0
- package/packages/registry/blocks/preview/cards/analytics-card.ts +64 -0
- package/packages/registry/blocks/preview/cards/anomaly-alert.ts +35 -0
- package/packages/registry/blocks/preview/cards/bar-chart-card.ts +91 -0
- package/packages/registry/blocks/preview/cards/book-appointment.ts +51 -0
- package/packages/registry/blocks/preview/cards/codespaces-card.ts +172 -0
- package/packages/registry/blocks/preview/cards/contributions-activity.ts +63 -0
- package/packages/registry/blocks/preview/cards/contributors.ts +51 -0
- package/packages/registry/blocks/preview/cards/environment-variables.ts +47 -0
- package/packages/registry/blocks/preview/cards/feedback-form.ts +61 -0
- package/packages/registry/blocks/preview/cards/file-upload.ts +51 -0
- package/packages/registry/blocks/preview/cards/github-profile.ts +66 -0
- package/packages/registry/blocks/preview/cards/icon-preview-grid.ts +47 -0
- package/packages/registry/blocks/preview/cards/invite-team.ts +78 -0
- package/packages/registry/blocks/preview/cards/invoice.ts +91 -0
- package/packages/registry/blocks/preview/cards/live-waveform.ts +330 -0
- package/packages/registry/blocks/preview/cards/no-team-members.ts +61 -0
- package/packages/registry/blocks/preview/cards/not-found.ts +46 -0
- package/packages/registry/blocks/preview/cards/observability-card.ts +44 -0
- package/packages/registry/blocks/preview/cards/pie-chart-card.ts +84 -0
- package/packages/registry/blocks/preview/cards/report-bug.ts +71 -0
- package/packages/registry/blocks/preview/cards/shipping-address.ts +79 -0
- package/packages/registry/blocks/preview/cards/shortcuts.ts +57 -0
- package/packages/registry/blocks/preview/cards/skeleton-loading.ts +37 -0
- package/packages/registry/blocks/preview/cards/sleep-report.ts +85 -0
- package/packages/registry/blocks/preview/cards/style-overview.ts +64 -0
- package/packages/registry/blocks/preview/cards/typography-specimen.ts +107 -0
- package/packages/registry/blocks/preview/cards/ui-elements.ts +164 -0
- package/packages/registry/blocks/preview/cards/usage-card.ts +63 -0
- package/packages/registry/blocks/preview/cards/visitors.ts +71 -0
- package/packages/registry/blocks/preview/cards/weekly-fitness-summary.ts +54 -0
- package/packages/registry/blocks/preview/page.ts +103 -0
- package/packages/registry/blocks/preview-02/cards/account-access.ts +70 -0
- package/packages/registry/blocks/preview-02/cards/card-overview.ts +75 -0
- package/packages/registry/blocks/preview-02/cards/claimable-balance.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/contribution-history.ts +80 -0
- package/packages/registry/blocks/preview-02/cards/cover-art.ts +41 -0
- package/packages/registry/blocks/preview-02/cards/dividend-income.ts +76 -0
- package/packages/registry/blocks/preview-02/cards/empty-connect-bank.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-distribute-track.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-explore-catalog.ts +39 -0
- package/packages/registry/blocks/preview-02/cards/faq.ts +79 -0
- package/packages/registry/blocks/preview-02/cards/front-door.ts +40 -0
- package/packages/registry/blocks/preview-02/cards/index-investing.ts +31 -0
- package/packages/registry/blocks/preview-02/cards/kitchen-island.ts +90 -0
- package/packages/registry/blocks/preview-02/cards/loading-card.ts +34 -0
- package/packages/registry/blocks/preview-02/cards/new-milestone.ts +53 -0
- package/packages/registry/blocks/preview-02/cards/notification-settings.ts +126 -0
- package/packages/registry/blocks/preview-02/cards/payments.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/payout-threshold.ts +92 -0
- package/packages/registry/blocks/preview-02/cards/power-usage.ts +84 -0
- package/packages/registry/blocks/preview-02/cards/preferences.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/qr-connect.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/receiving-method.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/recent-transactions.ts +101 -0
- package/packages/registry/blocks/preview-02/cards/release-catalog.ts +73 -0
- package/packages/registry/blocks/preview-02/cards/roller-shades.ts +110 -0
- package/packages/registry/blocks/preview-02/cards/savings-progress.ts +68 -0
- package/packages/registry/blocks/preview-02/cards/savings-targets.ts +132 -0
- package/packages/registry/blocks/preview-02/cards/sidebar-nav.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/social-links.ts +57 -0
- package/packages/registry/blocks/preview-02/cards/stock-performance.ts +106 -0
- package/packages/registry/blocks/preview-02/cards/syncing-state.ts +37 -0
- package/packages/registry/blocks/preview-02/cards/transfer-funds.ts +111 -0
- package/packages/registry/blocks/preview-02/cards/upcoming-payments.ts +69 -0
- package/packages/registry/blocks/preview-02/page.ts +111 -0
- package/packages/registry/blocks/preview-03/cards/files-chat.ts +75 -0
- package/packages/registry/blocks/preview-03/cards/group-chat.ts +114 -0
- package/packages/registry/blocks/preview-03/cards/reasoning-chat.ts +88 -0
- package/packages/registry/blocks/preview-03/cards/simple-chat.ts +53 -0
- package/packages/registry/blocks/preview-03/components/chat-card.ts +126 -0
- package/packages/registry/blocks/preview-03/components/chat-player.ts +174 -0
- package/packages/registry/blocks/preview-03/components/part-file.ts +77 -0
- package/packages/registry/blocks/preview-03/components/part-reasoning.ts +25 -0
- package/packages/registry/blocks/preview-03/components/part-source.ts +48 -0
- package/packages/registry/blocks/preview-03/components/part-text.ts +69 -0
- package/packages/registry/blocks/preview-03/components/part-tool.ts +71 -0
- package/packages/registry/blocks/preview-03/components/prompt-input.ts +86 -0
- package/packages/registry/blocks/preview-03/page.ts +39 -0
- package/packages/registry/blocks/sidebar-01/components/app-sidebar.ts +113 -0
- package/packages/registry/blocks/sidebar-01/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-01/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-01/page.ts +58 -0
- package/packages/registry/blocks/sidebar-02/components/app-sidebar.ts +131 -0
- package/packages/registry/blocks/sidebar-02/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-02/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-02/page.ts +53 -0
- package/packages/registry/blocks/sidebar-03/components/app-sidebar.ts +134 -0
- package/packages/registry/blocks/sidebar-03/page.ts +60 -0
- package/packages/registry/blocks/sidebar-04/components/app-sidebar.ts +136 -0
- package/packages/registry/blocks/sidebar-04/page.ts +58 -0
- package/packages/registry/blocks/sidebar-05/components/app-sidebar.ts +147 -0
- package/packages/registry/blocks/sidebar-05/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-05/page.ts +58 -0
- package/packages/registry/blocks/sidebar-06/components/app-sidebar.ts +105 -0
- package/packages/registry/blocks/sidebar-06/components/nav-main.ts +56 -0
- package/packages/registry/blocks/sidebar-06/components/sidebar-opt-in-form.ts +44 -0
- package/packages/registry/blocks/sidebar-06/page.ts +57 -0
- package/packages/registry/blocks/sidebar-07/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/sidebar-07/components/nav-main.ts +61 -0
- package/packages/registry/blocks/sidebar-07/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-07/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-07/components/team-switcher.ts +66 -0
- package/packages/registry/blocks/sidebar-07/page.ts +59 -0
- package/packages/registry/blocks/sidebar-08/components/app-sidebar.ts +122 -0
- package/packages/registry/blocks/sidebar-08/components/nav-main.ts +68 -0
- package/packages/registry/blocks/sidebar-08/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-08/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-08/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-08/page.ts +59 -0
- package/packages/registry/blocks/sidebar-09/components/app-sidebar.ts +213 -0
- package/packages/registry/blocks/sidebar-09/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-09/page.ts +52 -0
- package/packages/registry/blocks/sidebar-10/components/app-sidebar.ts +125 -0
- package/packages/registry/blocks/sidebar-10/components/nav-actions.ts +84 -0
- package/packages/registry/blocks/sidebar-10/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-10/components/nav-main.ts +37 -0
- package/packages/registry/blocks/sidebar-10/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-10/components/nav-workspaces.ts +78 -0
- package/packages/registry/blocks/sidebar-10/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-10/page.ts +46 -0
- package/packages/registry/blocks/sidebar-11/components/app-sidebar.ts +114 -0
- package/packages/registry/blocks/sidebar-11/page.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/app-sidebar.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-12/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-12/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-12/page.ts +43 -0
- package/packages/registry/blocks/sidebar-13/components/settings-dialog.ts +114 -0
- package/packages/registry/blocks/sidebar-13/page.ts +21 -0
- package/packages/registry/blocks/sidebar-14/components/app-sidebar.ts +120 -0
- package/packages/registry/blocks/sidebar-14/page.ts +55 -0
- package/packages/registry/blocks/sidebar-15/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-15/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-15/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-15/components/nav-main.ts +35 -0
- package/packages/registry/blocks/sidebar-15/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-15/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-15/components/nav-workspaces.ts +75 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-left.ts +126 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-right.ts +62 -0
- package/packages/registry/blocks/sidebar-15/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-15/page.ts +47 -0
- package/packages/registry/blocks/sidebar-16/components/app-sidebar.ts +124 -0
- package/packages/registry/blocks/sidebar-16/components/nav-main.ts +67 -0
- package/packages/registry/blocks/sidebar-16/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-16/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-16/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-16/components/search-form.ts +27 -0
- package/packages/registry/blocks/sidebar-16/components/site-header.ts +42 -0
- package/packages/registry/blocks/sidebar-16/page.ts +38 -0
- package/packages/registry/blocks/signup-01/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-01/page.ts +19 -0
- package/packages/registry/blocks/signup-02/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-02/page.ts +36 -0
- package/packages/registry/blocks/signup-03/components/signup-form.ts +79 -0
- package/packages/registry/blocks/signup-03/page.ts +28 -0
- package/packages/registry/blocks/signup-04/components/signup-form.ts +100 -0
- package/packages/registry/blocks/signup-04/page.ts +20 -0
- package/packages/registry/blocks/signup-05/components/signup-form.ts +75 -0
- package/packages/registry/blocks/signup-05/page.ts +20 -0
- package/packages/registry/components/accordion.ts +20 -7
- package/packages/registry/components/alert-dialog.ts +58 -13
- package/packages/registry/components/alert.ts +11 -6
- package/packages/registry/components/attachment.ts +119 -0
- package/packages/registry/components/avatar.ts +17 -8
- package/packages/registry/components/badge.ts +16 -9
- package/packages/registry/components/breadcrumb.ts +6 -6
- package/packages/registry/components/bubble.ts +95 -0
- package/packages/registry/components/button-group.ts +73 -0
- package/packages/registry/components/button.ts +35 -25
- package/packages/registry/components/calendar.ts +566 -0
- package/packages/registry/components/card.ts +8 -8
- package/packages/registry/components/carousel.ts +352 -0
- package/packages/registry/components/chart-element.ts +547 -0
- package/packages/registry/components/chart-geometry.ts +457 -0
- package/packages/registry/components/chart.ts +932 -0
- package/packages/registry/components/checkbox.ts +22 -84
- package/packages/registry/components/code-block.ts +191 -0
- package/packages/registry/components/collapsible.ts +5 -2
- package/packages/registry/components/combobox.ts +802 -0
- package/packages/registry/components/command.ts +618 -0
- package/packages/registry/components/context-menu.ts +302 -0
- package/packages/registry/components/dialog.ts +156 -45
- package/packages/registry/components/direction.ts +43 -0
- package/packages/registry/components/drawer.ts +226 -0
- package/packages/registry/components/dropdown-menu.ts +262 -83
- package/packages/registry/components/empty.ts +8 -8
- package/packages/registry/components/field.ts +20 -18
- package/packages/registry/components/floating.ts +124 -0
- package/packages/registry/components/hover-card.ts +19 -8
- package/packages/registry/components/input-group.ts +118 -0
- package/packages/registry/components/input-otp.ts +365 -0
- package/packages/registry/components/input.ts +3 -3
- package/packages/registry/components/item.ts +134 -0
- package/packages/registry/components/kbd.ts +2 -2
- package/packages/registry/components/label.ts +1 -1
- package/packages/registry/components/marker.ts +63 -0
- package/packages/registry/components/menubar.ts +388 -0
- package/packages/registry/components/message-scroller.ts +470 -0
- package/packages/registry/components/message.ts +69 -0
- package/packages/registry/components/native-select.ts +5 -5
- package/packages/registry/components/navigation-menu.ts +564 -0
- package/packages/registry/components/pagination.ts +5 -5
- package/packages/registry/components/popover.ts +30 -84
- package/packages/registry/components/progress.ts +7 -3
- package/packages/registry/components/questionnaire.ts +840 -0
- package/packages/registry/components/radio-group.ts +18 -73
- package/packages/registry/components/resizable.ts +330 -0
- package/packages/registry/components/scroll-area.ts +46 -0
- package/packages/registry/components/select.ts +650 -0
- package/packages/registry/components/separator.ts +1 -1
- package/packages/registry/components/sheet.ts +128 -0
- package/packages/registry/components/sidebar.ts +457 -0
- package/packages/registry/components/skeleton.ts +1 -1
- package/packages/registry/components/slider.ts +333 -0
- package/packages/registry/components/sonner.ts +74 -7
- package/packages/registry/components/spinner.ts +7 -4
- package/packages/registry/components/switch.ts +117 -9
- package/packages/registry/components/table.ts +11 -9
- package/packages/registry/components/tabs.ts +76 -25
- package/packages/registry/components/textarea.ts +1 -1
- package/packages/registry/components/toggle-group.ts +30 -11
- package/packages/registry/components/toggle.ts +20 -13
- package/packages/registry/components/tooltip.ts +68 -7
- package/packages/registry/components/trace.ts +75 -0
- package/packages/registry/lib/icons-hugeicons.ts +955 -0
- package/packages/registry/lib/icons-phosphor.ts +955 -0
- package/packages/registry/lib/icons-remixicon.ts +955 -0
- package/packages/registry/lib/icons-tabler.ts +955 -0
- package/packages/registry/lib/icons.ts +768 -0
- package/packages/registry/lib/utils.ts +49 -4
- package/packages/registry/registry.json +4056 -72
- package/packages/registry/styles/shadcn-tailwind.css +654 -0
- package/packages/registry/styles/style-luma.css +1987 -0
- package/packages/registry/styles/style-lyra.css +1965 -0
- package/packages/registry/styles/style-maia.css +1987 -0
- package/packages/registry/styles/style-mira.css +1992 -0
- package/packages/registry/styles/style-new-york.css +1597 -0
- package/packages/registry/styles/style-nova.css +1990 -0
- package/packages/registry/styles/style-rhea.css +1987 -0
- package/packages/registry/styles/style-sera.css +1977 -0
- package/packages/registry/styles/style-vega.css +1990 -0
- package/packages/registry/styles/supplement.json +54 -0
- package/packages/registry/styles/tw-animate.css +6 -0
- package/packages/registry/themes/base-colors.js +8 -2
- package/packages/registry/themes/fonts.js +120 -0
- package/packages/registry/themes/index.css +2 -0
- package/packages/registry/themes/items.js +61 -0
- package/packages/registry/themes/preset.js +302 -0
- package/packages/registry/themes/themes.js +1193 -0
- package/src/commands/add.js +236 -12
- package/src/commands/diff.js +34 -20
- package/src/commands/info.js +7 -0
- package/src/commands/init.js +125 -8
- package/src/commands/list.js +43 -11
- package/src/commands/view.js +33 -5
- package/src/registry/extract.js +192 -2
- package/src/registry/icons.js +31 -0
- package/src/registry/local.js +15 -1
- package/src/registry/schema.js +13 -0
- package/src/registry/style-bake.js +506 -0
- package/src/utils/theme.js +110 -21
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-05 app sidebar: the docs logo, version and a search field in
|
|
3
|
+
* the header, then each docs section as a collapsible menu item whose pages
|
|
4
|
+
* open in a submenu, with a plus or minus showing its state. A fragment
|
|
5
|
+
* helper, so the markup is rendered by the server; each section is a native
|
|
6
|
+
* `<details>`, so it opens and closes with no JavaScript, and the sidebar and
|
|
7
|
+
* its rail are the kit's elements. Ported from shadcn/ui's sidebar-05.
|
|
8
|
+
*
|
|
9
|
+
* The data below is sample data. Replace it with your own, point each `url`
|
|
10
|
+
* at a real route, and mark the current page with `isActive`.
|
|
11
|
+
*/
|
|
12
|
+
import { html } from '@webjsdev/core';
|
|
13
|
+
import { cn } from '../../../lib/utils.ts';
|
|
14
|
+
import { collapsibleClass, collapsibleContentClass } from '../../../components/collapsible.ts';
|
|
15
|
+
import { searchForm } from './search-form.ts';
|
|
16
|
+
import {
|
|
17
|
+
sidebarContentClass,
|
|
18
|
+
sidebarGroupClass,
|
|
19
|
+
sidebarHeaderClass,
|
|
20
|
+
sidebarMenuButtonClass,
|
|
21
|
+
sidebarMenuClass,
|
|
22
|
+
sidebarMenuItemClass,
|
|
23
|
+
sidebarMenuSubButtonClass,
|
|
24
|
+
sidebarMenuSubClass,
|
|
25
|
+
sidebarMenuSubItemClass,
|
|
26
|
+
} from '../../../components/sidebar.ts';
|
|
27
|
+
import { GalleryVerticalEndIcon, MinusIcon, PlusIcon } from '../../../lib/icons.ts';
|
|
28
|
+
|
|
29
|
+
interface NavSection {
|
|
30
|
+
title: string;
|
|
31
|
+
url: string;
|
|
32
|
+
items: { title: string; url: string; isActive?: boolean }[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// This is sample data.
|
|
36
|
+
const data: { navMain: NavSection[] } = {
|
|
37
|
+
navMain: [
|
|
38
|
+
{
|
|
39
|
+
title: 'Getting Started',
|
|
40
|
+
url: '#',
|
|
41
|
+
items: [
|
|
42
|
+
{ title: 'Installation', url: '#' },
|
|
43
|
+
{ title: 'Project Structure', url: '#' },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: 'Build Your Application',
|
|
48
|
+
url: '#',
|
|
49
|
+
items: [
|
|
50
|
+
{ title: 'Routing', url: '#' },
|
|
51
|
+
{ title: 'Data Fetching', url: '#', isActive: true },
|
|
52
|
+
{ title: 'Rendering', url: '#' },
|
|
53
|
+
{ title: 'Caching', url: '#' },
|
|
54
|
+
{ title: 'Styling', url: '#' },
|
|
55
|
+
{ title: 'Optimizing', url: '#' },
|
|
56
|
+
{ title: 'Configuring', url: '#' },
|
|
57
|
+
{ title: 'Testing', url: '#' },
|
|
58
|
+
{ title: 'Authentication', url: '#' },
|
|
59
|
+
{ title: 'Deploying', url: '#' },
|
|
60
|
+
{ title: 'Upgrading', url: '#' },
|
|
61
|
+
{ title: 'Examples', url: '#' },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: 'API Reference',
|
|
66
|
+
url: '#',
|
|
67
|
+
items: [
|
|
68
|
+
{ title: 'Components', url: '#' },
|
|
69
|
+
{ title: 'File Conventions', url: '#' },
|
|
70
|
+
{ title: 'Functions', url: '#' },
|
|
71
|
+
{ title: 'next.config.js Options', url: '#' },
|
|
72
|
+
{ title: 'CLI', url: '#' },
|
|
73
|
+
{ title: 'Edge Runtime', url: '#' },
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
title: 'Architecture',
|
|
78
|
+
url: '#',
|
|
79
|
+
items: [
|
|
80
|
+
{ title: 'Accessibility', url: '#' },
|
|
81
|
+
{ title: 'Fast Refresh', url: '#' },
|
|
82
|
+
{ title: 'Next.js Compiler', url: '#' },
|
|
83
|
+
{ title: 'Supported Browsers', url: '#' },
|
|
84
|
+
{ title: 'Turbopack', url: '#' },
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: 'Community',
|
|
89
|
+
url: '#',
|
|
90
|
+
items: [
|
|
91
|
+
{ title: 'Contribution Guide', url: '#' },
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export function appSidebar() {
|
|
98
|
+
return html`
|
|
99
|
+
<ui-sidebar>
|
|
100
|
+
<div data-slot="sidebar-header" data-sidebar="header" class=${sidebarHeaderClass()}>
|
|
101
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
102
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
103
|
+
<a href="#" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class=${sidebarMenuButtonClass({ size: 'lg' })}>
|
|
104
|
+
<div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
|
105
|
+
${GalleryVerticalEndIcon('size-4')}
|
|
106
|
+
</div>
|
|
107
|
+
<div class="flex flex-col gap-0.5 leading-none">
|
|
108
|
+
<span class="font-medium">Documentation</span>
|
|
109
|
+
<span>v1.0.0</span>
|
|
110
|
+
</div>
|
|
111
|
+
</a>
|
|
112
|
+
</li>
|
|
113
|
+
</ul>
|
|
114
|
+
${searchForm()}
|
|
115
|
+
</div>
|
|
116
|
+
<nav aria-label="Docs" data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
117
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${sidebarGroupClass()}>
|
|
118
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
119
|
+
${data.navMain.map((section, index) => html`
|
|
120
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
121
|
+
<details data-slot="collapsible" class=${cn(collapsibleClass(), 'group/collapsible')} ?open=${index === 1}>
|
|
122
|
+
<summary data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${cn(sidebarMenuButtonClass(), 'cursor-pointer list-none [&::-webkit-details-marker]:hidden')}>
|
|
123
|
+
${section.title}
|
|
124
|
+
${PlusIcon('ml-auto group-open/collapsible:hidden')}
|
|
125
|
+
${MinusIcon('ml-auto hidden group-open/collapsible:block')}
|
|
126
|
+
</summary>
|
|
127
|
+
${section.items.length ? html`
|
|
128
|
+
<div data-slot="collapsible-content" class=${collapsibleContentClass()}>
|
|
129
|
+
<ul data-slot="sidebar-menu-sub" data-sidebar="menu-sub" class=${sidebarMenuSubClass()}>
|
|
130
|
+
${section.items.map((item) => html`
|
|
131
|
+
<li data-slot="sidebar-menu-sub-item" data-sidebar="menu-sub-item" class=${sidebarMenuSubItemClass()}>
|
|
132
|
+
<a href=${item.url} data-slot="sidebar-menu-sub-button" data-sidebar="menu-sub-button" data-size="md" data-active=${item.isActive ? 'true' : 'false'} aria-current=${item.isActive ? 'page' : null} class=${sidebarMenuSubButtonClass()}>${item.title}</a>
|
|
133
|
+
</li>
|
|
134
|
+
`)}
|
|
135
|
+
</ul>
|
|
136
|
+
</div>
|
|
137
|
+
` : ''}
|
|
138
|
+
</details>
|
|
139
|
+
</li>
|
|
140
|
+
`)}
|
|
141
|
+
</ul>
|
|
142
|
+
</div>
|
|
143
|
+
</nav>
|
|
144
|
+
<ui-sidebar-rail></ui-sidebar-rail>
|
|
145
|
+
</ui-sidebar>
|
|
146
|
+
`;
|
|
147
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-05 search form: a search field at the top of the sidebar. A
|
|
3
|
+
* fragment helper, so it renders on the server and ships no JavaScript.
|
|
4
|
+
* Ported from shadcn/ui's sidebar-05.
|
|
5
|
+
*
|
|
6
|
+
* The `<form>` has no `action` yet. Point it at your search route as a GET
|
|
7
|
+
* (`<form action="/search">`), or bind a server action from a `'use server'`
|
|
8
|
+
* file (`<form action=${search}>`). Until then a submit reloads the page with
|
|
9
|
+
* `?q=` in the URL.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import { cn } from '../../../lib/utils.ts';
|
|
13
|
+
import { labelClass } from '../../../components/label.ts';
|
|
14
|
+
import {
|
|
15
|
+
sidebarGroupClass,
|
|
16
|
+
sidebarGroupContentClass,
|
|
17
|
+
sidebarInputClass,
|
|
18
|
+
} from '../../../components/sidebar.ts';
|
|
19
|
+
import { SearchIcon } from '../../../lib/icons.ts';
|
|
20
|
+
|
|
21
|
+
export function searchForm(opts: { class?: string } = {}) {
|
|
22
|
+
return html`
|
|
23
|
+
<form role="search" class=${opts.class ?? null}>
|
|
24
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${cn(sidebarGroupClass(), 'py-0')}>
|
|
25
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${cn(sidebarGroupContentClass(), 'relative')}>
|
|
26
|
+
<label data-slot="label" for="search" class=${cn(labelClass(), 'sr-only')}>Search</label>
|
|
27
|
+
<input data-slot="sidebar-input" data-sidebar="input" id="search" name="q" placeholder="Search the docs..." class=${cn(sidebarInputClass(), 'pl-8')}>
|
|
28
|
+
${SearchIcon('pointer-events-none absolute top-1/2 left-2 size-4 -translate-y-1/2 opacity-50 select-none')}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</form>
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-05 block's page: a docs-style sidebar whose sections
|
|
3
|
+
* open and close their submenus, beside a header with a breadcrumb and a
|
|
4
|
+
* placeholder content grid.
|
|
5
|
+
*
|
|
6
|
+
* Installed by `npx @webjsdev/ui add sidebar-05` at `app/dashboard/page.ts`.
|
|
7
|
+
* It is app code you own, so edit it freely. Ported from shadcn/ui's
|
|
8
|
+
* sidebar-05.
|
|
9
|
+
*/
|
|
10
|
+
import { html } from '@webjsdev/core';
|
|
11
|
+
import type { Metadata } from '@webjsdev/core';
|
|
12
|
+
import { cn } from '../../lib/utils.ts';
|
|
13
|
+
import {
|
|
14
|
+
breadcrumbItemClass,
|
|
15
|
+
breadcrumbLinkClass,
|
|
16
|
+
breadcrumbListClass,
|
|
17
|
+
breadcrumbPageClass,
|
|
18
|
+
breadcrumbSeparatorClass,
|
|
19
|
+
} from '../../components/breadcrumb.ts';
|
|
20
|
+
import { separatorClass } from '../../components/separator.ts';
|
|
21
|
+
import '../../components/sidebar.ts';
|
|
22
|
+
import { appSidebar } from './components/app-sidebar.ts';
|
|
23
|
+
import { ChevronRightIcon } from '../../lib/icons.ts';
|
|
24
|
+
|
|
25
|
+
export const metadata: Metadata = { title: 'Dashboard' };
|
|
26
|
+
|
|
27
|
+
export default function DashboardPage() {
|
|
28
|
+
return html`
|
|
29
|
+
<ui-sidebar-provider>
|
|
30
|
+
${appSidebar()}
|
|
31
|
+
<ui-sidebar-inset>
|
|
32
|
+
<header class="flex h-16 shrink-0 items-center gap-2 border-b px-4">
|
|
33
|
+
<ui-sidebar-trigger class="-ml-1"></ui-sidebar-trigger>
|
|
34
|
+
<div role="none" data-slot="separator" data-orientation="vertical" class=${cn(separatorClass(), 'mr-2 data-vertical:h-4 data-vertical:self-auto')}></div>
|
|
35
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb">
|
|
36
|
+
<ol data-slot="breadcrumb-list" class=${breadcrumbListClass()}>
|
|
37
|
+
<li data-slot="breadcrumb-item" class=${cn(breadcrumbItemClass(), 'hidden md:block')}>
|
|
38
|
+
<a data-slot="breadcrumb-link" class=${breadcrumbLinkClass()} href="#">Build Your Application</a>
|
|
39
|
+
</li>
|
|
40
|
+
<li data-slot="breadcrumb-separator" role="presentation" aria-hidden="true" class=${cn(breadcrumbSeparatorClass(), 'hidden md:block')}>${ChevronRightIcon()}</li>
|
|
41
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
42
|
+
<span data-slot="breadcrumb-page" class=${breadcrumbPageClass()} aria-current="page">Data Fetching</span>
|
|
43
|
+
</li>
|
|
44
|
+
</ol>
|
|
45
|
+
</nav>
|
|
46
|
+
</header>
|
|
47
|
+
<div class="flex flex-1 flex-col gap-4 p-4">
|
|
48
|
+
<div class="grid auto-rows-min gap-4 md:grid-cols-3">
|
|
49
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
50
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
51
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="min-h-screen flex-1 rounded-xl bg-muted/50 md:min-h-min"></div>
|
|
54
|
+
</div>
|
|
55
|
+
</ui-sidebar-inset>
|
|
56
|
+
</ui-sidebar-provider>
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-06 app sidebar: the docs header, the sections as dropdown
|
|
3
|
+
* menus, and a newsletter opt-in card in the footer. A fragment helper, so the
|
|
4
|
+
* markup is rendered by the server; the sidebar, its rail and the menus are
|
|
5
|
+
* the kit's elements. Ported from shadcn/ui's sidebar-06.
|
|
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
|
+
sidebarFooterClass,
|
|
14
|
+
sidebarHeaderClass,
|
|
15
|
+
sidebarMenuButtonClass,
|
|
16
|
+
sidebarMenuClass,
|
|
17
|
+
sidebarMenuItemClass,
|
|
18
|
+
} from '../../../components/sidebar.ts';
|
|
19
|
+
import { navMain, type NavMainItem } from './nav-main.ts';
|
|
20
|
+
import { sidebarOptInForm } from './sidebar-opt-in-form.ts';
|
|
21
|
+
import { GalleryVerticalEndIcon } from '../../../lib/icons.ts';
|
|
22
|
+
|
|
23
|
+
// This is sample data.
|
|
24
|
+
const data: { navMain: NavMainItem[] } = {
|
|
25
|
+
navMain: [
|
|
26
|
+
{
|
|
27
|
+
title: 'Getting Started',
|
|
28
|
+
url: '#',
|
|
29
|
+
items: [
|
|
30
|
+
{ title: 'Installation', url: '#' },
|
|
31
|
+
{ title: 'Project Structure', url: '#' },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: 'Build Your Application',
|
|
36
|
+
url: '#',
|
|
37
|
+
items: [
|
|
38
|
+
{ title: 'Routing', url: '#' },
|
|
39
|
+
{ title: 'Data Fetching', url: '#', isActive: true },
|
|
40
|
+
{ title: 'Rendering', url: '#' },
|
|
41
|
+
{ title: 'Caching', url: '#' },
|
|
42
|
+
{ title: 'Styling', url: '#' },
|
|
43
|
+
{ title: 'Optimizing', url: '#' },
|
|
44
|
+
{ title: 'Configuring', url: '#' },
|
|
45
|
+
{ title: 'Testing', url: '#' },
|
|
46
|
+
{ title: 'Authentication', url: '#' },
|
|
47
|
+
{ title: 'Deploying', url: '#' },
|
|
48
|
+
{ title: 'Upgrading', url: '#' },
|
|
49
|
+
{ title: 'Examples', url: '#' },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: 'API Reference',
|
|
54
|
+
url: '#',
|
|
55
|
+
items: [
|
|
56
|
+
{ title: 'Components', url: '#' },
|
|
57
|
+
{ title: 'File Conventions', url: '#' },
|
|
58
|
+
{ title: 'Functions', url: '#' },
|
|
59
|
+
{ title: 'next.config.js Options', url: '#' },
|
|
60
|
+
{ title: 'CLI', url: '#' },
|
|
61
|
+
{ title: 'Edge Runtime', url: '#' },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: 'Architecture',
|
|
66
|
+
url: '#',
|
|
67
|
+
items: [
|
|
68
|
+
{ title: 'Accessibility', url: '#' },
|
|
69
|
+
{ title: 'Fast Refresh', url: '#' },
|
|
70
|
+
{ title: 'Next.js Compiler', url: '#' },
|
|
71
|
+
{ title: 'Supported Browsers', url: '#' },
|
|
72
|
+
{ title: 'Turbopack', url: '#' },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export function appSidebar() {
|
|
79
|
+
return html`
|
|
80
|
+
<ui-sidebar>
|
|
81
|
+
<div data-slot="sidebar-header" data-sidebar="header" class=${sidebarHeaderClass()}>
|
|
82
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
83
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
84
|
+
<a href="#" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class=${sidebarMenuButtonClass({ size: 'lg' })}>
|
|
85
|
+
<div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
|
86
|
+
${GalleryVerticalEndIcon('size-4')}
|
|
87
|
+
</div>
|
|
88
|
+
<div class="flex flex-col gap-0.5 leading-none">
|
|
89
|
+
<span class="font-medium">Documentation</span>
|
|
90
|
+
<span>v1.0.0</span>
|
|
91
|
+
</div>
|
|
92
|
+
</a>
|
|
93
|
+
</li>
|
|
94
|
+
</ul>
|
|
95
|
+
</div>
|
|
96
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
97
|
+
${navMain({ items: data.navMain })}
|
|
98
|
+
</div>
|
|
99
|
+
<div data-slot="sidebar-footer" data-sidebar="footer" class=${sidebarFooterClass()}>
|
|
100
|
+
<div class="p-1">${sidebarOptInForm()}</div>
|
|
101
|
+
</div>
|
|
102
|
+
<ui-sidebar-rail></ui-sidebar-rail>
|
|
103
|
+
</ui-sidebar>
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-06 main nav: one menu item per section, each opening its pages
|
|
3
|
+
* as a dropdown menu beside the sidebar. A fragment helper; the menus are the
|
|
4
|
+
* kit's `<ui-dropdown-menu>`. Ported from shadcn/ui's sidebar-06.
|
|
5
|
+
*
|
|
6
|
+
* Each page is a real link inside its menu item, so a click follows it. Give
|
|
7
|
+
* the item for the current page `aria-current="page"` on its link.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
11
|
+
import { cn } from '../../../lib/utils.ts';
|
|
12
|
+
import '../../../components/dropdown-menu.ts';
|
|
13
|
+
import {
|
|
14
|
+
sidebarGroupClass,
|
|
15
|
+
sidebarMenuButtonClass,
|
|
16
|
+
sidebarMenuClass,
|
|
17
|
+
sidebarMenuItemClass,
|
|
18
|
+
} from '../../../components/sidebar.ts';
|
|
19
|
+
import { MoreHorizontalIcon } from '../../../lib/icons.ts';
|
|
20
|
+
|
|
21
|
+
export interface NavMainItem {
|
|
22
|
+
title: string;
|
|
23
|
+
url: string;
|
|
24
|
+
icon?: (cls?: string) => TemplateResult;
|
|
25
|
+
isActive?: boolean;
|
|
26
|
+
items?: { title: string; url: string; isActive?: boolean }[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function navMain({ items }: { items: NavMainItem[] }) {
|
|
30
|
+
return html`
|
|
31
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${sidebarGroupClass()}>
|
|
32
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
33
|
+
${items.map((item) => html`
|
|
34
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
35
|
+
<ui-dropdown-menu>
|
|
36
|
+
<ui-dropdown-menu-trigger>
|
|
37
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${cn(sidebarMenuButtonClass(), 'aria-expanded:bg-sidebar-accent aria-expanded:text-sidebar-accent-foreground')}>
|
|
38
|
+
${item.title} ${MoreHorizontalIcon('ml-auto')}
|
|
39
|
+
</button>
|
|
40
|
+
</ui-dropdown-menu-trigger>
|
|
41
|
+
${item.items?.length
|
|
42
|
+
? html`<ui-dropdown-menu-content class="min-w-56 rounded-lg" side="right" align="start">
|
|
43
|
+
${item.items.map((sub) => html`
|
|
44
|
+
<ui-dropdown-menu-item>
|
|
45
|
+
<a href=${sub.url} class="flex-1 text-inherit no-underline" aria-current=${sub.isActive ? 'page' : null}>${sub.title}</a>
|
|
46
|
+
</ui-dropdown-menu-item>
|
|
47
|
+
`)}
|
|
48
|
+
</ui-dropdown-menu-content>`
|
|
49
|
+
: ''}
|
|
50
|
+
</ui-dropdown-menu>
|
|
51
|
+
</li>
|
|
52
|
+
`)}
|
|
53
|
+
</ul>
|
|
54
|
+
</div>
|
|
55
|
+
`;
|
|
56
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-06 newsletter card: a title, a line of copy and an email
|
|
3
|
+
* opt-in form, sized for the sidebar's footer. A fragment helper, so it
|
|
4
|
+
* renders on the server and ships no JavaScript. Ported from shadcn/ui's
|
|
5
|
+
* sidebar-06.
|
|
6
|
+
*
|
|
7
|
+
* The `<form>` has no `action` yet. Bind a server action from a
|
|
8
|
+
* `'use server'` file (`<form action=${subscribe}>`) before you ship it: the
|
|
9
|
+
* framework then supplies `method="post"`, and the no-JS post, the 422
|
|
10
|
+
* re-render with `fieldErrors` / `values`, and the 303 redirect all work.
|
|
11
|
+
* Until it is bound, the form submits as a GET back to the page.
|
|
12
|
+
*/
|
|
13
|
+
import { html } from '@webjsdev/core';
|
|
14
|
+
import { cn } from '../../../lib/utils.ts';
|
|
15
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
16
|
+
import {
|
|
17
|
+
cardClass,
|
|
18
|
+
cardContentClass,
|
|
19
|
+
cardDescriptionClass,
|
|
20
|
+
cardHeaderClass,
|
|
21
|
+
cardTitleClass,
|
|
22
|
+
} from '../../../components/card.ts';
|
|
23
|
+
import { sidebarInputClass } from '../../../components/sidebar.ts';
|
|
24
|
+
|
|
25
|
+
export function sidebarOptInForm() {
|
|
26
|
+
return html`
|
|
27
|
+
<div data-slot="card" data-size="default" class=${cn(cardClass(), 'gap-2 py-4 shadow-none')}>
|
|
28
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'px-4')}>
|
|
29
|
+
<div data-slot="card-title" class=${cn(cardTitleClass(), 'text-sm')}>Subscribe to our newsletter</div>
|
|
30
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>
|
|
31
|
+
Opt-in to receive updates and news about the sidebar.
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'px-4')}>
|
|
35
|
+
<form>
|
|
36
|
+
<div class="grid gap-2.5">
|
|
37
|
+
<input type="email" name="email" autocomplete="email" placeholder="Email" aria-label="Email" required data-slot="sidebar-input" data-sidebar="input" class=${sidebarInputClass()}>
|
|
38
|
+
<button type="submit" data-slot="button" class=${cn(buttonClass(), 'w-full bg-sidebar-primary text-sidebar-primary-foreground shadow-none')}>Subscribe</button>
|
|
39
|
+
</div>
|
|
40
|
+
</form>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
`;
|
|
44
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-06 block's page: a sidebar whose sections open as dropdown
|
|
3
|
+
* menus, beside a header with a breadcrumb and a placeholder content grid.
|
|
4
|
+
*
|
|
5
|
+
* Installed by `npx @webjsdev/ui add sidebar-06` at `app/dashboard/page.ts`.
|
|
6
|
+
* It is app code you own, so edit it freely. Ported from shadcn/ui's
|
|
7
|
+
* sidebar-06.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import type { Metadata } from '@webjsdev/core';
|
|
11
|
+
import { cn } from '../../lib/utils.ts';
|
|
12
|
+
import {
|
|
13
|
+
breadcrumbItemClass,
|
|
14
|
+
breadcrumbLinkClass,
|
|
15
|
+
breadcrumbListClass,
|
|
16
|
+
breadcrumbPageClass,
|
|
17
|
+
breadcrumbSeparatorClass,
|
|
18
|
+
} from '../../components/breadcrumb.ts';
|
|
19
|
+
import { separatorClass } from '../../components/separator.ts';
|
|
20
|
+
import '../../components/sidebar.ts';
|
|
21
|
+
import { appSidebar } from './components/app-sidebar.ts';
|
|
22
|
+
import { ChevronRightIcon } from '../../lib/icons.ts';
|
|
23
|
+
|
|
24
|
+
export const metadata: Metadata = { title: 'Dashboard' };
|
|
25
|
+
|
|
26
|
+
export default function DashboardPage() {
|
|
27
|
+
return html`
|
|
28
|
+
<ui-sidebar-provider>
|
|
29
|
+
${appSidebar()}
|
|
30
|
+
<ui-sidebar-inset>
|
|
31
|
+
<header class="flex h-16 shrink-0 items-center gap-2 border-b px-4">
|
|
32
|
+
<ui-sidebar-trigger class="-ml-1"></ui-sidebar-trigger>
|
|
33
|
+
<div role="none" data-slot="separator" data-orientation="vertical" class=${cn(separatorClass(), 'mr-2 data-vertical:h-4 data-vertical:self-auto')}></div>
|
|
34
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb">
|
|
35
|
+
<ol data-slot="breadcrumb-list" class=${breadcrumbListClass()}>
|
|
36
|
+
<li data-slot="breadcrumb-item" class=${cn(breadcrumbItemClass(), 'hidden md:block')}>
|
|
37
|
+
<a data-slot="breadcrumb-link" class=${breadcrumbLinkClass()} href="#">Build Your Application</a>
|
|
38
|
+
</li>
|
|
39
|
+
<li data-slot="breadcrumb-separator" role="presentation" aria-hidden="true" class=${cn(breadcrumbSeparatorClass(), 'hidden md:block')}>${ChevronRightIcon()}</li>
|
|
40
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
41
|
+
<span data-slot="breadcrumb-page" class=${breadcrumbPageClass()} aria-current="page">Data Fetching</span>
|
|
42
|
+
</li>
|
|
43
|
+
</ol>
|
|
44
|
+
</nav>
|
|
45
|
+
</header>
|
|
46
|
+
<div class="flex flex-1 flex-col gap-4 p-4">
|
|
47
|
+
<div class="grid auto-rows-min gap-4 md:grid-cols-3">
|
|
48
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
49
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
50
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="min-h-screen flex-1 rounded-xl bg-muted/50 md:min-h-min"></div>
|
|
53
|
+
</div>
|
|
54
|
+
</ui-sidebar-inset>
|
|
55
|
+
</ui-sidebar-provider>
|
|
56
|
+
`;
|
|
57
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-07 app sidebar: a team switcher, the main nav with collapsible
|
|
3
|
+
* sections, the projects list and the signed-in user, in a sidebar that
|
|
4
|
+
* collapses to icons (Ctrl+B or Cmd+B, the trigger, or the rail). A fragment
|
|
5
|
+
* helper, so the markup is rendered by the server; the sidebar, its rail and
|
|
6
|
+
* the menus are the kit's elements. Ported from shadcn/ui's sidebar-07.
|
|
7
|
+
*
|
|
8
|
+
* The data below is sample data. Replace it with your own, and point each
|
|
9
|
+
* `url` at a real route.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import {
|
|
13
|
+
sidebarContentClass,
|
|
14
|
+
sidebarFooterClass,
|
|
15
|
+
sidebarHeaderClass,
|
|
16
|
+
} from '../../../components/sidebar.ts';
|
|
17
|
+
import { navMain, type NavMainItem } from './nav-main.ts';
|
|
18
|
+
import { navProjects, type NavProject } from './nav-projects.ts';
|
|
19
|
+
import { navUser } from './nav-user.ts';
|
|
20
|
+
import { teamSwitcher, type Team } from './team-switcher.ts';
|
|
21
|
+
import { AudioLinesIcon, BookOpenIcon, BotIcon, FrameIcon, GalleryVerticalEndIcon, MapIcon, PieChartIcon, Settings2Icon, TerminalIcon, TerminalSquareIcon } from '../../../lib/icons.ts';
|
|
22
|
+
|
|
23
|
+
// This is sample data.
|
|
24
|
+
const data: {
|
|
25
|
+
user: { name: string; email: string; avatar: string };
|
|
26
|
+
teams: Team[];
|
|
27
|
+
navMain: NavMainItem[];
|
|
28
|
+
projects: NavProject[];
|
|
29
|
+
} = {
|
|
30
|
+
user: {
|
|
31
|
+
name: 'vivek',
|
|
32
|
+
email: 'vivek@example.com',
|
|
33
|
+
avatar: 'https://webjs.dev/public/avatars/vivek.jpg',
|
|
34
|
+
},
|
|
35
|
+
teams: [
|
|
36
|
+
{ name: 'Acme Inc', logo: GalleryVerticalEndIcon, plan: 'Enterprise' },
|
|
37
|
+
{ name: 'Acme Corp.', logo: AudioLinesIcon, plan: 'Startup' },
|
|
38
|
+
{ name: 'Evil Corp.', logo: TerminalIcon, plan: 'Free' },
|
|
39
|
+
],
|
|
40
|
+
navMain: [
|
|
41
|
+
{
|
|
42
|
+
title: 'Playground',
|
|
43
|
+
url: '#',
|
|
44
|
+
icon: TerminalSquareIcon,
|
|
45
|
+
isActive: true,
|
|
46
|
+
items: [
|
|
47
|
+
{ title: 'History', url: '#' },
|
|
48
|
+
{ title: 'Starred', url: '#' },
|
|
49
|
+
{ title: 'Settings', url: '#' },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: 'Models',
|
|
54
|
+
url: '#',
|
|
55
|
+
icon: BotIcon,
|
|
56
|
+
items: [
|
|
57
|
+
{ title: 'Genesis', url: '#' },
|
|
58
|
+
{ title: 'Explorer', url: '#' },
|
|
59
|
+
{ title: 'Quantum', url: '#' },
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: 'Documentation',
|
|
64
|
+
url: '#',
|
|
65
|
+
icon: BookOpenIcon,
|
|
66
|
+
items: [
|
|
67
|
+
{ title: 'Introduction', url: '#' },
|
|
68
|
+
{ title: 'Get Started', url: '#' },
|
|
69
|
+
{ title: 'Tutorials', url: '#' },
|
|
70
|
+
{ title: 'Changelog', url: '#' },
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: 'Settings',
|
|
75
|
+
url: '#',
|
|
76
|
+
icon: Settings2Icon,
|
|
77
|
+
items: [
|
|
78
|
+
{ title: 'General', url: '#' },
|
|
79
|
+
{ title: 'Team', url: '#' },
|
|
80
|
+
{ title: 'Billing', url: '#' },
|
|
81
|
+
{ title: 'Limits', url: '#' },
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
projects: [
|
|
86
|
+
{ name: 'Design Engineering', url: '#', icon: FrameIcon },
|
|
87
|
+
{ name: 'Sales & Marketing', url: '#', icon: PieChartIcon },
|
|
88
|
+
{ name: 'Travel', url: '#', icon: MapIcon },
|
|
89
|
+
],
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export function appSidebar() {
|
|
93
|
+
return html`
|
|
94
|
+
<ui-sidebar collapsible="icon">
|
|
95
|
+
<div data-slot="sidebar-header" data-sidebar="header" class=${sidebarHeaderClass()}>
|
|
96
|
+
${teamSwitcher({ teams: data.teams })}
|
|
97
|
+
</div>
|
|
98
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
99
|
+
${navMain({ items: data.navMain })}
|
|
100
|
+
${navProjects({ projects: data.projects })}
|
|
101
|
+
</div>
|
|
102
|
+
<div data-slot="sidebar-footer" data-sidebar="footer" class=${sidebarFooterClass()}>
|
|
103
|
+
${navUser({ user: data.user })}
|
|
104
|
+
</div>
|
|
105
|
+
<ui-sidebar-rail></ui-sidebar-rail>
|
|
106
|
+
</ui-sidebar>
|
|
107
|
+
`;
|
|
108
|
+
}
|