diff --git a/assets/css/app.css b/assets/css/app.css index 767401b..1e743eb 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -1,7 +1,25 @@ @import "tailwindcss" source(none); +/* Animation utilities (animate-in/out, fade, slide, zoom) used by ported component + skins — same dependency shadcn relies on. */ +@import "../node_modules/tw-animate-css/dist/tw-animate.css"; @source "../../lib/shadix/components"; @source "../../website"; +/* Custom utility shadcn defines in its base layer; used by ported sidebar/command skins. */ +@utility no-scrollbar { + -ms-overflow-style: none; + scrollbar-width: none; + + &::-webkit-scrollbar { + display: none; + } +} + +/* shadix components are markerless in-repo (colocated CSS only materialises in a + consumer's app via `mix shadix.add`), so import the default-style skin here to + render them in the dev/docs build. Generated by `mix shadix.gen.registry`. */ +@import "../../priv/styles/nova.css"; + @custom-variant dark (&:is(.dark *)); @theme inline { @@ -24,6 +42,14 @@ --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); + --color-sidebar: var(--sidebar); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); @@ -51,6 +77,14 @@ --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); } .dark { @@ -73,6 +107,14 @@ --border: oklch(1 0 0 / 10%); --input: oklch(1 0 0 / 15%); --ring: oklch(0.556 0 0); + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-ring: oklch(0.556 0 0); } /* Flexoki syntax highlighting — https://stephango.com/flexoki diff --git a/assets/package-lock.json b/assets/package-lock.json index a1acedd..292fa9a 100644 --- a/assets/package-lock.json +++ b/assets/package-lock.json @@ -7,6 +7,9 @@ "name": "shadix-assets", "dependencies": { "@floating-ui/dom": "^1.6.13" + }, + "devDependencies": { + "tw-animate-css": "^1.4.0" } }, "node_modules/@floating-ui/core": { @@ -33,6 +36,16 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.11.tgz", "integrity": "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==", "license": "MIT" + }, + "node_modules/tw-animate-css": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/tw-animate-css/-/tw-animate-css-1.4.0.tgz", + "integrity": "sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Wombosvideo" + } } } } diff --git a/assets/package.json b/assets/package.json index 3eb0341..bd4b86b 100644 --- a/assets/package.json +++ b/assets/package.json @@ -3,5 +3,8 @@ "private": true, "dependencies": { "@floating-ui/dom": "^1.6.13" + }, + "devDependencies": { + "tw-animate-css": "^1.4.0" } } diff --git a/lib/mix/tasks/shadix.gen.registry.ex b/lib/mix/tasks/shadix.gen.registry.ex index 0c6bb25..23fb545 100644 --- a/lib/mix/tasks/shadix.gen.registry.ex +++ b/lib/mix/tasks/shadix.gen.registry.ex @@ -59,9 +59,30 @@ defmodule Mix.Tasks.Shadix.Gen.Registry do Mix.shell().info("Generated #{out_path}") end) + write_style_aggregators() + Mix.shell().info("Done. #{length(sources)} manifest(s) written to #{out_dir}/") end + # Writes priv/styles/