@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,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's UI elements card: buttons, an item, a slider, an input
|
|
3
|
+
* group and a textarea, badges, radios, checkboxes, an alert dialog, a button
|
|
4
|
+
* group with a menu, and a switch. A fragment helper, rendered by the server,
|
|
5
|
+
* with the kit's elements for the parts that need behaviour. Installed by
|
|
6
|
+
* `npx @webjsdev/ui add preview` at `components/preview/ui-elements.ts`.
|
|
7
|
+
* Ported from shadcn/ui's preview block.
|
|
8
|
+
*
|
|
9
|
+
* The menu's trigger stays a direct child of the button group (its corner
|
|
10
|
+
* rules select direct children), so the menu names it by id. The id must be
|
|
11
|
+
* unique on the page.
|
|
12
|
+
*/
|
|
13
|
+
import { html } from '@webjsdev/core';
|
|
14
|
+
import { cn } from '../../../lib/utils.ts';
|
|
15
|
+
import {
|
|
16
|
+
alertDialogDescriptionClass,
|
|
17
|
+
alertDialogFooterClass,
|
|
18
|
+
alertDialogHeaderClass,
|
|
19
|
+
alertDialogTitleClass,
|
|
20
|
+
} from '../../../components/alert-dialog.ts';
|
|
21
|
+
import { badgeClass } from '../../../components/badge.ts';
|
|
22
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
23
|
+
import { buttonGroupClass } from '../../../components/button-group.ts';
|
|
24
|
+
import { cardClass, cardContentClass } from '../../../components/card.ts';
|
|
25
|
+
import { checkboxClass } from '../../../components/checkbox.ts';
|
|
26
|
+
import '../../../components/dropdown-menu.ts';
|
|
27
|
+
import { fieldClass, fieldGroupClass } from '../../../components/field.ts';
|
|
28
|
+
import {
|
|
29
|
+
inputGroupAddonClass,
|
|
30
|
+
inputGroupClass,
|
|
31
|
+
inputGroupInputClass,
|
|
32
|
+
inputGroupTextClass,
|
|
33
|
+
} from '../../../components/input-group.ts';
|
|
34
|
+
import {
|
|
35
|
+
itemActionsClass,
|
|
36
|
+
itemClass,
|
|
37
|
+
itemContentClass,
|
|
38
|
+
itemDescriptionClass,
|
|
39
|
+
itemTitleClass,
|
|
40
|
+
} from '../../../components/item.ts';
|
|
41
|
+
import { radioClass, radioGroupClass } from '../../../components/radio-group.ts';
|
|
42
|
+
import { sliderClass } from '../../../components/slider.ts';
|
|
43
|
+
import '../../../components/switch.ts';
|
|
44
|
+
import { textareaClass } from '../../../components/textarea.ts';
|
|
45
|
+
import { ChevronUpIcon, SearchIcon } from '../../../lib/icons.ts';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* `id` names this copy, since shadcn renders the card twice on the board (one
|
|
49
|
+
* copy per breakpoint): it prefixes the menu trigger id and the radio group
|
|
50
|
+
* name, which must not repeat on a page.
|
|
51
|
+
*/
|
|
52
|
+
export function uiElements(opts: { id?: string } = {}) {
|
|
53
|
+
const id = opts.id ?? 'ui-elements';
|
|
54
|
+
return html`
|
|
55
|
+
<div data-slot="card" data-size="default" class=${cn(cardClass(), 'w-full')}>
|
|
56
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-6')}>
|
|
57
|
+
<div class="flex flex-col gap-4">
|
|
58
|
+
<div class="flex flex-wrap gap-2">
|
|
59
|
+
<button type="button" data-slot="button" data-variant="default" data-size="default" class=${buttonClass()}>Button</button>
|
|
60
|
+
<button type="button" data-slot="button" data-variant="secondary" data-size="default" class=${buttonClass({ variant: 'secondary' })}>Secondary</button>
|
|
61
|
+
<button type="button" data-slot="button" data-variant="outline" data-size="default" class=${buttonClass({ variant: 'outline' })}>Outline</button>
|
|
62
|
+
<button type="button" data-slot="button" data-variant="ghost" data-size="default" class=${buttonClass({ variant: 'ghost' })}>Ghost</button>
|
|
63
|
+
</div>
|
|
64
|
+
<div data-slot="item" data-variant="outline" data-size="default" class=${itemClass({ variant: 'outline' })}>
|
|
65
|
+
<div data-slot="item-content" class=${itemContentClass()}>
|
|
66
|
+
<div data-slot="item-title" class=${itemTitleClass()}>Two-factor authentication</div>
|
|
67
|
+
<p data-slot="item-description" class=${cn(itemDescriptionClass(), 'text-pretty xl:hidden 2xl:block')}>
|
|
68
|
+
Verify via email or phone number.
|
|
69
|
+
</p>
|
|
70
|
+
</div>
|
|
71
|
+
<div data-slot="item-actions" class=${cn(itemActionsClass(), 'hidden md:flex')}>
|
|
72
|
+
<button type="button" data-slot="button" data-variant="secondary" data-size="sm" class=${buttonClass({ variant: 'secondary', size: 'sm' })}>Enable</button>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
<ui-slider class="flex-1">
|
|
77
|
+
<input type="range" min="0" max="1000" step="10" value="500" aria-label="Slider" class=${sliderClass()}>
|
|
78
|
+
</ui-slider>
|
|
79
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
80
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
81
|
+
<div data-slot="input-group" role="group" class=${inputGroupClass()}>
|
|
82
|
+
<input data-slot="input-group-control" placeholder="Name" aria-label="Name" class=${inputGroupInputClass()}>
|
|
83
|
+
<div data-slot="input-group-addon" data-align="inline-end" role="group" class=${inputGroupAddonClass({ align: 'inline-end' })}>
|
|
84
|
+
<span class=${inputGroupTextClass()}>${SearchIcon()}</span>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${cn(fieldClass(), 'flex-1')}>
|
|
89
|
+
<textarea data-slot="textarea" placeholder="Message" aria-label="Message" class=${cn(textareaClass(), 'resize-none')}></textarea>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="flex items-center gap-2">
|
|
93
|
+
<div class="flex gap-2">
|
|
94
|
+
<span data-slot="badge" data-variant="default" class=${badgeClass()}>Badge</span>
|
|
95
|
+
<span data-slot="badge" data-variant="secondary" class=${badgeClass({ variant: 'secondary' })}>Secondary</span>
|
|
96
|
+
<span data-slot="badge" data-variant="outline" class=${badgeClass({ variant: 'outline' })}>Outline</span>
|
|
97
|
+
</div>
|
|
98
|
+
<div role="radiogroup" aria-label="Fruit" data-slot="radio-group" class=${cn(radioGroupClass(), 'ml-auto flex w-fit gap-3')}>
|
|
99
|
+
<input type="radio" name=${`${id}-fruit`} value="apple" checked aria-label="Apple" data-slot="radio" class=${radioClass()}>
|
|
100
|
+
<input type="radio" name=${`${id}-fruit`} value="banana" aria-label="Banana" data-slot="radio" class=${radioClass()}>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="flex gap-3">
|
|
103
|
+
<input type="checkbox" checked aria-label="First option" data-slot="checkbox" class=${checkboxClass()}>
|
|
104
|
+
<input type="checkbox" aria-label="Second option" data-slot="checkbox" class=${checkboxClass()}>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="flex items-center gap-4">
|
|
108
|
+
<ui-alert-dialog>
|
|
109
|
+
<ui-alert-dialog-trigger>
|
|
110
|
+
<button type="button" data-slot="button" data-variant="outline" data-size="default" class=${buttonClass({ variant: 'outline' })}>
|
|
111
|
+
<span class="hidden md:flex style-sera:md:hidden">Alert Dialog</span>
|
|
112
|
+
<span class="flex md:hidden style-sera:md:flex">Dialog</span>
|
|
113
|
+
</button>
|
|
114
|
+
</ui-alert-dialog-trigger>
|
|
115
|
+
<ui-alert-dialog-content size="sm">
|
|
116
|
+
<div data-slot="alert-dialog-header" class=${alertDialogHeaderClass()}>
|
|
117
|
+
<h2 data-slot="alert-dialog-title" class=${alertDialogTitleClass()}>Allow accessory to connect?</h2>
|
|
118
|
+
<p data-slot="alert-dialog-description" class=${alertDialogDescriptionClass()}>
|
|
119
|
+
Do you want to allow the USB accessory to connect to this
|
|
120
|
+
device and your data?
|
|
121
|
+
</p>
|
|
122
|
+
</div>
|
|
123
|
+
<div data-slot="alert-dialog-footer" class=${alertDialogFooterClass()}>
|
|
124
|
+
<ui-alert-dialog-cancel>Don't allow</ui-alert-dialog-cancel>
|
|
125
|
+
<ui-alert-dialog-action>Allow</ui-alert-dialog-action>
|
|
126
|
+
</div>
|
|
127
|
+
</ui-alert-dialog-content>
|
|
128
|
+
</ui-alert-dialog>
|
|
129
|
+
<div role="group" data-slot="button-group" data-orientation="horizontal" class=${buttonGroupClass()}>
|
|
130
|
+
<button type="button" data-slot="button" data-variant="outline" data-size="default" class=${buttonClass({ variant: 'outline' })}>
|
|
131
|
+
<span class="style-sera:hidden">Button Group</span>
|
|
132
|
+
<span class="hidden style-sera:block">Group</span>
|
|
133
|
+
</button>
|
|
134
|
+
<button type="button" id=${`${id}-quick-actions`} data-slot="button" data-variant="outline" data-size="icon" aria-label="Quick actions" class=${buttonClass({ variant: 'outline', size: 'icon' })}>
|
|
135
|
+
${ChevronUpIcon()}
|
|
136
|
+
</button>
|
|
137
|
+
</div>
|
|
138
|
+
<ui-dropdown-menu trigger=${`${id}-quick-actions`} class="absolute">
|
|
139
|
+
<ui-dropdown-menu-content align="end" side="top" class="w-fit">
|
|
140
|
+
<ui-dropdown-menu-group>
|
|
141
|
+
<ui-dropdown-menu-label>Quick Actions</ui-dropdown-menu-label>
|
|
142
|
+
<ui-dropdown-menu-item>Mute Conversation</ui-dropdown-menu-item>
|
|
143
|
+
<ui-dropdown-menu-item>Mark as Read</ui-dropdown-menu-item>
|
|
144
|
+
<ui-dropdown-menu-item>Block User</ui-dropdown-menu-item>
|
|
145
|
+
</ui-dropdown-menu-group>
|
|
146
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
147
|
+
<ui-dropdown-menu-group>
|
|
148
|
+
<ui-dropdown-menu-label>Conversation</ui-dropdown-menu-label>
|
|
149
|
+
<ui-dropdown-menu-item>Share Conversation</ui-dropdown-menu-item>
|
|
150
|
+
<ui-dropdown-menu-item>Copy Conversation</ui-dropdown-menu-item>
|
|
151
|
+
<ui-dropdown-menu-item>Report Conversation</ui-dropdown-menu-item>
|
|
152
|
+
</ui-dropdown-menu-group>
|
|
153
|
+
<ui-dropdown-menu-separator></ui-dropdown-menu-separator>
|
|
154
|
+
<ui-dropdown-menu-group>
|
|
155
|
+
<ui-dropdown-menu-item variant="destructive">Delete Conversation</ui-dropdown-menu-item>
|
|
156
|
+
</ui-dropdown-menu-group>
|
|
157
|
+
</ui-dropdown-menu-content>
|
|
158
|
+
</ui-dropdown-menu>
|
|
159
|
+
<ui-switch checked aria-label="Enable" class="ml-auto"></ui-switch>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
`;
|
|
164
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's usage card: this billing cycle's usage, one row per
|
|
3
|
+
* meter with a small circular gauge. A fragment helper, rendered by the
|
|
4
|
+
* server. Installed by `npx @webjsdev/ui add preview` at
|
|
5
|
+
* `components/preview/usage-card.ts`. Ported from shadcn/ui's preview block.
|
|
6
|
+
*/
|
|
7
|
+
import { html, svg } from '@webjsdev/core';
|
|
8
|
+
import { cn } from '../../../lib/utils.ts';
|
|
9
|
+
import { cardClass, cardContentClass, cardHeaderClass, cardTitleClass } from '../../../components/card.ts';
|
|
10
|
+
import {
|
|
11
|
+
itemActionsClass,
|
|
12
|
+
itemClass,
|
|
13
|
+
itemContentClass,
|
|
14
|
+
itemGroupClass,
|
|
15
|
+
itemMediaClass,
|
|
16
|
+
itemTitleClass,
|
|
17
|
+
} from '../../../components/item.ts';
|
|
18
|
+
|
|
19
|
+
// Usage items with percentage and value.
|
|
20
|
+
const items = [
|
|
21
|
+
{ name: 'Edge Requests', value: '$1.83K', percentage: 67.34 },
|
|
22
|
+
{ name: 'Fast Data Transfer', percentage: 52.18, value: '$952.51' },
|
|
23
|
+
{ name: 'Monitoring data points', percentage: 89.42, value: '$901.20' },
|
|
24
|
+
{ name: 'Web Analytics Events', percentage: 45.67, value: '$603.71' },
|
|
25
|
+
{ name: 'ISR Writes', percentage: 26.23, value: '524.52K / 2M' },
|
|
26
|
+
{ name: 'Function Duration', percentage: 5.11, value: '5.11 GB Hrs / 1K GB Hrs' },
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
/** A 16px ring filled to `percentage`. */
|
|
30
|
+
function circularGauge(percentage: number) {
|
|
31
|
+
const normalized = Math.min(Math.max(percentage, 0), 100);
|
|
32
|
+
const circumference = 2 * Math.PI * 42.5;
|
|
33
|
+
const strokePercent = (normalized / 100) * circumference;
|
|
34
|
+
return html`<svg aria-hidden="true" fill="none" height="16" width="16" stroke-width="2" viewBox="0 0 100 100" class="-rotate-90">${svg`
|
|
35
|
+
<circle cx="50" cy="50" r="42.5" stroke-width="12" stroke-dashoffset="0" stroke-linecap="round" stroke-linejoin="round" class="opacity-20" stroke="currentColor" style=${`stroke-dasharray: ${circumference} ${circumference}`}></circle>
|
|
36
|
+
<circle cx="50" cy="50" r="42.5" stroke-width="12" stroke-dashoffset="0" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" class="transition-all duration-300" style=${`stroke-dasharray: ${strokePercent} ${circumference}`}></circle>
|
|
37
|
+
`}</svg>`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function usageCard() {
|
|
41
|
+
return html`
|
|
42
|
+
<div data-slot="card" data-size="default" class=${cn(cardClass(), 'w-full max-w-sm gap-4')}>
|
|
43
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
44
|
+
<div data-slot="card-title" class=${cn(cardTitleClass(), 'px-1 text-sm')}>5 days remaining in cycle</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
47
|
+
<div role="list" data-slot="item-group" class=${cn(itemGroupClass(), 'gap-0')}>
|
|
48
|
+
${items.map((item) => html`
|
|
49
|
+
<a href="#" role="listitem" data-slot="item" data-variant="default" data-size="xs" class=${cn(itemClass({ size: 'xs' }), 'px-0 group-hover/item-group:bg-transparent')}>
|
|
50
|
+
<div data-slot="item-media" data-variant="icon" class=${cn(itemMediaClass({ variant: 'icon' }), 'text-primary')}>${circularGauge(item.percentage)}</div>
|
|
51
|
+
<div data-slot="item-content" class=${cn(itemContentClass(), 'inline-block truncate')}>
|
|
52
|
+
<div data-slot="item-title" class=${cn(itemTitleClass(), 'inline')}>${item.name}</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div data-slot="item-actions" class=${itemActionsClass()}>
|
|
55
|
+
<span class="font-mono text-xs font-medium text-muted-foreground tabular-nums">${item.value}</span>
|
|
56
|
+
</div>
|
|
57
|
+
</a>
|
|
58
|
+
`)}
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's visitors card: six months of desktop visitors as an
|
|
3
|
+
* area chart, with the change since last month as a badge. A fragment helper;
|
|
4
|
+
* the chart is the kit's `areaChart`, drawn by the server. Installed by
|
|
5
|
+
* `npx @webjsdev/ui add preview` at `components/preview/visitors.ts`.
|
|
6
|
+
* Ported from shadcn/ui's preview block.
|
|
7
|
+
*/
|
|
8
|
+
import { html } from '@webjsdev/core';
|
|
9
|
+
import { cn } from '../../../lib/utils.ts';
|
|
10
|
+
import { badgeClass } from '../../../components/badge.ts';
|
|
11
|
+
import {
|
|
12
|
+
cardActionClass,
|
|
13
|
+
cardClass,
|
|
14
|
+
cardContentClass,
|
|
15
|
+
cardDescriptionClass,
|
|
16
|
+
cardHeaderClass,
|
|
17
|
+
cardTitleClass,
|
|
18
|
+
} from '../../../components/card.ts';
|
|
19
|
+
import { areaChart, type ChartConfig } from '../../../components/chart.ts';
|
|
20
|
+
|
|
21
|
+
const areaChartData = [
|
|
22
|
+
{ month: 'January', desktop: 186 },
|
|
23
|
+
{ month: 'February', desktop: 305 },
|
|
24
|
+
{ month: 'March', desktop: 237 },
|
|
25
|
+
{ month: 'April', desktop: 73 },
|
|
26
|
+
{ month: 'May', desktop: 209 },
|
|
27
|
+
{ month: 'June', desktop: 214 },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
const areaChartConfig: ChartConfig = {
|
|
31
|
+
desktop: { label: 'Desktop', color: 'var(--chart-1)' },
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** The change from the month before to the last month, in whole percent. */
|
|
35
|
+
function trend() {
|
|
36
|
+
const latest = areaChartData[areaChartData.length - 1]?.desktop ?? 0;
|
|
37
|
+
const previous = areaChartData[areaChartData.length - 2]?.desktop ?? latest;
|
|
38
|
+
return previous === 0 ? 0 : Math.round(((latest - previous) / previous) * 100);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function visitors() {
|
|
42
|
+
const percent = trend();
|
|
43
|
+
const variant = percent >= 0 ? 'secondary' : 'destructive';
|
|
44
|
+
return html`
|
|
45
|
+
<div data-slot="card" data-size="default" class=${cn(cardClass(), 'pb-0')}>
|
|
46
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
47
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Visitors</div>
|
|
48
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Last 6 months</div>
|
|
49
|
+
<div data-slot="card-action" class=${cardActionClass()}>
|
|
50
|
+
<span data-slot="badge" data-variant=${variant} class=${badgeClass({ variant })}>${percent > 0 ? '+' : ''}${percent}% vs last month</span>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'px-0')}>
|
|
54
|
+
${areaChart({
|
|
55
|
+
config: areaChartConfig,
|
|
56
|
+
data: areaChartData,
|
|
57
|
+
class: 'h-48 w-full',
|
|
58
|
+
title: 'Desktop visitors by month, January to June',
|
|
59
|
+
width: 384,
|
|
60
|
+
height: 192,
|
|
61
|
+
margin: { left: 0, right: 0, top: 6, bottom: 0 },
|
|
62
|
+
xAxis: { dataKey: 'month', hide: true, tickLine: false, axisLine: false, tickMargin: 6, tickFormatter: (value) => String(value).slice(0, 3) },
|
|
63
|
+
tooltip: { cursor: false, indicator: 'line' },
|
|
64
|
+
areas: [
|
|
65
|
+
{ dataKey: 'desktop', type: 'natural', fill: 'var(--color-desktop)', fillOpacity: 0.15, stroke: 'var(--color-desktop)', strokeWidth: 2 },
|
|
66
|
+
],
|
|
67
|
+
})}
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's weekly fitness card: the workout load per day as a row
|
|
3
|
+
* of filled bars. A fragment helper, rendered by the server. Installed by
|
|
4
|
+
* `npx @webjsdev/ui add preview` at
|
|
5
|
+
* `components/preview/weekly-fitness-summary.ts`. Ported from shadcn/ui's
|
|
6
|
+
* preview block.
|
|
7
|
+
*/
|
|
8
|
+
import { html } from '@webjsdev/core';
|
|
9
|
+
import { cn } from '../../../lib/utils.ts';
|
|
10
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
11
|
+
import {
|
|
12
|
+
cardClass,
|
|
13
|
+
cardContentClass,
|
|
14
|
+
cardDescriptionClass,
|
|
15
|
+
cardFooterClass,
|
|
16
|
+
cardHeaderClass,
|
|
17
|
+
cardTitleClass,
|
|
18
|
+
} from '../../../components/card.ts';
|
|
19
|
+
|
|
20
|
+
const FITNESS_WEEKLY_LOAD = [
|
|
21
|
+
{ day: 'M', load: 84 },
|
|
22
|
+
{ day: 'T', load: 52 },
|
|
23
|
+
{ day: 'W', load: 73 },
|
|
24
|
+
{ day: 'T', load: 66 },
|
|
25
|
+
{ day: 'F', load: 91 },
|
|
26
|
+
{ day: 'S', load: 48 },
|
|
27
|
+
{ day: 'S', load: 61 },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
export function weeklyFitnessSummary() {
|
|
31
|
+
return html`
|
|
32
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
33
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
34
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Weekly Fitness Summary</div>
|
|
35
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Calories and workout load by day</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-4')}>
|
|
38
|
+
<div class="grid grid-cols-7 gap-1.5">
|
|
39
|
+
${FITNESS_WEEKLY_LOAD.map((day) => html`
|
|
40
|
+
<div class="rounded-md p-1.5 text-center ring ring-border">
|
|
41
|
+
<div class="text-sm text-muted-foreground">${day.day}</div>
|
|
42
|
+
<div class="relative mt-1 h-16 overflow-hidden rounded-sm bg-muted">
|
|
43
|
+
<div class="absolute inset-x-0 bottom-0 rounded-sm bg-chart-3" style=${`height: ${day.load}%`}></div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
`)}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
50
|
+
<button type="button" data-slot="button" data-variant="default" data-size="default" class=${cn(buttonClass(), 'w-full')}>View details</button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's page: thirty-one cards built from the kit, laid out in
|
|
3
|
+
* seven columns, the sheet the design-system configurator previews a style
|
|
4
|
+
* on.
|
|
5
|
+
*
|
|
6
|
+
* Installed by `npx @webjsdev/ui add preview` at `app/preview/page.ts`, with
|
|
7
|
+
* each card at `components/preview/<card>.ts`. It is app code you own, so edit
|
|
8
|
+
* it freely. Ported from shadcn/ui's preview block.
|
|
9
|
+
*/
|
|
10
|
+
import { html } from '@webjsdev/core';
|
|
11
|
+
import type { Metadata } from '@webjsdev/core';
|
|
12
|
+
import { activateAgentDialog } from './cards/activate-agent-dialog.ts';
|
|
13
|
+
import { analyticsCard } from './cards/analytics-card.ts';
|
|
14
|
+
import { anomalyAlert } from './cards/anomaly-alert.ts';
|
|
15
|
+
import { barChartCard } from './cards/bar-chart-card.ts';
|
|
16
|
+
import { bookAppointment } from './cards/book-appointment.ts';
|
|
17
|
+
import { codespacesCard } from './cards/codespaces-card.ts';
|
|
18
|
+
import { contributionsActivity } from './cards/contributions-activity.ts';
|
|
19
|
+
import { contributors } from './cards/contributors.ts';
|
|
20
|
+
import { environmentVariables } from './cards/environment-variables.ts';
|
|
21
|
+
import { feedbackForm } from './cards/feedback-form.ts';
|
|
22
|
+
import { fileUpload } from './cards/file-upload.ts';
|
|
23
|
+
import { githubProfile } from './cards/github-profile.ts';
|
|
24
|
+
import { iconPreviewGrid } from './cards/icon-preview-grid.ts';
|
|
25
|
+
import { inviteTeam } from './cards/invite-team.ts';
|
|
26
|
+
import { invoice } from './cards/invoice.ts';
|
|
27
|
+
import { liveWaveformCard } from './cards/live-waveform.ts';
|
|
28
|
+
import { noTeamMembers } from './cards/no-team-members.ts';
|
|
29
|
+
import { notFound } from './cards/not-found.ts';
|
|
30
|
+
import { observabilityCard } from './cards/observability-card.ts';
|
|
31
|
+
import { pieChartCard } from './cards/pie-chart-card.ts';
|
|
32
|
+
import { reportBug } from './cards/report-bug.ts';
|
|
33
|
+
import { shippingAddress } from './cards/shipping-address.ts';
|
|
34
|
+
import { shortcuts } from './cards/shortcuts.ts';
|
|
35
|
+
import { skeletonLoading } from './cards/skeleton-loading.ts';
|
|
36
|
+
import { sleepReport } from './cards/sleep-report.ts';
|
|
37
|
+
import { styleOverview } from './cards/style-overview.ts';
|
|
38
|
+
import { typographySpecimen } from './cards/typography-specimen.ts';
|
|
39
|
+
import { uiElements } from './cards/ui-elements.ts';
|
|
40
|
+
import { usageCard } from './cards/usage-card.ts';
|
|
41
|
+
import { visitors } from './cards/visitors.ts';
|
|
42
|
+
import { weeklyFitnessSummary } from './cards/weekly-fitness-summary.ts';
|
|
43
|
+
|
|
44
|
+
export const metadata: Metadata = { title: 'Preview' };
|
|
45
|
+
|
|
46
|
+
const COLUMN = 'flex flex-col p-1 [contain-intrinsic-size:380px_1200px] [content-visibility:auto]';
|
|
47
|
+
|
|
48
|
+
export default function PreviewPage() {
|
|
49
|
+
return html`
|
|
50
|
+
<div class="overflow-x-auto overflow-y-hidden bg-muted contain-[paint] [--gap:--spacing(4)] 3xl:[--gap:--spacing(12)] md:[--gap:--spacing(10)] dark:bg-background style-lyra:md:[--gap:--spacing(6)] style-mira:md:[--gap:--spacing(6)]">
|
|
51
|
+
<div class="flex w-full min-w-max justify-center">
|
|
52
|
+
<div class="grid w-[2400px] grid-cols-7 items-start gap-(--gap) bg-muted p-(--gap) md:w-[3000px] dark:bg-background style-lyra:md:w-[2600px] style-mira:md:w-[2600px] *:[div]:gap-(--gap)" data-slot="capture-target">
|
|
53
|
+
<div class=${COLUMN}>
|
|
54
|
+
${styleOverview()}
|
|
55
|
+
${typographySpecimen()}
|
|
56
|
+
<div class="md:hidden">${uiElements()}</div>
|
|
57
|
+
${codespacesCard()}
|
|
58
|
+
${invoice()}
|
|
59
|
+
</div>
|
|
60
|
+
<div class=${COLUMN}>
|
|
61
|
+
${iconPreviewGrid()}
|
|
62
|
+
<div class="hidden w-full md:flex">${uiElements({ id: 'ui-elements-md' })}</div>
|
|
63
|
+
${observabilityCard()}
|
|
64
|
+
${shippingAddress()}
|
|
65
|
+
</div>
|
|
66
|
+
<div class=${COLUMN}>
|
|
67
|
+
${environmentVariables()}
|
|
68
|
+
${barChartCard()}
|
|
69
|
+
${inviteTeam()}
|
|
70
|
+
${activateAgentDialog()}
|
|
71
|
+
</div>
|
|
72
|
+
<div class=${COLUMN}>
|
|
73
|
+
${skeletonLoading()}
|
|
74
|
+
${pieChartCard()}
|
|
75
|
+
${noTeamMembers()}
|
|
76
|
+
${reportBug()}
|
|
77
|
+
${contributors()}
|
|
78
|
+
</div>
|
|
79
|
+
<div class=${COLUMN}>
|
|
80
|
+
${feedbackForm()}
|
|
81
|
+
${bookAppointment()}
|
|
82
|
+
${sleepReport()}
|
|
83
|
+
${githubProfile()}
|
|
84
|
+
</div>
|
|
85
|
+
<div class=${COLUMN}>
|
|
86
|
+
${weeklyFitnessSummary()}
|
|
87
|
+
${fileUpload()}
|
|
88
|
+
${analyticsCard()}
|
|
89
|
+
${usageCard()}
|
|
90
|
+
${shortcuts()}
|
|
91
|
+
</div>
|
|
92
|
+
<div class=${COLUMN}>
|
|
93
|
+
${anomalyAlert()}
|
|
94
|
+
${liveWaveformCard()}
|
|
95
|
+
${visitors()}
|
|
96
|
+
${contributionsActivity()}
|
|
97
|
+
${notFound()}
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
`;
|
|
103
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 Account Access card: an email and password form with a
|
|
3
|
+
* danger zone link. A fragment helper. Installed by
|
|
4
|
+
* `npx @webjsdev/ui add preview-02` at `components/preview-02/account-access.ts`.
|
|
5
|
+
* Ported from shadcn/ui's preview-02.
|
|
6
|
+
*
|
|
7
|
+
* The `<form>` has no `action` yet. Bind a server action from a
|
|
8
|
+
* `'use server'` file (`<form action=${updateCredentials}>`) before you ship it.
|
|
9
|
+
*/
|
|
10
|
+
import { html } from '@webjsdev/core';
|
|
11
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
12
|
+
import {
|
|
13
|
+
cardClass,
|
|
14
|
+
cardContentClass,
|
|
15
|
+
cardDescriptionClass,
|
|
16
|
+
cardFooterClass,
|
|
17
|
+
cardHeaderClass,
|
|
18
|
+
cardTitleClass,
|
|
19
|
+
} from '../../../components/card.ts';
|
|
20
|
+
import { fieldClass, fieldGroupClass, fieldLabelClass } from '../../../components/field.ts';
|
|
21
|
+
import { inputClass } from '../../../components/input.ts';
|
|
22
|
+
import {
|
|
23
|
+
itemClass,
|
|
24
|
+
itemContentClass,
|
|
25
|
+
itemDescriptionClass,
|
|
26
|
+
itemMediaClass,
|
|
27
|
+
itemTitleClass,
|
|
28
|
+
} from '../../../components/item.ts';
|
|
29
|
+
import { cn } from '../../../lib/utils.ts';
|
|
30
|
+
import { AlertCircleIcon, ArrowRightIcon, LockKeyholeIcon } from '../../../lib/icons.ts';
|
|
31
|
+
|
|
32
|
+
export function accountAccess() {
|
|
33
|
+
return html`
|
|
34
|
+
<form data-slot="card" data-size="default" class=${cardClass()}>
|
|
35
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
36
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Account Access</div>
|
|
37
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Update your credentials or re-authenticate.</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
40
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
41
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
42
|
+
<label data-slot="field-label" for="email-address" class=${fieldLabelClass()}>Email Address</label>
|
|
43
|
+
<input data-slot="input" id="email-address" name="email" type="email" value="artist@studio.inc" class=${inputClass()}>
|
|
44
|
+
</div>
|
|
45
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
46
|
+
<div class="flex items-center justify-between">
|
|
47
|
+
<label data-slot="field-label" for="current-password" class=${fieldLabelClass()}>Current Password</label>
|
|
48
|
+
<a href="#" class="text-xs font-medium tracking-wider text-muted-foreground uppercase hover:text-foreground">Forgot?</a>
|
|
49
|
+
</div>
|
|
50
|
+
<input data-slot="input" id="current-password" name="password" type="password" value="password123" class=${inputClass()}>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-4')}>
|
|
55
|
+
<button type="submit" data-slot="button" data-variant="default" data-size="default" class=${cn(buttonClass(), 'w-full')}>
|
|
56
|
+
${LockKeyholeIcon()}
|
|
57
|
+
Update Security
|
|
58
|
+
</button>
|
|
59
|
+
<a href="#" data-slot="item" data-variant="muted" data-size="default" class=${itemClass({ variant: 'muted' })}>
|
|
60
|
+
<div data-slot="item-media" data-variant="icon" class=${itemMediaClass({ variant: 'icon' })}>${AlertCircleIcon('text-destructive')}</div>
|
|
61
|
+
<div data-slot="item-content" class=${itemContentClass()}>
|
|
62
|
+
<div data-slot="item-title" class=${itemTitleClass()}>Danger Zone</div>
|
|
63
|
+
<p data-slot="item-description" class=${cn(itemDescriptionClass(), 'line-clamp-1')}>Archive account and remove catalog</p>
|
|
64
|
+
</div>
|
|
65
|
+
${ArrowRightIcon('size-4')}
|
|
66
|
+
</a>
|
|
67
|
+
</div>
|
|
68
|
+
</form>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 card overview: the card balance, the next payment due and a
|
|
3
|
+
* small bar chart of the year's activity. A fragment helper; the chart is the
|
|
4
|
+
* kit's server-drawn `barChart`. Installed by `npx @webjsdev/ui add preview-02`
|
|
5
|
+
* at `components/preview-02/card-overview.ts`. Ported from shadcn/ui's
|
|
6
|
+
* preview-02.
|
|
7
|
+
*/
|
|
8
|
+
import { html } from '@webjsdev/core';
|
|
9
|
+
import { badgeClass } from '../../../components/badge.ts';
|
|
10
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
11
|
+
import { cardClass, cardContentClass, cardDescriptionClass, cardTitleClass } from '../../../components/card.ts';
|
|
12
|
+
import { barChart, type ChartConfig } from '../../../components/chart.ts';
|
|
13
|
+
import { cn } from '../../../lib/utils.ts';
|
|
14
|
+
|
|
15
|
+
const activityData = [
|
|
16
|
+
{ month: 'Jan', amount: 40 },
|
|
17
|
+
{ month: 'Feb', amount: 55 },
|
|
18
|
+
{ month: 'Mar', amount: 35 },
|
|
19
|
+
{ month: 'Apr', amount: 60 },
|
|
20
|
+
{ month: 'May', amount: 45 },
|
|
21
|
+
{ month: 'Jun', amount: 50 },
|
|
22
|
+
{ month: 'Jul', amount: 65 },
|
|
23
|
+
{ month: 'Aug', amount: 40 },
|
|
24
|
+
{ month: 'Sep', amount: 55 },
|
|
25
|
+
{ month: 'Oct', amount: 70 },
|
|
26
|
+
{ month: 'Nov', amount: 45 },
|
|
27
|
+
{ month: 'Dec', amount: 80 },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
const chartConfig = {
|
|
31
|
+
amount: { label: 'Activity', color: 'var(--chart-2)' },
|
|
32
|
+
} satisfies ChartConfig;
|
|
33
|
+
|
|
34
|
+
export function cardOverview() {
|
|
35
|
+
return html`
|
|
36
|
+
<div class="grid grid-cols-2 gap-3">
|
|
37
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
38
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
39
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Card Balance</div>
|
|
40
|
+
<div data-slot="card-title" class=${cn(cardTitleClass(), 'text-2xl tabular-nums')}>US$12.94</div>
|
|
41
|
+
<div data-slot="card-description" class=${cn(cardDescriptionClass(), 'tabular-nums')}>US$11,337.06 Available</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div data-slot="card" data-size="default" class=${cn(cardClass(), 'flex flex-col justify-between')}>
|
|
45
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-1 flex-col justify-between')}>
|
|
46
|
+
<div class="flex flex-col gap-1">
|
|
47
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Payment Due</div>
|
|
48
|
+
<div data-slot="card-title" class=${cn(cardTitleClass(), 'text-2xl')}>1 Apr</div>
|
|
49
|
+
</div>
|
|
50
|
+
<button type="button" data-slot="button" data-variant="outline" data-size="sm" class=${cn(buttonClass({ variant: 'outline', size: 'sm' }), 'mt-3 w-full')}>Pay Early</button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div data-slot="card" data-size="default" class=${cn(cardClass(), 'col-span-2')}>
|
|
54
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-2')}>
|
|
55
|
+
<div class="flex items-center justify-between">
|
|
56
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Yearly Activity</div>
|
|
57
|
+
<span data-slot="badge" data-variant="secondary" class=${badgeClass({ variant: 'secondary' })}>+US$0.25 Daily Cash</span>
|
|
58
|
+
</div>
|
|
59
|
+
${barChart({
|
|
60
|
+
config: chartConfig,
|
|
61
|
+
data: activityData,
|
|
62
|
+
title: 'Card activity by month',
|
|
63
|
+
class: 'aspect-auto h-20 w-full',
|
|
64
|
+
width: 330,
|
|
65
|
+
height: 80,
|
|
66
|
+
margin: { top: 4, right: 0, bottom: 0, left: 0 },
|
|
67
|
+
xAxis: { dataKey: 'month', tickLine: false, tickMargin: 4, axisLine: false, tickFormatter: (v) => String(v).slice(0, 1), class: 'text-[10px]' },
|
|
68
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
69
|
+
bars: [{ dataKey: 'amount', fill: 'var(--color-amount)', radius: [3, 3, 0, 0] }],
|
|
70
|
+
})}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
75
|
+
}
|