@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,198 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createContext,
|
|
3
|
+
useContext,
|
|
4
|
+
splitProps,
|
|
5
|
+
Show,
|
|
6
|
+
type JSX,
|
|
7
|
+
type ParentComponent,
|
|
8
|
+
} from "solid-js";
|
|
9
|
+
import { Badge, type BadgeProps } from "@/components/ui/badge";
|
|
10
|
+
import { cn } from "@/lib/cn";
|
|
11
|
+
|
|
12
|
+
export type StepVariant =
|
|
13
|
+
| "default"
|
|
14
|
+
| "primary"
|
|
15
|
+
| "info"
|
|
16
|
+
| "success"
|
|
17
|
+
| "warning"
|
|
18
|
+
| "danger"
|
|
19
|
+
| "secondary"
|
|
20
|
+
| "outline"
|
|
21
|
+
| "destructive"
|
|
22
|
+
| "purple";
|
|
23
|
+
|
|
24
|
+
function toBadgeVariant(variant?: StepVariant): NonNullable<BadgeProps["variant"]> {
|
|
25
|
+
switch (variant) {
|
|
26
|
+
case "primary":
|
|
27
|
+
return "default";
|
|
28
|
+
case "danger":
|
|
29
|
+
return "destructive";
|
|
30
|
+
case "default":
|
|
31
|
+
return "outline";
|
|
32
|
+
case "info":
|
|
33
|
+
return "info";
|
|
34
|
+
case "success":
|
|
35
|
+
return "success";
|
|
36
|
+
case "warning":
|
|
37
|
+
return "warning";
|
|
38
|
+
case "secondary":
|
|
39
|
+
return "secondary";
|
|
40
|
+
default:
|
|
41
|
+
return "outline";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export type StepOrientation = "horizontal" | "vertical";
|
|
45
|
+
|
|
46
|
+
interface StepsContextValue {
|
|
47
|
+
variant?: StepVariant;
|
|
48
|
+
orientation?: () => StepOrientation;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const StepsContext = createContext<StepsContextValue>();
|
|
52
|
+
|
|
53
|
+
export interface StepsProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
54
|
+
/** Layout orientation: vertical (default) or horizontal */
|
|
55
|
+
orientation?: StepOrientation;
|
|
56
|
+
/** Default color variant for all steps in this container */
|
|
57
|
+
variant?: StepVariant;
|
|
58
|
+
class?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Multi-step instruction and stepper container supporting vertical and horizontal layouts.
|
|
63
|
+
*/
|
|
64
|
+
export const Steps: ParentComponent<StepsProps> = (props) => {
|
|
65
|
+
const [local, rest] = splitProps(props, ["orientation", "variant", "class", "children"]);
|
|
66
|
+
|
|
67
|
+
const orientation = () => local.orientation || "vertical";
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<StepsContext.Provider value={{ variant: local.variant, orientation }}>
|
|
71
|
+
<div
|
|
72
|
+
class={cn(
|
|
73
|
+
"relative my-6 [counter-reset:step]",
|
|
74
|
+
orientation() === "horizontal"
|
|
75
|
+
? "flex flex-row items-start justify-between w-full"
|
|
76
|
+
: "ml-4 border-l border-border/80 pl-8 space-y-8",
|
|
77
|
+
local.class
|
|
78
|
+
)}
|
|
79
|
+
{...rest}
|
|
80
|
+
>
|
|
81
|
+
{/* Single continuous horizontal rail in parent container */}
|
|
82
|
+
<Show when={orientation() === "horizontal"}>
|
|
83
|
+
<div class="absolute left-8 right-8 top-3.5 h-0.5 bg-border/80 z-0" />
|
|
84
|
+
</Show>
|
|
85
|
+
|
|
86
|
+
{local.children}
|
|
87
|
+
</div>
|
|
88
|
+
</StepsContext.Provider>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export interface StepProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
93
|
+
/** Optional custom step number, icon, or label to override automatic CSS counter */
|
|
94
|
+
step?: string | number | JSX.Element;
|
|
95
|
+
/** Optional step title rendered at the top of the step */
|
|
96
|
+
title?: string;
|
|
97
|
+
/** Step color variant */
|
|
98
|
+
variant?: StepVariant;
|
|
99
|
+
class?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const Step: ParentComponent<StepProps> = (props) => {
|
|
103
|
+
const [local, rest] = splitProps(props, ["step", "title", "variant", "class", "children"]);
|
|
104
|
+
const context = useContext(StepsContext);
|
|
105
|
+
|
|
106
|
+
const effectiveVariant = () => local.variant || context?.variant || "default";
|
|
107
|
+
const isHorizontal = () => context?.orientation?.() === "horizontal";
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<Show
|
|
111
|
+
when={isHorizontal()}
|
|
112
|
+
fallback={
|
|
113
|
+
<div class={cn("relative", local.class)} {...rest}>
|
|
114
|
+
{/* Numbered Step Badge with geometric center on left vertical border line */}
|
|
115
|
+
<Badge
|
|
116
|
+
variant={toBadgeVariant(effectiveVariant())}
|
|
117
|
+
class={cn(
|
|
118
|
+
"absolute -left-[2.875rem] top-0 size-7 p-0 flex items-center justify-center rounded-lg font-mono text-xs font-semibold shadow-2xs select-none",
|
|
119
|
+
!local.step && "[counter-increment:step] before:content-[counter(step)]"
|
|
120
|
+
)}
|
|
121
|
+
>
|
|
122
|
+
<Show when={local.step}>
|
|
123
|
+
{local.step}
|
|
124
|
+
</Show>
|
|
125
|
+
</Badge>
|
|
126
|
+
|
|
127
|
+
{/* Step Title Header */}
|
|
128
|
+
<Show when={local.title}>
|
|
129
|
+
<h4 class="font-semibold text-base tracking-tight text-foreground mb-2">
|
|
130
|
+
{local.title}
|
|
131
|
+
</h4>
|
|
132
|
+
</Show>
|
|
133
|
+
|
|
134
|
+
{/* Step Body Content */}
|
|
135
|
+
<div class="text-sm leading-relaxed text-muted-foreground space-y-3">
|
|
136
|
+
{local.children}
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
}
|
|
140
|
+
>
|
|
141
|
+
<div class={cn("flex-1 flex flex-col items-center text-center relative z-10 px-2", local.class)} {...rest}>
|
|
142
|
+
{/* Step Badge sitting on top of continuous parent rail */}
|
|
143
|
+
<Badge
|
|
144
|
+
variant={toBadgeVariant(effectiveVariant())}
|
|
145
|
+
class={cn(
|
|
146
|
+
"mb-2.5 size-7 p-0 flex items-center justify-center rounded-lg font-mono text-xs font-semibold shadow-2xs select-none",
|
|
147
|
+
!local.step && "[counter-increment:step] before:content-[counter(step)]"
|
|
148
|
+
)}
|
|
149
|
+
>
|
|
150
|
+
<Show when={local.step}>
|
|
151
|
+
{local.step}
|
|
152
|
+
</Show>
|
|
153
|
+
</Badge>
|
|
154
|
+
|
|
155
|
+
{/* Step Title Header */}
|
|
156
|
+
<Show when={local.title}>
|
|
157
|
+
<h4 class="font-semibold text-sm tracking-tight text-foreground mb-1">
|
|
158
|
+
{local.title}
|
|
159
|
+
</h4>
|
|
160
|
+
</Show>
|
|
161
|
+
|
|
162
|
+
{/* Step Body Content */}
|
|
163
|
+
<div class="text-xs leading-relaxed text-muted-foreground">
|
|
164
|
+
{local.children}
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</Show>
|
|
168
|
+
);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export interface StepTitleProps extends JSX.HTMLAttributes<HTMLHeadingElement> {
|
|
172
|
+
class?: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export const StepTitle: ParentComponent<StepTitleProps> = (props) => {
|
|
176
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
177
|
+
return (
|
|
178
|
+
<h4
|
|
179
|
+
class={cn("font-semibold text-base tracking-tight text-foreground mb-2", local.class)}
|
|
180
|
+
{...rest}
|
|
181
|
+
>
|
|
182
|
+
{local.children}
|
|
183
|
+
</h4>
|
|
184
|
+
);
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export interface StepDescriptionProps extends JSX.HTMLAttributes<HTMLParagraphElement> {
|
|
188
|
+
class?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export const StepDescription: ParentComponent<StepDescriptionProps> = (props) => {
|
|
192
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
193
|
+
return (
|
|
194
|
+
<div class={cn("text-sm leading-relaxed text-muted-foreground", local.class)} {...rest}>
|
|
195
|
+
{local.children}
|
|
196
|
+
</div>
|
|
197
|
+
);
|
|
198
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { splitProps, type Component, type JSX } from "solid-js";
|
|
2
|
+
import { createControllableSignal } from "@/hooks/create-controllable-signal";
|
|
3
|
+
import { cn } from "@/lib/cn";
|
|
4
|
+
|
|
5
|
+
export interface SwitchProps
|
|
6
|
+
extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
|
|
7
|
+
/** Controlled checked state */
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
/** Uncontrolled default checked state */
|
|
10
|
+
defaultChecked?: boolean;
|
|
11
|
+
/** Event handler triggered when toggle state changes */
|
|
12
|
+
onChange?: (checked: boolean) => void;
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Nikala UI Switch component for boolean toggle inputs built for SolidJS with Tailwind CSS v4 styling.
|
|
18
|
+
*/
|
|
19
|
+
export const Switch: Component<SwitchProps> = (props) => {
|
|
20
|
+
const [local, rest] = splitProps(props, [
|
|
21
|
+
"checked",
|
|
22
|
+
"defaultChecked",
|
|
23
|
+
"onChange",
|
|
24
|
+
"disabled",
|
|
25
|
+
"class",
|
|
26
|
+
"onClick",
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
const [isChecked, setIsChecked] = createControllableSignal({
|
|
30
|
+
value: () => local.checked,
|
|
31
|
+
defaultValue: local.defaultChecked ?? false,
|
|
32
|
+
onChange: (val) => local.onChange?.(val),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const toggle = (
|
|
36
|
+
e: MouseEvent & { currentTarget: HTMLButtonElement; target: Element }
|
|
37
|
+
) => {
|
|
38
|
+
if (local.disabled) return;
|
|
39
|
+
setIsChecked(!isChecked());
|
|
40
|
+
|
|
41
|
+
if (typeof local.onClick === "function") {
|
|
42
|
+
local.onClick(e);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<button
|
|
48
|
+
type="button"
|
|
49
|
+
role="switch"
|
|
50
|
+
aria-checked={isChecked()}
|
|
51
|
+
data-state={isChecked() ? "checked" : "unchecked"}
|
|
52
|
+
disabled={local.disabled}
|
|
53
|
+
onClick={toggle}
|
|
54
|
+
class={cn(
|
|
55
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-lg border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted",
|
|
56
|
+
local.class
|
|
57
|
+
)}
|
|
58
|
+
{...rest}
|
|
59
|
+
>
|
|
60
|
+
<span
|
|
61
|
+
data-state={isChecked() ? "checked" : "unchecked"}
|
|
62
|
+
class={cn(
|
|
63
|
+
"pointer-events-none block h-4 w-4 rounded-sm bg-primary-foreground shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
64
|
+
)}
|
|
65
|
+
/>
|
|
66
|
+
</button>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// src/components/ui/table-of-contents.tsx
|
|
2
|
+
import {
|
|
3
|
+
splitProps,
|
|
4
|
+
createSignal,
|
|
5
|
+
createEffect,
|
|
6
|
+
onMount,
|
|
7
|
+
onCleanup,
|
|
8
|
+
For,
|
|
9
|
+
Show,
|
|
10
|
+
type Component,
|
|
11
|
+
type JSX,
|
|
12
|
+
} from "solid-js";
|
|
13
|
+
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
14
|
+
import { List, ListHeader, ListItem } from "@/components/ui/list";
|
|
15
|
+
import { cn } from "@/lib/cn";
|
|
16
|
+
import { createScrollPosition } from "@/hooks/create-scroll-position";
|
|
17
|
+
|
|
18
|
+
export interface TocItem {
|
|
19
|
+
id: string;
|
|
20
|
+
text: string;
|
|
21
|
+
depth: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface TableOfContentsProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
25
|
+
items: TocItem[];
|
|
26
|
+
title?: string | false;
|
|
27
|
+
activeId?: string;
|
|
28
|
+
onItemClick?: (id: string) => void;
|
|
29
|
+
class?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Nikala UI TableOfContents Component.
|
|
34
|
+
* Pure composition of ScrollArea, ListHeader, List, and ListItem with active ScrollSpy tracking.
|
|
35
|
+
*/
|
|
36
|
+
export const TableOfContents: Component<TableOfContentsProps> = (props) => {
|
|
37
|
+
const [local, rest] = splitProps(props, [
|
|
38
|
+
"items",
|
|
39
|
+
"title",
|
|
40
|
+
"activeId",
|
|
41
|
+
"onItemClick",
|
|
42
|
+
"class",
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
const [activeId, setActiveId] = createSignal<string>(local.activeId || "");
|
|
46
|
+
const scrollPosition = createScrollPosition();
|
|
47
|
+
|
|
48
|
+
onMount(() => {
|
|
49
|
+
if (typeof window === "undefined" || typeof document === "undefined") return;
|
|
50
|
+
|
|
51
|
+
const headings = (local.items || [])
|
|
52
|
+
.map((item) => document.getElementById(item.id))
|
|
53
|
+
.filter((element): element is HTMLElement => Boolean(element));
|
|
54
|
+
|
|
55
|
+
const updateActiveHeading = () => {
|
|
56
|
+
if (headings.length === 0) return;
|
|
57
|
+
|
|
58
|
+
const atPageBottom = scrollPosition.isAtBottom();
|
|
59
|
+
if (atPageBottom) {
|
|
60
|
+
setActiveId(headings[headings.length - 1].id);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const heading = [...headings]
|
|
65
|
+
.reverse()
|
|
66
|
+
.find((element) => element.getBoundingClientRect().top <= 120);
|
|
67
|
+
|
|
68
|
+
setActiveId(heading?.id || headings[0].id);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
createEffect(() => {
|
|
72
|
+
scrollPosition.y();
|
|
73
|
+
scrollPosition.isAtBottom();
|
|
74
|
+
updateActiveHeading();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
window.addEventListener("resize", updateActiveHeading);
|
|
78
|
+
onCleanup(() => window.removeEventListener("resize", updateActiveHeading));
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const handleClick = (e: MouseEvent, id: string) => {
|
|
82
|
+
if (typeof document !== "undefined") {
|
|
83
|
+
const el = document.getElementById(id);
|
|
84
|
+
if (el) {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
el.scrollIntoView({ behavior: "smooth" });
|
|
87
|
+
setActiveId(id);
|
|
88
|
+
if (typeof window !== "undefined") {
|
|
89
|
+
window.history.pushState(null, "", `#${id}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
local.onItemClick?.(id);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<ScrollArea class={cn("h-full py-2", local.class)} {...rest}>
|
|
98
|
+
<Show when={local.title !== false}>
|
|
99
|
+
<ListHeader
|
|
100
|
+
title={typeof local.title === "string" ? local.title : "On this page"}
|
|
101
|
+
class="px-3 pb-1"
|
|
102
|
+
/>
|
|
103
|
+
</Show>
|
|
104
|
+
|
|
105
|
+
<List class="gap-0.5 p-1">
|
|
106
|
+
<For each={local.items}>
|
|
107
|
+
{(item) => (
|
|
108
|
+
<ListItem
|
|
109
|
+
title={item.text}
|
|
110
|
+
href={`#${item.id}`}
|
|
111
|
+
active={activeId() === item.id}
|
|
112
|
+
size="sm"
|
|
113
|
+
hoverVariant="muted"
|
|
114
|
+
class={cn(
|
|
115
|
+
"text-xs transition-colors py-1 h-auto min-h-0",
|
|
116
|
+
item.depth === 3 && "pl-5 text-muted-foreground/80",
|
|
117
|
+
item.depth > 3 && "pl-7 text-muted-foreground/60",
|
|
118
|
+
activeId() === item.id
|
|
119
|
+
? "text-primary font-medium bg-primary/10"
|
|
120
|
+
: "text-muted-foreground hover:text-foreground"
|
|
121
|
+
)}
|
|
122
|
+
onClick={(e: MouseEvent) => handleClick(e, item.id)}
|
|
123
|
+
/>
|
|
124
|
+
)}
|
|
125
|
+
</For>
|
|
126
|
+
</List>
|
|
127
|
+
</ScrollArea>
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export const Toc = TableOfContents;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { splitProps, type Component, type JSX } from "solid-js";
|
|
2
|
+
import { cn } from "@/lib/cn";
|
|
3
|
+
|
|
4
|
+
export interface TableProps extends JSX.HTMLAttributes<HTMLTableElement> {
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Root Table container component wrapped in a responsive scroll container.
|
|
10
|
+
*/
|
|
11
|
+
export const Table: Component<TableProps> = (props) => {
|
|
12
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div class="relative w-full overflow-auto">
|
|
16
|
+
<table
|
|
17
|
+
class={cn("w-full caption-bottom text-sm", local.class)}
|
|
18
|
+
{...rest}
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export interface TableHeaderProps extends JSX.HTMLAttributes<HTMLTableSectionElement> {
|
|
25
|
+
class?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Header section wrapper for the Table component.
|
|
30
|
+
*/
|
|
31
|
+
export const TableHeader: Component<TableHeaderProps> = (props) => {
|
|
32
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<thead
|
|
36
|
+
class={cn("[&_tr]:border-b border-border", local.class)}
|
|
37
|
+
{...rest}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export interface TableBodyProps extends JSX.HTMLAttributes<HTMLTableSectionElement> {
|
|
43
|
+
class?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Main body section wrapper for the Table component.
|
|
48
|
+
*/
|
|
49
|
+
export const TableBody: Component<TableBodyProps> = (props) => {
|
|
50
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<tbody
|
|
54
|
+
class={cn("[&_tr:last-child]:border-0", local.class)}
|
|
55
|
+
{...rest}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export interface TableFooterProps extends JSX.HTMLAttributes<HTMLTableSectionElement> {
|
|
61
|
+
class?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Footer section wrapper for the Table component.
|
|
66
|
+
*/
|
|
67
|
+
export const TableFooter: Component<TableFooterProps> = (props) => {
|
|
68
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<tfoot
|
|
72
|
+
class={cn(
|
|
73
|
+
"border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
74
|
+
local.class
|
|
75
|
+
)}
|
|
76
|
+
{...rest}
|
|
77
|
+
/>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export interface TableRowProps extends JSX.HTMLAttributes<HTMLTableRowElement> {
|
|
82
|
+
class?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Table row component with hover highlight states.
|
|
87
|
+
*/
|
|
88
|
+
export const TableRow: Component<TableRowProps> = (props) => {
|
|
89
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<tr
|
|
93
|
+
class={cn(
|
|
94
|
+
"border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
95
|
+
local.class
|
|
96
|
+
)}
|
|
97
|
+
{...rest}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export interface TableHeadProps extends JSX.ThHTMLAttributes<HTMLTableCellElement> {
|
|
103
|
+
class?: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Header cell component for table columns.
|
|
108
|
+
*/
|
|
109
|
+
export const TableHead: Component<TableHeadProps> = (props) => {
|
|
110
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<th
|
|
114
|
+
class={cn(
|
|
115
|
+
"h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
116
|
+
local.class
|
|
117
|
+
)}
|
|
118
|
+
{...rest}
|
|
119
|
+
/>
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export interface TableCellProps extends JSX.TdHTMLAttributes<HTMLTableCellElement> {
|
|
124
|
+
class?: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Standard data cell component for table rows.
|
|
129
|
+
*/
|
|
130
|
+
export const TableCell: Component<TableCellProps> = (props) => {
|
|
131
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
132
|
+
|
|
133
|
+
return (
|
|
134
|
+
<td
|
|
135
|
+
class={cn(
|
|
136
|
+
"p-4 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
137
|
+
local.class
|
|
138
|
+
)}
|
|
139
|
+
{...rest}
|
|
140
|
+
/>
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export interface TableCaptionProps extends JSX.HTMLAttributes<HTMLTableCaptionElement> {
|
|
145
|
+
class?: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Accessible table caption for describing table contents.
|
|
150
|
+
*/
|
|
151
|
+
export const TableCaption: Component<TableCaptionProps> = (props) => {
|
|
152
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
<caption
|
|
156
|
+
class={cn("mt-4 text-xs text-muted-foreground pb-2", local.class)}
|
|
157
|
+
{...rest}
|
|
158
|
+
/>
|
|
159
|
+
);
|
|
160
|
+
};
|