najm-kit 0.0.9 → 0.0.11
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.mjs +17 -1
- package/dist/styles.css +3 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2141,6 +2141,17 @@ function Alert({
|
|
|
2141
2141
|
);
|
|
2142
2142
|
}
|
|
2143
2143
|
var NAlert = Alert;
|
|
2144
|
+
var PORTAL_LAYER_STYLE_ID = "najm-kit-portal-layer-styles";
|
|
2145
|
+
function useNajmPortalLayerStyles() {
|
|
2146
|
+
React.useInsertionEffect(() => {
|
|
2147
|
+
if (typeof document === "undefined") return;
|
|
2148
|
+
if (document.getElementById(PORTAL_LAYER_STYLE_ID)) return;
|
|
2149
|
+
const style = document.createElement("style");
|
|
2150
|
+
style.id = PORTAL_LAYER_STYLE_ID;
|
|
2151
|
+
style.textContent = `[data-radix-popper-content-wrapper]{z-index:var(--najm-portal-z-index,10000)!important;}`;
|
|
2152
|
+
document.head.appendChild(style);
|
|
2153
|
+
}, []);
|
|
2154
|
+
}
|
|
2144
2155
|
function DropdownMenu({ ...props }) {
|
|
2145
2156
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
2146
2157
|
}
|
|
@@ -2175,6 +2186,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
2175
2186
|
);
|
|
2176
2187
|
}
|
|
2177
2188
|
function DropdownMenuSubContent({ className, ...props }) {
|
|
2189
|
+
useNajmPortalLayerStyles();
|
|
2178
2190
|
return /* @__PURE__ */ jsx(
|
|
2179
2191
|
DropdownMenuPrimitive.SubContent,
|
|
2180
2192
|
{
|
|
@@ -2190,6 +2202,7 @@ function DropdownMenuSubContent({ className, ...props }) {
|
|
|
2190
2202
|
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
2191
2203
|
const container = React.useContext(NajmThemeContainerCtx);
|
|
2192
2204
|
const resolvedBorderDegree = useResolvedBorderDegree();
|
|
2205
|
+
useNajmPortalLayerStyles();
|
|
2193
2206
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
|
|
2194
2207
|
DropdownMenuPrimitive.Content,
|
|
2195
2208
|
{
|
|
@@ -2269,6 +2282,7 @@ function PopoverAnchor({ ...props }) {
|
|
|
2269
2282
|
function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
2270
2283
|
const container = React.useContext(NajmThemeContainerCtx);
|
|
2271
2284
|
const resolvedBorderDegree = useResolvedBorderDegree();
|
|
2285
|
+
useNajmPortalLayerStyles();
|
|
2272
2286
|
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
|
|
2273
2287
|
PopoverPrimitive.Content,
|
|
2274
2288
|
{
|
|
@@ -2318,6 +2332,7 @@ function SelectScrollDownButton({ className, ...props }) {
|
|
|
2318
2332
|
}
|
|
2319
2333
|
function SelectContent({ className, children, position = "popper", ...props }) {
|
|
2320
2334
|
const container = React.useContext(NajmThemeContainerCtx);
|
|
2335
|
+
useNajmPortalLayerStyles();
|
|
2321
2336
|
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsxs(
|
|
2322
2337
|
SelectPrimitive.Content,
|
|
2323
2338
|
{
|
|
@@ -2701,6 +2716,7 @@ var tooltipContentVariants = cva(
|
|
|
2701
2716
|
);
|
|
2702
2717
|
function TooltipContent({ className, sideOffset = 4, variant, children, ...props }) {
|
|
2703
2718
|
const container = React.useContext(NajmThemeContainerCtx);
|
|
2719
|
+
useNajmPortalLayerStyles();
|
|
2704
2720
|
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
|
|
2705
2721
|
TooltipPrimitive.Content,
|
|
2706
2722
|
{
|
|
@@ -9947,7 +9963,7 @@ function NPageHeader({ icon: Icon2, title, subtitle, actions, filters, top, sear
|
|
|
9947
9963
|
bordered,
|
|
9948
9964
|
fallback: "default"
|
|
9949
9965
|
});
|
|
9950
|
-
const hasBorderShell = bordered || Boolean(borderDegree);
|
|
9966
|
+
const hasBorderShell = bordered || Boolean(borderDegree) || resolvedBorderDegree !== "default";
|
|
9951
9967
|
const isStrong = resolvedBorderDegree === "strong";
|
|
9952
9968
|
return /* @__PURE__ */ jsxs(
|
|
9953
9969
|
"div",
|
package/dist/styles.css
CHANGED
|
@@ -3473,6 +3473,9 @@ video {
|
|
|
3473
3473
|
.border-border-strong {
|
|
3474
3474
|
border-color: hsl(var(--najm-border-strong)) !important;
|
|
3475
3475
|
}
|
|
3476
|
+
[data-radix-popper-content-wrapper] {
|
|
3477
|
+
z-index: 10000 !important;
|
|
3478
|
+
}
|
|
3476
3479
|
/* Scrollable, but the scrollbar reserves no layout space (hidden in all
|
|
3477
3480
|
browsers). `overflow: overlay` was removed from Chrome (~v121) and now
|
|
3478
3481
|
behaves like `auto`, so hiding the bar is the only pure-CSS way to avoid
|