@tristan2828/ui-foundation 4.97.0 → 4.98.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/conventions/docs/add-an-entity.md +66 -50
- package/conventions/docs/cell-patterns.md +41 -34
- package/conventions/docs/design-language.md +124 -68
- package/conventions/docs/entity-plan-template.md +15 -21
- package/dist/components/app/entity-view.d.ts +29 -11
- package/dist/components/app/entity-view.js +103 -26
- package/dist/components/app/key-stats.d.ts +3 -1
- package/dist/components/app/key-stats.js +2 -2
- package/dist/components/app/record-dialog-context.d.ts +9 -0
- package/dist/components/app/record-dialog.d.ts +8 -1
- package/dist/components/app/record-dialog.js +19 -3
- package/dist/components/app/status-mark.d.ts +17 -0
- package/dist/components/app/status-mark.js +12 -0
- package/dist/components/ui/field.d.ts +3 -2
- package/dist/components/ui/field.js +13 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/lib/field-rows.d.ts +3 -1
- package/dist/lib/field-rows.js +24 -6
- package/dist/lib/status-kinds.d.ts +10 -0
- package/dist/lib/status-kinds.js +33 -0
- package/package.json +1 -1
- package/styles/index.css +9 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// The six status kinds (4.98, record standard 5B) and how each is drawn:
|
|
2
|
+
// StatusMark (components/app/status-mark.tsx) reads these. The icons are
|
|
3
|
+
// one map, STATUS_KIND_ICONS: changing one here changes it everywhere.
|
|
4
|
+
import { CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CirclePauseIcon, CircleSlash2Icon, TriangleAlertIcon, } from 'lucide-react';
|
|
5
|
+
/** Every kind, in the order a legend lists them. */
|
|
6
|
+
export const STATUS_KINDS = ['active', 'planned', 'paused', 'done', 'ended', 'attention'];
|
|
7
|
+
/** Each kind's icon: the one place to change them. */
|
|
8
|
+
export const STATUS_KIND_ICONS = {
|
|
9
|
+
active: CircleDotIcon,
|
|
10
|
+
planned: CircleDashedIcon,
|
|
11
|
+
paused: CirclePauseIcon,
|
|
12
|
+
done: CircleCheckIcon,
|
|
13
|
+
ended: CircleSlash2Icon,
|
|
14
|
+
attention: TriangleAlertIcon,
|
|
15
|
+
};
|
|
16
|
+
/** Each kind's word, when the status has none of its own (a legend). */
|
|
17
|
+
export const STATUS_KIND_LABELS = {
|
|
18
|
+
active: 'Active',
|
|
19
|
+
planned: 'Planned',
|
|
20
|
+
paused: 'Paused',
|
|
21
|
+
done: 'Done',
|
|
22
|
+
ended: 'Ended',
|
|
23
|
+
attention: 'Needs Attention',
|
|
24
|
+
};
|
|
25
|
+
/** Each kind's colour, for the icon and the word: *-text tokens and the muted foreground only. */
|
|
26
|
+
export const STATUS_KIND_TONES = {
|
|
27
|
+
active: 'text-success-text',
|
|
28
|
+
planned: 'text-info-text',
|
|
29
|
+
paused: 'text-warning-text',
|
|
30
|
+
done: 'text-muted-foreground',
|
|
31
|
+
ended: 'text-muted-foreground',
|
|
32
|
+
attention: 'text-destructive-text',
|
|
33
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tristan2828/ui-foundation",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.98.0",
|
|
4
4
|
"description": "Shared UI foundation for contract-first, database-backed React apps: shadcn primitives, DataTable/EntityForm composites, auth, the gateway error seam, design tokens, lint rules and the AI playbook.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
package/styles/index.css
CHANGED
|
@@ -661,6 +661,15 @@
|
|
|
661
661
|
[data-slot="field-group"] > [data-field-row][data-phone-pair] {
|
|
662
662
|
width: calc((100% - var(--spacing) * 3) / 2 - 0.05px);
|
|
663
663
|
}
|
|
664
|
+
/* Two choices (4.98, 9C): each starts as wide as its buttons on one
|
|
665
|
+
line (up to the row), so two that fit share the row, growing into
|
|
666
|
+
what's left, and when they don't the second wraps under the first
|
|
667
|
+
and each grows to the row. */
|
|
668
|
+
[data-slot="field-group"] > [data-field-row][data-phone-fit] {
|
|
669
|
+
flex: 1 1 max-content;
|
|
670
|
+
width: auto;
|
|
671
|
+
max-width: 100%;
|
|
672
|
+
}
|
|
664
673
|
}
|
|
665
674
|
|
|
666
675
|
/* EntityForm's bar, stuck to the bottom of the window while the form is
|