@nikala-ui/core 0.9.9 → 0.9.10

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.
Files changed (44) hide show
  1. package/package.json +1 -1
  2. package/registry/accordion.json +1 -1
  3. package/registry/avatar.json +1 -1
  4. package/registry/badge.json +1 -1
  5. package/registry/button.json +1 -1
  6. package/registry/checkbox.json +1 -1
  7. package/registry/command.json +1 -1
  8. package/registry/dialog.json +1 -1
  9. package/registry/dropdown-menu.json +1 -1
  10. package/registry/index.json +10 -0
  11. package/registry/input-group.json +1 -1
  12. package/registry/input.json +1 -1
  13. package/registry/list.json +1 -1
  14. package/registry/logo.json +17 -0
  15. package/registry/popover.json +1 -1
  16. package/registry/progress.json +1 -1
  17. package/registry/select.json +1 -1
  18. package/registry/skeleton.json +1 -1
  19. package/registry/switch.json +1 -1
  20. package/registry/tabs.json +1 -1
  21. package/registry/textarea.json +1 -1
  22. package/registry/theme-manager.json +1 -1
  23. package/registry/toast.json +1 -1
  24. package/src/registry/components/ui/accordion.tsx +0 -4
  25. package/src/registry/components/ui/avatar.tsx +1 -1
  26. package/src/registry/components/ui/badge.tsx +6 -0
  27. package/src/registry/components/ui/button.tsx +6 -2
  28. package/src/registry/components/ui/checkbox.tsx +1 -1
  29. package/src/registry/components/ui/command.tsx +15 -15
  30. package/src/registry/components/ui/dialog.tsx +3 -3
  31. package/src/registry/components/ui/dropdown-menu.tsx +5 -5
  32. package/src/registry/components/ui/input-group.tsx +2 -2
  33. package/src/registry/components/ui/input.tsx +1 -1
  34. package/src/registry/components/ui/list.tsx +5 -5
  35. package/src/registry/components/ui/logo.tsx +68 -0
  36. package/src/registry/components/ui/popover.tsx +1 -1
  37. package/src/registry/components/ui/progress.tsx +2 -2
  38. package/src/registry/components/ui/select.tsx +2 -2
  39. package/src/registry/components/ui/skeleton.tsx +1 -1
  40. package/src/registry/components/ui/switch.tsx +2 -2
  41. package/src/registry/components/ui/tabs.tsx +1 -1
  42. package/src/registry/components/ui/textarea.tsx +1 -1
  43. package/src/registry/components/ui/theme-toggle.tsx +1 -1
  44. package/src/registry/components/ui/toast.tsx +1 -1
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "ui/textarea.tsx",
13
- "content": "// src/components/ui/textarea.tsx\nimport {\n createSignal,\n splitProps,\n Show,\n type Component,\n type JSX,\n} from \"solid-js\";\nimport { cn } from \"@/lib/cn\";\n\nexport interface TextareaProps\n extends JSX.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Uncontrolled initial default value */\n defaultValue?: string | number;\n /** Maximum allowed character limit */\n maxLength?: number;\n /** Whether to show live character count badge */\n showCount?: boolean;\n class?: string;\n}\n\n/**\n * Nikala UI Textarea component with optional live character counter and limit indicators.\n */\nexport const Textarea: Component<TextareaProps> = (props) => {\n const [local, rest] = splitProps(props, [\n \"maxLength\",\n \"showCount\",\n \"value\",\n \"defaultValue\",\n \"onInput\",\n \"class\",\n ]);\n\n /* Internal reactive signal for character count tracking */\n const [currentValue, setCurrentValue] = createSignal<string>(\n String(local.value || local.defaultValue || \"\")\n );\n\n const handleInput: JSX.EventHandlerUnion<HTMLTextAreaElement, InputEvent> = (\n e\n ) => {\n setCurrentValue(e.currentTarget.value);\n if (typeof local.onInput === \"function\") {\n (local.onInput as (e: InputEvent) => void)(e);\n }\n };\n\n const count = () => currentValue().length;\n const isAtLimit = () =>\n local.maxLength !== undefined && count() >= local.maxLength;\n\n return (\n <div class=\"relative flex flex-col w-full\">\n <textarea\n value={local.value !== undefined ? String(local.value) : currentValue()}\n maxLength={local.maxLength}\n onInput={handleInput}\n class={cn(\n \"flex min-h-[80px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-2xs transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n local.class\n )}\n {...rest}\n />\n\n {/* Dynamic Character Counter */}\n <Show when={local.showCount ?? Boolean(local.maxLength)}>\n <div\n class={cn(\n \"mt-1 text-right text-[11px] font-mono transition-colors select-none\",\n isAtLimit() ? \"text-rose-500 font-bold\" : \"text-muted-foreground\"\n )}\n >\n <span>{count()}</span>\n <Show when={local.maxLength}>\n <span> / {local.maxLength}</span>\n </Show>\n </div>\n </Show>\n </div>\n );\n};",
13
+ "content": "// src/components/ui/textarea.tsx\nimport {\n createSignal,\n splitProps,\n Show,\n type Component,\n type JSX,\n} from \"solid-js\";\nimport { cn } from \"@/lib/cn\";\n\nexport interface TextareaProps\n extends JSX.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Uncontrolled initial default value */\n defaultValue?: string | number;\n /** Maximum allowed character limit */\n maxLength?: number;\n /** Whether to show live character count badge */\n showCount?: boolean;\n class?: string;\n}\n\n/**\n * Nikala UI Textarea component with optional live character counter and limit indicators.\n */\nexport const Textarea: Component<TextareaProps> = (props) => {\n const [local, rest] = splitProps(props, [\n \"maxLength\",\n \"showCount\",\n \"value\",\n \"defaultValue\",\n \"onInput\",\n \"class\",\n ]);\n\n /* Internal reactive signal for character count tracking */\n const [currentValue, setCurrentValue] = createSignal<string>(\n String(local.value || local.defaultValue || \"\")\n );\n\n const handleInput: JSX.EventHandlerUnion<HTMLTextAreaElement, InputEvent> = (\n e\n ) => {\n setCurrentValue(e.currentTarget.value);\n if (typeof local.onInput === \"function\") {\n (local.onInput as (e: InputEvent) => void)(e);\n }\n };\n\n const count = () => currentValue().length;\n const isAtLimit = () =>\n local.maxLength !== undefined && count() >= local.maxLength;\n\n return (\n <div class=\"relative flex flex-col w-full\">\n <textarea\n value={local.value !== undefined ? String(local.value) : currentValue()}\n maxLength={local.maxLength}\n onInput={handleInput}\n class={cn(\n \"flex min-h-20 w-full rounded-md border border-input bg-muted px-3 py-2 text-base shadow-2xs transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n local.class\n )}\n {...rest}\n />\n\n {/* Dynamic Character Counter */}\n <Show when={local.showCount ?? Boolean(local.maxLength)}>\n <div\n class={cn(\n \"mt-1 text-right text-[11px] font-mono transition-colors select-none\",\n isAtLimit() ? \"text-rose-500 font-bold\" : \"text-muted-foreground\"\n )}\n >\n <span>{count()}</span>\n <Show when={local.maxLength}>\n <span> / {local.maxLength}</span>\n </Show>\n </div>\n </Show>\n </div>\n );\n};",
14
14
  "type": "registry:ui"
