@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.
Files changed (57) hide show
  1. package/dist/components/action-menu.d.ts +8 -0
  2. package/dist/components/action-menu.d.ts.map +1 -0
  3. package/dist/components/action-menu.js +8 -0
  4. package/dist/components/card.d.ts +1 -1
  5. package/dist/components/card.d.ts.map +1 -1
  6. package/dist/components/card.js +5 -3
  7. package/dist/components/chart-breakdown-table.d.ts +3 -2
  8. package/dist/components/chart-breakdown-table.d.ts.map +1 -1
  9. package/dist/components/chart-breakdown-table.js +13 -9
  10. package/dist/components/chart-bullet-bar.d.ts +13 -12
  11. package/dist/components/chart-bullet-bar.d.ts.map +1 -1
  12. package/dist/components/chart-bullet-bar.js +16 -36
  13. package/dist/components/chart-kpi-stat.d.ts +26 -15
  14. package/dist/components/chart-kpi-stat.d.ts.map +1 -1
  15. package/dist/components/chart-kpi-stat.js +28 -4
  16. package/dist/components/chart-time-series-layout.d.ts +6 -0
  17. package/dist/components/chart-time-series-layout.d.ts.map +1 -0
  18. package/dist/components/chart-time-series-layout.js +6 -0
  19. package/dist/components/chart-time-series.d.ts +6 -2
  20. package/dist/components/chart-time-series.d.ts.map +1 -1
  21. package/dist/components/chart-time-series.js +27 -9
  22. package/dist/components/chart.js +1 -1
  23. package/dist/components/collection-filters.d.ts +28 -0
  24. package/dist/components/collection-filters.d.ts.map +1 -0
  25. package/dist/components/collection-filters.js +54 -0
  26. package/dist/components/collection-scope.d.ts +15 -0
  27. package/dist/components/collection-scope.d.ts.map +1 -0
  28. package/dist/components/collection-scope.js +7 -0
  29. package/dist/components/collection-toolbar.d.ts +10 -0
  30. package/dist/components/collection-toolbar.d.ts.map +1 -0
  31. package/dist/components/collection-toolbar.js +4 -0
  32. package/dist/components/settings-facts.d.ts +28 -0
  33. package/dist/components/settings-facts.d.ts.map +1 -0
  34. package/dist/components/settings-facts.js +7 -0
  35. package/dist/components/settings-section.d.ts +5 -5
  36. package/dist/components/settings-section.d.ts.map +1 -1
  37. package/dist/components/settings-section.js +6 -11
  38. package/dist/components/sidebar.d.ts +4 -1
  39. package/dist/components/sidebar.d.ts.map +1 -1
  40. package/dist/components/sidebar.js +3 -3
  41. package/dist/components/table-layouts.d.ts +22 -0
  42. package/dist/components/table-layouts.d.ts.map +1 -0
  43. package/dist/components/table-layouts.js +20 -0
  44. package/dist/components/table.d.ts +15 -2
  45. package/dist/components/table.d.ts.map +1 -1
  46. package/dist/components/table.js +8 -4
  47. package/dist/eslint/rules/jsx-class-utility.js +44 -12
  48. package/dist/eslint/rules/no-resting-settings-control.js +15 -13
  49. package/dist/eslint/rules/no-shadcn-appearance-override.js +189 -36
  50. package/dist/eslint/rules/shadcn-composition.js +48 -3
  51. package/dist/index.d.ts +5 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +5 -0
  54. package/docs/component-classification.md +3 -2
  55. package/docs/contract.md +78 -7
  56. package/docs/product-compositions.md +14 -11
  57. package/package.json +3 -2
@@ -1,13 +1,10 @@
1
1
  # Product Compositions
2
2
 
3
- U4 adds the first shared product compositions for NadicodeAI admin, settings, and agent-work surfaces. These components are presentational only: consumers own routing, persistence, server actions, mutations, analytics, auth providers, permissions, and product-specific page copy.
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
- When first-party shadcn or assistant-ui registry source already covers the same
6
- generic product UI, use that registry item in the consuming app instead of
7
- adding a parallel NadicodeAI package API. Data tables, command palettes, and
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` | Horizontal settings layout, `Field` composition, labels, descriptions, errors, deterministic description and error ids, `data-invalid`, and render-prop control wiring. | Form state, validation rules, submission, persistence, settings taxonomy, save/cancel behavior, and explicit control wiring for element children. |
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
- <input {...controlProps} value={reviewWindow} onChange={onReviewWindowChange} />
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 and requires a client-component consumer. An element child renders unchanged and must put an explicit `id` matching the field `id` on its control. |
58
+ | `children` | A render function receives `controlProps` for the real control in server and client components. |
59
59
 
60
- Accessibility: `FieldLabel` uses the field `id` as `htmlFor`. The render-prop form passes `id`, `aria-invalid`, `aria-describedby`, `disabled`, and `required` to the consumer for placement on the real control. Functions cannot cross the React Server Component boundary, so this form requires a client-component consumer. Element children render unchanged; the consumer must put the matching `id` on the control and add `aria-describedby` when needed. Descriptions render with `${id}-description`, and errors render with `${id}-error`.
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.2",
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.2",
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",