@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,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-16 app sidebar: the company, the main nav with collapsible
|
|
3
|
+
* sections, the projects list, a secondary nav and the signed-in user, in a
|
|
4
|
+
* sidebar that starts below the sticky site header. A fragment helper, so the
|
|
5
|
+
* markup is rendered by the server; the sidebar and the menus are the kit's
|
|
6
|
+
* elements. Ported from shadcn/ui's sidebar-16.
|
|
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
|
+
sidebarMenuButtonClass,
|
|
17
|
+
sidebarMenuClass,
|
|
18
|
+
sidebarMenuItemClass,
|
|
19
|
+
} from '../../../components/sidebar.ts';
|
|
20
|
+
import { navMain, type NavMainItem } from './nav-main.ts';
|
|
21
|
+
import { navProjects, type NavProject } from './nav-projects.ts';
|
|
22
|
+
import { navSecondary, type NavSecondaryItem } from './nav-secondary.ts';
|
|
23
|
+
import { navUser } from './nav-user.ts';
|
|
24
|
+
import { BookOpenIcon, BotIcon, FrameIcon, LifeBuoyIcon, MapIcon, PieChartIcon, SendIcon, Settings2Icon, TerminalIcon, TerminalSquareIcon } from '../../../lib/icons.ts';
|
|
25
|
+
|
|
26
|
+
// This is sample data.
|
|
27
|
+
const data: {
|
|
28
|
+
user: { name: string; email: string; avatar: string };
|
|
29
|
+
navMain: NavMainItem[];
|
|
30
|
+
navSecondary: NavSecondaryItem[];
|
|
31
|
+
projects: NavProject[];
|
|
32
|
+
} = {
|
|
33
|
+
user: {
|
|
34
|
+
name: 'vivek',
|
|
35
|
+
email: 'vivek@example.com',
|
|
36
|
+
avatar: 'https://webjs.dev/public/avatars/vivek.jpg',
|
|
37
|
+
},
|
|
38
|
+
navMain: [
|
|
39
|
+
{
|
|
40
|
+
title: 'Playground',
|
|
41
|
+
url: '#',
|
|
42
|
+
icon: TerminalSquareIcon,
|
|
43
|
+
isActive: true,
|
|
44
|
+
items: [
|
|
45
|
+
{ title: 'History', url: '#' },
|
|
46
|
+
{ title: 'Starred', url: '#' },
|
|
47
|
+
{ title: 'Settings', url: '#' },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: 'Models',
|
|
52
|
+
url: '#',
|
|
53
|
+
icon: BotIcon,
|
|
54
|
+
items: [
|
|
55
|
+
{ title: 'Genesis', url: '#' },
|
|
56
|
+
{ title: 'Explorer', url: '#' },
|
|
57
|
+
{ title: 'Quantum', url: '#' },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: 'Documentation',
|
|
62
|
+
url: '#',
|
|
63
|
+
icon: BookOpenIcon,
|
|
64
|
+
items: [
|
|
65
|
+
{ title: 'Introduction', url: '#' },
|
|
66
|
+
{ title: 'Get Started', url: '#' },
|
|
67
|
+
{ title: 'Tutorials', url: '#' },
|
|
68
|
+
{ title: 'Changelog', url: '#' },
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: 'Settings',
|
|
73
|
+
url: '#',
|
|
74
|
+
icon: Settings2Icon,
|
|
75
|
+
items: [
|
|
76
|
+
{ title: 'General', url: '#' },
|
|
77
|
+
{ title: 'Team', url: '#' },
|
|
78
|
+
{ title: 'Billing', url: '#' },
|
|
79
|
+
{ title: 'Limits', url: '#' },
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
navSecondary: [
|
|
84
|
+
{ title: 'Support', url: '#', icon: LifeBuoyIcon },
|
|
85
|
+
{ title: 'Feedback', url: '#', icon: SendIcon },
|
|
86
|
+
],
|
|
87
|
+
projects: [
|
|
88
|
+
{ name: 'Design Engineering', url: '#', icon: FrameIcon },
|
|
89
|
+
{ name: 'Sales & Marketing', url: '#', icon: PieChartIcon },
|
|
90
|
+
{ name: 'Travel', url: '#', icon: MapIcon },
|
|
91
|
+
],
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export function appSidebar() {
|
|
95
|
+
// shadcn's className lands on the sidebar's fixed container, which the
|
|
96
|
+
// kit's <ui-sidebar> renders as its data-slot="sidebar-container" child.
|
|
97
|
+
return html`
|
|
98
|
+
<ui-sidebar class="[&>[data-slot=sidebar-container]]:top-(--header-height) [&>[data-slot=sidebar-container]]:h-[calc(100svh-var(--header-height))]!">
|
|
99
|
+
<div data-slot="sidebar-header" data-sidebar="header" class=${sidebarHeaderClass()}>
|
|
100
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
101
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
102
|
+
<a href="#" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class=${sidebarMenuButtonClass({ size: 'lg' })}>
|
|
103
|
+
<div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
|
104
|
+
${TerminalIcon('size-4')}
|
|
105
|
+
</div>
|
|
106
|
+
<div class="grid flex-1 text-left text-sm leading-tight">
|
|
107
|
+
<span class="truncate font-medium">Acme Inc</span>
|
|
108
|
+
<span class="truncate text-xs">Enterprise</span>
|
|
109
|
+
</div>
|
|
110
|
+
</a>
|
|
111
|
+
</li>
|
|
112
|
+
</ul>
|
|
113
|
+
</div>
|
|
114
|
+
<div data-slot="sidebar-content" data-sidebar="content" class=${sidebarContentClass()}>
|
|
115
|
+
${navMain({ items: data.navMain })}
|
|
116
|
+
${navProjects({ projects: data.projects })}
|
|
117
|
+
${navSecondary({ items: data.navSecondary, class: 'mt-auto' })}
|
|
118
|
+
</div>
|
|
119
|
+
<div data-slot="sidebar-footer" data-sidebar="footer" class=${sidebarFooterClass()}>
|
|
120
|
+
${navUser({ user: data.user })}
|
|
121
|
+
</div>
|
|
122
|
+
</ui-sidebar>
|
|
123
|
+
`;
|
|
124
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-16 main nav: the "Platform" group, each section a link with a
|
|
3
|
+
* toggle beside it that opens its pages in a submenu. A fragment helper; each
|
|
4
|
+
* toggle is the `<summary>` of a native `<details>`, so the submenus open and
|
|
5
|
+
* close with no JavaScript. Ported from shadcn/ui's sidebar-16.
|
|
6
|
+
*/
|
|
7
|
+
import { html } from '@webjsdev/core';
|
|
8
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
9
|
+
import { cn } from '../../../lib/utils.ts';
|
|
10
|
+
import { collapsibleClass, collapsibleContentClass } from '../../../components/collapsible.ts';
|
|
11
|
+
import {
|
|
12
|
+
sidebarGroupClass,
|
|
13
|
+
sidebarGroupLabelClass,
|
|
14
|
+
sidebarMenuActionClass,
|
|
15
|
+
sidebarMenuButtonClass,
|
|
16
|
+
sidebarMenuClass,
|
|
17
|
+
sidebarMenuItemClass,
|
|
18
|
+
sidebarMenuSubButtonClass,
|
|
19
|
+
sidebarMenuSubClass,
|
|
20
|
+
sidebarMenuSubItemClass,
|
|
21
|
+
} from '../../../components/sidebar.ts';
|
|
22
|
+
import { ChevronRightIcon } from '../../../lib/icons.ts';
|
|
23
|
+
|
|
24
|
+
export interface NavMainItem {
|
|
25
|
+
title: string;
|
|
26
|
+
url: string;
|
|
27
|
+
icon: (cls?: string) => TemplateResult;
|
|
28
|
+
isActive?: boolean;
|
|
29
|
+
items?: { title: string; url: string }[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function navMain({ items }: { items: NavMainItem[] }) {
|
|
33
|
+
return html`
|
|
34
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${sidebarGroupClass()}>
|
|
35
|
+
<div data-slot="sidebar-group-label" data-sidebar="group-label" class=${sidebarGroupLabelClass()}>Platform</div>
|
|
36
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
37
|
+
${items.map((item) => html`
|
|
38
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
39
|
+
<a href=${item.url} data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${sidebarMenuButtonClass()}>
|
|
40
|
+
${item.icon()}
|
|
41
|
+
<span>${item.title}</span>
|
|
42
|
+
</a>
|
|
43
|
+
${item.items?.length
|
|
44
|
+
? html`<details data-slot="collapsible" class=${cn(collapsibleClass(), 'group/collapsible')} ?open=${!!item.isActive}>
|
|
45
|
+
<summary data-slot="sidebar-menu-action" data-sidebar="menu-action" class=${cn(sidebarMenuActionClass(), 'top-1.5 cursor-pointer list-none group-open/collapsible:rotate-90 [&::-webkit-details-marker]:hidden')}>
|
|
46
|
+
${ChevronRightIcon()}
|
|
47
|
+
<span class="sr-only">Toggle</span>
|
|
48
|
+
</summary>
|
|
49
|
+
<div data-slot="collapsible-content" class=${collapsibleContentClass()}>
|
|
50
|
+
<ul data-slot="sidebar-menu-sub" data-sidebar="menu-sub" class=${sidebarMenuSubClass()}>
|
|
51
|
+
${item.items.map((sub) => html`
|
|
52
|
+
<li data-slot="sidebar-menu-sub-item" data-sidebar="menu-sub-item" class=${sidebarMenuSubItemClass()}>
|
|
53
|
+
<a href=${sub.url} data-slot="sidebar-menu-sub-button" data-sidebar="menu-sub-button" data-size="md" class=${sidebarMenuSubButtonClass()}>
|
|
54
|
+
<span>${sub.title}</span>
|
|
55
|
+
</a>
|
|
56
|
+
</li>
|
|
57
|
+
`)}
|
|
58
|
+
</ul>
|
|
59
|
+
</div>
|
|
60
|
+
</details>`
|
|
61
|
+
: ''}
|
|
62
|
+
</li>
|
|
63
|
+
`)}
|
|
64
|
+
</ul>
|
|
65
|
+
</div>
|
|
66
|
+
`;
|
|
67
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-16 projects list: one link per project, 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-16.
|
|
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 type { TemplateResult } from '@webjsdev/core';
|
|
13
|
+
import { cn } from '../../../lib/utils.ts';
|
|
14
|
+
import '../../../components/dropdown-menu.ts';
|
|
15
|
+
import {
|
|
16
|
+
sidebarGroupClass,
|
|
17
|
+
sidebarGroupLabelClass,
|
|
18
|
+
sidebarMenuActionClass,
|
|
19
|
+
sidebarMenuButtonClass,
|
|
20
|
+
sidebarMenuClass,
|
|
21
|
+
sidebarMenuItemClass,
|
|
22
|
+
} from '../../../components/sidebar.ts';
|
|
23
|
+
import { FolderIcon, MoreHorizontalIcon, ShareIcon, Trash2Icon } from '../../../lib/icons.ts';
|
|
24
|
+
|
|
25
|
+
export interface NavProject {
|
|
26
|
+
name: string;
|
|
27
|
+
url: string;
|
|
28
|
+
icon: (cls?: string) => TemplateResult;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function navProjects({ projects }: { projects: NavProject[] }) {
|
|
32
|
+
return html`
|
|
33
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${cn(sidebarGroupClass(), 'group-data-[collapsible=icon]:hidden')}>
|
|
34
|
+
<div data-slot="sidebar-group-label" data-sidebar="group-label" class=${sidebarGroupLabelClass()}>Projects</div>
|
|
35
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
36
|
+
${projects.map((item, i) => html`
|
|
37
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
38
|
+
<a href=${item.url} data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class=${sidebarMenuButtonClass()}>
|
|
39
|
+
${item.icon()}
|
|
40
|
+
<span>${item.name}</span>
|
|
41
|
+
</a>
|
|
42
|
+
<button type="button" id=${`nav-project-more-${i}`} data-slot="sidebar-menu-action" data-sidebar="menu-action" class=${cn(sidebarMenuActionClass({ showOnHover: true }), 'aria-expanded:bg-muted')}>
|
|
43
|
+
${MoreHorizontalIcon()}
|
|
44
|
+
<span class="sr-only">More</span>
|
|
45
|
+
</button>
|
|
46
|
+
<ui-dropdown-menu trigger=${`nav-project-more-${i}`}>
|
|
47
|
+
<ui-dropdown-menu-content class="w-48" side="right" align="start">
|
|
48
|
+
<ui-dropdown-menu-item>${FolderIcon('text-muted-foreground')}<span>View Project</span></ui-dropdown-menu-item>
|
|
49
|
+
<ui-dropdown-menu-item>${ShareIcon('text-muted-foreground')}<span>Share Project</span></ui-dropdown-menu-item>
|
|
50
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
51
|
+
<ui-dropdown-menu-item>${Trash2Icon('text-muted-foreground')}<span>Delete Project</span></ui-dropdown-menu-item>
|
|
52
|
+
</ui-dropdown-menu-content>
|
|
53
|
+
</ui-dropdown-menu>
|
|
54
|
+
</li>
|
|
55
|
+
`)}
|
|
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" class=${sidebarMenuButtonClass()}>
|
|
58
|
+
${MoreHorizontalIcon()}
|
|
59
|
+
<span>More</span>
|
|
60
|
+
</button>
|
|
61
|
+
</li>
|
|
62
|
+
</ul>
|
|
63
|
+
</div>
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-16 secondary nav: small links (support, feedback) at the foot
|
|
3
|
+
* of the sidebar content. A fragment helper. Ported from shadcn/ui's
|
|
4
|
+
* sidebar-16.
|
|
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
|
+
sidebarMenuButtonClass,
|
|
13
|
+
sidebarMenuClass,
|
|
14
|
+
sidebarMenuItemClass,
|
|
15
|
+
} from '../../../components/sidebar.ts';
|
|
16
|
+
|
|
17
|
+
export interface NavSecondaryItem {
|
|
18
|
+
title: string;
|
|
19
|
+
url: string;
|
|
20
|
+
icon: (cls?: string) => TemplateResult;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function navSecondary({ items, class: className }: { items: NavSecondaryItem[]; class?: string }) {
|
|
24
|
+
return html`
|
|
25
|
+
<div data-slot="sidebar-group" data-sidebar="group" class=${cn(sidebarGroupClass(), className)}>
|
|
26
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${sidebarGroupContentClass()}>
|
|
27
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
28
|
+
${items.map((item) => html`
|
|
29
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
30
|
+
<a href=${item.url} data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="sm" class=${sidebarMenuButtonClass({ size: 'sm' })}>
|
|
31
|
+
${item.icon()}
|
|
32
|
+
<span>${item.title}</span>
|
|
33
|
+
</a>
|
|
34
|
+
</li>
|
|
35
|
+
`)}
|
|
36
|
+
</ul>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-16 user menu: the signed-in user's avatar, name and email,
|
|
3
|
+
* opening an account menu. A fragment helper; the menu is the kit's
|
|
4
|
+
* `<ui-dropdown-menu>`. Ported from shadcn/ui's sidebar-16.
|
|
5
|
+
*
|
|
6
|
+
* The menu items are placeholders. Make "Log out" a form that posts to your
|
|
7
|
+
* sign-out action, and the others links to your account pages.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import { cn } from '../../../lib/utils.ts';
|
|
11
|
+
import { avatarClass, avatarFallbackClass, avatarImageClass } from '../../../components/avatar.ts';
|
|
12
|
+
import '../../../components/dropdown-menu.ts';
|
|
13
|
+
import {
|
|
14
|
+
sidebarMenuButtonClass,
|
|
15
|
+
sidebarMenuClass,
|
|
16
|
+
sidebarMenuItemClass,
|
|
17
|
+
} from '../../../components/sidebar.ts';
|
|
18
|
+
import { BadgeCheckIcon, BellIcon, ChevronsUpDownIcon, CreditCardIcon, LogOutIcon, SparklesIcon } from '../../../lib/icons.ts';
|
|
19
|
+
|
|
20
|
+
function userAvatar(user: { name: string; avatar: string }) {
|
|
21
|
+
return html`<span data-slot="avatar" data-size="default" class=${cn(avatarClass(), 'h-8 w-8 rounded-lg')}>
|
|
22
|
+
<span data-slot="avatar-fallback" class=${cn(avatarFallbackClass(), 'rounded-lg')}>VK</span>
|
|
23
|
+
<img data-slot="avatar-image" src=${user.avatar} alt="@vivek" class=${avatarImageClass()}>
|
|
24
|
+
</span>`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function userText(user: { name: string; email: string }) {
|
|
28
|
+
return html`<div class="grid flex-1 text-left text-sm leading-tight">
|
|
29
|
+
<span class="truncate font-medium">${user.name}</span>
|
|
30
|
+
<span class="truncate text-xs">${user.email}</span>
|
|
31
|
+
</div>`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function navUser({ user }: { user: { name: string; email: string; avatar: string } }) {
|
|
35
|
+
return html`
|
|
36
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
37
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
38
|
+
<ui-dropdown-menu>
|
|
39
|
+
<ui-dropdown-menu-trigger>
|
|
40
|
+
<button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class=${cn(sidebarMenuButtonClass({ size: 'lg' }), 'aria-expanded:bg-sidebar-accent aria-expanded:text-sidebar-accent-foreground')}>
|
|
41
|
+
${userAvatar(user)}
|
|
42
|
+
${userText(user)}
|
|
43
|
+
${ChevronsUpDownIcon('ml-auto size-4')}
|
|
44
|
+
</button>
|
|
45
|
+
</ui-dropdown-menu-trigger>
|
|
46
|
+
<ui-dropdown-menu-content class="w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg" side="right" align="end">
|
|
47
|
+
<ui-dropdown-menu-label class="p-0 font-normal">
|
|
48
|
+
<div class="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
|
|
49
|
+
${userAvatar(user)}
|
|
50
|
+
${userText(user)}
|
|
51
|
+
</div>
|
|
52
|
+
</ui-dropdown-menu-label>
|
|
53
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
54
|
+
<ui-dropdown-menu-group>
|
|
55
|
+
<ui-dropdown-menu-item>${SparklesIcon()}Upgrade to Pro</ui-dropdown-menu-item>
|
|
56
|
+
</ui-dropdown-menu-group>
|
|
57
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
58
|
+
<ui-dropdown-menu-group>
|
|
59
|
+
<ui-dropdown-menu-item>${BadgeCheckIcon()}Account</ui-dropdown-menu-item>
|
|
60
|
+
<ui-dropdown-menu-item>${CreditCardIcon()}Billing</ui-dropdown-menu-item>
|
|
61
|
+
<ui-dropdown-menu-item>${BellIcon()}Notifications</ui-dropdown-menu-item>
|
|
62
|
+
</ui-dropdown-menu-group>
|
|
63
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
64
|
+
<ui-dropdown-menu-item>${LogOutIcon()}Log out</ui-dropdown-menu-item>
|
|
65
|
+
</ui-dropdown-menu-content>
|
|
66
|
+
</ui-dropdown-menu>
|
|
67
|
+
</li>
|
|
68
|
+
</ul>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-16 search form: a compact search field in the site header. A
|
|
3
|
+
* fragment helper, so it renders on the server and ships no JavaScript.
|
|
4
|
+
* Ported from shadcn/ui's sidebar-16.
|
|
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 { sidebarInputClass } from '../../../components/sidebar.ts';
|
|
15
|
+
import { SearchIcon } from '../../../lib/icons.ts';
|
|
16
|
+
|
|
17
|
+
export function searchForm(opts: { class?: string } = {}) {
|
|
18
|
+
return html`
|
|
19
|
+
<form role="search" class=${opts.class ?? null}>
|
|
20
|
+
<div class="relative">
|
|
21
|
+
<label data-slot="label" for="search" class=${cn(labelClass(), 'sr-only')}>Search</label>
|
|
22
|
+
<input data-slot="sidebar-input" data-sidebar="input" id="search" name="q" placeholder="Type to search..." class=${cn(sidebarInputClass(), 'h-8 pl-7')}>
|
|
23
|
+
${SearchIcon('pointer-events-none absolute top-1/2 left-2 size-4 -translate-y-1/2 opacity-50 select-none')}
|
|
24
|
+
</div>
|
|
25
|
+
</form>
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-16 site header: a sticky bar across the top of the page with
|
|
3
|
+
* the sidebar toggle, a breadcrumb and the search form. A fragment helper;
|
|
4
|
+
* the toggle is the kit's `<ui-sidebar-trigger>`, which finds the provider it
|
|
5
|
+
* sits in. Ported from shadcn/ui's sidebar-16.
|
|
6
|
+
*/
|
|
7
|
+
import { html } from '@webjsdev/core';
|
|
8
|
+
import { cn } from '../../../lib/utils.ts';
|
|
9
|
+
import {
|
|
10
|
+
breadcrumbItemClass,
|
|
11
|
+
breadcrumbLinkClass,
|
|
12
|
+
breadcrumbListClass,
|
|
13
|
+
breadcrumbPageClass,
|
|
14
|
+
breadcrumbSeparatorClass,
|
|
15
|
+
} from '../../../components/breadcrumb.ts';
|
|
16
|
+
import { separatorClass } from '../../../components/separator.ts';
|
|
17
|
+
import '../../../components/sidebar.ts';
|
|
18
|
+
import { searchForm } from './search-form.ts';
|
|
19
|
+
import { ChevronRightIcon } from '../../../lib/icons.ts';
|
|
20
|
+
|
|
21
|
+
export function siteHeader() {
|
|
22
|
+
return html`
|
|
23
|
+
<header class="sticky top-0 z-50 flex w-full items-center border-b bg-background">
|
|
24
|
+
<div class="flex h-(--header-height) w-full items-center gap-2 px-4">
|
|
25
|
+
<ui-sidebar-trigger class="[&>button]:size-8"></ui-sidebar-trigger>
|
|
26
|
+
<div role="none" data-slot="separator" data-orientation="vertical" class=${cn(separatorClass(), 'mr-2 data-vertical:h-4 data-vertical:self-auto')}></div>
|
|
27
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb" class="hidden sm:block">
|
|
28
|
+
<ol data-slot="breadcrumb-list" class=${breadcrumbListClass()}>
|
|
29
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
30
|
+
<a data-slot="breadcrumb-link" class=${breadcrumbLinkClass()} href="#">Build Your Application</a>
|
|
31
|
+
</li>
|
|
32
|
+
<li data-slot="breadcrumb-separator" role="presentation" aria-hidden="true" class=${breadcrumbSeparatorClass()}>${ChevronRightIcon()}</li>
|
|
33
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
34
|
+
<span data-slot="breadcrumb-page" class=${breadcrumbPageClass()} aria-current="page">Data Fetching</span>
|
|
35
|
+
</li>
|
|
36
|
+
</ol>
|
|
37
|
+
</nav>
|
|
38
|
+
${searchForm({ class: 'w-full sm:ml-auto sm:w-auto' })}
|
|
39
|
+
</div>
|
|
40
|
+
</header>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar-16 block's page: a sticky site header across the top, and a
|
|
3
|
+
* sidebar below it beside a placeholder content grid.
|
|
4
|
+
*
|
|
5
|
+
* Installed by `npx @webjsdev/ui add sidebar-16` at `app/dashboard/page.ts`.
|
|
6
|
+
* It is app code you own, so edit it freely. Ported from shadcn/ui's
|
|
7
|
+
* sidebar-16.
|
|
8
|
+
*/
|
|
9
|
+
import { html } from '@webjsdev/core';
|
|
10
|
+
import type { Metadata } from '@webjsdev/core';
|
|
11
|
+
import '../../components/sidebar.ts';
|
|
12
|
+
import { appSidebar } from './components/app-sidebar.ts';
|
|
13
|
+
import { siteHeader } from './components/site-header.ts';
|
|
14
|
+
|
|
15
|
+
export const metadata: Metadata = { title: 'Dashboard' };
|
|
16
|
+
|
|
17
|
+
export default function DashboardPage() {
|
|
18
|
+
return html`
|
|
19
|
+
<div class="[--header-height:calc(--spacing(14))]">
|
|
20
|
+
<ui-sidebar-provider class="[&>[data-slot=sidebar-wrapper]]:flex-col">
|
|
21
|
+
${siteHeader()}
|
|
22
|
+
<div class="flex flex-1">
|
|
23
|
+
${appSidebar()}
|
|
24
|
+
<ui-sidebar-inset>
|
|
25
|
+
<div class="flex flex-1 flex-col gap-4 p-4">
|
|
26
|
+
<div class="grid auto-rows-min gap-4 md:grid-cols-3">
|
|
27
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
28
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
29
|
+
<div class="aspect-video rounded-xl bg-muted/50"></div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="min-h-screen flex-1 rounded-xl bg-muted/50 md:min-h-min"></div>
|
|
32
|
+
</div>
|
|
33
|
+
</ui-sidebar-inset>
|
|
34
|
+
</div>
|
|
35
|
+
</ui-sidebar-provider>
|
|
36
|
+
</div>
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The signup-01 form: a card asking for a name, an email, a password and its
|
|
3
|
+
* confirmation, each with its helper text, and a Google button. A fragment
|
|
4
|
+
* helper (a function returning an `html` template), so it renders on the
|
|
5
|
+
* server and ships no JavaScript. Ported from shadcn/ui's signup-01.
|
|
6
|
+
*
|
|
7
|
+
* The `<form>` has no `action` yet. Bind a server action from a
|
|
8
|
+
* `'use server'` file (`<form action=${signUp}>`) 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 with the
|
|
12
|
+
* typed values in the URL. The Google button is a placeholder for your
|
|
13
|
+
* provider's sign-up link.
|
|
14
|
+
*/
|
|
15
|
+
import { html } from '@webjsdev/core';
|
|
16
|
+
import { cn } from '../../../lib/utils.ts';
|
|
17
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
18
|
+
import {
|
|
19
|
+
cardClass,
|
|
20
|
+
cardContentClass,
|
|
21
|
+
cardDescriptionClass,
|
|
22
|
+
cardHeaderClass,
|
|
23
|
+
cardTitleClass,
|
|
24
|
+
} from '../../../components/card.ts';
|
|
25
|
+
import {
|
|
26
|
+
fieldClass,
|
|
27
|
+
fieldDescriptionClass,
|
|
28
|
+
fieldGroupClass,
|
|
29
|
+
fieldLabelClass,
|
|
30
|
+
} from '../../../components/field.ts';
|
|
31
|
+
import { inputClass } from '../../../components/input.ts';
|
|
32
|
+
|
|
33
|
+
export function signupForm(opts: { class?: string } = {}) {
|
|
34
|
+
return html`
|
|
35
|
+
<div class=${cn(cardClass(), opts.class)} data-slot="card" data-size="default">
|
|
36
|
+
<div class=${cardHeaderClass()} data-slot="card-header">
|
|
37
|
+
<h1 class=${cardTitleClass()} data-slot="card-title">Create an account</h1>
|
|
38
|
+
<p class=${cardDescriptionClass()} data-slot="card-description">Enter your information below to create your account</p>
|
|
39
|
+
</div>
|
|
40
|
+
<div class=${cardContentClass()} data-slot="card-content">
|
|
41
|
+
<form>
|
|
42
|
+
<div class=${fieldGroupClass()} data-slot="field-group">
|
|
43
|
+
<div class=${fieldClass()} data-slot="field" data-orientation="vertical">
|
|
44
|
+
<label class=${fieldLabelClass()} data-slot="field-label" for="name">Full Name</label>
|
|
45
|
+
<input class=${inputClass()} data-slot="input" id="name" name="name" type="text" autocomplete="name" placeholder="John Doe" required>
|
|
46
|
+
</div>
|
|
47
|
+
<div class=${fieldClass()} data-slot="field" data-orientation="vertical">
|
|
48
|
+
<label class=${fieldLabelClass()} data-slot="field-label" for="email">Email</label>
|
|
49
|
+
<input class=${inputClass()} data-slot="input" id="email" name="email" type="email" autocomplete="email" placeholder="m@example.com" aria-describedby="email-description" required>
|
|
50
|
+
<p class=${fieldDescriptionClass()} data-slot="field-description" id="email-description">
|
|
51
|
+
We'll use this to contact you. We will not share your email with anyone else.
|
|
52
|
+
</p>
|
|
53
|
+
</div>
|
|
54
|
+
<div class=${fieldClass()} data-slot="field" data-orientation="vertical">
|
|
55
|
+
<label class=${fieldLabelClass()} data-slot="field-label" for="password">Password</label>
|
|
56
|
+
<input class=${inputClass()} data-slot="input" id="password" name="password" type="password" autocomplete="new-password" minlength="8" aria-describedby="password-description" required>
|
|
57
|
+
<p class=${fieldDescriptionClass()} data-slot="field-description" id="password-description">Must be at least 8 characters long.</p>
|
|
58
|
+
</div>
|
|
59
|
+
<div class=${fieldClass()} data-slot="field" data-orientation="vertical">
|
|
60
|
+
<label class=${fieldLabelClass()} data-slot="field-label" for="confirm-password">Confirm Password</label>
|
|
61
|
+
<input class=${inputClass()} data-slot="input" id="confirm-password" name="confirmPassword" type="password" autocomplete="new-password" aria-describedby="confirm-password-description" required>
|
|
62
|
+
<p class=${fieldDescriptionClass()} data-slot="field-description" id="confirm-password-description">Please confirm your password.</p>
|
|
63
|
+
</div>
|
|
64
|
+
<div class=${fieldGroupClass()} data-slot="field-group">
|
|
65
|
+
<div class=${fieldClass()} data-slot="field" data-orientation="vertical">
|
|
66
|
+
<button class=${buttonClass()} data-slot="button" type="submit">Create Account</button>
|
|
67
|
+
<button class=${buttonClass({ variant: 'outline' })} data-slot="button" type="button">Sign up with Google</button>
|
|
68
|
+
<p class=${cn(fieldDescriptionClass(), 'px-6 text-center')} data-slot="field-description">
|
|
69
|
+
Already have an account? <a href="/login">Sign in</a>
|
|
70
|
+
</p>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</form>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The signup-01 block's page: a simple signup form, centred on the page.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add signup-01` at `app/signup/page.ts`. It
|
|
5
|
+
* is app code you own, so edit it freely. Ported from shadcn/ui's signup-01.
|
|
6
|
+
*/
|
|
7
|
+
import { html } from '@webjsdev/core';
|
|
8
|
+
import type { Metadata } from '@webjsdev/core';
|
|
9
|
+
import { signupForm } from './components/signup-form.ts';
|
|
10
|
+
|
|
11
|
+
export const metadata: Metadata = { title: 'Sign up' };
|
|
12
|
+
|
|
13
|
+
export default function SignupPage() {
|
|
14
|
+
return html`
|
|
15
|
+
<div class="flex min-h-svh w-full items-center justify-center p-6 md:p-10">
|
|
16
|
+
<div class="w-full max-w-sm">${signupForm()}</div>
|
|
17
|
+
</div>
|
|
18
|
+
`;
|
|
19
|
+
}
|