@webjsdev/ui 0.3.17 → 0.5.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 +67 -8
- 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 +644 -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/dom.ts +3 -4
- 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 +52 -8
- 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 +266 -14
- package/src/commands/diff.js +34 -20
- package/src/commands/info.js +7 -0
- package/src/commands/init.js +127 -10
- package/src/commands/list.js +43 -11
- package/src/commands/view.js +33 -5
- package/src/lint/rules/no-restyle.js +1 -1
- package/src/registry/extract.js +194 -5
- 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,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 sidebar navigation pair: two cards, each holding a
|
|
3
|
+
* non-collapsible sidebar with two menu groups. A fragment helper; each
|
|
4
|
+
* sidebar is the kit's `<ui-sidebar collapsible="none">`, which needs no
|
|
5
|
+
* provider and keeps no state. Installed at
|
|
6
|
+
* `components/preview-02/sidebar-nav.ts`. Ported from shadcn/ui's preview-02.
|
|
7
|
+
*
|
|
8
|
+
* shadcn wraps each one in a SidebarProvider set to `min-h-0`. The kit's
|
|
9
|
+
* provider is the full-height app shell, and a `collapsible="none"` sidebar
|
|
10
|
+
* reads nothing from it, so the cards leave it out. Make each entry a link to
|
|
11
|
+
* a real route, marked `data-active="true"` and `aria-current="page"` on the
|
|
12
|
+
* current one.
|
|
13
|
+
*/
|
|
14
|
+
import { html, nothing } from '@webjsdev/core';
|
|
15
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
16
|
+
import { cn } from '../../../lib/utils.ts';
|
|
17
|
+
import { cardClass } from '../../../components/card.ts';
|
|
18
|
+
import {
|
|
19
|
+
sidebarContentClass,
|
|
20
|
+
sidebarGroupClass,
|
|
21
|
+
sidebarGroupContentClass,
|
|
22
|
+
sidebarGroupLabelClass,
|
|
23
|
+
sidebarMenuButtonClass,
|
|
24
|
+
sidebarMenuClass,
|
|
25
|
+
sidebarMenuItemClass,
|
|
26
|
+
sidebarSeparatorClass,
|
|
27
|
+
} from '../../../components/sidebar.ts';
|
|
28
|
+
import '../../../components/sidebar.ts';
|
|
29
|
+
import { ActivityIcon, ArrowLeftRightIcon, BellIcon, BookOpenIcon, Building2Icon, CircleHelpIcon, CreditCardIcon, FileBarChartIcon, FileTextIcon, LayoutDashboardIcon, MessageSquareIcon, PaintbrushIcon, PieChartIcon, ShieldIcon, TargetIcon, TrendingUpIcon, UserIcon, WalletIcon } from '../../../lib/icons.ts';
|
|
30
|
+
|
|
31
|
+
type Entry = [icon: (cls?: string) => TemplateResult, label: string, active?: boolean];
|
|
32
|
+
|
|
33
|
+
function group(label: string, cls: string, entries: Entry[]) {
|
|
34
|
+
return html`<div data-slot="sidebar-group" data-sidebar="group" class=${cn(sidebarGroupClass(), cls)}>
|
|
35
|
+
<div data-slot="sidebar-group-label" data-sidebar="group-label" class=${sidebarGroupLabelClass()}>${label}</div>
|
|
36
|
+
<div data-slot="sidebar-group-content" data-sidebar="group-content" class=${sidebarGroupContentClass()}>
|
|
37
|
+
<ul data-slot="sidebar-menu" data-sidebar="menu" class=${sidebarMenuClass()}>
|
|
38
|
+
${entries.map(([icon, text, active]) => html`
|
|
39
|
+
<li data-slot="sidebar-menu-item" data-sidebar="menu-item" class=${sidebarMenuItemClass()}>
|
|
40
|
+
<a href="#" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" data-active=${active ? 'true' : 'false'} aria-current=${active ? 'page' : nothing} class=${sidebarMenuButtonClass()}>${icon()}${text}</a>
|
|
41
|
+
</li>`)}
|
|
42
|
+
</ul>
|
|
43
|
+
</div>
|
|
44
|
+
</div>`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function navCard(label: string, top: [string, Entry[]], bottom: [string, Entry[]]) {
|
|
48
|
+
return html`<div data-slot="card" data-size="default" class=${cn(cardClass(), 'overflow-hidden py-0')}>
|
|
49
|
+
<ui-sidebar collapsible="none" class="w-full bg-transparent">
|
|
50
|
+
<nav aria-label=${label} data-slot="sidebar-content" data-sidebar="content" class=${cn(sidebarContentClass(), 'gap-0')}>
|
|
51
|
+
${group(top[0], 'pb-1', top[1])}
|
|
52
|
+
<div role="none" data-slot="sidebar-separator" data-sidebar="separator" data-orientation="horizontal" class=${cn(sidebarSeparatorClass(), 'w-auto!')}></div>
|
|
53
|
+
${group(bottom[0], 'pt-1', bottom[1])}
|
|
54
|
+
</nav>
|
|
55
|
+
</ui-sidebar>
|
|
56
|
+
</div>`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function sidebarNav() {
|
|
60
|
+
return html`
|
|
61
|
+
<div class="grid grid-cols-2 items-start gap-6">
|
|
62
|
+
${navCard('Overview and planning', ['Overview', [
|
|
63
|
+
[LayoutDashboardIcon, 'Dashboard', true],
|
|
64
|
+
[ArrowLeftRightIcon, 'Transactions'],
|
|
65
|
+
[TrendingUpIcon, 'Investments'],
|
|
66
|
+
[Building2Icon, 'Accounts'],
|
|
67
|
+
[PieChartIcon, 'Spending'],
|
|
68
|
+
]], ['Planning', [
|
|
69
|
+
[TargetIcon, 'Goals'],
|
|
70
|
+
[WalletIcon, 'Budget'],
|
|
71
|
+
[FileBarChartIcon, 'Reports'],
|
|
72
|
+
[FileTextIcon, 'Documents'],
|
|
73
|
+
]])}
|
|
74
|
+
${navCard('Account and support', ['Account', [
|
|
75
|
+
[UserIcon, 'Profile'],
|
|
76
|
+
[CreditCardIcon, 'Billing', true],
|
|
77
|
+
[BellIcon, 'Notifications'],
|
|
78
|
+
[ShieldIcon, 'Security'],
|
|
79
|
+
[PaintbrushIcon, 'Appearance'],
|
|
80
|
+
]], ['Support', [
|
|
81
|
+
[CircleHelpIcon, 'Help Center'],
|
|
82
|
+
[MessageSquareIcon, 'Contact Us'],
|
|
83
|
+
[BookOpenIcon, 'Documentation'],
|
|
84
|
+
[ActivityIcon, 'Status'],
|
|
85
|
+
]])}
|
|
86
|
+
</div>
|
|
87
|
+
`;
|
|
88
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 Social Links card: an artist's profile links, each an input
|
|
3
|
+
* with its service's icon. A fragment helper. Installed by
|
|
4
|
+
* `npx @webjsdev/ui add preview-02` at `components/preview-02/social-links.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=${saveSocialLinks}>`) before you ship it.
|
|
9
|
+
*/
|
|
10
|
+
import { html, nothing } from '@webjsdev/core';
|
|
11
|
+
import type { TemplateResult } from '@webjsdev/core';
|
|
12
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
13
|
+
import {
|
|
14
|
+
cardClass,
|
|
15
|
+
cardContentClass,
|
|
16
|
+
cardFooterClass,
|
|
17
|
+
cardHeaderClass,
|
|
18
|
+
cardTitleClass,
|
|
19
|
+
} from '../../../components/card.ts';
|
|
20
|
+
import { fieldClass, fieldGroupClass, fieldLabelClass } from '../../../components/field.ts';
|
|
21
|
+
import { inputGroupAddonClass, inputGroupClass, inputGroupInputClass } from '../../../components/input-group.ts';
|
|
22
|
+
import { cn } from '../../../lib/utils.ts';
|
|
23
|
+
import { CameraIcon, CirclePlusIcon, CloudIcon, GlobeIcon } from '../../../lib/icons.ts';
|
|
24
|
+
|
|
25
|
+
const LINKS: { id: string; label: string; icon: (cls?: string) => TemplateResult; value?: string; placeholder?: string }[] = [
|
|
26
|
+
{ id: 'spotify-url', label: 'Spotify Artist URL', icon: CirclePlusIcon, value: 'spotify.com/artist/3j...2k' },
|
|
27
|
+
{ id: 'instagram-handle', label: 'Instagram Handle', icon: CameraIcon, value: '@julianduryea_music' },
|
|
28
|
+
{ id: 'soundcloud-url', label: 'SoundCloud URL', icon: CloudIcon, placeholder: 'soundcloud.com/username' },
|
|
29
|
+
{ id: 'website-url', label: 'Website', icon: GlobeIcon, placeholder: 'https://yoursite.com' },
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
export function socialLinks() {
|
|
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()}>Social Links</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
39
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
40
|
+
${LINKS.map((link) => html`
|
|
41
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
42
|
+
<label data-slot="field-label" for=${link.id} class=${fieldLabelClass()}>${link.label}</label>
|
|
43
|
+
<div data-slot="input-group" role="group" class=${inputGroupClass()}>
|
|
44
|
+
<input data-slot="input-group-control" id=${link.id} name=${link.id} value=${link.value ?? nothing} placeholder=${link.placeholder ?? nothing} class=${inputGroupInputClass()}>
|
|
45
|
+
<label data-slot="input-group-addon" data-align="inline-start" for=${link.id} class=${inputGroupAddonClass()}>${link.icon()}</label>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
`)}
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'justify-end gap-2 style-sera:justify-center')}>
|
|
52
|
+
<button type="reset" data-slot="button" data-variant="secondary" data-size="default" class=${cn(buttonClass({ variant: 'secondary' }), 'style-sera:flex-1')}>Discard</button>
|
|
53
|
+
<button type="submit" data-slot="button" data-variant="default" data-size="default" class=${cn(buttonClass(), 'style-sera:flex-1')}>Save Changes</button>
|
|
54
|
+
</div>
|
|
55
|
+
</form>
|
|
56
|
+
`;
|
|
57
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 Stock Performance card: a ticker picker over a six-month
|
|
3
|
+
* price chart. A fragment helper; the picker is the kit's `<ui-combobox>` and
|
|
4
|
+
* the chart its server-drawn `areaChart`. Installed by
|
|
5
|
+
* `npx @webjsdev/ui add preview-02` at
|
|
6
|
+
* `components/preview-02/stock-performance.ts`. Ported from shadcn/ui's
|
|
7
|
+
* preview-02.
|
|
8
|
+
*
|
|
9
|
+
* It renders the chart for `ticker` (VOO by default). shadcn swaps the chart
|
|
10
|
+
* in React state when another ticker is picked; in your app, put the picker
|
|
11
|
+
* in a GET form (the combobox submits its value under `name`) and render the
|
|
12
|
+
* chart for the ticker in the query string.
|
|
13
|
+
*/
|
|
14
|
+
import { html, svg } from '@webjsdev/core';
|
|
15
|
+
import {
|
|
16
|
+
cardClass,
|
|
17
|
+
cardContentClass,
|
|
18
|
+
cardDescriptionClass,
|
|
19
|
+
cardHeaderClass,
|
|
20
|
+
cardTitleClass,
|
|
21
|
+
} from '../../../components/card.ts';
|
|
22
|
+
import { areaChart, type ChartConfig } from '../../../components/chart.ts';
|
|
23
|
+
import { fieldClass, fieldGroupClass, fieldLabelClass } from '../../../components/field.ts';
|
|
24
|
+
import { separatorClass } from '../../../components/separator.ts';
|
|
25
|
+
import { cn } from '../../../lib/utils.ts';
|
|
26
|
+
import '../../../components/combobox.ts';
|
|
27
|
+
|
|
28
|
+
const TICKERS = ['VOO', 'VIG', 'AAPL', 'MSFT', 'GOOGL', 'AMZN', 'TSLA'];
|
|
29
|
+
|
|
30
|
+
const CHART_DATA: Record<string, { month: string; price: number }[]> = {
|
|
31
|
+
VOO: [
|
|
32
|
+
{ month: 'Jan', price: 412 },
|
|
33
|
+
{ month: 'Feb', price: 438 },
|
|
34
|
+
{ month: 'Mar', price: 395 },
|
|
35
|
+
{ month: 'Apr', price: 450 },
|
|
36
|
+
{ month: 'May', price: 420 },
|
|
37
|
+
{ month: 'Jun', price: 462 },
|
|
38
|
+
],
|
|
39
|
+
AAPL: [
|
|
40
|
+
{ month: 'Jan', price: 185 },
|
|
41
|
+
{ month: 'Feb', price: 210 },
|
|
42
|
+
{ month: 'Mar', price: 172 },
|
|
43
|
+
{ month: 'Apr', price: 198 },
|
|
44
|
+
{ month: 'May', price: 178 },
|
|
45
|
+
{ month: 'Jun', price: 215 },
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const DEFAULT_DATA = [
|
|
50
|
+
{ month: 'Jan', price: 100 },
|
|
51
|
+
{ month: 'Feb', price: 118 },
|
|
52
|
+
{ month: 'Mar', price: 95 },
|
|
53
|
+
{ month: 'Apr', price: 125 },
|
|
54
|
+
{ month: 'May', price: 108 },
|
|
55
|
+
{ month: 'Jun', price: 130 },
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
const chartConfig = {
|
|
59
|
+
price: { label: 'Price', color: 'var(--chart-1)' },
|
|
60
|
+
} satisfies ChartConfig;
|
|
61
|
+
|
|
62
|
+
export function stockPerformance(opts: { ticker?: string } = {}) {
|
|
63
|
+
const ticker = opts.ticker ?? 'VOO';
|
|
64
|
+
const data = CHART_DATA[ticker] ?? DEFAULT_DATA;
|
|
65
|
+
return html`
|
|
66
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
67
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
68
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Stock Performance</div>
|
|
69
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>6-month price history.</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-4')}>
|
|
72
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
73
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
74
|
+
<label data-slot="field-label" for="ticker-select" class=${fieldLabelClass()}>Ticker</label>
|
|
75
|
+
<ui-combobox name="ticker" value=${ticker}>
|
|
76
|
+
<ui-combobox-input input-id="ticker-select" placeholder="Search ticker..."></ui-combobox-input>
|
|
77
|
+
<ui-combobox-content>
|
|
78
|
+
<ui-combobox-empty>No tickers found.</ui-combobox-empty>
|
|
79
|
+
<ui-combobox-list>
|
|
80
|
+
${TICKERS.map((item) => html`<ui-combobox-item value=${item}>${item}</ui-combobox-item>`)}
|
|
81
|
+
</ui-combobox-list>
|
|
82
|
+
</ui-combobox-content>
|
|
83
|
+
</ui-combobox>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<div role="none" data-slot="separator" data-orientation="horizontal" class=${cn(separatorClass(), 'style-sera:hidden')}></div>
|
|
87
|
+
${areaChart({
|
|
88
|
+
config: chartConfig,
|
|
89
|
+
data,
|
|
90
|
+
title: `${ticker} price over six months`,
|
|
91
|
+
class: 'aspect-auto h-[200px] w-full',
|
|
92
|
+
width: 330,
|
|
93
|
+
height: 200,
|
|
94
|
+
margin: { left: 0, right: 0, top: 8, bottom: 0 },
|
|
95
|
+
defs: svg`<linearGradient id="stock-performance-fill" x1="0" y1="0" x2="0" y2="1">
|
|
96
|
+
<stop offset="0%" stop-color="var(--color-price)" stop-opacity="0.3"></stop>
|
|
97
|
+
<stop offset="100%" stop-color="var(--color-price)" stop-opacity="0.05"></stop>
|
|
98
|
+
</linearGradient>`,
|
|
99
|
+
grid: { vertical: false, strokeDasharray: '3 3' },
|
|
100
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
101
|
+
areas: [{ dataKey: 'price', type: 'monotone', stroke: 'var(--color-price)', strokeWidth: 2, fill: 'url(#stock-performance-fill)' }],
|
|
102
|
+
})}
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
`;
|
|
106
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 "Syncing your accounts" card: the kit's empty state with a
|
|
3
|
+
* spinner as its media. A fragment helper. Installed at
|
|
4
|
+
* `components/preview-02/syncing-state.ts`. Ported from shadcn/ui's preview-02.
|
|
5
|
+
*/
|
|
6
|
+
import { html } from '@webjsdev/core';
|
|
7
|
+
import { cn } from '../../../lib/utils.ts';
|
|
8
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
9
|
+
import { cardClass, cardContentClass } from '../../../components/card.ts';
|
|
10
|
+
import {
|
|
11
|
+
emptyClass,
|
|
12
|
+
emptyContentClass,
|
|
13
|
+
emptyDescriptionClass,
|
|
14
|
+
emptyHeaderClass,
|
|
15
|
+
emptyMediaClass,
|
|
16
|
+
emptyTitleClass,
|
|
17
|
+
} from '../../../components/empty.ts';
|
|
18
|
+
import { spinner } from '../../../components/spinner.ts';
|
|
19
|
+
|
|
20
|
+
export function syncingState() {
|
|
21
|
+
return html`
|
|
22
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
23
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'p-0')}>
|
|
24
|
+
<div data-slot="empty" class=${cn(emptyClass(), 'p-4')}>
|
|
25
|
+
<div data-slot="empty-header" class=${emptyHeaderClass()}>
|
|
26
|
+
<div data-slot="empty-icon" data-variant="icon" class=${emptyMediaClass({ variant: 'icon' })}>${spinner({ decorative: true })}</div>
|
|
27
|
+
<div data-slot="empty-title" class=${emptyTitleClass()}>Syncing your accounts</div>
|
|
28
|
+
<p data-slot="empty-description" class=${emptyDescriptionClass()}>We're pulling in your latest transactions. This usually takes a few seconds.</p>
|
|
29
|
+
</div>
|
|
30
|
+
<div data-slot="empty-content" class=${emptyContentClass()}>
|
|
31
|
+
<button type="button" data-slot="button" data-variant="outline" data-size="default" class=${buttonClass({ variant: 'outline' })}>Cancel</button>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 Transfer Funds card: an amount, the accounts to move it
|
|
3
|
+
* between, and a summary of the transfer. A fragment helper; the account
|
|
4
|
+
* pickers are the kit's `<ui-select>` around native selects. Installed by
|
|
5
|
+
* `npx @webjsdev/ui add preview-02` at `components/preview-02/transfer-funds.ts`.
|
|
6
|
+
* Ported from shadcn/ui's preview-02.
|
|
7
|
+
*
|
|
8
|
+
* The `<form>` has no `action` yet. Bind a server action from a
|
|
9
|
+
* `'use server'` file (`<form action=${transferFunds}>`) before you ship it.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
13
|
+
import {
|
|
14
|
+
cardActionClass,
|
|
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 {
|
|
24
|
+
inputGroupAddonClass,
|
|
25
|
+
inputGroupClass,
|
|
26
|
+
inputGroupInputClass,
|
|
27
|
+
inputGroupTextClass,
|
|
28
|
+
} from '../../../components/input-group.ts';
|
|
29
|
+
import { itemClass, itemContentClass } from '../../../components/item.ts';
|
|
30
|
+
import { selectTriggerClass } from '../../../components/select.ts';
|
|
31
|
+
import { separatorClass } from '../../../components/separator.ts';
|
|
32
|
+
import { cn } from '../../../lib/utils.ts';
|
|
33
|
+
import '../../../components/select.ts';
|
|
34
|
+
import { XIcon } from '../../../lib/icons.ts';
|
|
35
|
+
|
|
36
|
+
function accountSelect(id: string, name: string, value: string, options: { value: string; label: string }[]) {
|
|
37
|
+
return html`<ui-select class="w-full">
|
|
38
|
+
<select id=${id} name=${name} class=${cn(selectTriggerClass(), 'w-full')}>
|
|
39
|
+
<optgroup>
|
|
40
|
+
${options.map((o) => html`<option value=${o.value} ?selected=${o.value === value}>${o.label}</option>`)}
|
|
41
|
+
</optgroup>
|
|
42
|
+
</select>
|
|
43
|
+
</ui-select>`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const separator = () => html`<div role="none" data-slot="separator" data-orientation="horizontal" class=${separatorClass()}></div>`;
|
|
47
|
+
|
|
48
|
+
export function transferFunds() {
|
|
49
|
+
return html`
|
|
50
|
+
<form data-slot="card" data-size="default" class=${cardClass()}>
|
|
51
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
52
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Transfer Funds</div>
|
|
53
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Move money between your connected accounts.</div>
|
|
54
|
+
<div data-slot="card-action" class=${cardActionClass()}>
|
|
55
|
+
<button type="button" data-slot="button" data-variant="ghost" data-size="icon-sm" class=${cn(buttonClass({ variant: 'ghost', size: 'icon-sm' }), 'bg-muted')}>
|
|
56
|
+
${XIcon()}
|
|
57
|
+
<span class="sr-only">Close</span>
|
|
58
|
+
</button>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
62
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
63
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
64
|
+
<label data-slot="field-label" for="transfer-amount" class=${fieldLabelClass()}>Amount to Transfer</label>
|
|
65
|
+
<div data-slot="input-group" role="group" class=${inputGroupClass()}>
|
|
66
|
+
<input data-slot="input-group-control" id="transfer-amount" name="amount" value="1,200.00" class=${inputGroupInputClass()}>
|
|
67
|
+
<label data-slot="input-group-addon" data-align="inline-start" for="transfer-amount" class=${inputGroupAddonClass()}>
|
|
68
|
+
<span class=${inputGroupTextClass()}>$</span>
|
|
69
|
+
</label>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
73
|
+
<label data-slot="field-label" for="from-account" class=${fieldLabelClass()}>From Account</label>
|
|
74
|
+
${accountSelect('from-account', 'from', 'checking', [
|
|
75
|
+
{ value: 'checking', label: 'Main Checking (··8402), $12,450.00' },
|
|
76
|
+
{ value: 'business', label: 'Business (··7731), $8,920.00' },
|
|
77
|
+
])}
|
|
78
|
+
</div>
|
|
79
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
80
|
+
<label data-slot="field-label" for="to-account" class=${fieldLabelClass()}>To Account</label>
|
|
81
|
+
${accountSelect('to-account', 'to', 'savings', [
|
|
82
|
+
{ value: 'savings', label: 'High Yield Savings (··1192), $42,100.00' },
|
|
83
|
+
{ value: 'investment', label: 'Investment (··3349), $18,200.00' },
|
|
84
|
+
])}
|
|
85
|
+
</div>
|
|
86
|
+
<div data-slot="item" data-variant="muted" data-size="default" class=${cn(itemClass({ variant: 'muted' }), 'flex-col items-stretch')}>
|
|
87
|
+
<div data-slot="item-content" class=${cn(itemContentClass(), 'gap-3')}>
|
|
88
|
+
<div class="flex items-center justify-between">
|
|
89
|
+
<span class="text-sm text-muted-foreground">Estimated arrival</span>
|
|
90
|
+
<span class="text-sm font-medium">Today, Apr 14</span>
|
|
91
|
+
</div>
|
|
92
|
+
${separator()}
|
|
93
|
+
<div class="flex items-center justify-between">
|
|
94
|
+
<span class="text-sm text-muted-foreground">Transaction fee</span>
|
|
95
|
+
<span class="text-sm font-medium tabular-nums">$0.00</span>
|
|
96
|
+
</div>
|
|
97
|
+
${separator()}
|
|
98
|
+
<div class="flex items-center justify-between">
|
|
99
|
+
<span class="text-sm font-medium">Total amount</span>
|
|
100
|
+
<span class="text-sm font-semibold tabular-nums">$1,200.00</span>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
107
|
+
<button type="submit" data-slot="button" data-variant="default" data-size="default" class=${cn(buttonClass(), 'w-full')}>Confirm Transfer</button>
|
|
108
|
+
</div>
|
|
109
|
+
</form>
|
|
110
|
+
`;
|
|
111
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 Upcoming Payments card: a month calendar over the payments
|
|
3
|
+
* scheduled next. A fragment helper; the calendar is the kit's
|
|
4
|
+
* `<ui-calendar>`, opened on today. Installed by
|
|
5
|
+
* `npx @webjsdev/ui add preview-02` at
|
|
6
|
+
* `components/preview-02/upcoming-payments.ts`. Ported from shadcn/ui's
|
|
7
|
+
* preview-02.
|
|
8
|
+
*
|
|
9
|
+
* The payments below are sample data. List the ones scheduled around the
|
|
10
|
+
* selected day from your own data.
|
|
11
|
+
*/
|
|
12
|
+
import { html } from '@webjsdev/core';
|
|
13
|
+
import { badgeClass } from '../../../components/badge.ts';
|
|
14
|
+
import {
|
|
15
|
+
cardClass,
|
|
16
|
+
cardContentClass,
|
|
17
|
+
cardDescriptionClass,
|
|
18
|
+
cardHeaderClass,
|
|
19
|
+
cardTitleClass,
|
|
20
|
+
} from '../../../components/card.ts';
|
|
21
|
+
import {
|
|
22
|
+
itemClass,
|
|
23
|
+
itemContentClass,
|
|
24
|
+
itemDescriptionClass,
|
|
25
|
+
itemGroupClass,
|
|
26
|
+
itemTitleClass,
|
|
27
|
+
} from '../../../components/item.ts';
|
|
28
|
+
import { cn } from '../../../lib/utils.ts';
|
|
29
|
+
import '../../../components/calendar.ts';
|
|
30
|
+
|
|
31
|
+
const PAYMENTS = [
|
|
32
|
+
{ title: 'Netflix Subscription', date: 'Apr 15, 2024', amount: '$19.99' },
|
|
33
|
+
{ title: 'Rent Payment', date: 'Apr 1, 2024', amount: '$2,400.00' },
|
|
34
|
+
{ title: 'Auto Insurance', date: 'Apr 22, 2024', amount: '$186.00' },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
/** Today as the calendar's value, "YYYY-MM-DD". */
|
|
38
|
+
function today(): string {
|
|
39
|
+
const d = new Date();
|
|
40
|
+
const pad = (n: number) => String(n).padStart(2, '0');
|
|
41
|
+
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function upcomingPayments() {
|
|
45
|
+
return html`
|
|
46
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
47
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
48
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Upcoming Payments</div>
|
|
49
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Select a date to view scheduled payments.</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-4')}>
|
|
52
|
+
<div data-slot="item" data-variant="outline" data-size="default" class=${cn(itemClass({ variant: 'outline' }), 'justify-center')}>
|
|
53
|
+
<ui-calendar mode="single" value=${today()} aria-label="Payment date" class="w-full [--cell-size:--spacing(8)] md:[--cell-size:--spacing(10)] style-sera:md:[--cell-size:--spacing(9)]"></ui-calendar>
|
|
54
|
+
</div>
|
|
55
|
+
<div role="list" data-slot="item-group" class=${cn(itemGroupClass(), 'w-full')}>
|
|
56
|
+
${PAYMENTS.map((p) => html`
|
|
57
|
+
<div role="listitem" data-slot="item" data-variant="muted" data-size="default" class=${itemClass({ variant: 'muted' })}>
|
|
58
|
+
<div data-slot="item-content" class=${itemContentClass()}>
|
|
59
|
+
<div data-slot="item-title" class=${itemTitleClass()}>${p.title}</div>
|
|
60
|
+
<p data-slot="item-description" class=${itemDescriptionClass()}>${p.date}</p>
|
|
61
|
+
</div>
|
|
62
|
+
<span data-slot="badge" data-variant="secondary" class=${badgeClass({ variant: 'secondary' })}>${p.amount}</span>
|
|
63
|
+
</div>
|
|
64
|
+
`)}
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 block's page: thirty-odd finance, music-catalog and
|
|
3
|
+
* smart-home cards laid out in seven columns, a preview of the kit's
|
|
4
|
+
* components working together.
|
|
5
|
+
*
|
|
6
|
+
* Installed by `npx @webjsdev/ui add preview-02` at `app/preview-02/page.ts`,
|
|
7
|
+
* with each card at `components/preview-02/<card>.ts`. It is app code you
|
|
8
|
+
* own, so keep the cards you want and delete the rest. Ported from
|
|
9
|
+
* shadcn/ui's preview-02, the page its design-system configurator previews.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import type { Metadata } from '@webjsdev/core';
|
|
13
|
+
import { accountAccess } from './cards/account-access.ts';
|
|
14
|
+
import { cardOverview } from './cards/card-overview.ts';
|
|
15
|
+
import { claimableBalance } from './cards/claimable-balance.ts';
|
|
16
|
+
import { contributionHistory } from './cards/contribution-history.ts';
|
|
17
|
+
import { coverArt } from './cards/cover-art.ts';
|
|
18
|
+
import { dividendIncome } from './cards/dividend-income.ts';
|
|
19
|
+
import { emptyConnectBank } from './cards/empty-connect-bank.ts';
|
|
20
|
+
import { emptyDistributeTrack } from './cards/empty-distribute-track.ts';
|
|
21
|
+
import { emptyExploreCatalog } from './cards/empty-explore-catalog.ts';
|
|
22
|
+
import { faq } from './cards/faq.ts';
|
|
23
|
+
import { frontDoor } from './cards/front-door.ts';
|
|
24
|
+
import { indexInvesting } from './cards/index-investing.ts';
|
|
25
|
+
import { kitchenIsland } from './cards/kitchen-island.ts';
|
|
26
|
+
import { loadingCard } from './cards/loading-card.ts';
|
|
27
|
+
import { newMilestone } from './cards/new-milestone.ts';
|
|
28
|
+
import { notificationSettings } from './cards/notification-settings.ts';
|
|
29
|
+
import { payments } from './cards/payments.ts';
|
|
30
|
+
import { payoutThreshold } from './cards/payout-threshold.ts';
|
|
31
|
+
import { powerUsage } from './cards/power-usage.ts';
|
|
32
|
+
import { preferences } from './cards/preferences.ts';
|
|
33
|
+
import { qrConnect } from './cards/qr-connect.ts';
|
|
34
|
+
import { receivingMethod } from './cards/receiving-method.ts';
|
|
35
|
+
import { recentTransactions } from './cards/recent-transactions.ts';
|
|
36
|
+
import { releaseCatalog } from './cards/release-catalog.ts';
|
|
37
|
+
import { rollerShades } from './cards/roller-shades.ts';
|
|
38
|
+
import { savingsProgress } from './cards/savings-progress.ts';
|
|
39
|
+
import { savingsTargets } from './cards/savings-targets.ts';
|
|
40
|
+
import { sidebarNav } from './cards/sidebar-nav.ts';
|
|
41
|
+
import { socialLinks } from './cards/social-links.ts';
|
|
42
|
+
import { stockPerformance } from './cards/stock-performance.ts';
|
|
43
|
+
import { syncingState } from './cards/syncing-state.ts';
|
|
44
|
+
import { transferFunds } from './cards/transfer-funds.ts';
|
|
45
|
+
import { upcomingPayments } from './cards/upcoming-payments.ts';
|
|
46
|
+
|
|
47
|
+
export const metadata: Metadata = { title: 'Preview' };
|
|
48
|
+
|
|
49
|
+
const COLUMN = 'flex flex-col p-1 [contain-intrinsic-size:380px_1200px] [content-visibility:auto]';
|
|
50
|
+
|
|
51
|
+
export default function Preview02Page() {
|
|
52
|
+
return html`
|
|
53
|
+
<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)]">
|
|
54
|
+
<div class="flex w-full min-w-max justify-center">
|
|
55
|
+
<div data-slot="capture-target" 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)">
|
|
56
|
+
<div class=${COLUMN}>
|
|
57
|
+
${contributionHistory()}
|
|
58
|
+
${emptyDistributeTrack()}
|
|
59
|
+
${qrConnect()}
|
|
60
|
+
${dividendIncome()}
|
|
61
|
+
${indexInvesting()}
|
|
62
|
+
${syncingState()}
|
|
63
|
+
</div>
|
|
64
|
+
<div class=${COLUMN}>
|
|
65
|
+
${payoutThreshold()}
|
|
66
|
+
${claimableBalance()}
|
|
67
|
+
${preferences()}
|
|
68
|
+
${savingsProgress()}
|
|
69
|
+
${kitchenIsland()}
|
|
70
|
+
</div>
|
|
71
|
+
<div class="col-span-2 flex flex-col p-1 [contain-intrinsic-size:760px_1200px] [content-visibility:auto]">
|
|
72
|
+
${savingsTargets()}
|
|
73
|
+
${recentTransactions()}
|
|
74
|
+
<div class="grid grid-cols-2 items-start gap-(--gap)">
|
|
75
|
+
<div class="flex flex-col gap-(--gap)">
|
|
76
|
+
${sidebarNav()}
|
|
77
|
+
${faq()}
|
|
78
|
+
</div>
|
|
79
|
+
<div class="flex flex-col gap-(--gap)">
|
|
80
|
+
${payments()}
|
|
81
|
+
${frontDoor()}
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
${releaseCatalog()}
|
|
85
|
+
</div>
|
|
86
|
+
<div class=${COLUMN}>
|
|
87
|
+
${accountAccess()}
|
|
88
|
+
${cardOverview()}
|
|
89
|
+
${transferFunds()}
|
|
90
|
+
${coverArt()}
|
|
91
|
+
${loadingCard()}
|
|
92
|
+
</div>
|
|
93
|
+
<div class=${COLUMN}>
|
|
94
|
+
${receivingMethod()}
|
|
95
|
+
${powerUsage()}
|
|
96
|
+
${emptyConnectBank()}
|
|
97
|
+
${upcomingPayments()}
|
|
98
|
+
${rollerShades()}
|
|
99
|
+
</div>
|
|
100
|
+
<div class=${COLUMN}>
|
|
101
|
+
${stockPerformance()}
|
|
102
|
+
${emptyExploreCatalog()}
|
|
103
|
+
${newMilestone()}
|
|
104
|
+
${socialLinks()}
|
|
105
|
+
${notificationSettings()}
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
`;
|
|
111
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-03 files chat card: a message carrying an image and a PDF, and
|
|
3
|
+
* a reply that returns two files of its own, each shown as the kit's
|
|
4
|
+
* attachment. A fragment helper, rendered by the server;
|
|
5
|
+
* `<preview-03-chat>` plays the turn.
|
|
6
|
+
*
|
|
7
|
+
* Installed by `npx @webjsdev/ui add preview-03` at
|
|
8
|
+
* `components/preview-03/files-chat.ts`. Ported from shadcn/ui's preview-03.
|
|
9
|
+
*/
|
|
10
|
+
import { html } from '@webjsdev/core';
|
|
11
|
+
import { chatCard, chatItem, chatMessage, type ChatPrompt } from '../components/chat-card.ts';
|
|
12
|
+
import { partFile, type FilePart } from '../components/part-file.ts';
|
|
13
|
+
import { partText } from '../components/part-text.ts';
|
|
14
|
+
|
|
15
|
+
const SCRIPT: Array<{ user: string; userFiles: FilePart[]; text: string; files: FilePart[] }> = [
|
|
16
|
+
{
|
|
17
|
+
user: 'Review these files and tell me what stands out.',
|
|
18
|
+
userFiles: [
|
|
19
|
+
{
|
|
20
|
+
filename: 'workspace.png',
|
|
21
|
+
mediaType: 'image/png',
|
|
22
|
+
url: 'https://images.unsplash.com/photo-1497366754035-f200968a6e72?w=900&auto=format&fit=crop&q=80',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
filename: 'research-brief.pdf',
|
|
26
|
+
mediaType: 'application/pdf',
|
|
27
|
+
url: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
text: 'The image reads like a focused workspace, while the document should be treated as the source of record. I would summarize the PDF first, then use the image only as supporting context.',
|
|
31
|
+
files: [
|
|
32
|
+
{
|
|
33
|
+
filename: 'annotated-workspace.png',
|
|
34
|
+
mediaType: 'image/png',
|
|
35
|
+
url: 'https://images.unsplash.com/photo-1497366811353-6870744d04b2?w=900&auto=format&fit=crop&q=80',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
filename: 'file-review-notes.pdf',
|
|
39
|
+
mediaType: 'application/pdf',
|
|
40
|
+
url: 'https://example.com/file-review-notes.pdf',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
export function filesChat() {
|
|
47
|
+
const prompts: ChatPrompt[] = SCRIPT.map((t) => ({ text: t.user }));
|
|
48
|
+
return chatCard({
|
|
49
|
+
id: 'files-chat-prompt',
|
|
50
|
+
caption: 'Files',
|
|
51
|
+
title: 'File review',
|
|
52
|
+
description: 'Image and document file parts.',
|
|
53
|
+
prompts,
|
|
54
|
+
transcript: SCRIPT.map((t, turn) => html`
|
|
55
|
+
${chatItem({
|
|
56
|
+
turn, kind: 'user', id: `files-${turn}-user`, anchor: true,
|
|
57
|
+
content: chatMessage({
|
|
58
|
+
role: 'user',
|
|
59
|
+
align: 'end',
|
|
60
|
+
contentClass: 'flex-col items-end gap-2',
|
|
61
|
+
content: html`${t.userFiles.map((part) => partFile({ part }))}${partText({ text: t.user, variant: 'bubble' })}`,
|
|
62
|
+
}),
|
|
63
|
+
})}
|
|
64
|
+
${chatItem({
|
|
65
|
+
turn, kind: 'reply', id: `files-${turn}-assistant`, delay: 1000,
|
|
66
|
+
content: chatMessage({
|
|
67
|
+
role: 'assistant',
|
|
68
|
+
align: 'start',
|
|
69
|
+
contentClass: 'flex-col items-start gap-2',
|
|
70
|
+
content: html`${t.files.map((part) => partFile({ part }))}${partText({ text: t.text, variant: 'default' })}`,
|
|
71
|
+
}),
|
|
72
|
+
})}
|
|
73
|
+
`),
|
|
74
|
+
});
|
|
75
|
+
}
|