@llmnative/react 1.18.0 → 1.19.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.
@@ -337,6 +337,13 @@ export interface ThemeConfig {
337
337
  wrapperClassName?: string;
338
338
  className?: string;
339
339
  };
340
+ DescriptionList?: {
341
+ wrapperClassName?: string;
342
+ className?: string;
343
+ itemClassName?: string;
344
+ labelClassName?: string;
345
+ valueClassName?: string;
346
+ };
340
347
  Tab?: {
341
348
  wrapperClassName?: string;
342
349
  className?: string;
@@ -15,6 +15,8 @@ export type { ProviderSwitcherProps, ProviderSwitcherItem } from './blocks/Provi
15
15
  export { default as Alert } from './ui/Alert';
16
16
  export type { AlertProps } from './ui/Alert';
17
17
  export { default as Badge } from './ui/Badge';
18
+ export { default as DescriptionList } from './ui/DescriptionList';
19
+ export type { DescriptionListItem, DescriptionListLayout, DescriptionListColumns, DescriptionListProps } from './ui/DescriptionList';
18
20
  export * from './ui/Badge';
19
21
  export * from './ui/Buttons';
20
22
  export { default as Card } from './ui/Card';
@@ -0,0 +1,38 @@
1
+ import React from "react";
2
+ /** One label → value pair of a `<DescriptionList>`. */
3
+ export interface DescriptionListItem {
4
+ /** Stable React key; defaults to the label when it is a string, otherwise the index. */
5
+ key?: string;
6
+ label: React.ReactNode;
7
+ /** `null`, `undefined` and `''` render as the list's `emptyValue`. */
8
+ value?: React.ReactNode;
9
+ /** Tooltip for the value; defaults to the value itself when it is a string and `truncate` is on. */
10
+ title?: string;
11
+ }
12
+ export type DescriptionListLayout = "horizontal" | "stacked";
13
+ export type DescriptionListColumns = 1 | 2 | 3 | 4 | 5 | 6;
14
+ export interface DescriptionListProps {
15
+ items: readonly DescriptionListItem[];
16
+ /** `"horizontal"` (default): label column on the left, stacked on small screens.
17
+ * `"stacked"`: label above its value, laid out in `columns`. */
18
+ layout?: DescriptionListLayout;
19
+ /** Stacked layout only: number of columns from the `lg` breakpoint (1–6, default 1). */
20
+ columns?: DescriptionListColumns;
21
+ /** Horizontal layout only: width of the label column (any CSS length, default `"12rem"`). */
22
+ labelWidth?: string;
23
+ /** Shown for empty values (default `"—"`). */
24
+ emptyValue?: React.ReactNode;
25
+ /** Keep each value on one line with an ellipsis. */
26
+ truncate?: boolean;
27
+ wrapperClassName?: string;
28
+ className?: string;
29
+ itemClassName?: string;
30
+ labelClassName?: string;
31
+ valueClassName?: string;
32
+ }
33
+ /**
34
+ * Read-only label → value pairs (profile data, a record's facts, summaries), rendered as a
35
+ * semantic `<dl>`. Use it instead of hand-written `<dl>`/`<dt>`/`<dd>` markup; for editable data use
36
+ * `<Form>` fields, for many records use `<Table>` or `<Grid>`.
37
+ */
38
+ export default function DescriptionList({ items, layout, columns, labelWidth, emptyValue, truncate, wrapperClassName, className, itemClassName, labelClassName, valueClassName, }: DescriptionListProps): React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/react",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "LLM-native React framework for deterministic UI generation. Data-driven by default, schema-driven optional. Ultra-low token consumption — built for AI agents, not just humans.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",