15
15
  }
16
16
  ]
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "path": "ui/theme-toggle.tsx",
34
- "content": "import { splitProps, type Component, For, Show } from \"solid-js\";\nimport { Sun, Moon, Monitor } from \"lucide-solid\";\nimport {\n useTheme,\n type AccentColor,\n type Radius,\n type Theme,\n} from \"../../providers/theme-provider\";\nimport {\n runThemeTransition,\n type ThemeEffect,\n} from \"../../providers/theme-transitions\";\nimport { Button } from \"./button\";\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n} from \"./dropdown-menu\";\nimport { cn } from \"@/lib/cn\";\n\nimport { createColorMode } from \"@nikala-ui/hooks\";\n\nexport interface ThemeToggleProps {\n /** Display mode: \"mini\" for compact dropdown, \"max\" for full customizer panel (default: \"mini\") */\n mode?: \"mini\" | \"max\";\n /** Transition animation effect when changing themes (\"none\", \"circular\", \"fade\") */\n effect?: ThemeEffect;\n class?: string;\n}\n\nconst ACCENT_OPTIONS: { name: AccentColor; label: string; color: string }[] = [\n { name: \"wine\", label: \"Wine\", color: \"bg-[#722f37]\" },\n { name: \"violet\", label: \"Violet\", color: \"bg-[#7c3aed]\" },\n { name: \"sky\", label: \"Sky\", color: \"bg-[#0284c7]\" },\n { name: \"emerald\", label: \"Emerald\", color: \"bg-[#059669]\" },\n { name: \"rose\", label: \"Rose\", color: \"bg-[#e11d48]\" },\n { name: \"amber\", label: \"Amber\", color: \"bg-[#d97706]\" },\n { name: \"zinc\", label: \"Zinc\", color: \"bg-[#18181b]\" },\n];\n\nconst RADIUS_OPTIONS: { value: Radius; label: string }[] = [\n { value: \"0\", label: \"0\" },\n { value: \"0.3\", label: \"0.3\" },\n { value: \"0.5\", label: \"0.5\" },\n { value: \"0.75\", label: \"0.75\" },\n { value: \"1.0\", label: \"1.0\" },\n];\n\n/**\n * Interactive UI theme switcher supporting mini/max modes and View Transition animations.\n */\nexport const ThemeToggle: Component<ThemeToggleProps> = (props) => {\n const [local] = splitProps(props, [\"mode\", \"effect\", \"class\"]);\n const { theme, setTheme, accent, setAccent, radius, setRadius } = useTheme();\n\n const colorMode = createColorMode({\n initialValue: theme(),\n storageKey: \"nikala-theme-mode\",\n });\n\n const mode = () => local.mode || \"mini\";\n const effect = () => local.effect || \"none\";\n\n /* Reactive accessor determining whether dark mode is active via createColorMode hook */\n const isDarkMode = () => {\n const currentTheme = theme();\n if (currentTheme === \"dark\") return true;\n if (currentTheme === \"light\") return false;\n return colorMode.isDark();\n };\n\n const changeThemeWithEffect = (newTheme: Theme, e: MouseEvent) => {\n runThemeTransition(effect(), e, () => {\n setTheme(newTheme);\n colorMode.setMode(newTheme);\n });\n };\n\n return (\n <DropdownMenu placement=\"bottom-end\">\n <DropdownMenuTrigger\n as={Button}\n variant=\"outline\"\n size=\"icon\"\n class={cn(\"relative h-9 w-9 cursor-pointer\", local.class)}\n >\n {/* Reactive Sun / Moon Icon Toggle */}\n <Show\n when={isDarkMode()}\n fallback={<Sun class=\"h-4 w-4 text-foreground transition-transform\" />}\n >\n <Moon class=\"h-4 w-4 text-foreground transition-transform\" />\n </Show>\n\n <span class=\"sr-only\">Toggle theme</span>\n </DropdownMenuTrigger>\n\n <Show\n when={mode() === \"max\"}\n fallback={\n /* Mini Mode: Compact Dropdown */\n <DropdownMenuContent>\n <DropdownMenuItem onClick={(e: MouseEvent) => changeThemeWithEffect(\"light\", e)}>\n <Sun class=\"mr-2 h-4 w-4 text-muted-foreground\" />\n Light\n </DropdownMenuItem>\n\n <DropdownMenuItem onClick={(e: MouseEvent) => changeThemeWithEffect(\"dark\", e)}>\n <Moon class=\"mr-2 h-4 w-4 text-muted-foreground\" />\n Dark\n </DropdownMenuItem>\n\n <DropdownMenuItem onClick={(e: MouseEvent) => changeThemeWithEffect(\"system\", e)}>\n <Monitor class=\"mr-2 h-4 w-4 text-muted-foreground\" />\n System\n </DropdownMenuItem>\n </DropdownMenuContent>\n }\n >\n {/* Max Mode: Full Theme Customizer Panel */}\n <DropdownMenuContent class=\"w-64 p-3\">\n <DropdownMenuLabel class=\"px-0 pt-0 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n Theme Mode\n </DropdownMenuLabel>\n <div class=\"grid grid-cols-3 gap-1 my-1.5\">\n <Button\n variant={theme() === \"light\" ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={(e: MouseEvent) => changeThemeWithEffect(\"light\", e)}\n class=\"h-8 text-xs cursor-pointer\"\n >\n Light\n </Button>\n <Button\n variant={theme() === \"dark\" ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={(e: MouseEvent) => changeThemeWithEffect(\"dark\", e)}\n class=\"h-8 text-xs cursor-pointer\"\n >\n Dark\n </Button>\n <Button\n variant={theme() === \"system\" ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={(e: MouseEvent) => changeThemeWithEffect(\"system\", e)}\n class=\"h-8 text-xs cursor-pointer\"\n >\n System\n </Button>\n </div>\n\n <DropdownMenuSeparator class=\"my-2\" />\n\n <DropdownMenuLabel class=\"px-0 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n Brand Accent Color\n </DropdownMenuLabel>\n <div class=\"flex flex-wrap gap-1.5 my-1.5\">\n <For each={ACCENT_OPTIONS}>\n {(opt) => (\n <button\n type=\"button\"\n title={opt.label}\n onClick={() => setAccent(opt.name)}\n class={cn(\n \"h-6 w-6 rounded-md transition-all cursor-pointer border border-border flex items-center justify-center\",\n opt.color,\n accent() === opt.name ? \"ring-2 ring-primary ring-offset-2 ring-offset-background scale-110\" : \"hover:scale-105\"\n )}\n />\n )}\n </For>\n </div>\n\n <DropdownMenuSeparator class=\"my-2\" />\n\n <DropdownMenuLabel class=\"px-0 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n Border Radius\n </DropdownMenuLabel>\n <div class=\"grid grid-cols-5 gap-1 my-1.5\">\n <For each={RADIUS_OPTIONS}>\n {(r) => (\n <Button\n variant={radius() === r.value ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => setRadius(r.value)}\n class=\"h-7 text-xs px-1 cursor-pointer\"\n >\n {r.label}\n </Button>\n )}\n </For>\n </div>\n </DropdownMenuContent>\n </Show>\n </DropdownMenu>\n );\n};",
34
+ "content": "import { splitProps, type Component, For, Show } from \"solid-js\";\nimport { Sun, Moon, Monitor } from \"lucide-solid\";\nimport {\n useTheme,\n type AccentColor,\n type Radius,\n type Theme,\n} from \"../../providers/theme-provider\";\nimport {\n runThemeTransition,\n type ThemeEffect,\n} from \"../../providers/theme-transitions\";\nimport { Button } from \"./button\";\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n} from \"./dropdown-menu\";\nimport { cn } from \"@/lib/cn\";\n\nimport { createColorMode } from \"@nikala-ui/hooks\";\n\nexport interface ThemeToggleProps {\n /** Display mode: \"mini\" for compact dropdown, \"max\" for full customizer panel (default: \"mini\") */\n mode?: \"mini\" | \"max\";\n /** Transition animation effect when changing themes (\"none\", \"circular\", \"fade\") */\n effect?: ThemeEffect;\n class?: string;\n}\n\nconst ACCENT_OPTIONS: { name: AccentColor; label: string; color: string }[] = [\n { name: \"wine\", label: \"Wine\", color: \"bg-[#722f37]\" },\n { name: \"violet\", label: \"Violet\", color: \"bg-[#7c3aed]\" },\n { name: \"sky\", label: \"Sky\", color: \"bg-[#0284c7]\" },\n { name: \"emerald\", label: \"Emerald\", color: \"bg-[#059669]\" },\n { name: \"rose\", label: \"Rose\", color: \"bg-[#e11d48]\" },\n { name: \"amber\", label: \"Amber\", color: \"bg-[#d97706]\" },\n { name: \"zinc\", label: \"Zinc\", color: \"bg-[#18181b]\" },\n];\n\nconst RADIUS_OPTIONS: { value: Radius; label: string }[] = [\n { value: \"0\", label: \"0\" },\n { value: \"0.3\", label: \"0.3\" },\n { value: \"0.5\", label: \"0.5\" },\n { value: \"0.75\", label: \"0.75\" },\n { value: \"1.0\", label: \"1.0\" },\n];\n\n/**\n * Interactive UI theme switcher supporting mini/max modes and View Transition animations.\n */\nexport const ThemeToggle: Component<ThemeToggleProps> = (props) => {\n const [local] = splitProps(props, [\"mode\", \"effect\", \"class\"]);\n const { theme, setTheme, accent, setAccent, radius, setRadius } = useTheme();\n\n const colorMode = createColorMode({\n initialValue: theme(),\n storageKey: \"nikala-theme-mode\",\n });\n\n const mode = () => local.mode || \"mini\";\n const effect = () => local.effect || \"none\";\n\n /* Reactive accessor determining whether dark mode is active via createColorMode hook */\n const isDarkMode = () => {\n const currentTheme = theme();\n if (currentTheme === \"dark\") return true;\n if (currentTheme === \"light\") return false;\n return colorMode.isDark();\n };\n\n const changeThemeWithEffect = (newTheme: Theme, e: MouseEvent) => {\n runThemeTransition(effect(), e, () => {\n setTheme(newTheme);\n colorMode.setMode(newTheme);\n });\n };\n\n return (\n <DropdownMenu placement=\"bottom-end\">\n <DropdownMenuTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon\"\n class={cn(\"relative h-9 w-9 cursor-pointer\", local.class)}\n >\n {/* Reactive Sun / Moon Icon Toggle */}\n <Show\n when={isDarkMode()}\n fallback={<Sun class=\"h-4 w-4 text-foreground transition-transform\" />}\n >\n <Moon class=\"h-4 w-4 text-foreground transition-transform\" />\n </Show>\n\n <span class=\"sr-only\">Toggle theme</span>\n </DropdownMenuTrigger>\n\n <Show\n when={mode() === \"max\"}\n fallback={\n /* Mini Mode: Compact Dropdown */\n <DropdownMenuContent>\n <DropdownMenuItem onClick={(e: MouseEvent) => changeThemeWithEffect(\"light\", e)}>\n <Sun class=\"mr-2 h-4 w-4 text-muted-foreground\" />\n Light\n </DropdownMenuItem>\n\n <DropdownMenuItem onClick={(e: MouseEvent) => changeThemeWithEffect(\"dark\", e)}>\n <Moon class=\"mr-2 h-4 w-4 text-muted-foreground\" />\n Dark\n </DropdownMenuItem>\n\n <DropdownMenuItem onClick={(e: MouseEvent) => changeThemeWithEffect(\"system\", e)}>\n <Monitor class=\"mr-2 h-4 w-4 text-muted-foreground\" />\n System\n </DropdownMenuItem>\n </DropdownMenuContent>\n }\n >\n {/* Max Mode: Full Theme Customizer Panel */}\n <DropdownMenuContent class=\"w-64 p-3\">\n <DropdownMenuLabel class=\"px-0 pt-0 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n Theme Mode\n </DropdownMenuLabel>\n <div class=\"grid grid-cols-3 gap-1 my-1.5\">\n <Button\n variant={theme() === \"light\" ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={(e: MouseEvent) => changeThemeWithEffect(\"light\", e)}\n class=\"h-8 text-xs cursor-pointer\"\n >\n Light\n </Button>\n <Button\n variant={theme() === \"dark\" ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={(e: MouseEvent) => changeThemeWithEffect(\"dark\", e)}\n class=\"h-8 text-xs cursor-pointer\"\n >\n Dark\n </Button>\n <Button\n variant={theme() === \"system\" ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={(e: MouseEvent) => changeThemeWithEffect(\"system\", e)}\n class=\"h-8 text-xs cursor-pointer\"\n >\n System\n </Button>\n </div>\n\n <DropdownMenuSeparator class=\"my-2\" />\n\n <DropdownMenuLabel class=\"px-0 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n Brand Accent Color\n </DropdownMenuLabel>\n <div class=\"flex flex-wrap gap-1.5 my-1.5\">\n <For each={ACCENT_OPTIONS}>\n {(opt) => (\n <button\n type=\"button\"\n title={opt.label}\n onClick={() => setAccent(opt.name)}\n class={cn(\n \"h-6 w-6 rounded-md transition-all cursor-pointer border border-border flex items-center justify-center\",\n opt.color,\n accent() === opt.name ? \"ring-2 ring-primary ring-offset-2 ring-offset-background scale-110\" : \"hover:scale-105\"\n )}\n />\n )}\n </For>\n </div>\n\n <DropdownMenuSeparator class=\"my-2\" />\n\n <DropdownMenuLabel class=\"px-0 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n Border Radius\n </DropdownMenuLabel>\n <div class=\"grid grid-cols-5 gap-1 my-1.5\">\n <For each={RADIUS_OPTIONS}>\n {(r) => (\n <Button\n variant={radius() === r.value ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => setRadius(r.value)}\n class=\"h-7 text-xs px-1 cursor-pointer\"\n >\n {r.label}\n </Button>\n )}\n </For>\n </div>\n </DropdownMenuContent>\n </Show>\n </DropdownMenu>\n );\n};",
35
35
  "type": "registry:ui"
