@devfellowship/components 1.2.0 → 1.2.1

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/dist/index.cjs CHANGED
@@ -3214,7 +3214,7 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
3214
3214
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3215
3215
  "div",
3216
3216
  {
3217
- className: cn("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", className),
3217
+ className: cn("flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground", className),
3218
3218
  ref,
3219
3219
  ...props,
3220
3220
  children
@@ -3227,7 +3227,7 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
3227
3227
  {
3228
3228
  "data-sidebar": "sidebar",
3229
3229
  "data-mobile": "true",
3230
- className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
3230
+ className: "w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
3231
3231
  style: {
3232
3232
  "--sidebar-width": SIDEBAR_WIDTH_MOBILE
3233
3233
  },
@@ -3250,10 +3250,10 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
3250
3250
  "div",
3251
3251
  {
3252
3252
  className: cn(
3253
- "relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
3253
+ "relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear",
3254
3254
  "group-data-[collapsible=offcanvas]:w-0",
3255
3255
  "group-data-[side=right]:rotate-180",
3256
- variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
3256
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"
3257
3257
  )
3258
3258
  }
3259
3259
  ),
@@ -3261,10 +3261,10 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
3261
3261
  "div",
3262
3262
  {
3263
3263
  className: cn(
3264
- "fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
3264
+ "fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",
3265
3265
  side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
3266
3266
  // Adjust the padding for floating and inset variants.
3267
- variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
3267
+ variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",
3268
3268
  className
3269
3269
  ),
3270
3270
  ...props,
@@ -3571,7 +3571,7 @@ var SidebarMenuSkeleton = React28.forwardRef(({ className, showIcon = false, ...
3571
3571
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3572
3572
  Skeleton,
3573
3573
  {
3574
- className: "h-4 max-w-[--skeleton-width] flex-1",
3574
+ className: "h-4 max-w-[var(--skeleton-width)] flex-1",
3575
3575
  "data-sidebar": "menu-skeleton-text",
3576
3576
  style: {
3577
3577
  "--skeleton-width": width
@@ -4954,7 +4954,7 @@ function AppSidebar({
4954
4954
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SidebarProvider, { defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex min-h-screen w-full", children: [
4955
4955
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SidebarInner, { ...props }),
4956
4956
  /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-col flex-1 min-w-0", children: [
4957
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "p-2", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SidebarTrigger, {}) }),
4957
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "sticky top-0 z-20 flex h-12 shrink-0 items-center gap-2 border-b border-sidebar-border bg-background/80 px-2 backdrop-blur", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SidebarTrigger, {}) }),
4958
4958
  children
4959
4959
  ] })
4960
4960
  ] }) });
