Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/add-mdx-content-components.md

This file was deleted.

28 changes: 14 additions & 14 deletions docs/references/built-ins/field.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -245,20 +245,20 @@ For objects nested deeper than two levels, consider linking to a dedicated refer

## Field props

| Prop | Type | Required | Default | Description |
| -------------- | ----------- | -------- | ------- | ---------------------------------------------------------------- |
| `name` | `string` | yes | --- | Field name, rendered in monospace bold |
| `type` | `string` | no | --- | Type annotation shown as a pill badge |
| `required` | `boolean` | no | `false` | Shows a "required" badge instead of "optional" |
| `deprecated` | `boolean` | no | `false` | Shows a "deprecated" badge and strikes through the name |
| `defaultValue` | `string` | no | --- | Default value displayed below the header row |
| `children` | `ReactNode` | yes | --- | Description text and optional nested FieldGroup |
| Prop | Type | Required | Default | Description |
| -------------- | ----------- | -------- | ------- | ------------------------------------------------------- |
| `name` | `string` | yes | --- | Field name, rendered in monospace bold |
| `type` | `string` | no | --- | Type annotation shown as a pill badge |
| `required` | `boolean` | no | `false` | Shows a "required" badge instead of "optional" |
| `deprecated` | `boolean` | no | `false` | Shows a "deprecated" badge and strikes through the name |
| `defaultValue` | `string` | no | --- | Default value displayed below the header row |
| `children` | `ReactNode` | yes | --- | Description text and optional nested FieldGroup |

## FieldGroup props

| Prop | Type | Required | Default | Description |
| ------------- | ----------- | -------- | ------- | ---------------------------------------------------------- |
| `title` | `string` | yes | --- | Group label displayed as a header or collapsible trigger |
| `expandable` | `boolean` | no | `false` | Renders as a collapsible section with a toggle trigger |
| `defaultOpen` | `boolean` | no | `false` | Initial expanded state when `expandable` is true |
| `children` | `ReactNode` | yes | --- | Field children to display within the group |
| Prop | Type | Required | Default | Description |
| ------------- | ----------- | -------- | ------- | -------------------------------------------------------- |
| `title` | `string` | yes | --- | Group label displayed as a header or collapsible trigger |
| `expandable` | `boolean` | no | `false` | Renders as a collapsible section with a toggle trigger |
| `defaultOpen` | `boolean` | no | `false` | Initial expanded state when `expandable` is true |
| `children` | `ReactNode` | yes | --- | Field children to display within the group |
7 changes: 7 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @zpress/cli

## 0.8.4

### Patch Changes

- Updated dependencies [4c04f9d]
- @zpress/ui@0.9.0

## 0.8.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zpress/cli",
"version": "0.8.3",
"version": "0.8.4",
"description": "CLI for building and serving zpress documentation sites",
"keywords": [
"cli",
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @zpress/ui

## 0.9.0

### Minor Changes

- 4c04f9d: Add MDX content components for doc-platform parity: Accordion, AccordionGroup, Columns, Column, StatusBadge, Frame, Tooltip, Prompt, and Color. Reorganize theme barrel with public API sections and @internal annotations on framework exports.

## 0.8.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zpress/ui",
"version": "0.8.13",
"version": "0.9.0",
"description": "Rspress plugin, theme components, and styles for zpress",
"keywords": [
"react",
Expand Down
6 changes: 5 additions & 1 deletion packages/ui/src/theme/components/shared/field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ export function FieldGroup({
children,
}: FieldGroupProps): React.ReactElement {
return match(expandable)
.with(true, () => <ExpandableFieldGroup title={title} defaultOpen={defaultOpen}>{children}</ExpandableFieldGroup>)
.with(true, () => (
<ExpandableFieldGroup title={title} defaultOpen={defaultOpen}>
{children}
</ExpandableFieldGroup>
))
.otherwise(() => (
<div className="zp-field-group">
<div className="zp-field-group__title">{title}</div>
Expand Down
8 changes: 8 additions & 0 deletions packages/zpress/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @zpress/kit

## 0.2.20

### Patch Changes

- Updated dependencies [4c04f9d]
- @zpress/ui@0.9.0
- @zpress/cli@0.8.4

## 0.2.19

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/zpress/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zpress/kit",
"version": "0.2.19",
"version": "0.2.20",
"description": "Documentation framework powered by Rspress with a config-driven information architecture",
"keywords": [
"docs",
Expand Down