@cosborn2/ui 0.1.0-beta.1 → 0.3.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/README.md +1 -1
- package/dist/_pill-style.d.ts +10 -0
- package/dist/_pill-style.js +9 -0
- package/dist/color-picker.js +1 -1
- package/dist/expandable-pill.d.ts +1 -1
- package/dist/expandable-pill.js +7 -21
- package/dist/header-shell.d.ts +8 -2
- package/dist/header-shell.js +13 -12
- package/dist/pill.d.ts +1 -0
- package/dist/pill.js +3 -8
- package/dist/segmented-control.js +1 -1
- package/dist/select.js +3 -2
- package/dist/settings.js +1 -1
- package/dist/styles/actions-menu.css +2 -2
- package/dist/styles/button.css +5 -5
- package/dist/styles/color-picker.css +2 -2
- package/dist/styles/data-table.css +3 -3
- package/dist/styles/expandable-pill.css +6 -3
- package/dist/styles/ghost-text-button.css +2 -2
- package/dist/styles/glass-popover-surface.css +2 -2
- package/dist/styles/header-shell.css +2 -1
- package/dist/styles/icon-button.css +2 -2
- package/dist/styles/input.css +2 -2
- package/dist/styles/modal.css +7 -8
- package/dist/styles/notice.css +1 -1
- package/dist/styles/pill.css +1 -1
- package/dist/styles/segmented-control.css +4 -4
- package/dist/styles/select.css +7 -4
- package/dist/styles/settings.css +14 -12
- package/dist/styles/surface.css +4 -4
- package/dist/styles/switch.css +4 -4
- package/dist/styles/theme-toggle.css +3 -3
- package/dist/styles/theme.css +24 -3
- package/dist/styles/toast.css +4 -4
- package/dist/tokens.json +31 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Lightweight React UI components: buttons, forms, dialogs, menus, notifications,
|
|
|
5
5
|
Plain CSS, shared theme tokens, and individual component imports. Works without Tailwind.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm install @cosborn2/ui
|
|
8
|
+
npm install @cosborn2/ui
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
[Component guide](https://github.com/COsborn2/ui/blob/main/docs/components.md) · [Versioning](https://github.com/COsborn2/ui/blob/main/versioning.md) · [Contributing](https://github.com/COsborn2/ui/blob/main/CONTRIBUTING.md)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
interface PillAppearance {
|
|
3
|
+
tint?: string;
|
|
4
|
+
background?: string;
|
|
5
|
+
borderColor?: string;
|
|
6
|
+
height?: number;
|
|
7
|
+
}
|
|
8
|
+
/** Per-instance values travel as custom properties so stylesheets keep control of the properties themselves. */
|
|
9
|
+
export declare function pillStyle({ tint, background, borderColor, height }: PillAppearance, style?: CSSProperties): CSSProperties;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Per-instance values travel as custom properties so stylesheets keep control of the properties themselves. */
|
|
2
|
+
export function pillStyle({ tint, background, borderColor, height }, style) {
|
|
3
|
+
return {
|
|
4
|
+
"--bnh-pill-background": background ?? (tint ? `color-mix(in oklch, ${tint} 8%, transparent)` : undefined),
|
|
5
|
+
"--bnh-pill-border-color": borderColor ?? (tint ? `color-mix(in oklch, ${tint} 30%, transparent)` : undefined),
|
|
6
|
+
"--bnh-pill-height": height === undefined ? undefined : `${height}px`,
|
|
7
|
+
...style,
|
|
8
|
+
};
|
|
9
|
+
}
|
package/dist/color-picker.js
CHANGED
|
@@ -3,5 +3,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { Ban } from "lucide-react";
|
|
4
4
|
/** Palette, persistence, and the meaning of each color belong to the application. */
|
|
5
5
|
export function ColorPicker({ value, onChange, colors, disabled, allowNone = true, noneLabel = "None", className, "aria-label": ariaLabel = "Color", ...props }) {
|
|
6
|
-
return (_jsxs("div", { ...props, role: "group", "aria-label": ariaLabel, className: ["bnh-color-picker", className].filter(Boolean).join(" "), children: [allowNone && _jsx("button", { type: "button", className: "bnh-color-picker-none", disabled: disabled, title: noneLabel, "aria-label": noneLabel, "aria-pressed": value === null, onClick: () => onChange(null), children: _jsx(Ban, { "aria-hidden": "true", size: 18 }) }), colors.map((color) => (_jsx("button", { type: "button", disabled: disabled || color.disabled, title: color.label, "aria-label": color.label, "aria-pressed": value === color.value, style: {
|
|
6
|
+
return (_jsxs("div", { ...props, role: "group", "aria-label": ariaLabel, className: ["bnh-color-picker", className].filter(Boolean).join(" "), children: [allowNone && _jsx("button", { type: "button", className: "bnh-color-picker-none", disabled: disabled, title: noneLabel, "aria-label": noneLabel, "aria-pressed": value === null, onClick: () => onChange(null), children: _jsx(Ban, { "aria-hidden": "true", size: 18 }) }), colors.map((color) => (_jsx("button", { type: "button", disabled: disabled || color.disabled, title: color.label, "aria-label": color.label, "aria-pressed": value === color.value, style: { "--bnh-color-picker-swatch": color.value }, onClick: () => onChange(color.value) }, color.value)))] }));
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { PillProps } from "./pill.js";
|
|
3
3
|
export interface ExpandablePillProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onChange">, Pick<PillProps, "tint" | "background" | "borderColor" | "height"> {
|
|
4
4
|
panel: ReactNode;
|
|
5
5
|
open?: boolean;
|
package/dist/expandable-pill.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useId, useRef, useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
export function ExpandablePill({ tint, background, borderColor, height
|
|
4
|
+
import { pillStyle } from "./_pill-style.js";
|
|
5
|
+
export function ExpandablePill({ tint, background, borderColor, height, panel, open, defaultOpen = false, onOpenChange, panelGap = 6, panelMaxWidth = "calc(100vw - 32px)", panelAlign = "end", style, className, children, onClick, onKeyDown, type = "button", ...props }) {
|
|
6
6
|
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
7
7
|
const triggerRef = useRef(null);
|
|
8
8
|
const panelId = useId();
|
|
9
9
|
const isOpen = open ?? internalOpen;
|
|
10
|
-
const centered = panelAlign === "center";
|
|
11
10
|
function changeOpen(value) {
|
|
12
11
|
if (open === undefined)
|
|
13
12
|
setInternalOpen(value);
|
|
14
13
|
onOpenChange?.(value);
|
|
15
14
|
}
|
|
16
|
-
return (_jsxs("span", { className: "bnh-expandable-pill",
|
|
15
|
+
return (_jsxs("span", { className: "bnh-expandable-pill", "data-align": panelAlign, onKeyDown: (event) => {
|
|
17
16
|
// Portaled widgets remain in this React subtree, but own their keyboard
|
|
18
17
|
// interaction. A nested disclosure can also consume Escape first.
|
|
19
18
|
if (event.defaultPrevented || event.key !== "Escape" || !isOpen
|
|
@@ -23,25 +22,12 @@ export function ExpandablePill({ tint, background, borderColor, height = PILL_HE
|
|
|
23
22
|
event.stopPropagation();
|
|
24
23
|
changeOpen(false);
|
|
25
24
|
triggerRef.current?.focus();
|
|
26
|
-
}, children: [_jsx("button", { ...props, ref: triggerRef, type: type, "aria-expanded": isOpen, "aria-controls": panelId, className: ["bnh-pill", "bnh-expandable-pill-trigger", className].filter(Boolean).join(" "), style: {
|
|
27
|
-
height,
|
|
28
|
-
whiteSpace: "nowrap",
|
|
29
|
-
background: background ?? (tint ? `color-mix(in oklch, ${tint} 8%, transparent)` : "transparent"),
|
|
30
|
-
border: `1px solid ${borderColor ?? (tint ? `color-mix(in oklch, ${tint} 30%, transparent)` : "var(--bnh-border)")}`,
|
|
31
|
-
...style,
|
|
32
|
-
}, onClick: (event) => {
|
|
25
|
+
}, children: [_jsx("button", { ...props, ref: triggerRef, type: type, "aria-expanded": isOpen, "aria-controls": panelId, className: ["bnh-pill", "bnh-expandable-pill-trigger", className].filter(Boolean).join(" "), style: pillStyle({ tint, background, borderColor, height }, style), onClick: (event) => {
|
|
33
26
|
onClick?.(event);
|
|
34
27
|
if (!event.defaultPrevented)
|
|
35
28
|
changeOpen(!isOpen);
|
|
36
|
-
}, onKeyDown: onKeyDown, children: children }), _jsx("div", { id: panelId, className: "bnh-expandable-pill-panel", inert: !isOpen, "aria-hidden": !isOpen, style: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
? { left: 16, right: 16, display: "flex", justifyContent: "center" }
|
|
40
|
-
: { right: 0, maxWidth: panelMaxWidth }),
|
|
41
|
-
opacity: isOpen ? 1 : 0,
|
|
42
|
-
pointerEvents: isOpen ? "auto" : "none",
|
|
43
|
-
transform: isOpen ? "translateY(0) scale(1)" : "translateY(-4px) scale(.98)",
|
|
44
|
-
transformOrigin: centered ? "top center" : "top right",
|
|
45
|
-
visibility: isOpen ? "visible" : "hidden",
|
|
29
|
+
}, onKeyDown: onKeyDown, children: children }), _jsx("div", { id: panelId, className: "bnh-expandable-pill-panel", "data-align": panelAlign, "data-state": isOpen ? "open" : "closed", inert: !isOpen, "aria-hidden": !isOpen, style: {
|
|
30
|
+
"--bnh-expandable-pill-gap": `${panelGap}px`,
|
|
31
|
+
"--bnh-expandable-pill-panel-max-width": typeof panelMaxWidth === "number" ? `${panelMaxWidth}px` : panelMaxWidth,
|
|
46
32
|
}, children: panel })] }));
|
|
47
33
|
}
|
package/dist/header-shell.d.ts
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef, type
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactElement, type ReactNode } from "react";
|
|
2
2
|
export declare const HEADER_PAD_Y = 6;
|
|
3
3
|
export declare const HEADER_PAD_X = 16;
|
|
4
4
|
interface HeaderShellLayoutProps {
|
|
5
5
|
left: ReactNode;
|
|
6
6
|
right?: ReactNode;
|
|
7
7
|
width?: "content" | "full";
|
|
8
|
-
|
|
8
|
+
/** Content width only. */
|
|
9
|
+
minWidth?: number | string;
|
|
10
|
+
/** Defaults to `calc(100vw - 28px)`. */
|
|
9
11
|
maxWidth?: number | string;
|
|
12
|
+
/** Full width only; pixels on each side. Defaults to 24. */
|
|
10
13
|
sideMargin?: number;
|
|
14
|
+
/** Defaults to `var(--bnh-header-top, 18px)`. */
|
|
11
15
|
top?: number | string;
|
|
16
|
+
/** Defaults to 30. */
|
|
12
17
|
zIndex?: number;
|
|
18
|
+
/** Pixels between the left and right slots. Defaults to 10. */
|
|
13
19
|
gap?: number;
|
|
14
20
|
}
|
|
15
21
|
export type HeaderShellProps = HeaderShellLayoutProps & (({
|
package/dist/header-shell.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { createElement } from "react";
|
|
2
2
|
export const HEADER_PAD_Y = 6;
|
|
3
3
|
export const HEADER_PAD_X = 16;
|
|
4
|
-
export function HeaderShell({ as: Element = "div", left, right, className, width = "content", minWidth, maxWidth
|
|
5
|
-
|
|
4
|
+
export function HeaderShell({ as: Element = "div", left, right, className, width = "content", minWidth, maxWidth, sideMargin, top, zIndex, gap, style, ...props }) {
|
|
5
|
+
// Layout props become custom properties; header-shell.css owns the
|
|
6
|
+
// declarations so application stylesheets can restyle the shell.
|
|
6
7
|
return createElement(Element, {
|
|
7
8
|
...props,
|
|
8
|
-
className: ["bnh-header-shell", className].filter(Boolean).join(" "),
|
|
9
|
+
className: ["bnh-header-shell", width === "full" && "bnh-header-shell--full", className].filter(Boolean).join(" "),
|
|
9
10
|
style: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
...(width === "full"
|
|
17
|
-
? { width: `min(calc(100vw - ${sideMargin * 2}px), ${maxW})` }
|
|
18
|
-
: { width: "max-content", minWidth, maxWidth }),
|
|
11
|
+
"--bnh-header-shell-top": length(top),
|
|
12
|
+
"--bnh-header-shell-z": zIndex,
|
|
13
|
+
"--bnh-header-shell-gap": length(gap),
|
|
14
|
+
"--bnh-header-shell-min-width": length(minWidth),
|
|
15
|
+
"--bnh-header-shell-max-width": length(maxWidth),
|
|
16
|
+
"--bnh-header-shell-side-margin": length(sideMargin),
|
|
19
17
|
...style,
|
|
20
18
|
},
|
|
21
19
|
}, left, right);
|
|
22
20
|
}
|
|
21
|
+
function length(value) {
|
|
22
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
23
|
+
}
|
package/dist/pill.d.ts
CHANGED
package/dist/pill.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { pillStyle } from "./_pill-style.js";
|
|
2
3
|
export const PILL_HEIGHT = 26;
|
|
3
4
|
/** A static status surface. Use ExpandablePill for a disclosure. */
|
|
4
|
-
export function Pill({ tint, background, borderColor, height
|
|
5
|
-
return (_jsx(Tag, { className: ["bnh-pill", className].filter(Boolean).join(" "), style: {
|
|
6
|
-
height,
|
|
7
|
-
whiteSpace: "nowrap",
|
|
8
|
-
background: background ?? (tint ? `color-mix(in oklch, ${tint} 8%, transparent)` : undefined),
|
|
9
|
-
border: `1px solid ${borderColor ?? (tint ? `color-mix(in oklch, ${tint} 30%, transparent)` : "var(--bnh-border)")}`,
|
|
10
|
-
...style,
|
|
11
|
-
}, ...props }));
|
|
5
|
+
export function Pill({ tint, background, borderColor, height, as: Tag = "span", style, className, ...props }) {
|
|
6
|
+
return (_jsx(Tag, { className: ["bnh-pill", className].filter(Boolean).join(" "), style: pillStyle({ tint, background, borderColor, height }, style), ...props }));
|
|
12
7
|
}
|
|
@@ -3,6 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
export function SegmentedControl({ items, value, onChange, "aria-label": ariaLabel, className }) {
|
|
4
4
|
return (_jsx("div", { role: "group", "aria-label": ariaLabel, className: ["bnh-segmented-control", className].filter(Boolean).join(" "), children: items.map((item) => {
|
|
5
5
|
const active = item.id === value;
|
|
6
|
-
return (_jsxs("button", { type: "button", onClick: () => onChange(item.id), disabled: item.disabled, title: item.title, "aria-pressed": active, className: "bnh-segmented-control-item", style: { "--bnh-segment-accent": item.accent ?? "var(--bnh-text-dim)" }, children: [item.icon, item.accent && _jsx("span", { "aria-hidden": "true", className: "bnh-segmented-control-dot"
|
|
6
|
+
return (_jsxs("button", { type: "button", onClick: () => onChange(item.id), disabled: item.disabled, title: item.title, "aria-pressed": active, className: "bnh-segmented-control-item", style: { "--bnh-segment-accent": item.accent ?? "var(--bnh-text-dim)" }, children: [item.icon, item.accent && _jsx("span", { "aria-hidden": "true", className: "bnh-segmented-control-dot" }), item.label, item.count !== undefined && _jsx("span", { className: "bnh-segmented-control-count", children: item.count })] }, item.id));
|
|
7
7
|
}) }));
|
|
8
8
|
}
|
package/dist/select.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown } from "lucide-react";
|
|
2
3
|
import { useId } from "react";
|
|
3
4
|
export function Select({ className, wrapperClassName, label, error, id, size = "md", "aria-describedby": describedBy, "aria-invalid": invalid, ...props }) {
|
|
4
5
|
const generatedId = useId();
|
|
5
6
|
const selectId = id ?? generatedId;
|
|
6
7
|
const errorId = `${selectId}-error`;
|
|
7
|
-
return (_jsxs("div", { className: ["bnh-select-field", wrapperClassName].filter(Boolean).join(" "), children: [label && _jsx("label", { htmlFor: selectId, className: "bnh-select-label", children: label }), _jsx("select", { ...props, id: selectId, "aria-invalid": invalid ?? (error ? true : undefined), "aria-describedby": [describedBy, error ? errorId : undefined].filter(Boolean).join(" ") || undefined, className: ["bnh-select", `bnh-select--${size}`, error && "bnh-select--error", className]
|
|
8
|
-
|
|
8
|
+
return (_jsxs("div", { className: ["bnh-select-field", wrapperClassName].filter(Boolean).join(" "), children: [label && _jsx("label", { htmlFor: selectId, className: "bnh-select-label", children: label }), _jsxs("span", { className: "bnh-select-control", children: [_jsx("select", { ...props, id: selectId, "aria-invalid": invalid ?? (error ? true : undefined), "aria-describedby": [describedBy, error ? errorId : undefined].filter(Boolean).join(" ") || undefined, className: ["bnh-select", `bnh-select--${size}`, error && "bnh-select--error", className]
|
|
9
|
+
.filter(Boolean).join(" ") }), _jsx(ChevronDown, { "aria-hidden": "true", className: "bnh-select-icon" })] }), error && _jsx("p", { id: errorId, className: "bnh-select-error", children: error })] }));
|
|
9
10
|
}
|
package/dist/settings.js
CHANGED
|
@@ -17,7 +17,7 @@ export function SettingsRow({ label, hint, children, vertical = false, first = f
|
|
|
17
17
|
return (_jsxs("div", { className: ["bnh-settings-row", vertical && "is-vertical", first && "is-first", className].filter(Boolean).join(" "), ...props, children: [_jsxs("div", { className: "bnh-settings-row-label", children: [_jsx("div", { className: "bnh-settings-row-title", children: label }), hint != null && _jsx("div", { className: "bnh-settings-row-hint", children: hint })] }), _jsx("div", { className: "bnh-settings-row-control", children: children })] }));
|
|
18
18
|
}
|
|
19
19
|
export function SettingsSection({ title, subtitle, accent, headerAction, index = 0, children, className, style, ...props }) {
|
|
20
|
-
return (_jsxs("section", { className: ["bnh-settings-section", "bnh-settings-enter", accent && `bnh-settings-section--${accent}`, className].filter(Boolean).join(" "), style: { ...(index > 0 ? {
|
|
20
|
+
return (_jsxs("section", { className: ["bnh-settings-section", "bnh-settings-enter", accent && `bnh-settings-section--${accent}`, className].filter(Boolean).join(" "), style: { ...(index > 0 ? { "--bnh-settings-enter-delay": `${index * 80}ms` } : {}), ...style }, ...props, children: [_jsxs("div", { className: `bnh-settings-section-header${subtitle != null ? " bnh-settings-section-header--description" : ""}`, children: [_jsx("h2", { className: "bnh-settings-section-title", children: title }), headerAction] }), subtitle != null && _jsx("p", { className: "bnh-settings-section-subtitle", children: subtitle }), children] }));
|
|
21
21
|
}
|
|
22
22
|
/** Link navigation works without client JavaScript or a router dependency. */
|
|
23
23
|
export function SettingsNavigation({ sections, active, label, className }) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.bnh-actions-menu-trigger { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--bnh-radius-md); background: transparent; color: var(--bnh-text-dim); font: inherit; cursor: pointer; }
|
|
3
3
|
.bnh-actions-menu-trigger:hover, .bnh-actions-menu-trigger[data-state="open"] { background: var(--bnh-hover); }
|
|
4
|
-
.bnh-actions-menu-trigger:focus-visible { outline:
|
|
4
|
+
.bnh-actions-menu-trigger:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: var(--bnh-focus-ring-offset); }
|
|
5
5
|
.bnh-actions-menu-trigger:disabled { opacity: .4; cursor: not-allowed; }
|
|
6
|
-
.bnh-actions-menu { box-sizing: border-box; z-index: var(--bnh-actions-menu-z, calc(var(--bnh-modal-z, 100) + 10)); min-width: min(160px, var(--radix-dropdown-menu-content-available-width)); max-width: min(320px, var(--radix-dropdown-menu-content-available-width)); max-height: var(--radix-dropdown-menu-content-available-height); overflow: auto; overscroll-behavior: contain; padding: 4px; border:
|
|
6
|
+
.bnh-actions-menu { box-sizing: border-box; z-index: var(--bnh-actions-menu-z, calc(var(--bnh-modal-z, 100) + 10)); min-width: min(160px, var(--radix-dropdown-menu-content-available-width)); max-width: min(320px, var(--radix-dropdown-menu-content-available-width)); max-height: var(--radix-dropdown-menu-content-available-height); overflow: auto; overscroll-behavior: contain; padding: 4px; border: var(--bnh-border-width) solid var(--bnh-border); border-radius: var(--bnh-radius-md); background: var(--bnh-bg-2); color: var(--bnh-text); font-family: var(--bnh-font-sans); box-shadow: var(--bnh-menu-shadow); outline: none; }
|
|
7
7
|
.bnh-actions-menu-item { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 8px; border-radius: var(--bnh-radius-sm); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; cursor: pointer; user-select: none; outline: none; }
|
|
8
8
|
.bnh-actions-menu-item[data-highlighted] { background: var(--bnh-hover); }
|
|
9
9
|
.bnh-actions-menu-item--danger { color: var(--bnh-red); }
|
package/dist/styles/button.css
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border:
|
|
3
|
-
.bnh-button:focus-visible { outline:
|
|
2
|
+
.bnh-button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border: var(--bnh-border-width) solid transparent; border-radius: var(--bnh-radius-md); font-family: var(--bnh-font-sans, inherit); font-weight: 500; line-height: 1.5; text-decoration: none; cursor: pointer; transition: background-color 150ms, border-color 150ms, color 150ms, opacity 150ms, transform 150ms, box-shadow 150ms; }
|
|
3
|
+
.bnh-button:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: var(--bnh-focus-ring-offset); }
|
|
4
4
|
.bnh-button:disabled { pointer-events: none; opacity: .4; }
|
|
5
|
-
.bnh-button--primary { background: var(--bnh-primary); color: var(--bnh-
|
|
5
|
+
.bnh-button--primary { background: var(--bnh-primary); color: var(--bnh-primary-text); box-shadow: var(--bnh-control-shadow); }
|
|
6
6
|
.bnh-button--primary:hover { background: var(--bnh-primary-hover); }
|
|
7
7
|
.bnh-button--primary:active, .bnh-button--secondary:active { transform: scale(.98); }
|
|
8
|
-
.bnh-button--secondary { background: var(--bnh-surface-3); color: var(--bnh-text); border:
|
|
8
|
+
.bnh-button--secondary { background: var(--bnh-surface-3); color: var(--bnh-text); border-color: var(--bnh-border); box-shadow: var(--bnh-control-shadow); }
|
|
9
9
|
.bnh-button--secondary:hover { background: var(--bnh-hover); }
|
|
10
10
|
.bnh-button--ghost { background: transparent; color: var(--bnh-text-dim); }
|
|
11
11
|
.bnh-button--ghost:hover { color: var(--bnh-text); background: var(--bnh-hover); }
|
|
12
|
-
.bnh-button--danger { color: var(--bnh-red); background: color-mix(in oklch, var(--bnh-red) 10%, transparent); border:
|
|
12
|
+
.bnh-button--danger { color: var(--bnh-red); background: color-mix(in oklch, var(--bnh-red) 10%, transparent); border-color: color-mix(in oklch, var(--bnh-red) 20%, transparent); box-shadow: var(--bnh-control-shadow); }
|
|
13
13
|
.bnh-button--danger:hover { background: color-mix(in oklch, var(--bnh-red) 20%, transparent); }
|
|
14
14
|
.bnh-button--sm { height: 32px; padding: 0 12px; font-size: 14px; gap: 6px; }
|
|
15
15
|
.bnh-button--md { height: 40px; padding: 0 16px; font-size: 14px; gap: 8px; }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.bnh-color-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
3
|
-
.bnh-color-picker > button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius:
|
|
3
|
+
.bnh-color-picker > button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--bnh-radius-pill); background-color: var(--bnh-color-picker-swatch, transparent); color: var(--bnh-color-picker-swatch, currentColor); font: inherit; cursor: pointer; transition: transform 150ms, box-shadow 150ms; }
|
|
4
4
|
.bnh-color-picker > button:hover { transform: scale(1.05); }
|
|
5
5
|
.bnh-color-picker > button[aria-pressed="true"] { transform: scale(1.1); box-shadow: 0 0 0 2px var(--bnh-bg), 0 0 0 4px currentColor; }
|
|
6
6
|
.bnh-color-picker > .bnh-color-picker-none { border: 2px solid var(--bnh-border); background: transparent; color: var(--bnh-text-mute); }
|
|
7
7
|
.bnh-color-picker > .bnh-color-picker-none[aria-pressed="true"] { border-color: var(--bnh-primary); box-shadow: 0 0 0 2px color-mix(in oklch, var(--bnh-primary) 30%, transparent); }
|
|
8
|
-
.bnh-color-picker > button:focus-visible { outline:
|
|
8
|
+
.bnh-color-picker > button:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-text); outline-offset: 5px; }
|
|
9
9
|
.bnh-color-picker > button:disabled { cursor: not-allowed; opacity: .4; transform: none; }
|
|
10
10
|
@media (prefers-reduced-motion: reduce) { .bnh-color-picker > button { transition: none; } }
|
|
11
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@import "./skeleton.css";
|
|
2
2
|
|
|
3
3
|
@layer components {
|
|
4
|
-
.bnh-data-table { box-sizing: border-box; overflow-x: auto; border:
|
|
4
|
+
.bnh-data-table { box-sizing: border-box; overflow-x: auto; border: var(--bnh-border-width) solid var(--bnh-border); border-radius: var(--bnh-radius-xl); background: var(--bnh-bg-2); color: var(--bnh-text); font-family: var(--bnh-font-sans, inherit); line-height: 1.5; box-shadow: var(--bnh-raised-shadow); }
|
|
5
5
|
.bnh-data-table__table { width: 100%; min-width: 720px; border-collapse: collapse; border-spacing: 0; }
|
|
6
|
-
.bnh-data-table__table thead tr, .bnh-data-table__table tbody tr:not(:last-child) { border-bottom:
|
|
6
|
+
.bnh-data-table__table thead tr, .bnh-data-table__table tbody tr:not(:last-child) { border-bottom: var(--bnh-border-width) solid var(--bnh-border); }
|
|
7
7
|
.bnh-data-table__table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--bnh-text-dim); }
|
|
8
8
|
.bnh-data-table__table td { padding: 12px 16px; font-size: 14px; }
|
|
9
9
|
.bnh-data-table__table .bnh-data-table__empty { padding: 48px 16px; text-align: center; color: var(--bnh-text-dim); }
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
.bnh-data-table__skeleton { height: 16px; width: 75%; }
|
|
12
12
|
.bnh-data-table__row--interactive { cursor: pointer; }
|
|
13
13
|
.bnh-data-table__row--interactive:hover { background: var(--bnh-hover); }
|
|
14
|
-
.bnh-data-table__row--interactive:focus-visible { outline:
|
|
14
|
+
.bnh-data-table__row--interactive:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: calc(-1 * var(--bnh-focus-ring-width)); }
|
|
15
15
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
@import "./pill.css";
|
|
2
2
|
|
|
3
3
|
@layer components {
|
|
4
|
-
.bnh-expandable-pill { display: inline-flex; flex-shrink: 0; }
|
|
4
|
+
.bnh-expandable-pill { position: relative; display: inline-flex; flex-shrink: 0; }
|
|
5
|
+
.bnh-expandable-pill[data-align="center"] { position: static; }
|
|
5
6
|
.bnh-expandable-pill-trigger { cursor: pointer; }
|
|
6
|
-
.bnh-expandable-pill-trigger:focus-visible { outline:
|
|
7
|
+
.bnh-expandable-pill-trigger:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: var(--bnh-focus-ring-offset); }
|
|
7
8
|
.bnh-expandable-pill-trigger:disabled { cursor: not-allowed; opacity: .4; }
|
|
8
|
-
.bnh-expandable-pill-panel { position: absolute; z-index: 1; transition: opacity .16s, transform .2s, visibility .2s; }
|
|
9
|
+
.bnh-expandable-pill-panel { position: absolute; z-index: 1; top: calc(100% + var(--bnh-expandable-pill-gap, 6px)); right: 0; max-width: var(--bnh-expandable-pill-panel-max-width, calc(100vw - 32px)); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-4px) scale(.98); transform-origin: top right; transition: opacity .16s, transform .2s, visibility .2s; }
|
|
10
|
+
.bnh-expandable-pill-panel[data-align="center"] { left: 16px; right: 16px; display: flex; justify-content: center; max-width: none; transform-origin: top center; }
|
|
11
|
+
.bnh-expandable-pill-panel[data-state="open"] { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
|
|
9
12
|
@media (prefers-reduced-motion: reduce) { .bnh-expandable-pill-panel { transition: none; } }
|
|
10
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-ghost-text-button { box-sizing: border-box; cursor: pointer; border-radius:
|
|
2
|
+
.bnh-ghost-text-button { box-sizing: border-box; cursor: pointer; border-radius: var(--bnh-radius-sm); border: 0; background: transparent; padding: 6px; font-family: var(--bnh-font-sans, inherit); font-size: 13px; line-height: 1.5; color: var(--bnh-text-dim); transition: color 150ms; }
|
|
3
3
|
.bnh-ghost-text-button:hover { color: var(--bnh-text); }
|
|
4
|
-
.bnh-ghost-text-button:focus-visible { outline:
|
|
4
|
+
.bnh-ghost-text-button:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: var(--bnh-focus-ring-offset); }
|
|
5
5
|
.bnh-ghost-text-button:disabled { opacity: .4; cursor: not-allowed; }
|
|
6
6
|
@media (prefers-reduced-motion: reduce) { .bnh-ghost-text-button { transition: none; } }
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-glass-popover { box-sizing: border-box; overflow: hidden; background: var(--bnh-popover-background, radial-gradient(ellipse 110% 65% at 50% -10%, color-mix(in oklch, var(--bnh-accent) 16%, transparent) 0%, transparent 70%), linear-gradient(135deg, color-mix(in oklch, white 8%, transparent), transparent 48%), color-mix(in oklch, var(--bnh-bg) 48%, transparent)); -webkit-backdrop-filter:
|
|
2
|
+
.bnh-glass-popover { box-sizing: border-box; overflow: hidden; background: var(--bnh-popover-background, radial-gradient(ellipse 110% 65% at 50% -10%, color-mix(in oklch, var(--bnh-accent) 16%, transparent) 0%, transparent 70%), linear-gradient(135deg, color-mix(in oklch, white 8%, transparent), transparent 48%), color-mix(in oklch, var(--bnh-bg) 48%, transparent)); -webkit-backdrop-filter: var(--bnh-popover-backdrop-filter, blur(56px) saturate(1.7) contrast(.92)); backdrop-filter: var(--bnh-popover-backdrop-filter, blur(56px) saturate(1.7) contrast(.92)); border: var(--bnh-border-width, 1px) solid var(--bnh-border-2); box-shadow: var(--bnh-popover-shadow, 0 1px 0 rgb(255 255 255 / 6%) inset, 0 -1px 0 rgb(0 0 0 / 20%) inset, 0 24px 70px rgb(0 0 0 / 50%), 0 6px 20px rgb(0 0 0 / 35%)); }
|
|
3
3
|
button.bnh-glass-popover { font-family: var(--bnh-font-sans, inherit); color: var(--bnh-text); cursor: pointer; }
|
|
4
|
-
button.bnh-glass-popover:focus-visible { outline: 2px solid var(--bnh-accent); outline-offset: 2px; }
|
|
4
|
+
button.bnh-glass-popover:focus-visible { outline: var(--bnh-focus-ring-width, 2px) solid var(--bnh-focus-ring-color, var(--bnh-accent)); outline-offset: var(--bnh-focus-ring-offset, 2px); }
|
|
5
5
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-header-shell { box-sizing: border-box; left: 50%; transform: translateX(-50%); display: flex; align-items: center; border-radius:
|
|
2
|
+
.bnh-header-shell { box-sizing: border-box; position: fixed; top: var(--bnh-header-shell-top, var(--bnh-header-top, 18px)); left: 50%; z-index: var(--bnh-header-shell-z, 30); transform: translateX(-50%); margin-top: var(--bnh-header-offset, 0px); display: flex; align-items: center; gap: var(--bnh-header-shell-gap, 10px); width: max-content; min-width: var(--bnh-header-shell-min-width, auto); max-width: var(--bnh-header-shell-max-width, calc(100vw - 28px)); padding: 6px 16px; border-radius: var(--bnh-radius-pill); color: var(--bnh-text); font-family: var(--bnh-font-sans, inherit); background: var(--bnh-surface); -webkit-backdrop-filter: var(--bnh-glass-backdrop-filter); backdrop-filter: var(--bnh-glass-backdrop-filter); border: var(--bnh-border-width) solid var(--bnh-border-2); box-shadow: var(--bnh-glass-shadow, 0 1px 0 rgb(255 255 255 / 6%) inset, 0 -1px 0 rgb(0 0 0 / 15%) inset, 0 20px 60px rgb(0 0 0 / 35%), 0 4px 16px rgb(0 0 0 / 25%)); transition: width .22s cubic-bezier(.4, 0, .2, 1), min-width .22s cubic-bezier(.4, 0, .2, 1), top .3s cubic-bezier(.2, .8, .2, 1); }
|
|
3
|
+
.bnh-header-shell--full { width: min(calc(100vw - 2 * var(--bnh-header-shell-side-margin, 24px)), var(--bnh-header-shell-max-width, calc(100vw - 28px))); min-width: 0; max-width: none; }
|
|
3
4
|
@media (prefers-reduced-motion: reduce) { .bnh-header-shell { transition: none; } }
|
|
4
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-icon-button { box-sizing: border-box; display: inline-flex; width: 32px; height: 32px; flex-shrink: 0; align-items: center; justify-content: center; padding: 0; border: 0; border-radius:
|
|
2
|
+
.bnh-icon-button { box-sizing: border-box; display: inline-flex; width: 32px; height: 32px; flex-shrink: 0; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: var(--bnh-radius-md); background: transparent; color: var(--bnh-text-mute); font: inherit; cursor: pointer; transition: background-color 100ms, color 100ms, opacity 100ms, transform 100ms; }
|
|
3
3
|
.bnh-icon-button:active { transform: scale(.98); }
|
|
4
|
-
.bnh-icon-button:focus-visible { opacity: 1; outline:
|
|
4
|
+
.bnh-icon-button:focus-visible { opacity: 1; outline: var(--bnh-focus-ring-width) solid color-mix(in oklch, var(--bnh-focus-ring-color) 55%, transparent); outline-offset: var(--bnh-focus-ring-offset); }
|
|
5
5
|
.bnh-icon-button--neutral:hover { background: var(--bnh-surface-2); color: var(--bnh-text); }
|
|
6
6
|
.bnh-icon-button--danger:hover { background: color-mix(in oklch, var(--bnh-red) 12%, transparent); color: var(--bnh-red); }
|
|
7
7
|
.bnh-icon-button--danger:focus-visible { outline-color: color-mix(in oklch, var(--bnh-red) 55%, transparent); }
|
package/dist/styles/input.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.bnh-input-field { display: flex; flex-direction: column; gap: 6px; }
|
|
3
3
|
.bnh-input-label { font-family: var(--bnh-font-sans, inherit); font-size: 14px; line-height: 1.5; font-weight: 500; color: var(--bnh-text-dim); }
|
|
4
|
-
.bnh-input { box-sizing: border-box; height: 40px; width: 100%; min-width: 0; border:
|
|
4
|
+
.bnh-input { box-sizing: border-box; height: 40px; width: 100%; min-width: 0; border: var(--bnh-border-width) solid var(--bnh-border); border-radius: var(--bnh-radius-md); background: var(--bnh-input); padding: 0 12px; font-family: var(--bnh-font-sans, inherit); font-size: 14px; line-height: 1.5; color: var(--bnh-text); box-shadow: var(--bnh-control-shadow); transition: border-color 150ms, box-shadow 150ms; }
|
|
5
5
|
.bnh-input::placeholder { color: var(--bnh-text-mute); opacity: 1; }
|
|
6
|
-
.bnh-input:focus { border-color: var(--bnh-input-focus); outline: none; box-shadow:
|
|
6
|
+
.bnh-input:focus { border-color: var(--bnh-input-focus); outline: none; box-shadow: var(--bnh-input-focus-shadow); }
|
|
7
7
|
.bnh-input--error, .bnh-input--error:focus { border-color: var(--bnh-red); }
|
|
8
8
|
.bnh-input--error:focus { box-shadow: 0 0 0 2px color-mix(in oklch, var(--bnh-red) 20%, transparent); }
|
|
9
9
|
.bnh-input-error { margin: 0; font-family: var(--bnh-font-sans, inherit); font-size: 12px; line-height: 1.5; color: var(--bnh-red); }
|
package/dist/styles/modal.css
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-modal-backdrop { position: fixed; inset: 0; z-index: var(--bnh-modal-z, 100); background:
|
|
3
|
-
.bnh-modal { box-sizing: border-box; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: var(--bnh-modal-z, 100); display: flex; flex-direction: column; width: calc(100% - 40px); max-width: var(--bnh-modal-width, 640px); max-height: calc(100dvh - 40px); min-height: 0; overflow: hidden; border:
|
|
2
|
+
.bnh-modal-backdrop { position: fixed; inset: 0; z-index: var(--bnh-modal-z, 100); background: var(--bnh-modal-backdrop-color); -webkit-backdrop-filter: var(--bnh-modal-backdrop-filter); backdrop-filter: var(--bnh-modal-backdrop-filter); }
|
|
3
|
+
.bnh-modal { box-sizing: border-box; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: var(--bnh-modal-z, 100); display: flex; flex-direction: column; width: calc(100% - 40px); max-width: var(--bnh-modal-width, 640px); max-height: calc(100dvh - 40px); min-height: 0; overflow: hidden; border: var(--bnh-border-width) solid var(--bnh-border-2); border-radius: var(--bnh-radius-xl); color: var(--bnh-text); font-family: var(--bnh-font-sans); background: var(--bnh-frosted-background); -webkit-backdrop-filter: var(--bnh-frosted-backdrop-filter); backdrop-filter: var(--bnh-frosted-backdrop-filter); box-shadow: var(--bnh-popover-shadow); animation: bnh-modal-in 150ms ease-out; }
|
|
4
4
|
.bnh-modal:focus { outline: none; }
|
|
5
|
-
.bnh-modal-close { position: absolute; right: 14px; top: 14px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius:
|
|
5
|
+
.bnh-modal-close { position: absolute; right: 14px; top: 14px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--bnh-radius-pill); background: transparent; color: var(--bnh-text-dim); cursor: pointer; }
|
|
6
6
|
.bnh-modal-close:hover { background: var(--bnh-surface); color: var(--bnh-text); }
|
|
7
|
-
.bnh-modal-close:focus-visible { outline:
|
|
8
|
-
.bnh-modal-actions { flex-shrink: 0; padding: 18px 52px 18px 22px; border-bottom:
|
|
7
|
+
.bnh-modal-close:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: var(--bnh-focus-ring-offset); }
|
|
8
|
+
.bnh-modal-actions { flex-shrink: 0; padding: 18px 52px 18px 22px; border-bottom: var(--bnh-border-width) solid var(--bnh-border); }
|
|
9
9
|
.bnh-modal-heading { flex-shrink: 0; padding: 22px 52px 8px 26px; }
|
|
10
|
-
.bnh-modal-title { margin: 0; font-family: var(--bnh-font-display); font-size: 30px; font-weight: 400; line-height: 1; }
|
|
10
|
+
.bnh-modal-title { margin: 0; font-family: var(--bnh-font-display); font-size: 30px; font-weight: var(--bnh-font-display-weight, 400); line-height: 1; }
|
|
11
11
|
.bnh-modal-subtitle { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--bnh-text-dim); }
|
|
12
12
|
.bnh-modal-body { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 26px 22px; }
|
|
13
|
-
.bnh-modal-footer { flex-shrink: 0; border-top:
|
|
13
|
+
.bnh-modal-footer { flex-shrink: 0; border-top: var(--bnh-border-width) solid var(--bnh-border); padding: 14px 22px; }
|
|
14
14
|
.bnh-modal-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
15
15
|
@keyframes bnh-modal-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
|
|
16
16
|
@media (prefers-reduced-motion: reduce) { .bnh-modal { animation: none; } }
|
|
17
17
|
@media (max-width: 600px) { .bnh-modal { width: calc(100% - 24px); max-height: calc(100dvh - 24px); } .bnh-modal-heading { padding-left: 18px; } .bnh-modal-body { padding: 16px 18px 20px; } .bnh-modal-footer { padding: 12px 18px; } }
|
|
18
18
|
}
|
|
19
|
-
|
package/dist/styles/notice.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-notice { box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 12px; border:
|
|
2
|
+
.bnh-notice { box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 12px; border: var(--bnh-border-width) solid var(--bnh-border-2); border-radius: var(--bnh-radius-md); background: var(--bnh-surface); color: var(--bnh-text-dim); font-family: var(--bnh-font-sans, inherit); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; box-shadow: var(--bnh-raised-shadow); }
|
|
3
3
|
.bnh-notice--success { background: color-mix(in oklch, var(--bnh-green) 10%, transparent); border-color: color-mix(in oklch, var(--bnh-green) 20%, transparent); color: var(--bnh-green); }
|
|
4
4
|
.bnh-notice--danger { background: color-mix(in oklch, var(--bnh-red) 10%, transparent); border-color: color-mix(in oklch, var(--bnh-red) 20%, transparent); color: var(--bnh-red); }
|
|
5
5
|
.bnh-notice-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding-top: .125em; }
|
package/dist/styles/pill.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-pill { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 0 11px; border-radius:
|
|
2
|
+
.bnh-pill { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; height: var(--bnh-pill-height, 26px); padding: 0 11px; border: var(--bnh-border-width) solid var(--bnh-pill-border-color, var(--bnh-border)); border-radius: var(--bnh-radius-pill); background: var(--bnh-pill-background, transparent); font-family: var(--bnh-font-sans, inherit); font-size: 11.5px; line-height: 1.5; white-space: nowrap; color: var(--bnh-text-dim); }
|
|
3
3
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-segmented-control { display: inline-flex; gap: 2px; padding: 3px; border-radius:
|
|
3
|
-
.bnh-segmented-control-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius:
|
|
2
|
+
.bnh-segmented-control { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--bnh-radius-md); background: var(--bnh-surface); border: var(--bnh-border-width) solid var(--bnh-border); box-shadow: var(--bnh-control-shadow); align-self: flex-start; }
|
|
3
|
+
.bnh-segmented-control-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--bnh-radius-sm); border: none; background: transparent; color: var(--bnh-text-dim); font-family: var(--bnh-font-sans, inherit); font-weight: 400; font-size: 12px; line-height: 1.5; cursor: pointer; transition: background .12s, color .12s, box-shadow .12s; }
|
|
4
4
|
.bnh-segmented-control-item:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--bnh-surface-2); }
|
|
5
5
|
.bnh-segmented-control-item[aria-pressed="true"] { background: var(--bnh-hover); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--bnh-segment-accent) 45%, var(--bnh-border-2)); color: var(--bnh-text); font-weight: 600; }
|
|
6
6
|
.bnh-segmented-control-item:disabled { opacity: .5; cursor: not-allowed; }
|
|
7
|
-
.bnh-segmented-control-item:focus-visible { outline:
|
|
8
|
-
.bnh-segmented-control-dot { width: 6px; height: 6px; border-radius:
|
|
7
|
+
.bnh-segmented-control-item:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: var(--bnh-focus-ring-offset); }
|
|
8
|
+
.bnh-segmented-control-dot { width: 6px; height: 6px; border-radius: var(--bnh-radius-pill); background: var(--bnh-segment-accent); }
|
|
9
9
|
.bnh-segmented-control-count { font-family: var(--bnh-font-mono, monospace); font-size: 10px; color: var(--bnh-text-dim); }
|
|
10
10
|
@media (prefers-reduced-motion: reduce) { .bnh-segmented-control-item { transition: none; } }
|
|
11
11
|
}
|
package/dist/styles/select.css
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.bnh-select-field { display: flex; flex-direction: column; gap: 6px; }
|
|
3
3
|
.bnh-select-label { font-family: var(--bnh-font-sans, inherit); font-size: 14px; line-height: 1.5; font-weight: 500; color: var(--bnh-text-dim); }
|
|
4
|
-
.bnh-select {
|
|
5
|
-
.bnh-select
|
|
6
|
-
.bnh-select--
|
|
7
|
-
.bnh-select
|
|
4
|
+
.bnh-select-control { position: relative; display: flex; min-width: 0; }
|
|
5
|
+
.bnh-select { box-sizing: border-box; width: 100%; min-width: 0; appearance: none; border: var(--bnh-border-width) solid var(--bnh-border); border-radius: var(--bnh-radius-md); background: var(--bnh-input); color: var(--bnh-text); font-family: var(--bnh-font-sans, inherit); line-height: 1.5; cursor: pointer; box-shadow: var(--bnh-control-shadow); transition: border-color 150ms, box-shadow 150ms; }
|
|
6
|
+
.bnh-select--md { height: 40px; padding: 0 32px 0 12px; font-size: 14px; }
|
|
7
|
+
.bnh-select--sm { height: 32px; padding: 0 28px 0 10px; font-size: 12px; }
|
|
8
|
+
.bnh-select-icon { position: absolute; top: 50%; right: 8px; width: 16px; height: 16px; translate: 0 -50%; color: var(--bnh-text-dim); pointer-events: none; }
|
|
9
|
+
.bnh-select--sm + .bnh-select-icon { right: 6px; }
|
|
10
|
+
.bnh-select:focus { border-color: var(--bnh-input-focus); outline: none; box-shadow: var(--bnh-input-focus-shadow); }
|
|
8
11
|
.bnh-select--error, .bnh-select--error:focus { border-color: var(--bnh-red); }
|
|
9
12
|
.bnh-select--error:focus { box-shadow: 0 0 0 2px color-mix(in oklch, var(--bnh-red) 20%, transparent); }
|
|
10
13
|
.bnh-select-error { margin: 0; font-family: var(--bnh-font-sans, inherit); font-size: 12px; line-height: 1.5; color: var(--bnh-red); }
|
package/dist/styles/settings.css
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
.bnh-settings-rail {
|
|
44
44
|
width: 220px;
|
|
45
45
|
flex-shrink: 0;
|
|
46
|
-
border-right:
|
|
46
|
+
border-right: var(--bnh-border-width) solid var(--bnh-border);
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
49
|
min-height: 0;
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
border-left-color: var(--bnh-accent);
|
|
92
92
|
}
|
|
93
93
|
.bnh-settings-card {
|
|
94
|
-
border-radius:
|
|
94
|
+
border-radius: var(--bnh-radius-md);
|
|
95
95
|
padding: 22px;
|
|
96
96
|
}
|
|
97
97
|
.bnh-settings-card-header {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
align-items: center;
|
|
105
105
|
gap: 24px;
|
|
106
106
|
padding: 14px 0;
|
|
107
|
-
border-top:
|
|
107
|
+
border-top: var(--bnh-border-width) solid var(--bnh-border);
|
|
108
108
|
}
|
|
109
109
|
.bnh-settings-row.is-first {
|
|
110
110
|
border-top: none;
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
width: 100%;
|
|
168
168
|
align-self: auto;
|
|
169
169
|
border-right: none;
|
|
170
|
-
border-bottom:
|
|
170
|
+
border-bottom: var(--bnh-border-width) solid var(--bnh-border);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
@media (max-width: 760px) {
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
white-space: nowrap;
|
|
200
200
|
border-left: none;
|
|
201
201
|
border-bottom: 2px solid transparent;
|
|
202
|
-
border-radius:
|
|
202
|
+
border-radius: var(--bnh-radius-sm) var(--bnh-radius-sm) 0 0;
|
|
203
203
|
padding: 8px 10px;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
}
|
|
264
264
|
.bnh-settings-title {
|
|
265
265
|
font-family: var(--bnh-font-display, serif);
|
|
266
|
-
font-weight: 400;
|
|
266
|
+
font-weight: var(--bnh-font-display-weight, 400);
|
|
267
267
|
}
|
|
268
268
|
.bnh-settings-description {
|
|
269
269
|
margin: 8px 0 0;
|
|
@@ -289,8 +289,8 @@
|
|
|
289
289
|
text-decoration: none;
|
|
290
290
|
}
|
|
291
291
|
.bnh-settings-rail-item:focus-visible {
|
|
292
|
-
outline:
|
|
293
|
-
outline-offset: -
|
|
292
|
+
outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color);
|
|
293
|
+
outline-offset: calc(-1 * var(--bnh-focus-ring-width));
|
|
294
294
|
}
|
|
295
295
|
.bnh-settings-rail-icon {
|
|
296
296
|
width: 14px;
|
|
@@ -313,12 +313,13 @@
|
|
|
313
313
|
font-size: 10px;
|
|
314
314
|
color: var(--bnh-text-dim);
|
|
315
315
|
padding: 1px 6px;
|
|
316
|
-
border-radius:
|
|
316
|
+
border-radius: var(--bnh-radius-pill);
|
|
317
317
|
background: var(--bnh-surface);
|
|
318
318
|
}
|
|
319
319
|
.bnh-settings-card {
|
|
320
320
|
background: var(--bnh-bg-2);
|
|
321
|
-
border:
|
|
321
|
+
border: var(--bnh-border-width) solid var(--bnh-border);
|
|
322
|
+
box-shadow: var(--bnh-raised-shadow);
|
|
322
323
|
}
|
|
323
324
|
.bnh-settings-card--danger {
|
|
324
325
|
border-color: color-mix(in oklch, var(--bnh-red) 30%, var(--bnh-border));
|
|
@@ -363,8 +364,9 @@
|
|
|
363
364
|
}
|
|
364
365
|
.bnh-settings-section {
|
|
365
366
|
border-radius: var(--bnh-radius-lg, 16px);
|
|
366
|
-
border:
|
|
367
|
+
border: var(--bnh-border-width) solid var(--bnh-border);
|
|
367
368
|
background: var(--bnh-bg-2);
|
|
369
|
+
box-shadow: var(--bnh-raised-shadow);
|
|
368
370
|
padding: 16px;
|
|
369
371
|
}
|
|
370
372
|
.bnh-settings-section--purple {
|
|
@@ -401,7 +403,7 @@
|
|
|
401
403
|
color: var(--bnh-text-dim);
|
|
402
404
|
}
|
|
403
405
|
.bnh-settings-enter {
|
|
404
|
-
animation: bnh-settings-fade-up 0.4s ease-out both;
|
|
406
|
+
animation: bnh-settings-fade-up 0.4s ease-out var(--bnh-settings-enter-delay, 0ms) both;
|
|
405
407
|
}
|
|
406
408
|
@keyframes bnh-settings-fade-up {
|
|
407
409
|
from {
|
package/dist/styles/surface.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-surface { box-sizing: border-box; color: var(--bnh-text); border:
|
|
3
|
-
.bnh-surface--raised { background: var(--bnh-bg-2); }
|
|
4
|
-
.bnh-surface--glass { background: var(--bnh-surface); border-color: var(--bnh-border-2); -webkit-backdrop-filter:
|
|
5
|
-
.bnh-surface--frosted { background: var(--bnh-frosted-background); border-color: var(--bnh-border-2); -webkit-backdrop-filter:
|
|
2
|
+
.bnh-surface { box-sizing: border-box; color: var(--bnh-text); border: var(--bnh-border-width) solid var(--bnh-border); border-radius: var(--bnh-radius-lg); }
|
|
3
|
+
.bnh-surface--raised { background: var(--bnh-bg-2); box-shadow: var(--bnh-raised-shadow); }
|
|
4
|
+
.bnh-surface--glass { background: var(--bnh-surface); border-color: var(--bnh-border-2); -webkit-backdrop-filter: var(--bnh-glass-backdrop-filter); backdrop-filter: var(--bnh-glass-backdrop-filter); box-shadow: var(--bnh-glass-shadow); }
|
|
5
|
+
.bnh-surface--frosted { background: var(--bnh-frosted-background); border-color: var(--bnh-border-2); -webkit-backdrop-filter: var(--bnh-frosted-backdrop-filter); backdrop-filter: var(--bnh-frosted-backdrop-filter); box-shadow: var(--bnh-popover-shadow); }
|
|
6
6
|
}
|
package/dist/styles/switch.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.bnh-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--bnh-font-sans, inherit); }
|
|
3
3
|
.bnh-switch-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
4
|
-
.bnh-switch-track { box-sizing: border-box; position: relative; width: var(--bnh-switch-width, 36px); height: var(--bnh-switch-height, 20px); flex-shrink: 0; border: 0; border-radius:
|
|
5
|
-
.bnh-switch-track::after { content: ""; position: absolute; top: var(--bnh-switch-inset, 2px); left: var(--bnh-switch-inset, 2px); width: var(--bnh-switch-thumb, 16px); height: var(--bnh-switch-thumb, 16px); border-radius:
|
|
4
|
+
.bnh-switch-track { box-sizing: border-box; position: relative; width: var(--bnh-switch-width, 36px); height: var(--bnh-switch-height, 20px); flex-shrink: 0; border: 0; border-radius: var(--bnh-radius-pill); background: var(--bnh-switch-inactive, var(--bnh-surface-2)); transition: background .15s; }
|
|
5
|
+
.bnh-switch-track::after { content: ""; position: absolute; top: var(--bnh-switch-inset, 2px); left: var(--bnh-switch-inset, 2px); width: var(--bnh-switch-thumb, 16px); height: var(--bnh-switch-thumb, 16px); border-radius: var(--bnh-radius-pill); background: var(--bnh-switch-thumb-color, white); box-shadow: var(--bnh-switch-thumb-shadow, 0 1px 3px rgb(0 0 0 / 20%)); transition: transform .15s; }
|
|
6
6
|
.bnh-switch-input:checked + .bnh-switch-track { background: var(--bnh-switch-active, var(--bnh-accent)); }
|
|
7
|
-
.bnh-switch-input:checked + .bnh-switch-track::after { transform: translateX(calc(var(--bnh-switch-width, 36px) - var(--bnh-switch-thumb, 16px) - 2 * var(--bnh-switch-inset, 2px)));
|
|
8
|
-
.bnh-switch-input:focus-visible + .bnh-switch-track { outline:
|
|
7
|
+
.bnh-switch-input:checked + .bnh-switch-track::after { transform: translateX(calc(var(--bnh-switch-width, 36px) - var(--bnh-switch-thumb, 16px) - 2 * var(--bnh-switch-inset, 2px))); }
|
|
8
|
+
.bnh-switch-input:focus-visible + .bnh-switch-track { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: 3px; }
|
|
9
9
|
.bnh-switch-input:disabled ~ span { opacity: .5; cursor: not-allowed; }
|
|
10
10
|
.bnh-switch-copy { display: flex; flex-direction: column; gap: 2px; }
|
|
11
11
|
.bnh-switch-label { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--bnh-text); }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.bnh-theme-toggle { box-sizing: border-box; display: inline-flex; align-items: center; padding: 2px; border:
|
|
3
|
-
.bnh-theme-toggle > button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; padding: 6px; border: 0; border-radius:
|
|
2
|
+
.bnh-theme-toggle { box-sizing: border-box; display: inline-flex; align-items: center; padding: 2px; border: var(--bnh-border-width) solid var(--bnh-border); border-radius: var(--bnh-radius-pill); background: var(--bnh-input); box-shadow: var(--bnh-control-shadow); }
|
|
3
|
+
.bnh-theme-toggle > button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; padding: 6px; border: 0; border-radius: var(--bnh-radius-pill); background: transparent; color: var(--bnh-text-mute); font: inherit; cursor: pointer; transition: background-color 150ms, color 150ms; }
|
|
4
4
|
.bnh-theme-toggle > button:hover { color: var(--bnh-text-dim); }
|
|
5
5
|
.bnh-theme-toggle > button[aria-pressed="true"] { background: var(--bnh-hover); color: var(--bnh-text); }
|
|
6
|
-
.bnh-theme-toggle > button:focus-visible { outline:
|
|
6
|
+
.bnh-theme-toggle > button:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: var(--bnh-focus-ring-offset); }
|
|
7
7
|
.bnh-theme-toggle > button:disabled { cursor: not-allowed; opacity: .4; }
|
|
8
8
|
@media (prefers-reduced-motion: reduce) { .bnh-theme-toggle > button { transition: none; } }
|
|
9
9
|
}
|
package/dist/styles/theme.css
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* Generated from tokens.json. No reset, font downloads, or runtime provider. */
|
|
2
2
|
@layer theme, base, components, utilities;
|
|
3
3
|
@layer theme {
|
|
4
|
-
:root {
|
|
4
|
+
:where(:root) {
|
|
5
5
|
--bnh-font-sans: ui-sans-serif, system-ui, sans-serif;
|
|
6
6
|
--bnh-font-display: Georgia, serif;
|
|
7
|
+
--bnh-font-display-weight: 400;
|
|
7
8
|
--bnh-font-mono: ui-monospace, SFMono-Regular, monospace;
|
|
8
9
|
--bnh-header-top: 18px;
|
|
9
10
|
--bnh-header-offset: 0px;
|
|
@@ -12,10 +13,20 @@
|
|
|
12
13
|
--bnh-radius-md: 10px;
|
|
13
14
|
--bnh-radius-lg: 16px;
|
|
14
15
|
--bnh-radius-xl: 24px;
|
|
16
|
+
--bnh-radius-pill: 999px;
|
|
17
|
+
--bnh-border-width: 1px;
|
|
18
|
+
--bnh-focus-ring-width: 2px;
|
|
19
|
+
--bnh-focus-ring-offset: 2px;
|
|
15
20
|
--bnh-modal-backdrop-blur: 20px;
|
|
16
21
|
--bnh-popover-backdrop-blur: 56px;
|
|
22
|
+
--bnh-glass-backdrop-filter: blur(24px) saturate(1.4);
|
|
23
|
+
--bnh-frosted-backdrop-filter: blur(32px) saturate(1.5);
|
|
24
|
+
--bnh-modal-backdrop-color: rgba(10, 8, 20, .5);
|
|
25
|
+
--bnh-control-shadow: none;
|
|
26
|
+
--bnh-raised-shadow: none;
|
|
27
|
+
--bnh-menu-shadow: 0 8px 24px rgb(0 0 0 / .2);
|
|
17
28
|
}
|
|
18
|
-
:root, .bnh-theme-dark, [data-bnh-theme="dark"] {
|
|
29
|
+
:where(:root, .bnh-theme-dark, [data-bnh-theme="dark"]) {
|
|
19
30
|
--bnh-bg: oklch(0.245 0.015 275);
|
|
20
31
|
--bnh-bg-2: oklch(0.29 0.017 275);
|
|
21
32
|
--bnh-surface-3: oklch(0.325 0.018 275);
|
|
@@ -32,6 +43,7 @@
|
|
|
32
43
|
--bnh-accent: #a78bfa;
|
|
33
44
|
--bnh-input-focus: color-mix(in oklch, var(--bnh-accent) 55%, transparent);
|
|
34
45
|
--bnh-input-focus-ring: color-mix(in oklch, var(--bnh-accent) 20%, transparent);
|
|
46
|
+
--bnh-input-focus-shadow: 0 0 0 2px var(--bnh-input-focus-ring);
|
|
35
47
|
--bnh-green: #22c55e;
|
|
36
48
|
--bnh-amber: #f59e0b;
|
|
37
49
|
--bnh-violet: #a78bfa;
|
|
@@ -41,12 +53,16 @@
|
|
|
41
53
|
--bnh-link: #94a3b8;
|
|
42
54
|
--bnh-primary: #e8d5b5;
|
|
43
55
|
--bnh-primary-hover: #f0e4ce;
|
|
56
|
+
--bnh-primary-text: var(--bnh-bg);
|
|
57
|
+
--bnh-focus-ring-color: var(--bnh-accent);
|
|
58
|
+
--bnh-popover-backdrop-filter: blur(var(--bnh-popover-backdrop-blur)) saturate(1.7) contrast(.92);
|
|
59
|
+
--bnh-modal-backdrop-filter: blur(var(--bnh-modal-backdrop-blur)) saturate(1.08);
|
|
44
60
|
--bnh-glass-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 -1px 0 rgba(0,0,0,.15) inset, 0 20px 60px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.25);
|
|
45
61
|
--bnh-popover-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 -1px 0 rgba(0,0,0,.2) inset, 0 24px 70px rgba(0,0,0,.5), 0 6px 20px rgba(0,0,0,.35);
|
|
46
62
|
--bnh-popover-background: radial-gradient(ellipse 110% 65% at 50% -10%, color-mix(in oklch, var(--bnh-accent) 16%, transparent) 0%, transparent 70%), linear-gradient(135deg, color-mix(in oklch, white 8%, transparent), transparent 48%), color-mix(in oklch, var(--bnh-bg) 48%, transparent);
|
|
47
63
|
--bnh-frosted-background: radial-gradient(ellipse 110% 65% at 50% -10%, color-mix(in oklch, var(--bnh-accent) 14%, transparent), transparent 70%), color-mix(in oklch, var(--bnh-bg) 70%, transparent);
|
|
48
64
|
}
|
|
49
|
-
:root.light, .bnh-theme-light, [data-bnh-theme="light"] {
|
|
65
|
+
:where(:root.light, .bnh-theme-light, [data-bnh-theme="light"]) {
|
|
50
66
|
--bnh-bg: oklch(0.924 0.009 85);
|
|
51
67
|
--bnh-bg-2: oklch(0.978 0.004 85);
|
|
52
68
|
--bnh-surface-3: #fffefa;
|
|
@@ -63,6 +79,7 @@
|
|
|
63
79
|
--bnh-accent: #7c3aed;
|
|
64
80
|
--bnh-input-focus: color-mix(in oklch, var(--bnh-accent) 55%, transparent);
|
|
65
81
|
--bnh-input-focus-ring: color-mix(in oklch, var(--bnh-accent) 20%, transparent);
|
|
82
|
+
--bnh-input-focus-shadow: 0 0 0 2px var(--bnh-input-focus-ring);
|
|
66
83
|
--bnh-green: #166534;
|
|
67
84
|
--bnh-amber: #d97706;
|
|
68
85
|
--bnh-violet: #7c3aed;
|
|
@@ -72,6 +89,10 @@
|
|
|
72
89
|
--bnh-link: #475569;
|
|
73
90
|
--bnh-primary: #76603d;
|
|
74
91
|
--bnh-primary-hover: #6b5636;
|
|
92
|
+
--bnh-primary-text: var(--bnh-bg);
|
|
93
|
+
--bnh-focus-ring-color: var(--bnh-accent);
|
|
94
|
+
--bnh-popover-backdrop-filter: blur(var(--bnh-popover-backdrop-blur)) saturate(1.7) contrast(.92);
|
|
95
|
+
--bnh-modal-backdrop-filter: blur(var(--bnh-modal-backdrop-blur)) saturate(1.08);
|
|
75
96
|
--bnh-glass-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 -1px 0 rgba(0,0,0,.04) inset, 0 12px 40px rgba(30,20,60,.1), 0 2px 8px rgba(30,20,60,.06);
|
|
76
97
|
--bnh-popover-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 -1px 0 rgba(0,0,0,.05) inset, 0 16px 50px rgba(30,20,60,.15), 0 3px 10px rgba(30,20,60,.08);
|
|
77
98
|
--bnh-popover-background: radial-gradient(ellipse 110% 65% at 50% -10%, color-mix(in oklch, var(--bnh-accent) 10%, transparent) 0%, transparent 70%), linear-gradient(135deg, color-mix(in oklch, white 42%, transparent), transparent 52%), color-mix(in oklch, var(--bnh-bg-2) 58%, transparent);
|
package/dist/styles/toast.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.bnh-toast-announcer { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
3
3
|
.bnh-toast-viewport { box-sizing: border-box; position: fixed; left: 50%; bottom: var(--bnh-toast-bottom, 24px); transform: translateX(-50%); z-index: var(--bnh-toast-z, 400); display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(448px, calc(100% - 16px)); max-height: calc(100dvh - var(--bnh-toast-bottom, 24px) - 12px); overflow-y: auto; overscroll-behavior: contain; padding: 4px; pointer-events: auto; }
|
|
4
4
|
.bnh-toast-viewport:empty { padding: 0; pointer-events: none; }
|
|
5
|
-
.bnh-toast { --bnh-toast-color: var(--bnh-accent); box-sizing: border-box; pointer-events: auto; flex-shrink: 0; display: flex; align-items: center; gap: 10px; width: fit-content; min-width: min(240px, 100%); max-width: 100%; padding: 8px 8px 8px 10px; border:
|
|
5
|
+
.bnh-toast { --bnh-toast-color: var(--bnh-accent); box-sizing: border-box; pointer-events: auto; flex-shrink: 0; display: flex; align-items: center; gap: 10px; width: fit-content; min-width: min(240px, 100%); max-width: 100%; padding: 8px 8px 8px 10px; border: var(--bnh-border-width) solid color-mix(in oklch, var(--bnh-toast-color) 20%, var(--bnh-border-2)); border-radius: var(--bnh-radius-pill); color: var(--bnh-text); background: color-mix(in oklch, var(--bnh-bg) 72%, transparent); -webkit-backdrop-filter: var(--bnh-frosted-backdrop-filter); backdrop-filter: var(--bnh-frosted-backdrop-filter); box-shadow: var(--bnh-glass-shadow); font-family: var(--bnh-font-sans, inherit); line-height: 1.5; animation: bnh-toast-in .22s cubic-bezier(.4, 0, .2, 1) both; }
|
|
6
6
|
.bnh-toast--success { --bnh-toast-color: var(--bnh-green); }
|
|
7
7
|
.bnh-toast--error { --bnh-toast-color: var(--bnh-red); }
|
|
8
8
|
.bnh-toast__indicator { position: relative; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; color: var(--bnh-toast-color); }
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
.bnh-toast__ring-progress { fill: none; stroke: var(--bnh-toast-color); stroke-width: 1.6; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
|
|
12
12
|
.bnh-toast__icon { position: relative; }
|
|
13
13
|
.bnh-toast__message { flex: 1; min-width: 0; padding: 2px 0; font-size: 13px; font-weight: 500; letter-spacing: -.005em; overflow-wrap: anywhere; }
|
|
14
|
-
.bnh-toast__action { box-sizing: border-box; flex-shrink: 0; max-width: 45%; padding: 5px 11px; border: 0; border-radius:
|
|
14
|
+
.bnh-toast__action { box-sizing: border-box; flex-shrink: 0; max-width: 45%; padding: 5px 11px; border: 0; border-radius: var(--bnh-radius-pill); color: var(--bnh-text); background: color-mix(in oklch, var(--bnh-toast-color) 22%, transparent); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: -.005em; overflow-wrap: anywhere; cursor: pointer; transition: background .12s; }
|
|
15
15
|
.bnh-toast__action:hover { background: color-mix(in oklch, var(--bnh-toast-color) 34%, transparent); }
|
|
16
16
|
.bnh-toast__action:disabled { pointer-events: none; opacity: .4; }
|
|
17
|
-
.bnh-toast__dismiss { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; padding: 0; border: 0; border-radius:
|
|
17
|
+
.bnh-toast__dismiss { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--bnh-radius-pill); color: var(--bnh-text-dim); background: transparent; cursor: pointer; }
|
|
18
18
|
.bnh-toast__dismiss:hover { color: var(--bnh-text); background: var(--bnh-surface); }
|
|
19
|
-
.bnh-toast__action:focus-visible, .bnh-toast__dismiss:focus-visible { outline:
|
|
19
|
+
.bnh-toast__action:focus-visible, .bnh-toast__dismiss:focus-visible { outline: var(--bnh-focus-ring-width) solid var(--bnh-focus-ring-color); outline-offset: var(--bnh-focus-ring-offset); }
|
|
20
20
|
@keyframes bnh-toast-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
|
|
21
21
|
@media (prefers-reduced-motion: reduce) { .bnh-toast { animation: none; } .bnh-toast__ring-progress, .bnh-toast__action { transition: none; } }
|
|
22
22
|
}
|
package/dist/tokens.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"shared": {
|
|
3
3
|
"font-sans": "ui-sans-serif, system-ui, sans-serif",
|
|
4
4
|
"font-display": "Georgia, serif",
|
|
5
|
+
"font-display-weight": "400",
|
|
5
6
|
"font-mono": "ui-monospace, SFMono-Regular, monospace",
|
|
6
7
|
"header-top": "18px",
|
|
7
8
|
"header-offset": "0px",
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
"accent": "#a78bfa",
|
|
25
26
|
"input-focus": "color-mix(in oklch, var(--bnh-accent) 55%, transparent)",
|
|
26
27
|
"input-focus-ring": "color-mix(in oklch, var(--bnh-accent) 20%, transparent)",
|
|
28
|
+
"input-focus-shadow": "0 0 0 2px var(--bnh-input-focus-ring)",
|
|
27
29
|
"green": "#22c55e",
|
|
28
30
|
"amber": "#f59e0b",
|
|
29
31
|
"violet": "#a78bfa",
|
|
@@ -33,12 +35,26 @@
|
|
|
33
35
|
"link": "#94a3b8",
|
|
34
36
|
"primary": "#e8d5b5",
|
|
35
37
|
"primary-hover": "#f0e4ce",
|
|
38
|
+
"primary-text": "var(--bnh-bg)",
|
|
39
|
+
"focus-ring-color": "var(--bnh-accent)",
|
|
36
40
|
"radius-sm": "6px",
|
|
37
41
|
"radius-md": "10px",
|
|
38
42
|
"radius-lg": "16px",
|
|
39
43
|
"radius-xl": "24px",
|
|
44
|
+
"radius-pill": "999px",
|
|
45
|
+
"border-width": "1px",
|
|
46
|
+
"focus-ring-width": "2px",
|
|
47
|
+
"focus-ring-offset": "2px",
|
|
40
48
|
"modal-backdrop-blur": "20px",
|
|
41
49
|
"popover-backdrop-blur": "56px",
|
|
50
|
+
"glass-backdrop-filter": "blur(24px) saturate(1.4)",
|
|
51
|
+
"frosted-backdrop-filter": "blur(32px) saturate(1.5)",
|
|
52
|
+
"popover-backdrop-filter": "blur(var(--bnh-popover-backdrop-blur)) saturate(1.7) contrast(.92)",
|
|
53
|
+
"modal-backdrop-filter": "blur(var(--bnh-modal-backdrop-blur)) saturate(1.08)",
|
|
54
|
+
"modal-backdrop-color": "rgba(10, 8, 20, .5)",
|
|
55
|
+
"control-shadow": "none",
|
|
56
|
+
"raised-shadow": "none",
|
|
57
|
+
"menu-shadow": "0 8px 24px rgb(0 0 0 / .2)",
|
|
42
58
|
"glass-shadow": "0 1px 0 rgba(255,255,255,.06) inset, 0 -1px 0 rgba(0,0,0,.15) inset, 0 20px 60px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.25)",
|
|
43
59
|
"popover-shadow": "0 1px 0 rgba(255,255,255,.06) inset, 0 -1px 0 rgba(0,0,0,.2) inset, 0 24px 70px rgba(0,0,0,.5), 0 6px 20px rgba(0,0,0,.35)",
|
|
44
60
|
"popover-background": "radial-gradient(ellipse 110% 65% at 50% -10%, color-mix(in oklch, var(--bnh-accent) 16%, transparent) 0%, transparent 70%), linear-gradient(135deg, color-mix(in oklch, white 8%, transparent), transparent 48%), color-mix(in oklch, var(--bnh-bg) 48%, transparent)",
|
|
@@ -61,6 +77,7 @@
|
|
|
61
77
|
"accent": "#7c3aed",
|
|
62
78
|
"input-focus": "color-mix(in oklch, var(--bnh-accent) 55%, transparent)",
|
|
63
79
|
"input-focus-ring": "color-mix(in oklch, var(--bnh-accent) 20%, transparent)",
|
|
80
|
+
"input-focus-shadow": "0 0 0 2px var(--bnh-input-focus-ring)",
|
|
64
81
|
"green": "#166534",
|
|
65
82
|
"amber": "#d97706",
|
|
66
83
|
"violet": "#7c3aed",
|
|
@@ -70,12 +87,26 @@
|
|
|
70
87
|
"link": "#475569",
|
|
71
88
|
"primary": "#76603d",
|
|
72
89
|
"primary-hover": "#6b5636",
|
|
90
|
+
"primary-text": "var(--bnh-bg)",
|
|
91
|
+
"focus-ring-color": "var(--bnh-accent)",
|
|
73
92
|
"radius-sm": "6px",
|
|
74
93
|
"radius-md": "10px",
|
|
75
94
|
"radius-lg": "16px",
|
|
76
95
|
"radius-xl": "24px",
|
|
96
|
+
"radius-pill": "999px",
|
|
97
|
+
"border-width": "1px",
|
|
98
|
+
"focus-ring-width": "2px",
|
|
99
|
+
"focus-ring-offset": "2px",
|
|
77
100
|
"modal-backdrop-blur": "20px",
|
|
78
101
|
"popover-backdrop-blur": "56px",
|
|
102
|
+
"glass-backdrop-filter": "blur(24px) saturate(1.4)",
|
|
103
|
+
"frosted-backdrop-filter": "blur(32px) saturate(1.5)",
|
|
104
|
+
"popover-backdrop-filter": "blur(var(--bnh-popover-backdrop-blur)) saturate(1.7) contrast(.92)",
|
|
105
|
+
"modal-backdrop-filter": "blur(var(--bnh-modal-backdrop-blur)) saturate(1.08)",
|
|
106
|
+
"modal-backdrop-color": "rgba(10, 8, 20, .5)",
|
|
107
|
+
"control-shadow": "none",
|
|
108
|
+
"raised-shadow": "none",
|
|
109
|
+
"menu-shadow": "0 8px 24px rgb(0 0 0 / .2)",
|
|
79
110
|
"glass-shadow": "0 1px 0 rgba(255,255,255,.9) inset, 0 -1px 0 rgba(0,0,0,.04) inset, 0 12px 40px rgba(30,20,60,.1), 0 2px 8px rgba(30,20,60,.06)",
|
|
80
111
|
"popover-shadow": "0 1px 0 rgba(255,255,255,.9) inset, 0 -1px 0 rgba(0,0,0,.05) inset, 0 16px 50px rgba(30,20,60,.15), 0 3px 10px rgba(30,20,60,.08)",
|
|
81
112
|
"popover-background": "radial-gradient(ellipse 110% 65% at 50% -10%, color-mix(in oklch, var(--bnh-accent) 10%, transparent) 0%, transparent 70%), linear-gradient(135deg, color-mix(in oklch, white 42%, transparent), transparent 52%), color-mix(in oklch, var(--bnh-bg-2) 58%, transparent)",
|