@vokality/design-system 5.1.2 → 6.0.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 +7 -0
- package/README.md +22 -1
- package/dist/appearance.d.ts +6 -0
- package/dist/appearance.js +1 -0
- package/dist/chat.d.ts +3 -1
- package/dist/components/Accordion/Accordion.d.ts +9 -6
- package/dist/components/Accordion/Accordion.js +4 -8
- package/dist/components/AppShell/AppShell.js +1 -1
- package/dist/components/Badge/Badge.d.ts +5 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Button/Button.d.ts +11 -10
- package/dist/components/Button/Button.js +6 -14
- package/dist/components/ChatPanel/transcript.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Combobox/Combobox.d.ts +3 -0
- package/dist/components/Combobox/Combobox.js +3 -3
- package/dist/components/Combobox/ListPanel.d.ts +3 -1
- package/dist/components/Combobox/ListPanel.js +2 -2
- package/dist/components/Container/Container.d.ts +7 -4
- package/dist/components/Container/Container.js +3 -4
- package/dist/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/components/DatePicker/DatePicker.js +3 -3
- package/dist/components/Dialog/Dialog.d.ts +2 -4
- package/dist/components/Dialog/Dialog.js +2 -3
- package/dist/components/Grid/Grid.d.ts +3 -3
- package/dist/components/Heading/Heading.d.ts +14 -9
- package/dist/components/Heading/Heading.js +6 -5
- package/dist/components/IconButton/IconButton.d.ts +7 -7
- package/dist/components/IconButton/IconButton.js +2 -10
- package/dist/components/Inline/Inline.d.ts +2 -2
- package/dist/components/Input/Input.d.ts +6 -1
- package/dist/components/Input/Input.js +3 -3
- package/dist/components/Link/Link.d.ts +18 -3
- package/dist/components/Link/Link.js +7 -7
- package/dist/components/Menu/Menu.d.ts +27 -8
- package/dist/components/Menu/Menu.js +6 -11
- package/dist/components/MultiSelect/MultiSelect.d.ts +3 -0
- package/dist/components/MultiSelect/MultiSelect.js +3 -3
- package/dist/components/OtpInput/OtpInput.d.ts +16 -15
- package/dist/components/OtpInput/OtpInput.js +10 -8
- package/dist/components/PageHeader/PageHeader.d.ts +2 -2
- package/dist/components/PageHeader/PageHeader.js +2 -2
- package/dist/components/Popover/Popover.d.ts +16 -7
- package/dist/components/Popover/Popover.js +4 -3
- package/dist/components/Progress/Progress.d.ts +10 -10
- package/dist/components/Progress/Progress.js +8 -12
- package/dist/components/Prose/Prose.d.ts +4 -3
- package/dist/components/Prose/Prose.js +2 -2
- package/dist/components/Radio/Radio.d.ts +3 -3
- package/dist/components/Radio/Radio.js +4 -3
- package/dist/components/RadioGroup/RadioGroup.d.ts +7 -2
- package/dist/components/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/SearchInput/SearchInput.d.ts +6 -1
- package/dist/components/SearchInput/SearchInput.js +2 -2
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +8 -8
- package/dist/components/SegmentedControl/SegmentedControl.js +4 -3
- package/dist/components/Select/Select.d.ts +4 -9
- package/dist/components/Select/Select.js +2 -7
- package/dist/components/Slider/Slider.d.ts +26 -19
- package/dist/components/Slider/Slider.js +20 -25
- package/dist/components/Sparkline/Sparkline.d.ts +2 -2
- package/dist/components/Sparkline/Sparkline.js +3 -3
- package/dist/components/Stack/Stack.d.ts +2 -2
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Tabs/Tabs.d.ts +11 -9
- package/dist/components/Tabs/Tabs.js +5 -5
- package/dist/components/Text/Text.d.ts +12 -5
- package/dist/components/Text/Text.js +3 -3
- package/dist/components/Textarea/Textarea.d.ts +2 -0
- package/dist/components/Textarea/Textarea.js +3 -3
- package/dist/components/TimePicker/TimePicker.d.ts +2 -0
- package/dist/components/TimePicker/TimePicker.js +5 -5
- package/dist/components/Tooltip/Tooltip.d.ts +11 -6
- package/dist/components/Tooltip/Tooltip.js +5 -3
- package/dist/components.css +273 -129
- package/dist/internal/choice.d.ts +7 -2
- package/dist/internal/choice.js +4 -4
- package/dist/lib/space.d.ts +2 -1
- package/dist/lib/space.js +2 -6
- package/dist/tokens.css +2 -0
- package/dist/tokens.dtcg.json +10 -0
- package/dist/tokens.json +10 -0
- package/dist/types.d.ts +4 -3
- package/dist/typography.d.ts +8 -0
- package/dist/typography.js +34 -0
- package/dist/vokality.css +275 -129
- package/dist/vokality.iife.js +1945 -1863
- package/docs/brand.md +6 -2
- package/docs/components/Accordion/README.md +5 -2
- package/docs/components/Badge/README.md +2 -2
- package/docs/components/Button/README.md +15 -11
- package/docs/components/Checkbox/README.md +4 -0
- package/docs/components/Combobox/README.md +6 -0
- package/docs/components/Container/README.md +2 -1
- package/docs/components/DatePicker/README.md +6 -0
- package/docs/components/Dialog/README.md +2 -2
- package/docs/components/Grid/README.md +2 -1
- package/docs/components/Heading/README.md +4 -2
- package/docs/components/IconButton/README.md +7 -3
- package/docs/components/Inline/README.md +3 -3
- package/docs/components/Input/README.md +6 -0
- package/docs/components/Link/README.md +3 -1
- package/docs/components/Menu/README.md +7 -1
- package/docs/components/MultiSelect/README.md +8 -0
- package/docs/components/NumberInput/README.md +6 -0
- package/docs/components/OtpInput/README.md +10 -2
- package/docs/components/PageHeader/README.md +1 -1
- package/docs/components/PasswordInput/README.md +6 -0
- package/docs/components/Popover/README.md +6 -2
- package/docs/components/Progress/README.md +2 -2
- package/docs/components/Prose/README.md +1 -1
- package/docs/components/Radio/README.md +4 -0
- package/docs/components/RadioGroup/README.md +4 -0
- package/docs/components/SearchInput/README.md +6 -0
- package/docs/components/SegmentedControl/README.md +4 -1
- package/docs/components/Select/README.md +8 -3
- package/docs/components/Slider/README.md +13 -3
- package/docs/components/Sparkline/README.md +1 -1
- package/docs/components/Stack/README.md +1 -1
- package/docs/components/Switch/README.md +4 -0
- package/docs/components/Tabs/README.md +3 -1
- package/docs/components/Text/README.md +6 -3
- package/docs/components/Textarea/README.md +4 -0
- package/docs/components/ThemeProvider/README.md +1 -1
- package/docs/components/TimePicker/README.md +6 -0
- package/docs/components/Tooltip/README.md +4 -3
- package/package.json +9 -1
- package/skills/vokality-design-system/SKILL.md +1 -1
|
@@ -4,12 +4,15 @@ Use `numeric` for Space Grotesk with tabular figures, `overflowWrap="anywhere"`
|
|
|
4
4
|
|
|
5
5
|
Use `truncate` for a single line that ends in an ellipsis when its container narrows, such as the two lines of an app-shell brand. The full text remains available to assistive technology.
|
|
6
6
|
|
|
7
|
-
Running text in one of the system's
|
|
7
|
+
Running text in one of the system's typed typography recipes and semantic foreground colors.
|
|
8
8
|
|
|
9
9
|
## Props
|
|
10
|
-
- `size`: a
|
|
11
|
-
- `
|
|
10
|
+
- `size`: a typed token recipe (`body` default, `body-sm`, `body-lg`, `lead`, `small`, `meta`, `footnote` …).
|
|
11
|
+
- `color`: `neutral`, `primary`, `info`, `success`, `warning`, or `danger`; foreground colors follow the active theme.
|
|
12
|
+
- `emphasis`: `default`, `muted` (`muted-foreground`), or `subtle` (`muted-subtle`) for neutral copy. Semantic colors retain their named foreground when combined with emphasis.
|
|
12
13
|
- `as` (`p` default; `span`, `div`, `li`).
|
|
13
14
|
|
|
14
15
|
## Rules
|
|
15
16
|
- Body copy is `foreground` on app screens and `muted-foreground` in long marketing and docs text (use `Prose` there).
|
|
17
|
+
|
|
18
|
+
Typography types and the complete `TEXT_STYLES` list are available from `@vokality/design-system/typography`. For example: `<Text color="danger">Could not save</Text>` and `<Text emphasis="muted">Updated a moment ago</Text>`.
|
|
@@ -18,3 +18,7 @@ Identical to `Input`: focus adds a `primary` border and the 2px `ring` outline;
|
|
|
18
18
|
## Rules
|
|
19
19
|
- Render inside a `Field`. When there is a length limit, state it in the hint ("Up to 500 characters").
|
|
20
20
|
- Size the rows to the text you expect; let people resize rather than scrolling inside a tiny box.
|
|
21
|
+
|
|
22
|
+
## Sizes
|
|
23
|
+
|
|
24
|
+
`size="xs" | "sm" | "md"` controls text size and padding, using the same scale as other fields. `rows` and the 8rem minimum still determine the multiline height. On fine pointers, the text sizes are 12px, 14px and 16px. A coarse pointer keeps 16px field text. Omit `size` to follow the app's density.
|
|
@@ -28,7 +28,7 @@ import { SegmentedControl, useTheme } from "@vokality/design-system";
|
|
|
28
28
|
|
|
29
29
|
export function ThemeSwitch() {
|
|
30
30
|
const { theme, setTheme } = useTheme();
|
|
31
|
-
return <SegmentedControl label="Theme" value={theme}
|
|
31
|
+
return <SegmentedControl label="Theme" value={theme} onValueChange={(value) => { if (value === "system" || value === "dark" || value === "light" || value === "contrast") setTheme(value); }}
|
|
32
32
|
options={[{ value: "system", label: "System" }, { value: "dark", label: "Dark" }, { value: "light", label: "Light" }, { value: "contrast", label: "High contrast" }]} />;
|
|
33
33
|
}
|
|
34
34
|
```
|
|
@@ -17,3 +17,9 @@ Accepts `9`, `930`, `9:30`, `9.30`, `9:30pm`, `21:30`. On Enter or leaving the f
|
|
|
17
17
|
|
|
18
18
|
## Rules
|
|
19
19
|
- Pair with `DatePicker` for a date and time. Store times with their time zone elsewhere; this field holds a wall-clock time only.
|
|
20
|
+
|
|
21
|
+
## Sizes
|
|
22
|
+
|
|
23
|
+
`size="xs" | "sm" | "md"` uses the same scale as buttons and other fields: 24px, 32px or 44px minimum height on fine pointers, with 12px, 14px or 16px field text. A coarse pointer keeps 44px targets and 16px field text. Omit `size` to follow the app's density. Icons, add-ons and trailing controls follow the selected geometry.
|
|
24
|
+
|
|
25
|
+
The portalled option list carries the same size for its text and option spacing. Options with descriptions can grow beyond the minimum row height.
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
A short text label that appears on hover or keyboard focus, for an icon-only control or a term that needs a one-line explanation. Built on Radix Tooltip.
|
|
4
4
|
|
|
5
5
|
## Anatomy
|
|
6
|
-
Inverted for contrast: `foreground` fill with `background` text (14.6:1), 12px IBM Plex Sans 500, 0.35rem 0.55rem padding, square, at most 16rem wide. It sits 6px above the trigger (or below with `
|
|
6
|
+
Inverted for contrast: `foreground` fill with `background` text (14.6:1), 12px IBM Plex Sans 500, 0.35rem 0.55rem padding, square, at most 16rem wide. It sits 6px above the trigger (or below with `side="bottom"`), flips when there's no room, and is centered (or start-aligned with `align="start"`).
|
|
7
7
|
|
|
8
8
|
## Behaviour
|
|
9
|
-
- Appears 400ms after the pointer enters (`
|
|
9
|
+
- Appears 400ms after the pointer enters (`delayDuration`), immediately on keyboard focus.
|
|
10
10
|
- Disappears when the pointer leaves, focus moves, or Esc is pressed.
|
|
11
11
|
|
|
12
12
|
## Props
|
|
13
|
-
- `content`, `children` (exactly one focusable element; a custom component must forward its ref, as every component in the system does), `
|
|
13
|
+
- `content`, `children` (exactly one focusable element; a custom component must forward its ref, as every component in the system does), `side` (`top`, `right`, `bottom`, `left`), `align` (`start`, `center`, `end`), `delayDuration` (400ms), and all native Radix root props such as `open`, `defaultOpen`, `onOpenChange`, and `disableHoverableContent`.
|
|
14
|
+
- `contentProps` forwards native positioning, collision, event, accessibility and styling props to Radix Content. The forwarded ref targets its content `div`.
|
|
14
15
|
|
|
15
16
|
## Touch
|
|
16
17
|
Touch taps keep Radix Tooltip’s native behavior: they run the trigger action without opening a timed tooltip. `touchDuration` is removed. Nothing essential may live only in a tooltip.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vokality/design-system",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Vokality's design system: tokens, themes and React components for every Vokality project.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
@@ -42,6 +42,14 @@
|
|
|
42
42
|
"./chat-models": {
|
|
43
43
|
"types": "./dist/chat.d.ts",
|
|
44
44
|
"import": "./dist/chat.js"
|
|
45
|
+
},
|
|
46
|
+
"./appearance": {
|
|
47
|
+
"types": "./dist/appearance.d.ts",
|
|
48
|
+
"import": "./dist/appearance.js"
|
|
49
|
+
},
|
|
50
|
+
"./typography": {
|
|
51
|
+
"types": "./dist/typography.d.ts",
|
|
52
|
+
"import": "./dist/typography.js"
|
|
45
53
|
}
|
|
46
54
|
},
|
|
47
55
|
"files": [
|
|
@@ -23,7 +23,7 @@ Do not deep-import `src/` or `dist/`, invent props from another component librar
|
|
|
23
23
|
- Use the direct entrypoints `@vokality/design-system/localization`, `@vokality/design-system/rich-text`, `@vokality/design-system/chat-widget`, `@vokality/design-system/chat-inbox`, and `@vokality/design-system/chat-models` for those features. Keep type imports explicit. These features are not root exports.
|
|
24
24
|
- Use existing tokens such as `var(--background)`, `var(--foreground)`, `var(--primary)`, `var(--border-subtle)`, and `var(--space-lg)` for application CSS. Prefer component variants and layout props over overriding internal selectors. Corners are square, surfaces have thin outlines, and orange identifies the primary action or selection. Avoid decorative shadows and gradients.
|
|
25
25
|
- Write labels in sentence case; styles provide uppercase presentation. Use the supplied icons and accessible labels. User-authored emoji belong in rich text; interface copy follows the brand guide.
|
|
26
|
-
- Set theme and density once with [ThemeProvider](../../docs/components/ThemeProvider/README.md) at the top of `<body>` in the root layout (`density="compact"` for dense apps); never set `data-theme` or `data-density` yourself. Themes are `dark`, `light`, and `contrast`; switch them with `useTheme()`, which takes no options. Use `size="xs"` on `Button`, `IconButton`, `Menu`, `Popover` and `SegmentedControl` for actions in toolbars, record rows and status lines; fields
|
|
26
|
+
- Set theme and density once with [ThemeProvider](../../docs/components/ThemeProvider/README.md) at the top of `<body>` in the root layout (`density="compact"` for dense apps); never set `data-theme` or `data-density` yourself. Themes are `dark`, `light`, and `contrast`; switch them with `useTheme()`, which takes no options. Use `size="xs"` on `Button`, `IconButton`, `Menu`, `Popover` and `SegmentedControl` for actions in toolbars, record rows and status lines; fields accept the same explicit sizes. Use semantic `color` independently of `variant`, `Link` for navigation, and native Radix callbacks such as `onValueChange`. Typography `size` and layout `gap` accept token names; text hierarchy uses `emphasis`. Shared types live in the direct `/appearance` and `/typography` entrypoints.
|
|
27
27
|
- In Tailwind v4 applications, follow the README's stylesheet order and token mapping. Do not introduce Tailwind or replace the application's styling setup merely to use the package.
|
|
28
28
|
|
|
29
29
|
## Behavior, forms, and React
|