@webjsdev/ui 0.3.16 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -10
- package/THIRD_PARTY_NOTICES.md +349 -0
- package/package.json +4 -2
- package/packages/registry/blocks/_shared/placeholder.svg +1 -0
- package/packages/registry/blocks/charts/chart-area-axes.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-default.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-gradient.ts +82 -0
- package/packages/registry/blocks/charts/chart-area-icons.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-interactive.ts +204 -0
- package/packages/registry/blocks/charts/chart-area-legend.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-linear.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-stacked-expand.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-stacked.ts +71 -0
- package/packages/registry/blocks/charts/chart-area-step.ts +68 -0
- package/packages/registry/blocks/charts/chart-bar-active.ts +93 -0
- package/packages/registry/blocks/charts/chart-bar-default.ts +60 -0
- package/packages/registry/blocks/charts/chart-bar-horizontal.ts +62 -0
- package/packages/registry/blocks/charts/chart-bar-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-bar-label-custom.ts +78 -0
- package/packages/registry/blocks/charts/chart-bar-label.ts +66 -0
- package/packages/registry/blocks/charts/chart-bar-mixed.ts +87 -0
- package/packages/registry/blocks/charts/chart-bar-multiple.ts +67 -0
- package/packages/registry/blocks/charts/chart-bar-negative.ts +61 -0
- package/packages/registry/blocks/charts/chart-bar-stacked.ts +68 -0
- package/packages/registry/blocks/charts/chart-line-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-dots-colors.ts +86 -0
- package/packages/registry/blocks/charts/chart-line-dots-custom.ts +75 -0
- package/packages/registry/blocks/charts/chart-line-dots.ts +65 -0
- package/packages/registry/blocks/charts/chart-line-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-line-label-custom.ts +94 -0
- package/packages/registry/blocks/charts/chart-line-label.ts +73 -0
- package/packages/registry/blocks/charts/chart-line-linear.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-multiple.ts +71 -0
- package/packages/registry/blocks/charts/chart-line-step.ts +61 -0
- package/packages/registry/blocks/charts/chart-pie-donut-active.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-donut-text.ts +89 -0
- package/packages/registry/blocks/charts/chart-pie-donut.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-interactive.ts +120 -0
- package/packages/registry/blocks/charts/chart-pie-label-custom.ts +82 -0
- package/packages/registry/blocks/charts/chart-pie-label-list.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-label.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-legend.ts +79 -0
- package/packages/registry/blocks/charts/chart-pie-separator-none.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-simple.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-stacked.ts +99 -0
- package/packages/registry/blocks/charts/chart-radar-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-dots.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-no-lines.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-custom.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-none.ts +60 -0
- package/packages/registry/blocks/charts/chart-radar-icons.ts +76 -0
- package/packages/registry/blocks/charts/chart-radar-label-custom.ts +77 -0
- package/packages/registry/blocks/charts/chart-radar-legend.ts +70 -0
- package/packages/registry/blocks/charts/chart-radar-lines-only.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-multiple.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-radius.ts +68 -0
- package/packages/registry/blocks/charts/chart-radial-grid.ts +80 -0
- package/packages/registry/blocks/charts/chart-radial-label.ts +85 -0
- package/packages/registry/blocks/charts/chart-radial-shape.ts +81 -0
- package/packages/registry/blocks/charts/chart-radial-simple.ts +79 -0
- package/packages/registry/blocks/charts/chart-radial-stacked.ts +69 -0
- package/packages/registry/blocks/charts/chart-radial-text.ts +82 -0
- package/packages/registry/blocks/charts/chart-tooltip-advanced.ts +84 -0
- package/packages/registry/blocks/charts/chart-tooltip-default.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-formatter.ts +75 -0
- package/packages/registry/blocks/charts/chart-tooltip-icons.ts +68 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-line.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-none.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-custom.ts +65 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-formatter.ts +66 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-none.ts +62 -0
- package/packages/registry/blocks/dashboard-01/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/dashboard-01/components/chart-area-interactive.ts +276 -0
- package/packages/registry/blocks/dashboard-01/components/dashboard-data.ts +89 -0
- package/packages/registry/blocks/dashboard-01/components/data-table.ts +637 -0
- package/packages/registry/blocks/dashboard-01/components/nav-documents.ts +65 -0
- package/packages/registry/blocks/dashboard-01/components/nav-main.ts +61 -0
- package/packages/registry/blocks/dashboard-01/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/dashboard-01/components/nav-user.ts +66 -0
- package/packages/registry/blocks/dashboard-01/components/section-cards.ts +59 -0
- package/packages/registry/blocks/dashboard-01/components/site-header.ts +52 -0
- package/packages/registry/blocks/dashboard-01/page.ts +39 -0
- package/packages/registry/blocks/login-01/components/login-form.ts +70 -0
- package/packages/registry/blocks/login-01/page.ts +19 -0
- package/packages/registry/blocks/login-02/components/login-form.ts +68 -0
- package/packages/registry/blocks/login-02/page.ts +36 -0
- package/packages/registry/blocks/login-03/components/login-form.ts +89 -0
- package/packages/registry/blocks/login-03/page.ts +28 -0
- package/packages/registry/blocks/login-04/components/login-form.ts +91 -0
- package/packages/registry/blocks/login-04/page.ts +20 -0
- package/packages/registry/blocks/login-05/components/login-form.ts +75 -0
- package/packages/registry/blocks/login-05/page.ts +19 -0
- package/packages/registry/blocks/preview/cards/activate-agent-dialog.ts +77 -0
- package/packages/registry/blocks/preview/cards/analytics-card.ts +64 -0
- package/packages/registry/blocks/preview/cards/anomaly-alert.ts +35 -0
- package/packages/registry/blocks/preview/cards/bar-chart-card.ts +91 -0
- package/packages/registry/blocks/preview/cards/book-appointment.ts +51 -0
- package/packages/registry/blocks/preview/cards/codespaces-card.ts +172 -0
- package/packages/registry/blocks/preview/cards/contributions-activity.ts +63 -0
- package/packages/registry/blocks/preview/cards/contributors.ts +51 -0
- package/packages/registry/blocks/preview/cards/environment-variables.ts +47 -0
- package/packages/registry/blocks/preview/cards/feedback-form.ts +61 -0
- package/packages/registry/blocks/preview/cards/file-upload.ts +51 -0
- package/packages/registry/blocks/preview/cards/github-profile.ts +66 -0
- package/packages/registry/blocks/preview/cards/icon-preview-grid.ts +47 -0
- package/packages/registry/blocks/preview/cards/invite-team.ts +78 -0
- package/packages/registry/blocks/preview/cards/invoice.ts +91 -0
- package/packages/registry/blocks/preview/cards/live-waveform.ts +330 -0
- package/packages/registry/blocks/preview/cards/no-team-members.ts +61 -0
- package/packages/registry/blocks/preview/cards/not-found.ts +46 -0
- package/packages/registry/blocks/preview/cards/observability-card.ts +44 -0
- package/packages/registry/blocks/preview/cards/pie-chart-card.ts +84 -0
- package/packages/registry/blocks/preview/cards/report-bug.ts +71 -0
- package/packages/registry/blocks/preview/cards/shipping-address.ts +79 -0
- package/packages/registry/blocks/preview/cards/shortcuts.ts +57 -0
- package/packages/registry/blocks/preview/cards/skeleton-loading.ts +37 -0
- package/packages/registry/blocks/preview/cards/sleep-report.ts +85 -0
- package/packages/registry/blocks/preview/cards/style-overview.ts +64 -0
- package/packages/registry/blocks/preview/cards/typography-specimen.ts +107 -0
- package/packages/registry/blocks/preview/cards/ui-elements.ts +164 -0
- package/packages/registry/blocks/preview/cards/usage-card.ts +63 -0
- package/packages/registry/blocks/preview/cards/visitors.ts +71 -0
- package/packages/registry/blocks/preview/cards/weekly-fitness-summary.ts +54 -0
- package/packages/registry/blocks/preview/page.ts +103 -0
- package/packages/registry/blocks/preview-02/cards/account-access.ts +70 -0
- package/packages/registry/blocks/preview-02/cards/card-overview.ts +75 -0
- package/packages/registry/blocks/preview-02/cards/claimable-balance.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/contribution-history.ts +80 -0
- package/packages/registry/blocks/preview-02/cards/cover-art.ts +41 -0
- package/packages/registry/blocks/preview-02/cards/dividend-income.ts +76 -0
- package/packages/registry/blocks/preview-02/cards/empty-connect-bank.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-distribute-track.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-explore-catalog.ts +39 -0
- package/packages/registry/blocks/preview-02/cards/faq.ts +79 -0
- package/packages/registry/blocks/preview-02/cards/front-door.ts +40 -0
- package/packages/registry/blocks/preview-02/cards/index-investing.ts +31 -0
- package/packages/registry/blocks/preview-02/cards/kitchen-island.ts +90 -0
- package/packages/registry/blocks/preview-02/cards/loading-card.ts +34 -0
- package/packages/registry/blocks/preview-02/cards/new-milestone.ts +53 -0
- package/packages/registry/blocks/preview-02/cards/notification-settings.ts +126 -0
- package/packages/registry/blocks/preview-02/cards/payments.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/payout-threshold.ts +92 -0
- package/packages/registry/blocks/preview-02/cards/power-usage.ts +84 -0
- package/packages/registry/blocks/preview-02/cards/preferences.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/qr-connect.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/receiving-method.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/recent-transactions.ts +101 -0
- package/packages/registry/blocks/preview-02/cards/release-catalog.ts +73 -0
- package/packages/registry/blocks/preview-02/cards/roller-shades.ts +110 -0
- package/packages/registry/blocks/preview-02/cards/savings-progress.ts +68 -0
- package/packages/registry/blocks/preview-02/cards/savings-targets.ts +132 -0
- package/packages/registry/blocks/preview-02/cards/sidebar-nav.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/social-links.ts +57 -0
- package/packages/registry/blocks/preview-02/cards/stock-performance.ts +106 -0
- package/packages/registry/blocks/preview-02/cards/syncing-state.ts +37 -0
- package/packages/registry/blocks/preview-02/cards/transfer-funds.ts +111 -0
- package/packages/registry/blocks/preview-02/cards/upcoming-payments.ts +69 -0
- package/packages/registry/blocks/preview-02/page.ts +111 -0
- package/packages/registry/blocks/preview-03/cards/files-chat.ts +75 -0
- package/packages/registry/blocks/preview-03/cards/group-chat.ts +114 -0
- package/packages/registry/blocks/preview-03/cards/reasoning-chat.ts +88 -0
- package/packages/registry/blocks/preview-03/cards/simple-chat.ts +53 -0
- package/packages/registry/blocks/preview-03/components/chat-card.ts +126 -0
- package/packages/registry/blocks/preview-03/components/chat-player.ts +174 -0
- package/packages/registry/blocks/preview-03/components/part-file.ts +77 -0
- package/packages/registry/blocks/preview-03/components/part-reasoning.ts +25 -0
- package/packages/registry/blocks/preview-03/components/part-source.ts +48 -0
- package/packages/registry/blocks/preview-03/components/part-text.ts +69 -0
- package/packages/registry/blocks/preview-03/components/part-tool.ts +71 -0
- package/packages/registry/blocks/preview-03/components/prompt-input.ts +86 -0
- package/packages/registry/blocks/preview-03/page.ts +39 -0
- package/packages/registry/blocks/sidebar-01/components/app-sidebar.ts +113 -0
- package/packages/registry/blocks/sidebar-01/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-01/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-01/page.ts +58 -0
- package/packages/registry/blocks/sidebar-02/components/app-sidebar.ts +131 -0
- package/packages/registry/blocks/sidebar-02/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-02/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-02/page.ts +53 -0
- package/packages/registry/blocks/sidebar-03/components/app-sidebar.ts +134 -0
- package/packages/registry/blocks/sidebar-03/page.ts +60 -0
- package/packages/registry/blocks/sidebar-04/components/app-sidebar.ts +136 -0
- package/packages/registry/blocks/sidebar-04/page.ts +58 -0
- package/packages/registry/blocks/sidebar-05/components/app-sidebar.ts +147 -0
- package/packages/registry/blocks/sidebar-05/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-05/page.ts +58 -0
- package/packages/registry/blocks/sidebar-06/components/app-sidebar.ts +105 -0
- package/packages/registry/blocks/sidebar-06/components/nav-main.ts +56 -0
- package/packages/registry/blocks/sidebar-06/components/sidebar-opt-in-form.ts +44 -0
- package/packages/registry/blocks/sidebar-06/page.ts +57 -0
- package/packages/registry/blocks/sidebar-07/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/sidebar-07/components/nav-main.ts +61 -0
- package/packages/registry/blocks/sidebar-07/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-07/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-07/components/team-switcher.ts +66 -0
- package/packages/registry/blocks/sidebar-07/page.ts +59 -0
- package/packages/registry/blocks/sidebar-08/components/app-sidebar.ts +122 -0
- package/packages/registry/blocks/sidebar-08/components/nav-main.ts +68 -0
- package/packages/registry/blocks/sidebar-08/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-08/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-08/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-08/page.ts +59 -0
- package/packages/registry/blocks/sidebar-09/components/app-sidebar.ts +213 -0
- package/packages/registry/blocks/sidebar-09/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-09/page.ts +52 -0
- package/packages/registry/blocks/sidebar-10/components/app-sidebar.ts +125 -0
- package/packages/registry/blocks/sidebar-10/components/nav-actions.ts +84 -0
- package/packages/registry/blocks/sidebar-10/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-10/components/nav-main.ts +37 -0
- package/packages/registry/blocks/sidebar-10/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-10/components/nav-workspaces.ts +78 -0
- package/packages/registry/blocks/sidebar-10/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-10/page.ts +46 -0
- package/packages/registry/blocks/sidebar-11/components/app-sidebar.ts +114 -0
- package/packages/registry/blocks/sidebar-11/page.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/app-sidebar.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-12/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-12/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-12/page.ts +43 -0
- package/packages/registry/blocks/sidebar-13/components/settings-dialog.ts +114 -0
- package/packages/registry/blocks/sidebar-13/page.ts +21 -0
- package/packages/registry/blocks/sidebar-14/components/app-sidebar.ts +120 -0
- package/packages/registry/blocks/sidebar-14/page.ts +55 -0
- package/packages/registry/blocks/sidebar-15/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-15/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-15/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-15/components/nav-main.ts +35 -0
- package/packages/registry/blocks/sidebar-15/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-15/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-15/components/nav-workspaces.ts +75 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-left.ts +126 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-right.ts +62 -0
- package/packages/registry/blocks/sidebar-15/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-15/page.ts +47 -0
- package/packages/registry/blocks/sidebar-16/components/app-sidebar.ts +124 -0
- package/packages/registry/blocks/sidebar-16/components/nav-main.ts +67 -0
- package/packages/registry/blocks/sidebar-16/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-16/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-16/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-16/components/search-form.ts +27 -0
- package/packages/registry/blocks/sidebar-16/components/site-header.ts +42 -0
- package/packages/registry/blocks/sidebar-16/page.ts +38 -0
- package/packages/registry/blocks/signup-01/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-01/page.ts +19 -0
- package/packages/registry/blocks/signup-02/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-02/page.ts +36 -0
- package/packages/registry/blocks/signup-03/components/signup-form.ts +79 -0
- package/packages/registry/blocks/signup-03/page.ts +28 -0
- package/packages/registry/blocks/signup-04/components/signup-form.ts +100 -0
- package/packages/registry/blocks/signup-04/page.ts +20 -0
- package/packages/registry/blocks/signup-05/components/signup-form.ts +75 -0
- package/packages/registry/blocks/signup-05/page.ts +20 -0
- package/packages/registry/components/accordion.ts +20 -7
- package/packages/registry/components/alert-dialog.ts +58 -13
- package/packages/registry/components/alert.ts +11 -6
- package/packages/registry/components/attachment.ts +119 -0
- package/packages/registry/components/avatar.ts +17 -8
- package/packages/registry/components/badge.ts +16 -9
- package/packages/registry/components/breadcrumb.ts +6 -6
- package/packages/registry/components/bubble.ts +95 -0
- package/packages/registry/components/button-group.ts +73 -0
- package/packages/registry/components/button.ts +35 -25
- package/packages/registry/components/calendar.ts +566 -0
- package/packages/registry/components/card.ts +8 -8
- package/packages/registry/components/carousel.ts +352 -0
- package/packages/registry/components/chart-element.ts +547 -0
- package/packages/registry/components/chart-geometry.ts +457 -0
- package/packages/registry/components/chart.ts +932 -0
- package/packages/registry/components/checkbox.ts +22 -84
- package/packages/registry/components/code-block.ts +191 -0
- package/packages/registry/components/collapsible.ts +5 -2
- package/packages/registry/components/combobox.ts +802 -0
- package/packages/registry/components/command.ts +618 -0
- package/packages/registry/components/context-menu.ts +302 -0
- package/packages/registry/components/dialog.ts +156 -45
- package/packages/registry/components/direction.ts +43 -0
- package/packages/registry/components/drawer.ts +226 -0
- package/packages/registry/components/dropdown-menu.ts +262 -83
- package/packages/registry/components/empty.ts +88 -0
- package/packages/registry/components/field.ts +165 -0
- package/packages/registry/components/floating.ts +124 -0
- package/packages/registry/components/hover-card.ts +19 -8
- package/packages/registry/components/input-group.ts +118 -0
- package/packages/registry/components/input-otp.ts +365 -0
- package/packages/registry/components/input.ts +3 -3
- package/packages/registry/components/item.ts +134 -0
- package/packages/registry/components/kbd.ts +2 -2
- package/packages/registry/components/label.ts +1 -1
- package/packages/registry/components/marker.ts +63 -0
- package/packages/registry/components/menubar.ts +388 -0
- package/packages/registry/components/message-scroller.ts +470 -0
- package/packages/registry/components/message.ts +69 -0
- package/packages/registry/components/native-select.ts +5 -5
- package/packages/registry/components/navigation-menu.ts +564 -0
- package/packages/registry/components/pagination.ts +5 -5
- package/packages/registry/components/popover.ts +30 -84
- package/packages/registry/components/progress.ts +7 -3
- package/packages/registry/components/questionnaire.ts +840 -0
- package/packages/registry/components/radio-group.ts +18 -73
- package/packages/registry/components/resizable.ts +330 -0
- package/packages/registry/components/scroll-area.ts +46 -0
- package/packages/registry/components/select.ts +650 -0
- package/packages/registry/components/separator.ts +1 -1
- package/packages/registry/components/sheet.ts +128 -0
- package/packages/registry/components/sidebar.ts +457 -0
- package/packages/registry/components/skeleton.ts +1 -1
- package/packages/registry/components/slider.ts +333 -0
- package/packages/registry/components/sonner.ts +74 -7
- package/packages/registry/components/spinner.ts +66 -0
- package/packages/registry/components/switch.ts +117 -9
- package/packages/registry/components/table.ts +11 -9
- package/packages/registry/components/tabs.ts +76 -25
- package/packages/registry/components/textarea.ts +1 -1
- package/packages/registry/components/toggle-group.ts +30 -11
- package/packages/registry/components/toggle.ts +20 -13
- package/packages/registry/components/tooltip.ts +68 -7
- package/packages/registry/components/trace.ts +75 -0
- package/packages/registry/lib/icons-hugeicons.ts +955 -0
- package/packages/registry/lib/icons-phosphor.ts +955 -0
- package/packages/registry/lib/icons-remixicon.ts +955 -0
- package/packages/registry/lib/icons-tabler.ts +955 -0
- package/packages/registry/lib/icons.ts +768 -0
- package/packages/registry/lib/utils.ts +49 -4
- package/packages/registry/registry.json +4092 -60
- package/packages/registry/styles/shadcn-tailwind.css +654 -0
- package/packages/registry/styles/style-luma.css +1987 -0
- package/packages/registry/styles/style-lyra.css +1965 -0
- package/packages/registry/styles/style-maia.css +1987 -0
- package/packages/registry/styles/style-mira.css +1992 -0
- package/packages/registry/styles/style-new-york.css +1597 -0
- package/packages/registry/styles/style-nova.css +1990 -0
- package/packages/registry/styles/style-rhea.css +1987 -0
- package/packages/registry/styles/style-sera.css +1977 -0
- package/packages/registry/styles/style-vega.css +1990 -0
- package/packages/registry/styles/supplement.json +54 -0
- package/packages/registry/styles/tw-animate.css +6 -0
- package/packages/registry/themes/base-colors.js +8 -2
- package/packages/registry/themes/fonts.js +120 -0
- package/packages/registry/themes/index.css +2 -0
- package/packages/registry/themes/items.js +61 -0
- package/packages/registry/themes/preset.js +302 -0
- package/packages/registry/themes/themes.js +1193 -0
- package/src/commands/add.js +236 -12
- package/src/commands/diff.js +34 -20
- package/src/commands/info.js +7 -0
- package/src/commands/init.js +125 -8
- package/src/commands/list.js +43 -11
- package/src/commands/view.js +33 -5
- package/src/registry/extract.js +192 -2
- package/src/registry/icons.js +31 -0
- package/src/registry/local.js +15 -1
- package/src/registry/schema.js +13 -0
- package/src/registry/style-bake.js +506 -0
- package/src/utils/theme.js +110 -21
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An interactive line chart, a chart block ported from shadcn/ui's chart-line-interactive.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-interactive` at
|
|
5
|
+
* `components/charts/chart-line-interactive.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineInteractive()}`.
|
|
7
|
+
*
|
|
8
|
+
* The two series buttons are radio inputs, and both charts are served; the
|
|
9
|
+
* card shows the chosen one through `:has()`, so the switch works with
|
|
10
|
+
* JavaScript off. shadcn's re-renders one chart from React state instead.
|
|
11
|
+
*/
|
|
12
|
+
import { html } from '@webjsdev/core';
|
|
13
|
+
import { cn } from '../../lib/utils.ts';
|
|
14
|
+
import {
|
|
15
|
+
cardClass, cardContentClass, cardDescriptionClass, cardHeaderClass, cardTitleClass,
|
|
16
|
+
} from '../../components/card.ts';
|
|
17
|
+
import { lineChart, type ChartConfig } from '../../components/chart.ts';
|
|
18
|
+
|
|
19
|
+
const chartData = [
|
|
20
|
+
{ date: '2024-04-01', desktop: 222, mobile: 150 },
|
|
21
|
+
{ date: '2024-04-02', desktop: 97, mobile: 180 },
|
|
22
|
+
{ date: '2024-04-03', desktop: 167, mobile: 120 },
|
|
23
|
+
{ date: '2024-04-04', desktop: 242, mobile: 260 },
|
|
24
|
+
{ date: '2024-04-05', desktop: 373, mobile: 290 },
|
|
25
|
+
{ date: '2024-04-06', desktop: 301, mobile: 340 },
|
|
26
|
+
{ date: '2024-04-07', desktop: 245, mobile: 180 },
|
|
27
|
+
{ date: '2024-04-08', desktop: 409, mobile: 320 },
|
|
28
|
+
{ date: '2024-04-09', desktop: 59, mobile: 110 },
|
|
29
|
+
{ date: '2024-04-10', desktop: 261, mobile: 190 },
|
|
30
|
+
{ date: '2024-04-11', desktop: 327, mobile: 350 },
|
|
31
|
+
{ date: '2024-04-12', desktop: 292, mobile: 210 },
|
|
32
|
+
{ date: '2024-04-13', desktop: 342, mobile: 380 },
|
|
33
|
+
{ date: '2024-04-14', desktop: 137, mobile: 220 },
|
|
34
|
+
{ date: '2024-04-15', desktop: 120, mobile: 170 },
|
|
35
|
+
{ date: '2024-04-16', desktop: 138, mobile: 190 },
|
|
36
|
+
{ date: '2024-04-17', desktop: 446, mobile: 360 },
|
|
37
|
+
{ date: '2024-04-18', desktop: 364, mobile: 410 },
|
|
38
|
+
{ date: '2024-04-19', desktop: 243, mobile: 180 },
|
|
39
|
+
{ date: '2024-04-20', desktop: 89, mobile: 150 },
|
|
40
|
+
{ date: '2024-04-21', desktop: 137, mobile: 200 },
|
|
41
|
+
{ date: '2024-04-22', desktop: 224, mobile: 170 },
|
|
42
|
+
{ date: '2024-04-23', desktop: 138, mobile: 230 },
|
|
43
|
+
{ date: '2024-04-24', desktop: 387, mobile: 290 },
|
|
44
|
+
{ date: '2024-04-25', desktop: 215, mobile: 250 },
|
|
45
|
+
{ date: '2024-04-26', desktop: 75, mobile: 130 },
|
|
46
|
+
{ date: '2024-04-27', desktop: 383, mobile: 420 },
|
|
47
|
+
{ date: '2024-04-28', desktop: 122, mobile: 180 },
|
|
48
|
+
{ date: '2024-04-29', desktop: 315, mobile: 240 },
|
|
49
|
+
{ date: '2024-04-30', desktop: 454, mobile: 380 },
|
|
50
|
+
{ date: '2024-05-01', desktop: 165, mobile: 220 },
|
|
51
|
+
{ date: '2024-05-02', desktop: 293, mobile: 310 },
|
|
52
|
+
{ date: '2024-05-03', desktop: 247, mobile: 190 },
|
|
53
|
+
{ date: '2024-05-04', desktop: 385, mobile: 420 },
|
|
54
|
+
{ date: '2024-05-05', desktop: 481, mobile: 390 },
|
|
55
|
+
{ date: '2024-05-06', desktop: 498, mobile: 520 },
|
|
56
|
+
{ date: '2024-05-07', desktop: 388, mobile: 300 },
|
|
57
|
+
{ date: '2024-05-08', desktop: 149, mobile: 210 },
|
|
58
|
+
{ date: '2024-05-09', desktop: 227, mobile: 180 },
|
|
59
|
+
{ date: '2024-05-10', desktop: 293, mobile: 330 },
|
|
60
|
+
{ date: '2024-05-11', desktop: 335, mobile: 270 },
|
|
61
|
+
{ date: '2024-05-12', desktop: 197, mobile: 240 },
|
|
62
|
+
{ date: '2024-05-13', desktop: 197, mobile: 160 },
|
|
63
|
+
{ date: '2024-05-14', desktop: 448, mobile: 490 },
|
|
64
|
+
{ date: '2024-05-15', desktop: 473, mobile: 380 },
|
|
65
|
+
{ date: '2024-05-16', desktop: 338, mobile: 400 },
|
|
66
|
+
{ date: '2024-05-17', desktop: 499, mobile: 420 },
|
|
67
|
+
{ date: '2024-05-18', desktop: 315, mobile: 350 },
|
|
68
|
+
{ date: '2024-05-19', desktop: 235, mobile: 180 },
|
|
69
|
+
{ date: '2024-05-20', desktop: 177, mobile: 230 },
|
|
70
|
+
{ date: '2024-05-21', desktop: 82, mobile: 140 },
|
|
71
|
+
{ date: '2024-05-22', desktop: 81, mobile: 120 },
|
|
72
|
+
{ date: '2024-05-23', desktop: 252, mobile: 290 },
|
|
73
|
+
{ date: '2024-05-24', desktop: 294, mobile: 220 },
|
|
74
|
+
{ date: '2024-05-25', desktop: 201, mobile: 250 },
|
|
75
|
+
{ date: '2024-05-26', desktop: 213, mobile: 170 },
|
|
76
|
+
{ date: '2024-05-27', desktop: 420, mobile: 460 },
|
|
77
|
+
{ date: '2024-05-28', desktop: 233, mobile: 190 },
|
|
78
|
+
{ date: '2024-05-29', desktop: 78, mobile: 130 },
|
|
79
|
+
{ date: '2024-05-30', desktop: 340, mobile: 280 },
|
|
80
|
+
{ date: '2024-05-31', desktop: 178, mobile: 230 },
|
|
81
|
+
{ date: '2024-06-01', desktop: 178, mobile: 200 },
|
|
82
|
+
{ date: '2024-06-02', desktop: 470, mobile: 410 },
|
|
83
|
+
{ date: '2024-06-03', desktop: 103, mobile: 160 },
|
|
84
|
+
{ date: '2024-06-04', desktop: 439, mobile: 380 },
|
|
85
|
+
{ date: '2024-06-05', desktop: 88, mobile: 140 },
|
|
86
|
+
{ date: '2024-06-06', desktop: 294, mobile: 250 },
|
|
87
|
+
{ date: '2024-06-07', desktop: 323, mobile: 370 },
|
|
88
|
+
{ date: '2024-06-08', desktop: 385, mobile: 320 },
|
|
89
|
+
{ date: '2024-06-09', desktop: 438, mobile: 480 },
|
|
90
|
+
{ date: '2024-06-10', desktop: 155, mobile: 200 },
|
|
91
|
+
{ date: '2024-06-11', desktop: 92, mobile: 150 },
|
|
92
|
+
{ date: '2024-06-12', desktop: 492, mobile: 420 },
|
|
93
|
+
{ date: '2024-06-13', desktop: 81, mobile: 130 },
|
|
94
|
+
{ date: '2024-06-14', desktop: 426, mobile: 380 },
|
|
95
|
+
{ date: '2024-06-15', desktop: 307, mobile: 350 },
|
|
96
|
+
{ date: '2024-06-16', desktop: 371, mobile: 310 },
|
|
97
|
+
{ date: '2024-06-17', desktop: 475, mobile: 520 },
|
|
98
|
+
{ date: '2024-06-18', desktop: 107, mobile: 170 },
|
|
99
|
+
{ date: '2024-06-19', desktop: 341, mobile: 290 },
|
|
100
|
+
{ date: '2024-06-20', desktop: 408, mobile: 450 },
|
|
101
|
+
{ date: '2024-06-21', desktop: 169, mobile: 210 },
|
|
102
|
+
{ date: '2024-06-22', desktop: 317, mobile: 270 },
|
|
103
|
+
{ date: '2024-06-23', desktop: 480, mobile: 530 },
|
|
104
|
+
{ date: '2024-06-24', desktop: 132, mobile: 180 },
|
|
105
|
+
{ date: '2024-06-25', desktop: 141, mobile: 190 },
|
|
106
|
+
{ date: '2024-06-26', desktop: 434, mobile: 380 },
|
|
107
|
+
{ date: '2024-06-27', desktop: 448, mobile: 490 },
|
|
108
|
+
{ date: '2024-06-28', desktop: 149, mobile: 200 },
|
|
109
|
+
{ date: '2024-06-29', desktop: 103, mobile: 160 },
|
|
110
|
+
{ date: '2024-06-30', desktop: 446, mobile: 400 },
|
|
111
|
+
];
|
|
112
|
+
|
|
113
|
+
const chartConfig = {
|
|
114
|
+
views: {
|
|
115
|
+
label: 'Page Views',
|
|
116
|
+
},
|
|
117
|
+
desktop: {
|
|
118
|
+
label: 'Desktop',
|
|
119
|
+
color: 'var(--chart-1)',
|
|
120
|
+
},
|
|
121
|
+
mobile: {
|
|
122
|
+
label: 'Mobile',
|
|
123
|
+
color: 'var(--chart-2)',
|
|
124
|
+
},
|
|
125
|
+
} satisfies ChartConfig;
|
|
126
|
+
|
|
127
|
+
const total = {
|
|
128
|
+
desktop: chartData.reduce((acc, curr) => acc + curr.desktop, 0),
|
|
129
|
+
mobile: chartData.reduce((acc, curr) => acc + curr.mobile, 0),
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const day = (value: unknown, opts: Intl.DateTimeFormatOptions) =>
|
|
133
|
+
new Date(String(value)).toLocaleDateString('en-US', { ...opts, timeZone: 'UTC' });
|
|
134
|
+
|
|
135
|
+
function chart(key: 'desktop' | 'mobile') {
|
|
136
|
+
return lineChart({
|
|
137
|
+
config: chartConfig,
|
|
138
|
+
class: 'aspect-auto h-[250px] w-full',
|
|
139
|
+
width: 1260,
|
|
140
|
+
height: 250,
|
|
141
|
+
data: chartData,
|
|
142
|
+
title: `${chartConfig[key].label} page views, April to June 2024`,
|
|
143
|
+
margin: { left: 12, right: 12 },
|
|
144
|
+
grid: { vertical: false },
|
|
145
|
+
xAxis: {
|
|
146
|
+
dataKey: 'date',
|
|
147
|
+
tickLine: false,
|
|
148
|
+
axisLine: false,
|
|
149
|
+
tickMargin: 8,
|
|
150
|
+
minTickGap: 32,
|
|
151
|
+
tickFormatter: (value) => day(value, { month: 'short', day: 'numeric' }),
|
|
152
|
+
},
|
|
153
|
+
tooltip: {
|
|
154
|
+
class: 'w-[150px]',
|
|
155
|
+
nameKey: 'views',
|
|
156
|
+
labelFormatter: (value) => day(value, { month: 'short', day: 'numeric', year: 'numeric' }),
|
|
157
|
+
},
|
|
158
|
+
lines: [{ dataKey: key, type: 'monotone', stroke: `var(--color-${key})`, strokeWidth: 2, dot: false }],
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export default function ChartLineInteractive() {
|
|
163
|
+
return html`
|
|
164
|
+
<div data-slot="card" class=${cn(cardClass(), 'group/chart py-4 sm:py-0')}>
|
|
165
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'flex flex-col items-stretch border-b p-0! sm:flex-row')}>
|
|
166
|
+
<div class="flex flex-1 flex-col justify-center gap-1 px-6 pb-3 sm:pb-0">
|
|
167
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Line Chart - Interactive</div>
|
|
168
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Showing total visitors for the last 3 months</div>
|
|
169
|
+
</div>
|
|
170
|
+
<div class="flex" role="radiogroup" aria-label="Series">
|
|
171
|
+
${(['desktop', 'mobile'] as const).map((key) => html`
|
|
172
|
+
<label class="flex flex-1 cursor-pointer flex-col justify-center gap-1 border-t px-6 py-4 text-left even:border-l has-checked:bg-muted/50 has-focus-visible:ring-2 has-focus-visible:ring-ring sm:border-t-0 sm:border-l sm:px-8 sm:py-6">
|
|
173
|
+
<input type="radio" name="chart-line-interactive" value=${key} ?checked=${key === 'desktop'} class="sr-only">
|
|
174
|
+
<span class="text-xs text-muted-foreground">${chartConfig[key].label}</span>
|
|
175
|
+
<span class="text-lg leading-none font-bold sm:text-3xl">${total[key].toLocaleString('en-US')}</span>
|
|
176
|
+
</label>`)}
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'px-2 sm:p-6')}>
|
|
180
|
+
<div class="group-has-[input[value=mobile]:checked]/chart:hidden">${chart('desktop')}</div>
|
|
181
|
+
<div class="hidden group-has-[input[value=mobile]:checked]/chart:block">${chart('mobile')}</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
`;
|
|
185
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A line chart with a custom label, a chart block ported from shadcn/ui's chart-line-label-custom.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-label-custom` at
|
|
5
|
+
* `components/charts/chart-line-label-custom.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineLabelCustom()}`.
|
|
7
|
+
*/
|
|
8
|
+
import { html, svg } from '@webjsdev/core';
|
|
9
|
+
import { cn } from '../../lib/utils.ts';
|
|
10
|
+
import {
|
|
11
|
+
cardClass, cardContentClass, cardDescriptionClass, cardFooterClass, cardHeaderClass, cardTitleClass,
|
|
12
|
+
} from '../../components/card.ts';
|
|
13
|
+
import { lineChart, type ChartConfig } from '../../components/chart.ts';
|
|
14
|
+
|
|
15
|
+
const chartData = [
|
|
16
|
+
{ browser: 'chrome', visitors: 275, fill: 'var(--color-chrome)' },
|
|
17
|
+
{ browser: 'safari', visitors: 200, fill: 'var(--color-safari)' },
|
|
18
|
+
{ browser: 'firefox', visitors: 187, fill: 'var(--color-firefox)' },
|
|
19
|
+
{ browser: 'edge', visitors: 173, fill: 'var(--color-edge)' },
|
|
20
|
+
{ browser: 'other', visitors: 90, fill: 'var(--color-other)' },
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const chartConfig = {
|
|
24
|
+
visitors: {
|
|
25
|
+
label: 'Visitors',
|
|
26
|
+
color: 'var(--chart-2)',
|
|
27
|
+
},
|
|
28
|
+
chrome: {
|
|
29
|
+
label: 'Chrome',
|
|
30
|
+
color: 'var(--chart-1)',
|
|
31
|
+
},
|
|
32
|
+
safari: {
|
|
33
|
+
label: 'Safari',
|
|
34
|
+
color: 'var(--chart-2)',
|
|
35
|
+
},
|
|
36
|
+
firefox: {
|
|
37
|
+
label: 'Firefox',
|
|
38
|
+
color: 'var(--chart-3)',
|
|
39
|
+
},
|
|
40
|
+
edge: {
|
|
41
|
+
label: 'Edge',
|
|
42
|
+
color: 'var(--chart-4)',
|
|
43
|
+
},
|
|
44
|
+
other: {
|
|
45
|
+
label: 'Other',
|
|
46
|
+
color: 'var(--chart-5)',
|
|
47
|
+
},
|
|
48
|
+
} satisfies ChartConfig;
|
|
49
|
+
|
|
50
|
+
// lucide's trending-up, the icon in shadcn's footer.
|
|
51
|
+
const TrendingUp = (cls = '') => svg`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class=${'lucide lucide-trending-up ' + cls}><path d="M16 7h6v6"></path><path d="m22 7-8.5 8.5-5-5L2 17"></path></svg>`;
|
|
52
|
+
|
|
53
|
+
export default function ChartLineLabelCustom() {
|
|
54
|
+
return html`
|
|
55
|
+
<div data-slot="card" class=${cardClass()}>
|
|
56
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
57
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Line Chart - Custom Label</div>
|
|
58
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
61
|
+
${lineChart({
|
|
62
|
+
config: chartConfig,
|
|
63
|
+
data: chartData,
|
|
64
|
+
title: 'Visitors by browser',
|
|
65
|
+
margin: { top: 24, left: 24, right: 24 },
|
|
66
|
+
grid: { vertical: false },
|
|
67
|
+
tooltip: { cursor: false, indicator: 'line', nameKey: 'visitors', hideLabel: true },
|
|
68
|
+
lines: [{
|
|
69
|
+
dataKey: 'visitors',
|
|
70
|
+
type: 'natural',
|
|
71
|
+
stroke: 'var(--color-visitors)',
|
|
72
|
+
strokeWidth: 2,
|
|
73
|
+
dot: { fill: 'var(--color-visitors)' },
|
|
74
|
+
activeDot: { r: 6 },
|
|
75
|
+
labels: [{
|
|
76
|
+
position: 'top',
|
|
77
|
+
offset: 12,
|
|
78
|
+
class: 'fill-foreground',
|
|
79
|
+
fontSize: 12,
|
|
80
|
+
dataKey: 'browser',
|
|
81
|
+
formatter: (value) => chartConfig[value as keyof typeof chartConfig]?.label,
|
|
82
|
+
}],
|
|
83
|
+
}],
|
|
84
|
+
})}
|
|
85
|
+
</div>
|
|
86
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
87
|
+
<div class="flex gap-2 leading-none font-medium">
|
|
88
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
89
|
+
</div>
|
|
90
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
`;
|
|
94
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A line chart with a label, a chart block ported from shadcn/ui's chart-line-label.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-label` at
|
|
5
|
+
* `components/charts/chart-line-label.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineLabel()}`.
|
|
7
|
+
*/
|
|
8
|
+
import { html, svg } from '@webjsdev/core';
|
|
9
|
+
import { cn } from '../../lib/utils.ts';
|
|
10
|
+
import {
|
|
11
|
+
cardClass, cardContentClass, cardDescriptionClass, cardFooterClass, cardHeaderClass, cardTitleClass,
|
|
12
|
+
} from '../../components/card.ts';
|
|
13
|
+
import { lineChart, type ChartConfig } from '../../components/chart.ts';
|
|
14
|
+
|
|
15
|
+
const chartData = [
|
|
16
|
+
{ month: 'January', desktop: 186, mobile: 80 },
|
|
17
|
+
{ month: 'February', desktop: 305, mobile: 200 },
|
|
18
|
+
{ month: 'March', desktop: 237, mobile: 120 },
|
|
19
|
+
{ month: 'April', desktop: 73, mobile: 190 },
|
|
20
|
+
{ month: 'May', desktop: 209, mobile: 130 },
|
|
21
|
+
{ month: 'June', desktop: 214, mobile: 140 },
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const chartConfig = {
|
|
25
|
+
desktop: {
|
|
26
|
+
label: 'Desktop',
|
|
27
|
+
color: 'var(--chart-1)',
|
|
28
|
+
},
|
|
29
|
+
mobile: {
|
|
30
|
+
label: 'Mobile',
|
|
31
|
+
color: 'var(--chart-2)',
|
|
32
|
+
},
|
|
33
|
+
} satisfies ChartConfig;
|
|
34
|
+
|
|
35
|
+
// lucide's trending-up, the icon in shadcn's footer.
|
|
36
|
+
const TrendingUp = (cls = '') => svg`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class=${'lucide lucide-trending-up ' + cls}><path d="M16 7h6v6"></path><path d="m22 7-8.5 8.5-5-5L2 17"></path></svg>`;
|
|
37
|
+
|
|
38
|
+
export default function ChartLineLabel() {
|
|
39
|
+
return html`
|
|
40
|
+
<div data-slot="card" class=${cardClass()}>
|
|
41
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
42
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Line Chart - Label</div>
|
|
43
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
46
|
+
${lineChart({
|
|
47
|
+
config: chartConfig,
|
|
48
|
+
data: chartData,
|
|
49
|
+
title: 'Desktop visitors, January to June',
|
|
50
|
+
margin: { top: 20, left: 12, right: 12 },
|
|
51
|
+
grid: { vertical: false },
|
|
52
|
+
xAxis: { dataKey: 'month', tickLine: false, axisLine: false, tickMargin: 8, tickFormatter: (value) => String(value).slice(0, 3) },
|
|
53
|
+
tooltip: { cursor: false, indicator: 'line' },
|
|
54
|
+
lines: [{
|
|
55
|
+
dataKey: 'desktop',
|
|
56
|
+
type: 'natural',
|
|
57
|
+
stroke: 'var(--color-desktop)',
|
|
58
|
+
strokeWidth: 2,
|
|
59
|
+
dot: { fill: 'var(--color-desktop)' },
|
|
60
|
+
activeDot: { r: 6 },
|
|
61
|
+
labels: [{ position: 'top', offset: 12, class: 'fill-foreground', fontSize: 12 }],
|
|
62
|
+
}],
|
|
63
|
+
})}
|
|
64
|
+
</div>
|
|
65
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
66
|
+
<div class="flex gap-2 leading-none font-medium">
|
|
67
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
68
|
+
</div>
|
|
69
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A linear line chart, a chart block ported from shadcn/ui's chart-line-linear.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-linear` at
|
|
5
|
+
* `components/charts/chart-line-linear.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineLinear()}`.
|
|
7
|
+
*/
|
|
8
|
+
import { html, svg } from '@webjsdev/core';
|
|
9
|
+
import { cn } from '../../lib/utils.ts';
|
|
10
|
+
import {
|
|
11
|
+
cardClass, cardContentClass, cardDescriptionClass, cardFooterClass, cardHeaderClass, cardTitleClass,
|
|
12
|
+
} from '../../components/card.ts';
|
|
13
|
+
import { lineChart, type ChartConfig } from '../../components/chart.ts';
|
|
14
|
+
|
|
15
|
+
const chartData = [
|
|
16
|
+
{ month: 'January', desktop: 186 },
|
|
17
|
+
{ month: 'February', desktop: 305 },
|
|
18
|
+
{ month: 'March', desktop: 237 },
|
|
19
|
+
{ month: 'April', desktop: 73 },
|
|
20
|
+
{ month: 'May', desktop: 209 },
|
|
21
|
+
{ month: 'June', desktop: 214 },
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const chartConfig = {
|
|
25
|
+
desktop: {
|
|
26
|
+
label: 'Desktop',
|
|
27
|
+
color: 'var(--chart-1)',
|
|
28
|
+
},
|
|
29
|
+
} satisfies ChartConfig;
|
|
30
|
+
|
|
31
|
+
// lucide's trending-up, the icon in shadcn's footer.
|
|
32
|
+
const TrendingUp = (cls = '') => svg`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class=${'lucide lucide-trending-up ' + cls}><path d="M16 7h6v6"></path><path d="m22 7-8.5 8.5-5-5L2 17"></path></svg>`;
|
|
33
|
+
|
|
34
|
+
export default function ChartLineLinear() {
|
|
35
|
+
return html`
|
|
36
|
+
<div data-slot="card" class=${cardClass()}>
|
|
37
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
38
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Line Chart - Linear</div>
|
|
39
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
42
|
+
${lineChart({
|
|
43
|
+
config: chartConfig,
|
|
44
|
+
data: chartData,
|
|
45
|
+
title: 'Desktop visitors, January to June',
|
|
46
|
+
margin: { left: 12, right: 12 },
|
|
47
|
+
grid: { vertical: false },
|
|
48
|
+
xAxis: { dataKey: 'month', tickLine: false, axisLine: false, tickMargin: 8, tickFormatter: (value) => String(value).slice(0, 3) },
|
|
49
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
50
|
+
lines: [{ dataKey: 'desktop', type: 'linear', stroke: 'var(--color-desktop)', strokeWidth: 2, dot: false }],
|
|
51
|
+
})}
|
|
52
|
+
</div>
|
|
53
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
54
|
+
<div class="flex gap-2 leading-none font-medium">
|
|
55
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
56
|
+
</div>
|
|
57
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A multiple line chart, a chart block ported from shadcn/ui's chart-line-multiple.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-multiple` at
|
|
5
|
+
* `components/charts/chart-line-multiple.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineMultiple()}`.
|
|
7
|
+
*/
|
|
8
|
+
import { html, svg } from '@webjsdev/core';
|
|
9
|
+
import {
|
|
10
|
+
cardClass, cardContentClass, cardDescriptionClass, cardFooterClass, cardHeaderClass, cardTitleClass,
|
|
11
|
+
} from '../../components/card.ts';
|
|
12
|
+
import { lineChart, type ChartConfig } from '../../components/chart.ts';
|
|
13
|
+
|
|
14
|
+
const chartData = [
|
|
15
|
+
{ month: 'January', desktop: 186, mobile: 80 },
|
|
16
|
+
{ month: 'February', desktop: 305, mobile: 200 },
|
|
17
|
+
{ month: 'March', desktop: 237, mobile: 120 },
|
|
18
|
+
{ month: 'April', desktop: 73, mobile: 190 },
|
|
19
|
+
{ month: 'May', desktop: 209, mobile: 130 },
|
|
20
|
+
{ month: 'June', desktop: 214, mobile: 140 },
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const chartConfig = {
|
|
24
|
+
desktop: {
|
|
25
|
+
label: 'Desktop',
|
|
26
|
+
color: 'var(--chart-1)',
|
|
27
|
+
},
|
|
28
|
+
mobile: {
|
|
29
|
+
label: 'Mobile',
|
|
30
|
+
color: 'var(--chart-2)',
|
|
31
|
+
},
|
|
32
|
+
} satisfies ChartConfig;
|
|
33
|
+
|
|
34
|
+
// lucide's trending-up, the icon in shadcn's footer.
|
|
35
|
+
const TrendingUp = (cls = '') => svg`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class=${'lucide lucide-trending-up ' + cls}><path d="M16 7h6v6"></path><path d="m22 7-8.5 8.5-5-5L2 17"></path></svg>`;
|
|
36
|
+
|
|
37
|
+
export default function ChartLineMultiple() {
|
|
38
|
+
return html`
|
|
39
|
+
<div data-slot="card" class=${cardClass()}>
|
|
40
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
41
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Line Chart - Multiple</div>
|
|
42
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
45
|
+
${lineChart({
|
|
46
|
+
config: chartConfig,
|
|
47
|
+
data: chartData,
|
|
48
|
+
title: 'Desktop and mobile visitors, January to June',
|
|
49
|
+
margin: { left: 12, right: 12 },
|
|
50
|
+
grid: { vertical: false },
|
|
51
|
+
xAxis: { dataKey: 'month', tickLine: false, axisLine: false, tickMargin: 8, tickFormatter: (value) => String(value).slice(0, 3) },
|
|
52
|
+
tooltip: { cursor: false },
|
|
53
|
+
lines: [
|
|
54
|
+
{ dataKey: 'desktop', type: 'monotone', stroke: 'var(--color-desktop)', strokeWidth: 2, dot: false },
|
|
55
|
+
{ dataKey: 'mobile', type: 'monotone', stroke: 'var(--color-mobile)', strokeWidth: 2, dot: false },
|
|
56
|
+
],
|
|
57
|
+
})}
|
|
58
|
+
</div>
|
|
59
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
60
|
+
<div class="flex w-full items-start gap-2 text-sm">
|
|
61
|
+
<div class="grid gap-2">
|
|
62
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
63
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
64
|
+
</div>
|
|
65
|
+
<div class="flex items-center gap-2 leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A line chart with step, a chart block ported from shadcn/ui's chart-line-step.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-step` at
|
|
5
|
+
* `components/charts/chart-line-step.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineStep()}`.
|
|
7
|
+
*/
|
|
8
|
+
import { html, svg } from '@webjsdev/core';
|
|
9
|
+
import { cn } from '../../lib/utils.ts';
|
|
10
|
+
import {
|
|
11
|
+
cardClass, cardContentClass, cardDescriptionClass, cardFooterClass, cardHeaderClass, cardTitleClass,
|
|
12
|
+
} from '../../components/card.ts';
|
|
13
|
+
import { lineChart, type ChartConfig } from '../../components/chart.ts';
|
|
14
|
+
|
|
15
|
+
const chartData = [
|
|
16
|
+
{ month: 'January', desktop: 186 },
|
|
17
|
+
{ month: 'February', desktop: 305 },
|
|
18
|
+
{ month: 'March', desktop: 237 },
|
|
19
|
+
{ month: 'April', desktop: 73 },
|
|
20
|
+
{ month: 'May', desktop: 209 },
|
|
21
|
+
{ month: 'June', desktop: 214 },
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const chartConfig = {
|
|
25
|
+
desktop: {
|
|
26
|
+
label: 'Desktop',
|
|
27
|
+
color: 'var(--chart-1)',
|
|
28
|
+
},
|
|
29
|
+
} satisfies ChartConfig;
|
|
30
|
+
|
|
31
|
+
// lucide's trending-up, the icon in shadcn's footer.
|
|
32
|
+
const TrendingUp = (cls = '') => svg`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class=${'lucide lucide-trending-up ' + cls}><path d="M16 7h6v6"></path><path d="m22 7-8.5 8.5-5-5L2 17"></path></svg>`;
|
|
33
|
+
|
|
34
|
+
export default function ChartLineStep() {
|
|
35
|
+
return html`
|
|
36
|
+
<div data-slot="card" class=${cardClass()}>
|
|
37
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
38
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Line Chart - Step</div>
|
|
39
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
42
|
+
${lineChart({
|
|
43
|
+
config: chartConfig,
|
|
44
|
+
data: chartData,
|
|
45
|
+
title: 'Desktop visitors, January to June',
|
|
46
|
+
margin: { left: 12, right: 12 },
|
|
47
|
+
grid: { vertical: false },
|
|
48
|
+
xAxis: { dataKey: 'month', tickLine: false, axisLine: false, tickMargin: 8, tickFormatter: (value) => String(value).slice(0, 3) },
|
|
49
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
50
|
+
lines: [{ dataKey: 'desktop', type: 'step', stroke: 'var(--color-desktop)', strokeWidth: 2, dot: false }],
|
|
51
|
+
})}
|
|
52
|
+
</div>
|
|
53
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
54
|
+
<div class="flex gap-2 leading-none font-medium">
|
|
55
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
56
|
+
</div>
|
|
57
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A donut chart with an active sector, a chart block ported from shadcn/ui's chart-pie-donut-active.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-pie-donut-active` at
|
|
5
|
+
* `components/charts/chart-pie-donut-active.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartPieDonutActive()}`.
|
|
7
|
+
*/
|
|
8
|
+
import { html, svg } from '@webjsdev/core';
|
|
9
|
+
import { cn } from '../../lib/utils.ts';
|
|
10
|
+
import {
|
|
11
|
+
cardClass, cardContentClass, cardDescriptionClass, cardFooterClass, cardHeaderClass, cardTitleClass,
|
|
12
|
+
} from '../../components/card.ts';
|
|
13
|
+
import { chartSector, pieChart, type ChartConfig } from '../../components/chart.ts';
|
|
14
|
+
|
|
15
|
+
const chartData = [
|
|
16
|
+
{ browser: 'chrome', visitors: 275, fill: 'var(--color-chrome)' },
|
|
17
|
+
{ browser: 'safari', visitors: 200, fill: 'var(--color-safari)' },
|
|
18
|
+
{ browser: 'firefox', visitors: 187, fill: 'var(--color-firefox)' },
|
|
19
|
+
{ browser: 'edge', visitors: 173, fill: 'var(--color-edge)' },
|
|
20
|
+
{ browser: 'other', visitors: 90, fill: 'var(--color-other)' },
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const chartConfig = {
|
|
24
|
+
visitors: {
|
|
25
|
+
label: 'Visitors',
|
|
26
|
+
},
|
|
27
|
+
chrome: {
|
|
28
|
+
label: 'Chrome',
|
|
29
|
+
color: 'var(--chart-1)',
|
|
30
|
+
},
|
|
31
|
+
safari: {
|
|
32
|
+
label: 'Safari',
|
|
33
|
+
color: 'var(--chart-2)',
|
|
34
|
+
},
|
|
35
|
+
firefox: {
|
|
36
|
+
label: 'Firefox',
|
|
37
|
+
color: 'var(--chart-3)',
|
|
38
|
+
},
|
|
39
|
+
edge: {
|
|
40
|
+
label: 'Edge',
|
|
41
|
+
color: 'var(--chart-4)',
|
|
42
|
+
},
|
|
43
|
+
other: {
|
|
44
|
+
label: 'Other',
|
|
45
|
+
color: 'var(--chart-5)',
|
|
46
|
+
},
|
|
47
|
+
} satisfies ChartConfig;
|
|
48
|
+
|
|
49
|
+
// lucide's trending-up, the icon in shadcn's footer.
|
|
50
|
+
const TrendingUp = (cls = '') => svg`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class=${'lucide lucide-trending-up ' + cls}><path d="M16 7h6v6"></path><path d="m22 7-8.5 8.5-5-5L2 17"></path></svg>`;
|
|
51
|
+
|
|
52
|
+
const ACTIVE_INDEX = 0;
|
|
53
|
+
|
|
54
|
+
export default function ChartPieDonutActive() {
|
|
55
|
+
return html`
|
|
56
|
+
<div data-slot="card" class=${cn(cardClass(), 'flex flex-col')}>
|
|
57
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center pb-0')}>
|
|
58
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Pie Chart - Donut Active</div>
|
|
59
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex-1 pb-0')}>
|
|
62
|
+
${pieChart({
|
|
63
|
+
config: chartConfig,
|
|
64
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
65
|
+
data: chartData,
|
|
66
|
+
title: 'Visitors by browser',
|
|
67
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
68
|
+
pies: [{
|
|
69
|
+
dataKey: 'visitors',
|
|
70
|
+
nameKey: 'browser',
|
|
71
|
+
innerRadius: 60,
|
|
72
|
+
strokeWidth: 5,
|
|
73
|
+
shape: ({ index, outerRadius, ...props }) =>
|
|
74
|
+
chartSector({ ...props, outerRadius: index === ACTIVE_INDEX ? outerRadius + 10 : outerRadius }),
|
|
75
|
+
}],
|
|
76
|
+
})}
|
|
77
|
+
</div>
|
|
78
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 text-sm')}>
|
|
79
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
80
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
81
|
+
</div>
|
|
82
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
`;
|
|
86
|
+
}
|