@vokality/design-system 1.2.2 → 1.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/CHANGELOG.md +14 -0
- package/README.md +6 -0
- package/dist/components/Badge/Badge.d.ts +6 -4
- package/dist/components/Badge/Badge.js +6 -4
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Fieldset/Fieldset.d.ts +11 -0
- package/dist/components/Fieldset/Fieldset.js +12 -0
- package/dist/components/Grid/Grid.d.ts +3 -3
- package/dist/components/Grid/Grid.js +2 -2
- package/dist/components/Inline/Inline.d.ts +3 -3
- package/dist/components/Inline/Inline.js +2 -2
- package/dist/components/Stack/Stack.d.ts +3 -3
- package/dist/components/Stack/Stack.js +2 -2
- package/dist/components/Text/Text.d.ts +11 -4
- package/dist/components/Text/Text.js +2 -2
- package/dist/components.css +97 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/vokality.css +97 -0
- package/dist/vokality.iife.js +944 -893
- package/docs/brand.md +2 -0
- package/docs/components/Badge/README.md +2 -0
- package/docs/components/Button/README.md +5 -3
- package/docs/components/Fieldset/README.md +25 -0
- package/docs/components/Grid/README.md +2 -0
- package/docs/components/Inline/README.md +2 -0
- package/docs/components/PageHeader/README.md +2 -0
- package/docs/components/Stack/README.md +2 -0
- package/docs/components/Text/README.md +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@vokality/design-system`. The package follows [semantic versioning](https://semver.org); see CONTRIBUTING.md for what counts as breaking.
|
|
4
4
|
|
|
5
|
+
## 1.3.0 — 2026-10-14
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Opt-in compact application density through `data-density="compact"` on `html`: smaller heading and data scales, aligned page actions, consistent control heights and touch targets. Existing defaults are unchanged.
|
|
9
|
+
- `Fieldset` groups related controls with a native legend, group hint and error.
|
|
10
|
+
- `Button variant="text"` for sentence-case record actions with multiline labels and system focus/target behavior.
|
|
11
|
+
- `Badge` status icons, forwarded refs and standard attributes for keyboard-accessible tooltips.
|
|
12
|
+
- `Text` numeric typography, wrapping and weight options. Layout primitives and Text forward standard attributes and events.
|
|
13
|
+
|
|
14
|
+
## 1.2.3 — 2026-10-12
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Complete the first public npm release through the configured GitHub Actions trusted publisher. This validates the publisher's repository identity after the initial 1.2.2 publication. Component behavior, exports, tokens and font files are unchanged.
|
|
18
|
+
|
|
5
19
|
## 1.2.2 — 2026-10-12
|
|
6
20
|
|
|
7
21
|
### Changed
|
package/README.md
CHANGED
|
@@ -86,6 +86,12 @@ const { theme, resolvedTheme, setTheme } = useTheme(); // theme: "system" | "dar
|
|
|
86
86
|
|
|
87
87
|
Pages not rendered by React can inline `themeScript()` instead. See `docs/components/ThemeScript/README.md`.
|
|
88
88
|
|
|
89
|
+
## Compact applications
|
|
90
|
+
|
|
91
|
+
Set `<html data-density="compact">` for dense operational interfaces. It uses 20px page titles, 16px section titles, 14px body and input text, 12px metadata and 24px statistics. Page-header actions align with the title; headers leave section spacing to `Stack` instead of adding another margin. Buttons and fields share a 32px height with a fine pointer and retain 44px targets when a coarse pointer is available. Apply density to `html` so portalled dialogs and menus inherit it. Omitting the attribute preserves the existing defaults.
|
|
92
|
+
|
|
93
|
+
Compose pages with `Stack`, `Inline` and `Grid`; these forward standard attributes and events, including `Inline as="form" onSubmit={...}`. Use `Fieldset` for related controls, `Button variant="text"` for record names, and `Text numeric wrap="anywhere"` for long identifiers.
|
|
94
|
+
|
|
89
95
|
## Starting a new project
|
|
90
96
|
|
|
91
97
|
[`Vokality/app-template`](https://github.com/Vokality/app-template) is a Next.js app already set up with this package: `.npmrc`, CSS imports, theme switching, the app shell, sample pages, CI and Dependabot. On GitHub, choose **Use this template**.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import type { IconName } from "../../lib/icons.js";
|
|
2
3
|
/** Outlined uppercase status tag. */
|
|
3
|
-
export interface BadgeProps {
|
|
4
|
+
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
5
|
children: ReactNode;
|
|
5
6
|
tone?: "neutral" | "info" | "success" | "warning" | "danger";
|
|
6
|
-
|
|
7
|
+
/** Status icon beside its visible label. */
|
|
8
|
+
icon?: IconName;
|
|
7
9
|
}
|
|
8
10
|
/** Outlined uppercase status tag. */
|
|
9
|
-
export declare
|
|
11
|
+
export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
2
3
|
import { cx } from "../../lib/cx.js";
|
|
4
|
+
import { Icon } from "../Icon/Icon.js";
|
|
3
5
|
/** Outlined uppercase status tag. */
|
|
4
|
-
export function Badge({ children, tone, className }) {
|
|
5
|
-
return
|
|
6
|
-
}
|
|
6
|
+
export const Badge = forwardRef(function Badge({ children, tone, icon, className, ...rest }, ref) {
|
|
7
|
+
return _jsxs("span", { ref: ref, className: cx("vk-badge", tone && "vk-badge-" + tone, icon && "vk-badge-icon", className), ...rest, children: [icon ? _jsx(Icon, { name: icon, size: 14 }) : null, children] });
|
|
8
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type ReactNode } from "react";
|
|
2
2
|
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement> & AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
3
|
-
|
|
3
|
+
/** Visual emphasis; text keeps record names in sentence case. */
|
|
4
|
+
variant?: 'primary' | 'outline' | 'ghost' | 'danger' | 'text';
|
|
4
5
|
size?: 'sm';
|
|
5
6
|
href?: string;
|
|
6
7
|
/** Disables the button, sets aria-busy and shows a spinner. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FieldsetHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
|
|
3
|
+
/** Accessible name for a related group of controls. */
|
|
4
|
+
legend: ReactNode;
|
|
5
|
+
/** Instructions applying to the entire group. */
|
|
6
|
+
hint?: ReactNode;
|
|
7
|
+
/** Validation message applying to the entire group. */
|
|
8
|
+
error?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/** Groups related controls with a native legend and shared instructions. */
|
|
11
|
+
export declare const Fieldset: import("react").ForwardRefExoticComponent<FieldsetProps & import("react").RefAttributes<HTMLFieldSetElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { useUid } from "../../internal/useUid.js";
|
|
5
|
+
import { cx } from "../../lib/cx.js";
|
|
6
|
+
/** Groups related controls with a native legend and shared instructions. */
|
|
7
|
+
export const Fieldset = forwardRef(function Fieldset({ legend, hint, error, children, className, id, "aria-describedby": describedBy, ...rest }, ref) {
|
|
8
|
+
const uid = useUid("vk-fieldset");
|
|
9
|
+
const groupId = id || uid;
|
|
10
|
+
const descriptions = [describedBy, hint ? groupId + "-hint" : null, error ? groupId + "-error" : null].filter(Boolean).join(" ") || undefined;
|
|
11
|
+
return (_jsxs("fieldset", { ref: ref, id: groupId, className: cx("vk-fieldset", className), "aria-describedby": descriptions, "aria-invalid": error ? true : undefined, ...rest, children: [_jsx("legend", { className: "vk-fieldset-legend", children: legend }), hint ? _jsx("p", { className: "vk-fieldset-hint", id: groupId + "-hint", children: hint }) : null, _jsx("div", { className: "vk-fieldset-controls", children: children }), error ? _jsx("p", { className: "vk-fieldset-error", id: groupId + "-error", children: error }) : null] }));
|
|
12
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from "react";
|
|
1
|
+
import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
import type { AsProp, SpaceStep } from "../../types.js";
|
|
3
|
-
export interface GridProps extends AsProp {
|
|
3
|
+
export interface GridProps extends AsProp, HTMLAttributes<Element> {
|
|
4
4
|
columns?: number;
|
|
5
5
|
min?: string;
|
|
6
6
|
gap?: SpaceStep | string;
|
|
@@ -9,4 +9,4 @@ export interface GridProps extends AsProp {
|
|
|
9
9
|
style?: CSSProperties;
|
|
10
10
|
}
|
|
11
11
|
/** A responsive grid: a fixed number of columns, or as many columns of at least `min` width as fit. */
|
|
12
|
-
export declare function Grid({ as, columns, min, gap, children, className, style }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function Grid({ as, columns, min, gap, children, className, style, ...rest }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,9 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cx } from "../../lib/cx.js";
|
|
3
3
|
import { space } from "../../lib/space.js";
|
|
4
4
|
/** A responsive grid: a fixed number of columns, or as many columns of at least `min` width as fit. */
|
|
5
|
-
export function Grid({ as, columns, min, gap, children, className, style }) {
|
|
5
|
+
export function Grid({ as, columns, min, gap, children, className, style, ...rest }) {
|
|
6
6
|
const Tag = as || "div";
|
|
7
7
|
const fixed = typeof columns === "number";
|
|
8
8
|
const template = fixed ? "repeat(" + columns + ", minmax(0, 1fr))" : "repeat(auto-fit, minmax(min(" + (min || "16rem") + ", 100%), 1fr))";
|
|
9
|
-
return _jsx(Tag, { className: cx("vk-layout-grid", fixed ? "vk-layout-grid-fixed" : null, className), style: { gap: space(gap, "lg"), gridTemplateColumns: template, ...style }, children: children });
|
|
9
|
+
return _jsx(Tag, { className: cx("vk-layout-grid", fixed ? "vk-layout-grid-fixed" : null, className), style: { gap: space(gap, "lg"), gridTemplateColumns: template, ...style }, ...rest, children: children });
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from "react";
|
|
1
|
+
import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
import type { AsProp, SpaceStep } from "../../types.js";
|
|
3
|
-
export interface InlineProps extends AsProp {
|
|
3
|
+
export interface InlineProps extends AsProp, HTMLAttributes<Element> {
|
|
4
4
|
gap?: SpaceStep | string;
|
|
5
5
|
align?: CSSProperties['alignItems'];
|
|
6
6
|
justify?: CSSProperties['justifyContent'];
|
|
@@ -10,4 +10,4 @@ export interface InlineProps extends AsProp {
|
|
|
10
10
|
style?: CSSProperties;
|
|
11
11
|
}
|
|
12
12
|
/** Lays children out in a row that wraps, with one gap. */
|
|
13
|
-
export declare function Inline({ as, gap, align, justify, wrap, children, className, style }: InlineProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function Inline({ as, gap, align, justify, wrap, children, className, style, ...rest }: InlineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cx } from "../../lib/cx.js";
|
|
3
3
|
import { space } from "../../lib/space.js";
|
|
4
4
|
/** Lays children out in a row that wraps, with one gap. */
|
|
5
|
-
export function Inline({ as, gap, align, justify, wrap, children, className, style }) {
|
|
5
|
+
export function Inline({ as, gap, align, justify, wrap, children, className, style, ...rest }) {
|
|
6
6
|
const Tag = as || "div";
|
|
7
|
-
return (_jsx(Tag, { className: cx("vk-layout-inline", className), style: { gap: space(gap, "sm"), alignItems: align || "center", justifyContent: justify, flexWrap: wrap === false ? "nowrap" : "wrap", ...style }, children: children }));
|
|
7
|
+
return (_jsx(Tag, { className: cx("vk-layout-inline", className), style: { gap: space(gap, "sm"), alignItems: align || "center", justifyContent: justify, flexWrap: wrap === false ? "nowrap" : "wrap", ...style }, ...rest, children: children }));
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from "react";
|
|
1
|
+
import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
import type { AsProp, SpaceStep } from "../../types.js";
|
|
3
|
-
export interface StackProps extends AsProp {
|
|
3
|
+
export interface StackProps extends AsProp, HTMLAttributes<Element> {
|
|
4
4
|
gap?: SpaceStep | string;
|
|
5
5
|
align?: CSSProperties['alignItems'];
|
|
6
6
|
children?: ReactNode;
|
|
@@ -8,4 +8,4 @@ export interface StackProps extends AsProp {
|
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
}
|
|
10
10
|
/** Lays children out vertically with one gap from the spacing scale. */
|
|
11
|
-
export declare function Stack({ as, gap, align, children, className, style }: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function Stack({ as, gap, align, children, className, style, ...rest }: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cx } from "../../lib/cx.js";
|
|
3
3
|
import { space } from "../../lib/space.js";
|
|
4
4
|
/** Lays children out vertically with one gap from the spacing scale. */
|
|
5
|
-
export function Stack({ as, gap, align, children, className, style }) {
|
|
5
|
+
export function Stack({ as, gap, align, children, className, style, ...rest }) {
|
|
6
6
|
const Tag = as || "div";
|
|
7
|
-
return _jsx(Tag, { className: cx("vk-layout-stack", className), style: { gap: space(gap, "md"), alignItems: align, ...style }, children: children });
|
|
7
|
+
return _jsx(Tag, { className: cx("vk-layout-stack", className), style: { gap: space(gap, "md"), alignItems: align, ...style }, ...rest, children: children });
|
|
8
8
|
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
import type { AsProp } from "../../types.js";
|
|
3
|
-
export interface TextProps extends AsProp {
|
|
3
|
+
export interface TextProps extends AsProp, HTMLAttributes<Element> {
|
|
4
4
|
size?: string;
|
|
5
5
|
tone?: "muted" | "subtle" | "primary" | "danger" | "success";
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
|
|
7
|
+
/** Space Grotesk with tabular figures for numbers, codes and identifiers. */
|
|
8
|
+
numeric?: boolean;
|
|
9
|
+
/** Allow long identifiers to wrap without widening their container. */
|
|
10
|
+
wrap?: "normal" | "anywhere";
|
|
11
|
+
/** Keep one line and show an ellipsis when the available width is exhausted. */
|
|
12
|
+
truncate?: boolean;
|
|
13
|
+
/** Emphasis independent of the selected type size. */
|
|
14
|
+
weight?: "regular" | "medium" | "semibold" | "bold";
|
|
8
15
|
}
|
|
9
16
|
/** Running text in one of the system's text styles and tones. */
|
|
10
|
-
export declare function Text({ as, size, tone, children, className }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function Text({ as, size, tone, numeric, wrap, truncate, weight, children, className, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from "../../lib/cx.js";
|
|
3
3
|
/** Running text in one of the system's text styles and tones. */
|
|
4
|
-
export function Text({ as, size, tone, children, className }) {
|
|
4
|
+
export function Text({ as, size, tone, numeric, wrap, truncate, weight, children, className, ...rest }) {
|
|
5
5
|
const Tag = as || "p";
|
|
6
|
-
return _jsx(Tag, { className: cx("vk-text", "vk-text-" + (size || "body"), tone && "vk-tone-" + tone, className), children: children });
|
|
6
|
+
return _jsx(Tag, { className: cx("vk-text", "vk-text-" + (size || "body"), tone && "vk-tone-" + tone, numeric && "vk-text-numeric", wrap === "anywhere" && "vk-text-wrap-anywhere", truncate && "vk-text-truncate", weight && "vk-weight-" + weight, className), ...rest, children: children });
|
|
7
7
|
}
|
package/dist/components.css
CHANGED
|
@@ -100,6 +100,25 @@ body {
|
|
|
100
100
|
.vk-btn { width: 100%; justify-content: space-between; }
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
/* A named record can be an action without adopting an uppercase action label. */
|
|
104
|
+
.vk-btn-text {
|
|
105
|
+
width: auto;
|
|
106
|
+
min-height: var(--button-height-sm);
|
|
107
|
+
justify-content: flex-start;
|
|
108
|
+
font-size: var(--text-sm);
|
|
109
|
+
font-weight: 500;
|
|
110
|
+
letter-spacing: normal;
|
|
111
|
+
text-transform: none;
|
|
112
|
+
text-align: left;
|
|
113
|
+
color: var(--foreground);
|
|
114
|
+
background: transparent;
|
|
115
|
+
border: 1px solid transparent;
|
|
116
|
+
}
|
|
117
|
+
.vk-btn-text .vk-btn-label, .vk-btn-text .vk-btn-label:only-child { padding: var(--space-xs) 0; }
|
|
118
|
+
.vk-btn-text:hover { color: var(--primary); text-decoration: underline; text-underline-offset: var(--space-xs); }
|
|
119
|
+
.vk-btn-text:disabled { cursor: not-allowed; opacity: 0.5; }
|
|
120
|
+
@media (any-pointer: coarse) { .vk-btn-text { min-height: var(--control-height); } }
|
|
121
|
+
|
|
103
122
|
/* Square glyph */
|
|
104
123
|
@keyframes vk-glyph-blink {
|
|
105
124
|
0%, 72%, 100% { opacity: 1; filter: brightness(1); }
|
|
@@ -344,6 +363,11 @@ body {
|
|
|
344
363
|
color: var(--primary);
|
|
345
364
|
}
|
|
346
365
|
|
|
366
|
+
.vk-badge-icon { gap: var(--space-xs); }
|
|
367
|
+
.vk-badge[tabindex] { box-sizing: border-box; min-height: var(--button-height-sm); }
|
|
368
|
+
.vk-badge:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
|
|
369
|
+
@media (any-pointer: coarse) { .vk-badge[tabindex] { min-height: var(--control-height); } }
|
|
370
|
+
|
|
347
371
|
/* Quote */
|
|
348
372
|
.vk-quote {
|
|
349
373
|
position: relative;
|
|
@@ -593,6 +617,12 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
593
617
|
.vk-select-option[aria-disabled="true"] .vk-select-option-description { color: var(--muted-subtle); }
|
|
594
618
|
.vk-field-error { margin: 0; font-size: var(--text-sm); color: var(--primary-hover); }
|
|
595
619
|
|
|
620
|
+
.vk-fieldset { min-width: 0; margin: 0; padding: var(--space-md); border: 1px solid var(--border-subtle); }
|
|
621
|
+
.vk-fieldset-legend { padding-inline: var(--space-xs); font-size: var(--text-xs); font-weight: 600; color: var(--foreground); }
|
|
622
|
+
.vk-fieldset-controls { display: grid; gap: var(--space-sm); }
|
|
623
|
+
.vk-fieldset-hint, .vk-fieldset-error { margin: 0; font-size: var(--text-sm); color: var(--muted-foreground); }
|
|
624
|
+
.vk-fieldset-hint { margin-bottom: var(--space-sm); }
|
|
625
|
+
.vk-fieldset-error { margin-top: var(--space-sm); color: var(--danger); }
|
|
596
626
|
/* Select (Radix Select, popper position). The shared .vk-select-* rules live in styles/fields.css;
|
|
597
627
|
these cover the Radix parts: state comes from data-state, data-highlighted and data-disabled,
|
|
598
628
|
and the list is portalled and placed by Radix's popper wrapper. */
|
|
@@ -1697,6 +1727,13 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1697
1727
|
/* Typography */
|
|
1698
1728
|
.vk-heading { margin: 0; color: var(--foreground); text-wrap: balance; }
|
|
1699
1729
|
.vk-text { margin: 0; color: var(--foreground); }
|
|
1730
|
+
.vk-text-numeric { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }
|
|
1731
|
+
.vk-text-wrap-anywhere { overflow-wrap: anywhere; min-width: 0; }
|
|
1732
|
+
.vk-text-truncate { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1733
|
+
.vk-weight-regular { font-weight: 400; }
|
|
1734
|
+
.vk-weight-medium { font-weight: 500; }
|
|
1735
|
+
.vk-weight-semibold { font-weight: 600; }
|
|
1736
|
+
.vk-weight-bold { font-weight: 700; }
|
|
1700
1737
|
.vk-tone-muted { color: var(--muted-foreground); }
|
|
1701
1738
|
.vk-tone-subtle { color: var(--muted-subtle); }
|
|
1702
1739
|
.vk-tone-primary { color: var(--primary); }
|
|
@@ -1759,6 +1796,66 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1759
1796
|
.vk-cmd-item-active { background: var(--primary-tint); }
|
|
1760
1797
|
.vk-cmd-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; padding: 0.55rem 0.85rem; font-size: 0.75rem; color: var(--muted-subtle); border-top: 1px solid var(--border-subtle); }
|
|
1761
1798
|
|
|
1799
|
+
/* Opt in on html so portalled controls use the same density as their triggers. */
|
|
1800
|
+
html[data-density="compact"] { --density-control-height: var(--control-height); }
|
|
1801
|
+
html[data-density="compact"] body { font-size: var(--text-sm); }
|
|
1802
|
+
[data-density="compact"] .vk-page-header { container-type: inline-size; gap: var(--space-sm); padding-block: 0; }
|
|
1803
|
+
[data-density="compact"] .vk-page-header-divider { padding-bottom: var(--space-md); margin-bottom: 0; }
|
|
1804
|
+
[data-density="compact"] .vk-page-header-row { display: grid; grid-template-columns: minmax(min-content, 1fr) minmax(0, auto); align-items: center; gap: var(--space-xs) var(--space-md); }
|
|
1805
|
+
[data-density="compact"] .vk-page-header-text { display: contents; }
|
|
1806
|
+
[data-density="compact"] .vk-page-header-title { grid-column: 1; grid-row: 1; }
|
|
1807
|
+
[data-density="compact"] .vk-page-header-description { grid-column: 1; grid-row: 2; max-width: var(--prose-max); }
|
|
1808
|
+
[data-density="compact"] .vk-page-header-actions { grid-column: 2; grid-row: 1; min-width: 0; }
|
|
1809
|
+
[data-density="compact"] .vk-page-header-eyebrow { grid-column: 1; grid-row: 1; }
|
|
1810
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-title,
|
|
1811
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-actions { grid-row: 2; }
|
|
1812
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-description { grid-row: 3; }
|
|
1813
|
+
[data-density="compact"] .vk-page-header-title, [data-density="compact"] .vk-text-heading-1 { font-size: var(--text-xl); line-height: 1.3; }
|
|
1814
|
+
[data-density="compact"] .vk-page-header-description, [data-density="compact"] .vk-text-body, [data-density="compact"] .vk-input { font-size: var(--text-sm); }
|
|
1815
|
+
[data-density="compact"] .vk-section-header { margin-bottom: 0; }
|
|
1816
|
+
[data-density="compact"] .vk-section-heading, [data-density="compact"] .vk-text-heading-2, [data-density="compact"] .vk-text-title, [data-density="compact"] .vk-text-title-sm { font-size: var(--text-base); line-height: 1.4; }
|
|
1817
|
+
[data-density="compact"] .vk-section-heading { font-weight: 600; text-transform: none; letter-spacing: normal; }
|
|
1818
|
+
[data-density="compact"] .vk-text-meta { font-size: var(--text-xs); }
|
|
1819
|
+
[data-density="compact"] .vk-stat-value { font-size: var(--text-2xl); }
|
|
1820
|
+
[data-density="compact"] .vk-shell-main { padding: var(--space-lg); }
|
|
1821
|
+
[data-density="compact"] .vk-shell-topbar > .vk-icon-btn { flex-shrink: 0; }
|
|
1822
|
+
[data-density="compact"] .vk-shell-brand { flex: 1 1 auto; }
|
|
1823
|
+
[data-density="compact"] .vk-shell-brand > * { min-width: 0; max-width: 100%; }
|
|
1824
|
+
[data-density="compact"] .vk-shell-actions { flex: 0 1 auto; min-width: 0; }
|
|
1825
|
+
[data-density="compact"] .vk-shell-actions > * { min-width: 0; max-width: 100%; }
|
|
1826
|
+
[data-density="compact"] .vk-shell-actions .vk-btn { width: auto; min-width: 0; }
|
|
1827
|
+
[data-density="compact"] .vk-shell-actions .vk-btn-label { display: block; min-width: 0; align-self: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1828
|
+
[data-density="compact"] .vk-dialog-title { font-size: var(--text-base); }
|
|
1829
|
+
[data-density="compact"] .vk-accordion-trigger { font-size: var(--text-sm); padding-block: var(--space-sm); }
|
|
1830
|
+
[data-density="compact"] .vk-input { min-height: var(--density-control-height); padding-block: var(--space-xs); line-height: 1.4; }
|
|
1831
|
+
[data-density="compact"] .vk-affix-row { min-height: var(--density-control-height); }
|
|
1832
|
+
[data-density="compact"] .vk-affix-row > .vk-input { min-height: 0; }
|
|
1833
|
+
[data-density="compact"] .vk-btn { min-height: var(--density-control-height); font-size: var(--text-xs); }
|
|
1834
|
+
[data-density="compact"] .vk-btn-text { font-size: var(--text-sm); }
|
|
1835
|
+
[data-density="compact"] .vk-btn .vk-btn-label { padding: var(--space-xs) var(--space-sm); }
|
|
1836
|
+
[data-density="compact"] .vk-btn-text .vk-btn-label { padding-inline: 0; }
|
|
1837
|
+
[data-density="compact"] .vk-icon-btn { width: var(--density-control-height); height: var(--density-control-height); }
|
|
1838
|
+
[data-density="compact"] .vk-search-icon, [data-density="compact"] .vk-select-icon, [data-density="compact"] .vk-field-clear { top: calc(var(--density-control-height) / 2); }
|
|
1839
|
+
[data-density="compact"] .vk-field-clear { width: var(--density-control-height); height: var(--density-control-height); right: 0; }
|
|
1840
|
+
[data-density="compact"] .vk-badge[tabindex] { min-height: var(--density-control-height); }
|
|
1841
|
+
[data-density="compact"] .vk-segmented { min-width: 0; max-width: 100%; align-self: flex-start; }
|
|
1842
|
+
[data-density="compact"] .vk-segment { min-width: 0; min-height: var(--density-control-height); padding: var(--space-xs) var(--space-sm); font-size: var(--text-sm); overflow-wrap: anywhere; }
|
|
1843
|
+
@container (max-width: 40rem) {
|
|
1844
|
+
[data-density="compact"] .vk-page-header-row { grid-template-columns: minmax(0, 1fr); }
|
|
1845
|
+
[data-density="compact"] .vk-page-header-row .vk-page-header-actions { grid-column: 1; grid-row: auto; margin-top: var(--space-xs); }
|
|
1846
|
+
}
|
|
1847
|
+
@media (max-width: 48rem) {
|
|
1848
|
+
[data-density="compact"] .vk-shell-actions { max-width: 45%; }
|
|
1849
|
+
}
|
|
1850
|
+
@media (pointer: fine) {
|
|
1851
|
+
html[data-density="compact"] { --density-control-height: var(--button-height-sm); }
|
|
1852
|
+
}
|
|
1853
|
+
@media (any-pointer: coarse) {
|
|
1854
|
+
html[data-density="compact"] { --density-control-height: var(--control-height); }
|
|
1855
|
+
[data-density="compact"] .vk-search-input, [data-density="compact"] .vk-date-input { padding-right: calc(var(--density-control-height) + var(--space-xs)); }
|
|
1856
|
+
[data-density="compact"] .vk-choice { min-height: var(--control-height); align-items: center; }
|
|
1857
|
+
[data-density="compact"] .vk-choice-box, [data-density="compact"] .vk-switch-track { margin-top: 0; }
|
|
1858
|
+
}
|
|
1762
1859
|
/* Windows high-contrast (forced colors): restore state that relied on fills */
|
|
1763
1860
|
@media (forced-colors: active) {
|
|
1764
1861
|
.vk-choice .vk-choice-box:is([data-state="checked"], [data-state="indeterminate"]),
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export { Avatar } from "./components/Avatar/Avatar.js";
|
|
|
35
35
|
export type * from "./components/Avatar/Avatar.js";
|
|
36
36
|
export { Field } from "./components/Field/Field.js";
|
|
37
37
|
export type * from "./components/Field/Field.js";
|
|
38
|
+
export { Fieldset } from "./components/Fieldset/Fieldset.js";
|
|
39
|
+
export type * from "./components/Fieldset/Fieldset.js";
|
|
38
40
|
export { Input } from "./components/Input/Input.js";
|
|
39
41
|
export type * from "./components/Input/Input.js";
|
|
40
42
|
export { Textarea } from "./components/Textarea/Textarea.js";
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export { IconButton } from "./components/IconButton/IconButton.js";
|
|
|
19
19
|
export { Link } from "./components/Link/Link.js";
|
|
20
20
|
export { Avatar } from "./components/Avatar/Avatar.js";
|
|
21
21
|
export { Field } from "./components/Field/Field.js";
|
|
22
|
+
export { Fieldset } from "./components/Fieldset/Fieldset.js";
|
|
22
23
|
export { Input } from "./components/Input/Input.js";
|
|
23
24
|
export { Textarea } from "./components/Textarea/Textarea.js";
|
|
24
25
|
export { Select } from "./components/Select/Select.js";
|
package/dist/vokality.css
CHANGED
|
@@ -441,6 +441,25 @@ body {
|
|
|
441
441
|
.vk-btn { width: 100%; justify-content: space-between; }
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
+
/* A named record can be an action without adopting an uppercase action label. */
|
|
445
|
+
.vk-btn-text {
|
|
446
|
+
width: auto;
|
|
447
|
+
min-height: var(--button-height-sm);
|
|
448
|
+
justify-content: flex-start;
|
|
449
|
+
font-size: var(--text-sm);
|
|
450
|
+
font-weight: 500;
|
|
451
|
+
letter-spacing: normal;
|
|
452
|
+
text-transform: none;
|
|
453
|
+
text-align: left;
|
|
454
|
+
color: var(--foreground);
|
|
455
|
+
background: transparent;
|
|
456
|
+
border: 1px solid transparent;
|
|
457
|
+
}
|
|
458
|
+
.vk-btn-text .vk-btn-label, .vk-btn-text .vk-btn-label:only-child { padding: var(--space-xs) 0; }
|
|
459
|
+
.vk-btn-text:hover { color: var(--primary); text-decoration: underline; text-underline-offset: var(--space-xs); }
|
|
460
|
+
.vk-btn-text:disabled { cursor: not-allowed; opacity: 0.5; }
|
|
461
|
+
@media (any-pointer: coarse) { .vk-btn-text { min-height: var(--control-height); } }
|
|
462
|
+
|
|
444
463
|
/* Square glyph */
|
|
445
464
|
@keyframes vk-glyph-blink {
|
|
446
465
|
0%, 72%, 100% { opacity: 1; filter: brightness(1); }
|
|
@@ -685,6 +704,11 @@ body {
|
|
|
685
704
|
color: var(--primary);
|
|
686
705
|
}
|
|
687
706
|
|
|
707
|
+
.vk-badge-icon { gap: var(--space-xs); }
|
|
708
|
+
.vk-badge[tabindex] { box-sizing: border-box; min-height: var(--button-height-sm); }
|
|
709
|
+
.vk-badge:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
|
|
710
|
+
@media (any-pointer: coarse) { .vk-badge[tabindex] { min-height: var(--control-height); } }
|
|
711
|
+
|
|
688
712
|
/* Quote */
|
|
689
713
|
.vk-quote {
|
|
690
714
|
position: relative;
|
|
@@ -934,6 +958,12 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
934
958
|
.vk-select-option[aria-disabled="true"] .vk-select-option-description { color: var(--muted-subtle); }
|
|
935
959
|
.vk-field-error { margin: 0; font-size: var(--text-sm); color: var(--primary-hover); }
|
|
936
960
|
|
|
961
|
+
.vk-fieldset { min-width: 0; margin: 0; padding: var(--space-md); border: 1px solid var(--border-subtle); }
|
|
962
|
+
.vk-fieldset-legend { padding-inline: var(--space-xs); font-size: var(--text-xs); font-weight: 600; color: var(--foreground); }
|
|
963
|
+
.vk-fieldset-controls { display: grid; gap: var(--space-sm); }
|
|
964
|
+
.vk-fieldset-hint, .vk-fieldset-error { margin: 0; font-size: var(--text-sm); color: var(--muted-foreground); }
|
|
965
|
+
.vk-fieldset-hint { margin-bottom: var(--space-sm); }
|
|
966
|
+
.vk-fieldset-error { margin-top: var(--space-sm); color: var(--danger); }
|
|
937
967
|
/* Select (Radix Select, popper position). The shared .vk-select-* rules live in styles/fields.css;
|
|
938
968
|
these cover the Radix parts: state comes from data-state, data-highlighted and data-disabled,
|
|
939
969
|
and the list is portalled and placed by Radix's popper wrapper. */
|
|
@@ -2038,6 +2068,13 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
2038
2068
|
/* Typography */
|
|
2039
2069
|
.vk-heading { margin: 0; color: var(--foreground); text-wrap: balance; }
|
|
2040
2070
|
.vk-text { margin: 0; color: var(--foreground); }
|
|
2071
|
+
.vk-text-numeric { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }
|
|
2072
|
+
.vk-text-wrap-anywhere { overflow-wrap: anywhere; min-width: 0; }
|
|
2073
|
+
.vk-text-truncate { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2074
|
+
.vk-weight-regular { font-weight: 400; }
|
|
2075
|
+
.vk-weight-medium { font-weight: 500; }
|
|
2076
|
+
.vk-weight-semibold { font-weight: 600; }
|
|
2077
|
+
.vk-weight-bold { font-weight: 700; }
|
|
2041
2078
|
.vk-tone-muted { color: var(--muted-foreground); }
|
|
2042
2079
|
.vk-tone-subtle { color: var(--muted-subtle); }
|
|
2043
2080
|
.vk-tone-primary { color: var(--primary); }
|
|
@@ -2100,6 +2137,66 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
2100
2137
|
.vk-cmd-item-active { background: var(--primary-tint); }
|
|
2101
2138
|
.vk-cmd-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; padding: 0.55rem 0.85rem; font-size: 0.75rem; color: var(--muted-subtle); border-top: 1px solid var(--border-subtle); }
|
|
2102
2139
|
|
|
2140
|
+
/* Opt in on html so portalled controls use the same density as their triggers. */
|
|
2141
|
+
html[data-density="compact"] { --density-control-height: var(--control-height); }
|
|
2142
|
+
html[data-density="compact"] body { font-size: var(--text-sm); }
|
|
2143
|
+
[data-density="compact"] .vk-page-header { container-type: inline-size; gap: var(--space-sm); padding-block: 0; }
|
|
2144
|
+
[data-density="compact"] .vk-page-header-divider { padding-bottom: var(--space-md); margin-bottom: 0; }
|
|
2145
|
+
[data-density="compact"] .vk-page-header-row { display: grid; grid-template-columns: minmax(min-content, 1fr) minmax(0, auto); align-items: center; gap: var(--space-xs) var(--space-md); }
|
|
2146
|
+
[data-density="compact"] .vk-page-header-text { display: contents; }
|
|
2147
|
+
[data-density="compact"] .vk-page-header-title { grid-column: 1; grid-row: 1; }
|
|
2148
|
+
[data-density="compact"] .vk-page-header-description { grid-column: 1; grid-row: 2; max-width: var(--prose-max); }
|
|
2149
|
+
[data-density="compact"] .vk-page-header-actions { grid-column: 2; grid-row: 1; min-width: 0; }
|
|
2150
|
+
[data-density="compact"] .vk-page-header-eyebrow { grid-column: 1; grid-row: 1; }
|
|
2151
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-title,
|
|
2152
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-actions { grid-row: 2; }
|
|
2153
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-description { grid-row: 3; }
|
|
2154
|
+
[data-density="compact"] .vk-page-header-title, [data-density="compact"] .vk-text-heading-1 { font-size: var(--text-xl); line-height: 1.3; }
|
|
2155
|
+
[data-density="compact"] .vk-page-header-description, [data-density="compact"] .vk-text-body, [data-density="compact"] .vk-input { font-size: var(--text-sm); }
|
|
2156
|
+
[data-density="compact"] .vk-section-header { margin-bottom: 0; }
|
|
2157
|
+
[data-density="compact"] .vk-section-heading, [data-density="compact"] .vk-text-heading-2, [data-density="compact"] .vk-text-title, [data-density="compact"] .vk-text-title-sm { font-size: var(--text-base); line-height: 1.4; }
|
|
2158
|
+
[data-density="compact"] .vk-section-heading { font-weight: 600; text-transform: none; letter-spacing: normal; }
|
|
2159
|
+
[data-density="compact"] .vk-text-meta { font-size: var(--text-xs); }
|
|
2160
|
+
[data-density="compact"] .vk-stat-value { font-size: var(--text-2xl); }
|
|
2161
|
+
[data-density="compact"] .vk-shell-main { padding: var(--space-lg); }
|
|
2162
|
+
[data-density="compact"] .vk-shell-topbar > .vk-icon-btn { flex-shrink: 0; }
|
|
2163
|
+
[data-density="compact"] .vk-shell-brand { flex: 1 1 auto; }
|
|
2164
|
+
[data-density="compact"] .vk-shell-brand > * { min-width: 0; max-width: 100%; }
|
|
2165
|
+
[data-density="compact"] .vk-shell-actions { flex: 0 1 auto; min-width: 0; }
|
|
2166
|
+
[data-density="compact"] .vk-shell-actions > * { min-width: 0; max-width: 100%; }
|
|
2167
|
+
[data-density="compact"] .vk-shell-actions .vk-btn { width: auto; min-width: 0; }
|
|
2168
|
+
[data-density="compact"] .vk-shell-actions .vk-btn-label { display: block; min-width: 0; align-self: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2169
|
+
[data-density="compact"] .vk-dialog-title { font-size: var(--text-base); }
|
|
2170
|
+
[data-density="compact"] .vk-accordion-trigger { font-size: var(--text-sm); padding-block: var(--space-sm); }
|
|
2171
|
+
[data-density="compact"] .vk-input { min-height: var(--density-control-height); padding-block: var(--space-xs); line-height: 1.4; }
|
|
2172
|
+
[data-density="compact"] .vk-affix-row { min-height: var(--density-control-height); }
|
|
2173
|
+
[data-density="compact"] .vk-affix-row > .vk-input { min-height: 0; }
|
|
2174
|
+
[data-density="compact"] .vk-btn { min-height: var(--density-control-height); font-size: var(--text-xs); }
|
|
2175
|
+
[data-density="compact"] .vk-btn-text { font-size: var(--text-sm); }
|
|
2176
|
+
[data-density="compact"] .vk-btn .vk-btn-label { padding: var(--space-xs) var(--space-sm); }
|
|
2177
|
+
[data-density="compact"] .vk-btn-text .vk-btn-label { padding-inline: 0; }
|
|
2178
|
+
[data-density="compact"] .vk-icon-btn { width: var(--density-control-height); height: var(--density-control-height); }
|
|
2179
|
+
[data-density="compact"] .vk-search-icon, [data-density="compact"] .vk-select-icon, [data-density="compact"] .vk-field-clear { top: calc(var(--density-control-height) / 2); }
|
|
2180
|
+
[data-density="compact"] .vk-field-clear { width: var(--density-control-height); height: var(--density-control-height); right: 0; }
|
|
2181
|
+
[data-density="compact"] .vk-badge[tabindex] { min-height: var(--density-control-height); }
|
|
2182
|
+
[data-density="compact"] .vk-segmented { min-width: 0; max-width: 100%; align-self: flex-start; }
|
|
2183
|
+
[data-density="compact"] .vk-segment { min-width: 0; min-height: var(--density-control-height); padding: var(--space-xs) var(--space-sm); font-size: var(--text-sm); overflow-wrap: anywhere; }
|
|
2184
|
+
@container (max-width: 40rem) {
|
|
2185
|
+
[data-density="compact"] .vk-page-header-row { grid-template-columns: minmax(0, 1fr); }
|
|
2186
|
+
[data-density="compact"] .vk-page-header-row .vk-page-header-actions { grid-column: 1; grid-row: auto; margin-top: var(--space-xs); }
|
|
2187
|
+
}
|
|
2188
|
+
@media (max-width: 48rem) {
|
|
2189
|
+
[data-density="compact"] .vk-shell-actions { max-width: 45%; }
|
|
2190
|
+
}
|
|
2191
|
+
@media (pointer: fine) {
|
|
2192
|
+
html[data-density="compact"] { --density-control-height: var(--button-height-sm); }
|
|
2193
|
+
}
|
|
2194
|
+
@media (any-pointer: coarse) {
|
|
2195
|
+
html[data-density="compact"] { --density-control-height: var(--control-height); }
|
|
2196
|
+
[data-density="compact"] .vk-search-input, [data-density="compact"] .vk-date-input { padding-right: calc(var(--density-control-height) + var(--space-xs)); }
|
|
2197
|
+
[data-density="compact"] .vk-choice { min-height: var(--control-height); align-items: center; }
|
|
2198
|
+
[data-density="compact"] .vk-choice-box, [data-density="compact"] .vk-switch-track { margin-top: 0; }
|
|
2199
|
+
}
|
|
2103
2200
|
/* Windows high-contrast (forced colors): restore state that relied on fills */
|
|
2104
2201
|
@media (forced-colors: active) {
|
|
2105
2202
|
.vk-choice .vk-choice-box:is([data-state="checked"], [data-state="indeterminate"]),
|