package/dist/index.js CHANGED
@@ -2892,7 +2892,7 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
2892
2892
  return /* @__PURE__ */ jsx40(
2893
2893
  "div",
2894
2894
  {
2895
- className: cn("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", className),
2895
+ className: cn("flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground", className),
2896
2896
  ref,
2897
2897
  ...props,
2898
2898
  children
@@ -2905,7 +2905,7 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
2905
2905
  {
2906
2906
  "data-sidebar": "sidebar",
2907
2907
  "data-mobile": "true",
2908
- className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
2908
+ className: "w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
2909
2909
  style: {
2910
2910
  "--sidebar-width": SIDEBAR_WIDTH_MOBILE
2911
2911
  },
@@ -2928,10 +2928,10 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
2928
2928
  "div",
2929
2929
  {
2930
2930
  className: cn(
2931
- "relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
2931
+ "relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear",
2932
2932
  "group-data-[collapsible=offcanvas]:w-0",
2933
2933
  "group-data-[side=right]:rotate-180",
2934
- variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
2934
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"
2935
2935
  )
2936
2936
  }
2937
2937
  ),
@@ -2939,10 +2939,10 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
2939
2939
  "div",
2940
2940
  {
2941
2941
  className: cn(
2942
- "fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
2942
+ "fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",
2943
2943
  side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
2944
2944
  // Adjust the padding for floating and inset variants.
2945
- variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
2945
+ variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",
2946
2946
  className
2947
2947
  ),
2948
2948
  ...props,
@@ -3249,7 +3249,7 @@ var SidebarMenuSkeleton = React28.forwardRef(({ className, showIcon = false, ...
3249
3249
  /* @__PURE__ */ jsx40(
3250
3250
  Skeleton,
3251
3251
  {
3252
- className: "h-4 max-w-[--skeleton-width] flex-1",
3252
+ className: "h-4 max-w-[var(--skeleton-width)] flex-1",
3253
3253
  "data-sidebar": "menu-skeleton-text",
3254
3254
  style: {
3255
3255
  "--skeleton-width": width
@@ -4640,7 +4640,7 @@ function AppSidebar({
4640
4640
  return /* @__PURE__ */ jsx61(SidebarProvider, { defaultOpen, children: /* @__PURE__ */ jsxs29("div", { className: "flex min-h-screen w-full", children: [
4641
4641
  /* @__PURE__ */ jsx61(SidebarInner, { ...props }),
4642
4642
  /* @__PURE__ */ jsxs29("div", { className: "flex flex-col flex-1 min-w-0", children: [
4643
- /* @__PURE__ */ jsx61("div", { className: "p-2", children: /* @__PURE__ */ jsx61(SidebarTrigger, {}) }),
4643
+ /* @__PURE__ */ jsx61("div", { className: "sticky top-0 z-20 flex h-12 shrink-0 items-center gap-2 border-b border-sidebar-border bg-background/80 px-2 backdrop-blur", children: /* @__PURE__ */ jsx61(SidebarTrigger, {}) }),
4644
4644
  children
4645
4645
  ] })
4646
4646
  ] }) });
@@ -11,140 +11,11 @@
11
11
  * Or combined if you only need utilities:
12
12
  * @import 'tailwindcss';
13
13
  * @import '@dfl/components/tailwind';
14
+ *
15
+ * NOTE: The token→utility `@theme inline` mappings now live in
16
+ * theme-mappings.css (single source of truth, also imported by theme.css so
17
+ * `/styles` consumers get the utilities wired without importing `/tailwind`).
14
18
  */
15
19
 
16
20
  @import 'tailwindcss';
17
-
18
- @theme inline {
19
- /* ─── Colours ──────────────────────────────────────────────────────────── */
20
- --color-background: var(--background);
21
- --color-foreground: var(--foreground);
22
-
23
- --color-card: var(--card);
24
- --color-card-foreground: var(--card-foreground);
25
-
26
- --color-popover: var(--popover);
27
- --color-popover-foreground: var(--popover-foreground);
28
-
29
- --color-primary: var(--primary);
30
- --color-primary-foreground: var(--primary-foreground);
31
-
32
- --color-secondary: var(--secondary);
33
- --color-secondary-foreground: var(--secondary-foreground);
34
-
35
- --color-muted: var(--muted);
36
- --color-muted-foreground: var(--muted-foreground);
37
-
38
- --color-accent: var(--accent);
39
- --color-accent-foreground: var(--accent-foreground);
40
-
41
- --color-destructive: var(--destructive);
42
- --color-destructive-foreground: var(--destructive-foreground);
43
-
44
- --color-border: var(--border);
45
- --color-input: var(--input);
46
- --color-ring: var(--ring);
47
-
48
- /* Brand shortcuts */
49
- --color-brand: var(--brand-orange);
50
- --color-brand-accent: var(--brand-accent);
51
- --color-brand-dark: var(--brand-dark);
52
-
53
- /* Sidebar */
54
- --color-sidebar: var(--sidebar-background);
55
- --color-sidebar-foreground: var(--sidebar-foreground);
56
- --color-sidebar-primary: var(--sidebar-primary);
57
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
58
- --color-sidebar-accent: var(--sidebar-accent);
59
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
60
- --color-sidebar-border: var(--sidebar-border);
61
- --color-sidebar-ring: var(--sidebar-ring);
62
-
63
- /* Charts */
64
- --color-chart-1: var(--chart-1);
65
- --color-chart-2: var(--chart-2);
66
- --color-chart-3: var(--chart-3);
67
- --color-chart-4: var(--chart-4);
68
- --color-chart-5: var(--chart-5);
69
-
70
- /* ─── Border radius ────────────────────────────────────────────────────── */
71
- --radius-sm: var(--radius-sm);
72
- --radius-md: var(--radius-md);
73
- --radius-lg: var(--radius-lg);
74
- --radius-xl: var(--radius-xl);
75
- --radius-full: var(--radius-full);
76
-
77
- /* ─── Fonts ────────────────────────────────────────────────────────────── */
78
- --font-sans: var(--font-sans);
79
- --font-condensed: var(--font-condensed);
80
- --font-mono: var(--font-mono);
81
- --font-editorial: var(--font-editorial);
82
-
83
- /* ─── Editorial / paper (light, NOT default — see tokens.css §5.8) ─────── */
84
- --color-paper: var(--paper);
85
- --color-paper-2: var(--paper-2);
86
- --color-ink-on-paper: var(--ink-on-paper);
87
- --color-brand-on-light: var(--brand-on-light);
88
-
89
- /* ─── Motion — DS-spec named easings → `ease-*` utilities ─────────────── */
90
- --ease-standard: var(--p-ease-standard);
91
- --ease-snap: var(--p-ease-snap);
92
- --ease-out-std: var(--p-ease-out-std);
93
- --ease-in-std: var(--p-ease-in-std);
94
-
95
- /* ─── Z-index scale → `z-*` utilities (z-sticky, z-modal, z-toast, …) ─── */
96
- --z-base: var(--p-z-base);
97
- --z-sticky: var(--p-z-sticky);
98
- --z-dropdown: var(--p-z-dropdown);
99
- --z-tooltip: var(--p-z-tooltip);
100
- --z-modal-scrim: var(--p-z-modal-scrim);
101
- --z-modal: var(--p-z-modal);
102
- --z-toast: var(--p-z-toast);
103
-
104
- /* ─── DS v0 component tokens (--c-*) exposed as Tailwind utilities ────── */
105
- /* Atoms cluster (Phase 1.1) — Button + Input + Card knobs */
106
- --color-c-button-primary-bg: var(--c-button-primary-bg);
107
- --color-c-button-primary-fg: var(--c-button-primary-fg);
108
- --color-c-button-primary-bg-hover: var(--c-button-primary-bg-hover);
109
- --color-c-button-primary-bg-active: var(--c-button-primary-bg-active);
110
- --color-c-button-secondary-bg: var(--c-button-secondary-bg);
111
- --color-c-button-secondary-fg: var(--c-button-secondary-fg);
112
- --color-c-button-secondary-border: var(--c-button-secondary-border);
113
- --color-c-button-secondary-bg-hover: var(--c-button-secondary-bg-hover);
114
- --color-c-button-secondary-border-hover: var(--c-button-secondary-border-hover);
115
- --color-c-button-ghost-fg: var(--c-button-ghost-fg);
116
- --color-c-button-ghost-bg-hover: var(--c-button-ghost-bg-hover);
117
- --color-c-button-destructive-fg: var(--c-button-destructive-fg);
118
- --color-c-button-destructive-border: var(--c-button-destructive-border);
119
- --color-c-button-destructive-bg-hover: var(--c-button-destructive-bg-hover);
120
- --color-c-button-success-bg: var(--c-button-success-bg);
121
- --color-c-button-success-fg: var(--c-button-success-fg);
122
- --color-c-input-bg: var(--c-input-bg);
123
- --color-c-input-fg: var(--c-input-fg);
124
- --color-c-input-placeholder: var(--c-input-placeholder);
125
- --color-c-input-border: var(--c-input-border);
126
- --color-c-input-border-hover: var(--c-input-border-hover);
127
- --color-c-input-border-focus: var(--c-input-border-focus);
128
- --color-c-input-ring-focus: var(--c-input-ring-focus);
129
- --color-c-input-border-error: var(--c-input-border-error);
130
-
131
- /* Semantic ink as utilities */
132
- --color-s-ink-primary: var(--s-ink-primary);
133
- --color-s-ink-secondary: var(--s-ink-secondary);
134
- --color-s-ink-muted: var(--s-ink-muted);
135
- --color-s-ink-disabled: var(--s-ink-disabled);
136
- --color-s-surface-page: var(--s-surface-page);
137
- --color-s-surface-panel: var(--s-surface-panel);
138
- --color-s-surface-raised: var(--s-surface-raised);
139
- --color-s-surface-elevated: var(--s-surface-elevated);
140
- --color-s-border-subtle: var(--s-border-subtle);
141
- --color-s-border-strong: var(--s-border-strong);
142
- --color-s-border-focus: var(--s-border-focus);
143
- --color-s-brand-solid: var(--s-brand-solid);
144
- --color-s-brand-hover: var(--s-brand-hover);
145
- --color-s-brand-subtle: var(--s-brand-subtle);
146
- --color-s-brand-ring: var(--s-brand-ring);
147
- }
148
-
149
- /* Dark mode variant — class-based */
150
- @variant dark (&:is(.dark *));
21
+ @import './theme-mappings.css';
@@ -0,0 +1,153 @@
1
+ /*
2
+ * @dfl/components — Tailwind v4 token→utility mappings (DS v0)
3
+ *
4
+ * Single source of truth for the `@theme inline` color/font/radius mappings
5
+ * that turn the DS tokens (--popover, --sidebar-background, …) into Tailwind v4
6
+ * utility classes (bg-popover, bg-sidebar, …).
7
+ *
8
+ * Imported by BOTH:
9
+ * • theme.css (the `@devfellowship/components/styles` export) — so apps
10
+ * that import `/styles` + `tailwindcss` directly get the utilities wired
11
+ * WITHOUT also having to import `/tailwind`. This fixes the "transparent
12
+ * popover / dead bg-* utility" class of bugs where bg-popover / bg-sidebar
13
+ * resolved to nothing because --color-popover / --color-sidebar were never
14
+ * registered. (regression from the DS dark-chrome refactor; fixed v1.2.1)
15
+ * • tailwind.css (the `@devfellowship/components/tailwind` preset export).
16
+ *
17
+ * `@theme inline` is additive and idempotent — importing it from both a /styles
18
+ * consumer and a /tailwind consumer in the same app is a harmless no-op.
19
+ */
20
+
21
+ @theme inline {
22
+ /* ─── Colours ──────────────────────────────────────────────────────────── */
23
+ --color-background: var(--background);
24
+ --color-foreground: var(--foreground);
25
+
26
+ --color-card: var(--card);
27
+ --color-card-foreground: var(--card-foreground);
28
+
29
+ --color-popover: var(--popover);
30
+ --color-popover-foreground: var(--popover-foreground);
31
+
32
+ --color-primary: var(--primary);
33
+ --color-primary-foreground: var(--primary-foreground);
34
+
35
+ --color-secondary: var(--secondary);
36
+ --color-secondary-foreground: var(--secondary-foreground);
37
+
38
+ --color-muted: var(--muted);
39
+ --color-muted-foreground: var(--muted-foreground);
40
+
41
+ --color-accent: var(--accent);
42
+ --color-accent-foreground: var(--accent-foreground);
43
+
44
+ --color-destructive: var(--destructive);
45
+ --color-destructive-foreground: var(--destructive-foreground);
46
+
47
+ --color-border: var(--border);
48
+ --color-input: var(--input);
49
+ --color-ring: var(--ring);
50
+
51
+ /* Brand shortcuts */
52
+ --color-brand: var(--brand-orange);
53
+ --color-brand-accent: var(--brand-accent);
54
+ --color-brand-dark: var(--brand-dark);
55
+
56
+ /* Sidebar */
57
+ --color-sidebar: var(--sidebar-background);
58
+ --color-sidebar-foreground: var(--sidebar-foreground);
59
+ --color-sidebar-primary: var(--sidebar-primary);
60
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
61
+ --color-sidebar-accent: var(--sidebar-accent);
62
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
63
+ --color-sidebar-border: var(--sidebar-border);
64
+ --color-sidebar-ring: var(--sidebar-ring);
65
+
66
+ /* Charts */
67
+ --color-chart-1: var(--chart-1);
68
+ --color-chart-2: var(--chart-2);
69
+ --color-chart-3: var(--chart-3);
70
+ --color-chart-4: var(--chart-4);
71
+ --color-chart-5: var(--chart-5);
72
+
73
+ /* ─── Border radius ────────────────────────────────────────────────────── */
74
+ --radius-sm: var(--radius-sm);
75
+ --radius-md: var(--radius-md);
76
+ --radius-lg: var(--radius-lg);
77
+ --radius-xl: var(--radius-xl);
78
+ --radius-full: var(--radius-full);
79
+
80
+ /* ─── Fonts ────────────────────────────────────────────────────────────── */
81
+ --font-sans: var(--font-sans);
82
+ --font-condensed: var(--font-condensed);
83
+ --font-mono: var(--font-mono);
84
+ --font-editorial: var(--font-editorial);
85
+
86
+ /* ─── Editorial / paper (light, NOT default — see tokens.css §5.8) ─────── */
87
+ --color-paper: var(--paper);
88
+ --color-paper-2: var(--paper-2);
89
+ --color-ink-on-paper: var(--ink-on-paper);
90
+ --color-brand-on-light: var(--brand-on-light);
91
+
92
+ /* ─── Motion — DS-spec named easings → `ease-*` utilities ─────────────── */
93
+ --ease-standard: var(--p-ease-standard);
94
+ --ease-snap: var(--p-ease-snap);
95
+ --ease-out-std: var(--p-ease-out-std);
96
+ --ease-in-std: var(--p-ease-in-std);
97
+
98
+ /* ─── Z-index scale → `z-*` utilities (z-sticky, z-modal, z-toast, …) ─── */
99
+ --z-base: var(--p-z-base);
100
+ --z-sticky: var(--p-z-sticky);
101
+ --z-dropdown: var(--p-z-dropdown);
102
+ --z-tooltip: var(--p-z-tooltip);
103
+ --z-modal-scrim: var(--p-z-modal-scrim);
104
+ --z-modal: var(--p-z-modal);
105
+ --z-toast: var(--p-z-toast);
106
+
107
+ /* ─── DS v0 component tokens (--c-*) exposed as Tailwind utilities ────── */
108
+ /* Atoms cluster (Phase 1.1) — Button + Input + Card knobs */
109
+ --color-c-button-primary-bg: var(--c-button-primary-bg);
110
+ --color-c-button-primary-fg: var(--c-button-primary-fg);
111
+ --color-c-button-primary-bg-hover: var(--c-button-primary-bg-hover);
112
+ --color-c-button-primary-bg-active: var(--c-button-primary-bg-active);
113
+ --color-c-button-secondary-bg: var(--c-button-secondary-bg);
114
+ --color-c-button-secondary-fg: var(--c-button-secondary-fg);
115
+ --color-c-button-secondary-border: var(--c-button-secondary-border);
116
+ --color-c-button-secondary-bg-hover: var(--c-button-secondary-bg-hover);
117
+ --color-c-button-secondary-border-hover: var(--c-button-secondary-border-hover);
118
+ --color-c-button-ghost-fg: var(--c-button-ghost-fg);
119
+ --color-c-button-ghost-bg-hover: var(--c-button-ghost-bg-hover);
120
+ --color-c-button-destructive-fg: var(--c-button-destructive-fg);
121
+ --color-c-button-destructive-border: var(--c-button-destructive-border);
122
+ --color-c-button-destructive-bg-hover: var(--c-button-destructive-bg-hover);
123
+ --color-c-button-success-bg: var(--c-button-success-bg);
124
+ --color-c-button-success-fg: var(--c-button-success-fg);
125
+ --color-c-input-bg: var(--c-input-bg);
126
+ --color-c-input-fg: var(--c-input-fg);
127
+ --color-c-input-placeholder: var(--c-input-placeholder);
128
+ --color-c-input-border: var(--c-input-border);
129
+ --color-c-input-border-hover: var(--c-input-border-hover);
130
+ --color-c-input-border-focus: var(--c-input-border-focus);
131
+ --color-c-input-ring-focus: var(--c-input-ring-focus);
132
+ --color-c-input-border-error: var(--c-input-border-error);
133
+
134
+ /* Semantic ink as utilities */
135
+ --color-s-ink-primary: var(--s-ink-primary);
136
+ --color-s-ink-secondary: var(--s-ink-secondary);
137
+ --color-s-ink-muted: var(--s-ink-muted);
138
+ --color-s-ink-disabled: var(--s-ink-disabled);
139
+ --color-s-surface-page: var(--s-surface-page);
140
+ --color-s-surface-panel: var(--s-surface-panel);
141
+ --color-s-surface-raised: var(--s-surface-raised);
142
+ --color-s-surface-elevated: var(--s-surface-elevated);
143
+ --color-s-border-subtle: var(--s-border-subtle);
144
+ --color-s-border-strong: var(--s-border-strong);
145
+ --color-s-border-focus: var(--s-border-focus);
146
+ --color-s-brand-solid: var(--s-brand-solid);
147
+ --color-s-brand-hover: var(--s-brand-hover);
148
+ --color-s-brand-subtle: var(--s-brand-subtle);
149
+ --color-s-brand-ring: var(--s-brand-ring);
150
+ }
151
+
152
+ /* Dark mode variant — class-based */
153
+ @variant dark (&:is(.dark *));
@@ -26,6 +26,13 @@
26
26
  /* All design tokens live in tokens.css. */
27
27
  @import './tokens.css';
28
28
 
29
+ /* Tailwind v4 token→utility mappings (--color-popover: var(--popover), etc.).
30
+ * Importing this here means apps that do `@import 'tailwindcss'` +
31
+ * `@import '@devfellowship/components/styles'` get the bg-popover / bg-sidebar /
32
+ * border-sidebar-border / … utilities wired WITHOUT also importing `/tailwind`.
33
+ * Fixes the transparent-popover / dead-utility regression (v1.2.1). */
34
+ @import './theme-mappings.css';
35
+
29
36
  /* ─── Base resets ────────────────────────────────────────────────────────── */
30
37
  *, *::before, *::after {
31
38
  border-color: var(--s-border-subtle);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devfellowship/components",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "DFL Design System — UI components, hooks, utils and providers",
5
5
  "type": "module",
6
6
  "sideEffects": [