najm-kit 2.6.0 → 2.6.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/CHANGELOG.md +4 -0
- package/dist/index.mjs +6 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.1
|
|
4
|
+
|
|
5
|
+
- Fixed the non-card `NPageHeader` bleed never taking effect. 2.6.0 cancelled the page padding with the Tailwind utilities `-mt-[var(--najm-section-gap,0px)]` and `-mx-[var(--najm-page-gutter,0px)]`, which only work if the consuming app's Tailwind build happens to emit those arbitrary classes — they exist nowhere but inside this package's bundle, so a consumer could load a stylesheet without them and the header stayed exactly where it was. The offsets are inline styles now and no longer depend on the consumer's CSS pipeline.
|
|
6
|
+
|
|
3
7
|
## 2.6.0
|
|
4
8
|
|
|
5
9
|
- Added `NThemePresets`, and wired it into `NThemeCustomizer` through `presets`, `selectedPresetId`, `presetsStatus`, `savedDesign`, `onPresetSelect`, `onPresetSave`, `onPresetDelete`, and `presetLabels`. The picker renders only when a host supplies both `presets` and `onPresetSelect`. It is presentational: the host owns where presets live and what saving one means, and selecting a row hands the design back so it can be previewed before anything is stored. Each row draws a swatch strip from the design's own `sidebar`, `primary`, `secondary`, `accent`, and `background` tokens; the selected row's check sits left in the success colour and per-row delete sits right. Omit `onPresetSave` or `onPresetDelete` to hide those controls. Deleting is pointer-only — Radix owns roving focus inside the listbox.
|
package/dist/index.mjs
CHANGED
|
@@ -2450,7 +2450,12 @@ function NPageHeader({
|
|
|
2450
2450
|
const breakpointClasses = responsiveClasses[mobileBreakpoint];
|
|
2451
2451
|
const isCard = card ?? recipe?.card ?? bordered === true;
|
|
2452
2452
|
const recipeRadius = resolveRadiusValue(recipe?.radius);
|
|
2453
|
-
const
|
|
2453
|
+
const bleedStyle = isCard ? void 0 : {
|
|
2454
|
+
marginTop: "calc(var(--najm-section-gap, 0px) * -1)",
|
|
2455
|
+
marginInline: "calc(var(--najm-page-gutter, 0px) * -1)"
|
|
2456
|
+
};
|
|
2457
|
+
const recipeStyle = recipeRadius || recipe?.borderWidth || bleedStyle ? {
|
|
2458
|
+
...bleedStyle,
|
|
2454
2459
|
...recipeRadius ? { borderRadius: recipeRadius } : {},
|
|
2455
2460
|
...recipe?.borderWidth ? { borderWidth: recipe.borderWidth } : {}
|
|
2456
2461
|
} : void 0;
|
|
@@ -2464,14 +2469,6 @@ function NPageHeader({
|
|
|
2464
2469
|
className: cn(
|
|
2465
2470
|
isCard ? cn("rounded-xl bg-card text-card-foreground shadow-none", surfaceBorderClasses(true)) : cn(
|
|
2466
2471
|
"border-b bg-background text-foreground",
|
|
2467
|
-
/**
|
|
2468
|
-
* A non-card header is a full-bleed top bar, so it cancels the
|
|
2469
|
-
* page padding NPageLayout published. Without this it floats
|
|
2470
|
-
* below and inside that padding, and its bottom rule never meets
|
|
2471
|
-
* the sidebar header's. The 0px fallbacks keep the header inert
|
|
2472
|
-
* when it is used outside NPageLayout.
|
|
2473
|
-
*/
|
|
2474
|
-
"-mt-[var(--najm-section-gap,0px)] -mx-[var(--najm-page-gutter,0px)]",
|
|
2475
2472
|
surfaceBorderClasses(true, "bottom").replace("najm-border-b", "najm-border-b")
|
|
2476
2473
|
),
|
|
2477
2474
|
className
|