@frontile/theme 0.18.9 → 0.18.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.
- package/declarations/components/app-layout.d.ts +6 -12
- package/declarations/components/app-layout.d.ts.map +1 -1
- package/declarations/components/nav-color.d.ts +2 -1
- package/declarations/components/nav-color.d.ts.map +1 -1
- package/dist/index.js +46 -19
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import type { VariantProps } from '../tw';
|
|
|
2
2
|
declare const appLayout: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
variant: {
|
|
4
4
|
inset: {
|
|
5
|
-
base: string;
|
|
5
|
+
base: string[];
|
|
6
6
|
sidebar: string;
|
|
7
7
|
mainCard: string;
|
|
8
8
|
aside: string;
|
|
@@ -84,9 +84,7 @@ declare const appLayout: import("tailwind-variants").TVReturnType<{
|
|
|
84
84
|
solid: {};
|
|
85
85
|
};
|
|
86
86
|
frameGradient: {
|
|
87
|
-
true: {
|
|
88
|
-
base: string[];
|
|
89
|
-
};
|
|
87
|
+
true: {};
|
|
90
88
|
false: {
|
|
91
89
|
base: string;
|
|
92
90
|
};
|
|
@@ -161,7 +159,7 @@ declare const appLayout: import("tailwind-variants").TVReturnType<{
|
|
|
161
159
|
}, undefined, {
|
|
162
160
|
variant: {
|
|
163
161
|
inset: {
|
|
164
|
-
base: string;
|
|
162
|
+
base: string[];
|
|
165
163
|
sidebar: string;
|
|
166
164
|
mainCard: string;
|
|
167
165
|
aside: string;
|
|
@@ -243,9 +241,7 @@ declare const appLayout: import("tailwind-variants").TVReturnType<{
|
|
|
243
241
|
solid: {};
|
|
244
242
|
};
|
|
245
243
|
frameGradient: {
|
|
246
|
-
true: {
|
|
247
|
-
base: string[];
|
|
248
|
-
};
|
|
244
|
+
true: {};
|
|
249
245
|
false: {
|
|
250
246
|
base: string;
|
|
251
247
|
};
|
|
@@ -320,7 +316,7 @@ declare const appLayout: import("tailwind-variants").TVReturnType<{
|
|
|
320
316
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
321
317
|
variant: {
|
|
322
318
|
inset: {
|
|
323
|
-
base: string;
|
|
319
|
+
base: string[];
|
|
324
320
|
sidebar: string;
|
|
325
321
|
mainCard: string;
|
|
326
322
|
aside: string;
|
|
@@ -402,9 +398,7 @@ declare const appLayout: import("tailwind-variants").TVReturnType<{
|
|
|
402
398
|
solid: {};
|
|
403
399
|
};
|
|
404
400
|
frameGradient: {
|
|
405
|
-
true: {
|
|
406
|
-
base: string[];
|
|
407
|
-
};
|
|
401
|
+
true: {};
|
|
408
402
|
false: {
|
|
409
403
|
base: string;
|
|
410
404
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-layout.d.ts","sourceRoot":"","sources":["../../src/components/app-layout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-layout.d.ts","sourceRoot":"","sources":["../../src/components/app-layout.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA2K1C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2lBb,CAAC;AAEH,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,MAAM,MAAM,cAAc,GAAG,MAAM,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -11,5 +11,6 @@ declare const tintedColors: ("primary" | "success" | "warning" | "danger" | "sec
|
|
|
11
11
|
declare const navTint: string[];
|
|
12
12
|
declare const navSolid: string[];
|
|
13
13
|
declare const frameGradientStops: string[];
|
|
14
|
-
|
|
14
|
+
declare const neutralFrameGradientStops: string[];
|
|
15
|
+
export { layoutColor, tintedColors, navTint, navSolid, frameGradientStops, neutralFrameGradientStops };
|
|
15
16
|
//# sourceMappingURL=nav-color.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-color.d.ts","sourceRoot":"","sources":["../../src/components/nav-color.ts"],"names":[],"mappings":"AA4BA,QAAA,MAAM,WAAW;;;;;;;;CAiBP,CAAC;AAIX,QAAA,MAAM,YAAY,6EAOsB,CAAC;AAOzC,QAAA,MAAM,OAAO,UAKZ,CAAC;AAOF,QAAA,MAAM,QAAQ,UASb,CAAC;AAGF,QAAA,MAAM,kBAAkB,UAGvB,CAAC;AAEF,OAAO,
|
|
1
|
+
{"version":3,"file":"nav-color.d.ts","sourceRoot":"","sources":["../../src/components/nav-color.ts"],"names":[],"mappings":"AA4BA,QAAA,MAAM,WAAW;;;;;;;;CAiBP,CAAC;AAIX,QAAA,MAAM,YAAY,6EAOsB,CAAC;AAOzC,QAAA,MAAM,OAAO,UAKZ,CAAC;AAOF,QAAA,MAAM,QAAQ,UASb,CAAC;AAGF,QAAA,MAAM,kBAAkB,UAGvB,CAAC;AAOF,QAAA,MAAM,yBAAyB,UAG9B,CAAC;AAEF,OAAO,EACL,WAAW,EACX,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EAC1B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3145,6 +3145,13 @@ const navSolid = ['bg-(--app-layout-color) dark:bg-(--app-layout-color) text-(--
|
|
|
3145
3145
|
// The frame's gradient stops, from the layout color.
|
|
3146
3146
|
const frameGradientStops = ['[--app-frame-gradient-from:color-mix(in_oklab,var(--app-layout-color)_16%,transparent)]', '[--app-frame-gradient-to:color-mix(in_oklab,var(--color-neutral-subtle)_16%,transparent)]'];
|
|
3147
3147
|
|
|
3148
|
+
// Neutral's stops. Not a fraction of the layout color: neutral's is its
|
|
3149
|
+
// `bolder` level, near-white in dark mode, which tints the frame a cool grey.
|
|
3150
|
+
// The palette's warmth lives in its dark greys, so the gradient fades one of
|
|
3151
|
+
// them to nothing: `muted` on the light frame, `subtle` on the dark one. Like
|
|
3152
|
+
// a tint, it holds full strength behind the sidebar.
|
|
3153
|
+
const neutralFrameGradientStops = ['[--app-frame-gradient-from:var(--color-neutral-muted)] dark:[--app-frame-gradient-from:var(--color-neutral-subtle)]', '[--app-frame-gradient-to:transparent]'];
|
|
3154
|
+
|
|
3148
3155
|
// The shell is one CSS grid. The parts (sidebar, navbar, main, aside) are
|
|
3149
3156
|
// siblings in whatever order the consumer writes them, so each places itself
|
|
3150
3157
|
// in the grid rather than relying on a wrapper:
|
|
@@ -3302,6 +3309,12 @@ const edgeToEdgeVariants = ['sm', 'md', 'lg'].flatMap(breakpoint => {
|
|
|
3302
3309
|
// well as on the content surface. It reads the rows' color properties, so a
|
|
3303
3310
|
// toggle in a colored sidebar or navbar takes its colors (see `nav-color.ts`).
|
|
3304
3311
|
const iconButton = [...focusVisibleRing, 'inline-flex size-9 shrink-0 items-center justify-center rounded-lg', 'text-(--nav-item-fg,var(--color-neutral-firm))', 'hover:bg-(--nav-item-hover-bg,var(--color-neutral-muted))', 'hover:text-(--nav-item-hover-fg,var(--color-neutral-strong))'];
|
|
3312
|
+
|
|
3313
|
+
// The frame's ground in dark mode: a warm near-black, `neutral-subtle` at 30%
|
|
3314
|
+
// over `surface-app` (black), rather than black itself. Near enough to black
|
|
3315
|
+
// that the `canvas` content stays the lit surface, warm enough that the shell
|
|
3316
|
+
// keeps the palette's tone. Written out: Tailwind only finds whole strings.
|
|
3317
|
+
const darkFrame = 'dark:bg-[color-mix(in_oklab,var(--color-neutral-subtle)_30%,var(--color-surface-app))]';
|
|
3305
3318
|
// One variant entry per layout color, from the literal classes in
|
|
3306
3319
|
// `nav-color.ts` (which is where Tailwind finds them).
|
|
3307
3320
|
function perColor(entry) {
|
|
@@ -3330,9 +3343,9 @@ const appLayout = tv({
|
|
|
3330
3343
|
// The navbar and sidebar header read `--app-navbar-height` (always set)
|
|
3331
3344
|
// with a literal fallback for parts rendered outside an `AppLayout`.
|
|
3332
3345
|
base: ['relative grid w-full text-on-surface-app', 'grid-cols-[auto_minmax(0,1fr)_auto]', '[--app-navbar-height:3rem]',
|
|
3333
|
-
// The frame's gradient, painted over the variant's
|
|
3334
|
-
// color. Its two stop colors are properties (set per
|
|
3335
|
-
// below), so an app can swap a stop without rewriting the gradient:
|
|
3346
|
+
// The frame's gradient, painted over the variant's own background
|
|
3347
|
+
// color. Its two stop colors are properties (set per color when
|
|
3348
|
+
// `frameGradient` is on, below), so an app can swap a stop without rewriting the gradient:
|
|
3336
3349
|
// `@classes={{hash base='[--app-frame-gradient-from:...]'}}`.
|
|
3337
3350
|
// `--app-frame-gradient` itself takes any `<image>`, or `none`. The tint
|
|
3338
3351
|
// holds at full strength across the sidebar and fades across the content,
|
|
@@ -3440,15 +3453,16 @@ const appLayout = tv({
|
|
|
3440
3453
|
variant: {
|
|
3441
3454
|
// The tinted frame shows through a gutter around the card. The content
|
|
3442
3455
|
// is the lit surface in both schemes: on a `canvas` frame in light, and
|
|
3443
|
-
// in dark,
|
|
3444
|
-
//
|
|
3456
|
+
// in dark, `canvas` content on a near-black frame (`darkFrame`).
|
|
3457
|
+
// `canvas`, not the `card` veil: the veil is white at 7%, a cool grey
|
|
3458
|
+
// that drops the palette's warmth from the whole content area.
|
|
3445
3459
|
inset: {
|
|
3446
|
-
base: 'bg-surface-canvas p-3
|
|
3460
|
+
base: ['bg-surface-canvas p-3', darkFrame],
|
|
3447
3461
|
// 0.375rem of clip room clears the 5px focus ring, which the
|
|
3448
3462
|
// scrolling body would otherwise clip at its edge. The ground and
|
|
3449
3463
|
// gutter depend on the sidebar's surface (see the compound variants).
|
|
3450
3464
|
sidebar: '[--sidebar-clip:0.375rem]',
|
|
3451
|
-
mainCard: 'rounded-xl bg-surface-app shadow-sm ring-1 ring-neutral-muted dark:bg-surface-
|
|
3465
|
+
mainCard: 'rounded-xl bg-surface-app shadow-sm ring-1 ring-neutral-muted dark:bg-surface-canvas',
|
|
3452
3466
|
aside: 'border-s border-neutral-muted',
|
|
3453
3467
|
// The bottom bar runs edge to edge: it pulls out over the frame's
|
|
3454
3468
|
// side and bottom gutter (`p-3`).
|
|
@@ -3565,26 +3579,25 @@ const appLayout = tv({
|
|
|
3565
3579
|
plain: {},
|
|
3566
3580
|
solid: {}
|
|
3567
3581
|
},
|
|
3568
|
-
// The frame's gradient
|
|
3569
|
-
//
|
|
3570
|
-
//
|
|
3582
|
+
// The frame's gradient, painted over the variant's own surface. Off, the
|
|
3583
|
+
// frame is flat. The stops depend on the color (compound variants below):
|
|
3584
|
+
// a low-alpha tint of the layout color fading to a neutral grey, or, for
|
|
3585
|
+
// neutral, a warm grey fading to nothing. Both are theme colors, so none
|
|
3586
|
+
// of it is hard-coded.
|
|
3571
3587
|
frameGradient: {
|
|
3572
|
-
true: {
|
|
3573
|
-
base: frameGradientStops
|
|
3574
|
-
},
|
|
3588
|
+
true: {},
|
|
3575
3589
|
false: {
|
|
3576
3590
|
base: '[--app-frame-gradient:none]'
|
|
3577
3591
|
}
|
|
3578
3592
|
},
|
|
3579
3593
|
// `translucent` lets the frame (and its gradient) show through the inset
|
|
3580
|
-
// card:
|
|
3581
|
-
//
|
|
3582
|
-
//
|
|
3583
|
-
// background would otherwise win.
|
|
3594
|
+
// card: white at 50% in light, and the warm `canvas` at 70% in dark, so
|
|
3595
|
+
// the card keeps the solid card's tone over the gradient. `solid` keeps
|
|
3596
|
+
// the opaque surface.
|
|
3584
3597
|
cardSurface: {
|
|
3585
3598
|
solid: {},
|
|
3586
3599
|
translucent: {
|
|
3587
|
-
mainCard: 'bg-surface-app/50 dark:bg-surface-
|
|
3600
|
+
mainCard: 'bg-surface-app/50 dark:bg-surface-canvas/70'
|
|
3588
3601
|
}
|
|
3589
3602
|
},
|
|
3590
3603
|
// `end` moves the sidebar to the last column and the aside to the first,
|
|
@@ -3696,7 +3709,7 @@ const appLayout = tv({
|
|
|
3696
3709
|
variant: 'attached',
|
|
3697
3710
|
standalone: false,
|
|
3698
3711
|
class: {
|
|
3699
|
-
sidebar: 'border-e border-neutral-muted bg-surface-canvas
|
|
3712
|
+
sidebar: ['border-e border-neutral-muted bg-surface-canvas', darkFrame]
|
|
3700
3713
|
}
|
|
3701
3714
|
}, {
|
|
3702
3715
|
variant: 'attached',
|
|
@@ -3803,6 +3816,20 @@ const appLayout = tv({
|
|
|
3803
3816
|
sidebar: 'bg-transparent [--sidebar-gutter:0px]'
|
|
3804
3817
|
}
|
|
3805
3818
|
},
|
|
3819
|
+
// The frame gradient's stops (see `nav-color.ts`).
|
|
3820
|
+
{
|
|
3821
|
+
color: tintedColors,
|
|
3822
|
+
frameGradient: true,
|
|
3823
|
+
class: {
|
|
3824
|
+
base: frameGradientStops
|
|
3825
|
+
}
|
|
3826
|
+
}, {
|
|
3827
|
+
color: 'neutral',
|
|
3828
|
+
frameGradient: true,
|
|
3829
|
+
class: {
|
|
3830
|
+
base: neutralFrameGradientStops
|
|
3831
|
+
}
|
|
3832
|
+
},
|
|
3806
3833
|
// Color. Last, so the solid fill wins over the attached variant's
|
|
3807
3834
|
// backgrounds and border.
|
|
3808
3835
|
{
|