@nikala-ui/docs 0.12.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 +22 -0
- package/dist/cli/commands/build.d.ts +5 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +27 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/dev.d.ts +7 -0
- package/dist/cli/commands/dev.d.ts.map +1 -0
- package/dist/cli/commands/dev.js +32 -0
- package/dist/cli/commands/dev.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +308 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/preview.d.ts +7 -0
- package/dist/cli/commands/preview.d.ts.map +1 -0
- package/dist/cli/commands/preview.js +24 -0
- package/dist/cli/commands/preview.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +7 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +33 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +53 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/client/App.d.ts +5 -0
- package/dist/client/App.d.ts.map +1 -0
- package/dist/client/App.jsx +31 -0
- package/dist/client/App.jsx.map +1 -0
- package/dist/client/app-types.d.ts +14 -0
- package/dist/client/app-types.d.ts.map +1 -0
- package/dist/client/app-types.js +2 -0
- package/dist/client/app-types.js.map +1 -0
- package/dist/client/components/DocsLayoutShell.d.ts +21 -0
- package/dist/client/components/DocsLayoutShell.d.ts.map +1 -0
- package/dist/client/components/DocsLayoutShell.jsx +14 -0
- package/dist/client/components/DocsLayoutShell.jsx.map +1 -0
- package/dist/client/components/DocsPageContent.d.ts +9 -0
- package/dist/client/components/DocsPageContent.d.ts.map +1 -0
- package/dist/client/components/DocsPageContent.jsx +10 -0
- package/dist/client/components/DocsPageContent.jsx.map +1 -0
- package/dist/client/entry.d.ts +2 -0
- package/dist/client/entry.d.ts.map +1 -0
- package/dist/client/entry.jsx +28 -0
- package/dist/client/entry.jsx.map +1 -0
- package/dist/client/index.html +21 -0
- package/dist/client/navigation/page-navigation.d.ts +9 -0
- package/dist/client/navigation/page-navigation.d.ts.map +1 -0
- package/dist/client/navigation/page-navigation.js +51 -0
- package/dist/client/navigation/page-navigation.js.map +1 -0
- package/dist/client/routing/use-docs-router.d.ts +17 -0
- package/dist/client/routing/use-docs-router.d.ts.map +1 -0
- package/dist/client/routing/use-docs-router.js +71 -0
- package/dist/client/routing/use-docs-router.js.map +1 -0
- package/dist/client/ssr-entry.d.ts +3 -0
- package/dist/client/ssr-entry.d.ts.map +1 -0
- package/dist/client/ssr-entry.jsx +13 -0
- package/dist/client/ssr-entry.jsx.map +1 -0
- package/dist/client/style.css +183 -0
- package/dist/client/utils/sidebar.d.ts +2 -0
- package/dist/client/utils/sidebar.d.ts.map +1 -0
- package/dist/client/utils/sidebar.js +2 -0
- package/dist/client/utils/sidebar.js.map +1 -0
- package/dist/components/mdx-components.d.ts +34 -0
- package/dist/components/mdx-components.d.ts.map +1 -0
- package/dist/components/mdx-components.jsx +131 -0
- package/dist/components/mdx-components.jsx.map +1 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +105 -0
- package/dist/config.js.map +1 -0
- package/dist/core/content-scanner.d.ts +10 -0
- package/dist/core/content-scanner.d.ts.map +1 -0
- package/dist/core/content-scanner.js +153 -0
- package/dist/core/content-scanner.js.map +1 -0
- package/dist/core/route-tree.d.ts +19 -0
- package/dist/core/route-tree.d.ts.map +1 -0
- package/dist/core/route-tree.js +176 -0
- package/dist/core/route-tree.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +9 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/mdx/compiler.d.ts +13 -0
- package/dist/mdx/compiler.d.ts.map +1 -0
- package/dist/mdx/compiler.js +38 -0
- package/dist/mdx/compiler.js.map +1 -0
- package/dist/mdx/highlighter.d.ts +22 -0
- package/dist/mdx/highlighter.d.ts.map +1 -0
- package/dist/mdx/highlighter.js +139 -0
- package/dist/mdx/highlighter.js.map +1 -0
- package/dist/mdx/rehype-shiki.d.ts +3 -0
- package/dist/mdx/rehype-shiki.d.ts.map +1 -0
- package/dist/mdx/rehype-shiki.js +83 -0
- package/dist/mdx/rehype-shiki.js.map +1 -0
- package/dist/navigation/index.d.ts +2 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/navigation/sidebar-state.d.ts +6 -0
- package/dist/navigation/sidebar-state.d.ts.map +1 -0
- package/dist/navigation/sidebar-state.js +20 -0
- package/dist/navigation/sidebar-state.js.map +1 -0
- package/dist/navigation/sidebar-tree.d.ts +7 -0
- package/dist/navigation/sidebar-tree.d.ts.map +1 -0
- package/dist/navigation/sidebar-tree.js +11 -0
- package/dist/navigation/sidebar-tree.js.map +1 -0
- package/dist/registry/accordion.json +18 -0
- package/dist/registry/alert.json +18 -0
- package/dist/registry/api-table.json +21 -0
- package/dist/registry/aspect-ratio.json +17 -0
- package/dist/registry/avatar.json +17 -0
- package/dist/registry/badge.json +18 -0
- package/dist/registry/banner.json +19 -0
- package/dist/registry/breadcrumb.json +17 -0
- package/dist/registry/bubble.json +18 -0
- package/dist/registry/button-group.json +20 -0
- package/dist/registry/button.json +21 -0
- package/dist/registry/callout.json +19 -0
- package/dist/registry/card.json +17 -0
- package/dist/registry/checkbox.json +20 -0
- package/dist/registry/code-block.json +26 -0
- package/dist/registry/code-group.json +20 -0
- package/dist/registry/collapsible.json +18 -0
- package/dist/registry/combobox.json +21 -0
- package/dist/registry/command.json +27 -0
- package/dist/registry/component-viewer.json +25 -0
- package/dist/registry/container.json +18 -0
- package/dist/registry/context-menu.json +24 -0
- package/dist/registry/create-active-element.json +13 -0
- package/dist/registry/create-app-updater.json +13 -0
- package/dist/registry/create-audio.json +7 -0
- package/dist/registry/create-battery.json +13 -0
- package/dist/registry/create-chat-scroll.json +13 -0
- package/dist/registry/create-click-outside.json +13 -0
- package/dist/registry/create-clipboard.json +13 -0
- package/dist/registry/create-color-mode.json +13 -0
- package/dist/registry/create-controllable-signal.json +13 -0
- package/dist/registry/create-debounce.json +13 -0
- package/dist/registry/create-disclosure.json +13 -0
- package/dist/registry/create-document-tabs.json +13 -0
- package/dist/registry/create-document-title.json +13 -0
- package/dist/registry/create-drop-zone.json +13 -0
- package/dist/registry/create-event-source.json +13 -0
- package/dist/registry/create-favicon.json +13 -0
- package/dist/registry/create-fetch.json +13 -0
- package/dist/registry/create-focus-trap.json +13 -0
- package/dist/registry/create-form.json +13 -0
- package/dist/registry/create-fullscreen.json +13 -0
- package/dist/registry/create-geolocation.json +13 -0
- package/dist/registry/create-global-shortcut.json +13 -0
- package/dist/registry/create-hover.json +13 -0
- package/dist/registry/create-idle.json +13 -0
- package/dist/registry/create-infinite-scroll.json +13 -0
- package/dist/registry/create-input-mask.json +13 -0
- package/dist/registry/create-intersection-observer.json +13 -0
- package/dist/registry/create-keybindings.json +13 -0
- package/dist/registry/create-lock-scroll.json +13 -0
- package/dist/registry/create-long-press.json +13 -0
- package/dist/registry/create-media-query.json +13 -0
- package/dist/registry/create-mouse-position.json +13 -0
- package/dist/registry/create-network-status.json +13 -0
- package/dist/registry/create-orientation.json +13 -0
- package/dist/registry/create-pagination.json +13 -0
- package/dist/registry/create-permission.json +13 -0
- package/dist/registry/create-previous.json +13 -0
- package/dist/registry/create-resize-observer.json +13 -0
- package/dist/registry/create-scroll-into-view.json +13 -0
- package/dist/registry/create-scroll-position.json +13 -0
- package/dist/registry/create-storage.json +13 -0
- package/dist/registry/create-tauri-window.json +13 -0
- package/dist/registry/create-timer.json +13 -0
- package/dist/registry/create-tiptap-editor.json +34 -0
- package/dist/registry/create-undo-redo.json +13 -0
- package/dist/registry/create-web-notification.json +13 -0
- package/dist/registry/create-websocket.json +13 -0
- package/dist/registry/create-window-size.json +13 -0
- package/dist/registry/dialog.json +21 -0
- package/dist/registry/dropdown-menu.json +22 -0
- package/dist/registry/dropzone.json +21 -0
- package/dist/registry/empty.json +17 -0
- package/dist/registry/field.json +20 -0
- package/dist/registry/file-tree.json +21 -0
- package/dist/registry/footer.json +18 -0
- package/dist/registry/forgot-password-01.json +28 -0
- package/dist/registry/form-message.json +17 -0
- package/dist/registry/form.json +17 -0
- package/dist/registry/hero-01.json +22 -0
- package/dist/registry/hover-card.json +18 -0
- package/dist/registry/icon-button.json +20 -0
- package/dist/registry/index.json +1489 -0
- package/dist/registry/input-group.json +21 -0
- package/dist/registry/input.json +17 -0
- package/dist/registry/kbd.json +18 -0
- package/dist/registry/label.json +18 -0
- package/dist/registry/list.json +20 -0
- package/dist/registry/login-01.json +28 -0
- package/dist/registry/logo.json +17 -0
- package/dist/registry/marker.json +17 -0
- package/dist/registry/marquee.json +17 -0
- package/dist/registry/message.json +17 -0
- package/dist/registry/navbar.json +19 -0
- package/dist/registry/navigation-menu.json +22 -0
- package/dist/registry/number-input.json +24 -0
- package/dist/registry/otp-verification-01.json +26 -0
- package/dist/registry/package-manager-tabs.json +24 -0
- package/dist/registry/pager.json +21 -0
- package/dist/registry/pagination.json +22 -0
- package/dist/registry/pin-input.json +17 -0
- package/dist/registry/popover.json +22 -0
- package/dist/registry/progress.json +18 -0
- package/dist/registry/radio-group.json +18 -0
- package/dist/registry/rating.json +19 -0
- package/dist/registry/register-01.json +31 -0
- package/dist/registry/resizable.json +21 -0
- package/dist/registry/review-card.json +23 -0
- package/dist/registry/rich-text-editor.json +95 -0
- package/dist/registry/scroll-area.json +21 -0
- package/dist/registry/section-heading.json +21 -0
- package/dist/registry/select.json +22 -0
- package/dist/registry/separator.json +17 -0
- package/dist/registry/sheet.json +22 -0
- package/dist/registry/sidebar.json +24 -0
- package/dist/registry/skeleton.json +17 -0
- package/dist/registry/slider.json +18 -0
- package/dist/registry/spinner.json +18 -0
- package/dist/registry/stat.json +19 -0
- package/dist/registry/status.json +18 -0
- package/dist/registry/steps.json +20 -0
- package/dist/registry/switch.json +20 -0
- package/dist/registry/table-of-contents.json +23 -0
- package/dist/registry/table.json +17 -0
- package/dist/registry/tabs.json +20 -0
- package/dist/registry/textarea.json +17 -0
- package/dist/registry/theme-manager.json +39 -0
- package/dist/registry/timeline.json +18 -0
- package/dist/registry/titlebar-tabs.json +24 -0
- package/dist/registry/titlebar.json +26 -0
- package/dist/registry/toast.json +20 -0
- package/dist/registry/toggle-group.json +21 -0
- package/dist/registry/toggle.json +18 -0
- package/dist/registry/tooltip.json +18 -0
- package/dist/registry/updater-modal.json +26 -0
- package/dist/server/index.d.ts +18 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +526 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/plugin.d.ts +10 -0
- package/dist/server/plugin.d.ts.map +1 -0
- package/dist/server/plugin.js +271 -0
- package/dist/server/plugin.js.map +1 -0
- package/dist/themes/default/content/breadcrumbs.d.ts +4 -0
- package/dist/themes/default/content/breadcrumbs.d.ts.map +1 -0
- package/dist/themes/default/content/breadcrumbs.jsx +31 -0
- package/dist/themes/default/content/breadcrumbs.jsx.map +1 -0
- package/dist/themes/default/content/pager.d.ts +5 -0
- package/dist/themes/default/content/pager.d.ts.map +1 -0
- package/dist/themes/default/content/pager.jsx +9 -0
- package/dist/themes/default/content/pager.jsx.map +1 -0
- package/dist/themes/default/content/table-of-contents.d.ts +4 -0
- package/dist/themes/default/content/table-of-contents.d.ts.map +1 -0
- package/dist/themes/default/content/table-of-contents.jsx +19 -0
- package/dist/themes/default/content/table-of-contents.jsx.map +1 -0
- package/dist/themes/default/index.d.ts +11 -0
- package/dist/themes/default/index.d.ts.map +1 -0
- package/dist/themes/default/index.js +30 -0
- package/dist/themes/default/index.js.map +1 -0
- package/dist/themes/default/layout.d.ts +4 -0
- package/dist/themes/default/layout.d.ts.map +1 -0
- package/dist/themes/default/layout.jsx +75 -0
- package/dist/themes/default/layout.jsx.map +1 -0
- package/dist/themes/default/navbar.d.ts +4 -0
- package/dist/themes/default/navbar.d.ts.map +1 -0
- package/dist/themes/default/navbar.jsx +74 -0
- package/dist/themes/default/navbar.jsx.map +1 -0
- package/dist/themes/default/navigation/mobile-table-of-contents.d.ts +4 -0
- package/dist/themes/default/navigation/mobile-table-of-contents.d.ts.map +1 -0
- package/dist/themes/default/navigation/mobile-table-of-contents.jsx +22 -0
- package/dist/themes/default/navigation/mobile-table-of-contents.jsx.map +1 -0
- package/dist/themes/default/navigation/sidebar-tree.d.ts +8 -0
- package/dist/themes/default/navigation/sidebar-tree.d.ts.map +1 -0
- package/dist/themes/default/navigation/sidebar-tree.jsx +100 -0
- package/dist/themes/default/navigation/sidebar-tree.jsx.map +1 -0
- package/dist/themes/default/overlays/search-dialog.d.ts +4 -0
- package/dist/themes/default/overlays/search-dialog.d.ts.map +1 -0
- package/dist/themes/default/overlays/search-dialog.jsx +34 -0
- package/dist/themes/default/overlays/search-dialog.jsx.map +1 -0
- package/dist/themes/default/sidebar.d.ts +4 -0
- package/dist/themes/default/sidebar.d.ts.map +1 -0
- package/dist/themes/default/sidebar.jsx +60 -0
- package/dist/themes/default/sidebar.jsx.map +1 -0
- package/dist/themes/index.d.ts +4 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +5 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/types.d.ts +83 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/themes/types.js +2 -0
- package/dist/themes/types.js.map +1 -0
- package/dist/types.d.ts +97 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/vendor/core-src/index.css +11 -0
- package/dist/vendor/core-src/index.ts +48 -0
- package/dist/vendor/core-src/lib/cn.ts +9 -0
- package/dist/vendor/core-src/registry/blocks/forgot-password-01.tsx +141 -0
- package/dist/vendor/core-src/registry/blocks/hero-01.tsx +28 -0
- package/dist/vendor/core-src/registry/blocks/login-01.tsx +231 -0
- package/dist/vendor/core-src/registry/blocks/otp-verification-01.tsx +170 -0
- package/dist/vendor/core-src/registry/blocks/register-01.tsx +318 -0
- package/dist/vendor/core-src/registry/components/ui/accordion.tsx +128 -0
- package/dist/vendor/core-src/registry/components/ui/alert.tsx +155 -0
- package/dist/vendor/core-src/registry/components/ui/api-table.tsx +117 -0
- package/dist/vendor/core-src/registry/components/ui/aspect-ratio.tsx +31 -0
- package/dist/vendor/core-src/registry/components/ui/avatar.tsx +114 -0
- package/dist/vendor/core-src/registry/components/ui/badge.tsx +56 -0
- package/dist/vendor/core-src/registry/components/ui/banner.tsx +187 -0
- package/dist/vendor/core-src/registry/components/ui/breadcrumb.tsx +136 -0
- package/dist/vendor/core-src/registry/components/ui/bubble.tsx +142 -0
- package/dist/vendor/core-src/registry/components/ui/button-group.tsx +42 -0
- package/dist/vendor/core-src/registry/components/ui/button.tsx +82 -0
- package/dist/vendor/core-src/registry/components/ui/callout.tsx +137 -0
- package/dist/vendor/core-src/registry/components/ui/card.tsx +113 -0
- package/dist/vendor/core-src/registry/components/ui/checkbox.tsx +74 -0
- package/dist/vendor/core-src/registry/components/ui/code-block.tsx +326 -0
- package/dist/vendor/core-src/registry/components/ui/code-group.tsx +105 -0
- package/dist/vendor/core-src/registry/components/ui/collapsible.tsx +73 -0
- package/dist/vendor/core-src/registry/components/ui/combobox.tsx +299 -0
- package/dist/vendor/core-src/registry/components/ui/command.tsx +378 -0
- package/dist/vendor/core-src/registry/components/ui/component-viewer.tsx +363 -0
- package/dist/vendor/core-src/registry/components/ui/container.tsx +45 -0
- package/dist/vendor/core-src/registry/components/ui/context-menu.tsx +237 -0
- package/dist/vendor/core-src/registry/components/ui/dialog.tsx +200 -0
- package/dist/vendor/core-src/registry/components/ui/dropdown-menu.tsx +298 -0
- package/dist/vendor/core-src/registry/components/ui/dropzone.tsx +189 -0
- package/dist/vendor/core-src/registry/components/ui/empty.tsx +83 -0
- package/dist/vendor/core-src/registry/components/ui/field.tsx +71 -0
- package/dist/vendor/core-src/registry/components/ui/file-tree.tsx +181 -0
- package/dist/vendor/core-src/registry/components/ui/footer.tsx +247 -0
- package/dist/vendor/core-src/registry/components/ui/form-message.tsx +36 -0
- package/dist/vendor/core-src/registry/components/ui/form.tsx +21 -0
- package/dist/vendor/core-src/registry/components/ui/hover-card.tsx +105 -0
- package/dist/vendor/core-src/registry/components/ui/icon-button.tsx +34 -0
- package/dist/vendor/core-src/registry/components/ui/input-group.tsx +80 -0
- package/dist/vendor/core-src/registry/components/ui/input.tsx +28 -0
- package/dist/vendor/core-src/registry/components/ui/kbd.tsx +73 -0
- package/dist/vendor/core-src/registry/components/ui/label.tsx +30 -0
- package/dist/vendor/core-src/registry/components/ui/list.tsx +222 -0
- package/dist/vendor/core-src/registry/components/ui/logo.tsx +68 -0
- package/dist/vendor/core-src/registry/components/ui/marker.tsx +102 -0
- package/dist/vendor/core-src/registry/components/ui/marquee.tsx +118 -0
- package/dist/vendor/core-src/registry/components/ui/message.tsx +168 -0
- package/dist/vendor/core-src/registry/components/ui/navbar.tsx +375 -0
- package/dist/vendor/core-src/registry/components/ui/navigation-menu.tsx +358 -0
- package/dist/vendor/core-src/registry/components/ui/number-input.tsx +150 -0
- package/dist/vendor/core-src/registry/components/ui/package-manager-tabs.tsx +226 -0
- package/dist/vendor/core-src/registry/components/ui/pager.tsx +102 -0
- package/dist/vendor/core-src/registry/components/ui/pagination.tsx +258 -0
- package/dist/vendor/core-src/registry/components/ui/pin-input.tsx +198 -0
- package/dist/vendor/core-src/registry/components/ui/popover.tsx +90 -0
- package/dist/vendor/core-src/registry/components/ui/progress.tsx +66 -0
- package/dist/vendor/core-src/registry/components/ui/radio-group.tsx +95 -0
- package/dist/vendor/core-src/registry/components/ui/rating.tsx +185 -0
- package/dist/vendor/core-src/registry/components/ui/resizable.tsx +195 -0
- package/dist/vendor/core-src/registry/components/ui/review-card.tsx +195 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/bubble-menu.tsx +236 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/editor.tsx +308 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/extensions.ts +116 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/footer.tsx +36 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/image-dialog.tsx +75 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/index.ts +11 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/link-dialog.tsx +48 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/markdown.ts +170 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/slash-command.tsx +301 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/table-controls.tsx +68 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/toolbar.tsx +465 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/use-editor.ts +231 -0
- package/dist/vendor/core-src/registry/components/ui/scroll-area.tsx +228 -0
- package/dist/vendor/core-src/registry/components/ui/section-heading.tsx +108 -0
- package/dist/vendor/core-src/registry/components/ui/select.tsx +156 -0
- package/dist/vendor/core-src/registry/components/ui/separator.tsx +37 -0
- package/dist/vendor/core-src/registry/components/ui/sheet.tsx +220 -0
- package/dist/vendor/core-src/registry/components/ui/sidebar.tsx +692 -0
- package/dist/vendor/core-src/registry/components/ui/skeleton.tsx +24 -0
- package/dist/vendor/core-src/registry/components/ui/slider.tsx +153 -0
- package/dist/vendor/core-src/registry/components/ui/spinner.tsx +41 -0
- package/dist/vendor/core-src/registry/components/ui/stat.tsx +245 -0
- package/dist/vendor/core-src/registry/components/ui/status.tsx +121 -0
- package/dist/vendor/core-src/registry/components/ui/steps.tsx +198 -0
- package/dist/vendor/core-src/registry/components/ui/switch.tsx +68 -0
- package/dist/vendor/core-src/registry/components/ui/table-of-contents.tsx +131 -0
- package/dist/vendor/core-src/registry/components/ui/table.tsx +160 -0
- package/dist/vendor/core-src/registry/components/ui/tabs.tsx +204 -0
- package/dist/vendor/core-src/registry/components/ui/textarea.tsx +82 -0
- package/dist/vendor/core-src/registry/components/ui/theme-toggle.tsx +238 -0
- package/dist/vendor/core-src/registry/components/ui/timeline.tsx +350 -0
- package/dist/vendor/core-src/registry/components/ui/titlebar-tabs.tsx +773 -0
- package/dist/vendor/core-src/registry/components/ui/titlebar.tsx +468 -0
- package/dist/vendor/core-src/registry/components/ui/toast.tsx +124 -0
- package/dist/vendor/core-src/registry/components/ui/toggle-group.tsx +203 -0
- package/dist/vendor/core-src/registry/components/ui/toggle.tsx +101 -0
- package/dist/vendor/core-src/registry/components/ui/tooltip.tsx +41 -0
- package/dist/vendor/core-src/registry/components/ui/updater-modal.tsx +254 -0
- package/dist/vendor/core-src/registry/index.ts +50 -0
- package/dist/vendor/core-src/registry/metadata.ts +742 -0
- package/dist/vendor/core-src/registry/providers/theme-provider.tsx +216 -0
- package/dist/vendor/core-src/registry/providers/theme-script.tsx +78 -0
- package/dist/vendor/core-src/registry/providers/theme-transitions.ts +139 -0
- package/dist/vendor/hooks-src/create-active-element.ts +51 -0
- package/dist/vendor/hooks-src/create-app-updater.ts +272 -0
- package/dist/vendor/hooks-src/create-audio-video.ts +444 -0
- package/dist/vendor/hooks-src/create-battery.ts +78 -0
- package/dist/vendor/hooks-src/create-chat-scroll.ts +113 -0
- package/dist/vendor/hooks-src/create-click-outside.ts +82 -0
- package/dist/vendor/hooks-src/create-clipboard.ts +69 -0
- package/dist/vendor/hooks-src/create-color-mode.ts +115 -0
- package/dist/vendor/hooks-src/create-controllable-signal.ts +56 -0
- package/dist/vendor/hooks-src/create-debounce.ts +90 -0
- package/dist/vendor/hooks-src/create-disclosure.ts +82 -0
- package/dist/vendor/hooks-src/create-document-tabs.ts +267 -0
- package/dist/vendor/hooks-src/create-document-title.ts +33 -0
- package/dist/vendor/hooks-src/create-drop-zone.ts +317 -0
- package/dist/vendor/hooks-src/create-event-source.ts +126 -0
- package/dist/vendor/hooks-src/create-favicon.ts +52 -0
- package/dist/vendor/hooks-src/create-fetch.ts +93 -0
- package/dist/vendor/hooks-src/create-focus-trap.ts +94 -0
- package/dist/vendor/hooks-src/create-form.ts +200 -0
- package/dist/vendor/hooks-src/create-fullscreen.ts +105 -0
- package/dist/vendor/hooks-src/create-geolocation.ts +140 -0
- package/dist/vendor/hooks-src/create-global-shortcut.ts +140 -0
- package/dist/vendor/hooks-src/create-hover.ts +88 -0
- package/dist/vendor/hooks-src/create-idle.ts +109 -0
- package/dist/vendor/hooks-src/create-infinite-scroll.ts +90 -0
- package/dist/vendor/hooks-src/create-input-mask.ts +109 -0
- package/dist/vendor/hooks-src/create-intersection-observer.ts +82 -0
- package/dist/vendor/hooks-src/create-keybindings.ts +148 -0
- package/dist/vendor/hooks-src/create-lock-scroll.ts +97 -0
- package/dist/vendor/hooks-src/create-long-press.ts +85 -0
- package/dist/vendor/hooks-src/create-media-query.ts +94 -0
- package/dist/vendor/hooks-src/create-mouse-position.ts +87 -0
- package/dist/vendor/hooks-src/create-network-status.ts +100 -0
- package/dist/vendor/hooks-src/create-orientation.ts +129 -0
- package/dist/vendor/hooks-src/create-pagination.ts +208 -0
- package/dist/vendor/hooks-src/create-permission.ts +91 -0
- package/dist/vendor/hooks-src/create-previous.ts +21 -0
- package/dist/vendor/hooks-src/create-resize-observer.ts +89 -0
- package/dist/vendor/hooks-src/create-scroll-into-view.ts +57 -0
- package/dist/vendor/hooks-src/create-scroll-position.ts +129 -0
- package/dist/vendor/hooks-src/create-storage.ts +106 -0
- package/dist/vendor/hooks-src/create-tauri-window.ts +628 -0
- package/dist/vendor/hooks-src/create-timer.ts +150 -0
- package/dist/vendor/hooks-src/create-tiptap-editor.ts +326 -0
- package/dist/vendor/hooks-src/create-undo-redo.ts +100 -0
- package/dist/vendor/hooks-src/create-web-notification.ts +111 -0
- package/dist/vendor/hooks-src/create-websocket.ts +179 -0
- package/dist/vendor/hooks-src/create-window-size.ts +41 -0
- package/dist/vendor/hooks-src/index.ts +48 -0
- package/package.json +87 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { splitProps, type JSX, type ValidComponent } from "solid-js";
|
|
2
|
+
import * as SliderPrimitive from "@kobalte/core/slider";
|
|
3
|
+
import { cn } from "@/lib/cn";
|
|
4
|
+
|
|
5
|
+
export type SliderRootProps<T extends ValidComponent = "div"> =
|
|
6
|
+
SliderPrimitive.SliderRootProps<T> & {
|
|
7
|
+
class?: string;
|
|
8
|
+
children?: JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Root Slider component built on Kobalte primitives.
|
|
13
|
+
*/
|
|
14
|
+
export const Slider = <T extends ValidComponent = "div">(
|
|
15
|
+
props: SliderRootProps<T>
|
|
16
|
+
) => {
|
|
17
|
+
const [local, rest] = splitProps(props as SliderRootProps, ["class", "children"]);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<SliderPrimitive.Root
|
|
21
|
+
class={cn(
|
|
22
|
+
"relative flex w-full touch-none select-none flex-col gap-2 data-[orientation=vertical]:h-full data-[orientation=vertical]:w-auto data-[orientation=vertical]:items-center",
|
|
23
|
+
local.class
|
|
24
|
+
)}
|
|
25
|
+
{...(rest as any)}
|
|
26
|
+
>
|
|
27
|
+
{local.children}
|
|
28
|
+
</SliderPrimitive.Root>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type SliderTrackProps<T extends ValidComponent = "div"> =
|
|
33
|
+
SliderPrimitive.SliderTrackProps<T> & {
|
|
34
|
+
class?: string;
|
|
35
|
+
children?: JSX.Element;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Slider track containing the active range fill and thumbs.
|
|
40
|
+
*/
|
|
41
|
+
export const SliderTrack = <T extends ValidComponent = "div">(
|
|
42
|
+
props: SliderTrackProps<T>
|
|
43
|
+
) => {
|
|
44
|
+
const [local, rest] = splitProps(props as SliderTrackProps, ["class", "children"]);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<SliderPrimitive.Track
|
|
48
|
+
class={cn(
|
|
49
|
+
"relative h-2 w-full flex items-center rounded-lg bg-secondary cursor-pointer data-[orientation=vertical]:w-2 data-[orientation=vertical]:h-full data-[orientation=vertical]:flex-col data-[orientation=vertical]:justify-center",
|
|
50
|
+
local.class
|
|
51
|
+
)}
|
|
52
|
+
{...(rest as any)}
|
|
53
|
+
>
|
|
54
|
+
<SliderFill />
|
|
55
|
+
{local.children}
|
|
56
|
+
</SliderPrimitive.Track>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export type SliderFillProps<T extends ValidComponent = "div"> =
|
|
61
|
+
SliderPrimitive.SliderFillProps<T> & {
|
|
62
|
+
class?: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Active range indicator fill inside SliderTrack.
|
|
67
|
+
*/
|
|
68
|
+
export const SliderFill = <T extends ValidComponent = "div">(
|
|
69
|
+
props: SliderFillProps<T>
|
|
70
|
+
) => {
|
|
71
|
+
const [local, rest] = splitProps(props as SliderFillProps, ["class"]);
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<SliderPrimitive.Fill
|
|
75
|
+
class={cn(
|
|
76
|
+
"absolute rounded-lg bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full",
|
|
77
|
+
local.class
|
|
78
|
+
)}
|
|
79
|
+
{...(rest as any)}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export type SliderThumbProps<T extends ValidComponent = "span"> =
|
|
85
|
+
SliderPrimitive.SliderThumbProps<T> & {
|
|
86
|
+
class?: string;
|
|
87
|
+
children?: JSX.Element;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Draggable thumb handle for selecting slider values.
|
|
92
|
+
* Positioned centered on Kobalte offset coordinates using -translate-x-1/2 -translate-y-1/2.
|
|
93
|
+
*/
|
|
94
|
+
export const SliderThumb = <T extends ValidComponent = "span">(
|
|
95
|
+
props: SliderThumbProps<T>
|
|
96
|
+
) => {
|
|
97
|
+
const [local, rest] = splitProps(props as SliderThumbProps, ["class", "children"]);
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<SliderPrimitive.Thumb
|
|
101
|
+
class={cn(
|
|
102
|
+
"block h-5 w-5 rounded-lg border-2 border-primary bg-background shadow-md transition-transform hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 cursor-grab active:cursor-grabbing z-10 data-[orientation=horizontal]:translate-x-0 data-[orientation=horizontal]:translate-y-0 data-[orientation=vertical]:translate-x-0 data-[orientation=vertical]:translate-y-0",
|
|
103
|
+
local.class
|
|
104
|
+
)}
|
|
105
|
+
{...(rest as any)}
|
|
106
|
+
>
|
|
107
|
+
<SliderPrimitive.Input />
|
|
108
|
+
{local.children}
|
|
109
|
+
</SliderPrimitive.Thumb>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export type SliderLabelProps<T extends ValidComponent = "label"> =
|
|
114
|
+
SliderPrimitive.SliderLabelProps<T> & {
|
|
115
|
+
class?: string;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Accessible label for the Slider component.
|
|
120
|
+
*/
|
|
121
|
+
export const SliderLabel = <T extends ValidComponent = "label">(
|
|
122
|
+
props: SliderLabelProps<T>
|
|
123
|
+
) => {
|
|
124
|
+
const [local, rest] = splitProps(props as SliderLabelProps, ["class"]);
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<SliderPrimitive.Label
|
|
128
|
+
class={cn("text-sm font-medium leading-none text-foreground", local.class)}
|
|
129
|
+
{...(rest as any)}
|
|
130
|
+
/>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export type SliderValueLabelProps<T extends ValidComponent = "output"> =
|
|
135
|
+
SliderPrimitive.SliderValueLabelProps<T> & {
|
|
136
|
+
class?: string;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Displays current formatted value label for single or dual thumbs.
|
|
141
|
+
*/
|
|
142
|
+
export const SliderValueLabel = <T extends ValidComponent = "output">(
|
|
143
|
+
props: SliderValueLabelProps<T>
|
|
144
|
+
) => {
|
|
145
|
+
const [local, rest] = splitProps(props as SliderValueLabelProps, ["class"]);
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
<SliderPrimitive.ValueLabel
|
|
149
|
+
class={cn("text-sm font-medium text-muted-foreground", local.class)}
|
|
150
|
+
{...(rest as any)}
|
|
151
|
+
/>
|
|
152
|
+
);
|
|
153
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { splitProps, type Component, type JSX } from "solid-js";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@/lib/cn";
|
|
4
|
+
|
|
5
|
+
export const spinnerVariants = cva(
|
|
6
|
+
"inline-block animate-spin rounded-lg border-2 border-current border-r-transparent text-primary",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
sm: "size-3",
|
|
11
|
+
default: "size-4",
|
|
12
|
+
lg: "size-6",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
size: "default",
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export interface SpinnerProps
|
|
22
|
+
extends Omit<JSX.HTMLAttributes<HTMLSpanElement>, "role">,
|
|
23
|
+
VariantProps<typeof spinnerVariants> {
|
|
24
|
+
/** Accessible text announced while the spinner is active. */
|
|
25
|
+
label?: string;
|
|
26
|
+
class?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** A compact, accessible loading indicator for async UI states. */
|
|
30
|
+
export const Spinner: Component<SpinnerProps> = (props) => {
|
|
31
|
+
const [local, rest] = splitProps(props, ["size", "label", "class"]);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<span
|
|
35
|
+
role="status"
|
|
36
|
+
aria-label={local.label || "Loading"}
|
|
37
|
+
class={cn(spinnerVariants({ size: local.size }), local.class)}
|
|
38
|
+
{...rest}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import {
|
|
2
|
+
splitProps,
|
|
3
|
+
type JSX,
|
|
4
|
+
type ParentComponent,
|
|
5
|
+
} from "solid-js";
|
|
6
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
7
|
+
import { TrendingUp, TrendingDown, Minus } from "lucide-solid";
|
|
8
|
+
import { cn } from "@/lib/cn";
|
|
9
|
+
|
|
10
|
+
/* --- 1. Stat Group (Container Grid) --- */
|
|
11
|
+
export interface StatGroupProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
class?: string;
|
|
13
|
+
columns?: 1 | 2 | 3 | 4 | 5;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const StatGroup: ParentComponent<StatGroupProps> = (props) => {
|
|
17
|
+
const [local, rest] = splitProps(props, ["class", "columns", "children"]);
|
|
18
|
+
|
|
19
|
+
const columnClass = () => {
|
|
20
|
+
switch (local.columns) {
|
|
21
|
+
case 1:
|
|
22
|
+
return "grid-cols-1";
|
|
23
|
+
case 2:
|
|
24
|
+
return "grid-cols-1 sm:grid-cols-2";
|
|
25
|
+
case 3:
|
|
26
|
+
return "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
|
|
27
|
+
case 5:
|
|
28
|
+
return "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5";
|
|
29
|
+
case 4:
|
|
30
|
+
default:
|
|
31
|
+
return "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div
|
|
37
|
+
class={cn("grid gap-4 sm:gap-5 w-full", columnClass(), local.class)}
|
|
38
|
+
{...rest}
|
|
39
|
+
>
|
|
40
|
+
{local.children}
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/* --- 2. Stat Root Card --- */
|
|
46
|
+
export const statVariants = cva(
|
|
47
|
+
"relative flex flex-col justify-between rounded-lg transition-all duration-200",
|
|
48
|
+
{
|
|
49
|
+
variants: {
|
|
50
|
+
variant: {
|
|
51
|
+
default: "border border-border bg-card text-card-foreground p-4 sm:p-5 shadow-2xs space-y-2",
|
|
52
|
+
flat: "bg-muted/40 text-foreground p-4 sm:p-5 space-y-2",
|
|
53
|
+
bordered: "border-2 border-border bg-background text-foreground p-4 sm:p-5 space-y-2",
|
|
54
|
+
ghost: "bg-transparent text-foreground p-2 space-y-1",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: {
|
|
58
|
+
variant: "default",
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
export interface StatProps
|
|
64
|
+
extends JSX.HTMLAttributes<HTMLDivElement>,
|
|
65
|
+
VariantProps<typeof statVariants> {
|
|
66
|
+
class?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const Stat: ParentComponent<StatProps> = (props) => {
|
|
70
|
+
const [local, rest] = splitProps(props, ["class", "variant", "children"]);
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<div
|
|
74
|
+
class={cn(statVariants({ variant: local.variant }), local.class)}
|
|
75
|
+
{...rest}
|
|
76
|
+
>
|
|
77
|
+
{local.children}
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/* --- 3. Stat Header (Top Row) --- */
|
|
83
|
+
export interface StatHeaderProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
84
|
+
class?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const StatHeader: ParentComponent<StatHeaderProps> = (props) => {
|
|
88
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<div
|
|
92
|
+
class={cn("flex items-center justify-between gap-2", local.class)}
|
|
93
|
+
{...rest}
|
|
94
|
+
>
|
|
95
|
+
{local.children}
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/* --- 4. Stat Label / Title --- */
|
|
101
|
+
export interface StatLabelProps extends JSX.HTMLAttributes<HTMLParagraphElement> {
|
|
102
|
+
class?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const StatLabel: ParentComponent<StatLabelProps> = (props) => {
|
|
106
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<p
|
|
110
|
+
class={cn(
|
|
111
|
+
"text-xs sm:text-sm font-medium text-muted-foreground leading-tight tracking-tight",
|
|
112
|
+
local.class
|
|
113
|
+
)}
|
|
114
|
+
{...rest}
|
|
115
|
+
>
|
|
116
|
+
{local.children}
|
|
117
|
+
</p>
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/* --- 5. Stat Icon Wrapper --- */
|
|
122
|
+
export interface StatIconProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
123
|
+
class?: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export const StatIcon: ParentComponent<StatIconProps> = (props) => {
|
|
127
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<div
|
|
131
|
+
class={cn(
|
|
132
|
+
"flex size-4 sm:size-4.5 shrink-0 items-center justify-center text-muted-foreground",
|
|
133
|
+
local.class
|
|
134
|
+
)}
|
|
135
|
+
{...rest}
|
|
136
|
+
>
|
|
137
|
+
{local.children}
|
|
138
|
+
</div>
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/* --- 6. Stat Value (Big Number) --- */
|
|
143
|
+
export interface StatValueProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
144
|
+
class?: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export const StatValue: ParentComponent<StatValueProps> = (props) => {
|
|
148
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
149
|
+
|
|
150
|
+
return (
|
|
151
|
+
<div
|
|
152
|
+
class={cn(
|
|
153
|
+
"text-2xl sm:text-3xl font-bold tracking-tight text-foreground flex items-baseline gap-1 my-0.5",
|
|
154
|
+
local.class
|
|
155
|
+
)}
|
|
156
|
+
{...rest}
|
|
157
|
+
>
|
|
158
|
+
{local.children}
|
|
159
|
+
</div>
|
|
160
|
+
);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/* --- 7. Stat Unit / Currency (Prefix or Suffix) --- */
|
|
164
|
+
export interface StatUnitProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
165
|
+
class?: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export const StatUnit: ParentComponent<StatUnitProps> = (props) => {
|
|
169
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<span
|
|
173
|
+
class={cn("text-lg sm:text-xl font-semibold text-muted-foreground self-baseline", local.class)}
|
|
174
|
+
{...rest}
|
|
175
|
+
>
|
|
176
|
+
{local.children}
|
|
177
|
+
</span>
|
|
178
|
+
);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
/* --- 8. Stat Trend (Growth / Decline Indicator - No Background) --- */
|
|
182
|
+
export const statTrendVariants = cva(
|
|
183
|
+
"inline-flex items-center gap-1 text-xs font-semibold select-none shrink-0 tracking-tight",
|
|
184
|
+
{
|
|
185
|
+
variants: {
|
|
186
|
+
type: {
|
|
187
|
+
up: "text-emerald-600 dark:text-emerald-400",
|
|
188
|
+
down: "text-red-600 dark:text-red-400",
|
|
189
|
+
neutral: "text-muted-foreground",
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
defaultVariants: {
|
|
193
|
+
type: "up",
|
|
194
|
+
},
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
export interface StatTrendProps
|
|
199
|
+
extends JSX.HTMLAttributes<HTMLSpanElement>,
|
|
200
|
+
VariantProps<typeof statTrendVariants> {
|
|
201
|
+
class?: string;
|
|
202
|
+
hideIcon?: boolean;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export const StatTrend: ParentComponent<StatTrendProps> = (props) => {
|
|
206
|
+
const [local, rest] = splitProps(props, ["class", "type", "hideIcon", "children"]);
|
|
207
|
+
|
|
208
|
+
const Icon = () => {
|
|
209
|
+
if (local.hideIcon) return null;
|
|
210
|
+
if (local.type === "down") return <TrendingDown class="size-3.5 stroke-[2.5]" />;
|
|
211
|
+
if (local.type === "neutral") return <Minus class="size-3.5 stroke-[2.5]" />;
|
|
212
|
+
return <TrendingUp class="size-3.5 stroke-[2.5]" />;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
return (
|
|
216
|
+
<span
|
|
217
|
+
class={cn(statTrendVariants({ type: local.type }), local.class)}
|
|
218
|
+
{...rest}
|
|
219
|
+
>
|
|
220
|
+
<Icon />
|
|
221
|
+
<span>{local.children}</span>
|
|
222
|
+
</span>
|
|
223
|
+
);
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/* --- 9. Stat Help Text / Bottom Row (Between Alignment) --- */
|
|
227
|
+
export interface StatHelpTextProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
228
|
+
class?: string;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export const StatHelpText: ParentComponent<StatHelpTextProps> = (props) => {
|
|
232
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
233
|
+
|
|
234
|
+
return (
|
|
235
|
+
<div
|
|
236
|
+
class={cn(
|
|
237
|
+
"flex items-center justify-between gap-2 text-xs text-muted-foreground pt-1",
|
|
238
|
+
local.class
|
|
239
|
+
)}
|
|
240
|
+
{...rest}
|
|
241
|
+
>
|
|
242
|
+
{local.children}
|
|
243
|
+
</div>
|
|
244
|
+
);
|
|
245
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Show, splitProps, type Component, type JSX } from "solid-js";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@/lib/cn";
|
|
4
|
+
|
|
5
|
+
export const statusVariants = cva(
|
|
6
|
+
"inline-flex items-center gap-2 text-sm font-medium text-foreground",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
neutral: "text-muted-foreground",
|
|
11
|
+
success: "text-emerald-700 dark:text-emerald-400",
|
|
12
|
+
warning: "text-amber-700 dark:text-amber-400",
|
|
13
|
+
error: "text-destructive",
|
|
14
|
+
info: "text-blue-700 dark:text-blue-400",
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
sm: "text-xs gap-1.5",
|
|
18
|
+
default: "text-sm gap-2",
|
|
19
|
+
},
|
|
20
|
+
bordered: {
|
|
21
|
+
true: "rounded-md border px-2 py-1",
|
|
22
|
+
false: "",
|
|
23
|
+
},
|
|
24
|
+
borderVariant: {
|
|
25
|
+
neutral: "border-muted-foreground/30",
|
|
26
|
+
success: "border-emerald-500/30",
|
|
27
|
+
warning: "border-amber-500/30",
|
|
28
|
+
error: "border-destructive/30",
|
|
29
|
+
info: "border-blue-500/30",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: "neutral",
|
|
34
|
+
size: "default",
|
|
35
|
+
bordered: false,
|
|
36
|
+
borderVariant: "neutral",
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export const statusDotVariants = cva("size-2 shrink-0 rounded-lg", {
|
|
42
|
+
variants: {
|
|
43
|
+
variant: {
|
|
44
|
+
neutral: "bg-muted-foreground",
|
|
45
|
+
success: "bg-emerald-500",
|
|
46
|
+
warning: "bg-amber-500",
|
|
47
|
+
error: "bg-destructive",
|
|
48
|
+
info: "bg-blue-500",
|
|
49
|
+
},
|
|
50
|
+
size: {
|
|
51
|
+
sm: "size-1.5",
|
|
52
|
+
default: "size-2",
|
|
53
|
+
},
|
|
54
|
+
animation: {
|
|
55
|
+
none: "",
|
|
56
|
+
pulse: "animate-pulse",
|
|
57
|
+
ping: "",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
defaultVariants: {
|
|
61
|
+
variant: "neutral",
|
|
62
|
+
size: "default",
|
|
63
|
+
animation: "none",
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export interface StatusProps
|
|
68
|
+
extends JSX.HTMLAttributes<HTMLSpanElement>,
|
|
69
|
+
VariantProps<typeof statusVariants> {
|
|
70
|
+
class?: string;
|
|
71
|
+
animation?: "none" | "pulse" | "ping";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** A compact status indicator combining a semantic color dot and label. */
|
|
75
|
+
export const Status: Component<StatusProps> = (props) => {
|
|
76
|
+
const [local, rest] = splitProps(props, [
|
|
77
|
+
"variant",
|
|
78
|
+
"size",
|
|
79
|
+
"class",
|
|
80
|
+
"children",
|
|
81
|
+
"animation",
|
|
82
|
+
"bordered",
|
|
83
|
+
]);
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<span
|
|
87
|
+
role="status"
|
|
88
|
+
class={cn(
|
|
89
|
+
statusVariants({
|
|
90
|
+
variant: local.variant,
|
|
91
|
+
size: local.size,
|
|
92
|
+
bordered: local.bordered,
|
|
93
|
+
borderVariant: local.variant,
|
|
94
|
+
}),
|
|
95
|
+
local.class
|
|
96
|
+
)}
|
|
97
|
+
{...rest}
|
|
98
|
+
>
|
|
99
|
+
<span class="relative flex shrink-0" aria-hidden="true">
|
|
100
|
+
<Show when={local.animation === "ping"}>
|
|
101
|
+
<span
|
|
102
|
+
class={cn(
|
|
103
|
+
"absolute inline-flex size-full animate-ping rounded-lg opacity-75",
|
|
104
|
+
statusDotVariants({ variant: local.variant, size: local.size })
|
|
105
|
+
)}
|
|
106
|
+
/>
|
|
107
|
+
</Show>
|
|
108
|
+
<span
|
|
109
|
+
class={cn(
|
|
110
|
+
statusDotVariants({
|
|
111
|
+
variant: local.variant,
|
|
112
|
+
size: local.size,
|
|
113
|
+
animation: local.animation === "ping" ? "none" : local.animation,
|
|
114
|
+
})
|
|
115
|
+
)}
|
|
116
|
+
/>
|
|
117
|
+
</span>
|
|
118
|
+
{local.children}
|
|
119
|
+
</span>
|
|
120
|
+
);
|
|
121
|
+
};
|