@vokality/design-system 6.0.1 → 6.1.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 +24 -0
- package/README.md +13 -4
- package/dist/appearance.d.ts +2 -2
- package/dist/components/ChatPanel/transcript.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components.css +475 -359
- package/dist/tailwind.css +3 -0
- package/dist/tokens.css +20 -3
- package/dist/tokens.dtcg.json +98 -13
- package/dist/tokens.json +99 -14
- package/dist/vokality.css +495 -362
- package/dist/vokality.iife.js +2 -1
- package/docs/brand.md +3 -3
- package/docs/components/Button/README.md +16 -15
- package/docs/components/ChatWidget/README.md +1 -1
- package/docs/components/Checkbox/README.md +1 -1
- package/docs/components/Combobox/README.md +1 -1
- package/docs/components/DatePicker/README.md +1 -1
- package/docs/components/IconButton/README.md +2 -2
- package/docs/components/Input/README.md +3 -3
- package/docs/components/Link/README.md +1 -1
- package/docs/components/Menu/README.md +1 -1
- package/docs/components/MultiSelect/README.md +1 -1
- package/docs/components/NumberInput/README.md +1 -1
- package/docs/components/OtpInput/README.md +1 -1
- package/docs/components/PasswordInput/README.md +1 -1
- package/docs/components/Popover/README.md +1 -1
- package/docs/components/Radio/README.md +1 -1
- package/docs/components/RadioGroup/README.md +1 -1
- package/docs/components/SearchInput/README.md +1 -1
- package/docs/components/SegmentedControl/README.md +2 -2
- package/docs/components/Select/README.md +2 -2
- package/docs/components/Switch/README.md +1 -1
- package/docs/components/Tag/README.md +1 -1
- package/docs/components/Textarea/README.md +2 -2
- package/docs/components/TimePicker/README.md +1 -1
- package/package.json +1 -1
- package/skills/vokality-design-system/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
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
|
+
## 6.1.0 — 2026-11-22
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Encoded 4-step control scale (`ControlSize = "xs" | "sm" | "md" | "lg"`) across all actions, form fields and choices: `24px`, `32px`, `36px` and `44px` on fine pointers, with `44px` targets and `16px` field text preserved on coarse pointers.
|
|
9
|
+
- Typography ramp tokens (`--text-3xs` 10px, `--text-2xs` 11px, `--text-compact` 13px), shared control tokens (`--control-height-lg`, `--control-label-font-size`, `--control-secondary-font-size`, `--control-padding-inline`, `--control-action-padding-inline`, `--control-gap`, `--control-icon-size`, `--control-choice-size`) and density rhythm tokens (`--density-pad-surface*`, `--density-cell-*`, `--density-gap*`) in `tokens/tokens.json`.
|
|
10
|
+
- Consistent typography pairing rule encoded across controls: sentence-case control text scales `12 / 13 / 14 / 16px`, uppercase tracked action labels sit two steps below (`10 / 11 / 12 / 13px`), and secondary control descriptions sit one step below (`11 / 12 / 13 / 14px`).
|
|
11
|
+
- `Link` `ActionSizes` story and updated `lg` size coverage across `Foundations/Sizes`, all sized component stories and component READMEs.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Unified default desktop control height to `md` (`36px`) across buttons, fields and choices, eliminating the `40px` button vs `44px` field mismatch.
|
|
15
|
+
- `density="compact"` now encodes a single 1-step downshift across controls (`md` 36px → `sm` 32px, identical to explicit `size="sm"`), typography, surfaces, tables, lists, navigation, overlays, charts, rich text and chat components.
|
|
16
|
+
- Replaced hardcoded font-size literals across component stylesheets with ramp and density tokens.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- `SegmentedControl` at `xs`/`sm` inside compact density no longer inherits oversized `14px` segment labels or padding.
|
|
20
|
+
- `Switch` checked thumb translation now stays symmetrically inset at every control size (`xs`, `sm`, `md`, `lg`), and `Checkbox`/`Radio`/`Switch` no longer jump from `14px` to `16px` when `size="md"` is set explicitly.
|
|
21
|
+
- Portalled `Menu` panels now inherit explicit `size` from their triggers, and trigger icons align cleanly via flex gap.
|
|
22
|
+
- `NumberInput` stepper buttons now scale from `--control-end-size` so digits remain visible in narrow `lg` fields.
|
|
23
|
+
|
|
24
|
+
## 6.0.2 — 2026-10-26
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- Chat messages render formatted React content with normal HTML whitespace, preventing Markdown renderer newline nodes from adding empty lines around paragraphs and list items. Plain message strings retain their line breaks, and preformatted code and read-only editors retain their own whitespace.
|
|
28
|
+
|
|
5
29
|
## 6.0.1 — 2026-10-26
|
|
6
30
|
|
|
7
31
|
### Fixed
|
package/README.md
CHANGED
|
@@ -85,11 +85,20 @@ const { theme, resolvedTheme, setTheme } = useTheme(); // theme: "system" | "dar
|
|
|
85
85
|
|
|
86
86
|
Pages not rendered by React can inline `themeScript()` instead. See `docs/components/ThemeProvider/README.md`.
|
|
87
87
|
|
|
88
|
-
##
|
|
88
|
+
## Sizes, density and typography
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
One 4-step control scale governs every action, form field and choice (`size="xs" | "sm" | "md" | "lg"`), pairing height, padding, icon size and typography through shared CSS tokens:
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
| Size | Fine-pointer height | Control text (sentence case) | Action label (UPPERCASE) | Secondary text | Padding (field / button) | Icon / choice box |
|
|
93
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
94
|
+
| `xs` | 24px | 12px (`--text-xs`) | 10px (`--text-3xs`, 0.10em) | 11px (`--text-2xs`) | 0×8px / 0×8px | 14px / 14px |
|
|
95
|
+
| `sm` *(compact default)* | 32px | 13px (`--text-compact`) | 11px (`--text-2xs`, 0.12em) | 12px (`--text-xs`) | 4×10px / 4×12px | 16px / 16px |
|
|
96
|
+
| `md` *(default density)* | 36px | 14px (`--text-sm`) | 12px (`--text-xs`, 0.14em) | 13px (`--text-compact`) | 6×12px / 6×16px | 16px / 18px |
|
|
97
|
+
| `lg` *(spacious & touch floor)* | 44px | 16px (`--text-base`) | 13px (`--text-compact`, 0.14em) | 14px (`--text-sm`) | 10×14px / 10×20px | 18px / 20px |
|
|
98
|
+
|
|
99
|
+
- **Typography pairing rule:** Uppercase tracked action labels (`Button`, `Menu`/`Popover` triggers, affix buttons) always sit two steps below sentence-case control text so optical weight matches; secondary control text (option descriptions, choice descriptions, add-ons) sits one step below control text. Every font size comes from the `tokens.json` ramp (`text-3xs` 10px, `text-2xs` 11px, `text-xs` 12px, `text-compact` 13px, `text-sm` 14px, `text-base` 16px…).
|
|
100
|
+
- **Density (`density="compact"` on `ThemeProvider`):** Encodes a single 1-step downshift across the entire system. Controls with omitted `size` shift from `md` (36px / 14px) to `sm` (32px / 13px) — identical to explicit `size="sm"` — and buttons and fields stay flush at the same height. Typography shifts one step down (20px page titles, 16px section/dialog/card titles, 14px body/prose, 13px UI rows/tables/lists, 12px secondary descriptions, 11px field labels, 24px stats, never enlarging smaller text or shrinking below 10px), and surface/cell/gap tokens (`--density-pad-surface*`, `--density-cell-*`, `--density-gap*`) tighten cards, dialogs, fieldsets, alerts, tables, lists, tabs, trees and navigation together. The provider sets `data-density="compact"` on `html` so portalled dialogs, menus and listboxes inherit it.
|
|
101
|
+
- **Explicit sizes & coarse pointers:** Explicit `size` always wins over density on the control and its portalled menu (`Select`, `Combobox`, `MultiSelect`, `TimePicker`, `Menu`). Whenever a coarse pointer is available, every control retains the `lg` 44px touch target and 16px field text (preventing iOS Safari focus zoom).
|
|
93
102
|
|
|
94
103
|
### Component APIs
|
|
95
104
|
|
|
@@ -104,7 +113,7 @@ Components preserve their underlying native HTML or Radix props, callbacks and r
|
|
|
104
113
|
<Badge color="success" variant="soft">Paid</Badge>
|
|
105
114
|
```
|
|
106
115
|
|
|
107
|
-
- `size` on actions, fields and choices is `xs`, `sm` or `
|
|
116
|
+
- `size` on actions, fields and choices is `xs`, `sm`, `md` or `lg`: 24px, 32px, 36px or 44px single-line control heights with fine pointers. Coarse pointers retain 44px targets and 16px field text. Omitted sizes follow application density (`md` in default density, `sm` in compact density); explicit sizes win over density.
|
|
108
117
|
- `color` selects `neutral`, `primary`, `info`, `success`, `warning` or `danger` from the active theme. `variant` selects the treatment: `solid`, `soft`, `outline`, `ghost` or `text`, with meaningful subsets per component. Labelled Menu triggers support `text`; icon-only triggers do not.
|
|
109
118
|
- Text and Heading accept token-backed typography `size` names, semantic `color`, and neutral `emphasis` (`default`, `muted`, `subtle`). Layout `gap` accepts spacing tokens; custom CSS belongs in `style`.
|
|
110
119
|
- Alert and toast `status` still communicates feedback meaning, including the icon and announcement behavior. Cosmetic color does not set validity or interaction state.
|
package/dist/appearance.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** Shared
|
|
2
|
-
export type ControlSize = "xs" | "sm" | "md";
|
|
1
|
+
/** Shared 4-step control scale across actions, fields and choices (xs 24px, sm 32px, md 36px, lg 44px on fine pointers; coarse pointers retain 44px). Omit size to follow application density (md default, sm compact). */
|
|
2
|
+
export type ControlSize = "xs" | "sm" | "md" | "lg";
|
|
3
3
|
/** Theme-aware semantic palettes. These describe appearance, independently of component state. */
|
|
4
4
|
export type SemanticColor = "neutral" | "primary" | "info" | "success" | "warning" | "danger";
|
|
5
5
|
/** Visual treatment, independently of the chosen semantic palette. */
|
|
@@ -19,7 +19,7 @@ function MessageDelivery({ message, onRetry }) {
|
|
|
19
19
|
return (_jsxs("div", { className: "vk-chat-delivery vk-chat-delivery-failed", children: [_jsx(Icon, { name: "circle-alert", size: 14 }), _jsx("span", { children: message.delivery.error || messages.chat.failed }), onRetry ? _jsx(Button, { type: "button", size: "sm", variant: "ghost", "aria-label": messages.chat.retryMessage(message.author.name), onClick: () => { onRetry(message.id); }, children: messages.chat.retry }) : null] }));
|
|
20
20
|
}
|
|
21
21
|
function MessageItem({ message, onRetry, reducedMotion }) {
|
|
22
|
-
return (_jsxs(m.li, { className: cx("vk-chat-message", "vk-chat-message-" + message.direction), initial: { opacity: 0, y: reducedMotion ? 0 : 4 }, animate: { opacity: 1, y: 0 }, transition: { duration: reducedMotion ? 0 : 0.16, ease: "easeOut" }, children: [_jsx("span", { className: "vk-chat-message-avatar", children: message.author.avatar || _jsx(Avatar, { name: message.author.name, size: 28, decorative: true }) }), _jsxs("div", { className: "vk-chat-message-body", children: [_jsxs("div", { className: "vk-chat-message-meta", children: [_jsx("span", { className: "vk-chat-message-author", children: message.author.name }), message.author.source ? _jsxs("span", { className: "vk-chat-message-source", children: [message.author.source.mark, message.author.source.label] }) : null, message.timestamp ? _jsx("span", { className: "vk-chat-message-time", children: message.timestamp }) : null] }), _jsx("div", { className: "vk-prose vk-chat-message-content", children: message.content }), _jsx(MessageDelivery, { message: message, onRetry: onRetry })] }), message.actions?.length ? _jsx("div", { className: "vk-chat-message-actions", children: message.actions.map((action) => _jsx(Button, { type: "button", size: "xs", variant: action.variant || "outline", color: action.color, disabled: action.disabled, onClick: action.onSelect, children: action.label }, action.id)) }) : null] }));
|
|
22
|
+
return (_jsxs(m.li, { className: cx("vk-chat-message", "vk-chat-message-" + message.direction), initial: { opacity: 0, y: reducedMotion ? 0 : 4 }, animate: { opacity: 1, y: 0 }, transition: { duration: reducedMotion ? 0 : 0.16, ease: "easeOut" }, children: [_jsx("span", { className: "vk-chat-message-avatar", children: message.author.avatar || _jsx(Avatar, { name: message.author.name, size: 28, decorative: true }) }), _jsxs("div", { className: "vk-chat-message-body", children: [_jsxs("div", { className: "vk-chat-message-meta", children: [_jsx("span", { className: "vk-chat-message-author", children: message.author.name }), message.author.source ? _jsxs("span", { className: "vk-chat-message-source", children: [message.author.source.mark, message.author.source.label] }) : null, message.timestamp ? _jsx("span", { className: "vk-chat-message-time", children: message.timestamp }) : null] }), _jsx("div", { className: cx("vk-prose vk-chat-message-content", typeof message.content === "string" && "vk-chat-message-text"), children: message.content }), _jsx(MessageDelivery, { message: message, onRetry: onRetry })] }), message.actions?.length ? _jsx("div", { className: "vk-chat-message-actions", children: message.actions.map((action) => _jsx(Button, { type: "button", size: "xs", variant: action.variant || "outline", color: action.color, disabled: action.disabled, onClick: action.onSelect, children: action.label }, action.id)) }) : null] }));
|
|
23
23
|
}
|
|
24
24
|
/** A native scrollable log of messages and agent runs. Follow new items only while the reader is near its end. */
|
|
25
25
|
export function ChatTranscript(props) {
|
|
@@ -13,5 +13,5 @@ export const Menu = forwardRef(function Menu({ items, label, icon, triggerLabel,
|
|
|
13
13
|
const iconOnly = label === undefined ? icon : undefined;
|
|
14
14
|
return (_jsx("div", { className: cx("vk-menu-root", className), children: _jsxs(Primitive.Root, { ...rootProps, children: [_jsx(Primitive.Trigger, { ...triggerProps, ref: ref, disabled: disabled, className: iconOnly ? "vk-icon-btn" : "vk-btn", "data-vk-size": size, "data-vk-color": color, "data-vk-variant": variant ?? (iconOnly ? "ghost" : "outline"), "aria-label": triggerProps?.["aria-label"] ?? (iconOnly ? triggerLabel || messages.moreActions : undefined), title: triggerProps?.title ?? (iconOnly ? triggerLabel || messages.moreActions : undefined), children: iconOnly
|
|
15
15
|
? _jsx(Icon, { name: iconOnly })
|
|
16
|
-
: _jsxs(_Fragment, { children: [_jsxs("span", { className: "vk-btn-label", children: [icon ? _jsx(Icon, { name: icon, size: 16, className: "vk-menu-trigger-icon" }) : null, label] }), _jsx("span", { className: "vk-btn-glyph", "aria-hidden": "true", children: _jsx(Icon, { name: "chevron-down", size: 14 }) })] }) }), _jsx(Primitive.Portal, { forceMount: contentProps?.forceMount, children: _jsx(Primitive.Content, { sideOffset: 4, collisionPadding: 8, ...contentProps, className: "vk-menu", side: side, align: align, children: _jsx(MenuEntries, { parts: Primitive, items: items }) }) })] }) }));
|
|
16
|
+
: _jsxs(_Fragment, { children: [_jsxs("span", { className: "vk-btn-label", children: [icon ? _jsx(Icon, { name: icon, size: 16, className: "vk-menu-trigger-icon" }) : null, label] }), _jsx("span", { className: "vk-btn-glyph", "aria-hidden": "true", children: _jsx(Icon, { name: "chevron-down", size: 14 }) })] }) }), _jsx(Primitive.Portal, { forceMount: contentProps?.forceMount, children: _jsx(Primitive.Content, { sideOffset: 4, collisionPadding: 8, ...contentProps, className: "vk-menu", "data-vk-size": size, side: side, align: align, children: _jsx(MenuEntries, { parts: Primitive, items: items }) }) })] }) }));
|
|
17
17
|
});
|