@kb.ui/react 0.13.0 → 0.14.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.
@@ -47,6 +47,7 @@ In truncated previews, detected links become interactive only after expansion. T
47
47
  - [Text and links](https://kbui.kcb.pro/storybook/?path=/story/components-copyabletext--rich-content): prose with literal highlights and native web links.
48
48
  - [References](https://kbui.kcb.pro/storybook/?path=/story/components-copyabletext--references): identifiers, URLs and invitation text.
49
49
  - [Inline](https://kbui.kcb.pro/storybook/?path=/story/components-copyabletext--inline): compact reference beside prose.
50
+ - [Copy sizes](https://kbui.kcb.pro/storybook/?path=/story/components-copyabletext--copy-sizes): `sm`, `md` and `lg` copy actions on the shared control scale.
50
51
  - [Long values](https://kbui.kcb.pro/storybook/?path=/story/components-copyabletext--long-value): expand and collapse a full-width wrapped value.
51
52
  - [Colors](https://kbui.kcb.pro/storybook/?path=/story/components-copyabletext--colors): six value tones with matching field tints.
52
53
  - [Copy feedback](https://kbui.kcb.pro/storybook/?path=/story/components-copyabletext--copy-feedback): pending, focus retention and success.
@@ -61,7 +62,8 @@ In truncated previews, detected links become interactive only after expansion. T
61
62
  | `children` | `ReactNode` | `value` | Optional display; exact value is shown on failure |
62
63
  | `label` | `string` | unset | Visible context above value; does not name the button |
63
64
  | `appearance` | `"field" \| "plain"` | `"field"` | Bordered field or inline treatment |
64
- | `size` | `"sm" \| "md"` | `"md"` | Density; default copy target follows button height token |
65
+ | `size` | `"sm" \| "md"` | `"md"` | Density of the field and the default copy action size |
66
+ | `copySize` | `"sm" \| "md" \| "lg"` | `size` | Copy action height on the shared control scale, so it lines up with a `Button` of the same size |
65
67
  | `mono` | `boolean` | `true` | Monospace value display |
66
68
  | `tone` | `CopyableTextTone` | `"neutral"` | `neutral`, `accent`, `info`, `success`, `warning` or `danger`; independent of copy state |
67
69
  | `truncate` | `boolean` | `false` | Single-line preview with explicit full-value disclosure |
@@ -86,6 +88,8 @@ In truncated previews, detected links become interactive only after expansion. T
86
88
 
87
89
  The root exposes `data-copy-state="idle|pending|copied|failed"`, appearance, size, tone, mono, expandable, expanded, truncate and disabled attributes. Pending sets `aria-disabled` on the button while preserving focus. The status region exists before interaction and is empty initially. Failure is both visible and announced; success has a visible button label and polite announcement.
88
90
 
91
+ The small copy action uses `--kb-button-height-sm`. The medium action uses `--kb-copyabletext-target-size`, which aliases `--kb-button-height-md` by default.
92
+
89
93
  Use `--kb-copyabletext-highlight-background` for marked text and `Link` tokens for navigation styling. Standalone CSS users also load `link.css` and `code.css` for detected links and syntax styling. Use `--kb-copyabletext-*` tokens for gap, padding, radius, border, background, neutral value color, target size and minimum copy width. `className` styles the root; `classNames` styles individual parts. Verify contrast and target sizes after overrides. Automated tests cover component behavior, browser keyboard activation and accessibility scans; screen-reader announcement quality remains a human verification task.
90
94
 
91
95
  ## Related components
@@ -26,6 +26,7 @@ export function Example() {
26
26
 
27
27
  - [Standalone toggle](https://kbui.kcb.pro/storybook/?path=/story/components-togglebutton--default) demonstrates native keyboard activation.
28
28
  - [Controlled state](https://kbui.kcb.pro/storybook/?path=/story/components-togglebutton--controlled) keeps the pressed state with the surrounding interface.
29
+ - [Sizes](https://kbui.kcb.pro/storybook/?path=/story/components-togglebutton--sizes) compares the `sm`, `md` and `lg` heights shared with `Button` and `Input`.
29
30
  - [Disabled and pressed](https://kbui.kcb.pro/storybook/?path=/story/components-togglebutton--disabled) shows a current state while preventing edits.
30
31
 
31
32
  ## Reference
@@ -37,6 +38,7 @@ export function Example() {
37
38
  | `defaultPressed` | `boolean` | `false` | Initial uncontrolled pressed state |
38
39
  | `onPressedChange` | `(pressed, eventDetails) => void` | | Receives the proposed state and Base UI change details |
39
40
  | `disabled` | `boolean` | `false` | Prevents interaction |
41
+ | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Height, padding, text and checkmark size from the shared control scale |
40
42
  | `value` | `string` | | Unique nonempty identifier within a `ToggleGroup` |
41
43
  | `aria-label` / `aria-labelledby` | `string` | | Accessible name when the button has no visible text |
42
44
  | `className` | `string` | | Extra class on the button |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kb.ui/react",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {