@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,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A radar chart with a grid filled, a chart block ported from shadcn/ui's chart-radar-grid-fill.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-radar-grid-fill` at
|
|
5
|
+
* `components/charts/chart-radar-grid-fill.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartRadarGridFill()}`.
|
|
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 { radarChart, type ChartConfig } from '../../components/chart.ts';
|
|
14
|
+
|
|
15
|
+
const chartData = [
|
|
16
|
+
{ month: 'January', desktop: 186 },
|
|
17
|
+
{ month: 'February', desktop: 285 },
|
|
18
|
+
{ month: 'March', desktop: 237 },
|
|
19
|
+
{ month: 'April', desktop: 203 },
|
|
20
|
+
{ month: 'May', desktop: 209 },
|
|
21
|
+
{ month: 'June', desktop: 264 },
|
|
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 ChartRadarGridFill() {
|
|
35
|
+
return html`
|
|
36
|
+
<div data-slot="card" class=${cardClass()}>
|
|
37
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center pb-4')}>
|
|
38
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Radar Chart - Grid Filled</div>
|
|
39
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Showing total visitors for the last 6 months</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'pb-0')}>
|
|
42
|
+
${radarChart({
|
|
43
|
+
config: chartConfig,
|
|
44
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
45
|
+
data: chartData,
|
|
46
|
+
title: 'Visitors by month',
|
|
47
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
48
|
+
angleAxis: { dataKey: 'month' },
|
|
49
|
+
grid: { class: 'fill-(--color-desktop) opacity-20' },
|
|
50
|
+
radars: [{ dataKey: 'desktop', fill: 'var(--color-desktop)', fillOpacity: 0.5 }],
|
|
51
|
+
})}
|
|
52
|
+
</div>
|
|
53
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 text-sm')}>
|
|
54
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
55
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
56
|
+
</div>
|
|
57
|
+
<div class="flex items-center gap-2 leading-none text-muted-foreground">January - June 2024</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A radar chart with no grid, a chart block ported from shadcn/ui's chart-radar-grid-none.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-radar-grid-none` at
|
|
5
|
+
* `components/charts/chart-radar-grid-none.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartRadarGridNone()}`.
|
|
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 { radarChart, 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: 273 },
|
|
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 ChartRadarGridNone() {
|
|
35
|
+
return html`
|
|
36
|
+
<div data-slot="card" class=${cardClass()}>
|
|
37
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center pb-4')}>
|
|
38
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Radar Chart - Grid None</div>
|
|
39
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Showing total visitors for the last 6 months</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'pb-0')}>
|
|
42
|
+
${radarChart({
|
|
43
|
+
config: chartConfig,
|
|
44
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
45
|
+
data: chartData,
|
|
46
|
+
title: 'Visitors by month',
|
|
47
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
48
|
+
angleAxis: { dataKey: 'month' },
|
|
49
|
+
radars: [{ dataKey: 'desktop', fill: 'var(--color-desktop)', fillOpacity: 0.6, dot: { r: 4, fillOpacity: 1 } }],
|
|
50
|
+
})}
|
|
51
|
+
</div>
|
|
52
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 text-sm')}>
|
|
53
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
54
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
55
|
+
</div>
|
|
56
|
+
<div class="flex items-center gap-2 leading-none text-muted-foreground">January - June 2024</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A radar chart with icons, a chart block ported from shadcn/ui's chart-radar-icons.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-radar-icons` at
|
|
5
|
+
* `components/charts/chart-radar-icons.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartRadarIcons()}`.
|
|
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 { radarChart, 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
|
+
icon: () => ArrowDownFromLine(),
|
|
29
|
+
},
|
|
30
|
+
mobile: {
|
|
31
|
+
label: 'Mobile',
|
|
32
|
+
color: 'var(--chart-2)',
|
|
33
|
+
icon: () => ArrowUpFromLine(),
|
|
34
|
+
},
|
|
35
|
+
} satisfies ChartConfig;
|
|
36
|
+
|
|
37
|
+
// lucide's trending-up, the icon in shadcn's footer.
|
|
38
|
+
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>`;
|
|
39
|
+
|
|
40
|
+
// lucide's arrow-down-from-line and arrow-up-from-line, the series icons.
|
|
41
|
+
const ArrowDownFromLine = () => 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-arrow-down-from-line"><path d="M19 3H5"></path><path d="M12 21V7"></path><path d="m6 15 6 6 6-6"></path></svg>`;
|
|
42
|
+
const ArrowUpFromLine = () => 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-arrow-up-from-line"><path d="m18 9-6-6-6 6"></path><path d="M12 3v14"></path><path d="M5 21h14"></path></svg>`;
|
|
43
|
+
|
|
44
|
+
export default function ChartRadarIcons() {
|
|
45
|
+
return html`
|
|
46
|
+
<div data-slot="card" class=${cardClass()}>
|
|
47
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center pb-4')}>
|
|
48
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Radar Chart - Icons</div>
|
|
49
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Showing total visitors for the last 6 months</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
52
|
+
${radarChart({
|
|
53
|
+
config: chartConfig,
|
|
54
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
55
|
+
data: chartData,
|
|
56
|
+
title: 'Visitors by month',
|
|
57
|
+
tooltip: { cursor: false, indicator: 'line' },
|
|
58
|
+
angleAxis: { dataKey: 'month' },
|
|
59
|
+
grid: {},
|
|
60
|
+
margin: { top: -40, bottom: -10, left: 0, right: 0 },
|
|
61
|
+
legend: { class: 'mt-8', height: 60 },
|
|
62
|
+
radars: [
|
|
63
|
+
{ dataKey: 'desktop', fill: 'var(--color-desktop)', fillOpacity: 0.6 },
|
|
64
|
+
{ dataKey: 'mobile', fill: 'var(--color-mobile)' },
|
|
65
|
+
],
|
|
66
|
+
})}
|
|
67
|
+
</div>
|
|
68
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 pt-4 text-sm')}>
|
|
69
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
70
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
71
|
+
</div>
|
|
72
|
+
<div class="flex items-center gap-2 leading-none text-muted-foreground">January - June 2024</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
`;
|
|
76
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A radar chart with a custom label, a chart block ported from shadcn/ui's chart-radar-label-custom.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-radar-label-custom` at
|
|
5
|
+
* `components/charts/chart-radar-label-custom.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartRadarLabelCustom()}`.
|
|
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 { radarChart, 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 ChartRadarLabelCustom() {
|
|
39
|
+
return html`
|
|
40
|
+
<div data-slot="card" class=${cardClass()}>
|
|
41
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center pb-4')}>
|
|
42
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Radar Chart - Custom Label</div>
|
|
43
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Showing total visitors for the last 6 months</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'pb-0')}>
|
|
46
|
+
${radarChart({
|
|
47
|
+
config: chartConfig,
|
|
48
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
49
|
+
data: chartData,
|
|
50
|
+
title: 'Visitors by month',
|
|
51
|
+
tooltip: { cursor: false, indicator: 'line' },
|
|
52
|
+
angleAxis: {
|
|
53
|
+
dataKey: 'month',
|
|
54
|
+
// Each month as desktop / mobile over its name.
|
|
55
|
+
tick: ({ x, y, textAnchor, index, datum }) => svg`
|
|
56
|
+
<text x=${x} y=${y + (index === 0 ? -10 : 0)} text-anchor=${textAnchor} font-size="13" font-weight="500">
|
|
57
|
+
<tspan>${datum.desktop}</tspan><tspan class="fill-muted-foreground">/</tspan><tspan>${datum.mobile}</tspan><tspan
|
|
58
|
+
x=${x} dy="1rem" font-size="12" class="fill-muted-foreground">${datum.month}</tspan>
|
|
59
|
+
</text>`,
|
|
60
|
+
},
|
|
61
|
+
grid: {},
|
|
62
|
+
margin: { top: 10, right: 10, bottom: 10, left: 10 },
|
|
63
|
+
radars: [
|
|
64
|
+
{ dataKey: 'desktop', fill: 'var(--color-desktop)', fillOpacity: 0.6 },
|
|
65
|
+
{ dataKey: 'mobile', fill: 'var(--color-mobile)' },
|
|
66
|
+
],
|
|
67
|
+
})}
|
|
68
|
+
</div>
|
|
69
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 text-sm')}>
|
|
70
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
71
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
72
|
+
</div>
|
|
73
|
+
<div class="flex items-center gap-2 leading-none text-muted-foreground">January - June 2024</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
`;
|
|
77
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A radar chart with a legend, a chart block ported from shadcn/ui's chart-radar-legend.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-radar-legend` at
|
|
5
|
+
* `components/charts/chart-radar-legend.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartRadarLegend()}`.
|
|
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 { radarChart, 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 ChartRadarLegend() {
|
|
39
|
+
return html`
|
|
40
|
+
<div data-slot="card" class=${cardClass()}>
|
|
41
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center')}>
|
|
42
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Radar Chart - Legend</div>
|
|
43
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Showing total visitors for the last 6 months</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
46
|
+
${radarChart({
|
|
47
|
+
config: chartConfig,
|
|
48
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
49
|
+
data: chartData,
|
|
50
|
+
title: 'Visitors by month',
|
|
51
|
+
tooltip: { cursor: false, indicator: 'line' },
|
|
52
|
+
angleAxis: { dataKey: 'month' },
|
|
53
|
+
grid: {},
|
|
54
|
+
margin: { top: -40, bottom: -10, left: 0, right: 0 },
|
|
55
|
+
legend: { class: 'mt-8', height: 60 },
|
|
56
|
+
radars: [
|
|
57
|
+
{ dataKey: 'desktop', fill: 'var(--color-desktop)', fillOpacity: 0.6 },
|
|
58
|
+
{ dataKey: 'mobile', fill: 'var(--color-mobile)' },
|
|
59
|
+
],
|
|
60
|
+
})}
|
|
61
|
+
</div>
|
|
62
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 pt-4 text-sm')}>
|
|
63
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
64
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
65
|
+
</div>
|
|
66
|
+
<div class="flex items-center gap-2 leading-none text-muted-foreground">January - June 2024</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A radar chart with lines only, a chart block ported from shadcn/ui's chart-radar-lines-only.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-radar-lines-only` at
|
|
5
|
+
* `components/charts/chart-radar-lines-only.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartRadarLinesOnly()}`.
|
|
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 { radarChart, type ChartConfig } from '../../components/chart.ts';
|
|
14
|
+
|
|
15
|
+
const chartData = [
|
|
16
|
+
{ month: 'January', desktop: 186, mobile: 160 },
|
|
17
|
+
{ month: 'February', desktop: 185, mobile: 170 },
|
|
18
|
+
{ month: 'March', desktop: 207, mobile: 180 },
|
|
19
|
+
{ month: 'April', desktop: 173, mobile: 160 },
|
|
20
|
+
{ month: 'May', desktop: 160, mobile: 190 },
|
|
21
|
+
{ month: 'June', desktop: 174, mobile: 204 },
|
|
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 ChartRadarLinesOnly() {
|
|
39
|
+
return html`
|
|
40
|
+
<div data-slot="card" class=${cardClass()}>
|
|
41
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center pb-4')}>
|
|
42
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Radar Chart - Lines Only</div>
|
|
43
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Showing total visitors for the last 6 months</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'pb-0')}>
|
|
46
|
+
${radarChart({
|
|
47
|
+
config: chartConfig,
|
|
48
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
49
|
+
data: chartData,
|
|
50
|
+
title: 'Visitors by month',
|
|
51
|
+
tooltip: { cursor: false, indicator: 'line' },
|
|
52
|
+
angleAxis: { dataKey: 'month' },
|
|
53
|
+
grid: { radialLines: false },
|
|
54
|
+
radars: [
|
|
55
|
+
{ dataKey: 'desktop', fill: 'var(--color-desktop)', fillOpacity: 0, stroke: 'var(--color-desktop)', strokeWidth: 2 },
|
|
56
|
+
{ dataKey: 'mobile', fill: 'var(--color-mobile)', fillOpacity: 0, stroke: 'var(--color-mobile)', strokeWidth: 2 },
|
|
57
|
+
],
|
|
58
|
+
})}
|
|
59
|
+
</div>
|
|
60
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 text-sm')}>
|
|
61
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
62
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
63
|
+
</div>
|
|
64
|
+
<div class="flex items-center gap-2 leading-none text-muted-foreground">January - June 2024</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A radar chart with multiple data, a chart block ported from shadcn/ui's chart-radar-multiple.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-radar-multiple` at
|
|
5
|
+
* `components/charts/chart-radar-multiple.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartRadarMultiple()}`.
|
|
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 { radarChart, 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 ChartRadarMultiple() {
|
|
39
|
+
return html`
|
|
40
|
+
<div data-slot="card" class=${cardClass()}>
|
|
41
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center pb-4')}>
|
|
42
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Radar Chart - Multiple</div>
|
|
43
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Showing total visitors for the last 6 months</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'pb-0')}>
|
|
46
|
+
${radarChart({
|
|
47
|
+
config: chartConfig,
|
|
48
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
49
|
+
data: chartData,
|
|
50
|
+
title: 'Visitors by month',
|
|
51
|
+
tooltip: { cursor: false, indicator: 'line' },
|
|
52
|
+
angleAxis: { dataKey: 'month' },
|
|
53
|
+
grid: {},
|
|
54
|
+
radars: [
|
|
55
|
+
{ dataKey: 'desktop', fill: 'var(--color-desktop)', fillOpacity: 0.6 },
|
|
56
|
+
{ dataKey: 'mobile', fill: 'var(--color-mobile)' },
|
|
57
|
+
],
|
|
58
|
+
})}
|
|
59
|
+
</div>
|
|
60
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 text-sm')}>
|
|
61
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
62
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
63
|
+
</div>
|
|
64
|
+
<div class="flex items-center gap-2 leading-none text-muted-foreground">January - June 2024</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A radar chart with a radius axis, a chart block ported from shadcn/ui's chart-radar-radius.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-radar-radius` at
|
|
5
|
+
* `components/charts/chart-radar-radius.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartRadarRadius()}`.
|
|
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 { radarChart, 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 ChartRadarRadius() {
|
|
39
|
+
return html`
|
|
40
|
+
<div data-slot="card" class=${cardClass()}>
|
|
41
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center pb-4')}>
|
|
42
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Radar Chart - Radius Axis</div>
|
|
43
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Showing total visitors for the last 6 months</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'pb-0')}>
|
|
46
|
+
${radarChart({
|
|
47
|
+
config: chartConfig,
|
|
48
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
49
|
+
data: chartData,
|
|
50
|
+
title: 'Visitors by month',
|
|
51
|
+
tooltip: { cursor: false, indicator: 'line', labelKey: 'month' },
|
|
52
|
+
grid: {},
|
|
53
|
+
radiusAxis: { angle: 60, stroke: 'var(--foreground)', orientation: 'middle' },
|
|
54
|
+
radars: [
|
|
55
|
+
{ dataKey: 'desktop', fill: 'var(--color-desktop)', fillOpacity: 0.6 },
|
|
56
|
+
{ dataKey: 'mobile', fill: 'var(--color-mobile)' },
|
|
57
|
+
],
|
|
58
|
+
})}
|
|
59
|
+
</div>
|
|
60
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 text-sm')}>
|
|
61
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
62
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
63
|
+
</div>
|
|
64
|
+
<div class="flex items-center gap-2 leading-none text-muted-foreground">January - June 2024</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A radial chart with a grid, a chart block ported from shadcn/ui's chart-radial-grid.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-radial-grid` at
|
|
5
|
+
* `components/charts/chart-radial-grid.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartRadialGrid()}`.
|
|
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 { radialBarChart, 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
|
+
export default function ChartRadialGrid() {
|
|
53
|
+
return html`
|
|
54
|
+
<div data-slot="card" class=${cn(cardClass(), 'flex flex-col')}>
|
|
55
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'items-center pb-0')}>
|
|
56
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Radial Chart - Grid</div>
|
|
57
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex-1 pb-0')}>
|
|
60
|
+
${radialBarChart({
|
|
61
|
+
config: chartConfig,
|
|
62
|
+
class: 'mx-auto aspect-square max-h-[250px]',
|
|
63
|
+
data: chartData,
|
|
64
|
+
title: 'Visitors by browser',
|
|
65
|
+
innerRadius: 30,
|
|
66
|
+
outerRadius: 100,
|
|
67
|
+
tooltip: { cursor: false, hideLabel: true, nameKey: 'browser' },
|
|
68
|
+
grid: { gridType: 'circle' },
|
|
69
|
+
bars: [{ dataKey: 'visitors' }],
|
|
70
|
+
})}
|
|
71
|
+
</div>
|
|
72
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2 text-sm')}>
|
|
73
|
+
<div class="flex items-center gap-2 leading-none font-medium">
|
|
74
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
75
|
+
</div>
|
|
76
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
`;
|
|
80
|
+
}
|