@slashsuite/ui-react 0.16.2 → 0.16.3

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.
@@ -52,7 +52,7 @@ import { CodeBlock } from "@slashsuite/ui-react";
52
52
 
53
53
  ### Props
54
54
  ### Code
55
- Inline code: mono, on a subtle inset background. It takes the surrounding text colour and size (a touch smaller, for the mono face). `lines={1}` keeps a long value (a hash, a path) on one line, cut with an ellipsis, and shows its whole text in a tooltip while it is cut; `breakWords` instead breaks a long unbroken value at the edge of its box, as `Text` does.
55
+ Inline code: mono, on a subtle inset background. It takes the surrounding text colour and size (a touch smaller, for the mono face, and never under 14px). `lines={1}` keeps a long value (a hash, a path) on one line, cut with an ellipsis, and shows its whole text in a tooltip while it is cut; `breakWords` instead breaks a long unbroken value at the edge of its box, as `Text` does.
56
56
  - breakWords: boolean (default false). Breaks a long unbroken value (a URL, a hash) at the edge of its box.
57
57
  - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
58
58
  - lines: 1. `1` keeps it on one line, cut with an ellipsis; while it is cut, its whole text shows in a tooltip.
package/dist/Code.d.ts CHANGED
@@ -2,7 +2,7 @@ import { type ReactElement, type ReactNode } from "react";
2
2
  import type { Passthrough } from "./props.js";
3
3
  /**
4
4
  * Inline code: mono, on a subtle inset background. It takes the surrounding text colour and size (a
5
- * touch smaller, for the mono face). `lines={1}` keeps a long value (a hash, a path) on one line,
5
+ * touch smaller, for the mono face, and never under 14px). `lines={1}` keeps a long value (a hash, a path) on one line,
6
6
  * cut with an ellipsis, and shows its whole text in a tooltip while it is cut; `breakWords` instead breaks a long unbroken
7
7
  * value at the edge of its box, as `Text` does.
8
8
  */
package/dist/Code.js CHANGED
@@ -5,12 +5,12 @@ import { layoutClass } from "./textBox.js";
5
5
  import { Truncated } from "./truncated.js";
6
6
  /**
7
7
  * Inline code: mono, on a subtle inset background. It takes the surrounding text colour and size (a
8
- * touch smaller, for the mono face). `lines={1}` keeps a long value (a hash, a path) on one line,
8
+ * touch smaller, for the mono face, and never under 14px). `lines={1}` keeps a long value (a hash, a path) on one line,
9
9
  * cut with an ellipsis, and shows its whole text in a tooltip while it is cut; `breakWords` instead breaks a long unbroken
10
10
  * value at the edge of its box, as `Text` does.
11
11
  */
12
12
  export function Code({ lines, breakWords = false, children, ...rest }) {
13
- const look = cx("rounded bg-slate-100 px-1 py-0.5 font-mono text-[0.9em]", layoutClass(undefined, lines), breakWords && "break-words");
13
+ const look = cx("rounded bg-slate-100 px-1 py-0.5 font-mono text-[length:max(0.9em,0.875rem)]", layoutClass(undefined, lines), breakWords && "break-words");
14
14
  if (lines === 1) {
15
15
  return (_jsx(Truncated, { as: "code", attrs: rest, text: plainText(children), className: look, children: children }));
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slashsuite/ui-react",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "description": "UISlash React components: primitives, typography roles and a safe Markdown renderer, written against Tailwind v4 utilities. Pair with a theme from @slashsuite/themes.",
5
5
  "keywords": [
6
6
  "components",