@contractspec/lib.design-system 3.7.6 → 3.8.3
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/README.md +45 -110
- package/dist/browser/index.js +473 -466
- package/dist/components/agent/ApprovalQueue.d.ts +1 -1
- package/dist/components/agent/ApprovalQueue.mobile.d.ts +12 -0
- package/dist/components/atoms/ActionButtons.d.ts +3 -3
- package/dist/components/atoms/Button.d.ts +1 -1
- package/dist/components/atoms/Cta.d.ts +2 -2
- package/dist/components/atoms/DataChips.d.ts +1 -1
- package/dist/components/atoms/Input.mobile.d.ts +1 -1
- package/dist/components/atoms/LoaderCircular.d.ts +1 -1
- package/dist/components/atoms/Textarea.mobile.d.ts +1 -1
- package/dist/components/data-table/DataTable.d.ts +15 -0
- package/dist/components/data-table/DataTable.mobile.d.ts +15 -0
- package/dist/components/data-view/DataViewDetail.d.ts +1 -1
- package/dist/components/data-view/DataViewList.d.ts +1 -1
- package/dist/components/data-view/DataViewRenderer.d.ts +1 -1
- package/dist/components/data-view/DataViewRenderer.mobile.d.ts +25 -0
- package/dist/components/data-view/DataViewTable.d.ts +2 -2
- package/dist/components/data-view/DataViewTable.mobile.d.ts +17 -0
- package/dist/components/forms/ZodForm.d.ts +1 -1
- package/dist/components/legal/atoms/LegalCallout.d.ts +1 -1
- package/dist/components/legal/atoms/LegalHeading.d.ts +2 -2
- package/dist/components/legal/atoms/LegalList.d.ts +1 -1
- package/dist/components/legal/atoms/LegalSection.d.ts +2 -2
- package/dist/components/legal/atoms/LegalText.d.ts +3 -3
- package/dist/components/legal/molecules/LegalTOC.d.ts +1 -1
- package/dist/components/marketing/MarketingCard.d.ts +1 -1
- package/dist/components/marketing/MarketingCardsSection.d.ts +2 -2
- package/dist/components/marketing/MarketingComparisonSection.d.ts +1 -1
- package/dist/components/marketing/MarketingIconCard.d.ts +2 -2
- package/dist/components/marketing/MarketingSection.d.ts +1 -1
- package/dist/components/molecules/EntityCard.d.ts +2 -2
- package/dist/components/molecules/MarkdownRenderer/MarkdownRenderer.d.ts +2 -0
- package/dist/components/molecules/MarkdownRenderer/formatInlineMarkdown.d.ts +2 -0
- package/dist/components/molecules/MarkdownRenderer/index.d.ts +2 -0
- package/dist/components/molecules/MarkdownRenderer/renderMarkdownTable.d.ts +2 -0
- package/dist/components/molecules/MarkdownRenderer/types.d.ts +3 -0
- package/dist/components/molecules/SkeletonBlock/index.d.ts +1 -1
- package/dist/components/molecules/SkeletonCircle/index.d.ts +1 -1
- package/dist/components/molecules/SkeletonList/index.d.ts +1 -1
- package/dist/components/molecules/StatCard.d.ts +2 -2
- package/dist/components/molecules/StatusChip.d.ts +1 -1
- package/dist/components/native/FlatListScreen.mobile.d.ts +2 -2
- package/dist/components/organisms/GridLayout.d.ts +1 -1
- package/dist/components/organisms/ListCardPage.d.ts +1 -1
- package/dist/components/organisms/ListGridPage.d.ts +1 -1
- package/dist/components/organisms/ListTablePage.d.ts +1 -1
- package/dist/components/organisms/ListTablePage.mobile.d.ts +20 -0
- package/dist/components/organisms/PricingSection.d.ts +1 -1
- package/dist/components/templates/lists/ListPageTemplate/index.d.ts +1 -1
- package/dist/components/visualization/ComparisonView.d.ts +9 -0
- package/dist/components/visualization/ComparisonView.mobile.d.ts +9 -0
- package/dist/components/visualization/TimelineView.d.ts +9 -0
- package/dist/components/visualization/TimelineView.mobile.d.ts +9 -0
- package/dist/components/visualization/VisualizationCard.d.ts +13 -0
- package/dist/components/visualization/VisualizationCard.mobile.d.ts +13 -0
- package/dist/components/visualization/VisualizationGrid.d.ts +6 -0
- package/dist/components/visualization/VisualizationGrid.mobile.d.ts +6 -0
- package/dist/components/visualization/VisualizationRenderer.d.ts +12 -0
- package/dist/components/visualization/VisualizationRenderer.mobile.d.ts +12 -0
- package/dist/components/visualization/types.d.ts +12 -0
- package/dist/index.d.ts +108 -100
- package/dist/index.js +473 -466
- package/dist/theme/tokenBridge.d.ts +1 -1
- package/dist/theme/variants.d.ts +1 -1
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -1,133 +1,68 @@
|
|
|
1
1
|
# @contractspec/lib.design-system
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/@contractspec/lib.design-system)
|
|
5
|
-
[](https://deepwiki.com/lssm-tech/contractspec)
|
|
3
|
+
Website: https://contractspec.io
|
|
6
4
|
|
|
5
|
+
**Design tokens and theming primitives.**
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## What It Provides
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Purpose
|
|
14
|
-
|
|
15
|
-
To standardize the look and feel of LSSM applications by providing:
|
|
16
|
-
|
|
17
|
-
- **Composite Components**: Molecules and Organisms that solve common UI problems (headers, sidebars, cards).
|
|
18
|
-
- **Layouts**: Ready-to-use page structures for dashboards, marketing sites, and lists.
|
|
19
|
-
- **Data Views**: Standardized renderers for lists, tables, and details views.
|
|
20
|
-
- **Forms**: Zod-integrated form layouts and components.
|
|
21
|
-
- **Platform Utilities**: Hooks and helpers for responsive and adaptive design (Mobile/Web).
|
|
22
|
-
- **Legal**: Compliant templates for Terms, Privacy, and GDPR.
|
|
9
|
+
- **Layer**: lib.
|
|
10
|
+
- **Consumers**: accessibility, presentation-runtime-react, video-gen, bundles, apps.
|
|
11
|
+
- Related ContractSpec packages include `@contractspec/lib.ai-agent`, `@contractspec/lib.contracts-runtime-client-react`, `@contractspec/lib.contracts-spec`, `@contractspec/lib.example-shared-ui`, `@contractspec/lib.presentation-runtime-react`, `@contractspec/lib.ui-kit`, ...
|
|
23
12
|
|
|
24
13
|
## Installation
|
|
25
14
|
|
|
26
|
-
|
|
27
|
-
npm install @contractspec/lib.design-system
|
|
28
|
-
# or
|
|
29
|
-
bun add @contractspec/lib.design-system
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Key Concepts
|
|
33
|
-
|
|
34
|
-
- **Platform Agnostic Logic**: Business logic hooks are shared where possible.
|
|
35
|
-
- **Platform Specific UI**: `.mobile.ts(x)` and `.web.ts(x)` extensions allow for tailored experiences while maintaining a unified API.
|
|
36
|
-
- **Contract-Driven**: Components like `DataViewRenderer` and `ZodForm` are designed to work directly with `ContractSpec` definitions.
|
|
37
|
-
- **Theming**: Centralized token bridge and variant definitions.
|
|
38
|
-
|
|
39
|
-
## Exports
|
|
40
|
-
|
|
41
|
-
### Atoms & Molecules
|
|
42
|
-
|
|
43
|
-
- `Button`, `Input`, `Link` (Platform-aware wrappers)
|
|
44
|
-
- `ActionButtons`, `DataChips`, `EmptyState`, `ErrorState`
|
|
45
|
-
- `Breadcrumbs`, `CommandPalette`, `DropdownMenu`, `EntityCard`
|
|
46
|
-
- `FiltersToolbar`, `LangSwitch`, `LoaderBlock`, `StatCard`
|
|
47
|
-
|
|
48
|
-
### Organisms (Complex UI)
|
|
49
|
-
|
|
50
|
-
- **App Shell**: `AppLayout`, `AppHeader`, `AppSidebar`, `Footer`
|
|
51
|
-
- **Marketing**: `MarketingLayout`, `HeroSection`, `FeaturesSection`, `PricingSection`
|
|
52
|
-
- **Lists**: `ListCardPage`, `ListGridPage`, `ListTablePage`
|
|
53
|
-
- **Legal**: `LegalPageLayout`, `GDPRRights`, `ContactForm`
|
|
15
|
+
`npm install @contractspec/lib.design-system`
|
|
54
16
|
|
|
55
|
-
|
|
17
|
+
or
|
|
56
18
|
|
|
57
|
-
|
|
58
|
-
- `ZodForm`: Auto-generates forms from Zod schemas.
|
|
59
|
-
- `FormLayout`, `FormDialog`, `FormStepsLayout`
|
|
60
|
-
|
|
61
|
-
### Templates
|
|
62
|
-
|
|
63
|
-
- `ListPageTemplate`
|
|
64
|
-
- Legal: `PrivacyTemplate`, `TermsTemplate`, `CookiesTemplate`
|
|
19
|
+
`bun add @contractspec/lib.design-system`
|
|
65
20
|
|
|
66
21
|
## Usage
|
|
67
22
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
```tsx
|
|
71
|
-
import { AppLayout } from '@contractspec/lib.design-system/components/organisms/AppLayout';
|
|
72
|
-
import { AppSidebar } from '@contractspec/lib.design-system/components/organisms/AppSidebar';
|
|
73
|
-
|
|
74
|
-
export default function Layout({ children }) {
|
|
75
|
-
return <AppLayout sidebar={<AppSidebar />}>{children}</AppLayout>;
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Zod Form
|
|
80
|
-
|
|
81
|
-
```tsx
|
|
82
|
-
import { ZodForm } from '@contractspec/lib.design-system/components/forms/ZodForm';
|
|
83
|
-
import * as z from "zod";
|
|
84
|
-
|
|
85
|
-
const schema = z.object({
|
|
86
|
-
name: z.string().min(1),
|
|
87
|
-
email: z.string().email(),
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
export function SignupForm() {
|
|
91
|
-
return (
|
|
92
|
-
<ZodForm
|
|
93
|
-
schema={schema}
|
|
94
|
-
onSubmit={(data) => console.log(data)}
|
|
95
|
-
submitLabel="Sign Up"
|
|
96
|
-
/>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
23
|
+
Import the root entrypoint from `@contractspec/lib.design-system`, or choose a documented subpath when you only need one part of the package surface.
|
|
124
24
|
|
|
25
|
+
## Architecture
|
|
125
26
|
|
|
27
|
+
- `src/components/` contains reusable UI components and view composition.
|
|
28
|
+
- `src/hooks/` contains custom hooks for host applications.
|
|
29
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
30
|
+
- `src/lib/` contains package-local helper utilities and adapters.
|
|
31
|
+
- `src/platform` is part of the package's public or composition surface.
|
|
32
|
+
- `src/renderers` is part of the package's public or composition surface.
|
|
33
|
+
- `src/theme` is part of the package's public or composition surface.
|
|
126
34
|
|
|
35
|
+
## Public Entry Points
|
|
127
36
|
|
|
37
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
128
38
|
|
|
39
|
+
## Local Commands
|
|
129
40
|
|
|
41
|
+
- `bun run dev` — contractspec-bun-build dev
|
|
42
|
+
- `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
|
|
43
|
+
- `bun run test` — bun test --pass-with-no-tests
|
|
44
|
+
- `bun run lint` — bun run lint:fix
|
|
45
|
+
- `bun run lint:check` — biome check .
|
|
46
|
+
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
|
|
47
|
+
- `bun run typecheck` — tsc --noEmit -p tsconfig.build.json
|
|
48
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
49
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
50
|
+
- `bun run build:bundle` — contractspec-bun-build transpile
|
|
51
|
+
- `bun run build:types` — contractspec-bun-build types
|
|
52
|
+
- `bun run registry:build` — bun run scripts/build-registry.ts
|
|
53
|
+
- `bun run prebuild` — contractspec-bun-build prebuild
|
|
130
54
|
|
|
55
|
+
## Recent Updates
|
|
131
56
|
|
|
57
|
+
- Replace eslint+prettier by biomejs to optimize speed.
|
|
58
|
+
- Add data visualization capabilities.
|
|
59
|
+
- Add table capabilities.
|
|
60
|
+
- Resolve lint, build, and type errors across nine packages.
|
|
61
|
+
- Add AI provider ranking system with ranking-driven model selection.
|
|
62
|
+
- Stabilize marketing header interactions.
|
|
132
63
|
|
|
64
|
+
## Notes
|
|
133
65
|
|
|
66
|
+
- **High blast radius** — all UI surfaces depend on design tokens; treat token names and values as public API.
|
|
67
|
+
- Component hierarchy must be preserved; do not flatten or restructure without coordinating downstream consumers.
|
|
68
|
+
- Token removals or renames are breaking changes.
|