@dashforge/tw 0.11.0-beta → 1.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/CHANGELOG.md +234 -12
- package/COVERAGE.md +2 -2
- package/PARITY.md +7 -9
- package/PERFORMANCE.md +3 -4
- package/README.md +74 -15
- package/THEME-AUDIT.md +3 -4
- package/dashforge-tw-1.0.0.tgz +0 -0
- package/dist/index.esm.js +3127 -748
- package/dist/src/components/Alert/Alert.d.ts +65 -0
- package/dist/src/components/Alert/Alert.d.ts.map +1 -0
- package/dist/src/components/Alert/alert.types.d.ts +130 -0
- package/dist/src/components/Alert/alert.types.d.ts.map +1 -0
- package/dist/src/components/Alert/alert.variants.d.ts +85 -0
- package/dist/src/components/Alert/alert.variants.d.ts.map +1 -0
- package/dist/src/components/Avatar/Avatar.d.ts +48 -0
- package/dist/src/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/src/components/Avatar/avatar.types.d.ts +162 -0
- package/dist/src/components/Avatar/avatar.types.d.ts.map +1 -0
- package/dist/src/components/Avatar/avatar.variants.d.ts +208 -0
- package/dist/src/components/Avatar/avatar.variants.d.ts.map +1 -0
- package/dist/src/components/Badge/Badge.d.ts +63 -0
- package/dist/src/components/Badge/Badge.d.ts.map +1 -0
- package/dist/src/components/Badge/badge.types.d.ts +124 -0
- package/dist/src/components/Badge/badge.types.d.ts.map +1 -0
- package/dist/src/components/Badge/badge.variants.d.ts +262 -0
- package/dist/src/components/Badge/badge.variants.d.ts.map +1 -0
- package/dist/src/components/Box/Box.d.ts.map +1 -1
- package/dist/src/components/Box/box.types.d.ts +53 -0
- package/dist/src/components/Box/box.types.d.ts.map +1 -1
- package/dist/src/components/Button/Button.d.ts.map +1 -1
- package/dist/src/components/Button/button.types.d.ts +35 -0
- package/dist/src/components/Button/button.types.d.ts.map +1 -1
- package/dist/src/components/Card/Card.d.ts +107 -0
- package/dist/src/components/Card/Card.d.ts.map +1 -0
- package/dist/src/components/Card/card.types.d.ts +119 -0
- package/dist/src/components/Card/card.types.d.ts.map +1 -0
- package/dist/src/components/Chip/Chip.d.ts +67 -0
- package/dist/src/components/Chip/Chip.d.ts.map +1 -0
- package/dist/src/components/Chip/chip.types.d.ts +113 -0
- package/dist/src/components/Chip/chip.types.d.ts.map +1 -0
- package/dist/src/components/Chip/chip.variants.d.ts +155 -0
- package/dist/src/components/Chip/chip.variants.d.ts.map +1 -0
- package/dist/src/components/IconButton/IconButton.d.ts +57 -0
- package/dist/src/components/IconButton/IconButton.d.ts.map +1 -0
- package/dist/src/components/IconButton/iconButton.types.d.ts +96 -0
- package/dist/src/components/IconButton/iconButton.types.d.ts.map +1 -0
- package/dist/src/components/IconButton/iconButton.variants.d.ts +26 -0
- package/dist/src/components/IconButton/iconButton.variants.d.ts.map +1 -0
- package/dist/src/components/Menu/Menu.d.ts +118 -0
- package/dist/src/components/Menu/Menu.d.ts.map +1 -0
- package/dist/src/components/Menu/menu.types.d.ts +179 -0
- package/dist/src/components/Menu/menu.types.d.ts.map +1 -0
- package/dist/src/components/Menu/menu.variants.d.ts +129 -0
- package/dist/src/components/Menu/menu.variants.d.ts.map +1 -0
- package/dist/src/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/dist/src/components/Snackbar/snackbar.types.d.ts +40 -3
- package/dist/src/components/Snackbar/snackbar.types.d.ts.map +1 -1
- package/dist/src/components/Snackbar/snackbar.variants.d.ts +12 -57
- package/dist/src/components/Snackbar/snackbar.variants.d.ts.map +1 -1
- package/dist/src/components/Spinner/Spinner.d.ts +44 -0
- package/dist/src/components/Spinner/Spinner.d.ts.map +1 -0
- package/dist/src/components/Spinner/spinner.types.d.ts +89 -0
- package/dist/src/components/Spinner/spinner.types.d.ts.map +1 -0
- package/dist/src/components/Spinner/spinner.variants.d.ts +111 -0
- package/dist/src/components/Spinner/spinner.variants.d.ts.map +1 -0
- package/dist/src/components/Table/cells/RenderChip.d.ts +15 -72
- package/dist/src/components/Table/cells/RenderChip.d.ts.map +1 -1
- package/dist/src/components/_shared/severity/index.d.ts +21 -0
- package/dist/src/components/_shared/severity/index.d.ts.map +1 -0
- package/dist/src/components/_shared/severity/severity.types.d.ts +48 -0
- package/dist/src/components/_shared/severity/severity.types.d.ts.map +1 -0
- package/dist/src/components/_shared/severity/severityIcons.d.ts +45 -0
- package/dist/src/components/_shared/severity/severityIcons.d.ts.map +1 -0
- package/dist/src/components/_shared/severity/severityVariants.d.ts +22 -0
- package/dist/src/components/_shared/severity/severityVariants.d.ts.map +1 -0
- package/dist/src/index.d.ts +27 -2
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +8 -7
- package/src/components/Alert/Alert.test.tsx +302 -0
- package/src/components/Alert/Alert.tsx +186 -0
- package/src/components/Alert/alert.types.ts +144 -0
- package/src/components/Alert/alert.variants.ts +71 -0
- package/src/components/Autocomplete/autocomplete.variants.ts +1 -1
- package/src/components/Avatar/Avatar.test.tsx +287 -0
- package/src/components/Avatar/Avatar.tsx +304 -0
- package/src/components/Avatar/avatar.types.ts +205 -0
- package/src/components/Avatar/avatar.variants.ts +194 -0
- package/src/components/Badge/Badge.test.tsx +385 -0
- package/src/components/Badge/Badge.tsx +174 -0
- package/src/components/Badge/badge.types.ts +154 -0
- package/src/components/Badge/badge.variants.ts +161 -0
- package/src/components/Box/Box.test.tsx +21 -0
- package/src/components/Box/Box.tsx +32 -3
- package/src/components/Box/box.types.ts +55 -0
- package/src/components/Button/Button.test.tsx +21 -0
- package/src/components/Button/Button.tsx +28 -27
- package/src/components/Button/button.types.ts +36 -0
- package/src/components/Card/Card.test.tsx +291 -0
- package/src/components/Card/Card.tsx +241 -0
- package/src/components/Card/card.types.ts +132 -0
- package/src/components/Chip/Chip.test.tsx +316 -0
- package/src/components/Chip/Chip.tsx +224 -0
- package/src/components/Chip/chip.types.ts +128 -0
- package/src/components/Chip/chip.variants.ts +173 -0
- package/src/components/DataGrid/visibility/ColumnVisibilityMenu.tsx +1 -1
- package/src/components/IconButton/IconButton.test.tsx +367 -0
- package/src/components/IconButton/IconButton.tsx +159 -0
- package/src/components/IconButton/iconButton.types.ts +106 -0
- package/src/components/IconButton/iconButton.variants.ts +31 -0
- package/src/components/LeftNav/leftNav.variants.ts +2 -2
- package/src/components/Menu/Menu.test.tsx +408 -0
- package/src/components/Menu/Menu.tsx +335 -0
- package/src/components/Menu/menu.types.ts +221 -0
- package/src/components/Menu/menu.variants.ts +132 -0
- package/src/components/Pagination/pagination.variants.ts +1 -1
- package/src/components/Snackbar/Snackbar.tsx +46 -28
- package/src/components/Snackbar/snackbar.types.ts +47 -3
- package/src/components/Snackbar/snackbar.variants.ts +29 -22
- package/src/components/Spinner/Spinner.test.tsx +199 -0
- package/src/components/Spinner/Spinner.tsx +158 -0
- package/src/components/Spinner/spinner.types.ts +113 -0
- package/src/components/Spinner/spinner.variants.ts +83 -0
- package/src/components/Table/cells/RenderChip.tsx +24 -87
- package/src/components/Table/cells/RowActionsMenu.tsx +1 -1
- package/src/components/TextField/TextField.test.tsx +5 -1
- package/src/components/_shared/severity/index.ts +33 -0
- package/src/components/_shared/severity/severity.types.ts +50 -0
- package/src/components/_shared/severity/severityIcons.tsx +104 -0
- package/src/components/_shared/severity/severityVariants.test.ts +136 -0
- package/src/components/_shared/severity/severityVariants.ts +115 -0
- package/src/index.ts +163 -1
- package/vite.config.ts +8 -0
- package/vitest.config.mts +8 -1
- package/LICENSE +0 -21
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { Severity, SeverityClasses, SeverityVariant } from './severity.types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The 3×4 severity color matrix.
|
|
5
|
+
*
|
|
6
|
+
* Every class is a Tailwind utility that resolves through
|
|
7
|
+
* `dashforgePreset()` to a CSS variable on the host — patchable at
|
|
8
|
+
* runtime via `patchTheme({ <severity>: { …scale } })` without
|
|
9
|
+
* recompiling. **Zero hardcoded hex values, zero `dark:` variants**:
|
|
10
|
+
* the dashforge preset auto-inverts the neutral surface ladder via CSS
|
|
11
|
+
* variable swap; the severity scales themselves do NOT auto-invert
|
|
12
|
+
* (they read the same scale in light + dark, which is the desired
|
|
13
|
+
* behaviour for semantic colors).
|
|
14
|
+
*
|
|
15
|
+
* The matrix is indexed `[variant][severity]` so a consumer-facing
|
|
16
|
+
* `<Alert variant="filled" severity="warning">` resolves with a single
|
|
17
|
+
* lookup.
|
|
18
|
+
*/
|
|
19
|
+
const SEVERITY_MATRIX: Record<SeverityVariant, Record<Severity, SeverityClasses>> = {
|
|
20
|
+
standard: {
|
|
21
|
+
info: {
|
|
22
|
+
surface: 'bg-info-50 text-info-900',
|
|
23
|
+
border: 'border-info-100',
|
|
24
|
+
icon: 'text-info-600',
|
|
25
|
+
},
|
|
26
|
+
success: {
|
|
27
|
+
surface: 'bg-success-50 text-success-900',
|
|
28
|
+
border: 'border-success-100',
|
|
29
|
+
icon: 'text-success-600',
|
|
30
|
+
},
|
|
31
|
+
warning: {
|
|
32
|
+
surface: 'bg-warning-50 text-warning-900',
|
|
33
|
+
border: 'border-warning-100',
|
|
34
|
+
icon: 'text-warning-600',
|
|
35
|
+
},
|
|
36
|
+
danger: {
|
|
37
|
+
surface: 'bg-danger-50 text-danger-900',
|
|
38
|
+
border: 'border-danger-100',
|
|
39
|
+
icon: 'text-danger-600',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
filled: {
|
|
43
|
+
info: {
|
|
44
|
+
surface: 'bg-info-600 text-info-50',
|
|
45
|
+
border: 'border-info-700',
|
|
46
|
+
icon: 'text-info-50',
|
|
47
|
+
},
|
|
48
|
+
success: {
|
|
49
|
+
surface: 'bg-success-600 text-success-50',
|
|
50
|
+
border: 'border-success-700',
|
|
51
|
+
icon: 'text-success-50',
|
|
52
|
+
},
|
|
53
|
+
warning: {
|
|
54
|
+
surface: 'bg-warning-600 text-warning-50',
|
|
55
|
+
border: 'border-warning-700',
|
|
56
|
+
icon: 'text-warning-50',
|
|
57
|
+
},
|
|
58
|
+
danger: {
|
|
59
|
+
surface: 'bg-danger-600 text-danger-50',
|
|
60
|
+
border: 'border-danger-700',
|
|
61
|
+
icon: 'text-danger-50',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
outlined: {
|
|
65
|
+
info: {
|
|
66
|
+
surface: 'bg-transparent text-info-700',
|
|
67
|
+
border: 'border-info-300',
|
|
68
|
+
icon: 'text-info-600',
|
|
69
|
+
},
|
|
70
|
+
success: {
|
|
71
|
+
surface: 'bg-transparent text-success-700',
|
|
72
|
+
border: 'border-success-300',
|
|
73
|
+
icon: 'text-success-600',
|
|
74
|
+
},
|
|
75
|
+
warning: {
|
|
76
|
+
surface: 'bg-transparent text-warning-700',
|
|
77
|
+
border: 'border-warning-300',
|
|
78
|
+
icon: 'text-warning-600',
|
|
79
|
+
},
|
|
80
|
+
danger: {
|
|
81
|
+
surface: 'bg-transparent text-danger-700',
|
|
82
|
+
border: 'border-danger-300',
|
|
83
|
+
icon: 'text-danger-600',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Resolve the Tailwind classes for one (variant, severity) pair.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* const { surface, border, icon } = getSeverityClasses('standard', 'warning');
|
|
93
|
+
* // surface: 'bg-warning-50 text-warning-900'
|
|
94
|
+
* // border: 'border-warning-100'
|
|
95
|
+
* // icon: 'text-warning-600'
|
|
96
|
+
*/
|
|
97
|
+
export function getSeverityClasses(
|
|
98
|
+
variant: SeverityVariant,
|
|
99
|
+
severity: Severity
|
|
100
|
+
): SeverityClasses {
|
|
101
|
+
return SEVERITY_MATRIX[variant][severity];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* ARIA role for a severity. Follows the W3C WAI-ARIA spec:
|
|
106
|
+
* - `alert` for assertive states (warning / danger) — interrupts the
|
|
107
|
+
* screen-reader announcement queue.
|
|
108
|
+
* - `status` for polite states (info / success) — queued behind other
|
|
109
|
+
* announcements.
|
|
110
|
+
*
|
|
111
|
+
* Consumers can override via an explicit `role` prop.
|
|
112
|
+
*/
|
|
113
|
+
export function getSeverityRole(severity: Severity): 'alert' | 'status' {
|
|
114
|
+
return severity === 'warning' || severity === 'danger' ? 'alert' : 'status';
|
|
115
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -201,11 +201,173 @@ export type {
|
|
|
201
201
|
SnackbarOptions,
|
|
202
202
|
SnackbarRecord,
|
|
203
203
|
SnackbarSeverity,
|
|
204
|
+
SnackbarVariant,
|
|
204
205
|
SnackbarPosition,
|
|
205
206
|
SnackbarSlotProps,
|
|
206
207
|
} from './components/Snackbar/snackbar.types.js';
|
|
207
208
|
export { snackbarVariants } from './components/Snackbar/snackbar.variants.js';
|
|
208
209
|
|
|
210
|
+
// Alert — inline persistent status surface (companion to Snackbar's
|
|
211
|
+
// transient toast). Full MUI Alert API parity (`severity`, `variant`,
|
|
212
|
+
// `icon`, `onClose`, `action`, `role`, `<AlertTitle>` sub-component);
|
|
213
|
+
// `severity="danger"` (not MUI `"error"`) for token-palette alignment.
|
|
214
|
+
// Shares the 3×4 color matrix in `_shared/severity/` with the
|
|
215
|
+
// refactored Snackbar (Sprint 4.4).
|
|
216
|
+
export { Alert, AlertTitle } from './components/Alert/Alert.js';
|
|
217
|
+
export type {
|
|
218
|
+
AlertProps,
|
|
219
|
+
AlertTitleProps,
|
|
220
|
+
AlertSlotProps,
|
|
221
|
+
} from './components/Alert/alert.types.js';
|
|
222
|
+
export { alertVariants } from './components/Alert/alert.variants.js';
|
|
223
|
+
|
|
224
|
+
// IconButton — square, icon-only variant of <Button>. Reuses
|
|
225
|
+
// `buttonVariants` 1:1 (variant × color × size × loading); adds square
|
|
226
|
+
// geometry (w-N + px-0 + aspect-square) and a TS-enforced `aria-label`.
|
|
227
|
+
// access RBAC integration mirrors <Button>; no `visibleWhen` /
|
|
228
|
+
// `slotProps` by design (icon-only buttons are single-DOM-element
|
|
229
|
+
// action triggers, not content surfaces).
|
|
230
|
+
export { IconButton } from './components/IconButton/IconButton.js';
|
|
231
|
+
export type { IconButtonProps } from './components/IconButton/iconButton.types.js';
|
|
232
|
+
export {
|
|
233
|
+
ICON_BUTTON_BASE,
|
|
234
|
+
ICON_BUTTON_SIZE_OVERRIDES,
|
|
235
|
+
} from './components/IconButton/iconButton.variants.js';
|
|
236
|
+
|
|
237
|
+
// Menu family — compound action menu built on
|
|
238
|
+
// `@radix-ui/react-dropdown-menu` (purpose-built menu primitive
|
|
239
|
+
// with full WAI-ARIA menu pattern + keyboard nav + type-ahead +
|
|
240
|
+
// lazy portal mount). Atlaskit-inspired: item-level memo, lazy
|
|
241
|
+
// portal mount, MenuSkeleton for fetch-while-open patterns.
|
|
242
|
+
// • <Menu> — root provider (open state, closeOnItemClick)
|
|
243
|
+
// • <MenuTrigger> — asChild trigger wrapper
|
|
244
|
+
// • <MenuContent> — floating panel (portal, lazy mount)
|
|
245
|
+
// • <MenuItem> — clickable row (memoized, access + visibleWhen)
|
|
246
|
+
// • <MenuLabel> — non-interactive section heading
|
|
247
|
+
// • <MenuSeparator> — divider
|
|
248
|
+
// • <MenuSkeleton> — Atlaskit-style loading placeholder
|
|
249
|
+
// Sub-menus + controlled selection mode are out of scope for v1.
|
|
250
|
+
export {
|
|
251
|
+
Menu,
|
|
252
|
+
MenuTrigger,
|
|
253
|
+
MenuContent,
|
|
254
|
+
MenuItem,
|
|
255
|
+
MenuLabel,
|
|
256
|
+
MenuSeparator,
|
|
257
|
+
MenuSkeleton,
|
|
258
|
+
} from './components/Menu/Menu.js';
|
|
259
|
+
export type {
|
|
260
|
+
MenuProps,
|
|
261
|
+
MenuTriggerProps,
|
|
262
|
+
MenuContentProps,
|
|
263
|
+
MenuItemProps,
|
|
264
|
+
MenuLabelProps,
|
|
265
|
+
MenuSeparatorProps,
|
|
266
|
+
MenuSkeletonProps,
|
|
267
|
+
MenuPlacement,
|
|
268
|
+
MenuItemColor,
|
|
269
|
+
} from './components/Menu/menu.types.js';
|
|
270
|
+
export { menuVariants } from './components/Menu/menu.variants.js';
|
|
271
|
+
|
|
272
|
+
// Badge — anchored indicator (count / dot / short text overlay).
|
|
273
|
+
// Wrapper-only mode: <Badge>{anchor}</Badge>. For standalone inline
|
|
274
|
+
// pills (status labels, removable tags), use <Chip> — Badge and Chip
|
|
275
|
+
// are complementary. content + max overflow ("99+"), showZero gate,
|
|
276
|
+
// dot mode, invisible toggle. placement 4 corners + overlap
|
|
277
|
+
// rectangular/circular for round anchors (Avatar). withRing default
|
|
278
|
+
// for visual separation. access + visibleWhen — gate the badge
|
|
279
|
+
// (anchor always renders).
|
|
280
|
+
export { Badge } from './components/Badge/Badge.js';
|
|
281
|
+
export type {
|
|
282
|
+
BadgeProps,
|
|
283
|
+
BadgeColor,
|
|
284
|
+
BadgePlacement,
|
|
285
|
+
BadgeOverlap,
|
|
286
|
+
BadgeSlotProps,
|
|
287
|
+
} from './components/Badge/badge.types.js';
|
|
288
|
+
export { badgeVariants } from './components/Badge/badge.variants.js';
|
|
289
|
+
export type { BadgeVariants } from './components/Badge/badge.variants.js';
|
|
290
|
+
|
|
291
|
+
// Spinner — rotating-arc loading indicator. SVG + animate-spin
|
|
292
|
+
// (pure CSS, GPU-accelerated, motion-reduce-safe). Color via
|
|
293
|
+
// currentColor by default (inherits parent text color — works inside
|
|
294
|
+
// any container), or explicit 7-intent color. Optional `withTrack`
|
|
295
|
+
// renders a ghost ring behind the arc (Stripe / Vercel / Linear
|
|
296
|
+
// premium look). `delay` prop suppresses the spinner for the first
|
|
297
|
+
// N ms (Atlassian-style anti-flash for sub-N-ms operations).
|
|
298
|
+
// visibleWhen bridge integration; no access (display only). Refactor:
|
|
299
|
+
// Button + IconButton internal loading state now reuse this Spinner
|
|
300
|
+
// (single source of truth).
|
|
301
|
+
export { Spinner } from './components/Spinner/Spinner.js';
|
|
302
|
+
export type {
|
|
303
|
+
SpinnerProps,
|
|
304
|
+
SpinnerSize,
|
|
305
|
+
SpinnerColor,
|
|
306
|
+
SpinnerThickness,
|
|
307
|
+
} from './components/Spinner/spinner.types.js';
|
|
308
|
+
export {
|
|
309
|
+
spinnerVariants,
|
|
310
|
+
SPINNER_STROKE_WIDTH,
|
|
311
|
+
SPINNER_TRACK_OPACITY,
|
|
312
|
+
SPINNER_COLORS,
|
|
313
|
+
} from './components/Spinner/spinner.variants.js';
|
|
314
|
+
|
|
315
|
+
// Avatar — image / initials / icon visual identity.
|
|
316
|
+
// • <Avatar> — single avatar, src + auto-initials from name
|
|
317
|
+
// (Mantine-style), shape + radius (Box token
|
|
318
|
+
// scale), size enum xs/sm/md/lg/xl, color × tone
|
|
319
|
+
// (TS-safe palette access), fallbackIcon escape.
|
|
320
|
+
// • <AvatarGroup> — thin horizontal wrapper with negative-margin
|
|
321
|
+
// overlap, max + overflow indicator, optional
|
|
322
|
+
// ring halo. Size propagates to children.
|
|
323
|
+
// No access / visibleWhen — Avatar is display-only by category.
|
|
324
|
+
// Wrap in <Box> if visibility gating is needed.
|
|
325
|
+
export { Avatar, AvatarGroup } from './components/Avatar/Avatar.js';
|
|
326
|
+
export type {
|
|
327
|
+
AvatarProps,
|
|
328
|
+
AvatarGroupProps,
|
|
329
|
+
AvatarSize,
|
|
330
|
+
AvatarShape,
|
|
331
|
+
AvatarColor,
|
|
332
|
+
AvatarTone,
|
|
333
|
+
} from './components/Avatar/avatar.types.js';
|
|
334
|
+
export {
|
|
335
|
+
avatarVariants,
|
|
336
|
+
AVATAR_SOFT_FALLBACK,
|
|
337
|
+
AVATAR_TONE_FALLBACK,
|
|
338
|
+
} from './components/Avatar/avatar.variants.js';
|
|
339
|
+
|
|
340
|
+
// Card family — opinionated surface preset over <Box>.
|
|
341
|
+
// • <Card> — thin Box alias with card-shaped defaults
|
|
342
|
+
// (variant=outlined, rounded=lg, elevation=1,
|
|
343
|
+
// no padding). Inherits access + visibleWhen
|
|
344
|
+
// from Box (Sprint 4.4 surface alignment).
|
|
345
|
+
// • <CardContent> — padded inner section (semantic alias for
|
|
346
|
+
// Box with default p=4).
|
|
347
|
+
// • <CardActionArea> — clickable wrapper with focus ring + hover +
|
|
348
|
+
// asChild polymorphism (router Link patterns).
|
|
349
|
+
// Carries access + visibleWhen + selected
|
|
350
|
+
// (for option-card / filter-card toggle).
|
|
351
|
+
export { Card, CardContent, CardActionArea } from './components/Card/Card.js';
|
|
352
|
+
export type {
|
|
353
|
+
CardProps,
|
|
354
|
+
CardContentProps,
|
|
355
|
+
CardActionAreaProps,
|
|
356
|
+
} from './components/Card/card.types.js';
|
|
357
|
+
|
|
358
|
+
// Chip — status / filter / tag pill. Promoted from the internal
|
|
359
|
+
// `Table/cells/RenderChip` (Sprint 4.4): the 3 × 7 (variant × color)
|
|
360
|
+
// matrix is now the single source of truth, consumed by both the
|
|
361
|
+
// public <Chip> and (via thin wrapper) the legacy RenderChip.
|
|
362
|
+
// Variant axis: `soft | solid | outline` (Dashforge chip vocabulary —
|
|
363
|
+
// distinct from Button's and Alert's by design, see CHANGELOG).
|
|
364
|
+
// access RBAC integration; selected for filter-pill patterns;
|
|
365
|
+
// onDelete for removable tags.
|
|
366
|
+
export { Chip } from './components/Chip/Chip.js';
|
|
367
|
+
export type { ChipProps } from './components/Chip/chip.types.js';
|
|
368
|
+
export { chipVariants } from './components/Chip/chip.variants.js';
|
|
369
|
+
export type { ChipVariants } from './components/Chip/chip.variants.js';
|
|
370
|
+
|
|
209
371
|
// F9 foundation: typography + layout primitives. These sit BENEATH
|
|
210
372
|
// every other component (Button's label, TextField's helper text, the
|
|
211
373
|
// surface of an AppShell card) and are what app-level code reaches for
|
|
@@ -385,4 +547,4 @@ export type { VariantProps } from 'tailwind-variants';
|
|
|
385
547
|
/**
|
|
386
548
|
* Package version (synced with `package.json` at publish time).
|
|
387
549
|
*/
|
|
388
|
-
export const VERSION = '
|
|
550
|
+
export const VERSION = '1.1.0';
|
package/vite.config.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types='vitest' />
|
|
2
2
|
import { defineConfig } from 'vite';
|
|
3
|
+
import { configDefaults } from 'vitest/config';
|
|
3
4
|
import react from '@vitejs/plugin-react';
|
|
4
5
|
|
|
5
6
|
export default defineConfig(() => ({
|
|
@@ -16,6 +17,13 @@ export default defineConfig(() => ({
|
|
|
16
17
|
globals: true,
|
|
17
18
|
environment: 'node',
|
|
18
19
|
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
20
|
+
// Perf specs assert wall-clock budgets calibrated for a dev machine.
|
|
21
|
+
// Shared CI runners are slower, so they false-fail there — skip them
|
|
22
|
+
// when `CI` is set. They still run locally (`nx test @dashforge/tw`).
|
|
23
|
+
exclude: [
|
|
24
|
+
...configDefaults.exclude,
|
|
25
|
+
...(process.env.CI ? ['**/*.perf.test.*'] : []),
|
|
26
|
+
],
|
|
19
27
|
reporters: ['default'],
|
|
20
28
|
coverage: {
|
|
21
29
|
reportsDirectory: './test-output/vitest/coverage',
|
package/vitest.config.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
1
|
+
import { defineConfig, configDefaults } from 'vitest/config';
|
|
2
2
|
import react from '@vitejs/plugin-react';
|
|
3
3
|
|
|
4
4
|
export default defineConfig(() => ({
|
|
@@ -13,6 +13,13 @@ export default defineConfig(() => ({
|
|
|
13
13
|
// `// @vitest-environment jsdom` magic comment at file top.
|
|
14
14
|
environment: 'node',
|
|
15
15
|
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
16
|
+
// Perf specs assert wall-clock budgets calibrated for a dev machine.
|
|
17
|
+
// Shared CI runners are slower, so they false-fail there — skip them
|
|
18
|
+
// when `CI` is set. They still run locally (`nx test @dashforge/tw`).
|
|
19
|
+
exclude: [
|
|
20
|
+
...configDefaults.exclude,
|
|
21
|
+
...(process.env.CI ? ['**/*.perf.test.*'] : []),
|
|
22
|
+
],
|
|
16
23
|
reporters: ['default'],
|
|
17
24
|
coverage: {
|
|
18
25
|
reportsDirectory: './test-output/vitest/coverage',
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Dashforge
|
|
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.
|