ab-nextjs-components 0.6.0 โ 0.7.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 +4 -0
- package/ab-props-table/index.tsx +187 -0
- package/ab-props-table/styles.module.css +96 -0
- package/index.ts +5 -0
- package/package.json +5 -3
- package/types/index.d.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [0.7.0](https://github.com/abraham-ukachi/ab-nextjs-components/compare/v0.6.0...v0.7.0) (2026-11-06)
|
|
2
|
+
|
|
3
|
+
* ๐ **AbPropsTable (server component):** accessible, responsive docs prop tables from build-time structured data. Export it from the package root or `ab-nextjs-components/ab-props-table`; row/default/column/label types are exported too. An omitted default (or `{ kind: 'none' }`) means "No default", `{ kind: 'unknown' }` is explicitly unknown, and `{ kind: 'value', value }` renders a code value. All input is escaped text: no introspection, evaluation or raw HTML. Configurable captions/labels/column order, required/deprecated annotations, one keyboard-scrollable region, wrapping long types and light/dark token fallbacks are included.
|
|
4
|
+
|
|
1
5
|
## [0.6.0](https://github.com/abraham-ukachi/ab-nextjs-components/compare/v0.5.0...v0.6.0) (2026-11-04)
|
|
2
6
|
|
|
3
7
|
* โ ๏ธ **Breaking: `html` is now `trustedHtml`** on AbCodeBlock, AbDemoCode and AbPreviewCode. The string goes into `dangerouslySetInnerHTML` **without sanitizing**, so pass only HTML you render yourself (e.g. Shiki `codeToHtml`), never user input. Prefer `highlighted` / children. Rename the prop to upgrade.
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @license MIT
|
|
3
|
+
* ~~~~~~~~~~~~
|
|
4
|
+
* ab-nextjs-components
|
|
5
|
+
* ~~~~~~~~~~~~
|
|
6
|
+
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* @project: ab-nextjs-components
|
|
27
|
+
* @name: AbPropsTable (unreleased docs props table)
|
|
28
|
+
* @file: ab-props-table/index.tsx
|
|
29
|
+
* @type: Server component (no hooks or browser APIs)
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*
|
|
32
|
+
* Example usage:
|
|
33
|
+
* 1+|> <AbPropsTable caption="AbButton props" rows={buildTimeRows} />
|
|
34
|
+
* 2+|> <AbPropsTable rows={[{ name: 'tone', type: "'soft' | 'solid'", default: { kind: 'value', value: "'soft'" } }]} />
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
39
|
+
* MOTTO: We'll always do more ๐!!!
|
|
40
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
// โ๏ธ React: plain elements only, so this entry stays safe in a React Server Component.
|
|
44
|
+
import { Fragment, type ReactElement } from 'react';
|
|
45
|
+
// ๐งต classes: let a docs page add layout without replacing the component's own classes.
|
|
46
|
+
import clsx from 'clsx';
|
|
47
|
+
// ๐จ styles: the table owns its width, wrapping, focus ring and scheme fallbacks.
|
|
48
|
+
import styles from './styles.module.css';
|
|
49
|
+
|
|
50
|
+
/** โ No default was declared: visually a dash, with useful text for screen readers. */
|
|
51
|
+
export interface AbPropsTableDefaultNone {
|
|
52
|
+
kind: 'none';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** โ Extraction could not establish a default: never confuse this with no default. */
|
|
56
|
+
export interface AbPropsTableDefaultUnknown {
|
|
57
|
+
kind: 'unknown';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** โ
A known default, already serialized as text by the build-time extraction step. */
|
|
61
|
+
export interface AbPropsTableDefaultValue {
|
|
62
|
+
kind: 'value';
|
|
63
|
+
value: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** ๐ All three extraction outcomes, with no runtime TypeScript inspection involved. */
|
|
67
|
+
export type AbPropsTableDefault = AbPropsTableDefaultNone | AbPropsTableDefaultUnknown | AbPropsTableDefaultValue;
|
|
68
|
+
|
|
69
|
+
/** ๐ค The four stable column ids; `columns` can reorder or omit any of them. */
|
|
70
|
+
export type AbPropsTableColumn = 'name' | 'type' | 'default' | 'description';
|
|
71
|
+
|
|
72
|
+
/** ๐ Visible column headings and accessible status text can be localized at the call site. */
|
|
73
|
+
export interface AbPropsTableLabels {
|
|
74
|
+
name: string;
|
|
75
|
+
type: string;
|
|
76
|
+
default: string;
|
|
77
|
+
description: string;
|
|
78
|
+
required: string;
|
|
79
|
+
deprecated: string;
|
|
80
|
+
noDefault: string;
|
|
81
|
+
unknownDefault: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** ๐งพ One build-time-extracted prop. JSX/HTML-looking strings always remain ordinary text. */
|
|
85
|
+
export interface AbPropsTableRow {
|
|
86
|
+
name: string;
|
|
87
|
+
type: string;
|
|
88
|
+
default?: AbPropsTableDefault; // โ omitted means "no default"; use kind: 'unknown' when that is not known.
|
|
89
|
+
description?: string;
|
|
90
|
+
required?: boolean;
|
|
91
|
+
deprecated?: boolean | string; // ๐ชฆ true gives a generic notice; a string carries migration guidance.
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** โ๏ธ Public component props. There is deliberately no raw HTML or runtime compiler input. */
|
|
95
|
+
export interface AbPropsTableProps {
|
|
96
|
+
rows: readonly AbPropsTableRow[]; // ๐๏ธ structured data generated during documentation builds.
|
|
97
|
+
caption?: string; // ๐ท๏ธ a visible table caption.
|
|
98
|
+
label?: string; // โฟ names both the scroll region and the caption when `caption` is absent.
|
|
99
|
+
labels?: Partial<AbPropsTableLabels>; // ๐ partial overrides; English defaults fill the rest.
|
|
100
|
+
className?: string;
|
|
101
|
+
columns?: readonly AbPropsTableColumn[]; // ๐งฉ optional order/visibility; an empty array gets the default columns.
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** ๐ท๏ธ Stable English defaults, shared by every render (including SSR). */
|
|
105
|
+
export const AB_PROPS_TABLE_DEFAULT_LABELS: Readonly<AbPropsTableLabels> = {
|
|
106
|
+
name: 'Name',
|
|
107
|
+
type: 'Type',
|
|
108
|
+
default: 'Default',
|
|
109
|
+
description: 'Description',
|
|
110
|
+
required: 'Required',
|
|
111
|
+
deprecated: 'Deprecated',
|
|
112
|
+
noDefault: 'No default',
|
|
113
|
+
unknownDefault: 'unknown',
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const AB_PROPS_TABLE_COLUMNS: readonly AbPropsTableColumn[] = ['name', 'type', 'default', 'description'];
|
|
117
|
+
|
|
118
|
+
/** ๐ชฆ The required/deprecated details live with the prop name, not in an extra inaccessible column. */
|
|
119
|
+
function AbPropsTableNameCell({ row, labels }: { row: AbPropsTableRow; labels: AbPropsTableLabels }): ReactElement {
|
|
120
|
+
return (
|
|
121
|
+
<th scope="row" className={styles.abPropsTableName}>
|
|
122
|
+
<code translate="no">{row.name}</code>
|
|
123
|
+
{row.required && <span className={styles.abPropsTableRequired}>{labels.required}</span>}
|
|
124
|
+
{row.deprecated != null && row.deprecated !== false && (
|
|
125
|
+
<span className={styles.abPropsTableDeprecated} data-deprecated="true">
|
|
126
|
+
{labels.deprecated}{typeof row.deprecated === 'string' ? `: ${row.deprecated}` : ''}
|
|
127
|
+
</span>
|
|
128
|
+
)}
|
|
129
|
+
</th>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** ๐งฑ Keep React, not a string template, responsible for escaping every value. */
|
|
134
|
+
const AbPropsTable = ({ rows, caption, label, labels: overrides, className, columns }: AbPropsTableProps): ReactElement => {
|
|
135
|
+
const labels = { ...AB_PROPS_TABLE_DEFAULT_LABELS, ...overrides }; // ๐ only replace supplied labels.
|
|
136
|
+
const visibleColumns = columns?.length ? columns : AB_PROPS_TABLE_COLUMNS; // ๐ an empty list cannot make a headerless table.
|
|
137
|
+
const accessibleLabel = label ?? caption ?? 'Component props'; // โฟ a useful region name even with no visible caption.
|
|
138
|
+
const visibleCaption = caption != null; // ๐ a custom caption is visible; fallback names remain visually hidden.
|
|
139
|
+
|
|
140
|
+
/** ๐ A cell renderer keeps column ordering in one place without eval or dynamic HTML. */
|
|
141
|
+
const renderCell = (column: AbPropsTableColumn, row: AbPropsTableRow): ReactElement | null => {
|
|
142
|
+
switch (column) {
|
|
143
|
+
case 'name':
|
|
144
|
+
return <AbPropsTableNameCell row={row} labels={labels} />;
|
|
145
|
+
case 'type':
|
|
146
|
+
return <td className={styles.abPropsTableCode}><code translate="no">{row.type}</code></td>;
|
|
147
|
+
case 'default': {
|
|
148
|
+
const value = row.default ?? { kind: 'none' as const }; // โ absence is an explicit rendering decision.
|
|
149
|
+
if (value.kind === 'unknown') return <td className={styles.abPropsTableUnknown}>{labels.unknownDefault}</td>;
|
|
150
|
+
if (value.kind === 'value') return <td className={styles.abPropsTableCode}><code translate="no">{value.value}</code></td>;
|
|
151
|
+
return <td className={styles.abPropsTableNone}><span aria-hidden="true">โ</span><span className={styles.srOnly}>{labels.noDefault}</span></td>;
|
|
152
|
+
}
|
|
153
|
+
case 'description':
|
|
154
|
+
return <td className={styles.abPropsTableDescription}>{row.description}</td>;
|
|
155
|
+
default:
|
|
156
|
+
return null; // ๐ forward-compatible runtime guard; TypeScript limits calls to the four ids above.
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<div
|
|
162
|
+
className={clsx('AbPropsTable', 'ab-prose-none', styles.abPropsTable, className)}
|
|
163
|
+
data-ab-part="props-table"
|
|
164
|
+
role="region"
|
|
165
|
+
aria-label={accessibleLabel}
|
|
166
|
+
tabIndex={0} // โจ๏ธ the only tab stop: focused overflow regions respond to native arrow-key scrolling.
|
|
167
|
+
>
|
|
168
|
+
<table className={styles.abPropsTableGrid}>
|
|
169
|
+
<caption className={visibleCaption ? styles.abPropsTableCaption : styles.srOnly}>{caption ?? accessibleLabel}</caption>
|
|
170
|
+
<thead>
|
|
171
|
+
<tr>{visibleColumns.map((column) => <th key={column} scope="col" data-column={column}>{labels[column]}</th>)}</tr>
|
|
172
|
+
</thead>
|
|
173
|
+
<tbody>
|
|
174
|
+
{rows.map((row, index) => (
|
|
175
|
+
<tr key={`${row.name}-${index}`} data-required={row.required || undefined} data-deprecated={row.deprecated ? true : undefined}>
|
|
176
|
+
{visibleColumns.map((column) => <Fragment key={column}>{renderCell(column, row)}</Fragment>)}
|
|
177
|
+
</tr>
|
|
178
|
+
))}
|
|
179
|
+
</tbody>
|
|
180
|
+
</table>
|
|
181
|
+
</div>
|
|
182
|
+
);
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
// ๐ฆ Both import styles match the other package components.
|
|
186
|
+
export default AbPropsTable;
|
|
187
|
+
export { AbPropsTable };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @license MIT
|
|
3
|
+
* ~~~~~~~~~~~~
|
|
4
|
+
* ab-nextjs-components
|
|
5
|
+
* ~~~~~~~~~~~~
|
|
6
|
+
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* @project: ab-nextjs-components
|
|
27
|
+
* @name: AbPropsTable styles (unreleased)
|
|
28
|
+
* @file: ab-props-table/styles.module.css
|
|
29
|
+
* @type: CSS module
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
35
|
+
* MOTTO: We'll always do more ๐!!!
|
|
36
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/* ๐ The border and surface follow the docs tokens. The local wrapper, never the page, scrolls. */
|
|
40
|
+
.abPropsTable {
|
|
41
|
+
--ab-props-table-surface: var(--ab-color-card, #fffdf9);
|
|
42
|
+
--ab-props-table-text: var(--ab-color-text, #211a16);
|
|
43
|
+
--ab-props-table-muted: var(--ab-color-muted, #6f635b);
|
|
44
|
+
--ab-props-table-border: var(--ab-color-border, rgb(92 64 48 / 0.18));
|
|
45
|
+
--ab-props-table-code: var(--ab-color-accent-text, #875d37);
|
|
46
|
+
max-inline-size: 100%; /* ๐ never widen the document or its prose parent. */
|
|
47
|
+
min-inline-size: 0;
|
|
48
|
+
margin: 0 0 1.25em; /* โ๏ธ docs prose rhythm, consistent with AbCodeBlock. */
|
|
49
|
+
overflow-x: auto; /* โ๏ธ narrow panes scroll here, so the keyboard has one useful stop. */
|
|
50
|
+
border: 1px solid var(--ab-props-table-border);
|
|
51
|
+
border-radius: var(--ab-radius-row, 8px);
|
|
52
|
+
background: var(--ab-props-table-surface);
|
|
53
|
+
color: var(--ab-props-table-text);
|
|
54
|
+
color-scheme: light dark; /* ๐ native focus/scrollbar colors track the active scheme. */
|
|
55
|
+
font: 14px/1.55 var(--ab-font-body, system-ui, sans-serif);
|
|
56
|
+
}
|
|
57
|
+
.abPropsTable:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: 2px; } /* โฟ */
|
|
58
|
+
/* ๐งฑ A fixed layout shares space fairly; 640px is the local horizontal scroll threshold, not a page minimum. */
|
|
59
|
+
.abPropsTableGrid { inline-size: 100%; min-inline-size: 640px; border-collapse: collapse; table-layout: fixed; }
|
|
60
|
+
.abPropsTableCaption { padding: 12px 16px; border-block-end: 1px solid var(--ab-props-table-border); font-weight: 650; text-align: start; }
|
|
61
|
+
.abPropsTableGrid th,
|
|
62
|
+
.abPropsTableGrid td { padding: 12px 16px; border-block-end: 1px solid var(--ab-props-table-border); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
|
|
63
|
+
.abPropsTableGrid thead th { background: color-mix(in srgb, var(--ab-props-table-text) 4%, transparent); color: var(--ab-props-table-muted); font-size: 12px; font-weight: 650; letter-spacing: 0.025em; }
|
|
64
|
+
.abPropsTableGrid tbody tr:last-child > * { border-block-end: 0; }
|
|
65
|
+
.abPropsTableName code,
|
|
66
|
+
.abPropsTableCode code { font: 13px/1.55 var(--ab-font-code, ui-monospace, monospace); overflow-wrap: anywhere; word-break: normal; }
|
|
67
|
+
.abPropsTableName code { color: var(--ab-props-table-text); font-weight: 650; }
|
|
68
|
+
.abPropsTableCode code { color: var(--ab-props-table-code); }
|
|
69
|
+
.abPropsTableRequired,
|
|
70
|
+
.abPropsTableDeprecated { display: block; margin-block-start: 4px; font-size: 11px; font-weight: 500; }
|
|
71
|
+
.abPropsTableRequired { color: var(--ab-color-danger, #904a43); }
|
|
72
|
+
.abPropsTableDeprecated,
|
|
73
|
+
.abPropsTableUnknown,
|
|
74
|
+
.abPropsTableNone { color: var(--ab-props-table-muted); }
|
|
75
|
+
.abPropsTableDeprecated { font-style: italic; }
|
|
76
|
+
.abPropsTableDescription { min-inline-size: 0; }
|
|
77
|
+
/* ๐ Explicit dark containers (theme selectors are intentionally accepted at any ancestor). */
|
|
78
|
+
:where([data-theme='dark'], [data-color-scheme='dark'], [data-ab-theme='dark']) .abPropsTable {
|
|
79
|
+
--ab-props-table-surface: var(--ab-color-card, #211a16);
|
|
80
|
+
--ab-props-table-text: var(--ab-color-text, #f4ece5);
|
|
81
|
+
--ab-props-table-muted: var(--ab-color-muted, #c4b6ab);
|
|
82
|
+
--ab-props-table-border: var(--ab-color-border, rgb(244 236 229 / 0.18));
|
|
83
|
+
--ab-props-table-code: var(--ab-color-accent-text, #e5bc92);
|
|
84
|
+
}
|
|
85
|
+
/* ๐ No theme provider is required: fallbacks also honor the operating system's dark preference. */
|
|
86
|
+
@media (prefers-color-scheme: dark) {
|
|
87
|
+
:root:not([data-theme='light']):not([data-color-scheme='light']):not([data-ab-theme='light']) .abPropsTable {
|
|
88
|
+
--ab-props-table-surface: var(--ab-color-card, #211a16);
|
|
89
|
+
--ab-props-table-text: var(--ab-color-text, #f4ece5);
|
|
90
|
+
--ab-props-table-muted: var(--ab-color-muted, #c4b6ab);
|
|
91
|
+
--ab-props-table-border: var(--ab-color-border, rgb(244 236 229 / 0.18));
|
|
92
|
+
--ab-props-table-code: var(--ab-color-accent-text, #e5bc92);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/* ๐ถ๏ธ Keep status captions in the accessibility tree while removing them from the visual layout. */
|
|
96
|
+
.srOnly { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
|
package/index.ts
CHANGED
|
@@ -148,6 +148,7 @@ const supportedComponents: Array<ComponentCatalogEntry> = [
|
|
|
148
148
|
{ name: 'AbContentTab', file: 'ab-content-tabs/index.tsx', kind: 'client', status: 'Done' }, // ๐๏ธ 0.3.4 (0.2.24 MDX docs): AbContentTabs + AbContentTab (MDX <Tabs>/<Tab>)
|
|
149
149
|
{ name: 'AbCodeBlock', file: 'ab-code-block/index.tsx', kind: 'server', status: 'Done' }, // ๐ป 0.3.4 (0.2.24 MDX docs): AbCodeBlock (+ its copy island)
|
|
150
150
|
{ name: 'AbCallout', file: 'ab-callout/index.tsx', kind: 'server', status: 'Done' }, // ๐ก 0.3.4 (0.2.24 MDX docs): AbCallout
|
|
151
|
+
{ name: 'AbPropsTable', file: 'ab-props-table/index.tsx', kind: 'server', status: 'Done' }, // ๐ unreleased: build-time docs prop data
|
|
151
152
|
{ name: 'AbList', file: 'ab-list/index.tsx', kind: 'server', status: 'Done' },
|
|
152
153
|
]
|
|
153
154
|
|
|
@@ -274,3 +275,7 @@ export type { AbContentTabsProps, AbContentTabProps } from './ab-content-tabs/in
|
|
|
274
275
|
// โฎ๏ธโญ๏ธ 0.3.4 (0.2.24 MDX docs): AbDocPager
|
|
275
276
|
export { default as AbDocPager } from './ab-doc-pager/index.tsx'
|
|
276
277
|
export type { AbDocPagerProps, AbDocPagerLink } from './ab-doc-pager/index.tsx'
|
|
278
|
+
|
|
279
|
+
// ๐ AbPropsTable: a server-safe docs prop table built from structured extraction data.
|
|
280
|
+
export { default as AbPropsTable, AB_PROPS_TABLE_DEFAULT_LABELS } from './ab-props-table/index.tsx'
|
|
281
|
+
export type { AbPropsTableDefault, AbPropsTableDefaultNone, AbPropsTableDefaultUnknown, AbPropsTableDefaultValue, AbPropsTableLabels, AbPropsTableColumn, AbPropsTableProps, AbPropsTableRow } from './ab-props-table/index.tsx'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ab-nextjs-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "๐ A lightweight collection of server & client React components created by Abraham Ukachi, and optimized for Next.js applications ๐.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -146,7 +146,8 @@
|
|
|
146
146
|
"ab-callout",
|
|
147
147
|
"ab-code-block",
|
|
148
148
|
"ab-content-tabs",
|
|
149
|
-
"ab-doc-pager"
|
|
149
|
+
"ab-doc-pager",
|
|
150
|
+
"ab-props-table"
|
|
150
151
|
],
|
|
151
152
|
"exports": {
|
|
152
153
|
".": {
|
|
@@ -252,7 +253,8 @@
|
|
|
252
253
|
"./ab-code-block": "./ab-code-block/index.tsx",
|
|
253
254
|
"./ab-code-block/copy": "./ab-code-block/copy.tsx",
|
|
254
255
|
"./ab-content-tabs": "./ab-content-tabs/index.tsx",
|
|
255
|
-
"./ab-doc-pager": "./ab-doc-pager/index.tsx"
|
|
256
|
+
"./ab-doc-pager": "./ab-doc-pager/index.tsx",
|
|
257
|
+
"./ab-props-table": "./ab-props-table/index.tsx"
|
|
256
258
|
},
|
|
257
259
|
"peerDependenciesMeta": {
|
|
258
260
|
"ab-nextjs-theme": {
|
package/types/index.d.ts
CHANGED
|
@@ -154,3 +154,7 @@ export type { AbContentTabsProps, AbContentTabProps } from '../ab-content-tabs/i
|
|
|
154
154
|
// โฎ๏ธโญ๏ธ 0.3.4 (0.2.24 MDX docs): AbDocPager
|
|
155
155
|
export { default as AbDocPager } from '../ab-doc-pager/index.tsx';
|
|
156
156
|
export type { AbDocPagerProps, AbDocPagerLink } from '../ab-doc-pager/index.tsx';
|
|
157
|
+
|
|
158
|
+
// ๐ AbPropsTable: available from both the root and `ab-nextjs-components/ab-props-table`.
|
|
159
|
+
export { default as AbPropsTable, AB_PROPS_TABLE_DEFAULT_LABELS } from '../ab-props-table/index.tsx';
|
|
160
|
+
export type { AbPropsTableDefault, AbPropsTableDefaultNone, AbPropsTableDefaultUnknown, AbPropsTableDefaultValue, AbPropsTableLabels, AbPropsTableColumn, AbPropsTableProps, AbPropsTableRow } from '../ab-props-table/index.tsx';
|