@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,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 new milestone card: a savings goal's name, amount and date.
|
|
3
|
+
* A fragment helper. Installed by `npx @webjsdev/ui add preview-02` at
|
|
4
|
+
* `components/preview-02/new-milestone.ts`. Ported from shadcn/ui's
|
|
5
|
+
* preview-02.
|
|
6
|
+
*
|
|
7
|
+
* The `<form>` has no `action` yet. Bind a server action from a
|
|
8
|
+
* `'use server'` file (`<form action=${createGoal}>`) before you ship it.
|
|
9
|
+
*/
|
|
10
|
+
import { html } from '@webjsdev/core';
|
|
11
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
12
|
+
import {
|
|
13
|
+
cardClass,
|
|
14
|
+
cardContentClass,
|
|
15
|
+
cardDescriptionClass,
|
|
16
|
+
cardFooterClass,
|
|
17
|
+
cardHeaderClass,
|
|
18
|
+
cardTitleClass,
|
|
19
|
+
} from '../../../components/card.ts';
|
|
20
|
+
import { fieldClass, fieldGroupClass, fieldLabelClass } from '../../../components/field.ts';
|
|
21
|
+
import { inputClass } from '../../../components/input.ts';
|
|
22
|
+
import { cn } from '../../../lib/utils.ts';
|
|
23
|
+
|
|
24
|
+
function field(id: string, name: string, label: string, attrs: { placeholder?: string; value?: string }) {
|
|
25
|
+
return html`<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
26
|
+
<label data-slot="field-label" for=${id} class=${fieldLabelClass()}>${label}</label>
|
|
27
|
+
<input data-slot="input" id=${id} name=${name} placeholder=${attrs.placeholder ?? null} value=${attrs.value ?? null} class=${inputClass()}>
|
|
28
|
+
</div>`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function newMilestone() {
|
|
32
|
+
return html`
|
|
33
|
+
<form data-slot="card" data-size="default" class=${cardClass()}>
|
|
34
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
35
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Set a new milestone</div>
|
|
36
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Define your financial target and we'll help you pace your savings.</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
39
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
40
|
+
${field('goal-name', 'goal', 'Goal Name', { placeholder: 'e.g. New Car, Home Downpayment' })}
|
|
41
|
+
<div class="grid grid-cols-2 gap-3">
|
|
42
|
+
${field('target-amount', 'amount', 'Target Amount', { value: '$15,000' })}
|
|
43
|
+
${field('target-date', 'date', 'Target Date', { value: 'Dec 2025' })}
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col gap-2')}>
|
|
48
|
+
<button type="submit" data-slot="button" data-variant="default" data-size="default" class=${cn(buttonClass(), 'w-full')}>Create Goal</button>
|
|
49
|
+
<button type="reset" data-slot="button" data-variant="outline" data-size="default" class=${cn(buttonClass({ variant: 'outline' }), 'w-full')}>Cancel</button>
|
|
50
|
+
</div>
|
|
51
|
+
</form>
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 Notifications card: a "Select all" checkbox over one
|
|
3
|
+
* checkbox per kind of alert. Installed by `npx @webjsdev/ui add preview-02`
|
|
4
|
+
* at `components/preview-02/notification-settings.ts`. Ported from shadcn/ui's
|
|
5
|
+
* preview-02.
|
|
6
|
+
*
|
|
7
|
+
* The markup is a fragment the server renders with each box at its default.
|
|
8
|
+
* `<preview-02-notification-settings>` adds what shadcn keeps in React state:
|
|
9
|
+
* "Select all" is indeterminate while only some boxes are checked, and
|
|
10
|
+
* checking it checks or clears them all. The `<form>` has no `action` yet:
|
|
11
|
+
* bind a server action from a `'use server'` file
|
|
12
|
+
* (`<form action=${saveNotificationSettings}>`) and each checked box submits
|
|
13
|
+
* as `notify=<id>`.
|
|
14
|
+
*/
|
|
15
|
+
import { WebComponent, html } from '@webjsdev/core';
|
|
16
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
17
|
+
import {
|
|
18
|
+
cardClass,
|
|
19
|
+
cardContentClass,
|
|
20
|
+
cardDescriptionClass,
|
|
21
|
+
cardFooterClass,
|
|
22
|
+
cardHeaderClass,
|
|
23
|
+
cardTitleClass,
|
|
24
|
+
} from '../../../components/card.ts';
|
|
25
|
+
import { checkboxClass } from '../../../components/checkbox.ts';
|
|
26
|
+
import {
|
|
27
|
+
fieldClass,
|
|
28
|
+
fieldContentClass,
|
|
29
|
+
fieldDescriptionClass,
|
|
30
|
+
fieldGroupClass,
|
|
31
|
+
fieldLabelClass,
|
|
32
|
+
} from '../../../components/field.ts';
|
|
33
|
+
import { cn } from '../../../lib/utils.ts';
|
|
34
|
+
|
|
35
|
+
const NOTIFICATIONS = [
|
|
36
|
+
{ id: 'transactions', label: 'Transaction alerts', description: 'Deposits, withdrawals, and transfers.', defaultChecked: true },
|
|
37
|
+
{ id: 'security', label: 'Security alerts', description: 'Login attempts and account changes.', defaultChecked: true },
|
|
38
|
+
{ id: 'goals', label: 'Goal milestones', description: 'Updates at 25%, 50%, 75%, and 100%.', defaultChecked: false },
|
|
39
|
+
{ id: 'market', label: 'Market updates', description: 'Daily portfolio summary and price alerts.', defaultChecked: false },
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
/** Keeps "Select all" in step with the boxes it governs. */
|
|
43
|
+
export class Preview02NotificationSettings extends WebComponent {
|
|
44
|
+
connectedCallback() {
|
|
45
|
+
super.connectedCallback();
|
|
46
|
+
this.addEventListener('change', this._onChange);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// The server cannot render the indeterminate state, which is a property, so
|
|
50
|
+
// it is set once the element has rendered (and its slot has settled).
|
|
51
|
+
firstUpdated(changedProperties: Map<string, unknown>) {
|
|
52
|
+
super.firstUpdated?.(changedProperties);
|
|
53
|
+
requestAnimationFrame(() => this._sync());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
this.removeEventListener('change', this._onChange);
|
|
58
|
+
super.disconnectedCallback();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
_all(): HTMLInputElement | null {
|
|
62
|
+
return this.querySelector<HTMLInputElement>('input[data-select-all]');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
_items(): HTMLInputElement[] {
|
|
66
|
+
return Array.from(this.querySelectorAll<HTMLInputElement>('input[name="notify"]'));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
_sync(): void {
|
|
70
|
+
const all = this._all();
|
|
71
|
+
const items = this._items();
|
|
72
|
+
if (!all || !items.length) return;
|
|
73
|
+
const checked = items.filter((i) => i.checked).length;
|
|
74
|
+
all.checked = checked === items.length;
|
|
75
|
+
all.indeterminate = checked > 0 && checked < items.length;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
_onChange = (e: Event): void => {
|
|
79
|
+
const target = e.target as HTMLInputElement;
|
|
80
|
+
if (target.hasAttribute('data-select-all')) {
|
|
81
|
+
for (const item of this._items()) item.checked = target.checked;
|
|
82
|
+
}
|
|
83
|
+
this._sync();
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
render() {
|
|
87
|
+
return html`<slot></slot>`;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
Preview02NotificationSettings.register('preview-02-notification-settings');
|
|
91
|
+
|
|
92
|
+
export function notificationSettings() {
|
|
93
|
+
const allChecked = NOTIFICATIONS.every((n) => n.defaultChecked);
|
|
94
|
+
return html`
|
|
95
|
+
<preview-02-notification-settings>
|
|
96
|
+
<form data-slot="card" data-size="default" class=${cardClass()}>
|
|
97
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
98
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Notifications</div>
|
|
99
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Choose what you want to be notified about.</div>
|
|
100
|
+
</div>
|
|
101
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
102
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
103
|
+
<div role="group" data-slot="field" data-orientation="horizontal" class=${fieldClass({ orientation: 'horizontal' })}>
|
|
104
|
+
<input type="checkbox" data-slot="checkbox" data-select-all id="notify-all" ?checked=${allChecked} class=${checkboxClass()}>
|
|
105
|
+
<div data-slot="field-content" class=${fieldContentClass()}>
|
|
106
|
+
<label data-slot="field-label" for="notify-all" class=${fieldLabelClass()}>Select all</label>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
${NOTIFICATIONS.map((n) => html`
|
|
110
|
+
<div role="group" data-slot="field" data-orientation="horizontal" class=${fieldClass({ orientation: 'horizontal' })}>
|
|
111
|
+
<input type="checkbox" data-slot="checkbox" id=${`notify-${n.id}`} name="notify" value=${n.id} ?checked=${n.defaultChecked} class=${checkboxClass()}>
|
|
112
|
+
<div data-slot="field-content" class=${fieldContentClass()}>
|
|
113
|
+
<label data-slot="field-label" for=${`notify-${n.id}`} class=${fieldLabelClass()}>${n.label}</label>
|
|
114
|
+
<p data-slot="field-description" class=${fieldDescriptionClass()}>${n.description}</p>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
`)}
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
121
|
+
<button type="submit" data-slot="button" data-variant="default" data-size="default" class=${cn(buttonClass(), 'w-full')}>Save Preferences</button>
|
|
122
|
+
</div>
|
|
123
|
+
</form>
|
|
124
|
+
</preview-02-notification-settings>
|
|
125
|
+
`;
|
|
126
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 Payments card: a breadcrumb with an account menu over a list
|
|
3
|
+
* of payment settings links. A fragment helper. Installed by
|
|
4
|
+
* `npx @webjsdev/ui add preview-02` at `components/preview-02/payments.ts`.
|
|
5
|
+
* Ported from shadcn/ui's preview-02.
|
|
6
|
+
*/
|
|
7
|
+
import { html } from '@webjsdev/core';
|
|
8
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
9
|
+
import { cardClass, cardContentClass, cardHeaderClass } from '../../../components/card.ts';
|
|
10
|
+
import {
|
|
11
|
+
breadcrumbItemClass,
|
|
12
|
+
breadcrumbLinkClass,
|
|
13
|
+
breadcrumbListClass,
|
|
14
|
+
breadcrumbPageClass,
|
|
15
|
+
breadcrumbSeparatorClass,
|
|
16
|
+
} from '../../../components/breadcrumb.ts';
|
|
17
|
+
import {
|
|
18
|
+
itemClass,
|
|
19
|
+
itemContentClass,
|
|
20
|
+
itemDescriptionClass,
|
|
21
|
+
itemGroupClass,
|
|
22
|
+
itemMediaClass,
|
|
23
|
+
itemTitleClass,
|
|
24
|
+
} from '../../../components/item.ts';
|
|
25
|
+
import { cn } from '../../../lib/utils.ts';
|
|
26
|
+
import '../../../components/dropdown-menu.ts';
|
|
27
|
+
import { CalendarIcon, ChevronRightIcon, GaugeIcon, MoreHorizontalIcon, RefreshCwIcon, RepeatIcon } from '../../../lib/icons.ts';
|
|
28
|
+
|
|
29
|
+
const LINKS = [
|
|
30
|
+
{ icon: GaugeIcon, title: 'Change transfer limit', description: 'Adjust how much you can send from your balance.' },
|
|
31
|
+
{ icon: CalendarIcon, title: 'Scheduled transfers', description: 'Set up a transfer to send at a later date.' },
|
|
32
|
+
{ icon: RepeatIcon, title: 'Direct Debits', description: 'Set up and manage regular payments.' },
|
|
33
|
+
{ icon: RefreshCwIcon, title: 'Recurring card payments', description: 'Manage your repeated card transactions.' },
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
const separator = () => html`<li data-slot="breadcrumb-separator" role="presentation" aria-hidden="true" class=${breadcrumbSeparatorClass()}>${ChevronRightIcon()}</li>`;
|
|
37
|
+
|
|
38
|
+
export function payments() {
|
|
39
|
+
return html`
|
|
40
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
41
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'flex flex-col gap-3')}>
|
|
42
|
+
<nav aria-label="breadcrumb" data-slot="breadcrumb">
|
|
43
|
+
<ol data-slot="breadcrumb-list" class=${breadcrumbListClass()}>
|
|
44
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
45
|
+
<a data-slot="breadcrumb-link" href="#" class=${breadcrumbLinkClass()}>Home</a>
|
|
46
|
+
</li>
|
|
47
|
+
${separator()}
|
|
48
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
49
|
+
<ui-dropdown-menu>
|
|
50
|
+
<ui-dropdown-menu-trigger>
|
|
51
|
+
<button type="button" data-slot="button" data-variant="ghost" data-size="icon-sm" class=${buttonClass({ variant: 'ghost', size: 'icon-sm' })}>
|
|
52
|
+
${MoreHorizontalIcon()}
|
|
53
|
+
<span class="sr-only">Account options</span>
|
|
54
|
+
</button>
|
|
55
|
+
</ui-dropdown-menu-trigger>
|
|
56
|
+
<ui-dropdown-menu-content align="start">
|
|
57
|
+
<ui-dropdown-menu-group>
|
|
58
|
+
<ui-dropdown-menu-item>Profile</ui-dropdown-menu-item>
|
|
59
|
+
<ui-dropdown-menu-item>Statements</ui-dropdown-menu-item>
|
|
60
|
+
<ui-dropdown-menu-item>Documents</ui-dropdown-menu-item>
|
|
61
|
+
</ui-dropdown-menu-group>
|
|
62
|
+
</ui-dropdown-menu-content>
|
|
63
|
+
</ui-dropdown-menu>
|
|
64
|
+
</li>
|
|
65
|
+
${separator()}
|
|
66
|
+
<li data-slot="breadcrumb-item" class=${breadcrumbItemClass()}>
|
|
67
|
+
<span data-slot="breadcrumb-page" aria-current="page" class=${breadcrumbPageClass()}>Payments</span>
|
|
68
|
+
</li>
|
|
69
|
+
</ol>
|
|
70
|
+
</nav>
|
|
71
|
+
</div>
|
|
72
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
73
|
+
<div role="list" data-slot="item-group" class=${itemGroupClass()}>
|
|
74
|
+
${LINKS.map((link) => html`
|
|
75
|
+
<a href="#" role="listitem" data-slot="item" data-variant="muted" data-size="default" class=${itemClass({ variant: 'muted' })}>
|
|
76
|
+
<div data-slot="item-media" data-variant="icon" class=${itemMediaClass({ variant: 'icon' })}>${link.icon()}</div>
|
|
77
|
+
<div data-slot="item-content" class=${itemContentClass()}>
|
|
78
|
+
<div data-slot="item-title" class=${itemTitleClass()}>${link.title}</div>
|
|
79
|
+
<p data-slot="item-description" class=${itemDescriptionClass()}>${link.description}</p>
|
|
80
|
+
</div>
|
|
81
|
+
${ChevronRightIcon('size-4 shrink-0 text-muted-foreground')}
|
|
82
|
+
</a>
|
|
83
|
+
`)}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
`;
|
|
88
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 "Payout Threshold" form: a currency select, a minimum
|
|
3
|
+
* payout slider and notes. A fragment helper; the select and slider are the
|
|
4
|
+
* kit's `<ui-select>` and `<ui-slider>`, each around its native control.
|
|
5
|
+
* Installed at `components/preview-02/payout-threshold.ts`. Ported from
|
|
6
|
+
* shadcn/ui's preview-02.
|
|
7
|
+
*
|
|
8
|
+
* The form has no action yet. Bind a server action from a `'use server'`
|
|
9
|
+
* file (`<form action=${saveThreshold}>`) before you ship it. shadcn shows the
|
|
10
|
+
* slider's value live from React state; the amount here is the server's
|
|
11
|
+
* first value, so read the submitted `min_payout` in your action.
|
|
12
|
+
*/
|
|
13
|
+
import { html } from '@webjsdev/core';
|
|
14
|
+
import { cn } from '../../../lib/utils.ts';
|
|
15
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
16
|
+
import {
|
|
17
|
+
cardActionClass,
|
|
18
|
+
cardClass,
|
|
19
|
+
cardContentClass,
|
|
20
|
+
cardDescriptionClass,
|
|
21
|
+
cardFooterClass,
|
|
22
|
+
cardHeaderClass,
|
|
23
|
+
cardTitleClass,
|
|
24
|
+
} from '../../../components/card.ts';
|
|
25
|
+
import {
|
|
26
|
+
fieldClass,
|
|
27
|
+
fieldDescriptionClass,
|
|
28
|
+
fieldGroupClass,
|
|
29
|
+
fieldLabelClass,
|
|
30
|
+
} from '../../../components/field.ts';
|
|
31
|
+
import { selectTriggerClass } from '../../../components/select.ts';
|
|
32
|
+
import { sliderClass } from '../../../components/slider.ts';
|
|
33
|
+
import { textareaClass } from '../../../components/textarea.ts';
|
|
34
|
+
import '../../../components/select.ts';
|
|
35
|
+
import '../../../components/slider.ts';
|
|
36
|
+
import { XIcon } from '../../../lib/icons.ts';
|
|
37
|
+
|
|
38
|
+
const CURRENCIES = [
|
|
39
|
+
{ value: 'usd', label: 'USD, United States Dollar' },
|
|
40
|
+
{ value: 'eur', label: 'EUR, Euro' },
|
|
41
|
+
{ value: 'gbp', label: 'GBP, British Pound' },
|
|
42
|
+
{ value: 'jpy', label: 'JPY, Japanese Yen' },
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
export function payoutThreshold() {
|
|
46
|
+
const amount = 2500;
|
|
47
|
+
return html`
|
|
48
|
+
<form data-slot="card" data-size="default" class=${cardClass()}>
|
|
49
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
50
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Payout Threshold</div>
|
|
51
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Set the minimum balance required before a payout is triggered.</div>
|
|
52
|
+
<div data-slot="card-action" class=${cardActionClass()}>
|
|
53
|
+
<button type="button" data-slot="button" data-variant="ghost" data-size="icon-sm" aria-label="Dismiss" class=${cn(buttonClass({ variant: 'ghost', size: 'icon-sm' }), 'bg-muted')}>${XIcon()}</button>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
57
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
58
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
59
|
+
<label data-slot="field-label" for="preferred-currency" class=${fieldLabelClass()}>Preferred Currency</label>
|
|
60
|
+
<ui-select class="w-full">
|
|
61
|
+
<select id="preferred-currency" name="currency" class=${cn(selectTriggerClass(), 'w-full')}>
|
|
62
|
+
<optgroup>
|
|
63
|
+
${CURRENCIES.map((c) => html`<option value=${c.value} ?selected=${c.value === 'usd'}>${c.label}</option>`)}
|
|
64
|
+
</optgroup>
|
|
65
|
+
</select>
|
|
66
|
+
</ui-select>
|
|
67
|
+
</div>
|
|
68
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
69
|
+
<div class="flex items-baseline justify-between">
|
|
70
|
+
<label data-slot="field-label" for="min-payout" class=${fieldLabelClass()}>Minimum Payout Amount</label>
|
|
71
|
+
<span class="text-2xl font-semibold tabular-nums">$${amount.toFixed(2)}</span>
|
|
72
|
+
</div>
|
|
73
|
+
<ui-slider>
|
|
74
|
+
<input type="range" id="min-payout" name="min_payout" min="50" max="10000" step="50" value=${amount} class=${sliderClass()}>
|
|
75
|
+
</ui-slider>
|
|
76
|
+
<div class="flex items-center justify-between">
|
|
77
|
+
<p data-slot="field-description" class=${fieldDescriptionClass()}>$50 (MIN)</p>
|
|
78
|
+
<p data-slot="field-description" class=${fieldDescriptionClass()}>$10,000 (MAX)</p>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
82
|
+
<label data-slot="field-label" for="payout-notes" class=${fieldLabelClass()}>Notes</label>
|
|
83
|
+
<textarea data-slot="textarea" id="payout-notes" name="notes" placeholder="Add any notes for this payout configuration..." class=${cn(textareaClass(), 'min-h-[100px]')}></textarea>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
88
|
+
<button type="submit" data-slot="button" data-variant="default" data-size="default" class=${cn(buttonClass(), 'w-full')}>Save Threshold</button>
|
|
89
|
+
</div>
|
|
90
|
+
</form>
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 Power Usage card: the day's usage as a bar chart, the
|
|
3
|
+
* current draw and solar output, and the battery level. A fragment helper;
|
|
4
|
+
* the chart is the kit's server-drawn `barChart`. Installed by
|
|
5
|
+
* `npx @webjsdev/ui add preview-02` at `components/preview-02/power-usage.ts`.
|
|
6
|
+
* Ported from shadcn/ui's preview-02, which squares the bars in its lyra and
|
|
7
|
+
* sera styles. A bar's corners are drawn into its SVG path, so the card renders
|
|
8
|
+
* the chart both ways and the `style-lyra:` / `style-sera:` variants show the
|
|
9
|
+
* square one: a style switch repaints with no new render, and where those
|
|
10
|
+
* variants are not defined the rounded chart shows.
|
|
11
|
+
*/
|
|
12
|
+
import { html } from '@webjsdev/core';
|
|
13
|
+
import {
|
|
14
|
+
cardClass,
|
|
15
|
+
cardContentClass,
|
|
16
|
+
cardDescriptionClass,
|
|
17
|
+
cardFooterClass,
|
|
18
|
+
cardHeaderClass,
|
|
19
|
+
cardTitleClass,
|
|
20
|
+
} from '../../../components/card.ts';
|
|
21
|
+
import { barChart, type ChartConfig } from '../../../components/chart.ts';
|
|
22
|
+
import { progressClass } from '../../../components/progress.ts';
|
|
23
|
+
import { separatorClass } from '../../../components/separator.ts';
|
|
24
|
+
import { cn } from '../../../lib/utils.ts';
|
|
25
|
+
|
|
26
|
+
const chartData = [
|
|
27
|
+
{ hour: '6a', usage: 1.2 },
|
|
28
|
+
{ hour: '8a', usage: 2.8 },
|
|
29
|
+
{ hour: '10a', usage: 3.1 },
|
|
30
|
+
{ hour: '12p', usage: 2.4 },
|
|
31
|
+
{ hour: '2p', usage: 3.4 },
|
|
32
|
+
{ hour: '4p', usage: 2.9 },
|
|
33
|
+
{ hour: '6p', usage: 3.8 },
|
|
34
|
+
{ hour: '8p', usage: 3.2 },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const chartConfig = {
|
|
38
|
+
usage: { label: 'Usage (kW)', color: 'var(--chart-2)' },
|
|
39
|
+
} satisfies ChartConfig;
|
|
40
|
+
|
|
41
|
+
export function powerUsage() {
|
|
42
|
+
const chart = (radius: number | number[]) => barChart({
|
|
43
|
+
config: chartConfig,
|
|
44
|
+
data: chartData,
|
|
45
|
+
title: 'Power usage through the day, in kilowatts',
|
|
46
|
+
class: 'aspect-auto h-[140px] w-full',
|
|
47
|
+
width: 330,
|
|
48
|
+
height: 140,
|
|
49
|
+
margin: { left: 0, right: 0, top: 4, bottom: 0 },
|
|
50
|
+
xAxis: { dataKey: 'hour', tickLine: false, tickMargin: 6, axisLine: false, class: 'text-xs' },
|
|
51
|
+
tooltip: { cursor: false, hideLabel: true },
|
|
52
|
+
bars: [{ dataKey: 'usage', fill: 'var(--color-usage)', radius }],
|
|
53
|
+
});
|
|
54
|
+
return html`
|
|
55
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
56
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
57
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Power Usage</div>
|
|
58
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Whole Home</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex flex-col gap-4')}>
|
|
61
|
+
<div class="contents style-lyra:hidden style-sera:hidden">${chart([4, 4, 0, 0])}</div>
|
|
62
|
+
<div class="hidden style-lyra:contents style-sera:contents">${chart(0)}</div>
|
|
63
|
+
<div role="none" data-slot="separator" data-orientation="horizontal" class=${separatorClass()}></div>
|
|
64
|
+
<div class="grid grid-cols-2 gap-4">
|
|
65
|
+
<div class="flex flex-col gap-0.5">
|
|
66
|
+
<span class="text-sm text-muted-foreground">Currently Using</span>
|
|
67
|
+
<span class="text-lg font-semibold tabular-nums">3.4 kW</span>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="flex flex-col gap-0.5">
|
|
70
|
+
<span class="text-sm text-muted-foreground">Solar Gen</span>
|
|
71
|
+
<span class="text-lg font-semibold text-chart-1 tabular-nums">+1.2 kW</span>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div data-slot="card-footer" class=${cn(cardFooterClass(), 'flex-col items-start gap-1')}>
|
|
76
|
+
<span id="power-usage-battery" class="text-sm text-muted-foreground">Battery Level</span>
|
|
77
|
+
<div class="flex w-full items-center gap-2">
|
|
78
|
+
<progress data-slot="progress" value="85" max="100" aria-labelledby="power-usage-battery" class=${cn(progressClass(), 'flex-1')}></progress>
|
|
79
|
+
<span class="text-sm font-medium tabular-nums">85%</span>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 "Preferences" form: a default currency select and two
|
|
3
|
+
* switches. A fragment helper; the select and switches are the kit's
|
|
4
|
+
* `<ui-select>` and `<ui-switch>`, each a real form control. Installed at
|
|
5
|
+
* `components/preview-02/preferences.ts`. Ported from shadcn/ui's preview-02.
|
|
6
|
+
*
|
|
7
|
+
* The form has no action yet. Bind a server action from a `'use server'`
|
|
8
|
+
* file (`<form action=${savePreferences}>`) before you ship it, and render
|
|
9
|
+
* each switch's `checked` from the user's saved settings.
|
|
10
|
+
*/
|
|
11
|
+
import { html } from '@webjsdev/core';
|
|
12
|
+
import { cn } from '../../../lib/utils.ts';
|
|
13
|
+
import { buttonClass } from '../../../components/button.ts';
|
|
14
|
+
import {
|
|
15
|
+
cardActionClass,
|
|
16
|
+
cardClass,
|
|
17
|
+
cardContentClass,
|
|
18
|
+
cardDescriptionClass,
|
|
19
|
+
cardFooterClass,
|
|
20
|
+
cardHeaderClass,
|
|
21
|
+
cardTitleClass,
|
|
22
|
+
} from '../../../components/card.ts';
|
|
23
|
+
import {
|
|
24
|
+
fieldClass,
|
|
25
|
+
fieldContentClass,
|
|
26
|
+
fieldDescriptionClass,
|
|
27
|
+
fieldGroupClass,
|
|
28
|
+
fieldLabelClass,
|
|
29
|
+
fieldSeparatorClass,
|
|
30
|
+
} from '../../../components/field.ts';
|
|
31
|
+
import { selectTriggerClass } from '../../../components/select.ts';
|
|
32
|
+
import '../../../components/select.ts';
|
|
33
|
+
import '../../../components/switch.ts';
|
|
34
|
+
import { XIcon } from '../../../lib/icons.ts';
|
|
35
|
+
|
|
36
|
+
const CURRENCIES = [
|
|
37
|
+
{ value: 'usd', label: 'USD, United States Dollar' },
|
|
38
|
+
{ value: 'eur', label: 'EUR, Euro' },
|
|
39
|
+
{ value: 'gbp', label: 'GBP, British Pound' },
|
|
40
|
+
{ value: 'jpy', label: 'JPY, Japanese Yen' },
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
const fieldSeparator = () => html`<div role="none" data-slot="field-separator" class=${cn(fieldSeparatorClass(), '-my-4 style-sera:hidden')}></div>`;
|
|
44
|
+
|
|
45
|
+
function toggle(id: string, name: string, label: string, description: string) {
|
|
46
|
+
return html`<div role="group" data-slot="field" data-orientation="horizontal" class=${fieldClass({ orientation: 'horizontal' })}>
|
|
47
|
+
<div data-slot="field-content" class=${fieldContentClass()}>
|
|
48
|
+
<label data-slot="field-label" for=${id} class=${fieldLabelClass()}>${label}</label>
|
|
49
|
+
<p data-slot="field-description" class=${fieldDescriptionClass()}>${description}</p>
|
|
50
|
+
</div>
|
|
51
|
+
<ui-switch input-id=${id} name=${name} checked></ui-switch>
|
|
52
|
+
</div>`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function preferences() {
|
|
56
|
+
return html`
|
|
57
|
+
<form data-slot="card" data-size="default" class=${cardClass()}>
|
|
58
|
+
<div data-slot="card-header" class=${cardHeaderClass()}>
|
|
59
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Preferences</div>
|
|
60
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Manage your account settings and notifications.</div>
|
|
61
|
+
<div data-slot="card-action" class=${cardActionClass()}>
|
|
62
|
+
<button type="button" data-slot="button" data-variant="ghost" data-size="icon-sm" aria-label="Dismiss" class=${cn(buttonClass({ variant: 'ghost', size: 'icon-sm' }), 'bg-muted')}>${XIcon()}</button>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div data-slot="card-content" class=${cardContentClass()}>
|
|
66
|
+
<div data-slot="field-group" class=${fieldGroupClass()}>
|
|
67
|
+
<div role="group" data-slot="field" data-orientation="vertical" class=${fieldClass()}>
|
|
68
|
+
<label data-slot="field-label" for="default-currency" class=${fieldLabelClass()}>Default Currency</label>
|
|
69
|
+
<ui-select class="w-full">
|
|
70
|
+
<select id="default-currency" name="currency" class=${cn(selectTriggerClass(), 'w-full')}>
|
|
71
|
+
<optgroup>
|
|
72
|
+
${CURRENCIES.map((c) => html`<option value=${c.value} ?selected=${c.value === 'usd'}>${c.label}</option>`)}
|
|
73
|
+
</optgroup>
|
|
74
|
+
</select>
|
|
75
|
+
</ui-select>
|
|
76
|
+
</div>
|
|
77
|
+
${fieldSeparator()}
|
|
78
|
+
${toggle('public-statistics', 'public_statistics', 'Public Statistics', 'Allow others to see your total stream count and listening activity')}
|
|
79
|
+
${fieldSeparator()}
|
|
80
|
+
${toggle('email-notifications', 'email_notifications', 'Email Notifications', 'Monthly royalty reports and distribution updates')}
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
84
|
+
<button type="reset" data-slot="button" data-variant="outline" data-size="default" class=${buttonClass({ variant: 'outline' })}>Reset</button>
|
|
85
|
+
<button type="submit" data-slot="button" data-variant="default" data-size="default" class=${cn(buttonClass(), 'ml-auto')}>Save Preferences</button>
|
|
86
|
+
</div>
|
|
87
|
+
</form>
|
|
88
|
+
`;
|
|
89
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview-02 "Scan to connect" card: a QR code over a heading and a
|
|
3
|
+
* button. A fragment helper. Installed at `components/preview-02/qr-connect.ts`.
|
|
4
|
+
* Ported from shadcn/ui's preview-02.
|
|
5
|
+
*
|
|
6
|
+
* shadcn draws the code with the react-qr-code package. The kit takes no
|
|
7
|
+
* third-party dependency, so the code here is a fixed 21 by 21 module grid
|
|
8
|
+
* drawn as SVG. To encode your own URL, render it with a QR library of your
|
|
9
|
+
* choice on the server and put its SVG in place of the grid.
|
|
10
|
+
*/
|
|
11
|
+
import { html, svg } 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
|
+
|
|
23
|
+
const QR = [
|
|
24
|
+
'111111100101101111111', '100000101001001000001', '101110101111101011101',
|
|
25
|
+
'101110100100001011101', '101110101010101011101', '100000100111001000001',
|
|
26
|
+
'111111101010101111111', '000000001101000000000', '101011111001111010110',
|
|
27
|
+
'010100001110010101001', '111010111011101111010', '001101000101000010101',
|
|
28
|
+
'110111101111010111011', '000000001001010001010', '111111101101111101001',
|
|
29
|
+
'100000100010001001111', '101110101011101110100', '101110100110100010011',
|
|
30
|
+
'101110101000111101110', '100000101101000011001', '111111101011101101111',
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export function qrConnect() {
|
|
34
|
+
const cells = QR.flatMap((row, y) => [...row].map((c, x) => (c === '1' ? svg`<rect x=${x} y=${y} width="1" height="1"></rect>` : '')));
|
|
35
|
+
return html`
|
|
36
|
+
<div data-slot="card" data-size="default" class=${cardClass()}>
|
|
37
|
+
<div data-slot="card-content" class=${cn(cardContentClass(), 'flex justify-center pt-6')}>
|
|
38
|
+
<div class="rounded-xl border bg-white p-4">
|
|
39
|
+
<svg viewBox="0 0 21 21" width="160" height="160" class="size-40 text-black" role="img" aria-label="QR code to connect your mobile device" shape-rendering="crispEdges">
|
|
40
|
+
<rect width="21" height="21" fill="white"></rect>
|
|
41
|
+
${cells}
|
|
42
|
+
</svg>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-slot="card-header" class=${cn(cardHeaderClass(), 'text-center')}>
|
|
46
|
+
<div data-slot="card-title" class=${cardTitleClass()}>Scan to connect your mobile device</div>
|
|
47
|
+
<div data-slot="card-description" class=${cardDescriptionClass()}>Open the Ledger mobile app and scan this code to link your device.</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div data-slot="card-footer" class=${cardFooterClass()}>
|
|
50
|
+
<button type="button" data-slot="button" data-variant="secondary" data-size="default" class=${cn(buttonClass({ variant: 'secondary' }), 'w-full')}>Got it</button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
`;
|
|
54
|
+
}
|