devnonla-ui 0.4.0 → 0.4.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/package.json
CHANGED
|
@@ -2,12 +2,10 @@ import { forwardRef, type ReactNode } from "react";
|
|
|
2
2
|
import { FluentIcon } from "../icon/FluentIcon";
|
|
3
3
|
|
|
4
4
|
const iconButtonClass =
|
|
5
|
-
"group w-[96px] flex flex-col items-center gap-
|
|
5
|
+
"group w-[96px] flex flex-col items-center gap-0.5 py-2 px-0 rounded-md border-none cursor-pointer select-none outline-none bg-transparent focus-visible:outline-2 focus-visible:outline-brand motion-safe:transition-transform motion-safe:hover:-translate-y-0.5 motion-safe:active:scale-[0.98]";
|
|
6
6
|
|
|
7
7
|
const labelClass = "text-xs leading-[18px] font-semibold text-center line-clamp-2 w-full";
|
|
8
8
|
|
|
9
|
-
const plateClass = "nonla-window-glass nonla-desktop-icon-plate w-11 h-11 flex items-center justify-center";
|
|
10
|
-
|
|
11
9
|
export const DesktopIcon = forwardRef<
|
|
12
10
|
HTMLButtonElement,
|
|
13
11
|
{
|
|
@@ -21,11 +19,7 @@ export const DesktopIcon = forwardRef<
|
|
|
21
19
|
>(function DesktopIcon({ label, icon, media, active = false, onCard = false, onClick }, ref) {
|
|
22
20
|
return (
|
|
23
21
|
<button ref={ref} type="button" title={label} aria-label={label} aria-current={active ? "true" : undefined} dir="ltr" onClick={onClick} className={iconButtonClass}>
|
|
24
|
-
{media ??
|
|
25
|
-
<span className={plateClass}>
|
|
26
|
-
<FluentIcon name={icon ?? "sparkle-24"} size={32} />
|
|
27
|
-
</span>
|
|
28
|
-
)}
|
|
22
|
+
{media ?? <FluentIcon name={icon ?? "sparkle-24"} size={32} />}
|
|
29
23
|
<span className={`${labelClass} ${onCard ? "text-foreground" : "text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.85)]"}`}>{label}</span>
|
|
30
24
|
</button>
|
|
31
25
|
);
|
|
@@ -6,7 +6,7 @@ export function MeadowDesktop({ children, src }: { children?: ReactNode; src?: s
|
|
|
6
6
|
<div className="absolute inset-0 bg-meadow">
|
|
7
7
|
<MeadowWallpaper src={src} />
|
|
8
8
|
<div className="nonla-desktop-layer absolute inset-x-0 bottom-0 top-desktop-bar">
|
|
9
|
-
<nav aria-label="Desktop" className="absolute inset-0 overflow-auto pl-
|
|
9
|
+
<nav aria-label="Desktop" className="absolute inset-0 overflow-auto pl-0 pr-3 pt-3 pb-3">
|
|
10
10
|
<div className="flex h-full flex-col flex-wrap content-start gap-x-2 gap-y-3">{children}</div>
|
|
11
11
|
</nav>
|
|
12
12
|
</div>
|
package/src/styles.css
CHANGED
|
@@ -633,14 +633,6 @@
|
|
|
633
633
|
backdrop-filter: blur(40px) saturate(108%);
|
|
634
634
|
}
|
|
635
635
|
|
|
636
|
-
/* Fluent Color desktop tile — same frost as the window, macOS squircle. */
|
|
637
|
-
.nonla-desktop-icon-plate {
|
|
638
|
-
overflow: hidden;
|
|
639
|
-
border: 0;
|
|
640
|
-
border-radius: 22%;
|
|
641
|
-
box-shadow: none;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
636
|
.nonla-btn-glass {
|
|
645
637
|
border-color: var(--glass-border);
|
|
646
638
|
background: var(--glass);
|