notchbar 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.md +192 -2
- package/dist/index.cjs +585 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +146 -0
- package/dist/index.d.ts +146 -0
- package/dist/index.js +563 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +510 -0
- package/package.json +82 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Notchbar.tsx"],"sourcesContent":["import {\r\n AnimatePresence,\r\n type Easing,\r\n animate,\r\n motion,\r\n useMotionValue,\r\n useMotionValueEvent,\r\n useReducedMotion,\r\n useScroll,\r\n} from \"motion/react\";\r\nimport {\r\n createContext,\r\n useContext,\r\n useEffect,\r\n useId,\r\n useRef,\r\n useState,\r\n type CSSProperties,\r\n type ElementType,\r\n type PointerEvent as ReactPointerEvent,\r\n type ReactNode,\r\n type RefObject,\r\n} from \"react\";\r\n\r\n/**\r\n * A navigation bar shaped like a tab hanging from the top edge of the page,\r\n * joined to it by concave shoulders. At the top of the page it is wide and in\r\n * a quiet paper tone. Once you scroll it condenses into narrower liquid glass.\r\n *\r\n * Menus open one shared panel that morphs between sizes and slides its content\r\n * the way the pointer travelled. Hovering a link puts the others in the shade\r\n * and draws a hand-drawn marker stroke under it.\r\n */\r\n\r\n/* ---------------------------------------------------------------- types */\r\n\r\nexport type PanelContext = {\r\n /** Close the open menu, for example after a link is picked */\r\n close: () => void;\r\n /** True when the visitor prefers reduced motion */\r\n reduced: boolean;\r\n};\r\n\r\nexport type MobileLink = { label: string; href: string; meta?: string; badge?: ReactNode };\r\n\r\n/** A top-level item that opens a panel */\r\nexport type NavMenu = {\r\n label: string;\r\n /** What the panel shows. Compose it from the Panel* blocks or anything else. */\r\n panel: (ctx: PanelContext) => ReactNode;\r\n /** Panel width, any CSS length. Defaults to 36rem. */\r\n width?: string;\r\n /** Links listed under this item's heading in the mobile menu */\r\n mobile?: MobileLink[];\r\n};\r\n\r\n/** A top-level link. An href starting with \"#\" also marks itself while that section is in view. */\r\nexport type NavLinkItem = { label: string; href: string };\r\n\r\nexport type NavItem = NavMenu | NavLinkItem;\r\n\r\nexport type NotchbarProps = {\r\n brand: {\r\n name: string;\r\n href?: string;\r\n /** Your logo. Defaults to a small whiteboard square with a marker dot. */\r\n mark?: ReactNode;\r\n /** Accessible name for the home link. Defaults to \"<name>, home\". */\r\n label?: string;\r\n };\r\n items: NavItem[];\r\n /** The button on the right */\r\n cta?: { label: string; href: string };\r\n /** Your router's link component (Next's Link, React Router's Link). Defaults to <a>. */\r\n linkComponent?: ElementType;\r\n /** The marker colour: hover strokes, the button's dot, \"New\" marks. Defaults to #e5484d. */\r\n accent?: string;\r\n /** Widest the stretched tab gets, in px. Defaults to 1024. */\r\n maxWidth?: number;\r\n /** Scroll distance (px) that condenses the tab into glass. Defaults to 56. */\r\n compactAt?: number;\r\n /** Scroll distance (px) under which it stretches out again. Defaults to 24. */\r\n expandAt?: number;\r\n /**\r\n * \"auto\" follows the scroll. \"paper\" or \"glass\" pins the tab in that state,\r\n * for pages that should always show one of them. Defaults to \"auto\".\r\n */\r\n state?: \"auto\" | \"paper\" | \"glass\";\r\n className?: string;\r\n};\r\n\r\nconst isMenu = (i: NavItem): i is NavMenu => \"panel\" in i;\r\n\r\n/* ---------------------------------------------------------------- motion */\r\n\r\n/*\r\n * Condensing happens while the reader heads into the page, so it is quick and\r\n * tucked. Stretching back happens when they return to the top, so it is slower\r\n * and more generous, with a visible overshoot. On top of the width spring:\r\n * - squash and stretch: height dips as the width pulls in, swells as it lets\r\n * out, then settles, so the tab keeps its volume;\r\n * - drag: logo and button trail the moving edges, then catch up and overshoot;\r\n * - breath: the links shrink a touch with the squash, then settle.\r\n */\r\nconst springIn = { type: \"spring\", duration: 0.5, bounce: 0.1 } as const;\r\nconst springOut = { type: \"spring\", duration: 0.68, bounce: 0.24 } as const;\r\nconst ease = [0.22, 1, 0.36, 1] as const;\r\n\r\n/** Hand-drawn underline strokes, cycled per link, so no two look stamped */\r\nconst STROKES = [\r\n \"M2 5.2 C18 3.6 40 3.4 58 4.2 S74 5.6 78 3.2\",\r\n \"M2 4.2 C20 5.6 42 3.2 60 3.9 S73 4.9 78 2.8\",\r\n \"M2 5 C16 4 36 4.8 54 3.7 S72 3.3 78 4.7\",\r\n \"M2 3.9 C22 4.9 44 4.5 62 3.4 S75 3.6 78 5.1\",\r\n];\r\n\r\n/** Radius of the concave shoulders that join the tab to the top edge */\r\nconst SHOULDER = 18;\r\n\r\n/* ---------------------------------------------------------------- context */\r\n\r\nconst LinkContext = createContext<ElementType>(\"a\");\r\nconst PanelCtx = createContext<PanelContext>({ close: () => {}, reduced: false });\r\n\r\n/** The panel's close function and reduced-motion flag, for your own panel content */\r\nexport const usePanel = () => useContext(PanelCtx);\r\n\r\ntype LinkProps = {\r\n href: string;\r\n className?: string;\r\n onClick?: () => void;\r\n children: ReactNode;\r\n \"aria-label\"?: string;\r\n onPointerEnter?: (e: ReactPointerEvent) => void;\r\n onPointerLeave?: (e: ReactPointerEvent) => void;\r\n onFocus?: () => void;\r\n onBlur?: () => void;\r\n \"data-active\"?: boolean;\r\n};\r\n\r\n/** A link rendered with the nav's link component */\r\nexport function NavLink(props: LinkProps) {\r\n const Comp = useContext(LinkContext);\r\n return <Comp {...props} />;\r\n}\r\n\r\n/* ---------------------------------------------------------------- the nav */\r\n\r\nexport function Notchbar({\r\n brand,\r\n items,\r\n cta,\r\n linkComponent = \"a\",\r\n accent = \"#e5484d\",\r\n maxWidth = 1024,\r\n compactAt = 56,\r\n expandAt = 24,\r\n state = \"auto\",\r\n className,\r\n}: NotchbarProps) {\r\n const reduced = useReducedMotion() ?? false;\r\n const { scrollY } = useScroll();\r\n const [scrolled, setScrolled] = useState(false);\r\n const compact = state === \"auto\" ? scrolled : state === \"glass\";\r\n const [hover, setHover] = useState<number | null>(null);\r\n const [section, setSection] = useState<string | null>(null);\r\n // The open menu and the direction we arrived from (-1 left, 1 right, 0 fresh),\r\n // so the panel content slides the way the pointer travelled.\r\n const [open, setOpen] = useState<{ index: number; dir: number } | null>(null);\r\n const [mobile, setMobile] = useState(false);\r\n const [size, setSize] = useState<{ wide: number; tight: number } | null>(null);\r\n const closeTimer = useRef<number | undefined>(undefined);\r\n const navRef = useRef<HTMLElement>(null);\r\n const logoRef = useRef<HTMLDivElement>(null);\r\n const listRef = useRef<HTMLUListElement>(null);\r\n const rightRef = useRef<HTMLDivElement>(null);\r\n const panelId = useId();\r\n\r\n // Hysteresis: condense past compactAt, stretch only under expandAt, so slow\r\n // scrolling near the threshold never makes the tab flutter.\r\n useMotionValueEvent(scrollY, \"change\", (v) => {\r\n if (!scrolled && v > compactAt) setScrolled(true);\r\n else if (scrolled && v < expandAt) setScrolled(false);\r\n });\r\n\r\n // Secondary motion, once per state change. Height lives in a motion value so\r\n // React re-renders never reset it mid-squash.\r\n const height = useMotionValue(60);\r\n const settled = useRef(false);\r\n useEffect(() => {\r\n if (!settled.current || reduced) {\r\n settled.current = true;\r\n height.set(compact ? 52 : 60);\r\n return;\r\n }\r\n const d = compact ? 1 : -1;\r\n const timing = (dur: number) => ({ duration: dur, times: [0, 0.3, 0.68, 1], ease: [\"easeOut\", \"easeInOut\", \"easeInOut\"] as Easing[] });\r\n const run = [\r\n animate(height, compact ? [height.get(), 48.5, 52.8, 52] : [height.get(), 63.5, 59.6, 60], {\r\n duration: compact ? 0.6 : 0.78,\r\n times: [0, 0.34, 0.7, 1],\r\n ease: [\"easeOut\", \"easeInOut\", \"easeInOut\"],\r\n }),\r\n logoRef.current && animate(logoRef.current, { x: [null, -6 * d, 1.6 * d, 0] }, timing(compact ? 0.58 : 0.74)),\r\n rightRef.current && animate(rightRef.current, { x: [null, 6 * d, -1.6 * d, 0] }, timing(compact ? 0.58 : 0.74)),\r\n listRef.current &&\r\n animate(listRef.current, { scale: compact ? [null, 0.97, 1.006, 1] : [null, 1.02, 0.996, 1] }, timing(compact ? 0.56 : 0.72)),\r\n ];\r\n return () => run.forEach((c) => c && c.stop());\r\n }, [compact, reduced, height]);\r\n\r\n // Real widths for both states, so the tab animates its actual width (not a\r\n // scale transform) and the shoulders stay crisp mid-transition.\r\n useEffect(() => {\r\n const measure = () => {\r\n const md = window.matchMedia(\"(min-width: 768px)\").matches;\r\n const parts = [logoRef, listRef, rightRef].map((r) => r.current?.offsetWidth ?? 0).filter((w) => w > 0);\r\n const gap = md ? 28 : 10;\r\n const wide = Math.min(maxWidth, window.innerWidth - 52);\r\n const tight = parts.reduce((a, b) => a + b, 0) + gap * (parts.length - 1) + 16 + 6;\r\n setSize({ wide, tight: Math.min(tight, wide) });\r\n };\r\n measure();\r\n document.fonts?.ready.then(measure);\r\n window.addEventListener(\"resize\", measure);\r\n return () => window.removeEventListener(\"resize\", measure);\r\n }, [maxWidth, items]);\r\n\r\n // Edge refraction needs SVG filters in backdrop-filter, which only Chromium\r\n // draws. Elsewhere the glass stays plain frosted glass.\r\n useEffect(() => {\r\n const ua = navigator.userAgent;\r\n const ok = /Chrome\\/|Edg\\//.test(ua) && !/Firefox\\//.test(ua) && CSS.supports?.(\"backdrop-filter\", \"url(#a)\") === true;\r\n if (ok) navRef.current?.setAttribute(\"data-refract\", \"\");\r\n }, []);\r\n\r\n // Rest the marker stroke under the in-page section that's in view\r\n useEffect(() => {\r\n const ids = items.filter((i): i is NavLinkItem => !isMenu(i) && i.href.startsWith(\"#\")).map((i) => i.href.slice(1));\r\n const els = ids.map((id) => document.getElementById(id)).filter((e): e is HTMLElement => !!e);\r\n if (!els.length) return;\r\n const io = new IntersectionObserver(\r\n (entries) => {\r\n for (const e of entries) {\r\n if (e.isIntersecting) setSection(e.target.id);\r\n else setSection((s) => (s === e.target.id ? null : s));\r\n }\r\n },\r\n { rootMargin: \"-45% 0px -45% 0px\" },\r\n );\r\n els.forEach((el) => io.observe(el));\r\n return () => io.disconnect();\r\n }, [items]);\r\n\r\n // Escape closes any open menu\r\n useEffect(() => {\r\n const onKey = (e: KeyboardEvent) => {\r\n if (e.key === \"Escape\") {\r\n setOpen(null);\r\n setMobile(false);\r\n }\r\n };\r\n window.addEventListener(\"keydown\", onKey);\r\n return () => window.removeEventListener(\"keydown\", onKey);\r\n }, []);\r\n\r\n const keepMenu = () => window.clearTimeout(closeTimer.current);\r\n const showMenu = (index: number) => {\r\n keepMenu();\r\n setOpen((o) => (o?.index === index ? o : { index, dir: o ? Math.sign(index - o.index) : 0 }));\r\n };\r\n const toggleMenu = (index: number) => {\r\n keepMenu();\r\n setOpen((o) => (o?.index === index ? null : { index, dir: 0 }));\r\n };\r\n const closeMenuSoon = () => {\r\n keepMenu();\r\n closeTimer.current = window.setTimeout(() => setOpen(null), 160);\r\n };\r\n\r\n // The light on the glass follows the cursor\r\n const onGlassMove = (e: ReactPointerEvent) => {\r\n if (e.pointerType !== \"mouse\" || !navRef.current) return;\r\n const r = navRef.current.getBoundingClientRect();\r\n navRef.current.style.setProperty(\"--nb-mx\", `${e.clientX - r.left + SHOULDER}px`);\r\n navRef.current.style.setProperty(\"--nb-my\", `${e.clientY - r.top}px`);\r\n };\r\n\r\n const sectionIndex = section === null ? null : items.findIndex((i) => !isMenu(i) && i.href === `#${section}`);\r\n const strokeAt = hover ?? open?.index ?? sectionIndex;\r\n const t = reduced ? { duration: 0 } : compact ? springIn : springOut;\r\n const box = compact ? { width: size?.tight, paddingLeft: 16, paddingRight: 6 } : { width: size?.wide, paddingLeft: 20, paddingRight: 8 };\r\n const openItem = open ? items[open.index] : null;\r\n\r\n return (\r\n <LinkContext.Provider value={linkComponent}>\r\n <header className={`nb${className ? ` ${className}` : \"\"}`} style={{ \"--nb-accent\": accent, \"--nb-max\": `${maxWidth}px` } as CSSProperties}>\r\n <RefractFilter />\r\n <div className=\"nb-wrap\" onPointerLeave={(e) => e.pointerType === \"mouse\" && closeMenuSoon()}>\r\n <motion.nav\r\n ref={navRef}\r\n aria-label=\"Main\"\r\n data-compact={compact || undefined}\r\n className=\"nb-tab\"\r\n initial={false}\r\n animate={size ? box : undefined}\r\n style={{ height }}\r\n transition={t}\r\n onPointerMove={onGlassMove}\r\n >\r\n <TabShape navRef={navRef} />\r\n\r\n <div ref={logoRef} className=\"nb-brand\">\r\n <NavLink href={brand.href ?? \"/\"} aria-label={brand.label ?? `${brand.name}, home`} className=\"nb-brand-link\">\r\n {brand.mark ?? <Mark />}\r\n <span className=\"nb-brand-name\">{brand.name}</span>\r\n </NavLink>\r\n </div>\r\n\r\n <ul ref={listRef} className=\"nb-list nb-spot\" onPointerLeave={() => setHover(null)}>\r\n {items.map((item, i) => (\r\n <li key={item.label} className=\"nb-spot-item\">\r\n {isMenu(item) ? (\r\n <button\r\n type=\"button\"\r\n aria-expanded={open?.index === i}\r\n aria-controls={panelId}\r\n data-active={open?.index === i || undefined}\r\n className=\"nb-item\"\r\n onClick={() => toggleMenu(i)}\r\n onPointerEnter={(e) => {\r\n if (e.pointerType !== \"mouse\") return;\r\n setHover(i);\r\n showMenu(i);\r\n }}\r\n onFocus={() => setHover(i)}\r\n onBlur={() => setHover(null)}\r\n >\r\n {item.label}\r\n <motion.svg\r\n width=\"10\"\r\n height=\"10\"\r\n viewBox=\"0 0 10 10\"\r\n aria-hidden\r\n animate={{ rotate: open?.index === i ? 180 : 0 }}\r\n transition={reduced ? { duration: 0 } : { type: \"spring\", duration: 0.35, bounce: 0.3 }}\r\n >\r\n <path d=\"M2 3.75 5 6.75l3-3\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\r\n </motion.svg>\r\n <Stroke show={strokeAt === i} d={STROKES[i % STROKES.length]} tilt={i % 2 ? -1.2 : 0.8} reduced={reduced} />\r\n </button>\r\n ) : (\r\n <NavLink\r\n href={item.href}\r\n className=\"nb-item\"\r\n data-active={sectionIndex === i || undefined}\r\n onPointerEnter={() => {\r\n setHover(i);\r\n closeMenuSoon();\r\n }}\r\n onFocus={() => setHover(i)}\r\n onBlur={() => setHover(null)}\r\n >\r\n {item.label}\r\n <Stroke show={strokeAt === i} d={STROKES[i % STROKES.length]} tilt={i % 2 ? -0.6 : 0.8} reduced={reduced} />\r\n </NavLink>\r\n )}\r\n </li>\r\n ))}\r\n </ul>\r\n\r\n <div ref={rightRef} className=\"nb-right\">\r\n {cta && <Cta {...cta} />}\r\n <button\r\n type=\"button\"\r\n aria-label={mobile ? \"Close menu\" : \"Open menu\"}\r\n aria-expanded={mobile}\r\n onClick={() => setMobile((m) => !m)}\r\n className=\"nb-burger\"\r\n >\r\n <Burger open={mobile} reduced={reduced} />\r\n </button>\r\n </div>\r\n </motion.nav>\r\n\r\n <AnimatePresence>\r\n {open && openItem && isMenu(openItem) && (\r\n <motion.div\r\n key=\"menu\"\r\n id={panelId}\r\n onPointerEnter={(e) => e.pointerType === \"mouse\" && keepMenu()}\r\n className=\"nb-drop\"\r\n initial={reduced ? { opacity: 0 } : { opacity: 0, y: -8, scale: 0.96, filter: \"blur(6px)\" }}\r\n animate={{ opacity: 1, y: 0, scale: 1, filter: \"blur(0px)\" }}\r\n exit={reduced ? { opacity: 0 } : { opacity: 0, y: -4, scale: 0.98, filter: \"blur(3px)\", transition: { duration: 0.16, ease } }}\r\n transition={\r\n reduced ? { duration: 0.12 } : { type: \"spring\", duration: 0.45, bounce: 0.22, opacity: { duration: 0.2, ease }, filter: { duration: 0.22, ease } }\r\n }\r\n style={{ transformOrigin: \"50% 0%\" }}\r\n >\r\n <MenuPanel items={items} open={open} reduced={reduced} close={() => setOpen(null)} />\r\n </motion.div>\r\n )}\r\n </AnimatePresence>\r\n\r\n <AnimatePresence>\r\n {mobile && (\r\n <motion.div\r\n key=\"mobile\"\r\n className=\"nb-mobile\"\r\n initial={reduced ? { opacity: 0 } : { opacity: 0, y: -8, scale: 0.98 }}\r\n animate={{ opacity: 1, y: 0, scale: 1 }}\r\n exit={{ opacity: 0, y: -4, transition: { duration: 0.14, ease } }}\r\n transition={reduced ? { duration: 0.12 } : { type: \"spring\", duration: 0.4, bounce: 0.12, opacity: { duration: 0.18 } }}\r\n style={{ transformOrigin: \"50% 0%\" }}\r\n >\r\n <MobilePanel items={items} close={() => setMobile(false)} />\r\n </motion.div>\r\n )}\r\n </AnimatePresence>\r\n </div>\r\n </header>\r\n </LinkContext.Provider>\r\n );\r\n}\r\n\r\n/* ---------------------------------------------------------------- the shape */\r\n\r\n/**\r\n * The tab's outline as one path: left shoulder, side, bottom corners, side,\r\n * right shoulder. The bottom corners round off as the tab squashes, so they\r\n * ride the same squash and stretch as the height.\r\n */\r\nfunction tabPath(w: number, h: number, open = false) {\r\n const S = SHOULDER;\r\n const T = w + 2 * S;\r\n const r = Math.max(10, Math.min(22 + (60 - h) * 0.5, h - S, w / 2));\r\n const d =\r\n `M0 0A${S} ${S} 0 0 1 ${S} ${S}V${h - r}A${r} ${r} 0 0 0 ${S + r} ${h}` +\r\n `H${S + w - r}A${r} ${r} 0 0 0 ${S + w} ${h - r}V${S}A${S} ${S} 0 0 1 ${T} 0`;\r\n return open ? d : `${d}Z`;\r\n}\r\n\r\n/**\r\n * Material and outline of the tab, drawn from a single path re-traced from the\r\n * tab's live size whenever it changes. Fill layers are clipped to the path; the\r\n * hairline, inner rim and shadow are strokes of the same path. One shape, so\r\n * the shoulders and the body can never come apart.\r\n */\r\nfunction TabShape({ navRef }: { navRef: RefObject<HTMLElement | null> }) {\r\n const root = useRef<HTMLSpanElement>(null);\r\n const uid = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\r\n\r\n useEffect(() => {\r\n const nav = navRef.current;\r\n const el = root.current;\r\n if (!nav || !el) return;\r\n const shapes = el.querySelectorAll<SVGPathElement>(\"[data-shape]\");\r\n const edges = el.querySelectorAll<SVGPathElement>(\"[data-edge]\");\r\n const fills = el.querySelectorAll<HTMLElement>(\"[data-fill]\");\r\n let last = \"\";\r\n const trace = () => {\r\n const w = nav.offsetWidth;\r\n const h = nav.offsetHeight;\r\n const key = `${w}x${h}`;\r\n if (key === last || !w || !h) return;\r\n last = key;\r\n const closed = tabPath(w, h);\r\n const open = tabPath(w, h, true);\r\n shapes.forEach((p) => p.setAttribute(\"d\", closed));\r\n edges.forEach((p) => p.setAttribute(\"d\", open));\r\n fills.forEach((f) => (f.style.clipPath = `path(\"${closed}\")`));\r\n };\r\n trace();\r\n const ro = new ResizeObserver(trace);\r\n ro.observe(nav);\r\n return () => ro.disconnect();\r\n }, [navRef]);\r\n\r\n return (\r\n <span ref={root} aria-hidden className=\"nb-shape\">\r\n <span data-fill className=\"nb-glass\" />\r\n <span data-fill className=\"nb-paper\" />\r\n <span data-fill className=\"nb-sheen\" />\r\n <span data-fill className=\"nb-glint\" />\r\n <svg className=\"nb-outline\" width=\"100%\" height=\"100%\">\r\n <defs>\r\n <mask id={`${uid}-out`} maskUnits=\"userSpaceOnUse\" x=\"-200\" y=\"-200\" width=\"4000\" height=\"600\">\r\n <rect x=\"-200\" y=\"-200\" width=\"4000\" height=\"600\" fill=\"#fff\" />\r\n <path data-shape fill=\"#000\" />\r\n </mask>\r\n <clipPath id={`${uid}-in`}>\r\n <path data-shape />\r\n </clipPath>\r\n <filter id={`${uid}-contact`} x=\"-5%\" y=\"-20%\" width=\"110%\" height=\"160%\">\r\n <feGaussianBlur stdDeviation=\"1.2\" />\r\n </filter>\r\n <filter id={`${uid}-ambient`} x=\"-10%\" y=\"-60%\" width=\"120%\" height=\"320%\">\r\n <feGaussianBlur stdDeviation=\"9\" />\r\n </filter>\r\n </defs>\r\n <g mask={`url(#${uid}-out)`}>\r\n {/* a crisp contact shadow that seats the edge, and a faint wide one for lift */}\r\n <path data-shape className=\"nb-drop-shadow nb-drop-contact\" filter={`url(#${uid}-contact)`} transform=\"translate(0 1)\" />\r\n <path data-shape className=\"nb-drop-shadow nb-drop-ambient\" filter={`url(#${uid}-ambient)`} transform=\"translate(0 6)\" />\r\n <path data-edge className=\"nb-hairline\" fill=\"none\" strokeWidth=\"2\" />\r\n </g>\r\n <path data-edge className=\"nb-rim\" fill=\"none\" strokeWidth=\"2\" clipPath={`url(#${uid}-in)`} />\r\n </svg>\r\n </span>\r\n );\r\n}\r\n\r\n/** Edge refraction for the condensed glass (Chromium only) */\r\nfunction RefractFilter() {\r\n return (\r\n <svg width=\"0\" height=\"0\" style={{ position: \"absolute\" }} aria-hidden>\r\n <filter id=\"nb-refract\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" colorInterpolationFilters=\"sRGB\">\r\n <feTurbulence type=\"fractalNoise\" baseFrequency=\"0.008 0.03\" numOctaves=\"2\" seed=\"7\" result=\"noise\" />\r\n <feGaussianBlur in=\"noise\" stdDeviation=\"2\" result=\"soft\" />\r\n <feDisplacementMap in=\"SourceGraphic\" in2=\"soft\" scale=\"28\" xChannelSelector=\"R\" yChannelSelector=\"G\" />\r\n </filter>\r\n </svg>\r\n );\r\n}\r\n\r\n/**\r\n * The marker stroke under a link. Each hover draws it fresh, fast at the start\r\n * and easing out like a flick of the wrist; leaving lifts it off rather than\r\n * wiping it. Strokes differ per link and sit at a slight tilt.\r\n */\r\nfunction Stroke({ show, d, tilt, reduced }: { show: boolean; d: string; tilt: number; reduced: boolean }) {\r\n return (\r\n <AnimatePresence>\r\n {show && (\r\n <motion.svg\r\n aria-hidden\r\n viewBox=\"0 0 80 8\"\r\n preserveAspectRatio=\"none\"\r\n className=\"nb-stroke\"\r\n style={{ rotate: tilt }}\r\n initial={{ opacity: 1 }}\r\n animate={{ opacity: 1, y: 0 }}\r\n exit={reduced ? { opacity: 0, transition: { duration: 0 } } : { opacity: 0, y: -1.5, transition: { duration: 0.22, ease } }}\r\n >\r\n <motion.path\r\n d={d}\r\n fill=\"none\"\r\n style={{ stroke: \"var(--nb-accent)\" }}\r\n strokeWidth={1.9}\r\n strokeLinecap=\"round\"\r\n initial={{ pathLength: reduced ? 1 : 0 }}\r\n animate={{ pathLength: 1 }}\r\n transition={reduced ? { duration: 0 } : { duration: 0.32, ease: [0.25, 0.9, 0.3, 1] }}\r\n />\r\n </motion.svg>\r\n )}\r\n </AnimatePresence>\r\n );\r\n}\r\n\r\n/* ---------------------------------------------------------------- panels */\r\n\r\n/**\r\n * One panel for every menu. Moving between triggers morphs its size and slides\r\n * the content the way the pointer travelled, so the menus feel like one\r\n * surface instead of separate popovers.\r\n */\r\nfunction MenuPanel({ items, open, reduced, close }: { items: NavItem[]; open: { index: number; dir: number }; reduced: boolean; close: () => void }) {\r\n const inner = useRef<HTMLDivElement>(null);\r\n const [h, setH] = useState<number | null>(null);\r\n\r\n useEffect(() => {\r\n const el = inner.current;\r\n if (!el) return;\r\n const ro = new ResizeObserver(() => setH(el.offsetHeight));\r\n ro.observe(el);\r\n return () => ro.disconnect();\r\n }, []);\r\n\r\n const item = items[open.index] as NavMenu;\r\n const width = item.width ?? \"36rem\";\r\n const shift = 28 * open.dir;\r\n\r\n return (\r\n <motion.div\r\n className=\"nb-panel\"\r\n initial={false}\r\n animate={{ width, height: h ?? \"auto\" }}\r\n transition={reduced ? { duration: 0 } : { type: \"spring\", duration: 0.42, bounce: 0.16 }}\r\n >\r\n <div ref={inner} className=\"nb-panel-inner\">\r\n <AnimatePresence mode=\"popLayout\" initial={false} custom={shift}>\r\n <motion.div\r\n key={open.index}\r\n custom={shift}\r\n variants={{\r\n enter: (x: number) => (reduced ? { opacity: 0 } : { opacity: 0, x, filter: \"blur(4px)\" }),\r\n center: { opacity: 1, x: 0, filter: \"blur(0px)\" },\r\n exit: (x: number) => (reduced ? { opacity: 0 } : { opacity: 0, x: -x, filter: \"blur(4px)\" }),\r\n }}\r\n initial=\"enter\"\r\n animate=\"center\"\r\n exit=\"exit\"\r\n transition={reduced ? { duration: 0.1 } : { type: \"spring\", duration: 0.38, bounce: 0.1, opacity: { duration: 0.18 } }}\r\n style={{ width }}\r\n >\r\n <PanelCtx.Provider value={{ close, reduced }}>{item.panel({ close, reduced })}</PanelCtx.Provider>\r\n </motion.div>\r\n </AnimatePresence>\r\n </div>\r\n </motion.div>\r\n );\r\n}\r\n\r\n/** Rows settle in one after another, a few frames apart */\r\nconst rowIn = (i: number, reduced: boolean) =>\r\n reduced\r\n ? {}\r\n : {\r\n initial: { opacity: 0, y: 5 },\r\n animate: { opacity: 1, y: 0 },\r\n transition: { duration: 0.32, ease, delay: 0.03 + i * 0.03 },\r\n };\r\n\r\nfunction Arrow() {\r\n return (\r\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden className=\"nb-row-arrow\">\r\n <path d=\"M2.5 6h7M6.5 3 9.5 6l-3 3\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\r\n </svg>\r\n );\r\n}\r\n\r\n/** A small mono heading row at the top of a panel, with an optional note on the right */\r\nexport function PanelHeader({ title, aside }: { title: ReactNode; aside?: ReactNode }) {\r\n return (\r\n <div className=\"nb-ph\">\r\n <p className=\"nb-mono\">{title}</p>\r\n {aside && <p className=\"nb-mono nb-ph-aside\">{aside}</p>}\r\n </div>\r\n );\r\n}\r\n\r\nexport type PanelRow = { href: string; title: string; meta?: ReactNode; badge?: ReactNode };\r\n\r\n/** A list of links, one per row, with a note on the right and an arrow that slides in */\r\nexport function PanelRows({ rows }: { rows: PanelRow[] }) {\r\n const { close, reduced } = usePanel();\r\n return (\r\n <ul className=\"nb-spot nb-rows\">\r\n {rows.map((r, i) => (\r\n <motion.li key={r.href} className=\"nb-spot-item\" {...rowIn(i, reduced)}>\r\n <NavLink href={r.href} onClick={close} className=\"nb-row nb-row--wide\">\r\n <span className=\"nb-row-title\">\r\n <span className=\"nb-truncate\">{r.title}</span>\r\n {r.badge}\r\n </span>\r\n {r.meta && <span className=\"nb-row-meta\">{r.meta}</span>}\r\n <Arrow />\r\n </NavLink>\r\n </motion.li>\r\n ))}\r\n </ul>\r\n );\r\n}\r\n\r\nexport type PanelCard = { href: string; title: string; text?: string; icon?: ReactNode };\r\n\r\n/** Links with an icon tile, a title and a line of text */\r\nexport function PanelCards({ items }: { items: PanelCard[] }) {\r\n const { close, reduced } = usePanel();\r\n return (\r\n <ul className=\"nb-spot nb-cards\">\r\n {items.map((c, i) => (\r\n <motion.li key={c.href} className=\"nb-spot-item\" {...rowIn(i, reduced)}>\r\n <NavLink href={c.href} onClick={close} className=\"nb-row nb-card\">\r\n {c.icon && <span className=\"nb-glyph\">{c.icon}</span>}\r\n <span className=\"nb-card-copy\">\r\n <span className=\"nb-card-title\">{c.title}</span>\r\n {c.text && <span className=\"nb-card-text\">{c.text}</span>}\r\n </span>\r\n <Arrow />\r\n </NavLink>\r\n </motion.li>\r\n ))}\r\n </ul>\r\n );\r\n}\r\n\r\n/** A compact two-column grid of short links, under a mono heading */\r\nexport function PanelGrid({ title, links }: { title?: ReactNode; links: { href: string; label: string }[] }) {\r\n const { close, reduced } = usePanel();\r\n return (\r\n <div className=\"nb-grid-wrap\">\r\n {title && <p className=\"nb-mono nb-grid-title\">{title}</p>}\r\n <ul className=\"nb-spot nb-grid\">\r\n {links.map((l, i) => (\r\n <motion.li key={l.href} className=\"nb-spot-item\" {...rowIn(i * 0.5 + 1, reduced)}>\r\n <NavLink href={l.href} onClick={close} className=\"nb-row nb-grid-link\">\r\n <span className=\"nb-truncate\">{l.label}</span>\r\n <Arrow />\r\n </NavLink>\r\n </motion.li>\r\n ))}\r\n </ul>\r\n </div>\r\n );\r\n}\r\n\r\n/** Two columns side by side, with a hairline between them */\r\nexport function PanelSplit({ left, right, leftWidth = \"17rem\" }: { left: ReactNode; right: ReactNode; leftWidth?: string }) {\r\n return (\r\n <div className=\"nb-split\" style={{ gridTemplateColumns: `${leftWidth} 1fr` }}>\r\n <div>{left}</div>\r\n <div className=\"nb-split-right\">{right}</div>\r\n </div>\r\n );\r\n}\r\n\r\n/** A quiet strip along the bottom of a panel */\r\nexport function PanelFooter({ children }: { children: ReactNode }) {\r\n return <div className=\"nb-pf\">{children}</div>;\r\n}\r\n\r\n/** A link with an underline that draws in from the left, for footers */\r\nexport function PanelLink({ href, children }: { href: string; children: ReactNode }) {\r\n const { close } = usePanel();\r\n return (\r\n <NavLink href={href} onClick={close} className=\"nb-link\">\r\n {children}\r\n </NavLink>\r\n );\r\n}\r\n\r\n/** \"New\", circled in marker. The loop overshoots its start like a real one. */\r\nexport function NewMark({ label = \"New\" }: { label?: string }) {\r\n const { reduced } = usePanel();\r\n return (\r\n <span className=\"nb-new\">\r\n <span className=\"nb-marker\">{label}</span>\r\n <svg aria-hidden viewBox=\"0 0 60 28\" preserveAspectRatio=\"none\" className=\"nb-new-ring\">\r\n <motion.path\r\n d=\"M44 4.5 C30 1.5 8 3.5 4 13 C0.5 22 22 26.5 38 25 C54 23.5 60 14 53 7.5 C47 2.5 31 2 21 5\"\r\n fill=\"none\"\r\n style={{ stroke: \"var(--nb-accent)\" }}\r\n strokeWidth={1.7}\r\n strokeLinecap=\"round\"\r\n initial={{ pathLength: reduced ? 1 : 0 }}\r\n animate={{ pathLength: 1 }}\r\n transition={reduced ? { duration: 0 } : { duration: 0.6, ease: [0.55, 0, 0.3, 1], delay: 0.28 }}\r\n />\r\n </svg>\r\n </span>\r\n );\r\n}\r\n\r\n/* ---------------------------------------------------------------- mobile */\r\n\r\nfunction MobilePanel({ items, close }: { items: NavItem[]; close: () => void }) {\r\n const groups = items.filter(isMenu).filter((m) => m.mobile?.length);\r\n const links = items.filter((i): i is NavLinkItem => !isMenu(i));\r\n const bare = items.filter(isMenu).filter((m) => !m.mobile?.length);\r\n return (\r\n <div className=\"nb-mpanel\">\r\n {groups.map((g, gi) => (\r\n <div key={g.label}>\r\n {gi > 0 && <div className=\"nb-mdivider\" />}\r\n <p className=\"nb-mono nb-mhead\">{g.label}</p>\r\n {g.mobile!.map((l) => (\r\n <NavLink key={l.href} href={l.href} onClick={close} className=\"nb-mrow\">\r\n <span className=\"nb-mrow-title\">\r\n <span className=\"nb-truncate\">{l.label}</span>\r\n {l.badge && <span className=\"nb-marker nb-mbadge\">{l.badge}</span>}\r\n </span>\r\n {l.meta && <span className=\"nb-mrow-meta\">{l.meta}</span>}\r\n </NavLink>\r\n ))}\r\n </div>\r\n ))}\r\n {(links.length > 0 || bare.length > 0) && groups.length > 0 && <div className=\"nb-mdivider\" />}\r\n {bare.map((m) => (\r\n <p key={m.label} className=\"nb-mono nb-mhead\">\r\n {m.label}\r\n </p>\r\n ))}\r\n {links.map((l) => (\r\n <NavLink key={l.href} href={l.href} onClick={close} className=\"nb-mrow nb-mrow--strong\">\r\n {l.label}\r\n </NavLink>\r\n ))}\r\n </div>\r\n );\r\n}\r\n\r\nfunction Burger({ open, reduced }: { open: boolean; reduced: boolean }) {\r\n const tr = reduced ? { duration: 0 } : { type: \"spring\" as const, duration: 0.35, bounce: 0.2 };\r\n return (\r\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" aria-hidden>\r\n <motion.line x1=\"3\" x2=\"15\" y1=\"6.5\" y2=\"6.5\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" style={{ originX: \"50%\", originY: \"50%\" }} animate={open ? { y: 2.5, rotate: 45 } : { y: 0, rotate: 0 }} transition={tr} />\r\n <motion.line x1=\"3\" x2=\"15\" y1=\"11.5\" y2=\"11.5\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" style={{ originX: \"50%\", originY: \"50%\" }} animate={open ? { y: -2.5, rotate: -45 } : { y: 0, rotate: 0 }} transition={tr} />\r\n </svg>\r\n );\r\n}\r\n\r\n/* ---------------------------------------------------------------- the button */\r\n\r\n/**\r\n * The call to action. Its chip carries a marker dot breathing like a recording\r\n * light. On hover the dot gives way to an arrow that draws itself in, the label\r\n * rolls over letter by letter, and a highlight crosses the gloss. Pressing\r\n * squeezes the chip. All of it is CSS.\r\n */\r\nfunction Cta({ label, href }: { label: string; href: string }) {\r\n return (\r\n <NavLink href={href} className=\"nb-cta\" aria-label={label}>\r\n <span className=\"nb-cta-label\" aria-hidden>\r\n {[...label].map((ch, i) => (\r\n <span key={i} className=\"nb-cta-char\" style={{ \"--i\": i } as CSSProperties}>\r\n <span>{ch === \" \" ? \" \" : ch}</span>\r\n <span>{ch === \" \" ? \" \" : ch}</span>\r\n </span>\r\n ))}\r\n </span>\r\n <span className=\"nb-cta-chip\" aria-hidden>\r\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\">\r\n <circle className=\"nb-cta-dot\" cx=\"8\" cy=\"8\" r=\"3.2\" />\r\n <path className=\"nb-cta-arrow\" d=\"M3.5 8h8.6M8.6 4.4 12.2 8l-3.6 3.6\" pathLength={1} />\r\n </svg>\r\n </span>\r\n </NavLink>\r\n );\r\n}\r\n\r\n/** The default brand mark: a whiteboard square with a marker dot */\r\n/** The notchbar mark: a ring with a tilted orbit whose far side fades as it passes behind. */\r\nexport function Mark() {\r\n const id = useId().replace(/:/g, \"\");\r\n return (\r\n <span aria-hidden className=\"nb-mark\">\r\n <svg viewBox=\"0 0 24 24\" width=\"24\" height=\"24\">\r\n <defs>\r\n <linearGradient id={`${id}-o`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\r\n <stop offset=\"0\" stopColor=\"#fff\" />\r\n <stop offset=\"0.52\" stopColor=\"#fff\" />\r\n <stop offset=\"0.86\" stopColor=\"#fff\" stopOpacity=\"0.08\" />\r\n <stop offset=\"1\" stopColor=\"#fff\" stopOpacity=\"0.3\" />\r\n </linearGradient>\r\n </defs>\r\n <ellipse cx=\"12\" cy=\"12\" rx=\"8.9\" ry=\"5\" transform=\"rotate(-40 12 12)\" fill=\"none\" stroke={`url(#${id}-o)`} strokeWidth=\"1.7\" />\r\n <circle cx=\"12\" cy=\"12\" r=\"8.9\" fill=\"none\" stroke=\"#fff\" strokeWidth=\"1.8\" />\r\n </svg>\r\n </span>\r\n );\r\n}\r\n"],"mappings":";;;AAAA;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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|
+
A tab hanging from the top edge of the page. Stretched: quiet paper.
|
|
3
|
+
Condensed: liquid glass. The whole tab, shoulders included, is one path
|
|
4
|
+
re-traced from its live size; fill layers are clipped to it, and the
|
|
5
|
+
hairline, inner rim and drop shadow are strokes and fills of the same path.
|
|
6
|
+
|
|
7
|
+
Theme it with custom properties on .nb (or any ancestor):
|
|
8
|
+
--nb-accent marker colour (set from the accent prop)
|
|
9
|
+
--nb-ink text colour
|
|
10
|
+
--nb-muted secondary text
|
|
11
|
+
--nb-paper the stretched tab's tone
|
|
12
|
+
--nb-glass the condensed glass tint
|
|
13
|
+
--nb-font-mono the small panel headings
|
|
14
|
+
--nb-font-marker handwriting for "New" marks */
|
|
15
|
+
|
|
16
|
+
.nb {
|
|
17
|
+
--nb-ink: #111;
|
|
18
|
+
--nb-muted: #8f8f8a;
|
|
19
|
+
--nb-link: #5c5c5c;
|
|
20
|
+
--nb-paper: #efefec;
|
|
21
|
+
--nb-glass: rgba(255, 255, 255, 0.42);
|
|
22
|
+
--nb-line: rgba(17, 17, 17, 0.05);
|
|
23
|
+
--nb-rim: rgba(255, 255, 255, 0);
|
|
24
|
+
--nb-ease: cubic-bezier(0.22, 1, 0.36, 1);
|
|
25
|
+
--nb-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
26
|
+
--nb-font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
|
|
27
|
+
--nb-font-marker: "Gochi Hand", "Comic Sans MS", cursive;
|
|
28
|
+
|
|
29
|
+
position: fixed;
|
|
30
|
+
inset: 0 0 auto 0;
|
|
31
|
+
z-index: 50;
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
color: var(--nb-ink);
|
|
36
|
+
}
|
|
37
|
+
/* Resets carry no weight, so every class below wins over them */
|
|
38
|
+
:where(.nb) *,
|
|
39
|
+
:where(.nb) *::before,
|
|
40
|
+
:where(.nb) *::after { box-sizing: border-box; }
|
|
41
|
+
:where(.nb) a { color: inherit; text-decoration: none; }
|
|
42
|
+
:where(.nb) p { margin: 0; }
|
|
43
|
+
:where(.nb) ul { margin: 0; padding: 0; list-style: none; }
|
|
44
|
+
:where(.nb) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
|
|
45
|
+
|
|
46
|
+
.nb-wrap { position: relative; pointer-events: auto; }
|
|
47
|
+
|
|
48
|
+
/* ---- the tab ---- */
|
|
49
|
+
.nb-tab {
|
|
50
|
+
position: relative;
|
|
51
|
+
isolation: isolate;
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
width: min(var(--nb-max, 1024px), calc(100vw - 52px));
|
|
56
|
+
height: 60px;
|
|
57
|
+
padding: 0 8px 0 20px;
|
|
58
|
+
}
|
|
59
|
+
.nb-tab[data-compact] {
|
|
60
|
+
--nb-line: rgba(17, 17, 17, 0.09);
|
|
61
|
+
--nb-rim: rgba(255, 255, 255, 0.95);
|
|
62
|
+
}
|
|
63
|
+
.nb-shape {
|
|
64
|
+
position: absolute;
|
|
65
|
+
z-index: -1;
|
|
66
|
+
inset: 0 -18px;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
.nb-glass,
|
|
70
|
+
.nb-paper,
|
|
71
|
+
.nb-sheen,
|
|
72
|
+
.nb-glint,
|
|
73
|
+
.nb-outline { position: absolute; inset: 0; }
|
|
74
|
+
.nb-outline { overflow: visible; }
|
|
75
|
+
/* Paper sits over the glass while stretched and dissolves away, so the glass
|
|
76
|
+
seems to condense out of it instead of swapping in. */
|
|
77
|
+
.nb-paper {
|
|
78
|
+
background: var(--nb-paper);
|
|
79
|
+
transition: opacity 460ms var(--nb-ease) 120ms;
|
|
80
|
+
}
|
|
81
|
+
.nb-tab[data-compact] .nb-paper {
|
|
82
|
+
opacity: 0;
|
|
83
|
+
transition-delay: 0ms;
|
|
84
|
+
transition-duration: 300ms;
|
|
85
|
+
}
|
|
86
|
+
.nb-glass {
|
|
87
|
+
background-color: var(--nb-glass);
|
|
88
|
+
-webkit-backdrop-filter: blur(14px) saturate(1.7) brightness(1.06);
|
|
89
|
+
backdrop-filter: blur(14px) saturate(1.7) brightness(1.06);
|
|
90
|
+
transition: background-color 420ms var(--nb-ease);
|
|
91
|
+
}
|
|
92
|
+
/* Chromium bends the backdrop through an SVG displacement filter, like the
|
|
93
|
+
edge of a water drop. Everywhere else stays plain frosted glass. */
|
|
94
|
+
.nb-tab[data-compact][data-refract] .nb-glass {
|
|
95
|
+
-webkit-backdrop-filter: url(#nb-refract) blur(5px) saturate(1.7) brightness(1.08);
|
|
96
|
+
backdrop-filter: url(#nb-refract) blur(5px) saturate(1.7) brightness(1.08);
|
|
97
|
+
}
|
|
98
|
+
/* Edges: a hairline just outside the path, a bright rim just inside it */
|
|
99
|
+
.nb-hairline { stroke: var(--nb-line); transition: stroke 420ms var(--nb-ease); }
|
|
100
|
+
.nb-rim { stroke: var(--nb-rim); transition: stroke 420ms var(--nb-ease); }
|
|
101
|
+
/* The shadow lands a beat after the shape: the glass lifts off the page */
|
|
102
|
+
.nb-drop-shadow { opacity: 0; transition: opacity 380ms var(--nb-ease); }
|
|
103
|
+
.nb-drop-contact { fill: rgba(17, 17, 17, 0.07); }
|
|
104
|
+
.nb-drop-ambient { fill: rgba(17, 17, 17, 0.06); }
|
|
105
|
+
.nb-tab[data-compact] .nb-drop-shadow {
|
|
106
|
+
opacity: 1;
|
|
107
|
+
transition: opacity 620ms var(--nb-ease) 160ms;
|
|
108
|
+
}
|
|
109
|
+
/* One specular sweep across the glass as it forms */
|
|
110
|
+
.nb-glint { overflow: hidden; }
|
|
111
|
+
.nb-glint::before {
|
|
112
|
+
content: "";
|
|
113
|
+
position: absolute;
|
|
114
|
+
inset: 0 auto 0 0;
|
|
115
|
+
width: 38%;
|
|
116
|
+
transform: translateX(-110%) skewX(-18deg);
|
|
117
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0));
|
|
118
|
+
opacity: 0;
|
|
119
|
+
}
|
|
120
|
+
.nb-tab[data-compact] .nb-glint::before {
|
|
121
|
+
animation: nb-glint 1050ms cubic-bezier(0.35, 0, 0.15, 1) 180ms both;
|
|
122
|
+
}
|
|
123
|
+
@keyframes nb-glint {
|
|
124
|
+
0% { transform: translateX(-110%) skewX(-18deg); opacity: 0; }
|
|
125
|
+
18% { opacity: 1; }
|
|
126
|
+
80% { opacity: 1; }
|
|
127
|
+
100% { transform: translateX(300%) skewX(-18deg); opacity: 0; }
|
|
128
|
+
}
|
|
129
|
+
/* Light: a soft top-down falloff, and a highlight that follows the cursor */
|
|
130
|
+
.nb-sheen {
|
|
131
|
+
opacity: 0;
|
|
132
|
+
background:
|
|
133
|
+
radial-gradient(140px circle at var(--nb-mx, 50%) var(--nb-my, 50%), rgba(255, 255, 255, 0.55), transparent 70%),
|
|
134
|
+
linear-gradient(180deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.35));
|
|
135
|
+
transition: opacity 420ms var(--nb-ease);
|
|
136
|
+
}
|
|
137
|
+
.nb-tab[data-compact] .nb-sheen { opacity: 0.6; }
|
|
138
|
+
@media (hover: hover) {
|
|
139
|
+
.nb-tab[data-compact]:hover .nb-sheen { opacity: 1; }
|
|
140
|
+
}
|
|
141
|
+
@media (prefers-reduced-motion: reduce) {
|
|
142
|
+
.nb-tab[data-compact] .nb-glint::before { animation: none; }
|
|
143
|
+
}
|
|
144
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
145
|
+
.nb-tab[data-compact] { --nb-glass: #f7f7f5; }
|
|
146
|
+
.nb-tab[data-compact] .nb-glint::before { animation: none; }
|
|
147
|
+
.nb-tab[data-compact][data-refract] .nb-glass {
|
|
148
|
+
-webkit-backdrop-filter: none;
|
|
149
|
+
backdrop-filter: none;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* ---- contents of the tab ---- */
|
|
154
|
+
.nb-brand { flex-shrink: 0; }
|
|
155
|
+
.nb-brand-link {
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
gap: 8px;
|
|
159
|
+
font-size: 15px;
|
|
160
|
+
font-weight: 600;
|
|
161
|
+
letter-spacing: -0.02em;
|
|
162
|
+
}
|
|
163
|
+
.nb-brand-name { white-space: nowrap; }
|
|
164
|
+
@media (max-width: 639px) {
|
|
165
|
+
.nb-brand-name { display: none; }
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.nb-list {
|
|
169
|
+
display: none;
|
|
170
|
+
flex-shrink: 0;
|
|
171
|
+
align-items: center;
|
|
172
|
+
transform-origin: center;
|
|
173
|
+
font-size: 14px;
|
|
174
|
+
color: var(--nb-link);
|
|
175
|
+
}
|
|
176
|
+
@media (min-width: 768px) {
|
|
177
|
+
.nb-list { display: flex; }
|
|
178
|
+
}
|
|
179
|
+
.nb-item {
|
|
180
|
+
position: relative;
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
gap: 4px;
|
|
184
|
+
height: 36px;
|
|
185
|
+
padding: 0 12px;
|
|
186
|
+
transition: color 150ms;
|
|
187
|
+
}
|
|
188
|
+
.nb-item:hover,
|
|
189
|
+
.nb-item[data-active] { color: var(--nb-ink); }
|
|
190
|
+
.nb-item:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 2px; border-radius: 10px; }
|
|
191
|
+
.nb-stroke {
|
|
192
|
+
position: absolute;
|
|
193
|
+
left: 10px;
|
|
194
|
+
bottom: 2px;
|
|
195
|
+
width: calc(100% - 20px);
|
|
196
|
+
height: 7px;
|
|
197
|
+
overflow: visible;
|
|
198
|
+
pointer-events: none;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.nb-right { display: flex; flex-shrink: 0; align-items: center; gap: 6px; }
|
|
202
|
+
.nb-burger {
|
|
203
|
+
display: grid;
|
|
204
|
+
place-items: center;
|
|
205
|
+
width: 40px;
|
|
206
|
+
height: 40px;
|
|
207
|
+
border-radius: 999px;
|
|
208
|
+
color: var(--nb-ink);
|
|
209
|
+
}
|
|
210
|
+
@media (min-width: 768px) {
|
|
211
|
+
.nb-burger { display: none; }
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* Spotlight: point at one item and the rest step back. Dimming is quick;
|
|
215
|
+
coming back waits a beat, so sweeping across a row never flashes everything
|
|
216
|
+
back to full ink in between. It dims the item's content, not the item, so
|
|
217
|
+
entrance animations that leave an inline opacity on the item never fight it. */
|
|
218
|
+
.nb-spot-item > * { transition: opacity 260ms var(--nb-ease) 70ms; }
|
|
219
|
+
.nb-spot:has(.nb-spot-item:hover) .nb-spot-item:not(:hover) > *,
|
|
220
|
+
.nb-spot:has(.nb-spot-item :focus-visible) .nb-spot-item:not(:has(:focus-visible)) > * {
|
|
221
|
+
opacity: 0.36;
|
|
222
|
+
transition-duration: 140ms;
|
|
223
|
+
transition-delay: 0ms;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* ---- the panel under the tab ---- */
|
|
227
|
+
.nb-drop {
|
|
228
|
+
position: absolute;
|
|
229
|
+
left: 50%;
|
|
230
|
+
top: 100%;
|
|
231
|
+
display: none;
|
|
232
|
+
padding-top: 12px;
|
|
233
|
+
translate: -50% 0;
|
|
234
|
+
}
|
|
235
|
+
@media (min-width: 768px) {
|
|
236
|
+
.nb-drop { display: block; }
|
|
237
|
+
}
|
|
238
|
+
.nb-panel {
|
|
239
|
+
position: relative;
|
|
240
|
+
overflow: hidden;
|
|
241
|
+
border-radius: 22px;
|
|
242
|
+
background: #fff;
|
|
243
|
+
color: var(--nb-ink);
|
|
244
|
+
box-shadow:
|
|
245
|
+
inset 0 0 0 1px rgba(17, 17, 17, 0.07),
|
|
246
|
+
0 2px 4px rgba(17, 17, 17, 0.04),
|
|
247
|
+
0 24px 48px -12px rgba(17, 17, 17, 0.22);
|
|
248
|
+
}
|
|
249
|
+
.nb-panel-inner { width: max-content; }
|
|
250
|
+
|
|
251
|
+
.nb-mono {
|
|
252
|
+
font-family: var(--nb-font-mono);
|
|
253
|
+
font-size: 12px;
|
|
254
|
+
line-height: 1.4;
|
|
255
|
+
letter-spacing: -0.01em;
|
|
256
|
+
color: var(--nb-muted);
|
|
257
|
+
}
|
|
258
|
+
.nb-marker {
|
|
259
|
+
font-family: var(--nb-font-marker);
|
|
260
|
+
line-height: 1.05;
|
|
261
|
+
letter-spacing: 0;
|
|
262
|
+
color: var(--nb-accent);
|
|
263
|
+
}
|
|
264
|
+
.nb-truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
265
|
+
|
|
266
|
+
.nb-ph { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 20px 4px; }
|
|
267
|
+
.nb-ph-aside { color: #b5b5b0; }
|
|
268
|
+
|
|
269
|
+
.nb-row { display: flex; align-items: center; }
|
|
270
|
+
.nb-row:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: -2px; }
|
|
271
|
+
/* The row's arrow slides in from the left as the row is chosen */
|
|
272
|
+
.nb-row-arrow {
|
|
273
|
+
flex-shrink: 0;
|
|
274
|
+
color: var(--nb-ink);
|
|
275
|
+
opacity: 0;
|
|
276
|
+
transform: translateX(-5px);
|
|
277
|
+
transition: opacity 160ms ease, transform 260ms var(--nb-spring);
|
|
278
|
+
}
|
|
279
|
+
.nb-row:hover .nb-row-arrow,
|
|
280
|
+
.nb-row:focus-visible .nb-row-arrow { opacity: 1; transform: none; }
|
|
281
|
+
|
|
282
|
+
.nb-rows { padding: 0 8px 8px; }
|
|
283
|
+
.nb-row--wide { gap: 12px; padding: 11px 12px; border-radius: 12px; }
|
|
284
|
+
.nb-row-title {
|
|
285
|
+
display: flex;
|
|
286
|
+
min-width: 0;
|
|
287
|
+
align-items: center;
|
|
288
|
+
gap: 10px;
|
|
289
|
+
font-size: 15px;
|
|
290
|
+
font-weight: 500;
|
|
291
|
+
letter-spacing: -0.01em;
|
|
292
|
+
}
|
|
293
|
+
.nb-row-meta { margin-left: auto; flex-shrink: 0; white-space: nowrap; font-size: 13px; color: var(--nb-muted); }
|
|
294
|
+
|
|
295
|
+
.nb-cards { padding: 8px; }
|
|
296
|
+
.nb-card { gap: 12px; padding: 8px; border-radius: 14px; }
|
|
297
|
+
.nb-card .nb-row-arrow { margin-left: auto; }
|
|
298
|
+
.nb-glyph {
|
|
299
|
+
display: grid;
|
|
300
|
+
flex-shrink: 0;
|
|
301
|
+
place-items: center;
|
|
302
|
+
width: 36px;
|
|
303
|
+
height: 36px;
|
|
304
|
+
border-radius: 10px;
|
|
305
|
+
background: #f2f2f0;
|
|
306
|
+
color: var(--nb-ink);
|
|
307
|
+
transition: transform 300ms var(--nb-spring), background-color 200ms ease;
|
|
308
|
+
}
|
|
309
|
+
.nb-row:hover .nb-glyph { transform: rotate(-6deg) scale(1.06); background-color: #ebebe8; }
|
|
310
|
+
.nb-card-copy { min-width: 0; }
|
|
311
|
+
.nb-card-title { display: block; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
|
|
312
|
+
.nb-card-text { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--nb-muted); }
|
|
313
|
+
|
|
314
|
+
.nb-grid-wrap { padding: 12px 8px; }
|
|
315
|
+
.nb-grid-title { padding: 4px 12px 6px; }
|
|
316
|
+
.nb-grid { display: grid; grid-template-columns: 1fr 1fr; }
|
|
317
|
+
.nb-grid-link { gap: 4px; padding: 7px 10px; border-radius: 10px; font-size: 13px; }
|
|
318
|
+
|
|
319
|
+
.nb-split { display: grid; }
|
|
320
|
+
.nb-split-right { border-left: 1px solid #efefec; }
|
|
321
|
+
|
|
322
|
+
.nb-pf {
|
|
323
|
+
display: flex;
|
|
324
|
+
align-items: center;
|
|
325
|
+
justify-content: space-between;
|
|
326
|
+
gap: 16px;
|
|
327
|
+
padding: 14px 20px;
|
|
328
|
+
border-top: 1px solid #efefec;
|
|
329
|
+
background: #fafaf9;
|
|
330
|
+
font-size: 13px;
|
|
331
|
+
color: var(--nb-link);
|
|
332
|
+
}
|
|
333
|
+
/* An underline that draws from the left */
|
|
334
|
+
.nb-link {
|
|
335
|
+
flex-shrink: 0;
|
|
336
|
+
padding-bottom: 2px;
|
|
337
|
+
font-weight: 500;
|
|
338
|
+
color: var(--nb-ink);
|
|
339
|
+
background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
|
|
340
|
+
transition: background-size 240ms var(--nb-ease), color 120ms;
|
|
341
|
+
}
|
|
342
|
+
.nb-link:hover { background-size: 100% 1px; }
|
|
343
|
+
|
|
344
|
+
.nb-new {
|
|
345
|
+
position: relative;
|
|
346
|
+
display: inline-block;
|
|
347
|
+
flex-shrink: 0;
|
|
348
|
+
padding: 0 6px;
|
|
349
|
+
font-size: 16px;
|
|
350
|
+
line-height: 1;
|
|
351
|
+
}
|
|
352
|
+
.nb-new > .nb-marker { position: relative; }
|
|
353
|
+
.nb-new-ring {
|
|
354
|
+
position: absolute;
|
|
355
|
+
left: -4px;
|
|
356
|
+
top: -7px;
|
|
357
|
+
width: calc(100% + 8px);
|
|
358
|
+
height: calc(100% + 14px);
|
|
359
|
+
overflow: visible;
|
|
360
|
+
pointer-events: none;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* ---- mobile ---- */
|
|
364
|
+
.nb-mobile { position: fixed; left: 12px; right: 12px; top: 72px; }
|
|
365
|
+
@media (min-width: 768px) {
|
|
366
|
+
.nb-mobile { display: none; }
|
|
367
|
+
}
|
|
368
|
+
.nb-mpanel {
|
|
369
|
+
max-height: calc(100dvh - 96px);
|
|
370
|
+
overflow-y: auto;
|
|
371
|
+
padding: 8px;
|
|
372
|
+
border-radius: 22px;
|
|
373
|
+
background: #fff;
|
|
374
|
+
box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.07), 0 24px 48px -12px rgba(17, 17, 17, 0.25);
|
|
375
|
+
}
|
|
376
|
+
.nb-mhead { padding: 8px 12px 4px; }
|
|
377
|
+
.nb-mrow {
|
|
378
|
+
display: flex;
|
|
379
|
+
align-items: center;
|
|
380
|
+
justify-content: space-between;
|
|
381
|
+
gap: 12px;
|
|
382
|
+
padding: 10px 12px;
|
|
383
|
+
border-radius: 14px;
|
|
384
|
+
font-size: 15px;
|
|
385
|
+
}
|
|
386
|
+
.nb-mrow:active { background: #f5f5f3; }
|
|
387
|
+
.nb-mrow--strong { font-weight: 500; }
|
|
388
|
+
.nb-mrow-title { display: flex; min-width: 0; align-items: center; gap: 8px; font-weight: 500; }
|
|
389
|
+
.nb-mrow-meta { flex-shrink: 0; font-size: 13px; color: var(--nb-muted); }
|
|
390
|
+
.nb-mbadge { flex-shrink: 0; font-size: 15px; }
|
|
391
|
+
.nb-mdivider { height: 1px; margin: 8px 0; background: #efefec; }
|
|
392
|
+
|
|
393
|
+
/* ---- the call to action ---- */
|
|
394
|
+
.nb-cta {
|
|
395
|
+
position: relative;
|
|
396
|
+
isolation: isolate;
|
|
397
|
+
display: inline-flex;
|
|
398
|
+
align-items: center;
|
|
399
|
+
gap: 10px;
|
|
400
|
+
height: 40px;
|
|
401
|
+
padding: 0 4px 0 16px;
|
|
402
|
+
overflow: hidden;
|
|
403
|
+
border-radius: 999px;
|
|
404
|
+
font-size: 14px;
|
|
405
|
+
font-weight: 500;
|
|
406
|
+
letter-spacing: -0.01em;
|
|
407
|
+
white-space: nowrap;
|
|
408
|
+
background: linear-gradient(180deg, #2b2b2b 0%, #111 100%);
|
|
409
|
+
box-shadow:
|
|
410
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.16),
|
|
411
|
+
inset 0 -1px 0 rgba(0, 0, 0, 0.4),
|
|
412
|
+
0 1px 2px rgba(0, 0, 0, 0.24),
|
|
413
|
+
0 6px 16px -4px rgba(0, 0, 0, 0.28);
|
|
414
|
+
transition: transform 260ms var(--nb-ease), box-shadow 260ms var(--nb-ease);
|
|
415
|
+
}
|
|
416
|
+
.nb-cta, .nb-cta:hover { color: #fff; }
|
|
417
|
+
.nb-cta:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 2px; }
|
|
418
|
+
/* A highlight that crosses the gloss on hover */
|
|
419
|
+
.nb-cta::after {
|
|
420
|
+
content: "";
|
|
421
|
+
position: absolute;
|
|
422
|
+
inset: 0;
|
|
423
|
+
z-index: 0;
|
|
424
|
+
pointer-events: none;
|
|
425
|
+
background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
|
|
426
|
+
transform: translateX(-110%);
|
|
427
|
+
}
|
|
428
|
+
.nb-cta-label,
|
|
429
|
+
.nb-cta-chip { position: relative; z-index: 1; }
|
|
430
|
+
/* Each letter is two stacked copies; hover rolls them up in a wave */
|
|
431
|
+
.nb-cta-label { display: inline-flex; }
|
|
432
|
+
.nb-cta-char { display: inline-block; height: 1.25em; line-height: 1.25em; overflow: hidden; }
|
|
433
|
+
.nb-cta-char > span {
|
|
434
|
+
display: block;
|
|
435
|
+
transition: transform 420ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
436
|
+
transition-delay: calc(var(--i) * 11ms);
|
|
437
|
+
}
|
|
438
|
+
.nb-cta-chip {
|
|
439
|
+
display: grid;
|
|
440
|
+
place-items: center;
|
|
441
|
+
width: 32px;
|
|
442
|
+
height: 32px;
|
|
443
|
+
border-radius: 999px;
|
|
444
|
+
background: linear-gradient(180deg, #ffffff 0%, #ececea 100%);
|
|
445
|
+
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
446
|
+
transition: transform 420ms var(--nb-spring);
|
|
447
|
+
}
|
|
448
|
+
.nb-cta-dot {
|
|
449
|
+
fill: var(--nb-accent);
|
|
450
|
+
transform-box: fill-box;
|
|
451
|
+
transform-origin: center;
|
|
452
|
+
animation: nb-breathe 2.6s ease-in-out infinite;
|
|
453
|
+
transition: transform 220ms var(--nb-ease);
|
|
454
|
+
}
|
|
455
|
+
@keyframes nb-breathe {
|
|
456
|
+
0%, 100% { scale: 1; opacity: 1; }
|
|
457
|
+
50% { scale: 0.72; opacity: 0.75; }
|
|
458
|
+
}
|
|
459
|
+
.nb-cta-arrow {
|
|
460
|
+
fill: none;
|
|
461
|
+
stroke: #111;
|
|
462
|
+
stroke-width: 1.7;
|
|
463
|
+
stroke-linecap: round;
|
|
464
|
+
stroke-linejoin: round;
|
|
465
|
+
stroke-dasharray: 1;
|
|
466
|
+
stroke-dashoffset: 1;
|
|
467
|
+
transition: stroke-dashoffset 200ms var(--nb-ease);
|
|
468
|
+
}
|
|
469
|
+
@media (hover: hover) {
|
|
470
|
+
.nb-cta:hover {
|
|
471
|
+
transform: translate3d(0, -1px, 0);
|
|
472
|
+
box-shadow:
|
|
473
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.2),
|
|
474
|
+
inset 0 -1px 0 rgba(0, 0, 0, 0.4),
|
|
475
|
+
0 2px 4px rgba(0, 0, 0, 0.24),
|
|
476
|
+
0 10px 22px -6px rgba(0, 0, 0, 0.34);
|
|
477
|
+
}
|
|
478
|
+
.nb-cta:hover::after { transform: translateX(110%); transition: transform 750ms cubic-bezier(0.3, 0, 0.2, 1); }
|
|
479
|
+
.nb-cta:hover .nb-cta-char > span { transform: translateY(-100%); }
|
|
480
|
+
.nb-cta:hover .nb-cta-chip { transform: translateX(1px) scale(1.06); }
|
|
481
|
+
.nb-cta:hover .nb-cta-dot { transform: scale(0); }
|
|
482
|
+
.nb-cta:hover .nb-cta-arrow { stroke-dashoffset: 0; transition: stroke-dashoffset 380ms cubic-bezier(0.65, 0, 0.35, 1) 90ms; }
|
|
483
|
+
}
|
|
484
|
+
.nb-cta:focus-visible .nb-cta-dot { transform: scale(0); }
|
|
485
|
+
.nb-cta:focus-visible .nb-cta-arrow { stroke-dashoffset: 0; }
|
|
486
|
+
.nb-cta:active { transform: scale(0.97); transition-duration: 90ms; }
|
|
487
|
+
.nb-cta:active .nb-cta-chip { transform: scale(0.88); transition-duration: 120ms; }
|
|
488
|
+
|
|
489
|
+
/* ---- the default mark ---- */
|
|
490
|
+
.nb-mark {
|
|
491
|
+
display: grid;
|
|
492
|
+
flex-shrink: 0;
|
|
493
|
+
place-items: center;
|
|
494
|
+
width: 26px;
|
|
495
|
+
height: 26px;
|
|
496
|
+
border-radius: 8px;
|
|
497
|
+
background: #0b0b0b;
|
|
498
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
499
|
+
}
|
|
500
|
+
.nb-mark svg { display: block; width: 22px; height: 22px; }
|
|
501
|
+
|
|
502
|
+
@media (prefers-reduced-motion: reduce) {
|
|
503
|
+
.nb-row-arrow, .nb-glyph { transition: opacity 120ms ease; }
|
|
504
|
+
.nb-row:hover .nb-glyph { transform: none; }
|
|
505
|
+
.nb-cta, .nb-cta-chip, .nb-cta-char > span, .nb-cta-dot { transition: none; }
|
|
506
|
+
.nb-cta-dot { animation: none; }
|
|
507
|
+
.nb-cta::after { display: none; }
|
|
508
|
+
.nb-cta:hover, .nb-cta:active, .nb-cta:hover .nb-cta-chip, .nb-cta:hover .nb-cta-char > span { transform: none; }
|
|
509
|
+
.nb-cta-arrow, .nb-cta:hover .nb-cta-arrow { transition: stroke-dashoffset 120ms linear; }
|
|
510
|
+
}
|