@conscia-labs/design-system 0.2.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/LICENSE +21 -0
- package/README.md +488 -0
- package/dist/card-DqFHjLjm.d.ts +22 -0
- package/dist/chunk-5MGPU2JE.js +1764 -0
- package/dist/chunk-5MGPU2JE.js.map +1 -0
- package/dist/chunk-CU3OXBFI.js +664 -0
- package/dist/chunk-CU3OXBFI.js.map +1 -0
- package/dist/chunk-D5LYROOM.js +15 -0
- package/dist/chunk-D5LYROOM.js.map +1 -0
- package/dist/chunk-JU5DQXFC.js +11 -0
- package/dist/chunk-JU5DQXFC.js.map +1 -0
- package/dist/chunk-OX4SN5WX.js +1 -0
- package/dist/chunk-OX4SN5WX.js.map +1 -0
- package/dist/chunk-YHPZ5CQU.js +937 -0
- package/dist/chunk-YHPZ5CQU.js.map +1 -0
- package/dist/foundation/index.d.ts +7 -0
- package/dist/foundation/index.js +12 -0
- package/dist/foundation/index.js.map +1 -0
- package/dist/foundation.css +432 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +355 -0
- package/dist/index.js.map +1 -0
- package/dist/patterns/index.d.ts +317 -0
- package/dist/patterns/index.js +109 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/primitives/index.d.ts +239 -0
- package/dist/primitives/index.js +244 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/standalone.css +2 -0
- package/dist/styles.css +432 -0
- package/dist/tailwind.css +8 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +150 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Conscia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
# Conscia Design System
|
|
2
|
+
|
|
3
|
+
The shared React component library for building clear, consistent, and accessible Conscia product experiences.
|
|
4
|
+
|
|
5
|
+
`@conscia-labs/design-system` brings Conscia’s visual foundation, reusable interface primitives, and common product patterns together in one package. It is designed for operational applications where information density, predictable interaction, and accessibility matter.
|
|
6
|
+
|
|
7
|
+
> **Package:** available publicly as [`@conscia-labs/design-system`](https://www.npmjs.com/package/@conscia-labs/design-system).
|
|
8
|
+
|
|
9
|
+
## Why this package exists
|
|
10
|
+
|
|
11
|
+
Conscia products share more than colors and buttons. They share expectations about how navigation works, how data is presented, how status is communicated, and how users move through operational workflows.
|
|
12
|
+
|
|
13
|
+
This package provides one executable source of truth for those decisions:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
Foundation tokens
|
|
17
|
+
↓
|
|
18
|
+
Conscia primitives
|
|
19
|
+
↓
|
|
20
|
+
Reusable product patterns
|
|
21
|
+
↓
|
|
22
|
+
Conscia applications
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Use the design system to:
|
|
26
|
+
|
|
27
|
+
- Build new Conscia product interfaces.
|
|
28
|
+
- Keep existing products visually and behaviorally consistent.
|
|
29
|
+
- Reuse accessible controls instead of recreating them per application.
|
|
30
|
+
- Compose common shells, resource lists, detail views, tables, and state views.
|
|
31
|
+
- Apply light, dark, and density preferences through shared semantic tokens.
|
|
32
|
+
|
|
33
|
+
Product applications remain responsible for routing, authentication, permissions, data fetching, mutations, validation, and business-specific behavior.
|
|
34
|
+
|
|
35
|
+
## What is included
|
|
36
|
+
|
|
37
|
+
### Foundation
|
|
38
|
+
|
|
39
|
+
Semantic CSS variables for:
|
|
40
|
+
|
|
41
|
+
- Light and dark appearance.
|
|
42
|
+
- Comfortable and compact density.
|
|
43
|
+
- Typography, spacing, radius, and elevation.
|
|
44
|
+
- Canvas, surface, border, and text roles.
|
|
45
|
+
- Brand, selection, information, success, warning, and danger semantics.
|
|
46
|
+
|
|
47
|
+
### Primitives
|
|
48
|
+
|
|
49
|
+
Reusable interface building blocks composed from React, Radix UI, and ShadCN conventions:
|
|
50
|
+
|
|
51
|
+
- Alert
|
|
52
|
+
- Avatar
|
|
53
|
+
- Badge
|
|
54
|
+
- Button
|
|
55
|
+
- Card
|
|
56
|
+
- Checkbox
|
|
57
|
+
- Collapsible
|
|
58
|
+
- Dialog
|
|
59
|
+
- Dropdown menu
|
|
60
|
+
- Field and form controls
|
|
61
|
+
- Input and textarea
|
|
62
|
+
- Select and searchable select
|
|
63
|
+
- Sheet
|
|
64
|
+
- Skeleton
|
|
65
|
+
- Switch
|
|
66
|
+
- Table
|
|
67
|
+
- Tabs and navigation tabs
|
|
68
|
+
- Tooltip
|
|
69
|
+
|
|
70
|
+
### Patterns
|
|
71
|
+
|
|
72
|
+
Higher-level compositions for recurring product workflows:
|
|
73
|
+
|
|
74
|
+
- Application shell and sidebar
|
|
75
|
+
- Sidebar navigation
|
|
76
|
+
- Page frame, header, and toolbar
|
|
77
|
+
- Data table and pagination
|
|
78
|
+
- Resource summaries and detail sections
|
|
79
|
+
- Confirmation dialogs
|
|
80
|
+
- Empty, loading, and error states
|
|
81
|
+
- Activity lists and metric bands
|
|
82
|
+
- Code blocks and value meters
|
|
83
|
+
|
|
84
|
+
## Quick start
|
|
85
|
+
|
|
86
|
+
### 1. Install the package
|
|
87
|
+
|
|
88
|
+
Using pnpm:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pnpm add @conscia-labs/design-system
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Using npm:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install @conscia-labs/design-system
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The package targets React 19 and ships as modern ESM with TypeScript
|
|
101
|
+
declarations. The supported application integration requires Tailwind CSS v4.
|
|
102
|
+
The package declares Tailwind v4 as an optional peer so non-Tailwind consumers
|
|
103
|
+
can use the separate standalone stylesheet without installing Tailwind.
|
|
104
|
+
|
|
105
|
+
### 2. Load Tailwind and the design-system integration
|
|
106
|
+
|
|
107
|
+
Import both once in your application’s global stylesheet:
|
|
108
|
+
|
|
109
|
+
```css
|
|
110
|
+
@import "tailwindcss";
|
|
111
|
+
@import "@conscia-labs/design-system/tailwind.css";
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
`tailwind.css` imports the design tokens, theme registration, variants,
|
|
115
|
+
keyframes, base rules, and bespoke component CSS. It also contains a
|
|
116
|
+
package-relative `@source` for the published JavaScript, so the application’s
|
|
117
|
+
Tailwind compiler generates the utilities used by both the application and the
|
|
118
|
+
design system in one cascade. Do not add a separate `node_modules` source path.
|
|
119
|
+
|
|
120
|
+
The deprecated `styles.css` export remains as a foundation-only compatibility
|
|
121
|
+
alias. It does not contain preflight or generated utilities.
|
|
122
|
+
|
|
123
|
+
### Non-Tailwind applications
|
|
124
|
+
|
|
125
|
+
Applications that do not run Tailwind can opt into the complete precompiled
|
|
126
|
+
bundle:
|
|
127
|
+
|
|
128
|
+
```css
|
|
129
|
+
@import "@conscia-labs/design-system/standalone.css";
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Tailwind applications must not import `standalone.css`, because its preflight
|
|
133
|
+
and generic utilities would compete with the application’s generated CSS.
|
|
134
|
+
|
|
135
|
+
### 3. Set the root appearance and density
|
|
136
|
+
|
|
137
|
+
Apply the default preferences to the root document element:
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
export function RootLayout({
|
|
141
|
+
children,
|
|
142
|
+
}: Readonly<{
|
|
143
|
+
children: React.ReactNode;
|
|
144
|
+
}>) {
|
|
145
|
+
return (
|
|
146
|
+
<html
|
|
147
|
+
lang="en"
|
|
148
|
+
data-appearance="system"
|
|
149
|
+
data-density="comfortable"
|
|
150
|
+
suppressHydrationWarning
|
|
151
|
+
>
|
|
152
|
+
<body>{children}</body>
|
|
153
|
+
</html>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Supported values:
|
|
159
|
+
|
|
160
|
+
| Preference | Values |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| `data-appearance` | `light`, `dark`, `system` |
|
|
163
|
+
| `data-density` | `comfortable`, `compact` |
|
|
164
|
+
|
|
165
|
+
Comfortable density is the default for general product interfaces. Compact density is intended for high-volume operational workflows such as inventories and data-heavy administration.
|
|
166
|
+
|
|
167
|
+
### 4. Use a component
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
import {
|
|
171
|
+
Button,
|
|
172
|
+
Card,
|
|
173
|
+
CardContent,
|
|
174
|
+
CardDescription,
|
|
175
|
+
CardHeader,
|
|
176
|
+
CardTitle,
|
|
177
|
+
Field,
|
|
178
|
+
FieldDescription,
|
|
179
|
+
FieldLabel,
|
|
180
|
+
Input,
|
|
181
|
+
} from "@conscia-labs/design-system";
|
|
182
|
+
|
|
183
|
+
export function CreateConnectionCard() {
|
|
184
|
+
return (
|
|
185
|
+
<Card className="max-w-lg">
|
|
186
|
+
<CardHeader>
|
|
187
|
+
<CardTitle>Create connection</CardTitle>
|
|
188
|
+
<CardDescription>
|
|
189
|
+
Connect a provider to make its resources available to Conscia.
|
|
190
|
+
</CardDescription>
|
|
191
|
+
</CardHeader>
|
|
192
|
+
|
|
193
|
+
<CardContent>
|
|
194
|
+
<form className="grid gap-5">
|
|
195
|
+
<Field>
|
|
196
|
+
<FieldLabel htmlFor="connection-name">Name</FieldLabel>
|
|
197
|
+
<Input
|
|
198
|
+
id="connection-name"
|
|
199
|
+
name="name"
|
|
200
|
+
placeholder="Production connection"
|
|
201
|
+
/>
|
|
202
|
+
<FieldDescription>
|
|
203
|
+
Use a name that helps operators identify this connection.
|
|
204
|
+
</FieldDescription>
|
|
205
|
+
</Field>
|
|
206
|
+
|
|
207
|
+
<Button type="submit">Create connection</Button>
|
|
208
|
+
</form>
|
|
209
|
+
</CardContent>
|
|
210
|
+
</Card>
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Building an application shell
|
|
216
|
+
|
|
217
|
+
The shared shell owns presentation and responsive behavior. The host application supplies routes, links, user context, and actions.
|
|
218
|
+
|
|
219
|
+
```tsx
|
|
220
|
+
import {
|
|
221
|
+
AppShell,
|
|
222
|
+
AppSidebar,
|
|
223
|
+
AppSidebarContent,
|
|
224
|
+
AppSidebarHeader,
|
|
225
|
+
MainRegion,
|
|
226
|
+
PageContent,
|
|
227
|
+
PageFrame,
|
|
228
|
+
PageHeader,
|
|
229
|
+
ProductIdentity,
|
|
230
|
+
SidebarTrigger,
|
|
231
|
+
TopBar,
|
|
232
|
+
} from "@conscia-labs/design-system";
|
|
233
|
+
|
|
234
|
+
export function ProductShell({
|
|
235
|
+
navigation,
|
|
236
|
+
children,
|
|
237
|
+
}: {
|
|
238
|
+
navigation: React.ReactNode;
|
|
239
|
+
children: React.ReactNode;
|
|
240
|
+
}) {
|
|
241
|
+
return (
|
|
242
|
+
<AppShell>
|
|
243
|
+
<AppSidebar>
|
|
244
|
+
<AppSidebarHeader>
|
|
245
|
+
<ProductIdentity
|
|
246
|
+
label="Conscia"
|
|
247
|
+
description="Administration"
|
|
248
|
+
/>
|
|
249
|
+
</AppSidebarHeader>
|
|
250
|
+
<AppSidebarContent>{navigation}</AppSidebarContent>
|
|
251
|
+
</AppSidebar>
|
|
252
|
+
|
|
253
|
+
<MainRegion>
|
|
254
|
+
<TopBar>
|
|
255
|
+
<SidebarTrigger />
|
|
256
|
+
</TopBar>
|
|
257
|
+
|
|
258
|
+
<PageFrame width="wide">
|
|
259
|
+
<PageContent>
|
|
260
|
+
<PageHeader
|
|
261
|
+
title="Connections"
|
|
262
|
+
description="Manage provider connections and their availability."
|
|
263
|
+
/>
|
|
264
|
+
{children}
|
|
265
|
+
</PageContent>
|
|
266
|
+
</PageFrame>
|
|
267
|
+
</MainRegion>
|
|
268
|
+
</AppShell>
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Choosing the right component
|
|
274
|
+
|
|
275
|
+
### Table or DataTable?
|
|
276
|
+
|
|
277
|
+
Use `Table` for small, bounded, read-only relationships.
|
|
278
|
+
|
|
279
|
+
Use `DataTable` when an operational inventory needs one or more of:
|
|
280
|
+
|
|
281
|
+
- Sorting
|
|
282
|
+
- Pagination
|
|
283
|
+
- Row selection
|
|
284
|
+
- Row actions
|
|
285
|
+
- Clickable rows
|
|
286
|
+
- Dedicated mobile rendering
|
|
287
|
+
|
|
288
|
+
Applications own filters, URL state, API requests, and permissions. When data is paginated by a server, enable manual sorting and manual pagination together so a single downloaded page is never presented as a completely sorted dataset.
|
|
289
|
+
|
|
290
|
+
### Tabs or NavigationTabs?
|
|
291
|
+
|
|
292
|
+
Use `Tabs` when content panels change in place without navigation.
|
|
293
|
+
|
|
294
|
+
```tsx
|
|
295
|
+
<Tabs defaultValue="overview">
|
|
296
|
+
<TabsList>
|
|
297
|
+
<TabsTrigger value="overview">Overview</TabsTrigger>
|
|
298
|
+
<TabsTrigger value="activity">Activity</TabsTrigger>
|
|
299
|
+
</TabsList>
|
|
300
|
+
<TabsContent value="overview">...</TabsContent>
|
|
301
|
+
<TabsContent value="activity">...</TabsContent>
|
|
302
|
+
</Tabs>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Use `NavigationTabs` for route-backed sections. The active destination is represented with `aria-current="page"`.
|
|
306
|
+
|
|
307
|
+
```tsx
|
|
308
|
+
<NavigationTabs aria-label="Connection sections">
|
|
309
|
+
<NavigationTabsList>
|
|
310
|
+
<NavigationTab href="/connections/123" active>
|
|
311
|
+
Overview
|
|
312
|
+
</NavigationTab>
|
|
313
|
+
<NavigationTab href="/connections/123/activity">
|
|
314
|
+
Activity
|
|
315
|
+
</NavigationTab>
|
|
316
|
+
</NavigationTabsList>
|
|
317
|
+
</NavigationTabs>
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Select or SearchableSelect?
|
|
321
|
+
|
|
322
|
+
Use `Select` for short, familiar option lists.
|
|
323
|
+
|
|
324
|
+
Use `SearchableSelect` when users need to find an item in a longer list by label, description, or keywords.
|
|
325
|
+
|
|
326
|
+
Both `FormSelect` and `SearchableSelect` contribute a named value to a native
|
|
327
|
+
HTML form when their `name` prop is provided.
|
|
328
|
+
|
|
329
|
+
## Semantic color
|
|
330
|
+
|
|
331
|
+
Color communicates meaning rather than palette choice:
|
|
332
|
+
|
|
333
|
+
| Role | Purpose |
|
|
334
|
+
| --- | --- |
|
|
335
|
+
| `brand` | Conscia identity and signature moments |
|
|
336
|
+
| `brand-secondary` | Supporting brand expression |
|
|
337
|
+
| `primary` | The primary next action |
|
|
338
|
+
| `selection-*` | Current selection or active destination |
|
|
339
|
+
| `information-*` | Informational messages and evidence |
|
|
340
|
+
| `success-*` | Healthy, verified, approved, or completed states |
|
|
341
|
+
| `warning-*` | Conditions requiring attention |
|
|
342
|
+
| `danger-*` | Destructive actions, failures, and critical states |
|
|
343
|
+
| `neutral-*` | Decoration and non-semantic surfaces |
|
|
344
|
+
|
|
345
|
+
Do not use success styling merely because something is enabled or active. Success should communicate positive operational evidence.
|
|
346
|
+
|
|
347
|
+
## Customizing tokens
|
|
348
|
+
|
|
349
|
+
Override semantic variables after importing the package stylesheet:
|
|
350
|
+
|
|
351
|
+
```css
|
|
352
|
+
@import "tailwindcss";
|
|
353
|
+
@import "@conscia-labs/design-system/tailwind.css";
|
|
354
|
+
|
|
355
|
+
:root {
|
|
356
|
+
--ds-space-page: 3rem;
|
|
357
|
+
--ds-radius-surface: 0.625rem;
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Prefer semantic variables over component-specific descendant selectors. This keeps appearance and density behavior consistent across primitives and patterns.
|
|
362
|
+
|
|
363
|
+
## Accessibility
|
|
364
|
+
|
|
365
|
+
Accessibility is part of the component contract:
|
|
366
|
+
|
|
367
|
+
- Radix-backed components provide keyboard interaction and focus management.
|
|
368
|
+
- Route-backed navigation uses semantic links and `aria-current`.
|
|
369
|
+
- Dialogs and sheets provide labelled modal structure.
|
|
370
|
+
- Form controls expose native labelling and validation attributes.
|
|
371
|
+
- Motion is reduced when the user requests `prefers-reduced-motion`.
|
|
372
|
+
- Semantic status colors are designed to be accompanied by text, icons, or labels.
|
|
373
|
+
|
|
374
|
+
Applications are still responsible for meaningful labels, heading order, form error relationships, alternative text, and accessible business workflows.
|
|
375
|
+
|
|
376
|
+
## Framework notes
|
|
377
|
+
|
|
378
|
+
### Next.js
|
|
379
|
+
|
|
380
|
+
Import the application global stylesheet from the root layout:
|
|
381
|
+
|
|
382
|
+
```tsx
|
|
383
|
+
import "./globals.css";
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
The component entries are explicit client-only boundaries, while server-safe
|
|
387
|
+
code is published separately. For example, React Server Components should
|
|
388
|
+
import `cn` from `@conscia-labs/design-system/utils`. The package does not need
|
|
389
|
+
`transpilePackages`; Next.js will establish a client boundary for component
|
|
390
|
+
exports.
|
|
391
|
+
|
|
392
|
+
### Other React applications
|
|
393
|
+
|
|
394
|
+
The primitives are router-independent and can be used with Vite or other
|
|
395
|
+
ESM-capable React build systems. Route-backed patterns accept
|
|
396
|
+
application-supplied links rather than depending on Next.js navigation.
|
|
397
|
+
|
|
398
|
+
### Focused imports
|
|
399
|
+
|
|
400
|
+
The root package is the simplest import path. Public subpath exports are also
|
|
401
|
+
available when an application wants a more explicit dependency boundary:
|
|
402
|
+
|
|
403
|
+
```tsx
|
|
404
|
+
import { Button } from "@conscia-labs/design-system/primitives";
|
|
405
|
+
import { DataTable } from "@conscia-labs/design-system/patterns";
|
|
406
|
+
import {
|
|
407
|
+
applyConsciaPreferences,
|
|
408
|
+
} from "@conscia-labs/design-system/foundation";
|
|
409
|
+
import { cn } from "@conscia-labs/design-system/utils";
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
All public entry points are ESM-only.
|
|
413
|
+
|
|
414
|
+
## Local development
|
|
415
|
+
|
|
416
|
+
Install dependencies:
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
pnpm install
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
Run the playground:
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
pnpm dev:playground
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
The playground is available at [http://localhost:3020](http://localhost:3020).
|
|
429
|
+
|
|
430
|
+
Run the project checks:
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
pnpm lint
|
|
434
|
+
pnpm lint:playground
|
|
435
|
+
pnpm typecheck
|
|
436
|
+
pnpm typecheck:playground
|
|
437
|
+
pnpm test
|
|
438
|
+
pnpm test:package
|
|
439
|
+
pnpm build:playground
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
`pnpm test:package` creates the production artifacts, validates the package
|
|
443
|
+
manifest, and imports the package through its public export map. The npm
|
|
444
|
+
`prepack` hook runs the same gate before a tarball can be produced.
|
|
445
|
+
|
|
446
|
+
Reusable foundation, primitive, and pattern code belongs in `src`. Fixtures and visual documentation belong in `playground`.
|
|
447
|
+
|
|
448
|
+
## Releasing
|
|
449
|
+
|
|
450
|
+
Releases are published from GitHub Actions through npm trusted publishing. The
|
|
451
|
+
release tag must exactly match the version in `package.json`.
|
|
452
|
+
|
|
453
|
+
For example, to publish the next patch:
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
pnpm version patch --no-git-tag-version
|
|
457
|
+
git add package.json
|
|
458
|
+
git commit -m "Release v0.2.1"
|
|
459
|
+
git tag -a v0.2.1 -m "Release v0.2.1"
|
|
460
|
+
git push origin main
|
|
461
|
+
git push origin v0.2.1
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Pushing the tag starts the `npm-production` release workflow. The
|
|
465
|
+
workflow verifies the tag, runs the package tests, builds the publishable
|
|
466
|
+
artifacts, and publishes without a long-lived npm token.
|
|
467
|
+
|
|
468
|
+
## Design-system boundaries
|
|
469
|
+
|
|
470
|
+
Add something to this package when it:
|
|
471
|
+
|
|
472
|
+
- Is shared by multiple Conscia products or workflows.
|
|
473
|
+
- Encodes a reusable visual or interaction convention.
|
|
474
|
+
- Can remain independent of product permissions, APIs, and domain state.
|
|
475
|
+
- Has a stable, accessible public interface.
|
|
476
|
+
|
|
477
|
+
Keep something in the product application when it:
|
|
478
|
+
|
|
479
|
+
- Fetches or mutates product data.
|
|
480
|
+
- Depends on route definitions or authorization rules.
|
|
481
|
+
- Contains product-specific validation or secret handling.
|
|
482
|
+
- Represents a one-off business workflow.
|
|
483
|
+
|
|
484
|
+
This boundary keeps the design system reusable without turning it into a second application framework.
|
|
485
|
+
|
|
486
|
+
## License
|
|
487
|
+
|
|
488
|
+
Released under the [MIT License](./LICENSE).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
5
|
+
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare function Button({ className, variant, size, asChild, type, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
17
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
18
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
19
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
20
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { Button as B, Card as C, Separator as S, CardContent as a, CardDescription as b, CardHeader as c, CardTitle as d, buttonVariants as e };
|