@webjsdev/ui 0.3.16 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -10
- package/THIRD_PARTY_NOTICES.md +349 -0
- package/package.json +4 -2
- package/packages/registry/blocks/_shared/placeholder.svg +1 -0
- package/packages/registry/blocks/charts/chart-area-axes.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-default.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-gradient.ts +82 -0
- package/packages/registry/blocks/charts/chart-area-icons.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-interactive.ts +204 -0
- package/packages/registry/blocks/charts/chart-area-legend.ts +72 -0
- package/packages/registry/blocks/charts/chart-area-linear.ts +64 -0
- package/packages/registry/blocks/charts/chart-area-stacked-expand.ts +77 -0
- package/packages/registry/blocks/charts/chart-area-stacked.ts +71 -0
- package/packages/registry/blocks/charts/chart-area-step.ts +68 -0
- package/packages/registry/blocks/charts/chart-bar-active.ts +93 -0
- package/packages/registry/blocks/charts/chart-bar-default.ts +60 -0
- package/packages/registry/blocks/charts/chart-bar-horizontal.ts +62 -0
- package/packages/registry/blocks/charts/chart-bar-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-bar-label-custom.ts +78 -0
- package/packages/registry/blocks/charts/chart-bar-label.ts +66 -0
- package/packages/registry/blocks/charts/chart-bar-mixed.ts +87 -0
- package/packages/registry/blocks/charts/chart-bar-multiple.ts +67 -0
- package/packages/registry/blocks/charts/chart-bar-negative.ts +61 -0
- package/packages/registry/blocks/charts/chart-bar-stacked.ts +68 -0
- package/packages/registry/blocks/charts/chart-line-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-dots-colors.ts +86 -0
- package/packages/registry/blocks/charts/chart-line-dots-custom.ts +75 -0
- package/packages/registry/blocks/charts/chart-line-dots.ts +65 -0
- package/packages/registry/blocks/charts/chart-line-interactive.ts +185 -0
- package/packages/registry/blocks/charts/chart-line-label-custom.ts +94 -0
- package/packages/registry/blocks/charts/chart-line-label.ts +73 -0
- package/packages/registry/blocks/charts/chart-line-linear.ts +61 -0
- package/packages/registry/blocks/charts/chart-line-multiple.ts +71 -0
- package/packages/registry/blocks/charts/chart-line-step.ts +61 -0
- package/packages/registry/blocks/charts/chart-pie-donut-active.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-donut-text.ts +89 -0
- package/packages/registry/blocks/charts/chart-pie-donut.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-interactive.ts +120 -0
- package/packages/registry/blocks/charts/chart-pie-label-custom.ts +82 -0
- package/packages/registry/blocks/charts/chart-pie-label-list.ts +86 -0
- package/packages/registry/blocks/charts/chart-pie-label.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-legend.ts +79 -0
- package/packages/registry/blocks/charts/chart-pie-separator-none.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-simple.ts +77 -0
- package/packages/registry/blocks/charts/chart-pie-stacked.ts +99 -0
- package/packages/registry/blocks/charts/chart-radar-default.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-dots.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle-no-lines.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-circle.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-custom.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-fill.ts +61 -0
- package/packages/registry/blocks/charts/chart-radar-grid-none.ts +60 -0
- package/packages/registry/blocks/charts/chart-radar-icons.ts +76 -0
- package/packages/registry/blocks/charts/chart-radar-label-custom.ts +77 -0
- package/packages/registry/blocks/charts/chart-radar-legend.ts +70 -0
- package/packages/registry/blocks/charts/chart-radar-lines-only.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-multiple.ts +68 -0
- package/packages/registry/blocks/charts/chart-radar-radius.ts +68 -0
- package/packages/registry/blocks/charts/chart-radial-grid.ts +80 -0
- package/packages/registry/blocks/charts/chart-radial-label.ts +85 -0
- package/packages/registry/blocks/charts/chart-radial-shape.ts +81 -0
- package/packages/registry/blocks/charts/chart-radial-simple.ts +79 -0
- package/packages/registry/blocks/charts/chart-radial-stacked.ts +69 -0
- package/packages/registry/blocks/charts/chart-radial-text.ts +82 -0
- package/packages/registry/blocks/charts/chart-tooltip-advanced.ts +84 -0
- package/packages/registry/blocks/charts/chart-tooltip-default.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-formatter.ts +75 -0
- package/packages/registry/blocks/charts/chart-tooltip-icons.ts +68 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-line.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-indicator-none.ts +62 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-custom.ts +65 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-formatter.ts +66 -0
- package/packages/registry/blocks/charts/chart-tooltip-label-none.ts +62 -0
- package/packages/registry/blocks/dashboard-01/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/dashboard-01/components/chart-area-interactive.ts +276 -0
- package/packages/registry/blocks/dashboard-01/components/dashboard-data.ts +89 -0
- package/packages/registry/blocks/dashboard-01/components/data-table.ts +637 -0
- package/packages/registry/blocks/dashboard-01/components/nav-documents.ts +65 -0
- package/packages/registry/blocks/dashboard-01/components/nav-main.ts +61 -0
- package/packages/registry/blocks/dashboard-01/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/dashboard-01/components/nav-user.ts +66 -0
- package/packages/registry/blocks/dashboard-01/components/section-cards.ts +59 -0
- package/packages/registry/blocks/dashboard-01/components/site-header.ts +52 -0
- package/packages/registry/blocks/dashboard-01/page.ts +39 -0
- package/packages/registry/blocks/login-01/components/login-form.ts +70 -0
- package/packages/registry/blocks/login-01/page.ts +19 -0
- package/packages/registry/blocks/login-02/components/login-form.ts +68 -0
- package/packages/registry/blocks/login-02/page.ts +36 -0
- package/packages/registry/blocks/login-03/components/login-form.ts +89 -0
- package/packages/registry/blocks/login-03/page.ts +28 -0
- package/packages/registry/blocks/login-04/components/login-form.ts +91 -0
- package/packages/registry/blocks/login-04/page.ts +20 -0
- package/packages/registry/blocks/login-05/components/login-form.ts +75 -0
- package/packages/registry/blocks/login-05/page.ts +19 -0
- package/packages/registry/blocks/preview/cards/activate-agent-dialog.ts +77 -0
- package/packages/registry/blocks/preview/cards/analytics-card.ts +64 -0
- package/packages/registry/blocks/preview/cards/anomaly-alert.ts +35 -0
- package/packages/registry/blocks/preview/cards/bar-chart-card.ts +91 -0
- package/packages/registry/blocks/preview/cards/book-appointment.ts +51 -0
- package/packages/registry/blocks/preview/cards/codespaces-card.ts +172 -0
- package/packages/registry/blocks/preview/cards/contributions-activity.ts +63 -0
- package/packages/registry/blocks/preview/cards/contributors.ts +51 -0
- package/packages/registry/blocks/preview/cards/environment-variables.ts +47 -0
- package/packages/registry/blocks/preview/cards/feedback-form.ts +61 -0
- package/packages/registry/blocks/preview/cards/file-upload.ts +51 -0
- package/packages/registry/blocks/preview/cards/github-profile.ts +66 -0
- package/packages/registry/blocks/preview/cards/icon-preview-grid.ts +47 -0
- package/packages/registry/blocks/preview/cards/invite-team.ts +78 -0
- package/packages/registry/blocks/preview/cards/invoice.ts +91 -0
- package/packages/registry/blocks/preview/cards/live-waveform.ts +330 -0
- package/packages/registry/blocks/preview/cards/no-team-members.ts +61 -0
- package/packages/registry/blocks/preview/cards/not-found.ts +46 -0
- package/packages/registry/blocks/preview/cards/observability-card.ts +44 -0
- package/packages/registry/blocks/preview/cards/pie-chart-card.ts +84 -0
- package/packages/registry/blocks/preview/cards/report-bug.ts +71 -0
- package/packages/registry/blocks/preview/cards/shipping-address.ts +79 -0
- package/packages/registry/blocks/preview/cards/shortcuts.ts +57 -0
- package/packages/registry/blocks/preview/cards/skeleton-loading.ts +37 -0
- package/packages/registry/blocks/preview/cards/sleep-report.ts +85 -0
- package/packages/registry/blocks/preview/cards/style-overview.ts +64 -0
- package/packages/registry/blocks/preview/cards/typography-specimen.ts +107 -0
- package/packages/registry/blocks/preview/cards/ui-elements.ts +164 -0
- package/packages/registry/blocks/preview/cards/usage-card.ts +63 -0
- package/packages/registry/blocks/preview/cards/visitors.ts +71 -0
- package/packages/registry/blocks/preview/cards/weekly-fitness-summary.ts +54 -0
- package/packages/registry/blocks/preview/page.ts +103 -0
- package/packages/registry/blocks/preview-02/cards/account-access.ts +70 -0
- package/packages/registry/blocks/preview-02/cards/card-overview.ts +75 -0
- package/packages/registry/blocks/preview-02/cards/claimable-balance.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/contribution-history.ts +80 -0
- package/packages/registry/blocks/preview-02/cards/cover-art.ts +41 -0
- package/packages/registry/blocks/preview-02/cards/dividend-income.ts +76 -0
- package/packages/registry/blocks/preview-02/cards/empty-connect-bank.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-distribute-track.ts +38 -0
- package/packages/registry/blocks/preview-02/cards/empty-explore-catalog.ts +39 -0
- package/packages/registry/blocks/preview-02/cards/faq.ts +79 -0
- package/packages/registry/blocks/preview-02/cards/front-door.ts +40 -0
- package/packages/registry/blocks/preview-02/cards/index-investing.ts +31 -0
- package/packages/registry/blocks/preview-02/cards/kitchen-island.ts +90 -0
- package/packages/registry/blocks/preview-02/cards/loading-card.ts +34 -0
- package/packages/registry/blocks/preview-02/cards/new-milestone.ts +53 -0
- package/packages/registry/blocks/preview-02/cards/notification-settings.ts +126 -0
- package/packages/registry/blocks/preview-02/cards/payments.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/payout-threshold.ts +92 -0
- package/packages/registry/blocks/preview-02/cards/power-usage.ts +84 -0
- package/packages/registry/blocks/preview-02/cards/preferences.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/qr-connect.ts +54 -0
- package/packages/registry/blocks/preview-02/cards/receiving-method.ts +89 -0
- package/packages/registry/blocks/preview-02/cards/recent-transactions.ts +101 -0
- package/packages/registry/blocks/preview-02/cards/release-catalog.ts +73 -0
- package/packages/registry/blocks/preview-02/cards/roller-shades.ts +110 -0
- package/packages/registry/blocks/preview-02/cards/savings-progress.ts +68 -0
- package/packages/registry/blocks/preview-02/cards/savings-targets.ts +132 -0
- package/packages/registry/blocks/preview-02/cards/sidebar-nav.ts +88 -0
- package/packages/registry/blocks/preview-02/cards/social-links.ts +57 -0
- package/packages/registry/blocks/preview-02/cards/stock-performance.ts +106 -0
- package/packages/registry/blocks/preview-02/cards/syncing-state.ts +37 -0
- package/packages/registry/blocks/preview-02/cards/transfer-funds.ts +111 -0
- package/packages/registry/blocks/preview-02/cards/upcoming-payments.ts +69 -0
- package/packages/registry/blocks/preview-02/page.ts +111 -0
- package/packages/registry/blocks/preview-03/cards/files-chat.ts +75 -0
- package/packages/registry/blocks/preview-03/cards/group-chat.ts +114 -0
- package/packages/registry/blocks/preview-03/cards/reasoning-chat.ts +88 -0
- package/packages/registry/blocks/preview-03/cards/simple-chat.ts +53 -0
- package/packages/registry/blocks/preview-03/components/chat-card.ts +126 -0
- package/packages/registry/blocks/preview-03/components/chat-player.ts +174 -0
- package/packages/registry/blocks/preview-03/components/part-file.ts +77 -0
- package/packages/registry/blocks/preview-03/components/part-reasoning.ts +25 -0
- package/packages/registry/blocks/preview-03/components/part-source.ts +48 -0
- package/packages/registry/blocks/preview-03/components/part-text.ts +69 -0
- package/packages/registry/blocks/preview-03/components/part-tool.ts +71 -0
- package/packages/registry/blocks/preview-03/components/prompt-input.ts +86 -0
- package/packages/registry/blocks/preview-03/page.ts +39 -0
- package/packages/registry/blocks/sidebar-01/components/app-sidebar.ts +113 -0
- package/packages/registry/blocks/sidebar-01/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-01/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-01/page.ts +58 -0
- package/packages/registry/blocks/sidebar-02/components/app-sidebar.ts +131 -0
- package/packages/registry/blocks/sidebar-02/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-02/components/version-switcher.ts +50 -0
- package/packages/registry/blocks/sidebar-02/page.ts +53 -0
- package/packages/registry/blocks/sidebar-03/components/app-sidebar.ts +134 -0
- package/packages/registry/blocks/sidebar-03/page.ts +60 -0
- package/packages/registry/blocks/sidebar-04/components/app-sidebar.ts +136 -0
- package/packages/registry/blocks/sidebar-04/page.ts +58 -0
- package/packages/registry/blocks/sidebar-05/components/app-sidebar.ts +147 -0
- package/packages/registry/blocks/sidebar-05/components/search-form.ts +33 -0
- package/packages/registry/blocks/sidebar-05/page.ts +58 -0
- package/packages/registry/blocks/sidebar-06/components/app-sidebar.ts +105 -0
- package/packages/registry/blocks/sidebar-06/components/nav-main.ts +56 -0
- package/packages/registry/blocks/sidebar-06/components/sidebar-opt-in-form.ts +44 -0
- package/packages/registry/blocks/sidebar-06/page.ts +57 -0
- package/packages/registry/blocks/sidebar-07/components/app-sidebar.ts +108 -0
- package/packages/registry/blocks/sidebar-07/components/nav-main.ts +61 -0
- package/packages/registry/blocks/sidebar-07/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-07/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-07/components/team-switcher.ts +66 -0
- package/packages/registry/blocks/sidebar-07/page.ts +59 -0
- package/packages/registry/blocks/sidebar-08/components/app-sidebar.ts +122 -0
- package/packages/registry/blocks/sidebar-08/components/nav-main.ts +68 -0
- package/packages/registry/blocks/sidebar-08/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-08/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-08/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-08/page.ts +59 -0
- package/packages/registry/blocks/sidebar-09/components/app-sidebar.ts +213 -0
- package/packages/registry/blocks/sidebar-09/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-09/page.ts +52 -0
- package/packages/registry/blocks/sidebar-10/components/app-sidebar.ts +125 -0
- package/packages/registry/blocks/sidebar-10/components/nav-actions.ts +84 -0
- package/packages/registry/blocks/sidebar-10/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-10/components/nav-main.ts +37 -0
- package/packages/registry/blocks/sidebar-10/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-10/components/nav-workspaces.ts +78 -0
- package/packages/registry/blocks/sidebar-10/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-10/page.ts +46 -0
- package/packages/registry/blocks/sidebar-11/components/app-sidebar.ts +114 -0
- package/packages/registry/blocks/sidebar-11/page.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/app-sidebar.ts +63 -0
- package/packages/registry/blocks/sidebar-12/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-12/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-12/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-12/page.ts +43 -0
- package/packages/registry/blocks/sidebar-13/components/settings-dialog.ts +114 -0
- package/packages/registry/blocks/sidebar-13/page.ts +21 -0
- package/packages/registry/blocks/sidebar-14/components/app-sidebar.ts +120 -0
- package/packages/registry/blocks/sidebar-14/page.ts +55 -0
- package/packages/registry/blocks/sidebar-15/components/calendars.ts +53 -0
- package/packages/registry/blocks/sidebar-15/components/date-picker.ts +26 -0
- package/packages/registry/blocks/sidebar-15/components/nav-favorites.ts +66 -0
- package/packages/registry/blocks/sidebar-15/components/nav-main.ts +35 -0
- package/packages/registry/blocks/sidebar-15/components/nav-secondary.ts +43 -0
- package/packages/registry/blocks/sidebar-15/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-15/components/nav-workspaces.ts +75 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-left.ts +126 -0
- package/packages/registry/blocks/sidebar-15/components/sidebar-right.ts +62 -0
- package/packages/registry/blocks/sidebar-15/components/team-switcher.ts +63 -0
- package/packages/registry/blocks/sidebar-15/page.ts +47 -0
- package/packages/registry/blocks/sidebar-16/components/app-sidebar.ts +124 -0
- package/packages/registry/blocks/sidebar-16/components/nav-main.ts +67 -0
- package/packages/registry/blocks/sidebar-16/components/nav-projects.ts +65 -0
- package/packages/registry/blocks/sidebar-16/components/nav-secondary.ts +40 -0
- package/packages/registry/blocks/sidebar-16/components/nav-user.ts +70 -0
- package/packages/registry/blocks/sidebar-16/components/search-form.ts +27 -0
- package/packages/registry/blocks/sidebar-16/components/site-header.ts +42 -0
- package/packages/registry/blocks/sidebar-16/page.ts +38 -0
- package/packages/registry/blocks/signup-01/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-01/page.ts +19 -0
- package/packages/registry/blocks/signup-02/components/signup-form.ts +78 -0
- package/packages/registry/blocks/signup-02/page.ts +36 -0
- package/packages/registry/blocks/signup-03/components/signup-form.ts +79 -0
- package/packages/registry/blocks/signup-03/page.ts +28 -0
- package/packages/registry/blocks/signup-04/components/signup-form.ts +100 -0
- package/packages/registry/blocks/signup-04/page.ts +20 -0
- package/packages/registry/blocks/signup-05/components/signup-form.ts +75 -0
- package/packages/registry/blocks/signup-05/page.ts +20 -0
- package/packages/registry/components/accordion.ts +20 -7
- package/packages/registry/components/alert-dialog.ts +58 -13
- package/packages/registry/components/alert.ts +11 -6
- package/packages/registry/components/attachment.ts +119 -0
- package/packages/registry/components/avatar.ts +17 -8
- package/packages/registry/components/badge.ts +16 -9
- package/packages/registry/components/breadcrumb.ts +6 -6
- package/packages/registry/components/bubble.ts +95 -0
- package/packages/registry/components/button-group.ts +73 -0
- package/packages/registry/components/button.ts +35 -25
- package/packages/registry/components/calendar.ts +566 -0
- package/packages/registry/components/card.ts +8 -8
- package/packages/registry/components/carousel.ts +352 -0
- package/packages/registry/components/chart-element.ts +547 -0
- package/packages/registry/components/chart-geometry.ts +457 -0
- package/packages/registry/components/chart.ts +932 -0
- package/packages/registry/components/checkbox.ts +22 -84
- package/packages/registry/components/code-block.ts +191 -0
- package/packages/registry/components/collapsible.ts +5 -2
- package/packages/registry/components/combobox.ts +802 -0
- package/packages/registry/components/command.ts +618 -0
- package/packages/registry/components/context-menu.ts +302 -0
- package/packages/registry/components/dialog.ts +156 -45
- package/packages/registry/components/direction.ts +43 -0
- package/packages/registry/components/drawer.ts +226 -0
- package/packages/registry/components/dropdown-menu.ts +262 -83
- package/packages/registry/components/empty.ts +88 -0
- package/packages/registry/components/field.ts +165 -0
- package/packages/registry/components/floating.ts +124 -0
- package/packages/registry/components/hover-card.ts +19 -8
- package/packages/registry/components/input-group.ts +118 -0
- package/packages/registry/components/input-otp.ts +365 -0
- package/packages/registry/components/input.ts +3 -3
- package/packages/registry/components/item.ts +134 -0
- package/packages/registry/components/kbd.ts +2 -2
- package/packages/registry/components/label.ts +1 -1
- package/packages/registry/components/marker.ts +63 -0
- package/packages/registry/components/menubar.ts +388 -0
- package/packages/registry/components/message-scroller.ts +470 -0
- package/packages/registry/components/message.ts +69 -0
- package/packages/registry/components/native-select.ts +5 -5
- package/packages/registry/components/navigation-menu.ts +564 -0
- package/packages/registry/components/pagination.ts +5 -5
- package/packages/registry/components/popover.ts +30 -84
- package/packages/registry/components/progress.ts +7 -3
- package/packages/registry/components/questionnaire.ts +840 -0
- package/packages/registry/components/radio-group.ts +18 -73
- package/packages/registry/components/resizable.ts +330 -0
- package/packages/registry/components/scroll-area.ts +46 -0
- package/packages/registry/components/select.ts +650 -0
- package/packages/registry/components/separator.ts +1 -1
- package/packages/registry/components/sheet.ts +128 -0
- package/packages/registry/components/sidebar.ts +457 -0
- package/packages/registry/components/skeleton.ts +1 -1
- package/packages/registry/components/slider.ts +333 -0
- package/packages/registry/components/sonner.ts +74 -7
- package/packages/registry/components/spinner.ts +66 -0
- package/packages/registry/components/switch.ts +117 -9
- package/packages/registry/components/table.ts +11 -9
- package/packages/registry/components/tabs.ts +76 -25
- package/packages/registry/components/textarea.ts +1 -1
- package/packages/registry/components/toggle-group.ts +30 -11
- package/packages/registry/components/toggle.ts +20 -13
- package/packages/registry/components/tooltip.ts +68 -7
- package/packages/registry/components/trace.ts +75 -0
- package/packages/registry/lib/icons-hugeicons.ts +955 -0
- package/packages/registry/lib/icons-phosphor.ts +955 -0
- package/packages/registry/lib/icons-remixicon.ts +955 -0
- package/packages/registry/lib/icons-tabler.ts +955 -0
- package/packages/registry/lib/icons.ts +768 -0
- package/packages/registry/lib/utils.ts +49 -4
- package/packages/registry/registry.json +4092 -60
- package/packages/registry/styles/shadcn-tailwind.css +654 -0
- package/packages/registry/styles/style-luma.css +1987 -0
- package/packages/registry/styles/style-lyra.css +1965 -0
- package/packages/registry/styles/style-maia.css +1987 -0
- package/packages/registry/styles/style-mira.css +1992 -0
- package/packages/registry/styles/style-new-york.css +1597 -0
- package/packages/registry/styles/style-nova.css +1990 -0
- package/packages/registry/styles/style-rhea.css +1987 -0
- package/packages/registry/styles/style-sera.css +1977 -0
- package/packages/registry/styles/style-vega.css +1990 -0
- package/packages/registry/styles/supplement.json +54 -0
- package/packages/registry/styles/tw-animate.css +6 -0
- package/packages/registry/themes/base-colors.js +8 -2
- package/packages/registry/themes/fonts.js +120 -0
- package/packages/registry/themes/index.css +2 -0
- package/packages/registry/themes/items.js +61 -0
- package/packages/registry/themes/preset.js +302 -0
- package/packages/registry/themes/themes.js +1193 -0
- package/src/commands/add.js +236 -12
- package/src/commands/diff.js +34 -20
- package/src/commands/info.js +7 -0
- package/src/commands/init.js +125 -8
- package/src/commands/list.js +43 -11
- package/src/commands/view.js +33 -5
- package/src/registry/extract.js +192 -2
- package/src/registry/icons.js +31 -0
- package/src/registry/local.js +15 -1
- package/src/registry/schema.js +13 -0
- package/src/registry/style-bake.js +506 -0
- package/src/utils/theme.js +110 -21
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drawer: a panel that slides up from the bottom (or in from another edge)
|
|
3
|
+
* and can be dragged away, the mobile pattern shadcn builds on vaul. Tier-2.
|
|
4
|
+
* Like the sheet it IS a dialog: the native `<dialog>` opened with
|
|
5
|
+
* `showModal()`, its focus trap, Escape and backdrop close, focus
|
|
6
|
+
* restoration, scroll lock and label wiring. What the drawer adds is the
|
|
7
|
+
* drag handle and drag-to-dismiss on Pointer Events, with no library.
|
|
8
|
+
*
|
|
9
|
+
* shadcn parity:
|
|
10
|
+
* Drawer → <ui-drawer open>
|
|
11
|
+
* DrawerTrigger → <ui-drawer-trigger>
|
|
12
|
+
* DrawerContent (direction: bottom | top | left | right)
|
|
13
|
+
* → <ui-drawer-content direction="bottom">
|
|
14
|
+
* DrawerClose → <ui-drawer-close>
|
|
15
|
+
* DrawerHeader / DrawerFooter
|
|
16
|
+
* → <div class=${drawerHeaderClass()}> / <div class=${drawerFooterClass()}>
|
|
17
|
+
* DrawerTitle / DrawerDescription
|
|
18
|
+
* → <h2 data-slot="drawer-title" class=${drawerTitleClass()}> /
|
|
19
|
+
* <p data-slot="drawer-description" class=${drawerDescriptionClass()}>
|
|
20
|
+
*
|
|
21
|
+
* The panel carries `data-vaul-drawer-direction`, the attribute shadcn's
|
|
22
|
+
* drawer styles key on, so every ported style applies to it unchanged.
|
|
23
|
+
*
|
|
24
|
+
* Dragging the panel toward its edge moves it with the pointer; releasing it
|
|
25
|
+
* past a quarter of its size, or with a quick flick, closes the drawer, and
|
|
26
|
+
* anything less snaps it back. A drag never starts on a control inside the
|
|
27
|
+
* panel (a button, a field, a link), so those keep working.
|
|
28
|
+
*
|
|
29
|
+
* A11y (handled by the element, plus one obligation): the native `<dialog>`
|
|
30
|
+
* carries `role="dialog"`, is named by the `drawer-title` node and described
|
|
31
|
+
* by the `drawer-description` node, traps focus while open and returns it to
|
|
32
|
+
* the trigger. Dragging is a pointer convenience only; Escape, the backdrop
|
|
33
|
+
* and a close control are the ways everyone else closes it, so put a visible
|
|
34
|
+
* close button (a `<ui-drawer-close>` around a real `<button>`) in every
|
|
35
|
+
* drawer. The drag handle is decorative and hidden from assistive technology.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```html
|
|
39
|
+
* <ui-drawer>
|
|
40
|
+
* <ui-drawer-trigger><button class=${buttonClass({ variant: 'outline' })} type="button">Share</button></ui-drawer-trigger>
|
|
41
|
+
* <ui-drawer-content>
|
|
42
|
+
* <div class=${drawerHeaderClass()}>
|
|
43
|
+
* <h2 data-slot="drawer-title" class=${drawerTitleClass()}>Share this page</h2>
|
|
44
|
+
* </div>
|
|
45
|
+
* <div class=${drawerFooterClass()}>
|
|
46
|
+
* <ui-drawer-close><button class=${buttonClass({ variant: 'outline' })} type="button">Done</button></ui-drawer-close>
|
|
47
|
+
* </div>
|
|
48
|
+
* </ui-drawer-content>
|
|
49
|
+
* </ui-drawer>
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
import { html } from '@webjsdev/core';
|
|
53
|
+
import { UiDialog, UiDialogTrigger, UiDialogContent, UiDialogClose } from './dialog.ts';
|
|
54
|
+
|
|
55
|
+
export type DrawerDirection = 'bottom' | 'top' | 'left' | 'right';
|
|
56
|
+
|
|
57
|
+
/** The visible panel. The element applies it; exported for a custom shell. */
|
|
58
|
+
export function drawerContentClass(): string {
|
|
59
|
+
return 'cn-drawer-content group/drawer-content fixed z-50 data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** The drag handle at the top of a bottom drawer. The element renders it. */
|
|
63
|
+
/** The overlay behind the panel, which each style dims in its own way. */
|
|
64
|
+
export function drawerOverlayClass(): string {
|
|
65
|
+
return 'cn-drawer-overlay fixed inset-0 z-50 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function drawerHandleClass(): string {
|
|
69
|
+
return 'cn-drawer-handle mx-auto hidden shrink-0 group-data-[vaul-drawer-direction=bottom]/drawer-content:block';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** The title and description block. */
|
|
73
|
+
export function drawerHeaderClass(): string {
|
|
74
|
+
return 'cn-drawer-header flex flex-col group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** The actions block, pushed to the bottom. */
|
|
78
|
+
export function drawerFooterClass(): string {
|
|
79
|
+
return 'cn-drawer-footer mt-auto flex flex-col';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** The drawer's title. Mark it `data-slot="drawer-title"` so the drawer is named by it. */
|
|
83
|
+
export function drawerTitleClass(): string {
|
|
84
|
+
return 'cn-drawer-title cn-font-heading';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** The drawer's description. Mark it `data-slot="drawer-description"`. */
|
|
88
|
+
export function drawerDescriptionClass(): string {
|
|
89
|
+
return 'cn-drawer-description';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export class UiDrawer extends UiDialog {
|
|
93
|
+
static rootTag = 'ui-drawer';
|
|
94
|
+
static contentTag = 'ui-drawer-content';
|
|
95
|
+
static slotPrefix = 'drawer';
|
|
96
|
+
}
|
|
97
|
+
UiDrawer.register('ui-drawer');
|
|
98
|
+
|
|
99
|
+
export class UiDrawerTrigger extends UiDialogTrigger {
|
|
100
|
+
static rootTag = 'ui-drawer';
|
|
101
|
+
static slotPrefix = 'drawer';
|
|
102
|
+
}
|
|
103
|
+
UiDrawerTrigger.register('ui-drawer-trigger');
|
|
104
|
+
|
|
105
|
+
export class UiDrawerClose extends UiDialogClose {
|
|
106
|
+
static rootTag = 'ui-drawer';
|
|
107
|
+
static slotPrefix = 'drawer';
|
|
108
|
+
}
|
|
109
|
+
UiDrawerClose.register('ui-drawer-close');
|
|
110
|
+
|
|
111
|
+
// A drag past this share of the panel's size closes the drawer, as does a
|
|
112
|
+
// release faster than FLICK pixels per millisecond toward the edge.
|
|
113
|
+
const CLOSE_RATIO = 0.25;
|
|
114
|
+
const FLICK = 0.5;
|
|
115
|
+
const NO_DRAG = 'button, a[href], input, select, textarea, [contenteditable=""], [contenteditable="true"], [role="button"], [role="slider"]';
|
|
116
|
+
|
|
117
|
+
export class UiDrawerContent extends UiDialogContent {
|
|
118
|
+
static rootTag = 'ui-drawer';
|
|
119
|
+
static slotPrefix = 'drawer';
|
|
120
|
+
|
|
121
|
+
#drag: { id: number; start: number; at: number; delta: number; panel: HTMLElement } | null = null;
|
|
122
|
+
|
|
123
|
+
// `direction` is read straight from the attribute, like the sheet's side:
|
|
124
|
+
// the element is built on the dialog's factory base and an author writes it
|
|
125
|
+
// once. Attribute reads work during server rendering, so the first paint
|
|
126
|
+
// already carries the direction.
|
|
127
|
+
_direction(): DrawerDirection {
|
|
128
|
+
const d = this.getAttribute?.('direction');
|
|
129
|
+
return d === 'top' || d === 'left' || d === 'right' ? d : 'bottom';
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
_drawerDirection(): DrawerDirection {
|
|
133
|
+
return this._direction();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
_panelClass(): string {
|
|
137
|
+
return drawerContentClass();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
_overlayClass(): string {
|
|
141
|
+
return drawerOverlayClass();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
_panelLead(): unknown {
|
|
145
|
+
return html`<div data-slot="drawer-handle" aria-hidden="true" class=${drawerHandleClass()}></div>`;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// The drawer has no corner X: its handle, a close control the author places
|
|
149
|
+
// and Escape do that job, as in shadcn. Set in the constructor, which also
|
|
150
|
+
// runs during server rendering, so the first paint has no X to remove; an
|
|
151
|
+
// authored show-close-button attribute is applied after it and still wins.
|
|
152
|
+
constructor() {
|
|
153
|
+
super();
|
|
154
|
+
this.showCloseButton = 'false';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
connectedCallback(): void {
|
|
158
|
+
super.connectedCallback?.();
|
|
159
|
+
this.addEventListener('pointerdown', this._onPointerDown);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
disconnectedCallback(): void {
|
|
163
|
+
this.removeEventListener('pointerdown', this._onPointerDown);
|
|
164
|
+
super.disconnectedCallback?.();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** +1 when moving toward the closing edge increases the coordinate. */
|
|
168
|
+
_axis(): { key: 'clientX' | 'clientY'; sign: 1 | -1; size: 'offsetWidth' | 'offsetHeight' } {
|
|
169
|
+
const d = this._direction();
|
|
170
|
+
if (d === 'top') return { key: 'clientY', sign: -1, size: 'offsetHeight' };
|
|
171
|
+
if (d === 'left') return { key: 'clientX', sign: -1, size: 'offsetWidth' };
|
|
172
|
+
if (d === 'right') return { key: 'clientX', sign: 1, size: 'offsetWidth' };
|
|
173
|
+
return { key: 'clientY', sign: 1, size: 'offsetHeight' };
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
_translate(delta: number): string {
|
|
177
|
+
const d = this._direction();
|
|
178
|
+
const v = d === 'top' || d === 'left' ? -delta : delta;
|
|
179
|
+
return d === 'left' || d === 'right' ? `translateX(${v}px)` : `translateY(${v}px)`;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
_onPointerDown = (e: PointerEvent): void => {
|
|
183
|
+
if (e.button !== 0 || !this._parent()?.open) return;
|
|
184
|
+
const panel = this.querySelector<HTMLElement>('[data-slot="drawer-content"]');
|
|
185
|
+
const target = e.target as Element | null;
|
|
186
|
+
if (!panel || !target || !panel.contains(target)) return;
|
|
187
|
+
if (target.closest(NO_DRAG) && !target.closest('[data-slot="drawer-handle"]')) return;
|
|
188
|
+
const { key } = this._axis();
|
|
189
|
+
this.#drag = { id: e.pointerId, start: e[key], at: e.timeStamp, delta: 0, panel };
|
|
190
|
+
// Capture keeps the drag alive when the pointer leaves the panel. It throws
|
|
191
|
+
// for a pointer that is no longer active, which only costs that nicety.
|
|
192
|
+
try { panel.setPointerCapture(e.pointerId); } catch { /* not capturable */ }
|
|
193
|
+
panel.style.transition = 'none';
|
|
194
|
+
panel.addEventListener('pointermove', this._onPointerMove);
|
|
195
|
+
panel.addEventListener('pointerup', this._onPointerUp);
|
|
196
|
+
panel.addEventListener('pointercancel', this._onPointerUp);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
_onPointerMove = (e: PointerEvent): void => {
|
|
200
|
+
const drag = this.#drag;
|
|
201
|
+
if (!drag || e.pointerId !== drag.id) return;
|
|
202
|
+
const { key, sign } = this._axis();
|
|
203
|
+
// Only movement toward the closing edge moves the panel.
|
|
204
|
+
drag.delta = Math.max(0, (e[key] - drag.start) * sign);
|
|
205
|
+
drag.panel.style.transform = this._translate(drag.delta);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
_onPointerUp = (e: PointerEvent): void => {
|
|
209
|
+
const drag = this.#drag;
|
|
210
|
+
if (!drag || e.pointerId !== drag.id) return;
|
|
211
|
+
this.#drag = null;
|
|
212
|
+
const { panel, delta } = drag;
|
|
213
|
+
panel.removeEventListener('pointermove', this._onPointerMove);
|
|
214
|
+
panel.removeEventListener('pointerup', this._onPointerUp);
|
|
215
|
+
panel.removeEventListener('pointercancel', this._onPointerUp);
|
|
216
|
+
try { panel.releasePointerCapture(e.pointerId); } catch { /* already released */ }
|
|
217
|
+
const size = panel[this._axis().size] || 1;
|
|
218
|
+
const velocity = delta / Math.max(1, e.timeStamp - drag.at);
|
|
219
|
+
panel.style.transition = '';
|
|
220
|
+
panel.style.transform = '';
|
|
221
|
+
if (e.type !== 'pointercancel' && delta > 0 && (delta > size * CLOSE_RATIO || velocity > FLICK)) {
|
|
222
|
+
this._parent()?.hide();
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
UiDrawerContent.register('ui-drawer-content');
|