@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,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's browser share card: visitors by browser as a donut
|
|
3
|
+
* with the total in its centre and a legend, then the leading browser's
|
|
4
|
+
* share as a progress bar. A fragment helper, rendered by the server, with
|
|
5
|
+
* the kit's chart (plain SVG; `<ui-chart>` adds the tooltip). Installed by
|
|
6
|
+
* `npx @webjsdev/ui add preview` at `components/preview/pie-chart-card.ts`.
|
|
7
|
+
* Ported from shadcn/ui's preview block.
|
|
8
|
+
*/
|
|
9
|
+
import { html, svg } from '@webjsdev/core';
|
|
10
|
+
import { cn } from '../../../lib/utils.ts';
|
|
11
|
+
import { badgeClass } from '../../../components/badge.ts';
|
|
12
|
+
import {
|
|
13
|
+
cardActionClass,
|
|
14
|
+
cardClass,
|
|
15
|
+
cardContentClass,
|
|
16
|
+
cardDescriptionClass,
|
|
17
|
+
cardFooterClass,
|
|
18
|
+
cardHeaderClass,
|
|
19
|
+
cardTitleClass,
|
|
20
|
+
} from '../../../components/card.ts';
|
|
21
|
+
import { pieChart, type ChartConfig } from '../../../components/chart.ts';
|
|
22
|
+
import { progressClass } from '../../../components/progress.ts';
|
|
23
|
+
|
|
24
|
+
const pieChartData = [
|
|
25
|
+
{ browser: 'chrome', visitors: 275, fill: 'var(--color-chrome)' },
|
|
26
|
+
{ browser: 'safari', visitors: 200, fill: 'var(--color-safari)' },
|
|
27
|
+
{ browser: 'firefox', visitors: 287, fill: 'var(--color-firefox)' },
|
|
28
|
+
{ browser: 'edge', visitors: 173, fill: 'var(--color-edge)' },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const pieChartConfig: ChartConfig = {
|
|
32
|
+
visitors: { label: 'Visitors' },
|
|
33
|
+
chrome: { label: 'Chrome', color: 'var(--chart-1)' },
|
|
34
|
+
safari: { label: 'Safari', color: 'var(--chart-2)' },
|
|
35
|
+
firefox: { label: 'Firefox', color: 'var(--chart-3)' },
|
|
36
|
+
edge: { label: 'Edge', color: 'var(--chart-4)' },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export function pieChartCard() {
|
|
40
|
+
const totalVisitors = pieChartData.reduce((sum, item) => sum + item.visitors, 0);
|
|
41
|
+
const topBrowser = pieChartData.reduce((max, item) => (item.visitors > max.visitors ? item : max));
|
|
42
|
+
const topBrowserShare = Math.round((topBrowser.visitors / totalVisitors) * 100);
|
|
43
|
+
const topBrowserLabel = pieChartConfig[topBrowser.browser]?.label ?? 'Top';
|
|
44
|
+
return html`
|
|
45
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
46
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'pb-0')}>
|
|
47
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Browser Share</div>
|
|
48
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>January - June 2026</div>
|
|
49
|
+
<div data-slot="card-action" class=${cardActionClass()}>
|
|
50
|
+
<span data-slot="badge" data-variant="outline" class=${badgeClass({ variant: 'outline' })}>${topBrowserLabel}</span>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'pt-0')}>
|
|
54
|
+
${pieChart({
|
|
55
|
+
config: pieChartConfig,
|
|
56
|
+
data: pieChartData,
|
|
57
|
+
// The legend is wider than the donut, as Recharts' HTML legend is.
|
|
58
|
+
class: 'mx-auto aspect-square max-h-[190px] [&_.ui-chart-legend-wrapper]:overflow-visible [&_.ui-chart-surface]:overflow-visible',
|
|
59
|
+
title: 'Visitors by browser',
|
|
60
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
61
|
+
legend: { nameKey: 'browser', class: 'translate-y-2' },
|
|
62
|
+
pies: [{
|
|
63
|
+
dataKey: 'visitors',
|
|
64
|
+
nameKey: 'browser',
|
|
65
|
+
innerRadius: 50,
|
|
66
|
+
strokeWidth: 5,
|
|
67
|
+
center: ({ cx, cy }) => svg`
|
|
68
|
+
<text x=${cx} y=${cy} text-anchor="middle" dominant-baseline="middle">
|
|
69
|
+
<tspan x=${cx} y=${cy - 16} class="fill-foreground text-2xl font-bold">${totalVisitors.toLocaleString('en-US')}</tspan>
|
|
70
|
+
<tspan x=${cx} y=${cy + 4} class="fill-muted-foreground text-xs">Visitors</tspan>
|
|
71
|
+
</text>`,
|
|
72
|
+
}],
|
|
73
|
+
})}
|
|
74
|
+
</div>
|
|
75
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-stretch gap-2')}>
|
|
76
|
+
<div class="flex items-center text-xs">
|
|
77
|
+
<span class="font-medium">${topBrowserLabel}</span>
|
|
78
|
+
<span class="ml-auto text-muted-foreground tabular-nums">${topBrowserShare}%</span>
|
|
79
|
+
</div>
|
|
80
|
+
<progress data-slot="progress" value=${topBrowserShare} max="100" aria-label=${`${topBrowserLabel} share`} class=${cn(progressClass(), '[&::-moz-progress-bar]:bg-chart-3 [&::-webkit-progress-value]:bg-chart-3')}></progress>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's bug report card: a title, severity and component
|
|
3
|
+
* pickers, and the steps to reproduce. A fragment helper, rendered by the
|
|
4
|
+
* server, with the kit's `<ui-select>` around native selects. Installed by
|
|
5
|
+
* `npx @webjsdev/ui add preview` at `components/preview/report-bug.ts`.
|
|
6
|
+
* Ported from shadcn/ui's preview block.
|
|
7
|
+
*
|
|
8
|
+
* The `<form>` has no `action` yet. Bind a server action from a
|
|
9
|
+
* `'use server'` file (`<form action=${reportBug}>`) before you ship it.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import { cn } from '../../../lib/utils.ts';
|
|
13
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
14
|
+
import {
|
|
15
|
+
cardClass,
|
|
16
|
+
cardContentClass,
|
|
17
|
+
cardDescriptionClass,
|
|
18
|
+
cardFooterClass,
|
|
19
|
+
cardHeaderClass,
|
|
20
|
+
cardTitleClass,
|
|
21
|
+
} from '../../../components/card.ts';
|
|
22
|
+
import { fieldClass, fieldGroupClass, fieldLabelClass } from '../../../components/field.ts';
|
|
23
|
+
import { inputClass } from '../../../components/input.ts';
|
|
24
|
+
import { selectTriggerClass } from '../../../components/select.ts';
|
|
25
|
+
import { textareaClass } from '../../../components/textarea.ts';
|
|
26
|
+
|
|
27
|
+
const select = (id: string, name: string, label: string, options: Array<[string, string]>, selected: string) => html`
|
|
28
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
29
|
+
<label data-slot="field-label" for=${id} class=${fieldLabelClass()}>${label}</label>
|
|
30
|
+
<ui-select>
|
|
31
|
+
<select id=${id} name=${name} class=${cn(selectTriggerClass(), 'w-full')}>
|
|
32
|
+
${options.map(([value, text]) => html`<option value=${value} ?selected=${value === selected}>${text}</option>`)}
|
|
33
|
+
</select>
|
|
34
|
+
</ui-select>
|
|
35
|
+
</div>
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
export function reportBug() {
|
|
39
|
+
return html`
|
|
40
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
41
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
42
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Report Bug</div>
|
|
43
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Help us fix issues faster.</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
46
|
+
<form id="report-bug-form">
|
|
47
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
48
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
49
|
+
<label data-slot="field-label" for="bug-title" class=${fieldLabelClass()}>Title</label>
|
|
50
|
+
<input data-slot="input" id="bug-title" name="title" placeholder="Brief description of the issue" class=${inputClass()}>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="grid grid-cols-2 gap-3">
|
|
53
|
+
${select('bug-severity', 'severity', 'Severity', [['critical', 'Critical'], ['high', 'High'], ['medium', 'Medium'], ['low', 'Low']], 'medium')}
|
|
54
|
+
${select('bug-component', 'component', 'Component', [['dashboard', 'Dashboard'], ['auth', 'Auth'], ['api', 'API'], ['billing', 'Billing']], 'dashboard')}
|
|
55
|
+
</div>
|
|
56
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
57
|
+
<label data-slot="field-label" for="bug-steps" class=${fieldLabelClass()}>Steps to reproduce</label>
|
|
58
|
+
<textarea data-slot="textarea" id="bug-steps" name="steps" placeholder=${'1. Go to\n2. Click on\n3. Observe...'} class=${cn(textareaClass(), 'min-h-24 resize-none')}></textarea>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</form>
|
|
62
|
+
</div>
|
|
63
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
64
|
+
<div role="group" data-slot="field" data-orientation="horizontal" class=${cn(fieldClass({ orientation: 'horizontal' }), 'justify-end style-sera:justify-center')}>
|
|
65
|
+
<button type="button" data-slot="button" data-variant="outline" data-size="default" class=${cn(buttonClass({ variant: 'outline' }), 'style-sera:flex-1')}>Attach File</button>
|
|
66
|
+
<button type="submit" form="report-bug-form" data-slot="button" data-variant="default" data-size="default" class=${cn(buttonClass(), 'style-sera:flex-1')}>Submit Bug</button>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's shipping address card: street, apartment, city, state,
|
|
3
|
+
* ZIP and country fields, and a save-as-default checkbox. A fragment helper,
|
|
4
|
+
* rendered by the server, with the kit's `<ui-select>` around native selects.
|
|
5
|
+
* Installed by `npx @webjsdev/ui add preview` at
|
|
6
|
+
* `components/preview/shipping-address.ts`. Ported from shadcn/ui's preview
|
|
7
|
+
* block.
|
|
8
|
+
*
|
|
9
|
+
* The `<form>` has no `action` yet. Bind a server action from a
|
|
10
|
+
* `'use server'` file (`<form action=${saveAddress}>`) before you ship it.
|
|
11
|
+
*/
|
|
12
|
+
import { html } from '@webjsdev/core';
|
|
13
|
+
import { cn } from '../../../lib/utils.ts';
|
|
14
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
15
|
+
import {
|
|
16
|
+
cardClass,
|
|
17
|
+
cardContentClass,
|
|
18
|
+
cardDescriptionClass,
|
|
19
|
+
cardFooterClass,
|
|
20
|
+
cardHeaderClass,
|
|
21
|
+
cardTitleClass,
|
|
22
|
+
} from '../../../components/card.ts';
|
|
23
|
+
import { checkboxClass } from '../../../components/checkbox.ts';
|
|
24
|
+
import { fieldClass, fieldGroupClass, fieldLabelClass } from '../../../components/field.ts';
|
|
25
|
+
import { inputClass } from '../../../components/input.ts';
|
|
26
|
+
import { selectTriggerClass } from '../../../components/select.ts';
|
|
27
|
+
|
|
28
|
+
const input = (id: string, name: string, label: string, placeholder: string) => html`
|
|
29
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
30
|
+
<label data-slot="field-label" for=${id} class=${fieldLabelClass()}>${label}</label>
|
|
31
|
+
<input data-slot="input" id=${id} name=${name} placeholder=${placeholder} class=${inputClass()}>
|
|
32
|
+
</div>
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
const select = (id: string, name: string, label: string, options: Array<[string, string]>, selected: string) => html`
|
|
36
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
37
|
+
<label data-slot="field-label" for=${id} class=${fieldLabelClass()}>${label}</label>
|
|
38
|
+
<ui-select>
|
|
39
|
+
<select id=${id} name=${name} class=${cn(selectTriggerClass(), 'w-full')}>
|
|
40
|
+
${options.map(([value, text]) => html`<option value=${value} ?selected=${value === selected}>${text}</option>`)}
|
|
41
|
+
</select>
|
|
42
|
+
</ui-select>
|
|
43
|
+
</div>
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
export function shippingAddress() {
|
|
47
|
+
return html`
|
|
48
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
49
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
50
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Shipping Address</div>
|
|
51
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Where should we deliver?</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
54
|
+
<form id="shipping-address-form">
|
|
55
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
56
|
+
${input('shipping-street', 'street', 'Street address', '123 Main Street')}
|
|
57
|
+
${input('shipping-apt', 'apartment', 'Apt / Suite', 'Apt 4B')}
|
|
58
|
+
<div data-slot="field-group" class=${cn(fieldGroupClass(), 'grid grid-cols-2')}>
|
|
59
|
+
${input('shipping-city', 'city', 'City', 'San Francisco')}
|
|
60
|
+
${select('shipping-state', 'state', 'State', [['CA', 'California'], ['NY', 'New York'], ['TX', 'Texas']], 'CA')}
|
|
61
|
+
</div>
|
|
62
|
+
<div data-slot="field-group" class=${cn(fieldGroupClass(), 'grid grid-cols-2')}>
|
|
63
|
+
${input('shipping-zip', 'zip', 'ZIP Code', '94102')}
|
|
64
|
+
${select('shipping-country', 'country', 'Country', [['US', 'United States'], ['CA', 'Canada'], ['UK', 'United Kingdom']], 'US')}
|
|
65
|
+
</div>
|
|
66
|
+
<div role="group" data-slot="field" data-orientation="horizontal" class=${fieldClass({ orientation: 'horizontal' })}>
|
|
67
|
+
<input type="checkbox" id="shipping-save" name="saveAsDefault" checked data-slot="checkbox" class=${checkboxClass()}>
|
|
68
|
+
<label data-slot="field-label" for="shipping-save" class=${cn(fieldLabelClass(), 'font-normal')}>Save as default address</label>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</form>
|
|
72
|
+
</div>
|
|
73
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
74
|
+
<button type="reset" form="shipping-address-form" data-slot="button" data-variant="outline" data-size="sm" class=${buttonClass({ variant: 'outline', size: 'sm' })}>Cancel</button>
|
|
75
|
+
<button type="submit" form="shipping-address-form" data-slot="button" data-variant="default" data-size="sm" class=${cn(buttonClass({ size: 'sm' }), 'ml-auto')}>Save Address</button>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's shortcuts card: a list of commands and their keys. A
|
|
3
|
+
* fragment helper, rendered by the server. Installed by
|
|
4
|
+
* `npx @webjsdev/ui add preview` at `components/preview/shortcuts.ts`.
|
|
5
|
+
* Ported from shadcn/ui's preview block.
|
|
6
|
+
*/
|
|
7
|
+
import { html } from '@webjsdev/core';
|
|
8
|
+
import { cn } from '../../../lib/utils.ts';
|
|
9
|
+
import { cardClass, cardContentClass } from '../../../components/card.ts';
|
|
10
|
+
import {
|
|
11
|
+
itemActionsClass,
|
|
12
|
+
itemClass,
|
|
13
|
+
itemGroupClass,
|
|
14
|
+
itemHeaderClass,
|
|
15
|
+
itemSeparatorClass,
|
|
16
|
+
itemTitleClass,
|
|
17
|
+
} from '../../../components/item.ts';
|
|
18
|
+
import { kbdClass } from '../../../components/kbd.ts';
|
|
19
|
+
|
|
20
|
+
const SHORTCUTS = [
|
|
21
|
+
{ label: 'Search', keys: ['⌘', 'K'], spoken: 'Command K' },
|
|
22
|
+
{ label: 'Quick Actions', keys: ['⌘', 'J'], spoken: 'Command J' },
|
|
23
|
+
{ label: 'New File', keys: ['⌘', 'N'], spoken: 'Command N' },
|
|
24
|
+
{ label: 'Save', keys: ['⌘', 'S'], spoken: 'Command S' },
|
|
25
|
+
{ label: 'Toggle Sidebar', keys: ['⌘', 'B'], spoken: 'Command B' },
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
export function shortcuts() {
|
|
29
|
+
return html`
|
|
30
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
31
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
32
|
+
<div class="flex flex-col gap-3">
|
|
33
|
+
<div class="text-sm font-medium">Shortcuts</div>
|
|
34
|
+
<div role="list" data-slot="item-group" data-size="xs" class=${cn(itemGroupClass(), 'gap-2 text-muted-foreground')}>
|
|
35
|
+
${shortcutRows()}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function shortcutRows() {
|
|
44
|
+
return SHORTCUTS.map(({ label, keys, spoken }, i) => html`
|
|
45
|
+
${i > 0 ? html`<div role="separator" aria-orientation="horizontal" data-slot="item-separator" data-orientation="horizontal" class=${itemSeparatorClass()}></div>` : ''}
|
|
46
|
+
<div role="listitem" data-slot="item" data-variant="default" data-size="xs" class=${cn(itemClass({ variant: 'default', size: 'xs' }), 'border-0 px-0 py-0')}>
|
|
47
|
+
<div data-slot="item-header" class=${itemHeaderClass()}>
|
|
48
|
+
<div data-slot="item-title" class=${cn(itemTitleClass(), 'font-normal')}>${label}</div>
|
|
49
|
+
<div data-slot="item-actions" class=${itemActionsClass()}>
|
|
50
|
+
<div class="flex gap-1" role="img" aria-label=${spoken}>
|
|
51
|
+
${keys.map((key) => html`<kbd data-slot="kbd" class=${kbdClass()}>${key}</kbd>`)}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
`);
|
|
57
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's skeleton card: an avatar, text lines and two buttons as
|
|
3
|
+
* loading placeholders. A fragment helper, rendered by the server. Installed
|
|
4
|
+
* by `npx @webjsdev/ui add preview` at `components/preview/skeleton-loading.ts`.
|
|
5
|
+
* Ported from shadcn/ui's preview block.
|
|
6
|
+
*/
|
|
7
|
+
import { html } from '@webjsdev/core';
|
|
8
|
+
import { cn } from '../../../lib/utils.ts';
|
|
9
|
+
import { cardClass, cardContentClass } from '../../../components/card.ts';
|
|
10
|
+
import { skeletonClass } from '../../../components/skeleton.ts';
|
|
11
|
+
|
|
12
|
+
const bone = (cls: string) => html`<div data-slot="skeleton" aria-hidden="true" class=${cn(skeletonClass(), cls)}></div>`;
|
|
13
|
+
|
|
14
|
+
export function skeletonLoading() {
|
|
15
|
+
return html`
|
|
16
|
+
<div data-slot="card" data-size="default" aria-busy="true" class=${cardClass()}>
|
|
17
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-4')}>
|
|
18
|
+
<div class="flex items-center gap-3">
|
|
19
|
+
${bone('size-10 rounded-full')}
|
|
20
|
+
<div class="flex flex-1 flex-col gap-2">
|
|
21
|
+
${bone('h-4 w-3/4')}
|
|
22
|
+
${bone('h-3 w-1/2')}
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="flex flex-col gap-2">
|
|
26
|
+
${bone('h-3 w-full')}
|
|
27
|
+
${bone('h-3 w-full')}
|
|
28
|
+
${bone('h-3 w-4/5')}
|
|
29
|
+
</div>
|
|
30
|
+
<div class="flex gap-2">
|
|
31
|
+
${bone('h-8 w-20')}
|
|
32
|
+
${bone('h-8 w-20')}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's sleep report card: last night's sleep stages as a
|
|
3
|
+
* stacked bar chart, the time in each stage, and a score. A fragment helper;
|
|
4
|
+
* the chart is the kit's `barChart`, drawn by the server. Installed by
|
|
5
|
+
* `npx @webjsdev/ui add preview` at `components/preview/sleep-report.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 { 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 { barChart, type ChartConfig } from '../../../components/chart.ts';
|
|
21
|
+
|
|
22
|
+
const sleepChartData = [
|
|
23
|
+
{ hour: '10pm', deep: 0, light: 30, rem: 0 },
|
|
24
|
+
{ hour: '11pm', deep: 20, light: 10, rem: 0 },
|
|
25
|
+
{ hour: '12am', deep: 40, light: 0, rem: 10 },
|
|
26
|
+
{ hour: '1am', deep: 30, light: 5, rem: 15 },
|
|
27
|
+
{ hour: '2am', deep: 10, light: 20, rem: 30 },
|
|
28
|
+
{ hour: '3am', deep: 25, light: 10, rem: 20 },
|
|
29
|
+
{ hour: '4am', deep: 15, light: 25, rem: 10 },
|
|
30
|
+
{ hour: '5am', deep: 5, light: 35, rem: 15 },
|
|
31
|
+
{ hour: '6am', deep: 0, light: 20, rem: 25 },
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
const sleepChartConfig: ChartConfig = {
|
|
35
|
+
deep: { label: 'Deep', color: 'var(--chart-1)' },
|
|
36
|
+
light: { label: 'Light', color: 'var(--chart-2)' },
|
|
37
|
+
rem: { label: 'REM', color: 'var(--chart-3)' },
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const STATS = [
|
|
41
|
+
{ label: 'Deep', value: '2h 10m' },
|
|
42
|
+
{ label: 'Light', value: '3h 48m' },
|
|
43
|
+
{ label: 'REM', value: '1h 26m' },
|
|
44
|
+
{ label: 'Score', value: '84' },
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
export function sleepReport() {
|
|
48
|
+
return html`
|
|
49
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
50
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
51
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Sleep Report</div>
|
|
52
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Last night · 7h 24m</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-3')}>
|
|
55
|
+
${barChart({
|
|
56
|
+
config: sleepChartConfig,
|
|
57
|
+
data: sleepChartData,
|
|
58
|
+
class: 'h-32 w-full',
|
|
59
|
+
title: 'Sleep stages by hour, last night',
|
|
60
|
+
width: 330,
|
|
61
|
+
height: 128,
|
|
62
|
+
margin: { left: 0, right: 0, top: 0, bottom: 0 },
|
|
63
|
+
tooltip: false,
|
|
64
|
+
bars: [
|
|
65
|
+
{ dataKey: 'deep', stackId: 'a', fill: 'var(--color-deep)', radius: 0, barSize: 16 },
|
|
66
|
+
{ dataKey: 'light', stackId: 'a', fill: 'var(--color-light)', radius: 0, barSize: 16 },
|
|
67
|
+
{ dataKey: 'rem', stackId: 'a', fill: 'var(--color-rem)', radius: [2, 2, 0, 0], barSize: 16 },
|
|
68
|
+
],
|
|
69
|
+
})}
|
|
70
|
+
<div class="grid grid-cols-4 gap-2">
|
|
71
|
+
${STATS.map((s) => html`
|
|
72
|
+
<div class="text-center">
|
|
73
|
+
<div class="text-sm font-medium tabular-nums">${s.value}</div>
|
|
74
|
+
<div class="text-xs text-muted-foreground">${s.label}</div>
|
|
75
|
+
</div>
|
|
76
|
+
`)}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
80
|
+
<span data-slot="badge" data-variant="outline" class=${badgeClass({ variant: 'outline' })}>Good</span>
|
|
81
|
+
<button type="button" data-slot="button" data-variant="outline" data-size="sm" class=${cn(buttonClass({ variant: 'outline', size: 'sm' }), 'ml-auto')}>Details</button>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's style overview card: the style and font names over a
|
|
3
|
+
* short specimen, and a swatch for each of the theme's colour tokens. A
|
|
4
|
+
* fragment helper, rendered by the server. Installed by
|
|
5
|
+
* `npx @webjsdev/ui add preview` at `components/preview/style-overview.ts`.
|
|
6
|
+
* Ported from shadcn/ui's preview block.
|
|
7
|
+
*
|
|
8
|
+
* shadcn reads the style and font names from the configurator's search
|
|
9
|
+
* params. Pass them in (`styleOverview({ style, font })`) from the page that
|
|
10
|
+
* knows them; the defaults name the kit's default style and the site font.
|
|
11
|
+
* `font` is the heading font's name, or the body font's when the heading
|
|
12
|
+
* inherits it. Each name sits in a `data-design-system-text` span, so a host
|
|
13
|
+
* that restyles the card live (the /ui/create configurator) rewrites the
|
|
14
|
+
* names in place.
|
|
15
|
+
*/
|
|
16
|
+
import { html } from '@webjsdev/core';
|
|
17
|
+
import { cn } from '../../../lib/utils.ts';
|
|
18
|
+
import { cardClass, cardContentClass } from '../../../components/card.ts';
|
|
19
|
+
|
|
20
|
+
const TOKENS = [
|
|
21
|
+
'--background',
|
|
22
|
+
'--foreground',
|
|
23
|
+
'--primary',
|
|
24
|
+
'--secondary',
|
|
25
|
+
'--muted',
|
|
26
|
+
'--accent',
|
|
27
|
+
'--border',
|
|
28
|
+
'--chart-1',
|
|
29
|
+
'--chart-2',
|
|
30
|
+
'--chart-3',
|
|
31
|
+
'--chart-4',
|
|
32
|
+
'--chart-5',
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
export function styleOverview(opts: { style?: string; font?: string } = {}) {
|
|
36
|
+
const style = opts.style ?? 'New York';
|
|
37
|
+
const font = opts.font ?? 'Geist';
|
|
38
|
+
return html`
|
|
39
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
40
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-6 style-lyra:gap-4 style-mira:gap-4')}>
|
|
41
|
+
<div class="flex flex-col gap-1">
|
|
42
|
+
<div class="font-heading text-2xl font-medium style-lyra:text-lg style-mira:text-lg style-sera:text-lg style-sera:font-semibold style-sera:tracking-wide style-sera:uppercase">
|
|
43
|
+
<span data-design-system-text="style">${style}</span> - <span data-design-system-text="font-heading">${font}</span>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="line-clamp-2 text-base text-muted-foreground style-lyra:text-sm style-mira:text-sm style-sera:text-sm style-sera:leading-relaxed">
|
|
46
|
+
Designers love packing quirky glyphs into test phrases. This is a
|
|
47
|
+
preview of the typography styles.
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="grid grid-cols-6 gap-3">
|
|
51
|
+
${TOKENS.map((token) => html`
|
|
52
|
+
<div class="flex flex-col flex-wrap items-center gap-2">
|
|
53
|
+
<div
|
|
54
|
+
class="relative aspect-square w-full rounded-lg bg-(--color) after:absolute after:inset-0 after:rounded-lg after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten style-sera:rounded-none style-sera:after:rounded-none"
|
|
55
|
+
style=${`--color: var(${token})`}
|
|
56
|
+
></div>
|
|
57
|
+
<div class="hidden max-w-14 truncate font-mono text-[0.60rem] md:block style-lyra:max-w-10 style-mira:max-w-10">${token}</div>
|
|
58
|
+
</div>
|
|
59
|
+
`)}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
`;
|
|
64
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview block's typography specimen card: the heading and body font
|
|
3
|
+
* names over a heading and two paragraphs, and a "Share Feedback" button
|
|
4
|
+
* that opens a feedback form in a dialog. A fragment helper, rendered by the
|
|
5
|
+
* server, with the kit's `<ui-dialog>` and `<ui-select>`. Installed by
|
|
6
|
+
* `npx @webjsdev/ui add preview` at `components/preview/typography-specimen.ts`.
|
|
7
|
+
* Ported from shadcn/ui's preview block.
|
|
8
|
+
*
|
|
9
|
+
* shadcn reads the font names from the configurator's search params. Pass
|
|
10
|
+
* them in (`typographySpecimen({ heading, body })`) from the page that knows
|
|
11
|
+
* them; `heading` is "Inherit" when the heading font is the body font. Each
|
|
12
|
+
* name sits in a `data-design-system-text` span, so a host that restyles the
|
|
13
|
+
* card live (the /ui/create configurator) rewrites the names in place, the
|
|
14
|
+
* heading's as "Inherit" when it is the body font (`font-heading-label`).
|
|
15
|
+
*
|
|
16
|
+
* The dialog's `<form>` has no `action` yet. Bind a server action from a
|
|
17
|
+
* `'use server'` file (`<form action=${sendFeedback}>`) before you ship it.
|
|
18
|
+
*/
|
|
19
|
+
import { html } from '@webjsdev/core';
|
|
20
|
+
import { cn } from '../../../lib/utils.ts';
|
|
21
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
22
|
+
import { cardClass, cardContentClass, cardFooterClass } from '../../../components/card.ts';
|
|
23
|
+
import {
|
|
24
|
+
dialogDescriptionClass,
|
|
25
|
+
dialogFooterClass,
|
|
26
|
+
dialogHeaderClass,
|
|
27
|
+
dialogTitleClass,
|
|
28
|
+
} from '../../../components/dialog.ts';
|
|
29
|
+
import { fieldClass, fieldGroupClass, fieldLabelClass } from '../../../components/field.ts';
|
|
30
|
+
import { inputClass } from '../../../components/input.ts';
|
|
31
|
+
import { selectTriggerClass } from '../../../components/select.ts';
|
|
32
|
+
import { textareaClass } from '../../../components/textarea.ts';
|
|
33
|
+
|
|
34
|
+
export function typographySpecimen(opts: { heading?: string; body?: string } = {}) {
|
|
35
|
+
const heading = opts.heading ?? 'Inherit';
|
|
36
|
+
const body = opts.body ?? 'Geist';
|
|
37
|
+
return html`
|
|
38
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
39
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-2')}>
|
|
40
|
+
<div class="text-xs font-medium text-muted-foreground uppercase"><span data-design-system-text="font-heading-label">${heading}</span> - <span data-design-system-text="font">${body}</span></div>
|
|
41
|
+
<p class="font-heading text-2xl font-medium style-sera:text-lg style-sera:font-semibold style-sera:tracking-wider style-sera:uppercase">
|
|
42
|
+
Designing with rhythm and hierarchy.
|
|
43
|
+
</p>
|
|
44
|
+
<p class="text-sm leading-relaxed text-muted-foreground">
|
|
45
|
+
A strong body style keeps long-form content readable and balances the
|
|
46
|
+
visual weight of headings.
|
|
47
|
+
</p>
|
|
48
|
+
<p class="text-sm leading-relaxed text-muted-foreground">
|
|
49
|
+
Thoughtful spacing and cadence help paragraphs scan quickly without
|
|
50
|
+
feeling dense.
|
|
51
|
+
</p>
|
|
52
|
+
</div>
|
|
53
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
54
|
+
<ui-dialog class="w-full">
|
|
55
|
+
<ui-dialog-trigger>
|
|
56
|
+
<button type="button" data-slot="button" data-variant="outline" data-size="default" class=${cn(buttonClass({ variant: 'outline' }), 'w-full')}>
|
|
57
|
+
Share Feedback
|
|
58
|
+
</button>
|
|
59
|
+
</ui-dialog-trigger>
|
|
60
|
+
<ui-dialog-content>
|
|
61
|
+
<div data-slot="dialog-header" class=${dialogHeaderClass()}>
|
|
62
|
+
<h2 data-slot="dialog-title" class=${dialogTitleClass()}>Share Feedback</h2>
|
|
63
|
+
<p data-slot="dialog-description" class=${dialogDescriptionClass()}>
|
|
64
|
+
Let us know how we can improve your experience.
|
|
65
|
+
</p>
|
|
66
|
+
</div>
|
|
67
|
+
<form id="typography-feedback-form">
|
|
68
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
69
|
+
<div class="grid grid-cols-2 gap-3">
|
|
70
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
71
|
+
<label data-slot="field-label" for="typography-feedback-name" class=${fieldLabelClass()}>Name</label>
|
|
72
|
+
<input data-slot="input" id="typography-feedback-name" name="name" placeholder="Your name" class=${inputClass()}>
|
|
73
|
+
</div>
|
|
74
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
75
|
+
<label data-slot="field-label" for="typography-feedback-email" class=${fieldLabelClass()}>Email</label>
|
|
76
|
+
<input data-slot="input" id="typography-feedback-email" name="email" type="email" placeholder="you@example.com" class=${inputClass()}>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
80
|
+
<label data-slot="field-label" for="typography-feedback-category" class=${fieldLabelClass()}>Category</label>
|
|
81
|
+
<ui-select>
|
|
82
|
+
<select id="typography-feedback-category" name="category" class=${cn(selectTriggerClass(), 'w-full')}>
|
|
83
|
+
<option value="general" selected>General</option>
|
|
84
|
+
<option value="bug">Bug Report</option>
|
|
85
|
+
<option value="feature">Feature Request</option>
|
|
86
|
+
<option value="improvement">Improvement</option>
|
|
87
|
+
</select>
|
|
88
|
+
</ui-select>
|
|
89
|
+
</div>
|
|
90
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
91
|
+
<label data-slot="field-label" for="typography-feedback-message" class=${fieldLabelClass()}>Message</label>
|
|
92
|
+
<textarea data-slot="textarea" id="typography-feedback-message" name="message" placeholder="Tell us what's on your mind..." class=${cn(textareaClass(), 'min-h-24 resize-none')}></textarea>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</form>
|
|
96
|
+
<div data-slot="dialog-footer" class=${dialogFooterClass()}>
|
|
97
|
+
<ui-dialog-close>
|
|
98
|
+
<button type="button" data-slot="button" data-variant="outline" data-size="default" class=${buttonClass({ variant: 'outline' })}>Cancel</button>
|
|
99
|
+
</ui-dialog-close>
|
|
100
|
+
<button type="submit" form="typography-feedback-form" data-slot="button" data-variant="default" data-size="default" class=${buttonClass()}>Submit</button>
|
|
101
|
+
</div>
|
|
102
|
+
</ui-dialog-content>
|
|
103
|
+
</ui-dialog>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
`;
|
|
107
|
+
}
|