@nikala-ui/folio 0.13.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/LICENSE +20 -0
- package/README.md +221 -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 +28 -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 +33 -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 +359 -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 +25 -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 +34 -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 +55 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/client/app-types.d.ts +18 -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/app.d.ts +5 -0
- package/dist/client/app.d.ts.map +1 -0
- package/dist/client/app.jsx +51 -0
- package/dist/client/app.jsx.map +1 -0
- package/dist/client/base.css +90 -0
- package/dist/client/components/docs-layout-shell.d.ts +23 -0
- package/dist/client/components/docs-layout-shell.d.ts.map +1 -0
- package/dist/client/components/docs-layout-shell.jsx +15 -0
- package/dist/client/components/docs-layout-shell.jsx.map +1 -0
- package/dist/client/components/docs-page-content.d.ts +9 -0
- package/dist/client/components/docs-page-content.d.ts.map +1 -0
- package/dist/client/components/docs-page-content.jsx +10 -0
- package/dist/client/components/docs-page-content.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 +32 -0
- package/dist/client/entry.jsx.map +1 -0
- package/dist/client/index.html +23 -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/page-actions.d.ts +10 -0
- package/dist/client/page-actions.d.ts.map +1 -0
- package/dist/client/page-actions.js +63 -0
- package/dist/client/page-actions.js.map +1 -0
- package/dist/client/public/favicon.ico +0 -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 +87 -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 +186 -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 +65 -0
- package/dist/components/mdx-components.d.ts.map +1 -0
- package/dist/components/mdx-components.jsx +133 -0
- package/dist/components/mdx-components.jsx.map +1 -0
- package/dist/components/ui/api-table.d.ts +29 -0
- package/dist/components/ui/api-table.d.ts.map +1 -0
- package/dist/components/ui/api-table.jsx +66 -0
- package/dist/components/ui/api-table.jsx.map +1 -0
- package/dist/components/ui/badge.d.ts +17 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.jsx +33 -0
- package/dist/components/ui/badge.jsx.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +51 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.jsx +62 -0
- package/dist/components/ui/breadcrumb.jsx.map +1 -0
- package/dist/components/ui/button.d.ts +19 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.jsx +54 -0
- package/dist/components/ui/button.jsx.map +1 -0
- package/dist/components/ui/callout.d.ts +21 -0
- package/dist/components/ui/callout.d.ts.map +1 -0
- package/dist/components/ui/callout.jsx +76 -0
- package/dist/components/ui/callout.jsx.map +1 -0
- package/dist/components/ui/card.d.ts +44 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.jsx +45 -0
- package/dist/components/ui/card.jsx.map +1 -0
- package/dist/components/ui/code-block.d.ts +23 -0
- package/dist/components/ui/code-block.d.ts.map +1 -0
- package/dist/components/ui/code-block.jsx +263 -0
- package/dist/components/ui/code-block.jsx.map +1 -0
- package/dist/components/ui/collapsible.d.ts +27 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.jsx +29 -0
- package/dist/components/ui/collapsible.jsx.map +1 -0
- package/dist/components/ui/command.d.ts +57 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.jsx +224 -0
- package/dist/components/ui/command.jsx.map +1 -0
- package/dist/components/ui/component-viewer.d.ts +33 -0
- package/dist/components/ui/component-viewer.d.ts.map +1 -0
- package/dist/components/ui/component-viewer.jsx +210 -0
- package/dist/components/ui/component-viewer.jsx.map +1 -0
- package/dist/components/ui/container.d.ts +13 -0
- package/dist/components/ui/container.d.ts.map +1 -0
- package/dist/components/ui/container.jsx +29 -0
- package/dist/components/ui/container.jsx.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +58 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.jsx +112 -0
- package/dist/components/ui/dropdown-menu.jsx.map +1 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.jsx +33 -0
- package/dist/components/ui/input-group.jsx.map +1 -0
- package/dist/components/ui/kbd.d.ts +15 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.jsx +42 -0
- package/dist/components/ui/kbd.jsx.map +1 -0
- package/dist/components/ui/list.d.ts +36 -0
- package/dist/components/ui/list.d.ts.map +1 -0
- package/dist/components/ui/list.jsx +131 -0
- package/dist/components/ui/list.jsx.map +1 -0
- package/dist/components/ui/logo.d.ts +9 -0
- package/dist/components/ui/logo.d.ts.map +1 -0
- package/dist/components/ui/logo.jsx +31 -0
- package/dist/components/ui/logo.jsx.map +1 -0
- package/dist/components/ui/navbar.d.ts +57 -0
- package/dist/components/ui/navbar.d.ts.map +1 -0
- package/dist/components/ui/navbar.jsx +174 -0
- package/dist/components/ui/navbar.jsx.map +1 -0
- package/dist/components/ui/package-manager-tabs.d.ts +21 -0
- package/dist/components/ui/package-manager-tabs.d.ts.map +1 -0
- package/dist/components/ui/package-manager-tabs.jsx +167 -0
- package/dist/components/ui/package-manager-tabs.jsx.map +1 -0
- package/dist/components/ui/pager.d.ts +27 -0
- package/dist/components/ui/pager.d.ts.map +1 -0
- package/dist/components/ui/pager.jsx +50 -0
- package/dist/components/ui/pager.jsx.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +9 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.jsx +160 -0
- package/dist/components/ui/scroll-area.jsx.map +1 -0
- package/dist/components/ui/section-heading.d.ts +23 -0
- package/dist/components/ui/section-heading.d.ts.map +1 -0
- package/dist/components/ui/section-heading.jsx +82 -0
- package/dist/components/ui/section-heading.jsx.map +1 -0
- package/dist/components/ui/separator.d.ts +13 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.jsx +16 -0
- package/dist/components/ui/separator.jsx.map +1 -0
- package/dist/components/ui/sidebar.d.ts +103 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.jsx +315 -0
- package/dist/components/ui/sidebar.jsx.map +1 -0
- package/dist/components/ui/skeleton.d.ts +9 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.jsx +11 -0
- package/dist/components/ui/skeleton.jsx.map +1 -0
- package/dist/components/ui/spinner.d.ts +11 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.jsx +21 -0
- package/dist/components/ui/spinner.jsx.map +1 -0
- package/dist/components/ui/table-of-contents.d.ts +20 -0
- package/dist/components/ui/table-of-contents.d.ts.map +1 -0
- package/dist/components/ui/table-of-contents.jsx +77 -0
- package/dist/components/ui/table-of-contents.jsx.map +1 -0
- package/dist/components/ui/table.d.ts +58 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.jsx +61 -0
- package/dist/components/ui/table.jsx.map +1 -0
- package/dist/components/ui/tabs.d.ts +42 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.jsx +93 -0
- package/dist/components/ui/tabs.jsx.map +1 -0
- package/dist/components/ui/theme-toggle.d.ts +19 -0
- package/dist/components/ui/theme-toggle.d.ts.map +1 -0
- package/dist/components/ui/theme-toggle.jsx +142 -0
- package/dist/components/ui/theme-toggle.jsx.map +1 -0
- package/dist/components/ui/tooltip.d.ts +10 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.jsx +18 -0
- package/dist/components/ui/tooltip.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 +218 -0
- package/dist/core/content-scanner.js.map +1 -0
- package/dist/core/route-tree.d.ts +24 -0
- package/dist/core/route-tree.d.ts.map +1 -0
- package/dist/core/route-tree.js +221 -0
- package/dist/core/route-tree.js.map +1 -0
- package/dist/hooks/create-click-outside.d.ts +18 -0
- package/dist/hooks/create-click-outside.d.ts.map +1 -0
- package/dist/hooks/create-click-outside.js +55 -0
- package/dist/hooks/create-click-outside.js.map +1 -0
- package/dist/hooks/create-clipboard.d.ts +20 -0
- package/dist/hooks/create-clipboard.d.ts.map +1 -0
- package/dist/hooks/create-clipboard.js +48 -0
- package/dist/hooks/create-clipboard.js.map +1 -0
- package/dist/hooks/create-color-mode.d.ts +27 -0
- package/dist/hooks/create-color-mode.d.ts.map +1 -0
- package/dist/hooks/create-color-mode.js +86 -0
- package/dist/hooks/create-color-mode.js.map +1 -0
- package/dist/hooks/create-controllable-signal.d.ts +17 -0
- package/dist/hooks/create-controllable-signal.d.ts.map +1 -0
- package/dist/hooks/create-controllable-signal.js +35 -0
- package/dist/hooks/create-controllable-signal.js.map +1 -0
- package/dist/hooks/create-focus-trap.d.ts +15 -0
- package/dist/hooks/create-focus-trap.d.ts.map +1 -0
- package/dist/hooks/create-focus-trap.js +72 -0
- package/dist/hooks/create-focus-trap.js.map +1 -0
- package/dist/hooks/create-keybindings.d.ts +34 -0
- package/dist/hooks/create-keybindings.d.ts.map +1 -0
- package/dist/hooks/create-keybindings.js +113 -0
- package/dist/hooks/create-keybindings.js.map +1 -0
- package/dist/hooks/create-lock-scroll.d.ts +20 -0
- package/dist/hooks/create-lock-scroll.d.ts.map +1 -0
- package/dist/hooks/create-lock-scroll.js +77 -0
- package/dist/hooks/create-lock-scroll.js.map +1 -0
- package/dist/hooks/create-resize-observer.d.ts +27 -0
- package/dist/hooks/create-resize-observer.d.ts.map +1 -0
- package/dist/hooks/create-resize-observer.js +59 -0
- package/dist/hooks/create-resize-observer.js.map +1 -0
- package/dist/hooks/create-scroll-position.d.ts +29 -0
- package/dist/hooks/create-scroll-position.d.ts.map +1 -0
- package/dist/hooks/create-scroll-position.js +101 -0
- package/dist/hooks/create-scroll-position.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 +190 -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 +3 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +3 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/navigation/repository-links.d.ts +3 -0
- package/dist/navigation/repository-links.d.ts.map +1 -0
- package/dist/navigation/repository-links.js +35 -0
- package/dist/navigation/repository-links.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/providers/theme-provider.d.ts +33 -0
- package/dist/providers/theme-provider.d.ts.map +1 -0
- package/dist/providers/theme-provider.jsx +158 -0
- package/dist/providers/theme-provider.jsx.map +1 -0
- package/dist/providers/theme-script.d.ts +16 -0
- package/dist/providers/theme-script.d.ts.map +1 -0
- package/dist/providers/theme-script.jsx +41 -0
- package/dist/providers/theme-script.jsx.map +1 -0
- package/dist/providers/theme-transitions.d.ts +12 -0
- package/dist/providers/theme-transitions.d.ts.map +1 -0
- package/dist/providers/theme-transitions.js +115 -0
- package/dist/providers/theme-transitions.js.map +1 -0
- package/dist/registry/api-table.json +21 -0
- package/dist/registry/badge.json +18 -0
- package/dist/registry/breadcrumb.json +17 -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/code-block.json +28 -0
- package/dist/registry/collapsible.json +18 -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/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-focus-trap.json +13 -0
- package/dist/registry/create-keybindings.json +13 -0
- package/dist/registry/create-lock-scroll.json +13 -0
- package/dist/registry/create-resize-observer.json +13 -0
- package/dist/registry/create-scroll-position.json +13 -0
- package/dist/registry/dropdown-menu.json +22 -0
- package/dist/registry/input-group.json +21 -0
- package/dist/registry/kbd.json +18 -0
- package/dist/registry/list.json +20 -0
- package/dist/registry/logo.json +17 -0
- package/dist/registry/navbar.json +19 -0
- package/dist/registry/package-manager-tabs.json +24 -0
- package/dist/registry/pager.json +21 -0
- package/dist/registry/scroll-area.json +21 -0
- package/dist/registry/section-heading.json +21 -0
- package/dist/registry/separator.json +17 -0
- package/dist/registry/sidebar.json +24 -0
- package/dist/registry/skeleton.json +17 -0
- package/dist/registry/spinner.json +18 -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/theme-manager.json +39 -0
- package/dist/registry/tooltip.json +18 -0
- package/dist/search/provider.d.ts +14 -0
- package/dist/search/provider.d.ts.map +1 -0
- package/dist/search/provider.js +14 -0
- package/dist/search/provider.js.map +1 -0
- package/dist/server/index.d.ts +18 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +565 -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 +522 -0
- package/dist/server/plugin.js.map +1 -0
- package/dist/theme-accent.d.ts +8 -0
- package/dist/theme-accent.d.ts.map +1 -0
- package/dist/theme-accent.js +18 -0
- package/dist/theme-accent.js.map +1 -0
- package/dist/theme-mode.d.ts +4 -0
- package/dist/theme-mode.d.ts.map +1 -0
- package/dist/theme-mode.js +5 -0
- package/dist/theme-mode.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/icons.d.ts +3 -0
- package/dist/themes/default/icons.d.ts.map +1 -0
- package/dist/themes/default/icons.js +15 -0
- package/dist/themes/default/icons.js.map +1 -0
- package/dist/themes/default/index.d.ts +12 -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 +194 -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 +83 -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 +38 -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 +124 -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 +52 -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 +92 -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 +91 -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 +132 -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/docs-src/components/mdx-components.tsx +144 -0
- package/dist/vendor/docs-src/components/ui/api-table.tsx +117 -0
- package/dist/vendor/docs-src/components/ui/badge.tsx +56 -0
- package/dist/vendor/docs-src/components/ui/breadcrumb.tsx +136 -0
- package/dist/vendor/docs-src/components/ui/button.tsx +82 -0
- package/dist/vendor/docs-src/components/ui/callout.tsx +137 -0
- package/dist/vendor/docs-src/components/ui/card.tsx +113 -0
- package/dist/vendor/docs-src/components/ui/code-block.tsx +347 -0
- package/dist/vendor/docs-src/components/ui/collapsible.tsx +73 -0
- package/dist/vendor/docs-src/components/ui/command.tsx +382 -0
- package/dist/vendor/docs-src/components/ui/component-viewer.tsx +363 -0
- package/dist/vendor/docs-src/components/ui/container.tsx +45 -0
- package/dist/vendor/docs-src/components/ui/dropdown-menu.tsx +298 -0
- package/dist/vendor/docs-src/components/ui/input-group.tsx +80 -0
- package/dist/vendor/docs-src/components/ui/kbd.tsx +73 -0
- package/dist/vendor/docs-src/components/ui/list.tsx +222 -0
- package/dist/vendor/docs-src/components/ui/logo.tsx +68 -0
- package/dist/vendor/docs-src/components/ui/navbar.tsx +375 -0
- package/dist/vendor/docs-src/components/ui/package-manager-tabs.tsx +226 -0
- package/dist/vendor/docs-src/components/ui/pager.tsx +102 -0
- package/dist/vendor/docs-src/components/ui/scroll-area.tsx +228 -0
- package/dist/vendor/docs-src/components/ui/section-heading.tsx +115 -0
- package/dist/vendor/docs-src/components/ui/separator.tsx +37 -0
- package/dist/vendor/docs-src/components/ui/sidebar.tsx +712 -0
- package/dist/vendor/docs-src/components/ui/skeleton.tsx +24 -0
- package/dist/vendor/docs-src/components/ui/spinner.tsx +41 -0
- package/dist/vendor/docs-src/components/ui/table-of-contents.tsx +131 -0
- package/dist/vendor/docs-src/components/ui/table.tsx +160 -0
- package/dist/vendor/docs-src/components/ui/tabs.tsx +204 -0
- package/dist/vendor/docs-src/components/ui/theme-toggle.tsx +238 -0
- package/dist/vendor/docs-src/components/ui/tooltip.tsx +41 -0
- package/dist/vendor/docs-src/hooks/create-click-outside.ts +82 -0
- package/dist/vendor/docs-src/hooks/create-clipboard.ts +69 -0
- package/dist/vendor/docs-src/hooks/create-color-mode.ts +115 -0
- package/dist/vendor/docs-src/hooks/create-controllable-signal.ts +56 -0
- package/dist/vendor/docs-src/hooks/create-focus-trap.ts +94 -0
- package/dist/vendor/docs-src/hooks/create-keybindings.ts +148 -0
- package/dist/vendor/docs-src/hooks/create-lock-scroll.ts +97 -0
- package/dist/vendor/docs-src/hooks/create-resize-observer.ts +89 -0
- package/dist/vendor/docs-src/hooks/create-scroll-position.ts +129 -0
- package/dist/vendor/docs-src/lib/cn.ts +9 -0
- package/dist/vendor/docs-src/providers/theme-provider.tsx +203 -0
- package/dist/vendor/docs-src/providers/theme-script.tsx +54 -0
- package/dist/vendor/docs-src/providers/theme-transitions.ts +139 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { splitProps, type JSX } from "solid-js";
|
|
2
|
+
import { Plus } from "lucide-solid";
|
|
3
|
+
import { clsx } from "clsx";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
// Resolved by the docs plugin to lazy wrappers around the consumer's local
|
|
6
|
+
// component sources. The source modules load only when an MDX component is
|
|
7
|
+
// actually rendered.
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
import Core from "virtual:folio-components";
|
|
10
|
+
|
|
11
|
+
const cn = (...values: unknown[]) => twMerge(clsx(values));
|
|
12
|
+
type HtmlProps<T extends HTMLElement> = JSX.HTMLAttributes<T>;
|
|
13
|
+
|
|
14
|
+
// Native elements are kept for Markdown semantics and accessibility. Structured
|
|
15
|
+
// documentation UI is delegated to Nikala primitives below.
|
|
16
|
+
export function MdxH1(props: HtmlProps<HTMLHeadingElement>) {
|
|
17
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
18
|
+
return <h1 class={cn("scroll-mt-20 text-3xl font-bold tracking-tight text-foreground mb-4", local.class)} {...rest}>{local.children}</h1>;
|
|
19
|
+
}
|
|
20
|
+
export function MdxH2(props: HtmlProps<HTMLHeadingElement>) {
|
|
21
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
22
|
+
return <h2 class={cn("scroll-mt-20 text-xl font-bold tracking-tight text-foreground mt-8 mb-4 border-b border-border pb-2 group flex items-center justify-between", local.class)} {...rest}>{local.children}</h2>;
|
|
23
|
+
}
|
|
24
|
+
export function MdxH3(props: HtmlProps<HTMLHeadingElement>) {
|
|
25
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
26
|
+
return <h3 class={cn("scroll-mt-20 text-base font-semibold tracking-tight text-foreground mt-6 mb-3", local.class)} {...rest}>{local.children}</h3>;
|
|
27
|
+
}
|
|
28
|
+
export function MdxH4(props: HtmlProps<HTMLHeadingElement>) {
|
|
29
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
30
|
+
return <h4 class={cn("scroll-mt-20 text-base font-semibold tracking-tight text-foreground mt-4 mb-2", local.class)} {...rest}>{local.children}</h4>;
|
|
31
|
+
}
|
|
32
|
+
export function MdxH5(props: HtmlProps<HTMLHeadingElement>) {
|
|
33
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
34
|
+
return <h5 class={cn("scroll-mt-20 text-sm font-semibold tracking-tight text-foreground mt-3 mb-1", local.class)} {...rest}>{local.children}</h5>;
|
|
35
|
+
}
|
|
36
|
+
export function MdxH6(props: HtmlProps<HTMLHeadingElement>) {
|
|
37
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
38
|
+
return <h6 class={cn("scroll-mt-20 text-xs font-semibold tracking-tight text-muted-foreground mt-2 mb-1", local.class)} {...rest}>{local.children}</h6>;
|
|
39
|
+
}
|
|
40
|
+
export function MdxP(props: HtmlProps<HTMLParagraphElement>) {
|
|
41
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
42
|
+
return <p class={cn("text-sm text-muted-foreground leading-relaxed my-3", local.class)} {...rest}>{local.children}</p>;
|
|
43
|
+
}
|
|
44
|
+
export function MdxUl(props: HtmlProps<HTMLUListElement>) {
|
|
45
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
46
|
+
return <ul class={cn("my-4 ml-6 list-disc [&>li]:mt-1.5 text-sm text-muted-foreground", local.class)} {...rest}>{local.children}</ul>;
|
|
47
|
+
}
|
|
48
|
+
export function MdxOl(props: HtmlProps<HTMLOListElement>) {
|
|
49
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
50
|
+
return <ol class={cn("my-4 ml-6 list-decimal [&>li]:mt-1.5 text-sm text-muted-foreground", local.class)} {...rest}>{local.children}</ol>;
|
|
51
|
+
}
|
|
52
|
+
export function MdxLi(props: HtmlProps<HTMLLIElement>) {
|
|
53
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
54
|
+
return <li class={cn("leading-relaxed", local.class)} {...rest}>{local.children}</li>;
|
|
55
|
+
}
|
|
56
|
+
export function MdxA(props: JSX.AnchorHTMLAttributes<HTMLAnchorElement>) {
|
|
57
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
58
|
+
return <a class={cn("font-medium text-foreground underline underline-offset-4 decoration-border hover:decoration-foreground transition-colors", local.class)} {...rest}>{local.children}</a>;
|
|
59
|
+
}
|
|
60
|
+
export function MdxBlockquote(props: HtmlProps<HTMLQuoteElement>) {
|
|
61
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
62
|
+
return <blockquote class={cn("my-4 border-l-2 border-border pl-4 italic text-sm text-muted-foreground", local.class)} {...rest}>{local.children}</blockquote>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function MdxTable(props: HtmlProps<HTMLTableElement>) {
|
|
66
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
67
|
+
return <Core.Table class={cn("my-6 w-full text-left", local.class)} {...rest}>{local.children}</Core.Table>;
|
|
68
|
+
}
|
|
69
|
+
export function MdxThead(props: HtmlProps<HTMLTableSectionElement>) {
|
|
70
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
71
|
+
return <Core.TableHeader class={cn("[&_tr]:border-b border-border", local.class)} {...rest}>{local.children}</Core.TableHeader>;
|
|
72
|
+
}
|
|
73
|
+
export function MdxTbody(props: HtmlProps<HTMLTableSectionElement>) {
|
|
74
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
75
|
+
return <Core.TableBody class={cn("[&_tr:last-child]:border-0", local.class)} {...rest}>{local.children}</Core.TableBody>;
|
|
76
|
+
}
|
|
77
|
+
export function MdxTr(props: HtmlProps<HTMLTableRowElement>) {
|
|
78
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
79
|
+
return <Core.TableRow class={cn("border-b border-border transition-colors hover:bg-muted/50", local.class)} {...rest}>{local.children}</Core.TableRow>;
|
|
80
|
+
}
|
|
81
|
+
export function MdxTh(props: HtmlProps<HTMLTableCellElement>) {
|
|
82
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
83
|
+
return <Core.TableHead class={cn("h-9 px-3 text-left align-middle font-medium text-muted-foreground border-b border-border bg-muted/40 text-xs uppercase tracking-wider", local.class)} {...rest}>{local.children}</Core.TableHead>;
|
|
84
|
+
}
|
|
85
|
+
export function MdxTd(props: HtmlProps<HTMLTableCellElement>) {
|
|
86
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
87
|
+
return <Core.TableCell class={cn("p-3 align-middle text-sm border-b border-border last:border-0", local.class)} {...rest}>{local.children}</Core.TableCell>;
|
|
88
|
+
}
|
|
89
|
+
export function MdxHr(props: JSX.HTMLAttributes<HTMLHRElement>) {
|
|
90
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
91
|
+
return <hr class={cn("my-8 border-border", local.class)} {...rest} />;
|
|
92
|
+
}
|
|
93
|
+
export function MdxCode(props: HtmlProps<HTMLElement>) {
|
|
94
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
95
|
+
const inline = () => !String(local.class || "").includes("language-") && !String(local.class || "").includes("shiki");
|
|
96
|
+
return <code class={cn(inline() ? "rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground font-normal border border-border/50" : "font-mono text-xs", local.class)} {...rest}>{local.children}</code>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function isPackageCommand(code: string, language: string) {
|
|
100
|
+
return /^(bash|sh|shell|zsh)$/i.test(language) && !code.includes("\n") && /^(bun|npm|pnpm|yarn|bunx|npx)\s+/.test(code.trim());
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Preserve Shiki's server-rendered children while using Nikala's code chrome. */
|
|
104
|
+
export function MdxPre(props: any) {
|
|
105
|
+
const [local, rest] = splitProps(props, ["class", "className", "children", "data-code", "data-lang"]);
|
|
106
|
+
const code = String(local["data-code"] || "").trim();
|
|
107
|
+
const language = String(local["data-lang"] || "text");
|
|
108
|
+
if (isPackageCommand(code, language)) return <Core.PackageManagerTabs command={code} />;
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<Core.CodeBlock code={code} language={language} class={cn(local.class || local.className)} {...rest}>
|
|
112
|
+
{local.children}
|
|
113
|
+
</Core.CodeBlock>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function MdxImg(props: JSX.ImgHTMLAttributes<HTMLImageElement>) {
|
|
118
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
119
|
+
return <img class={cn("my-4 max-w-full rounded-lg border border-border", local.class)} {...rest} />;
|
|
120
|
+
}
|
|
121
|
+
export function MdxSup(props: HtmlProps<HTMLElement>) { const [local, rest] = splitProps(props, ["class", "children"]); return <sup class={cn("text-xs", local.class)} {...rest}>{local.children}</sup>; }
|
|
122
|
+
export function MdxSub(props: HtmlProps<HTMLElement>) { const [local, rest] = splitProps(props, ["class", "children"]); return <sub class={cn("text-xs", local.class)} {...rest}>{local.children}</sub>; }
|
|
123
|
+
export function MdxSpan(props: HtmlProps<HTMLSpanElement>) { const [local, rest] = splitProps(props, ["children"]); return <span {...rest}>{local.children}</span>; }
|
|
124
|
+
export function MdxDiv(props: HtmlProps<HTMLDivElement>) { const [local, rest] = splitProps(props, ["children"]); return <div {...rest}>{local.children}</div>; }
|
|
125
|
+
export function MdxSection(props: HtmlProps<HTMLElement>) { const [local, rest] = splitProps(props, ["children"]); return <section {...rest}>{local.children}</section>; }
|
|
126
|
+
|
|
127
|
+
const markdownComponents = {
|
|
128
|
+
h1: MdxH1, h2: MdxH2, h3: MdxH3, h4: MdxH4, h5: MdxH5, h6: MdxH6,
|
|
129
|
+
p: MdxP, ul: MdxUl, ol: MdxOl, li: MdxLi, a: MdxA, blockquote: MdxBlockquote,
|
|
130
|
+
table: MdxTable, thead: MdxThead, tbody: MdxTbody, tr: MdxTr, th: MdxTh, td: MdxTd,
|
|
131
|
+
hr: MdxHr, code: MdxCode, pre: MdxPre, span: MdxSpan, div: MdxDiv, section: MdxSection,
|
|
132
|
+
strong: (props: HtmlProps<HTMLElement>) => <strong {...props} class="font-semibold text-foreground" />,
|
|
133
|
+
b: (props: HtmlProps<HTMLElement>) => <strong {...props} class="font-semibold text-foreground" />,
|
|
134
|
+
em: (props: HtmlProps<HTMLElement>) => <em {...props} class="italic" />,
|
|
135
|
+
i: (props: HtmlProps<HTMLElement>) => <em {...props} class="italic" />,
|
|
136
|
+
del: (props: HtmlProps<HTMLModElement>) => <del {...props} class="line-through opacity-70" />,
|
|
137
|
+
s: (props: HtmlProps<HTMLModElement>) => <del {...props} class="line-through opacity-70" />,
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/** Merge every export from the consumer's local Nikala barrel automatically. */
|
|
141
|
+
export const defaultMdxComponents = {
|
|
142
|
+
...markdownComponents,
|
|
143
|
+
...Core,
|
|
144
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
splitProps,
|
|
3
|
+
For,
|
|
4
|
+
Show,
|
|
5
|
+
type JSX,
|
|
6
|
+
type Component,
|
|
7
|
+
} from "solid-js";
|
|
8
|
+
import { SectionHeading } from "@/components/ui/section-heading";
|
|
9
|
+
import {
|
|
10
|
+
Table,
|
|
11
|
+
TableHeader,
|
|
12
|
+
TableBody,
|
|
13
|
+
TableRow,
|
|
14
|
+
TableHead,
|
|
15
|
+
TableCell,
|
|
16
|
+
} from "@/components/ui/table";
|
|
17
|
+
import { cn } from "@/lib/cn";
|
|
18
|
+
|
|
19
|
+
export interface ApiTableItem {
|
|
20
|
+
/** Property, attribute, or method name */
|
|
21
|
+
prop: string;
|
|
22
|
+
/** TypeScript type definition string */
|
|
23
|
+
type: string;
|
|
24
|
+
/** Default value if optional */
|
|
25
|
+
default?: string;
|
|
26
|
+
/** Detailed description of purpose and usage */
|
|
27
|
+
description: string;
|
|
28
|
+
/** Whether the property is strictly required */
|
|
29
|
+
required?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ApiTableProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
33
|
+
/** Title header for this API section (e.g. component or interface name) */
|
|
34
|
+
title?: string;
|
|
35
|
+
/** Subtitle or explanatory note */
|
|
36
|
+
description?: string;
|
|
37
|
+
/** Badge label next to the title (defaults to "Props") */
|
|
38
|
+
badge?: string;
|
|
39
|
+
/** List of API properties to render in the table */
|
|
40
|
+
items: ApiTableItem[];
|
|
41
|
+
class?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Clean, structured API reference table component composed from Table and Badge primitives.
|
|
46
|
+
*/
|
|
47
|
+
export const ApiTable: Component<ApiTableProps> = (props) => {
|
|
48
|
+
const [local, rest] = splitProps(props, [
|
|
49
|
+
"title",
|
|
50
|
+
"description",
|
|
51
|
+
"badge",
|
|
52
|
+
"items",
|
|
53
|
+
"class",
|
|
54
|
+
]);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div class={cn("my-6 space-y-3", local.class)} {...rest}>
|
|
58
|
+
{/* Header */}
|
|
59
|
+
<Show when={local.title}>
|
|
60
|
+
<SectionHeading
|
|
61
|
+
variant="compact"
|
|
62
|
+
title={local.title!}
|
|
63
|
+
badge={local.badge || "Props"}
|
|
64
|
+
description={local.description}
|
|
65
|
+
/>
|
|
66
|
+
</Show>
|
|
67
|
+
|
|
68
|
+
{/* Responsive Table Container Composed from Nikala Table Primitives */}
|
|
69
|
+
<div class="rounded-lg border border-border bg-card/50 shadow-2xs overflow-hidden">
|
|
70
|
+
<Table class="text-xs">
|
|
71
|
+
<TableHeader class="bg-muted/40 font-mono text-[11px] uppercase tracking-wider text-muted-foreground select-none">
|
|
72
|
+
<TableRow class="hover:bg-transparent">
|
|
73
|
+
<TableHead class="h-9 px-4 font-semibold">Prop</TableHead>
|
|
74
|
+
<TableHead class="h-9 px-4 font-semibold">Type</TableHead>
|
|
75
|
+
<TableHead class="h-9 px-4 font-semibold">Default</TableHead>
|
|
76
|
+
<TableHead class="h-9 px-4 font-semibold">Description</TableHead>
|
|
77
|
+
</TableRow>
|
|
78
|
+
</TableHeader>
|
|
79
|
+
<TableBody class="font-mono text-xs">
|
|
80
|
+
<For each={local.items}>
|
|
81
|
+
{(item) => (
|
|
82
|
+
<TableRow class="transition-colors hover:bg-muted/20">
|
|
83
|
+
<TableCell class="px-4 py-3 font-semibold text-primary">
|
|
84
|
+
<span class="inline-flex items-center gap-1">
|
|
85
|
+
{item.prop}
|
|
86
|
+
<Show when={item.required}>
|
|
87
|
+
<span class="text-rose-500 font-bold" title="Required">*</span>
|
|
88
|
+
</Show>
|
|
89
|
+
</span>
|
|
90
|
+
</TableCell>
|
|
91
|
+
<TableCell class="px-4 py-3 text-muted-foreground">
|
|
92
|
+
<code class="rounded-md bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground">
|
|
93
|
+
{item.type}
|
|
94
|
+
</code>
|
|
95
|
+
</TableCell>
|
|
96
|
+
<TableCell class="px-4 py-3 text-muted-foreground">
|
|
97
|
+
<Show
|
|
98
|
+
when={item.default}
|
|
99
|
+
fallback={<span class="text-muted-foreground/40 font-mono">-</span>}
|
|
100
|
+
>
|
|
101
|
+
<code class="rounded-md bg-muted/60 px-1 py-0.5 font-mono text-[11px]">
|
|
102
|
+
{item.default}
|
|
103
|
+
</code>
|
|
104
|
+
</Show>
|
|
105
|
+
</TableCell>
|
|
106
|
+
<TableCell class="px-4 py-3 font-sans font-normal leading-relaxed text-muted-foreground">
|
|
107
|
+
{item.description}
|
|
108
|
+
</TableCell>
|
|
109
|
+
</TableRow>
|
|
110
|
+
)}
|
|
111
|
+
</For>
|
|
112
|
+
</TableBody>
|
|
113
|
+
</Table>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
);
|
|
117
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Class variance authority configuration for badge styling variants.
|
|
7
|
+
*/
|
|
8
|
+
export const badgeVariants = cva(
|
|
9
|
+
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default:
|
|
14
|
+
"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
15
|
+
secondary:
|
|
16
|
+
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
17
|
+
destructive:
|
|
18
|
+
"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
19
|
+
outline:
|
|
20
|
+
"text-foreground border-border",
|
|
21
|
+
success:
|
|
22
|
+
"border-transparent bg-green-600 text-zinc-50 shadow-sm hover:bg-green-600/90 dark:bg-green-900 dark:text-zinc-50 dark:hover:bg-green-900/90",
|
|
23
|
+
warning:
|
|
24
|
+
"border-transparent bg-yellow-600 text-zinc-50 shadow-sm hover:bg-yellow-600/90 dark:bg-yellow-900 dark:text-zinc-50 dark:hover:bg-yellow-900/90",
|
|
25
|
+
info:
|
|
26
|
+
"border-transparent bg-blue-600 text-zinc-50 shadow-sm hover:bg-blue-600/90 dark:bg-blue-900 dark:text-zinc-50 dark:hover:bg-blue-900/90",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Props interface for the Badge component extending standard HTML div attributes.
|
|
37
|
+
*/
|
|
38
|
+
export interface BadgeProps
|
|
39
|
+
extends JSX.HTMLAttributes<HTMLDivElement>,
|
|
40
|
+
VariantProps<typeof badgeVariants> {
|
|
41
|
+
class?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Nikala UI Badge component built for SolidJS with Tailwind CSS v4 styling.
|
|
46
|
+
*/
|
|
47
|
+
export const Badge: Component<BadgeProps> = (props) => {
|
|
48
|
+
// Use splitProps to preserve SolidJS reactivity
|
|
49
|
+
const [local, rest] = splitProps(props, ["variant", "class", "children"]);
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<div class={cn(badgeVariants({ variant: local.variant }), local.class)} {...rest}>
|
|
53
|
+
{local.children}
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { splitProps, type Component, type JSX } from "solid-js";
|
|
2
|
+
import { cn } from "@/lib/cn";
|
|
3
|
+
|
|
4
|
+
export interface BreadcrumbProps extends JSX.HTMLAttributes<HTMLElement> {
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Root navigation container for the Nikala UI Breadcrumb hierarchy.
|
|
10
|
+
*/
|
|
11
|
+
export const Breadcrumb: Component<BreadcrumbProps> = (props) => {
|
|
12
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
13
|
+
return <nav aria-label="breadcrumb" class={cn("relative w-full", local.class)} {...rest} />;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export interface BreadcrumbListProps extends JSX.HTMLAttributes<HTMLOListElement> {
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Ordered list container housing all breadcrumb path items.
|
|
22
|
+
*/
|
|
23
|
+
export const BreadcrumbList: Component<BreadcrumbListProps> = (props) => {
|
|
24
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
25
|
+
return (
|
|
26
|
+
<ol
|
|
27
|
+
class={cn(
|
|
28
|
+
"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground break-words sm:gap-2.5",
|
|
29
|
+
local.class
|
|
30
|
+
)}
|
|
31
|
+
{...rest}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export interface BreadcrumbItemProps extends JSX.HTMLAttributes<HTMLLIElement> {
|
|
37
|
+
class?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Individual list item element wrapper in the breadcrumb hierarchy.
|
|
42
|
+
*/
|
|
43
|
+
export const BreadcrumbItem: Component<BreadcrumbItemProps> = (props) => {
|
|
44
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
45
|
+
return <li class={cn("inline-flex items-center gap-1.5", local.class)} {...rest} />;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export interface BreadcrumbLinkProps extends JSX.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
49
|
+
class?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Clickable breadcrumb trail link element.
|
|
54
|
+
*/
|
|
55
|
+
export const BreadcrumbLink: Component<BreadcrumbLinkProps> = (props) => {
|
|
56
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
57
|
+
return (
|
|
58
|
+
<a
|
|
59
|
+
class={cn(
|
|
60
|
+
"transition-colors hover:text-foreground underline-offset-4 hover:underline",
|
|
61
|
+
local.class
|
|
62
|
+
)}
|
|
63
|
+
{...rest}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export interface BreadcrumbPageProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
69
|
+
class?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Non-clickable active page indicator in breadcrumb hierarchy.
|
|
74
|
+
*/
|
|
75
|
+
export const BreadcrumbPage: Component<BreadcrumbPageProps> = (props) => {
|
|
76
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
77
|
+
return (
|
|
78
|
+
<span
|
|
79
|
+
role="link"
|
|
80
|
+
aria-disabled="true"
|
|
81
|
+
aria-current="page"
|
|
82
|
+
class={cn("font-normal text-foreground", local.class)}
|
|
83
|
+
{...rest}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export interface BreadcrumbSeparatorProps extends JSX.HTMLAttributes<HTMLLIElement> {
|
|
89
|
+
class?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Visual separator icon rendered between breadcrumb path links.
|
|
94
|
+
*/
|
|
95
|
+
export const BreadcrumbSeparator: Component<BreadcrumbSeparatorProps> = (props) => {
|
|
96
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
97
|
+
return (
|
|
98
|
+
<li
|
|
99
|
+
role="presentation"
|
|
100
|
+
aria-hidden="true"
|
|
101
|
+
class={cn("[&>svg]:size-3.5 text-muted-foreground", local.class)}
|
|
102
|
+
{...rest}
|
|
103
|
+
>
|
|
104
|
+
{local.children || (
|
|
105
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
106
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
|
|
107
|
+
</svg>
|
|
108
|
+
)}
|
|
109
|
+
</li>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export interface BreadcrumbEllipsisProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
114
|
+
class?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Ellipsis element representing truncated intermediate breadcrumb items.
|
|
119
|
+
*/
|
|
120
|
+
export const BreadcrumbEllipsis: Component<BreadcrumbEllipsisProps> = (props) => {
|
|
121
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
122
|
+
return (
|
|
123
|
+
<span
|
|
124
|
+
role="presentation"
|
|
125
|
+
aria-hidden="true"
|
|
126
|
+
class={cn("flex h-9 w-9 items-center justify-center text-muted-foreground", local.class)}
|
|
127
|
+
{...rest}
|
|
128
|
+
>
|
|
129
|
+
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
130
|
+
<circle cx="12" cy="12" r="1" />
|
|
131
|
+
<circle cx="19" cy="12" r="1" />
|
|
132
|
+
<circle cx="5" cy="12" r="1" />
|
|
133
|
+
</svg>
|
|
134
|
+
</span>
|
|
135
|
+
);
|
|
136
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
import { Spinner } from "@/components/ui/spinner";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Class variance authority configuration for button styling variants and sizes.
|
|
8
|
+
*/
|
|
9
|
+
export const buttonVariants = cva(
|
|
10
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default:
|
|
15
|
+
"bg-primary text-primary-foreground shadow hover:bg-primary/90 border border-primary/50",
|
|
16
|
+
destructive:
|
|
17
|
+
"bg-red-600 text-zinc-50 shadow-sm hover:bg-red-600/90 dark:bg-red-900 dark:text-zinc-50 dark:hover:bg-red-900/90",
|
|
18
|
+
outline:
|
|
19
|
+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
20
|
+
secondary:
|
|
21
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80 border border-border",
|
|
22
|
+
ghost:
|
|
23
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
24
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
25
|
+
success: "*:bg-green-600 text-zinc-50 shadow-sm hover:bg-green-600/90 dark:bg-green-900 dark:text-zinc-50 dark:hover:bg-green-900/90",
|
|
26
|
+
warning: "*:bg-yellow-600 text-zinc-50 shadow-sm hover:bg-yellow-600/90 dark:bg-yellow-900 dark:text-zinc-50 dark:hover:bg-yellow-900/90",
|
|
27
|
+
info: "*:bg-blue-600 text-zinc-50 shadow-sm hover:bg-blue-600/90 dark:bg-blue-900 dark:text-zinc-50 dark:hover:bg-blue-900/90",
|
|
28
|
+
},
|
|
29
|
+
size: {
|
|
30
|
+
xs: "h-6 rounded-md px-2 text-xs",
|
|
31
|
+
default: "h-9 px-4 py-2",
|
|
32
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
33
|
+
lg: "h-10 rounded-md px-8",
|
|
34
|
+
icon: "h-9 w-9",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: "default",
|
|
39
|
+
size: "default",
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Props interface for the Button component extending standard HTML button attributes.
|
|
46
|
+
*/
|
|
47
|
+
export interface ButtonProps
|
|
48
|
+
extends JSX.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
49
|
+
VariantProps<typeof buttonVariants> {
|
|
50
|
+
/** Shows a loading spinner and prevents repeated clicks while active. */
|
|
51
|
+
loading?: boolean;
|
|
52
|
+
class?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Nikala UI Button component built for SolidJS with Tailwind CSS v4 styling.
|
|
57
|
+
*/
|
|
58
|
+
export const Button: Component<ButtonProps> = (props) => {
|
|
59
|
+
// Use splitProps to preserve SolidJS reactivity for destructured props
|
|
60
|
+
const [local, rest] = splitProps(props, [
|
|
61
|
+
"variant",
|
|
62
|
+
"size",
|
|
63
|
+
"class",
|
|
64
|
+
"children",
|
|
65
|
+
"loading",
|
|
66
|
+
"disabled",
|
|
67
|
+
]);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<button
|
|
71
|
+
class={cn(buttonVariants({ variant: local.variant, size: local.size }), local.class)}
|
|
72
|
+
disabled={local.disabled || local.loading}
|
|
73
|
+
aria-busy={local.loading ? "true" : undefined}
|
|
74
|
+
{...rest}
|
|
75
|
+
>
|
|
76
|
+
<Show when={local.loading}>
|
|
77
|
+
<Spinner size="sm" class="text-current" />
|
|
78
|
+
</Show>
|
|
79
|
+
{local.children}
|
|
80
|
+
</button>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import {
|
|
2
|
+
splitProps,
|
|
3
|
+
Show,
|
|
4
|
+
type Component,
|
|
5
|
+
type JSX,
|
|
6
|
+
type ParentComponent,
|
|
7
|
+
} from "solid-js";
|
|
8
|
+
import { Dynamic } from "solid-js/web";
|
|
9
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
10
|
+
import {
|
|
11
|
+
Info,
|
|
12
|
+
Lightbulb,
|
|
13
|
+
AlertTriangle,
|
|
14
|
+
AlertCircle,
|
|
15
|
+
CheckCircle2,
|
|
16
|
+
Bookmark,
|
|
17
|
+
} from "lucide-solid";
|
|
18
|
+
import { cn } from "@/lib/cn";
|
|
19
|
+
|
|
20
|
+
export const calloutVariants = cva(
|
|
21
|
+
"relative w-full rounded-lg border p-4 text-sm leading-relaxed transition-colors",
|
|
22
|
+
{
|
|
23
|
+
variants: {
|
|
24
|
+
variant: {
|
|
25
|
+
note: "border-border/80 bg-muted/50 text-foreground [&>svg]:text-foreground",
|
|
26
|
+
info: "border-sky-500/30 bg-sky-500/10 text-sky-950 dark:text-sky-100 [&>svg]:text-sky-600 dark:[&>svg]:text-sky-400",
|
|
27
|
+
tip: "border-emerald-500/30 bg-emerald-500/10 text-emerald-950 dark:text-emerald-100 [&>svg]:text-emerald-600 dark:[&>svg]:text-emerald-400",
|
|
28
|
+
warning: "border-amber-500/30 bg-amber-500/10 text-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",
|
|
29
|
+
danger: "border-destructive/30 bg-destructive/10 text-destructive dark:text-red-200 [&>svg]:text-destructive",
|
|
30
|
+
success: "border-emerald-500/30 bg-emerald-500/10 text-emerald-950 dark:text-emerald-100 [&>svg]:text-emerald-600 dark:[&>svg]:text-emerald-400",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: "note",
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const defaultIcons = {
|
|
40
|
+
note: Bookmark,
|
|
41
|
+
info: Info,
|
|
42
|
+
tip: Lightbulb,
|
|
43
|
+
warning: AlertTriangle,
|
|
44
|
+
danger: AlertCircle,
|
|
45
|
+
success: CheckCircle2,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export interface CalloutProps
|
|
49
|
+
extends JSX.HTMLAttributes<HTMLDivElement>,
|
|
50
|
+
VariantProps<typeof calloutVariants> {
|
|
51
|
+
title?: string;
|
|
52
|
+
type?: VariantProps<typeof calloutVariants>["variant"];
|
|
53
|
+
icon?: Component<{ class?: string }> | false;
|
|
54
|
+
class?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const Callout: ParentComponent<CalloutProps> = (props) => {
|
|
58
|
+
const [local, rest] = splitProps(props, [
|
|
59
|
+
"variant",
|
|
60
|
+
"type",
|
|
61
|
+
"title",
|
|
62
|
+
"icon",
|
|
63
|
+
"class",
|
|
64
|
+
"children",
|
|
65
|
+
]);
|
|
66
|
+
|
|
67
|
+
const variant = () => local.variant || local.type || "note";
|
|
68
|
+
|
|
69
|
+
const IconComponent = () => {
|
|
70
|
+
if (local.icon === false) return null;
|
|
71
|
+
if (local.icon) return local.icon;
|
|
72
|
+
return defaultIcons[variant()] || Info;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<div
|
|
77
|
+
role="region"
|
|
78
|
+
aria-label={local.title || `${variant()} callout`}
|
|
79
|
+
class={cn(
|
|
80
|
+
calloutVariants({ variant: variant() }),
|
|
81
|
+
"flex gap-3.5 items-start",
|
|
82
|
+
local.class
|
|
83
|
+
)}
|
|
84
|
+
{...rest}
|
|
85
|
+
>
|
|
86
|
+
<Show when={IconComponent()}>
|
|
87
|
+
{(Icon) => (
|
|
88
|
+
<span class="inline-flex shrink-0 items-center justify-center mt-0.5 select-none">
|
|
89
|
+
<Dynamic component={Icon()} class="size-4.5 shrink-0" />
|
|
90
|
+
</span>
|
|
91
|
+
)}
|
|
92
|
+
</Show>
|
|
93
|
+
<div class="flex-1 space-y-1 min-w-0">
|
|
94
|
+
<Show when={local.title}>
|
|
95
|
+
<h5 class="font-semibold text-sm leading-none tracking-tight">
|
|
96
|
+
{local.title}
|
|
97
|
+
</h5>
|
|
98
|
+
</Show>
|
|
99
|
+
<div class="text-sm opacity-90 leading-relaxed break-words">
|
|
100
|
+
{local.children}
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export interface CalloutTitleProps extends JSX.HTMLAttributes<HTMLHeadingElement> {
|
|
108
|
+
class?: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const CalloutTitle: ParentComponent<CalloutTitleProps> = (props) => {
|
|
112
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
113
|
+
return (
|
|
114
|
+
<h5
|
|
115
|
+
class={cn("font-semibold text-sm leading-none tracking-tight mb-1", local.class)}
|
|
116
|
+
{...rest}
|
|
117
|
+
>
|
|
118
|
+
{local.children}
|
|
119
|
+
</h5>
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export interface CalloutDescriptionProps extends JSX.HTMLAttributes<HTMLParagraphElement> {
|
|
124
|
+
class?: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const CalloutDescription: ParentComponent<CalloutDescriptionProps> = (props) => {
|
|
128
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
129
|
+
return (
|
|
130
|
+
<div
|
|
131
|
+
class={cn("text-sm opacity-90 leading-relaxed", local.class)}
|
|
132
|
+
{...rest}
|
|
133
|
+
>
|
|
134
|
+
{local.children}
|
|
135
|
+
</div>
|
|
136
|
+
);
|
|
137
|
+
};
|