36
36
  }
37
37
  ]
@@ -13,7 +13,7 @@
13
13
  "files": [
14
14
  {
15
15
  "path": "ui/toast.tsx",
16
- "content": "import { splitProps, type Component, type JSX, type ComponentProps } from \"solid-js\";\nimport { Toast as KobalteToast, toaster } from \"@kobalte/core/toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X, CircleCheck, Info, CircleAlert, TriangleAlert } from \"lucide-solid\";\nimport { cn } from \"@/lib/cn\";\n\nexport const toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-lg border p-4 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--kb-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[opened]:animate-in data-[closed]:animate-out data-[swipe=end]:animate-out data-[closed]:fade-out-80 data-[closed]:slide-out-to-right-full data-[opened]:slide-in-from-top-full data-[opened]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border-border bg-background text-foreground\",\n success: \"border-emerald-500/20 bg-emerald-500/10 text-emerald-900 dark:text-emerald-200 border-emerald-500/30\",\n destructive: \"border-destructive/30 bg-destructive/10 text-destructive dark:text-red-300\",\n warning: \"border-amber-500/20 bg-amber-500/10 text-amber-900 dark:text-amber-200 border-amber-500/30\",\n info: \"border-sky-500/20 bg-sky-500/10 text-sky-900 dark:text-sky-200 border-sky-500/30\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nexport interface ToastProps\n extends ComponentProps<typeof KobalteToast>,\n VariantProps<typeof toastVariants> {\n class?: string;\n}\n\nexport const Toast: Component<ToastProps> = (props) => {\n const [local, rest] = splitProps(props, [\"class\", \"variant\"]);\n\n return (\n <KobalteToast\n class={cn(toastVariants({ variant: local.variant }), local.class)}\n {...rest}\n />\n );\n};\n\nexport const ToastTitle: Component<ComponentProps<typeof KobalteToast.Title>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"]);\n\n return (\n <KobalteToast.Title\n class={cn(\"text-sm font-semibold [&+div]:text-xs\", local.class)}\n {...rest}\n />\n );\n};\n\nexport const ToastDescription: Component<ComponentProps<typeof KobalteToast.Description>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"]);\n\n return (\n <KobalteToast.Description\n class={cn(\"text-sm opacity-90\", local.class)}\n {...rest}\n />\n );\n};\n\nexport const ToastCloseButton: Component<ComponentProps<typeof KobalteToast.CloseButton>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\", \"children\"]);\n\n return (\n <KobalteToast.CloseButton\n class={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100\",\n local.class\n )}\n {...rest}\n >\n {local.children || <X class=\"h-4 w-4\" />}\n </KobalteToast.CloseButton>\n );\n};\n\nexport const ToastRegion: Component<ComponentProps<typeof KobalteToast.Region>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"]);\n\n return (\n <KobalteToast.Region\n class={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n local.class\n )}\n {...rest}\n />\n );\n};\n\nexport const ToastList: Component<ComponentProps<typeof KobalteToast.List>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"]);\n\n return <KobalteToast.List class={cn(\"flex flex-col gap-2\", local.class)} {...rest} />;\n};\n\n/* --- Helper Function to Trigger Toast Notifications --- */\nexport interface ShowToastOptions {\n title: string;\n description?: string;\n variant?: \"default\" | \"success\" | \"destructive\" | \"warning\" | \"info\";\n duration?: number;\n}\n\nexport const showToast = (options: ShowToastOptions) => {\n return toaster.show((props) => (\n <Toast toastId={props.toastId} variant={options.variant || \"default\"}>\n <div class=\"flex items-start gap-3\">\n {options.variant === \"success\" && <CircleCheck class=\"h-5 w-5 text-emerald-500 shrink-0 mt-0.5\" />}\n {options.variant === \"destructive\" && <CircleAlert class=\"h-5 w-5 text-red-500 shrink-0 mt-0.5\" />}\n {options.variant === \"warning\" && <TriangleAlert class=\"h-5 w-5 text-amber-500 shrink-0 mt-0.5\" />}\n {options.variant === \"info\" && <Info class=\"h-5 w-5 text-sky-500 shrink-0 mt-0.5\" />}\n <div class=\"grid gap-1\">\n <ToastTitle>{options.title}</ToastTitle>\n {options.description && <ToastDescription>{options.description}</ToastDescription>}\n </div>\n </div>\n <ToastCloseButton />\n </Toast>\n ));\n};",
16
+ "content": "import { splitProps, type Component, type JSX, type ComponentProps } from \"solid-js\";\nimport { Toast as KobalteToast, toaster } from \"@kobalte/core/toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X, CircleCheck, Info, CircleAlert, TriangleAlert } from \"lucide-solid\";\nimport { cn } from \"@/lib/cn\";\n\nexport const toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-lg border p-4 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--kb-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[opened]:animate-in data-[closed]:animate-out data-[swipe=end]:animate-out data-[closed]:fade-out-80 data-[closed]:slide-out-to-right-full data-[opened]:slide-in-from-top-full data-[opened]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border-border bg-background text-foreground\",\n success: \"border-emerald-500/20 bg-emerald-500/10 text-emerald-900 dark:text-emerald-200 border-emerald-500/30\",\n destructive: \"border-destructive/30 bg-destructive/10 text-destructive dark:text-red-300\",\n warning: \"border-amber-500/20 bg-amber-500/10 text-amber-900 dark:text-amber-200 border-amber-500/30\",\n info: \"border-sky-500/20 bg-sky-500/10 text-sky-900 dark:text-sky-200 border-sky-500/30\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nexport interface ToastProps\n extends ComponentProps<typeof KobalteToast>,\n VariantProps<typeof toastVariants> {\n class?: string;\n}\n\nexport const Toast: Component<ToastProps> = (props) => {\n const [local, rest] = splitProps(props, [\"class\", \"variant\"]);\n\n return (\n <KobalteToast\n class={cn(toastVariants({ variant: local.variant }), local.class)}\n {...rest}\n />\n );\n};\n\nexport const ToastTitle: Component<ComponentProps<typeof KobalteToast.Title>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"]);\n\n return (\n <KobalteToast.Title\n class={cn(\"text-sm font-semibold [&+div]:text-xs\", local.class)}\n {...rest}\n />\n );\n};\n\nexport const ToastDescription: Component<ComponentProps<typeof KobalteToast.Description>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"]);\n\n return (\n <KobalteToast.Description\n class={cn(\"text-sm opacity-90\", local.class)}\n {...rest}\n />\n );\n};\n\nexport const ToastCloseButton: Component<ComponentProps<typeof KobalteToast.CloseButton>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\", \"children\"]);\n\n return (\n <KobalteToast.CloseButton\n class={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100\",\n local.class\n )}\n {...rest}\n >\n {local.children || <X class=\"h-4 w-4\" />}\n </KobalteToast.CloseButton>\n );\n};\n\nexport const ToastRegion: Component<ComponentProps<typeof KobalteToast.Region>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"]);\n\n return (\n <KobalteToast.Region\n class={cn(\n \"fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-105\",\n local.class\n )}\n {...rest}\n />\n );\n};\n\nexport const ToastList: Component<ComponentProps<typeof KobalteToast.List>> = (props) => {\n const [local, rest] = splitProps(props, [\"class\"]);\n\n return <KobalteToast.List class={cn(\"flex flex-col gap-2\", local.class)} {...rest} />;\n};\n\n/* --- Helper Function to Trigger Toast Notifications --- */\nexport interface ShowToastOptions {\n title: string;\n description?: string;\n variant?: \"default\" | \"success\" | \"destructive\" | \"warning\" | \"info\";\n duration?: number;\n}\n\nexport const showToast = (options: ShowToastOptions) => {\n return toaster.show((props) => (\n <Toast toastId={props.toastId} variant={options.variant || \"default\"}>\n <div class=\"flex items-start gap-3\">\n {options.variant === \"success\" && <CircleCheck class=\"h-5 w-5 text-emerald-500 shrink-0 mt-0.5\" />}\n {options.variant === \"destructive\" && <CircleAlert class=\"h-5 w-5 text-red-500 shrink-0 mt-0.5\" />}\n {options.variant === \"warning\" && <TriangleAlert class=\"h-5 w-5 text-amber-500 shrink-0 mt-0.5\" />}\n {options.variant === \"info\" && <Info class=\"h-5 w-5 text-sky-500 shrink-0 mt-0.5\" />}\n <div class=\"grid gap-1\">\n <ToastTitle>{options.title}</ToastTitle>\n {options.description && <ToastDescription>{options.description}</ToastDescription>}\n </div>\n </div>\n <ToastCloseButton />\n </Toast>\n ));\n};",
17
17
  "type": "registry:ui"
18
18
  }
19
19
  ]
@@ -26,8 +26,6 @@ export const Accordion = <T extends ValidComponent = "div">(
26
26
  "class",
27
27
  "type",
28
28
  "multiple",
29
- "value",
30
- "defaultValue",
31
29
  ]);
32
30
 
33
31
  // Support both `type="multiple"` and `multiple={true}`
@@ -36,8 +34,6 @@ export const Accordion = <T extends ValidComponent = "div">(
36
34
  return (
37
35
  <AccordionPrimitive.Root
38
36
  multiple={isMultiple()}
39
- value={local.value}
40
- defaultValue={local.defaultValue}
41
37
  class={cn("w-full divide-y divide-border", local.class)}
42
38
  {...(rest as any)}
43
39
  />
@@ -21,7 +21,7 @@ export const Avatar: Component<AvatarProps> = (props) => {
21
21
  return (
22
22
  <div
23
23
  class={cn(
24
- "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border border-border bg-muted",
24
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-lg border border-border bg-muted",
25
25
  local.class
26
26
  )}
27
27
  {...rest}
@@ -18,6 +18,12 @@ export const badgeVariants = cva(
18
18
  "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
19
19
  outline:
20
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",
21
27
  },
22
28
  },
23
29
  defaultVariants: {
@@ -11,18 +11,22 @@ export const buttonVariants = cva(
11
11
  variants: {
12
12
  variant: {
13
13
  default:
14
- "bg-primary text-primary-foreground shadow hover:bg-primary/90",
14
+ "bg-primary text-primary-foreground shadow hover:bg-primary/90 border border-primary/50",
15
15
  destructive:
16
16
  "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",
17
17
  outline:
18
18
  "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
19
19
  secondary:
20
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
20
+ "bg-secondary text-secondary-foreground hover:bg-secondary/80 border border-border",
21
21
  ghost:
22
22
  "hover:bg-accent hover:text-accent-foreground",
23
23
  link: "text-primary underline-offset-4 hover:underline",
24
+ 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",
25
+ 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",
26
+ 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",
24
27
  },
25
28
  size: {
29
+ xs: "h-6 rounded-md px-2 text-xs",
26
30
  default: "h-9 px-4 py-2",
27
31
  sm: "h-8 rounded-md px-3 text-xs",
28
32
  lg: "h-10 rounded-md px-8",
@@ -47,7 +47,7 @@ export const Checkbox: Component<CheckboxProps> = (props) => {
47
47
  <button
48
48
  type="button"
49
49
  role="checkbox"
50
- aria-checked={Boolean(isChecked())}
50
+ aria-checked={isChecked()}
51
51
  data-state={isChecked() ? "checked" : "unchecked"}
52
52
  disabled={local.disabled}
53
53
  onClick={toggle}
@@ -2,7 +2,6 @@ import {
2
2
  createContext,
3
3
  useContext,
4
4
  createSignal,
5
- onMount,
6
5
  onCleanup,
7
6
  Show,
8
7
  splitProps,
@@ -10,6 +9,7 @@ import {
10
9
  type JSX,
11
10
  type Accessor,
12
11
  } from "solid-js";
12
+ import { createKeybindings } from "@nikala-ui/hooks";
13
13
  import { Dialog } from "@kobalte/core/dialog";
14
14
  import { Search, ArrowUp, ArrowDown, CornerDownLeft } from "lucide-solid";
15
15
  import { cn } from "@/lib/cn";
@@ -76,25 +76,25 @@ export const CommandDialog: Component<CommandDialogProps> = (props) => {
76
76
  };
77
77
 
78
78
  /* Listen for global Ctrl+K / Cmd+K hotkeys */
79
- onMount(() => {
80
- if (props.enableHotkey !== false) {
81
- const handleKeyDown = (e: KeyboardEvent) => {
82
- if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k") {
83
- e.preventDefault();
84
- setOpen(!isOpen());
85
- }
86
- };
87
- window.addEventListener("keydown", handleKeyDown);
88
- onCleanup(() => window.removeEventListener("keydown", handleKeyDown));
79
+ createKeybindings(
80
+ [
81
+ {
82
+ key: ["meta+k", "ctrl+k"],
83
+ handler: () => setOpen(!isOpen()),
84
+ preventDefault: true,
85
+ },
86
+ ],
87
+ {
88
+ enabled: () => props.enableHotkey !== false,
89
89
  }
90
- });
90
+ );
91
91
 
92
92
  return (
93
93
  <Dialog open={isOpen()} onOpenChange={setOpen}>
94
94
  <Dialog.Portal>
95
- <Dialog.Overlay class="fixed inset-0 z-50 bg-black/60 backdrop-blur-xs data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0" />
95
+ <Dialog.Overlay class="fixed inset-0 z-50 bg-black/60 backdrop-blur-xs data-expanded:animate-in data-closed:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0" />
96
96
  <div class="fixed inset-0 z-50 flex items-start justify-center pt-16 sm:pt-24 px-4">
97
- <Dialog.Content class="w-full max-w-xl rounded-lg border border-border bg-popover text-popover-foreground shadow-2xl outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95">
97
+ <Dialog.Content class="w-full max-w-xl rounded-lg border border-border bg-popover text-popover-foreground shadow-2xl outline-none data-expanded:animate-in data-closed:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-closed:zoom-out-95 data-expanded:zoom-in-95">
98
98
  <Command class={props.class}>{props.children}</Command>
99
99
  </Dialog.Content>
100
100
  </div>
@@ -145,7 +145,7 @@ export const CommandList: Component<CommandListProps> = (props) => {
145
145
 
146
146
  return (
147
147
  <div
148
- class={cn("max-h-[330px] overflow-y-auto p-1.5 scrollbar-thin", local.class)}
148
+ class={cn("max-h-82.5 overflow-y-auto p-1.5 scrollbar-thin", local.class)}
149
149
  {...rest}
150
150
  >
151
151
  <List>{local.children}</List>
@@ -32,7 +32,7 @@ export const DialogOverlay = <T extends ValidComponent = "div">(
32
32
  return (
33
33
  <DialogPrimitive.Overlay
34
34
  class={cn(
35
- "fixed inset-0 z-50 bg-black/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0",
35
+ "fixed inset-0 z-50 bg-black/80 data-expanded:animate-in data-closed:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0",
36
36
  local.blur !== false && "backdrop-blur-sm",
37
37
  local.class
38
38
  )}
@@ -95,14 +95,14 @@ export const DialogContent = <T extends ValidComponent = "div">(
95
95
  onPointerDownOutside={handlePointerDownOutside}
96
96
  onInteractOutside={handleInteractOutside}
97
97
  class={cn(
98
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-card p-6 shadow-lg duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg text-card-foreground",
98
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-popover p-6 shadow-lg duration-200 data-expanded:animate-in data-closed:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-closed:zoom-out-95 data-expanded:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg text-card-foreground",
99
99
  local.class
100
100
  )}
101
101
  {...(rest as any)}
102
102
  >
103
103
  {local.children}
104
104
  <Show when={local.showCloseButton !== false}>
105
- <DialogPrimitive.CloseButton class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[expanded]:bg-accent data-[expanded]:text-muted-foreground cursor-pointer">
105
+ <DialogPrimitive.CloseButton class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-expanded:bg-accent data-expanded:text-muted-foreground cursor-pointer">
106
106
  <svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
107
107
  <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
108
108
  </svg>
@@ -75,7 +75,7 @@ export const DropdownMenuSubContent = <T extends ValidComponent = "div">(
75
75
  <DropdownMenuPrimitive.Portal>
76
76
  <DropdownMenuPrimitive.SubContent
77
77
  class={cn(
78
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0",
78
+ "z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg data-expanded:animate-in data-closed:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0",
79
79
  local.class
80
80
  )}
81
81
  {...(rest as any)}
@@ -112,7 +112,7 @@ export const DropdownMenuContent = <T extends ValidComponent = "div">(
112
112
  if (typeof (props as any).ref === "function") (props as any).ref(el);
113
113
  }}
114
114
  class={cn(
115
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0",
115
+ "z-50 min-w-32 mt-1 overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md data-expanded:animate-in data-closed:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0",
116
116
  local.class
117
117
  )}
118
118
  {...(rest as any)}
@@ -140,7 +140,7 @@ export const DropdownMenuItem = <T extends ValidComponent = "div">(
140
140
  return (
141
141
  <DropdownMenuPrimitive.Item
142
142
  class={cn(
143
- "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
143
+ "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
144
144
  local.inset && "pl-8",
145
145
  local.variant === "destructive" &&
146
146
  "text-destructive focus:bg-destructive/15 focus:text-destructive",
@@ -165,7 +165,7 @@ export const DropdownMenuCheckboxItem = <T extends ValidComponent = "div">(
165
165
  return (
166
166
  <DropdownMenuPrimitive.CheckboxItem
167
167
  class={cn(
168
- "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
168
+ "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
169
169
  local.class
170
170
  )}
171
171
  {...(rest as any)}
@@ -196,7 +196,7 @@ export const DropdownMenuRadioItem = <T extends ValidComponent = "div">(
196
196
  return (
197
197
  <DropdownMenuPrimitive.RadioItem
198
198
  class={cn(
199
- "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
199
+ "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
200
200
  local.class
201
201
  )}
202
202
  {...(rest as any)}
@@ -14,7 +14,7 @@ export const InputGroup: Component<InputGroupProps> = (props) => {
14
14
  return (
15
15
  <div
16
16
  class={cn(
17
- "relative flex w-full items-center rounded-md border border-input bg-background text-sm shadow-2xs transition-colors focus-within:border-primary focus-within:ring-1 focus-within:ring-primary",
17
+ "relative flex w-full items-center rounded-md border border-input bg-muted text-sm shadow-2xs transition-colors focus-within:border-primary focus-within:ring-1 focus-within:ring-primary",
18
18
  local.class
19
19
  )}
20
20
  {...rest}
@@ -71,7 +71,7 @@ export const InputGroupInput: Component<InputGroupInputProps> = (props) => {
71
71
  return (
72
72
  <input
73
73
  class={cn(
74
- "flex h-9 w-full flex-1 border-0 bg-transparent px-2.5 py-1 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
74
+ "flex h-9 w-full flex-1 border-0 px-2.5 py-1 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
75
75
  local.class
76
76
  )}
77
77
  {...rest}
@@ -19,7 +19,7 @@ export const Input: Component<InputProps> = (props) => {
19
19
  <input
20
20
  type={local.type || "text"}
21
21
  class={cn(
22
- "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
22
+ "flex h-9 w-full rounded-md border border-input bg-muted px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
23
23
  local.class
24
24
  )}
25
25
  {...rest}
@@ -32,7 +32,7 @@ export interface ListGroupProps extends JSX.HTMLAttributes<HTMLDivElement> {
32
32
  export const ListGroup: Component<ListGroupProps> = (props) => {
33
33
  const [local, rest] = splitProps(props, ["class", "children"]);
34
34
  return (
35
- <div class={cn("flex flex-col gap-1 w-full my-1", local.class)} {...rest}>
35
+ <div class={cn("flex flex-col gap-1 w-full", local.class)} {...rest}>
36
36
  {local.children}
37
37
  </div>
38
38
  );
@@ -137,12 +137,12 @@ export const ListItem: Component<ListItemProps> = (props) => {
137
137
  <img
138
138
  src={local.avatar}
139
139
  alt={local.title || "Avatar"}
140
- class="w-6 h-6 rounded-full object-cover shrink-0 border border-border"
140
+ class="w-10 h-10 rounded-lg object-cover shrink-0 border border-border"
141
141
  />
142
142
  </Show>
143
143
 
144
144
  <Show when={!local.avatar && local.avatarFallback}>
145
- <span class="w-6 h-6 rounded-full bg-primary/10 text-primary text-[10px] font-bold flex items-center justify-center shrink-0 uppercase">
145
+ <span class="w-10 h-10 rounded-lg bg-primary/10 text-primary text-[10px] font-bold flex items-center justify-center shrink-0 uppercase">
146
146
  {local.avatarFallback}
147
147
  </span>
148
148
  </Show>
@@ -161,7 +161,7 @@ export const ListItem: Component<ListItemProps> = (props) => {
161
161
  </span>
162
162
  </Show>
163
163
  <Show when={local.subtitle}>
164
- <span class="truncate text-xs text-muted-foreground font-normal mt-1">
164
+ <span class="truncate text-xs opacity-50 font-normal mt-1">
165
165
  {local.subtitle}
166
166
  </span>
167
167
  </Show>
@@ -178,7 +178,7 @@ export const ListItem: Component<ListItemProps> = (props) => {
178
178
  </Show>
179
179
 
180
180
  <Show when={local.showChevron}>
181
- <ChevronRight class="w-4 h-4 text-muted-foreground group-hover:text-foreground transition-colors" />
181
+ <ChevronRight class="w-4 h-4 text-muted-foreground transition-colors" />
182
182
  </Show>
183
183
  </div>
184
184
  </>
@@ -0,0 +1,68 @@
1
+ import { splitProps, type Component, type JSX } from "solid-js";
2
+ import { cn } from "@/lib/cn";
3
+
4
+ export interface LogoProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
5
+ class?: string;
6
+ }
7
+
8
+ /**
9
+ * Official Nikala UI Logo Component with dynamic contrast stroke and accent fill.
10
+ */
11
+ export const Logo: Component<LogoProps> = (props) => {
12
+ const [local, rest] = splitProps(props, ["class"]);
13
+
14
+ return (
15
+ <svg
16
+ viewBox="0 0 223 223"
17
+ fill="none"
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ class={cn("h-7 w-7 shrink-0 select-none", local.class)}
20
+ {...rest}
21
+ >
22
+ <g clip-path="url(#nikala-logo-clip0)">
23
+ {/* Background Box with Dynamic Theme Accent */}
24
+ <path
25
+ d="M0 10C0 4.47716 4.47715 0 10 0H213C218.523 0 223 4.47715 223 10V213C223 218.523 218.523 223 213 223H10C4.47716 223 0 218.523 0 213V10Z"
26
+ fill="currentColor"
27
+ class="text-primary"
28
+ />
29
+ <g clip-path="url(#nikala-logo-clip1)">
30
+ {/* Paintbrush Vector Paths Adapting to --primary-foreground */}
31
+ <path
32
+ d="M304.406 364.173C303.147 366.03 301.738 366.903 299.847 368.109C299.093 368.594 298.339 369.08 297.563 369.58C296.746 370.096 295.929 370.613 295.087 371.145C294.245 371.684 293.402 372.224 292.56 372.764C290.346 374.183 288.127 375.594 285.907 377.003C283.642 378.443 281.381 379.891 279.119 381.338C274.684 384.175 270.243 387.003 265.799 389.826C263.196 387.86 261.543 385.492 259.734 382.813C257.432 379.465 255.089 376.207 252.52 373.055C249.122 368.864 246.081 364.457 243.017 360.02C240.337 356.141 237.507 352.385 234.645 348.639C233.944 347.722 233.244 346.804 232.544 345.886C232.19 345.421 231.836 344.956 231.471 344.477C228.856 341.031 226.35 337.519 223.876 333.97C222.068 331.395 220.171 328.922 218.188 326.48C214.782 322.267 211.726 317.844 208.65 313.389C205.969 309.51 203.14 305.755 200.277 302.009C199.577 301.091 198.877 300.173 198.177 299.255C197.823 298.79 197.468 298.326 197.103 297.847C194.79 294.798 192.553 291.706 190.364 288.567C188.267 285.56 186.094 282.644 183.786 279.794C179.935 275.035 176.476 270.016 173.005 264.978C176.445 262.305 179.941 259.802 183.612 257.457C184.099 257.143 184.587 256.829 185.089 256.505C186.679 255.481 188.271 254.461 189.863 253.441C190.975 252.726 192.086 252.011 193.197 251.296C196.106 249.425 199.016 247.557 201.927 245.689C204.903 243.779 207.878 241.866 210.853 239.953C216.678 236.208 222.505 232.466 228.333 228.726C230.86 230.623 232.252 232.791 233.788 235.512C234.053 235.974 234.319 236.435 234.592 236.911C236.235 239.797 237.775 242.723 239.261 245.694C241.392 249.953 243.79 254.007 246.245 258.083C248.04 261.081 249.715 264.098 251.272 267.229C253.667 272.041 256.413 276.612 259.173 281.219C261.596 285.264 263.845 289.394 266.071 293.549C266.617 294.566 267.163 295.584 267.709 296.601C267.986 297.115 268.262 297.63 268.547 298.161C270.366 301.528 272.256 304.843 274.208 308.135C276.068 311.27 277.812 314.435 279.438 317.698C281.864 322.542 284.628 327.154 287.41 331.798C289.839 335.853 292.092 339.995 294.328 344.159C294.597 344.658 294.866 345.158 295.143 345.673C295.7 346.71 296.256 347.748 296.81 348.786C298.15 351.28 299.518 353.74 300.998 356.154C301.259 356.583 301.519 357.012 301.788 357.454C302.503 358.619 303.23 359.775 303.958 360.931C304.8 362.85 304.8 362.85 304.406 364.173Z"
33
+ fill="var(--primary-foreground, #ffffff)"
34
+ />
35
+ <path
36
+ d="M147.908 159.434C143.029 162.624 138.255 165.222 132.524 166.53C131.568 166.759 131.568 166.759 130.593 166.992C117.641 169.419 104.681 165.652 93.8424 158.557C84.6301 151.709 78.5873 142.443 75.2903 131.528C75.0234 130.675 75.0234 130.675 74.7511 129.804C72.9741 122.986 73.9008 115.665 74.4194 108.713C75.7267 91.1539 72.9686 78.0313 62.8484 63.365C61.808 61.5353 61.808 61.5353 62.2756 59.3756C74.2777 52.1095 87.8993 50.9005 101.359 53.9904C102.212 54.1829 103.066 54.3753 103.945 54.5736C110.197 56.0433 115.833 57.7788 121.484 60.8918C121.926 61.1331 122.368 61.3745 122.823 61.6232C141.727 72.123 158.382 89.1592 164.804 110.159C170.072 129.189 164.608 147.982 147.908 159.434Z"
37
+ fill="var(--primary-foreground, #ffffff)"
38
+ />
39
+ <path
40
+ d="M224.945 222.724C223.467 224.948 221.157 226.154 218.937 227.554C218.142 228.066 218.142 228.067 217.331 228.589C215.58 229.716 213.822 230.833 212.065 231.95C210.849 232.73 209.634 233.51 208.418 234.291C205.22 236.344 202.016 238.389 198.811 240.432C195.542 242.519 192.277 244.613 189.012 246.706C182.605 250.813 176.192 254.911 169.776 259.003C163.425 254.055 159.038 246.461 154.501 239.887C151.859 236.063 149.162 232.301 146.129 228.777C140.59 220.962 138.709 211.47 139.907 202.042C141.806 192.774 145.937 185.415 153.125 179.281C153.821 178.654 154.516 178.028 155.232 177.382C161.199 173.349 167.362 171.636 174.492 171.096C175.187 171.029 175.187 171.029 175.896 170.961C185.36 171.183 194.837 174.7 201.562 181.385C202.406 182.334 203.235 183.298 204.044 184.277C204.596 184.933 204.596 184.933 205.159 185.602C207.879 189.006 209.907 192.696 211.94 196.538C212.966 198.458 213.996 200.376 215.027 202.293C215.301 202.803 215.574 203.312 215.856 203.837C218.216 208.207 220.709 212.489 223.254 216.754C225.579 220.827 225.579 220.827 224.945 222.724Z"
41
+ fill="var(--primary-foreground, #ffffff)"
42
+ />
43
+ <path
44
+ d="M346.445 469.84C341.579 473.016 337.792 473.996 331.992 473.069C323.666 471.041 319.697 464.544 315.142 457.786C314.41 456.773 313.671 455.764 312.923 454.762C312.555 454.269 312.187 453.775 311.808 453.267C310.744 451.858 309.676 450.454 308.605 449.052C304.588 443.792 300.674 438.482 296.873 433.064C294.268 429.365 291.554 425.754 288.807 422.16C288.108 421.244 287.41 420.328 286.711 419.412C286.181 418.717 286.181 418.717 285.639 418.007C283.312 414.94 281.064 411.828 278.863 408.669C275.954 404.511 272.86 400.557 269.591 396.676C270.596 393.987 272.077 392.99 274.463 391.469C275.568 390.758 275.568 390.758 276.694 390.032C277.891 389.276 277.891 389.276 279.111 388.505C279.926 387.983 280.74 387.461 281.58 386.923C283.742 385.538 285.909 384.16 288.077 382.784C290.29 381.378 292.498 379.965 294.707 378.552C299.039 375.782 303.376 373.02 307.716 370.264C310.189 371.73 310.549 372.854 311.779 375.43C313.714 379.343 315.815 383.09 318.072 386.826C320.626 391.064 322.954 395.349 325.158 399.782C326.672 402.673 328.329 405.458 330.013 408.252C332.566 412.491 334.894 416.776 337.098 421.209C338.613 424.099 340.27 426.884 341.953 429.678C344.974 434.704 347.722 439.785 350.305 445.052C350.628 445.646 350.95 446.239 351.282 446.851C355.467 454.895 353.749 464.19 346.445 469.84Z"
45
+ fill="var(--primary-foreground, #ffffff)"
46
+ />
47
+ <path
48
+ d="M175.175 164.461C174.611 164.495 174.047 164.529 173.466 164.565C161.822 165.517 151.451 170.117 143.632 178.98C141.188 182.058 138.963 185.278 136.798 188.557C134.916 187.16 133.636 185.817 132.364 183.853C132.04 183.352 131.717 182.852 131.383 182.336C131.053 181.817 130.724 181.297 130.384 180.762C130.043 180.241 129.703 179.719 129.351 179.182C129.031 178.682 128.711 178.182 128.381 177.668C128.089 177.211 127.796 176.755 127.495 176.285C126.898 175.109 126.898 175.109 127.21 173.669C127.885 173.594 127.885 173.594 128.573 173.517C144.325 171.353 156.368 162.585 166.151 150.449C168.977 152.315 170.506 155.002 172.283 157.806C172.597 158.285 172.911 158.765 173.234 159.26C175.527 162.839 175.527 162.839 175.175 164.461Z"
49
+ fill="var(--primary-foreground, #ffffff)"
50
+ />
51
+ </g>
52
+ </g>
53
+ <defs>
54
+ <clipPath id="nikala-logo-clip0">
55
+ <rect width="223" height="223" rx="10" fill="white" />
56
+ </clipPath>
57
+ <clipPath id="nikala-logo-clip1">
58
+ <rect
59
+ width="377.121"
60
+ height="377.121"
61
+ fill="white"
62
+ transform="translate(431.932 116.81) rotate(102.218)"
63
+ />
64
+ </clipPath>
65
+ </defs>
66
+ </svg>
67
+ );
68
+ };
@@ -40,7 +40,7 @@ export const PopoverContent: Component<ComponentProps<typeof KobaltePopover.Cont
40
40
  if (typeof (props as any).ref === "function") (props as any).ref(el);
41
41
  }}
42
42
  class={cn(
43
- "z-50 w-72 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
43
+ "z-50 w-72 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none data-expanded:animate-in data-closed:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-closed:zoom-out-95 data-expanded:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
44
44
  local.class
45
45
  )}
46
46
  {...rest}
@@ -53,10 +53,10 @@ export const Progress: Component<ProgressProps> = (props) => {
53
53
  </div>
54
54
  </Show>
55
55
 
56
- <KobalteProgress.Track class="relative h-2 w-full overflow-hidden rounded-full bg-primary/20">
56
+ <KobalteProgress.Track class="relative h-2 w-full overflow-hidden rounded-lg bg-primary/20">
57
57
  <KobalteProgress.Fill
58
58
  class={cn(
59
- "h-full w-[var(--kb-progress-fill-width)] bg-primary transition-all duration-300 ease-in-out",
59
+ "h-full w-(--kb-progress-fill-width) bg-primary transition-all duration-300 ease-in-out",
60
60
  local.indicatorClass
61
61
  )}
62
62
  />
@@ -37,7 +37,7 @@ export const SelectTrigger = <T extends ValidComponent = "button">(
37
37
  return (
38
38
  <SelectPrimitive.Trigger
39
39
  class={cn(
40
- "flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer text-foreground",
40
+ "flex h-9 w-full items-center justify-between rounded-md border border-input bg-muted px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer text-foreground",
41
41
  local.class
42
42
  )}
43
43
  {...rest}
@@ -109,7 +109,7 @@ export const SelectContent = <T extends ValidComponent = "div">(
109
109
  if (typeof (props as any).ref === "function") (props as any).ref(el);
110
110
  }}
111
111
  class={cn(
112
- "relative z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md animate-in fade-in-80",
112
+ "relative z-50 min-w-8rem overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md animate-in fade-in-80",
113
113
  local.class
114
114
  )}
115
115
  {...rest}
@@ -15,7 +15,7 @@ export const Skeleton: Component<SkeletonProps> = (props) => {
15
15
  return (
16
16
  <div
17
17
  class={cn(
18
- "animate-pulse rounded-md bg-muted",
18
+ "animate-pulse rounded-md bg-accent",
19
19
  local.class
20
20
  )}
21
21
  {...rest}
@@ -47,12 +47,12 @@ export const Switch: Component<SwitchProps> = (props) => {
47
47
  <button
48
48
  type="button"
49
49
  role="switch"
50
- aria-checked={Boolean(isChecked())}
50
+ aria-checked={isChecked()}
51
51
  data-state={isChecked() ? "checked" : "unchecked"}
52
52
  disabled={local.disabled}
53
53
  onClick={toggle}
54
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-input",
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
56
  local.class
57
57
  )}
58
58
  {...rest}
@@ -153,7 +153,7 @@ export const TabsTrigger: Component<TabsTriggerProps> = (props) => {
153
153
  disabled={local.disabled}
154
154
  onClick={handleClick}
155
155
  class={cn(
156
- "inline-flex items-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm cursor-pointer",
156
+ "inline-flex items-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-accent data-[state=active]:border data-[state=active]:border-border data-[state=active]:text-foreground data-[state=active]:shadow-sm cursor-pointer",
157
157
  isVertical() ? "justify-start py-1.5" : "justify-center",
158
158
  local.class
159
159
  )}
@@ -57,7 +57,7 @@ export const Textarea: Component<TextareaProps> = (props) => {
57
57
  maxLength={local.maxLength}
58
58
  onInput={handleInput}
59
59
  class={cn(
60
- "flex min-h-[80px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-2xs transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
60
+ "flex min-h-20 w-full rounded-md border border-input bg-muted px-3 py-2 text-base shadow-2xs transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
61
61
  local.class
62
62
  )}
63
63
  {...rest}
@@ -83,7 +83,7 @@ export const ThemeToggle: Component<ThemeToggleProps> = (props) => {
83
83
  <DropdownMenu placement="bottom-end">
84
84
  <DropdownMenuTrigger
85
85
  as={Button}
86
- variant="outline"
86
+ variant="ghost"
87
87
  size="icon"
88
88
  class={cn("relative h-9 w-9 cursor-pointer", local.class)}
89
89
  >
@@ -83,7 +83,7 @@ export const ToastRegion: Component<ComponentProps<typeof KobalteToast.Region>>
83
83
  return (
84
84
  <KobalteToast.Region
85
85
  class={cn(
86
- "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
86
+ "fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-105",
87
87
  local.class
88
88
  )}
89
89
  {...rest}