@nadicodeai/ui 6.0.2 → 6.1.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/dist/components/action-menu.d.ts +8 -0
- package/dist/components/action-menu.d.ts.map +1 -0
- package/dist/components/action-menu.js +8 -0
- package/dist/components/card.d.ts +1 -1
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +5 -3
- package/dist/components/chart-breakdown-table.d.ts +3 -2
- package/dist/components/chart-breakdown-table.d.ts.map +1 -1
- package/dist/components/chart-breakdown-table.js +13 -9
- package/dist/components/chart-bullet-bar.d.ts +13 -12
- package/dist/components/chart-bullet-bar.d.ts.map +1 -1
- package/dist/components/chart-bullet-bar.js +16 -36
- package/dist/components/chart-kpi-stat.d.ts +26 -15
- package/dist/components/chart-kpi-stat.d.ts.map +1 -1
- package/dist/components/chart-kpi-stat.js +28 -4
- package/dist/components/chart-time-series-layout.d.ts +6 -0
- package/dist/components/chart-time-series-layout.d.ts.map +1 -0
- package/dist/components/chart-time-series-layout.js +6 -0
- package/dist/components/chart-time-series.d.ts +6 -2
- package/dist/components/chart-time-series.d.ts.map +1 -1
- package/dist/components/chart-time-series.js +27 -9
- package/dist/components/chart.js +1 -1
- package/dist/components/collection-filters.d.ts +28 -0
- package/dist/components/collection-filters.d.ts.map +1 -0
- package/dist/components/collection-filters.js +54 -0
- package/dist/components/collection-scope.d.ts +15 -0
- package/dist/components/collection-scope.d.ts.map +1 -0
- package/dist/components/collection-scope.js +7 -0
- package/dist/components/collection-toolbar.d.ts +10 -0
- package/dist/components/collection-toolbar.d.ts.map +1 -0
- package/dist/components/collection-toolbar.js +4 -0
- package/dist/components/settings-facts.d.ts +28 -0
- package/dist/components/settings-facts.d.ts.map +1 -0
- package/dist/components/settings-facts.js +7 -0
- package/dist/components/settings-section.d.ts +5 -5
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +6 -11
- package/dist/components/sidebar.d.ts +4 -1
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +3 -3
- package/dist/components/table-layouts.d.ts +22 -0
- package/dist/components/table-layouts.d.ts.map +1 -0
- package/dist/components/table-layouts.js +20 -0
- package/dist/components/table.d.ts +15 -2
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +8 -4
- package/dist/eslint/rules/jsx-class-utility.js +44 -12
- package/dist/eslint/rules/no-resting-settings-control.js +15 -13
- package/dist/eslint/rules/no-shadcn-appearance-override.js +189 -36
- package/dist/eslint/rules/shadcn-composition.js +48 -3
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/docs/component-classification.md +3 -2
- package/docs/contract.md +78 -7
- package/docs/product-compositions.md +14 -11
- package/package.json +3 -2
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# Product Compositions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared product compositions own repeatable presentation and interaction. Consumers bind routing, persistence, permissions, and product copy. See the [component contract](contract.md) for each family's ownership.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
chart cards follow this rule: use `@shadcn/data-table-demo`,
|
|
9
|
-
`@shadcn/command-dialog`, `@shadcn/chart`, or the relevant `@shadcn/chart-*`
|
|
10
|
-
block/example as the source of truth.
|
|
5
|
+
Check first-party shadcn or assistant-ui registry patterns before adding a
|
|
6
|
+
composition. Once adapted, reuse its maintained owner; do not assemble the same
|
|
7
|
+
registry example again for each page.
|
|
11
8
|
|
|
12
9
|
Import components through the wildcard component subpath after build:
|
|
13
10
|
|
|
@@ -19,12 +16,13 @@ Fixtures live in:
|
|
|
19
16
|
|
|
20
17
|
- [`../tests/guards/product-compositions.test.ts`](../tests/guards/product-compositions.test.ts)
|
|
21
18
|
- [`../tests/guards/product-compositions-ssr.test.ts`](../tests/guards/product-compositions-ssr.test.ts)
|
|
19
|
+
- [`../src/components/settings-section.test.tsx`](../src/components/settings-section.test.tsx)
|
|
22
20
|
|
|
23
21
|
## Boundaries
|
|
24
22
|
|
|
25
23
|
| Component | Package owns | Consumer owns |
|
|
26
24
|
| --- | --- | --- |
|
|
27
|
-
| `SettingsSection` / `SettingsField` |
|
|
25
|
+
| `SettingsSection` / `SettingsField` | Header, divided save footer, field layout, labels, descriptions, errors, and control associations. | Form state, validation, submission, persistence, settings taxonomy, and save/cancel behavior. |
|
|
28
26
|
| `FeedbackState` | Shared empty, loading, saving, error, permission, offline, no-results, and fatal state presentation. | Recovery actions, retry behavior, permission escalation, app-specific state language. |
|
|
29
27
|
|
|
30
28
|
## SettingsSection
|
|
@@ -35,6 +33,7 @@ Use `SettingsSection` and `SettingsField` for horizontal settings rows that need
|
|
|
35
33
|
<SettingsSection
|
|
36
34
|
title="Workspace defaults"
|
|
37
35
|
description="Shared defaults for agent work."
|
|
36
|
+
footer={<Button type="submit">Save</Button>}
|
|
38
37
|
>
|
|
39
38
|
<SettingsField
|
|
40
39
|
id="review-window"
|
|
@@ -44,7 +43,7 @@ Use `SettingsSection` and `SettingsField` for horizontal settings rows that need
|
|
|
44
43
|
invalid={Boolean(reviewWindowError)}
|
|
45
44
|
>
|
|
46
45
|
{({ controlProps }) => (
|
|
47
|
-
<
|
|
46
|
+
<Input {...controlProps} value={reviewWindow} onChange={onReviewWindowChange} />
|
|
48
47
|
)}
|
|
49
48
|
</SettingsField>
|
|
50
49
|
</SettingsSection>
|
|
@@ -53,11 +52,15 @@ Use `SettingsSection` and `SettingsField` for horizontal settings rows that need
|
|
|
53
52
|
| Prop | Purpose |
|
|
54
53
|
| --- | --- |
|
|
55
54
|
| `title` / `description` / `actions` | Section header content and right-side action slot. |
|
|
55
|
+
| `footer` | Local Save/Cancel controls and completion feedback. The owning form wraps the section. |
|
|
56
56
|
| `id` / `label` | Required field identity and accessible label. |
|
|
57
57
|
| `description` / `error` / `invalid` | Field helper text, error text, and invalid state. |
|
|
58
|
-
| `children` | A render function receives `controlProps` for the real control
|
|
58
|
+
| `children` | A render function receives `controlProps` for the real control in server and client components. |
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
Spread `controlProps` onto the real control. SettingsField invokes the callback
|
|
61
|
+
before rendered children cross any client boundary; it does not forward the
|
|
62
|
+
callback to a client component. The [contract](contract.md) owns the field's
|
|
63
|
+
accessibility and state guarantees.
|
|
61
64
|
|
|
62
65
|
## FeedbackState
|
|
63
66
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@assistant-ui/react": "0.15.18",
|
|
71
71
|
"@assistant-ui/react-markdown": "0.14.14",
|
|
72
72
|
"@base-ui/react": "^1.8.0",
|
|
73
|
-
"@nadicodeai/design-system": "6.0
|
|
73
|
+
"@nadicodeai/design-system": "6.1.0",
|
|
74
74
|
"@paper-design/shaders": "0.0.80",
|
|
75
75
|
"class-variance-authority": "^0.7.1",
|
|
76
76
|
"clsx": "^2.1.1",
|
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
"@stryker-mutator/vitest-runner": "10.0.0",
|
|
107
107
|
"@tailwindcss/postcss": "^4.3.3",
|
|
108
108
|
"@testing-library/react": "^16.3.3",
|
|
109
|
+
"@testing-library/user-event": "^14.6.7",
|
|
109
110
|
"@types/react": "19.2.18",
|
|
110
111
|
"@types/react-dom": "19.2.7",
|
|
111
112
|
"axe-core": "^4.13.0",
|