@devfellowship/components 1.2.0 → 1.2.2
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 +39 -26
- package/dist/index.js +39 -26
- package/dist/styles/tailwind.css +5 -134
- package/dist/styles/theme-mappings.css +153 -0
- package/dist/styles/theme.css +7 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -167,7 +167,7 @@ __export(src_exports, {
|
|
|
167
167
|
InputOTPGroup: () => InputOTPGroup,
|
|
168
168
|
InputOTPSeparator: () => InputOTPSeparator,
|
|
169
169
|
InputOTPSlot: () => InputOTPSlot,
|
|
170
|
-
Kbd: () =>
|
|
170
|
+
Kbd: () => Kbd2,
|
|
171
171
|
Label: () => Label3,
|
|
172
172
|
LoginPage: () => LoginPage,
|
|
173
173
|
LoginScreen: () => LoginScreen,
|
|
@@ -492,13 +492,37 @@ var Spinner = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
|
492
492
|
]
|
|
493
493
|
}
|
|
494
494
|
);
|
|
495
|
+
var Kbd = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
496
|
+
"kbd",
|
|
497
|
+
{
|
|
498
|
+
className: cn(
|
|
499
|
+
"ml-1 inline-flex items-center justify-center font-mono uppercase tracking-[0.04em]",
|
|
500
|
+
"text-[10.5px] text-[var(--s-ink-muted)]",
|
|
501
|
+
"min-w-[18px] h-[18px] px-1 rounded-[var(--p-radius-sm)]",
|
|
502
|
+
"border border-[var(--s-border-subtle)] bg-[var(--s-surface-raised)]"
|
|
503
|
+
),
|
|
504
|
+
children
|
|
505
|
+
}
|
|
506
|
+
);
|
|
495
507
|
var Button = React3.forwardRef(
|
|
496
508
|
({ className, variant, size, asChild = false, loading = false, disabled, kbd, children, ...props }, ref) => {
|
|
497
|
-
const
|
|
509
|
+
const classes = cn(buttonVariants({ variant, size, className }));
|
|
510
|
+
if (asChild) {
|
|
511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
512
|
+
import_react_slot.Slot,
|
|
513
|
+
{
|
|
514
|
+
className: classes,
|
|
515
|
+
ref,
|
|
516
|
+
"data-loading": loading ? "" : void 0,
|
|
517
|
+
...props,
|
|
518
|
+
children
|
|
519
|
+
}
|
|
520
|
+
);
|
|
521
|
+
}
|
|
498
522
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
499
|
-
|
|
523
|
+
"button",
|
|
500
524
|
{
|
|
501
|
-
className:
|
|
525
|
+
className: classes,
|
|
502
526
|
ref,
|
|
503
527
|
disabled: disabled || loading,
|
|
504
528
|
"data-loading": loading ? "" : void 0,
|
|
@@ -506,18 +530,7 @@ var Button = React3.forwardRef(
|
|
|
506
530
|
children: [
|
|
507
531
|
loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Spinner, {}) : null,
|
|
508
532
|
children,
|
|
509
|
-
kbd ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
510
|
-
"kbd",
|
|
511
|
-
{
|
|
512
|
-
className: cn(
|
|
513
|
-
"ml-1 inline-flex items-center justify-center font-mono uppercase tracking-[0.04em]",
|
|
514
|
-
"text-[10.5px] text-[var(--s-ink-muted)]",
|
|
515
|
-
"min-w-[18px] h-[18px] px-1 rounded-[var(--p-radius-sm)]",
|
|
516
|
-
"border border-[var(--s-border-subtle)] bg-[var(--s-surface-raised)]"
|
|
517
|
-
),
|
|
518
|
-
children: kbd
|
|
519
|
-
}
|
|
520
|
-
) : null
|
|
533
|
+
kbd ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Kbd, { children: kbd }) : null
|
|
521
534
|
]
|
|
522
535
|
}
|
|
523
536
|
);
|
|
@@ -2270,8 +2283,8 @@ var kbdVariants = (0, import_class_variance_authority6.cva)(
|
|
|
2270
2283
|
}
|
|
2271
2284
|
}
|
|
2272
2285
|
);
|
|
2273
|
-
var
|
|
2274
|
-
|
|
2286
|
+
var Kbd2 = React18.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("kbd", { ref, className: cn(kbdVariants({ size }), className), ...props }));
|
|
2287
|
+
Kbd2.displayName = "Kbd";
|
|
2275
2288
|
|
|
2276
2289
|
// src/components/menubar.tsx
|
|
2277
2290
|
var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"), 1);
|
|
@@ -3214,7 +3227,7 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
3214
3227
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3215
3228
|
"div",
|
|
3216
3229
|
{
|
|
3217
|
-
className: cn("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", className),
|
|
3230
|
+
className: cn("flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground", className),
|
|
3218
3231
|
ref,
|
|
3219
3232
|
...props,
|
|
3220
3233
|
children
|
|
@@ -3227,7 +3240,7 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
3227
3240
|
{
|
|
3228
3241
|
"data-sidebar": "sidebar",
|
|
3229
3242
|
"data-mobile": "true",
|
|
3230
|
-
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
3243
|
+
className: "w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
3231
3244
|
style: {
|
|
3232
3245
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
3233
3246
|
},
|
|
@@ -3250,10 +3263,10 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
3250
3263
|
"div",
|
|
3251
3264
|
{
|
|
3252
3265
|
className: cn(
|
|
3253
|
-
"relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
3266
|
+
"relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear",
|
|
3254
3267
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
3255
3268
|
"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]"
|
|
3269
|
+
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
3270
|
)
|
|
3258
3271
|
}
|
|
3259
3272
|
),
|
|
@@ -3261,10 +3274,10 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
3261
3274
|
"div",
|
|
3262
3275
|
{
|
|
3263
3276
|
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",
|
|
3277
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
3265
3278
|
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
3279
|
// 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",
|
|
3280
|
+
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
3281
|
className
|
|
3269
3282
|
),
|
|
3270
3283
|
...props,
|
|
@@ -3571,7 +3584,7 @@ var SidebarMenuSkeleton = React28.forwardRef(({ className, showIcon = false, ...
|
|
|
3571
3584
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3572
3585
|
Skeleton,
|
|
3573
3586
|
{
|
|
3574
|
-
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
3587
|
+
className: "h-4 max-w-[var(--skeleton-width)] flex-1",
|
|
3575
3588
|
"data-sidebar": "menu-skeleton-text",
|
|
3576
3589
|
style: {
|
|
3577
3590
|
"--skeleton-width": width
|
|
@@ -4954,7 +4967,7 @@ function AppSidebar({
|
|
|
4954
4967
|
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
4968
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SidebarInner, { ...props }),
|
|
4956
4969
|
/* @__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: "
|
|
4970
|
+
/* @__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
4971
|
children
|
|
4959
4972
|
] })
|
|
4960
4973
|
] }) });
|
package/dist/index.js
CHANGED
|
@@ -166,13 +166,37 @@ var Spinner = () => /* @__PURE__ */ jsxs2(
|
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
);
|
|
169
|
+
var Kbd = ({ children }) => /* @__PURE__ */ jsx3(
|
|
170
|
+
"kbd",
|
|
171
|
+
{
|
|
172
|
+
className: cn(
|
|
173
|
+
"ml-1 inline-flex items-center justify-center font-mono uppercase tracking-[0.04em]",
|
|
174
|
+
"text-[10.5px] text-[var(--s-ink-muted)]",
|
|
175
|
+
"min-w-[18px] h-[18px] px-1 rounded-[var(--p-radius-sm)]",
|
|
176
|
+
"border border-[var(--s-border-subtle)] bg-[var(--s-surface-raised)]"
|
|
177
|
+
),
|
|
178
|
+
children
|
|
179
|
+
}
|
|
180
|
+
);
|
|
169
181
|
var Button = React3.forwardRef(
|
|
170
182
|
({ className, variant, size, asChild = false, loading = false, disabled, kbd, children, ...props }, ref) => {
|
|
171
|
-
const
|
|
183
|
+
const classes = cn(buttonVariants({ variant, size, className }));
|
|
184
|
+
if (asChild) {
|
|
185
|
+
return /* @__PURE__ */ jsx3(
|
|
186
|
+
Slot,
|
|
187
|
+
{
|
|
188
|
+
className: classes,
|
|
189
|
+
ref,
|
|
190
|
+
"data-loading": loading ? "" : void 0,
|
|
191
|
+
...props,
|
|
192
|
+
children
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
172
196
|
return /* @__PURE__ */ jsxs2(
|
|
173
|
-
|
|
197
|
+
"button",
|
|
174
198
|
{
|
|
175
|
-
className:
|
|
199
|
+
className: classes,
|
|
176
200
|
ref,
|
|
177
201
|
disabled: disabled || loading,
|
|
178
202
|
"data-loading": loading ? "" : void 0,
|
|
@@ -180,18 +204,7 @@ var Button = React3.forwardRef(
|
|
|
180
204
|
children: [
|
|
181
205
|
loading ? /* @__PURE__ */ jsx3(Spinner, {}) : null,
|
|
182
206
|
children,
|
|
183
|
-
kbd ? /* @__PURE__ */ jsx3(
|
|
184
|
-
"kbd",
|
|
185
|
-
{
|
|
186
|
-
className: cn(
|
|
187
|
-
"ml-1 inline-flex items-center justify-center font-mono uppercase tracking-[0.04em]",
|
|
188
|
-
"text-[10.5px] text-[var(--s-ink-muted)]",
|
|
189
|
-
"min-w-[18px] h-[18px] px-1 rounded-[var(--p-radius-sm)]",
|
|
190
|
-
"border border-[var(--s-border-subtle)] bg-[var(--s-surface-raised)]"
|
|
191
|
-
),
|
|
192
|
-
children: kbd
|
|
193
|
-
}
|
|
194
|
-
) : null
|
|
207
|
+
kbd ? /* @__PURE__ */ jsx3(Kbd, { children: kbd }) : null
|
|
195
208
|
]
|
|
196
209
|
}
|
|
197
210
|
);
|
|
@@ -1944,8 +1957,8 @@ var kbdVariants = cva6(
|
|
|
1944
1957
|
}
|
|
1945
1958
|
}
|
|
1946
1959
|
);
|
|
1947
|
-
var
|
|
1948
|
-
|
|
1960
|
+
var Kbd2 = React18.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx26("kbd", { ref, className: cn(kbdVariants({ size }), className), ...props }));
|
|
1961
|
+
Kbd2.displayName = "Kbd";
|
|
1949
1962
|
|
|
1950
1963
|
// src/components/menubar.tsx
|
|
1951
1964
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
@@ -2892,7 +2905,7 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
2892
2905
|
return /* @__PURE__ */ jsx40(
|
|
2893
2906
|
"div",
|
|
2894
2907
|
{
|
|
2895
|
-
className: cn("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", className),
|
|
2908
|
+
className: cn("flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground", className),
|
|
2896
2909
|
ref,
|
|
2897
2910
|
...props,
|
|
2898
2911
|
children
|
|
@@ -2905,7 +2918,7 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
2905
2918
|
{
|
|
2906
2919
|
"data-sidebar": "sidebar",
|
|
2907
2920
|
"data-mobile": "true",
|
|
2908
|
-
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
2921
|
+
className: "w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
2909
2922
|
style: {
|
|
2910
2923
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
2911
2924
|
},
|
|
@@ -2928,10 +2941,10 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
2928
2941
|
"div",
|
|
2929
2942
|
{
|
|
2930
2943
|
className: cn(
|
|
2931
|
-
"relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
2944
|
+
"relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear",
|
|
2932
2945
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
2933
2946
|
"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]"
|
|
2947
|
+
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
2948
|
)
|
|
2936
2949
|
}
|
|
2937
2950
|
),
|
|
@@ -2939,10 +2952,10 @@ var Sidebar = React28.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
2939
2952
|
"div",
|
|
2940
2953
|
{
|
|
2941
2954
|
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",
|
|
2955
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
2943
2956
|
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
2957
|
// 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",
|
|
2958
|
+
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
2959
|
className
|
|
2947
2960
|
),
|
|
2948
2961
|
...props,
|
|
@@ -3249,7 +3262,7 @@ var SidebarMenuSkeleton = React28.forwardRef(({ className, showIcon = false, ...
|
|
|
3249
3262
|
/* @__PURE__ */ jsx40(
|
|
3250
3263
|
Skeleton,
|
|
3251
3264
|
{
|
|
3252
|
-
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
3265
|
+
className: "h-4 max-w-[var(--skeleton-width)] flex-1",
|
|
3253
3266
|
"data-sidebar": "menu-skeleton-text",
|
|
3254
3267
|
style: {
|
|
3255
3268
|
"--skeleton-width": width
|
|
@@ -4640,7 +4653,7 @@ function AppSidebar({
|
|
|
4640
4653
|
return /* @__PURE__ */ jsx61(SidebarProvider, { defaultOpen, children: /* @__PURE__ */ jsxs29("div", { className: "flex min-h-screen w-full", children: [
|
|
4641
4654
|
/* @__PURE__ */ jsx61(SidebarInner, { ...props }),
|
|
4642
4655
|
/* @__PURE__ */ jsxs29("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
4643
|
-
/* @__PURE__ */ jsx61("div", { className: "
|
|
4656
|
+
/* @__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
4657
|
children
|
|
4645
4658
|
] })
|
|
4646
4659
|
] }) });
|
|
@@ -5242,7 +5255,7 @@ export {
|
|
|
5242
5255
|
InputOTPGroup,
|
|
5243
5256
|
InputOTPSeparator,
|
|
5244
5257
|
InputOTPSlot,
|
|
5245
|
-
Kbd,
|
|
5258
|
+
Kbd2 as Kbd,
|
|
5246
5259
|
Label3 as Label,
|
|
5247
5260
|
LoginPage,
|
|
5248
5261
|
LoginScreen,
|
package/dist/styles/tailwind.css
CHANGED
|
@@ -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 *));
|
package/dist/styles/theme.css
CHANGED
|
@@ -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);
|