@webjsdev/ui 0.3.17 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -7
- package/THIRD_PARTY_NOTICES.md +349 -0
- package/package.json +4 -2
- package/packages/registry/blocks/_shared/placeholder.svg +1 -0
- package/packages/registry/blocks/charts/chart-area-axes.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-default.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-gradient.ts +82 -0
- package/packages/registry/blocks/charts/chart-area-icons.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-interactive.ts +204 -0
- package/packages/registry/blocks/charts/chart-area-legend.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-linear.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-stacked-expand.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-stacked.ts +71 -0
- package/packages/registry/blocks/charts/chart-area-step.ts +68 -0
- package/packages/registry/blocks/charts/chart-bar-active.ts +93 -0
- package/packages/registry/blocks/charts/chart-bar-default.ts +60 -0
- package/packages/registry/blocks/charts/chart-bar-horizontal.ts +62 -0
- package/packages/registry/blocks/charts/chart-bar-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-bar-label-custom.ts +78 -0
- package/packages/registry/blocks/charts/chart-bar-label.ts +66 -0
- package/packages/registry/blocks/charts/chart-bar-mixed.ts +87 -0
- package/packages/registry/blocks/charts/chart-bar-multiple.ts +67 -0
- package/packages/registry/blocks/charts/chart-bar-negative.ts +61 -0
- package/packages/registry/blocks/charts/chart-bar-stacked.ts +68 -0
- package/packages/registry/blocks/charts/chart-line-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-dots-colors.ts +86 -0
- package/packages/registry/blocks/charts/chart-line-dots-custom.ts +75 -0
- package/packages/registry/blocks/charts/chart-line-dots.ts +65 -0
- package/packages/registry/blocks/charts/chart-line-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-line-label-custom.ts +94 -0
- package/packages/registry/blocks/charts/chart-line-label.ts +73 -0
- package/packages/registry/blocks/charts/chart-line-linear.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-multiple.ts +71 -0
- package/packages/registry/blocks/charts/chart-line-step.ts +61 -0
- package/packages/registry/blocks/charts/chart-pie-donut-active.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-donut-text.ts +89 -0
- package/packages/registry/blocks/charts/chart-pie-donut.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-interactive.ts +120 -0
- package/packages/registry/blocks/charts/chart-pie-label-custom.ts +82 -0
- package/packages/registry/blocks/charts/chart-pie-label-list.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-label.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-legend.ts +79 -0
- package/packages/registry/blocks/charts/chart-pie-separator-none.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-simple.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-stacked.ts +99 -0
- package/packages/registry/blocks/charts/chart-radar-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-dots.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-no-lines.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-custom.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-none.ts +60 -0
- package/packages/registry/blocks/charts/chart-radar-icons.ts +76 -0
- package/packages/registry/blocks/charts/chart-radar-label-custom.ts +77 -0
- package/packages/registry/blocks/charts/chart-radar-legend.ts +70 -0
- package/packages/registry/blocks/charts/chart-radar-lines-only.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-multiple.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-radius.ts +68 -0
- package/packages/registry/blocks/charts/chart-radial-grid.ts +80 -0
- package/packages/registry/blocks/charts/chart-radial-label.ts +85 -0
- package/packages/registry/blocks/charts/chart-radial-shape.ts +81 -0
- package/packages/registry/blocks/charts/chart-radial-simple.ts +79 -0
- package/packages/registry/blocks/charts/chart-radial-stacked.ts +69 -0
- package/packages/registry/blocks/charts/chart-radial-text.ts +82 -0
- package/packages/registry/blocks/charts/chart-tooltip-advanced.ts +84 -0
- package/packages/registry/blocks/charts/chart-tooltip-default.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-formatter.ts +75 -0
- package/packages/registry/blocks/charts/chart-tooltip-icons.ts +68 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-line.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-none.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-custom.ts +65 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-formatter.ts +66 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-none.ts +62 -0
- package/packages/registry/blocks/dashboard-01/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/dashboard-01/components/chart-area-interactive.ts +276 -0
- package/packages/registry/blocks/dashboard-01/components/dashboard-data.ts +89 -0
- package/packages/registry/blocks/dashboard-01/components/data-table.ts +637 -0
- package/packages/registry/blocks/dashboard-01/components/nav-documents.ts +65 -0
- package/packages/registry/blocks/dashboard-01/components/nav-main.ts +61 -0
- package/packages/registry/blocks/dashboard-01/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/dashboard-01/components/nav-user.ts +66 -0
- package/packages/registry/blocks/dashboard-01/components/section-cards.ts +59 -0
- package/packages/registry/blocks/dashboard-01/components/site-header.ts +52 -0
- package/packages/registry/blocks/dashboard-01/page.ts +39 -0
- package/packages/registry/blocks/login-01/components/login-form.ts +70 -0
- package/packages/registry/blocks/login-01/page.ts +19 -0
- package/packages/registry/blocks/login-02/components/login-form.ts +68 -0
- package/packages/registry/blocks/login-02/page.ts +36 -0
- package/packages/registry/blocks/login-03/components/login-form.ts +89 -0
- package/packages/registry/blocks/login-03/page.ts +28 -0
- package/packages/registry/blocks/login-04/components/login-form.ts +91 -0
- package/packages/registry/blocks/login-04/page.ts +20 -0
- package/packages/registry/blocks/login-05/components/login-form.ts +75 -0
- package/packages/registry/blocks/login-05/page.ts +19 -0
- package/packages/registry/blocks/preview/cards/activate-agent-dialog.ts +77 -0
- package/packages/registry/blocks/preview/cards/analytics-card.ts +64 -0
- package/packages/registry/blocks/preview/cards/anomaly-alert.ts +35 -0
- package/packages/registry/blocks/preview/cards/bar-chart-card.ts +91 -0
- package/packages/registry/blocks/preview/cards/book-appointment.ts +51 -0
- package/packages/registry/blocks/preview/cards/codespaces-card.ts +172 -0
- package/packages/registry/blocks/preview/cards/contributions-activity.ts +63 -0
- package/packages/registry/blocks/preview/cards/contributors.ts +51 -0
- package/packages/registry/blocks/preview/cards/environment-variables.ts +47 -0
- package/packages/registry/blocks/preview/cards/feedback-form.ts +61 -0
- package/packages/registry/blocks/preview/cards/file-upload.ts +51 -0
- package/packages/registry/blocks/preview/cards/github-profile.ts +66 -0
- package/packages/registry/blocks/preview/cards/icon-preview-grid.ts +47 -0
- package/packages/registry/blocks/preview/cards/invite-team.ts +78 -0
- package/packages/registry/blocks/preview/cards/invoice.ts +91 -0
- package/packages/registry/blocks/preview/cards/live-waveform.ts +330 -0
- package/packages/registry/blocks/preview/cards/no-team-members.ts +61 -0
- package/packages/registry/blocks/preview/cards/not-found.ts +46 -0
- package/packages/registry/blocks/preview/cards/observability-card.ts +44 -0
- package/packages/registry/blocks/preview/cards/pie-chart-card.ts +84 -0
- package/packages/registry/blocks/preview/cards/report-bug.ts +71 -0
- package/packages/registry/blocks/preview/cards/shipping-address.ts +79 -0
- package/packages/registry/blocks/preview/cards/shortcuts.ts +57 -0
- package/packages/registry/blocks/preview/cards/skeleton-loading.ts +37 -0
- package/packages/registry/blocks/preview/cards/sleep-report.ts +85 -0
- package/packages/registry/blocks/preview/cards/style-overview.ts +64 -0
- package/packages/registry/blocks/preview/cards/typography-specimen.ts +107 -0
- package/packages/registry/blocks/preview/cards/ui-elements.ts +164 -0
- package/packages/registry/blocks/preview/cards/usage-card.ts +63 -0
- package/packages/registry/blocks/preview/cards/visitors.ts +71 -0
- package/packages/registry/blocks/preview/cards/weekly-fitness-summary.ts +54 -0
- package/packages/registry/blocks/preview/page.ts +103 -0
- package/packages/registry/blocks/preview-02/cards/account-access.ts +70 -0
- package/packages/registry/blocks/preview-02/cards/card-overview.ts +75 -0
- package/packages/registry/blocks/preview-02/cards/claimable-balance.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/contribution-history.ts +80 -0
- package/packages/registry/blocks/preview-02/cards/cover-art.ts +41 -0
- package/packages/registry/blocks/preview-02/cards/dividend-income.ts +76 -0
- package/packages/registry/blocks/preview-02/cards/empty-connect-bank.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-distribute-track.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-explore-catalog.ts +39 -0
- package/packages/registry/blocks/preview-02/cards/faq.ts +79 -0
- package/packages/registry/blocks/preview-02/cards/front-door.ts +40 -0
- package/packages/registry/blocks/preview-02/cards/index-investing.ts +31 -0
- package/packages/registry/blocks/preview-02/cards/kitchen-island.ts +90 -0
- package/packages/registry/blocks/preview-02/cards/loading-card.ts +34 -0
- package/packages/registry/blocks/preview-02/cards/new-milestone.ts +53 -0
- package/packages/registry/blocks/preview-02/cards/notification-settings.ts +126 -0
- package/packages/registry/blocks/preview-02/cards/payments.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/payout-threshold.ts +92 -0
- package/packages/registry/blocks/preview-02/cards/power-usage.ts +84 -0
- package/packages/registry/blocks/preview-02/cards/preferences.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/qr-connect.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/receiving-method.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/recent-transactions.ts +101 -0
- package/packages/registry/blocks/preview-02/cards/release-catalog.ts +73 -0
- package/packages/registry/blocks/preview-02/cards/roller-shades.ts +110 -0
- package/packages/registry/blocks/preview-02/cards/savings-progress.ts +68 -0
- package/packages/registry/blocks/preview-02/cards/savings-targets.ts +132 -0
- package/packages/registry/blocks/preview-02/cards/sidebar-nav.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/social-links.ts +57 -0
- package/packages/registry/blocks/preview-02/cards/stock-performance.ts +106 -0
- package/packages/registry/blocks/preview-02/cards/syncing-state.ts +37 -0
- package/packages/registry/blocks/preview-02/cards/transfer-funds.ts +111 -0
- package/packages/registry/blocks/preview-02/cards/upcoming-payments.ts +69 -0
- package/packages/registry/blocks/preview-02/page.ts +111 -0
- package/packages/registry/blocks/preview-03/cards/files-chat.ts +75 -0
- package/packages/registry/blocks/preview-03/cards/group-chat.ts +114 -0
- package/packages/registry/blocks/preview-03/cards/reasoning-chat.ts +88 -0
- package/packages/registry/blocks/preview-03/cards/simple-chat.ts +53 -0
- package/packages/registry/blocks/preview-03/components/chat-card.ts +126 -0
- package/packages/registry/blocks/preview-03/components/chat-player.ts +174 -0
- package/packages/registry/blocks/preview-03/components/part-file.ts +77 -0
- package/packages/registry/blocks/preview-03/components/part-reasoning.ts +25 -0
- package/packages/registry/blocks/preview-03/components/part-source.ts +48 -0
- package/packages/registry/blocks/preview-03/components/part-text.ts +69 -0
- package/packages/registry/blocks/preview-03/components/part-tool.ts +71 -0
- package/packages/registry/blocks/preview-03/components/prompt-input.ts +86 -0
- package/packages/registry/blocks/preview-03/page.ts +39 -0
- package/packages/registry/blocks/sidebar-01/components/app-sidebar.ts +113 -0
- package/packages/registry/blocks/sidebar-01/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-01/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-01/page.ts +58 -0
- package/packages/registry/blocks/sidebar-02/components/app-sidebar.ts +131 -0
- package/packages/registry/blocks/sidebar-02/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-02/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-02/page.ts +53 -0
- package/packages/registry/blocks/sidebar-03/components/app-sidebar.ts +134 -0
- package/packages/registry/blocks/sidebar-03/page.ts +60 -0
- package/packages/registry/blocks/sidebar-04/components/app-sidebar.ts +136 -0
- package/packages/registry/blocks/sidebar-04/page.ts +58 -0
- package/packages/registry/blocks/sidebar-05/components/app-sidebar.ts +147 -0
- package/packages/registry/blocks/sidebar-05/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-05/page.ts +58 -0
- package/packages/registry/blocks/sidebar-06/components/app-sidebar.ts +105 -0
- package/packages/registry/blocks/sidebar-06/components/nav-main.ts +56 -0
- package/packages/registry/blocks/sidebar-06/components/sidebar-opt-in-form.ts +44 -0
- package/packages/registry/blocks/sidebar-06/page.ts +57 -0
- package/packages/registry/blocks/sidebar-07/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/sidebar-07/components/nav-main.ts +61 -0
- package/packages/registry/blocks/sidebar-07/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-07/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-07/components/team-switcher.ts +66 -0
- package/packages/registry/blocks/sidebar-07/page.ts +59 -0
- package/packages/registry/blocks/sidebar-08/components/app-sidebar.ts +122 -0
- package/packages/registry/blocks/sidebar-08/components/nav-main.ts +68 -0
- package/packages/registry/blocks/sidebar-08/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-08/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-08/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-08/page.ts +59 -0
- package/packages/registry/blocks/sidebar-09/components/app-sidebar.ts +213 -0
- package/packages/registry/blocks/sidebar-09/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-09/page.ts +52 -0
- package/packages/registry/blocks/sidebar-10/components/app-sidebar.ts +125 -0
- package/packages/registry/blocks/sidebar-10/components/nav-actions.ts +84 -0
- package/packages/registry/blocks/sidebar-10/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-10/components/nav-main.ts +37 -0
- package/packages/registry/blocks/sidebar-10/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-10/components/nav-workspaces.ts +78 -0
- package/packages/registry/blocks/sidebar-10/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-10/page.ts +46 -0
- package/packages/registry/blocks/sidebar-11/components/app-sidebar.ts +114 -0
- package/packages/registry/blocks/sidebar-11/page.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/app-sidebar.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-12/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-12/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-12/page.ts +43 -0
- package/packages/registry/blocks/sidebar-13/components/settings-dialog.ts +114 -0
- package/packages/registry/blocks/sidebar-13/page.ts +21 -0
- package/packages/registry/blocks/sidebar-14/components/app-sidebar.ts +120 -0
- package/packages/registry/blocks/sidebar-14/page.ts +55 -0
- package/packages/registry/blocks/sidebar-15/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-15/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-15/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-15/components/nav-main.ts +35 -0
- package/packages/registry/blocks/sidebar-15/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-15/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-15/components/nav-workspaces.ts +75 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-left.ts +126 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-right.ts +62 -0
- package/packages/registry/blocks/sidebar-15/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-15/page.ts +47 -0
- package/packages/registry/blocks/sidebar-16/components/app-sidebar.ts +124 -0
- package/packages/registry/blocks/sidebar-16/components/nav-main.ts +67 -0
- package/packages/registry/blocks/sidebar-16/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-16/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-16/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-16/components/search-form.ts +27 -0
- package/packages/registry/blocks/sidebar-16/components/site-header.ts +42 -0
- package/packages/registry/blocks/sidebar-16/page.ts +38 -0
- package/packages/registry/blocks/signup-01/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-01/page.ts +19 -0
- package/packages/registry/blocks/signup-02/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-02/page.ts +36 -0
- package/packages/registry/blocks/signup-03/components/signup-form.ts +79 -0
- package/packages/registry/blocks/signup-03/page.ts +28 -0
- package/packages/registry/blocks/signup-04/components/signup-form.ts +100 -0
- package/packages/registry/blocks/signup-04/page.ts +20 -0
- package/packages/registry/blocks/signup-05/components/signup-form.ts +75 -0
- package/packages/registry/blocks/signup-05/page.ts +20 -0
- package/packages/registry/components/accordion.ts +20 -7
- package/packages/registry/components/alert-dialog.ts +58 -13
- package/packages/registry/components/alert.ts +11 -6
- package/packages/registry/components/attachment.ts +119 -0
- package/packages/registry/components/avatar.ts +17 -8
- package/packages/registry/components/badge.ts +16 -9
- package/packages/registry/components/breadcrumb.ts +6 -6
- package/packages/registry/components/bubble.ts +95 -0
- package/packages/registry/components/button-group.ts +73 -0
- package/packages/registry/components/button.ts +35 -25
- package/packages/registry/components/calendar.ts +566 -0
- package/packages/registry/components/card.ts +8 -8
- package/packages/registry/components/carousel.ts +352 -0
- package/packages/registry/components/chart-element.ts +547 -0
- package/packages/registry/components/chart-geometry.ts +457 -0
- package/packages/registry/components/chart.ts +932 -0
- package/packages/registry/components/checkbox.ts +22 -84
- package/packages/registry/components/code-block.ts +191 -0
- package/packages/registry/components/collapsible.ts +5 -2
- package/packages/registry/components/combobox.ts +802 -0
- package/packages/registry/components/command.ts +618 -0
- package/packages/registry/components/context-menu.ts +302 -0
- package/packages/registry/components/dialog.ts +156 -45
- package/packages/registry/components/direction.ts +43 -0
- package/packages/registry/components/drawer.ts +226 -0
- package/packages/registry/components/dropdown-menu.ts +262 -83
- package/packages/registry/components/empty.ts +8 -8
- package/packages/registry/components/field.ts +20 -18
- package/packages/registry/components/floating.ts +124 -0
- package/packages/registry/components/hover-card.ts +19 -8
- package/packages/registry/components/input-group.ts +118 -0
- package/packages/registry/components/input-otp.ts +365 -0
- package/packages/registry/components/input.ts +3 -3
- package/packages/registry/components/item.ts +134 -0
- package/packages/registry/components/kbd.ts +2 -2
- package/packages/registry/components/label.ts +1 -1
- package/packages/registry/components/marker.ts +63 -0
- package/packages/registry/components/menubar.ts +388 -0
- package/packages/registry/components/message-scroller.ts +470 -0
- package/packages/registry/components/message.ts +69 -0
- package/packages/registry/components/native-select.ts +5 -5
- package/packages/registry/components/navigation-menu.ts +564 -0
- package/packages/registry/components/pagination.ts +5 -5
- package/packages/registry/components/popover.ts +30 -84
- package/packages/registry/components/progress.ts +7 -3
- package/packages/registry/components/questionnaire.ts +840 -0
- package/packages/registry/components/radio-group.ts +18 -73
- package/packages/registry/components/resizable.ts +330 -0
- package/packages/registry/components/scroll-area.ts +46 -0
- package/packages/registry/components/select.ts +650 -0
- package/packages/registry/components/separator.ts +1 -1
- package/packages/registry/components/sheet.ts +128 -0
- package/packages/registry/components/sidebar.ts +457 -0
- package/packages/registry/components/skeleton.ts +1 -1
- package/packages/registry/components/slider.ts +333 -0
- package/packages/registry/components/sonner.ts +74 -7
- package/packages/registry/components/spinner.ts +7 -4
- package/packages/registry/components/switch.ts +117 -9
- package/packages/registry/components/table.ts +11 -9
- package/packages/registry/components/tabs.ts +76 -25
- package/packages/registry/components/textarea.ts +1 -1
- package/packages/registry/components/toggle-group.ts +30 -11
- package/packages/registry/components/toggle.ts +20 -13
- package/packages/registry/components/tooltip.ts +68 -7
- package/packages/registry/components/trace.ts +75 -0
- package/packages/registry/lib/icons-hugeicons.ts +955 -0
- package/packages/registry/lib/icons-phosphor.ts +955 -0
- package/packages/registry/lib/icons-remixicon.ts +955 -0
- package/packages/registry/lib/icons-tabler.ts +955 -0
- package/packages/registry/lib/icons.ts +768 -0
- package/packages/registry/lib/utils.ts +49 -4
- package/packages/registry/registry.json +4056 -72
- package/packages/registry/styles/shadcn-tailwind.css +654 -0
- package/packages/registry/styles/style-luma.css +1987 -0
- package/packages/registry/styles/style-lyra.css +1965 -0
- package/packages/registry/styles/style-maia.css +1987 -0
- package/packages/registry/styles/style-mira.css +1992 -0
- package/packages/registry/styles/style-new-york.css +1597 -0
- package/packages/registry/styles/style-nova.css +1990 -0
- package/packages/registry/styles/style-rhea.css +1987 -0
- package/packages/registry/styles/style-sera.css +1977 -0
- package/packages/registry/styles/style-vega.css +1990 -0
- package/packages/registry/styles/supplement.json +54 -0
- package/packages/registry/styles/tw-animate.css +6 -0
- package/packages/registry/themes/base-colors.js +8 -2
- package/packages/registry/themes/fonts.js +120 -0
- package/packages/registry/themes/index.css +2 -0
- package/packages/registry/themes/items.js +61 -0
- package/packages/registry/themes/preset.js +302 -0
- package/packages/registry/themes/themes.js +1193 -0
- package/src/commands/add.js +236 -12
- package/src/commands/diff.js +34 -20
- package/src/commands/info.js +7 -0
- package/src/commands/init.js +125 -8
- package/src/commands/list.js +43 -11
- package/src/commands/view.js +33 -5
- package/src/registry/extract.js +192 -2
- package/src/registry/icons.js +31 -0
- package/src/registry/local.js +15 -1
- package/src/registry/schema.js +13 -0
- package/src/registry/style-bake.js +506 -0
- package/src/utils/theme.js +110 -21
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A mixed bar chart, a chart block ported from shadcn/ui's chart-bar-mixed.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-bar-mixed` at
|
|
5
|
+
* `components/charts/chart-bar-mixed.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartBarMixed()}`.
|
|
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 { barChart, 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 ChartBarMixed() {
|
|
53
|
+
return html`
|
|
54
|
+
<div data-slot="card" class=${cardClass()}>
|
|
55
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
56
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Bar Chart - Mixed</div>
|
|
57
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
60
|
+
${barChart({
|
|
61
|
+
config: chartConfig,
|
|
62
|
+
data: chartData,
|
|
63
|
+
title: 'Visitors by browser',
|
|
64
|
+
layout: 'vertical',
|
|
65
|
+
margin: { left: 0 },
|
|
66
|
+
yAxis: {
|
|
67
|
+
dataKey: 'browser',
|
|
68
|
+
type: 'category',
|
|
69
|
+
tickLine: false,
|
|
70
|
+
tickMargin: 10,
|
|
71
|
+
axisLine: false,
|
|
72
|
+
tickFormatter: (value) => chartConfig[value as keyof typeof chartConfig]?.label,
|
|
73
|
+
},
|
|
74
|
+
xAxis: { dataKey: 'visitors', type: 'number', hide: true },
|
|
75
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
76
|
+
bars: [{ dataKey: 'visitors', radius: 5 }],
|
|
77
|
+
})}
|
|
78
|
+
</div>
|
|
79
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
80
|
+
<div class="flex gap-2 leading-none font-medium">
|
|
81
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
82
|
+
</div>
|
|
83
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
`;
|
|
87
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A multiple bar chart, a chart block ported from shadcn/ui's chart-bar-multiple.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-bar-multiple` at
|
|
5
|
+
* `components/charts/chart-bar-multiple.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartBarMultiple()}`.
|
|
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 { barChart, 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 ChartBarMultiple() {
|
|
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()}>Bar Chart - Multiple</div>
|
|
43
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
46
|
+
${barChart({
|
|
47
|
+
config: chartConfig,
|
|
48
|
+
data: chartData,
|
|
49
|
+
title: 'Desktop and mobile visitors, January to June',
|
|
50
|
+
grid: { vertical: false },
|
|
51
|
+
xAxis: { dataKey: 'month', tickLine: false, tickMargin: 10, axisLine: false, tickFormatter: (value) => String(value).slice(0, 3) },
|
|
52
|
+
tooltip: { cursor: false, indicator: 'dashed' },
|
|
53
|
+
bars: [
|
|
54
|
+
{ dataKey: 'desktop', fill: 'var(--color-desktop)', radius: 4 },
|
|
55
|
+
{ dataKey: 'mobile', fill: 'var(--color-mobile)', radius: 4 },
|
|
56
|
+
],
|
|
57
|
+
})}
|
|
58
|
+
</div>
|
|
59
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
60
|
+
<div class="flex gap-2 leading-none font-medium">
|
|
61
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
62
|
+
</div>
|
|
63
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
`;
|
|
67
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A bar chart with negative values, a chart block ported from shadcn/ui's chart-bar-negative.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-bar-negative` at
|
|
5
|
+
* `components/charts/chart-bar-negative.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartBarNegative()}`.
|
|
7
|
+
*
|
|
8
|
+
* shadcn colours each bar with a `<Cell>`; here each row carries its `fill`.
|
|
9
|
+
*/
|
|
10
|
+
import { html, svg } from '@webjsdev/core';
|
|
11
|
+
import { cn } from '../../lib/utils.ts';
|
|
12
|
+
import {
|
|
13
|
+
cardClass, cardContentClass, cardDescriptionClass, cardFooterClass, cardHeaderClass, cardTitleClass,
|
|
14
|
+
} from '../../components/card.ts';
|
|
15
|
+
import { barChart, type ChartConfig } from '../../components/chart.ts';
|
|
16
|
+
|
|
17
|
+
const chartData = [
|
|
18
|
+
{ month: 'January', visitors: 186 },
|
|
19
|
+
{ month: 'February', visitors: 205 },
|
|
20
|
+
{ month: 'March', visitors: -207 },
|
|
21
|
+
{ month: 'April', visitors: 173 },
|
|
22
|
+
{ month: 'May', visitors: -209 },
|
|
23
|
+
{ month: 'June', visitors: 214 },
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
const chartConfig = {
|
|
27
|
+
visitors: {
|
|
28
|
+
label: 'Visitors',
|
|
29
|
+
},
|
|
30
|
+
} satisfies ChartConfig;
|
|
31
|
+
|
|
32
|
+
// lucide's trending-up, the icon in shadcn's footer.
|
|
33
|
+
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>`;
|
|
34
|
+
|
|
35
|
+
export default function ChartBarNegative() {
|
|
36
|
+
return html`
|
|
37
|
+
<div data-slot="card" class=${cardClass()}>
|
|
38
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
39
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Bar Chart - Negative</div>
|
|
40
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
43
|
+
${barChart({
|
|
44
|
+
config: chartConfig,
|
|
45
|
+
// Positive months in one colour, negative ones in another.
|
|
46
|
+
data: chartData.map((item) => ({ ...item, fill: item.visitors > 0 ? 'var(--chart-1)' : 'var(--chart-2)' })),
|
|
47
|
+
title: 'Visitors by month, with the months that lost them',
|
|
48
|
+
grid: { vertical: false },
|
|
49
|
+
tooltip: { cursor: false, hideLabel: true, hideIndicator: true },
|
|
50
|
+
bars: [{ dataKey: 'visitors', labels: [{ position: 'top', dataKey: 'month' }] }],
|
|
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,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A stacked bar chart with a legend, a chart block ported from shadcn/ui's chart-bar-stacked.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-bar-stacked` at
|
|
5
|
+
* `components/charts/chart-bar-stacked.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartBarStacked()}`.
|
|
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 { barChart, 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 ChartBarStacked() {
|
|
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()}>Bar Chart - Stacked + Legend</div>
|
|
43
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2024</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
46
|
+
${barChart({
|
|
47
|
+
config: chartConfig,
|
|
48
|
+
data: chartData,
|
|
49
|
+
title: 'Desktop and mobile visitors, January to June',
|
|
50
|
+
grid: { vertical: false },
|
|
51
|
+
xAxis: { dataKey: 'month', tickLine: false, tickMargin: 10, axisLine: false, tickFormatter: (value) => String(value).slice(0, 3) },
|
|
52
|
+
tooltip: { hideLabel: true },
|
|
53
|
+
legend: {},
|
|
54
|
+
bars: [
|
|
55
|
+
{ dataKey: 'desktop', stackId: 'a', fill: 'var(--color-desktop)', radius: [0, 0, 4, 4] },
|
|
56
|
+
{ dataKey: 'mobile', stackId: 'a', fill: 'var(--color-mobile)', radius: [4, 4, 0, 0] },
|
|
57
|
+
],
|
|
58
|
+
})}
|
|
59
|
+
</div>
|
|
60
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
61
|
+
<div class="flex gap-2 leading-none font-medium">
|
|
62
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
63
|
+
</div>
|
|
64
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A line chart, a chart block ported from shadcn/ui's chart-line-default.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-default` at
|
|
5
|
+
* `components/charts/chart-line-default.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineDefault()}`.
|
|
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 ChartLineDefault() {
|
|
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</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: 'natural', 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 line chart with dots and colors, a chart block ported from shadcn/ui's chart-line-dots-colors.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-dots-colors` at
|
|
5
|
+
* `components/charts/chart-line-dots-colors.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineDotsColors()}`.
|
|
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 ChartLineDotsColors() {
|
|
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 - Dots Colors</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
|
+
// Each point's dot in its browser's colour.
|
|
74
|
+
dot: ({ cx, cy, datum }) => svg`<circle class="ui-chart-dot" cx=${cx} cy=${cy} r="5" fill=${String(datum.fill)} stroke=${String(datum.fill)}></circle>`,
|
|
75
|
+
}],
|
|
76
|
+
})}
|
|
77
|
+
</div>
|
|
78
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
79
|
+
<div class="flex 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
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A line chart with custom dots, a chart block ported from shadcn/ui's chart-line-dots-custom.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-dots-custom` at
|
|
5
|
+
* `components/charts/chart-line-dots-custom.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineDotsCustom()}`.
|
|
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 ChartLineDotsCustom() {
|
|
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 - Custom Dots</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: { 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, hideLabel: true },
|
|
54
|
+
lines: [{
|
|
55
|
+
dataKey: 'desktop',
|
|
56
|
+
type: 'natural',
|
|
57
|
+
stroke: 'var(--color-desktop)',
|
|
58
|
+
strokeWidth: 2,
|
|
59
|
+
// lucide's git-commit-vertical, drawn as each point's dot.
|
|
60
|
+
dot: ({ cx, cy }) => {
|
|
61
|
+
const r = 24;
|
|
62
|
+
return svg`<svg xmlns="http://www.w3.org/2000/svg" x=${cx - r / 2} y=${cy - r / 2} width=${r} height=${r} viewBox="0 0 24 24" fill="hsl(var(--background))" stroke="var(--color-desktop)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-git-commit-vertical"><path d="M12 3v6"></path><circle cx="12" cy="12" r="3"></circle><path d="M12 15v6"></path></svg>`;
|
|
63
|
+
},
|
|
64
|
+
}],
|
|
65
|
+
})}
|
|
66
|
+
</div>
|
|
67
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
68
|
+
<div class="flex gap-2 leading-none font-medium">
|
|
69
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
70
|
+
</div>
|
|
71
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A line chart with dots, a chart block ported from shadcn/ui's chart-line-dots.
|
|
3
|
+
*
|
|
4
|
+
* Installed by `npx @webjsdev/ui add chart-line-dots` at
|
|
5
|
+
* `components/charts/chart-line-dots.ts`. It is app code you own, so edit it
|
|
6
|
+
* freely, and render it from any page with `${ChartLineDots()}`.
|
|
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 ChartLineDots() {
|
|
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 - Dots</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: { 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, hideLabel: true },
|
|
54
|
+
lines: [{ dataKey: 'desktop', type: 'natural', stroke: 'var(--color-desktop)', strokeWidth: 2, dot: { fill: 'var(--color-desktop)' }, activeDot: { r: 6 } }],
|
|
55
|
+
})}
|
|
56
|
+
</div>
|
|
57
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-2 text-sm')}>
|
|
58
|
+
<div class="flex gap-2 leading-none font-medium">
|
|
59
|
+
Trending up by 5.2% this month ${TrendingUp('h-4 w-4')}
|
|
60
|
+
</div>
|
|
61
|
+
<div class="leading-none text-muted-foreground">Showing total visitors for the last 6 months</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`;
|
|
65
|
+
}
|