@franco_roura/module-01 0.0.0-stage → 1.0.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-APACHE +202 -0
- package/LICENSE-MIT +21 -0
- package/README.md +64 -2
- package/dist/charts.d.ts +3 -0
- package/dist/charts.js +3 -0
- package/dist/components/alert-dialog.d.ts +19 -0
- package/dist/components/alert-dialog.js +101 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/amount.d.ts +24 -0
- package/dist/components/amount.js +27 -0
- package/dist/components/amount.js.map +1 -0
- package/dist/components/appearance-pickers.d.ts +9 -0
- package/dist/components/appearance-pickers.js +65 -0
- package/dist/components/appearance-pickers.js.map +1 -0
- package/dist/components/badge.d.ts +10 -0
- package/dist/components/badge.js +28 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/budget-meter.d.ts +18 -0
- package/dist/components/budget-meter.js +38 -0
- package/dist/components/budget-meter.js.map +1 -0
- package/dist/components/button.d.ts +13 -0
- package/dist/components/button.js +54 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +7 -0
- package/dist/components/calendar.js +52 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/category-icon.d.ts +33 -0
- package/dist/components/category-icon.js +49 -0
- package/dist/components/category-icon.js.map +1 -0
- package/dist/components/chart.d.ts +44 -0
- package/dist/components/chart.js +147 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/charts.d.ts +52 -0
- package/dist/components/charts.js +482 -0
- package/dist/components/charts.js.map +1 -0
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.js +21 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/combobox.d.ts +32 -0
- package/dist/components/combobox.js +100 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/command.d.ts +19 -0
- package/dist/components/command.js +86 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/cta-banner.d.ts +14 -0
- package/dist/components/cta-banner.js +39 -0
- package/dist/components/cta-banner.js.map +1 -0
- package/dist/components/date-picker.d.ts +19 -0
- package/dist/components/date-picker.js +107 -0
- package/dist/components/date-picker.js.map +1 -0
- package/dist/components/dialog.d.ts +18 -0
- package/dist/components/dialog.js +99 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +26 -0
- package/dist/components/dropdown-menu.js +123 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/field.d.ts +30 -0
- package/dist/components/field.js +53 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/footer.d.ts +18 -0
- package/dist/components/footer.js +40 -0
- package/dist/components/footer.js.map +1 -0
- package/dist/components/fx-converter.d.ts +22 -0
- package/dist/components/fx-converter.js +91 -0
- package/dist/components/fx-converter.js.map +1 -0
- package/dist/components/hero.d.ts +28 -0
- package/dist/components/hero.js +83 -0
- package/dist/components/hero.js.map +1 -0
- package/dist/components/hud.d.ts +41 -0
- package/dist/components/hud.js +108 -0
- package/dist/components/hud.js.map +1 -0
- package/dist/components/input.d.ts +4 -0
- package/dist/components/input.js +14 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +5 -0
- package/dist/components/label.js +15 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/media-card.d.ts +29 -0
- package/dist/components/media-card.js +80 -0
- package/dist/components/media-card.js.map +1 -0
- package/dist/components/money-input.d.ts +10 -0
- package/dist/components/money-input.js +30 -0
- package/dist/components/money-input.js.map +1 -0
- package/dist/components/multi-combobox.d.ts +27 -0
- package/dist/components/multi-combobox.js +101 -0
- package/dist/components/multi-combobox.js.map +1 -0
- package/dist/components/nav-bar.d.ts +21 -0
- package/dist/components/nav-bar.js +44 -0
- package/dist/components/nav-bar.js.map +1 -0
- package/dist/components/panel.d.ts +27 -0
- package/dist/components/panel.js +49 -0
- package/dist/components/panel.js.map +1 -0
- package/dist/components/popover.d.ts +11 -0
- package/dist/components/popover.js +56 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/select.d.ts +16 -0
- package/dist/components/select.js +128 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +5 -0
- package/dist/components/separator.js +17 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +15 -0
- package/dist/components/sheet.js +87 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.js +13 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/sonner.d.ts +5 -0
- package/dist/components/sonner.js +44 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/spec-readout.d.ts +11 -0
- package/dist/components/spec-readout.js +25 -0
- package/dist/components/spec-readout.js.map +1 -0
- package/dist/components/split-flap.d.ts +12 -0
- package/dist/components/split-flap.js +77 -0
- package/dist/components/split-flap.js.map +1 -0
- package/dist/components/tabs.d.ts +12 -0
- package/dist/components/tabs.js +47 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/tag.d.ts +16 -0
- package/dist/components/tag.js +26 -0
- package/dist/components/tag.js.map +1 -0
- package/dist/components/terminal.d.ts +10 -0
- package/dist/components/terminal.js +20 -0
- package/dist/components/terminal.js.map +1 -0
- package/dist/components/textarea.d.ts +4 -0
- package/dist/components/textarea.js +13 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/timeline-entry.d.ts +26 -0
- package/dist/components/timeline-entry.js +63 -0
- package/dist/components/timeline-entry.js.map +1 -0
- package/dist/components/toggle-group.d.ts +10 -0
- package/dist/components/toggle-group.js +49 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.d.ts +10 -0
- package/dist/components/toggle.js +37 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tooltip.d.ts +8 -0
- package/dist/components/tooltip.js +36 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/finance.d.ts +10 -0
- package/dist/finance.js +10 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +33 -0
- package/dist/lib/category-icons.d.ts +80 -0
- package/dist/lib/category-icons.js +102 -0
- package/dist/lib/category-icons.js.map +1 -0
- package/dist/lib/fault.d.ts +7 -0
- package/dist/lib/fault.js +28 -0
- package/dist/lib/fault.js.map +1 -0
- package/dist/lib/form-flow.d.ts +15 -0
- package/dist/lib/form-flow.js +50 -0
- package/dist/lib/form-flow.js.map +1 -0
- package/dist/lib/fx.d.ts +39 -0
- package/dist/lib/fx.js +98 -0
- package/dist/lib/fx.js.map +1 -0
- package/dist/lib/money.d.ts +19 -0
- package/dist/lib/money.js +55 -0
- package/dist/lib/money.js.map +1 -0
- package/dist/lib/use-media-query.d.ts +3 -0
- package/dist/lib/use-media-query.js +15 -0
- package/dist/lib/use-media-query.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.js +26 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/site.d.ts +10 -0
- package/dist/site.js +10 -0
- package/dist/styles.css +2 -0
- package/dist/theme.css +391 -0
- package/dist/tokens.css +181 -0
- package/guidelines/AlertDialog.md +9 -0
- package/guidelines/Amount.md +10 -0
- package/guidelines/AppearancePickers.md +8 -0
- package/guidelines/Badge.md +11 -0
- package/guidelines/BudgetMeter.md +11 -0
- package/guidelines/Button.md +16 -0
- package/guidelines/Calendar.md +8 -0
- package/guidelines/CategoryIcon.md +10 -0
- package/guidelines/Charts.md +12 -0
- package/guidelines/Checkbox.md +8 -0
- package/guidelines/Combobox.md +18 -0
- package/guidelines/Command.md +8 -0
- package/guidelines/Crosshair.md +7 -0
- package/guidelines/CtaBanner.md +8 -0
- package/guidelines/DatePicker.md +11 -0
- package/guidelines/Dialog.md +9 -0
- package/guidelines/DropdownMenu.md +9 -0
- package/guidelines/Field.md +22 -0
- package/guidelines/Footer.md +7 -0
- package/guidelines/FxConverter.md +12 -0
- package/guidelines/GlassPanel.md +8 -0
- package/guidelines/Grill.md +7 -0
- package/guidelines/Hero.md +9 -0
- package/guidelines/HudLabel.md +8 -0
- package/guidelines/Input.md +9 -0
- package/guidelines/Label.md +7 -0
- package/guidelines/MediaCard.md +8 -0
- package/guidelines/MoneyInput.md +10 -0
- package/guidelines/MultiCombobox.md +11 -0
- package/guidelines/NavBar.md +10 -0
- package/guidelines/Panel.md +10 -0
- package/guidelines/Popover.md +8 -0
- package/guidelines/README.md +100 -0
- package/guidelines/SectionHeader.md +9 -0
- package/guidelines/Select.md +9 -0
- package/guidelines/Separator.md +8 -0
- package/guidelines/Sheet.md +9 -0
- package/guidelines/Skeleton.md +8 -0
- package/guidelines/SpecReadout.md +7 -0
- package/guidelines/SplitFlap.md +9 -0
- package/guidelines/StatusLed.md +8 -0
- package/guidelines/Tabs.md +9 -0
- package/guidelines/Tag.md +9 -0
- package/guidelines/Terminal.md +7 -0
- package/guidelines/Textarea.md +8 -0
- package/guidelines/TickRuler.md +8 -0
- package/guidelines/TimelineEntry.md +8 -0
- package/guidelines/Toaster.md +9 -0
- package/guidelines/Toggle.md +9 -0
- package/guidelines/Tooltip.md +8 -0
- package/package.json +103 -4
- package/tokens/tokens.json +739 -0
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/* Module/01 tokens — generated from tokens/tokens.json by scripts/build-tokens.ts. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--color-graphite-50: #f3f4f6;
|
|
5
|
+
--color-graphite-100: #e7e9ec;
|
|
6
|
+
--color-graphite-200: #d8dadf;
|
|
7
|
+
--color-graphite-300: #c9ccd2;
|
|
8
|
+
--color-graphite-400: #a3a7ae;
|
|
9
|
+
--color-graphite-500: #7c818a;
|
|
10
|
+
--color-graphite-600: #676c74;
|
|
11
|
+
--color-graphite-700: #53575e;
|
|
12
|
+
--color-graphite-800: #36393e;
|
|
13
|
+
--color-graphite-900: #1c1e21;
|
|
14
|
+
--color-signal-50: #ffe9dd;
|
|
15
|
+
--color-signal-100: #ffd9c7;
|
|
16
|
+
--color-signal-200: #ffbda2;
|
|
17
|
+
--color-signal-300: #ffa17d;
|
|
18
|
+
--color-signal-400: #ff8255;
|
|
19
|
+
--color-signal-500: #ff5f1f;
|
|
20
|
+
--color-signal-600: #d94a12;
|
|
21
|
+
--color-signal-700: #b93d0a;
|
|
22
|
+
--color-signal-800: #8c2e08;
|
|
23
|
+
--color-signal-900: #612005;
|
|
24
|
+
--color-green-50: #dff2e5;
|
|
25
|
+
--color-green-100: #cdead5;
|
|
26
|
+
--color-green-200: #a8d9b6;
|
|
27
|
+
--color-green-300: #83c797;
|
|
28
|
+
--color-green-400: #59b679;
|
|
29
|
+
--color-green-500: #1fa45a;
|
|
30
|
+
--color-green-600: #1f8f55;
|
|
31
|
+
--color-green-700: #0f6e38;
|
|
32
|
+
--color-green-800: #0d552b;
|
|
33
|
+
--color-green-900: #093d1f;
|
|
34
|
+
--color-red-50: #feedeb;
|
|
35
|
+
--color-red-100: #fde4e1;
|
|
36
|
+
--color-red-200: #f8bfb5;
|
|
37
|
+
--color-red-300: #f19989;
|
|
38
|
+
--color-red-400: #e6715e;
|
|
39
|
+
--color-red-500: #d9442e;
|
|
40
|
+
--color-red-600: #c63423;
|
|
41
|
+
--color-red-700: #b42318;
|
|
42
|
+
--color-red-800: #8a1b12;
|
|
43
|
+
--color-red-900: #62120c;
|
|
44
|
+
--color-canvas: var(--color-graphite-50);
|
|
45
|
+
--color-shell: #ffffff;
|
|
46
|
+
--color-shell-recess: var(--color-graphite-100);
|
|
47
|
+
--color-seam: var(--color-graphite-300);
|
|
48
|
+
--color-ink: var(--color-graphite-900);
|
|
49
|
+
--color-ink-soft: var(--color-graphite-700);
|
|
50
|
+
--color-hud-mark: var(--color-graphite-500);
|
|
51
|
+
--color-signal: var(--color-signal-500);
|
|
52
|
+
--color-signal-ink: var(--color-signal-700);
|
|
53
|
+
--color-signal-shade: var(--color-signal-600);
|
|
54
|
+
--color-signal-tint: var(--color-signal-100);
|
|
55
|
+
--color-studio: #b9bccd;
|
|
56
|
+
--color-visor: var(--color-graphite-900);
|
|
57
|
+
--color-visor-mark: var(--color-graphite-400);
|
|
58
|
+
--color-glass: rgba(255,255,255,0.62);
|
|
59
|
+
--color-glass-edge: rgba(255,255,255,0.95);
|
|
60
|
+
--color-led-on: var(--color-green-500);
|
|
61
|
+
--color-income-ink: var(--color-green-700);
|
|
62
|
+
--color-expense-ink: var(--color-red-700);
|
|
63
|
+
--color-danger: var(--color-red-700);
|
|
64
|
+
--color-danger-tint: var(--color-red-100);
|
|
65
|
+
--color-overlay: rgba(28,30,33,0.36);
|
|
66
|
+
--color-cat-red: #f2706a;
|
|
67
|
+
--color-cat-orange: #ff8a4c;
|
|
68
|
+
--color-cat-amber: #f5b43a;
|
|
69
|
+
--color-cat-yellow: #f2d24b;
|
|
70
|
+
--color-cat-lime: #b5d65a;
|
|
71
|
+
--color-cat-green: #5cc98a;
|
|
72
|
+
--color-cat-teal: #4cc4b4;
|
|
73
|
+
--color-cat-cyan: #5cc6e0;
|
|
74
|
+
--color-cat-sky: #7fb8f5;
|
|
75
|
+
--color-cat-blue: #6f9ef2;
|
|
76
|
+
--color-cat-indigo: #8f95f0;
|
|
77
|
+
--color-cat-violet: #b08cf0;
|
|
78
|
+
--color-cat-pink: #f08cc8;
|
|
79
|
+
--color-cat-rose: #f58ca0;
|
|
80
|
+
--color-cat-brown: #c9a27a;
|
|
81
|
+
--color-cat-slate: #a3abb8;
|
|
82
|
+
--color-chart-income: var(--color-green-600);
|
|
83
|
+
--color-chart-expense: var(--color-red-500);
|
|
84
|
+
--color-chart-line: var(--color-signal-ink);
|
|
85
|
+
--font-display: var(--font-michroma, Michroma), "Eurostile", "Microgramma", system-ui, sans-serif;
|
|
86
|
+
--font-sans: var(--font-manrope, Manrope), system-ui, "Segoe UI", sans-serif;
|
|
87
|
+
--font-mono: var(--font-space-mono, "Space Mono"), ui-monospace, Menlo, Consolas, monospace;
|
|
88
|
+
--text-display-xl: 56px;
|
|
89
|
+
--text-display-xl--line-height: 1.1;
|
|
90
|
+
--text-display-xl--font-weight: 400;
|
|
91
|
+
--text-display-xl--letter-spacing: -0.01em;
|
|
92
|
+
--text-display-lg: 36px;
|
|
93
|
+
--text-display-lg--line-height: 1.15;
|
|
94
|
+
--text-display-lg--font-weight: 400;
|
|
95
|
+
--text-display-lg--letter-spacing: -0.01em;
|
|
96
|
+
--text-display-md: 24px;
|
|
97
|
+
--text-display-md--line-height: 1.25;
|
|
98
|
+
--text-display-md--font-weight: 400;
|
|
99
|
+
--text-display-md--letter-spacing: 0;
|
|
100
|
+
--text-display-sm: 17px;
|
|
101
|
+
--text-display-sm--line-height: 1.35;
|
|
102
|
+
--text-display-sm--font-weight: 400;
|
|
103
|
+
--text-display-sm--letter-spacing: 0.01em;
|
|
104
|
+
--text-body-lg: 19px;
|
|
105
|
+
--text-body-lg--line-height: 1.55;
|
|
106
|
+
--text-body-lg--font-weight: 400;
|
|
107
|
+
--text-body-lg--letter-spacing: 0;
|
|
108
|
+
--text-body-md: 16px;
|
|
109
|
+
--text-body-md--line-height: 1.6;
|
|
110
|
+
--text-body-md--font-weight: 400;
|
|
111
|
+
--text-body-md--letter-spacing: 0;
|
|
112
|
+
--text-body-sm: 14px;
|
|
113
|
+
--text-body-sm--line-height: 1.5;
|
|
114
|
+
--text-body-sm--font-weight: 400;
|
|
115
|
+
--text-body-sm--letter-spacing: 0;
|
|
116
|
+
--text-label: 14px;
|
|
117
|
+
--text-label--line-height: 1.2;
|
|
118
|
+
--text-label--font-weight: 700;
|
|
119
|
+
--text-label--letter-spacing: 0.01em;
|
|
120
|
+
--text-hud: 12px;
|
|
121
|
+
--text-hud--line-height: 1.3;
|
|
122
|
+
--text-hud--font-weight: 400;
|
|
123
|
+
--text-hud--letter-spacing: 0.12em;
|
|
124
|
+
--text-hud-sm: 10px;
|
|
125
|
+
--text-hud-sm--line-height: 1.2;
|
|
126
|
+
--text-hud-sm--font-weight: 400;
|
|
127
|
+
--text-hud-sm--letter-spacing: 0.16em;
|
|
128
|
+
--text-hud-num: 13px;
|
|
129
|
+
--text-hud-num--line-height: 1.3;
|
|
130
|
+
--text-hud-num--font-weight: 400;
|
|
131
|
+
--text-hud-num--letter-spacing: 0.04em;
|
|
132
|
+
--text-code: 14px;
|
|
133
|
+
--text-code--line-height: 1.6;
|
|
134
|
+
--text-code--font-weight: 400;
|
|
135
|
+
--text-code--letter-spacing: 0;
|
|
136
|
+
--text-amount-xl: 32px;
|
|
137
|
+
--text-amount-xl--line-height: 1.15;
|
|
138
|
+
--text-amount-xl--font-weight: 400;
|
|
139
|
+
--text-amount-xl--letter-spacing: -0.01em;
|
|
140
|
+
--text-amount-lg: 22px;
|
|
141
|
+
--text-amount-lg--line-height: 1.2;
|
|
142
|
+
--text-amount-lg--font-weight: 400;
|
|
143
|
+
--text-amount-lg--letter-spacing: 0;
|
|
144
|
+
--text-amount-md: 15px;
|
|
145
|
+
--text-amount-md--line-height: 1.3;
|
|
146
|
+
--text-amount-md--font-weight: 700;
|
|
147
|
+
--text-amount-md--letter-spacing: 0;
|
|
148
|
+
--radius-xs: 4px;
|
|
149
|
+
--radius-sm: 8px;
|
|
150
|
+
--radius-md: 14px;
|
|
151
|
+
--radius-lg: 24px;
|
|
152
|
+
--radius-xl: 36px;
|
|
153
|
+
--radius-full: 999px;
|
|
154
|
+
--shadow-mold: inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -2px 0 rgba(28,30,33,0.06), 0 2px 4px rgba(28,30,33,0.06), 0 10px 24px rgba(28,30,33,0.08);
|
|
155
|
+
--shadow-press: inset 0 2px 5px rgba(28,30,33,0.16);
|
|
156
|
+
--shadow-float: 0 4px 10px rgba(28,30,33,0.06), 0 24px 48px rgba(28,30,33,0.10);
|
|
157
|
+
--shadow-glass: inset 0 0 0 1px rgba(255,255,255,0.95), 0 10px 30px rgba(28,30,33,0.10);
|
|
158
|
+
--container-content-max: 1120px;
|
|
159
|
+
--spacing-nav-height: 64px;
|
|
160
|
+
--spacing-control-height: 44px;
|
|
161
|
+
--container-sheet-max: 560px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:root {
|
|
165
|
+
--space-1: 4px;
|
|
166
|
+
--space-2: 8px;
|
|
167
|
+
--space-3: 12px;
|
|
168
|
+
--space-4: 16px;
|
|
169
|
+
--space-6: 24px;
|
|
170
|
+
--space-8: 32px;
|
|
171
|
+
--space-12: 48px;
|
|
172
|
+
--space-16: 64px;
|
|
173
|
+
--space-24: 96px;
|
|
174
|
+
--filter-mold: drop-shadow(0 2px 4px rgba(28,30,33,0.06)) drop-shadow(0 10px 24px rgba(28,30,33,0.08));
|
|
175
|
+
--filter-press: ;
|
|
176
|
+
--filter-float: drop-shadow(0 4px 10px rgba(28,30,33,0.06)) drop-shadow(0 24px 48px rgba(28,30,33,0.10));
|
|
177
|
+
--filter-glass: drop-shadow(0 10px 30px rgba(28,30,33,0.10));
|
|
178
|
+
--notch-sm: 10px;
|
|
179
|
+
--notch-md: 20px;
|
|
180
|
+
--notch-lg: 36px;
|
|
181
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# AlertDialog
|
|
2
|
+
|
|
3
|
+
A modal that interrupts to confirm something that can't be undone, on Radix AlertDialog.
|
|
4
|
+
|
|
5
|
+
Compose `AlertDialog`, `AlertDialogTrigger`, `AlertDialogContent` (`size`: `default` or `sm`), a header with `AlertDialogTitle` and `AlertDialogDescription`, and a footer with `AlertDialogCancel` and `AlertDialogAction`.
|
|
6
|
+
|
|
7
|
+
- Only for destructive or irreversible actions. Everything else is a Dialog or needs no confirmation.
|
|
8
|
+
- The title asks the question ("Delete this project?"); the description says what is lost.
|
|
9
|
+
- The action repeats the verb ("Delete project") with `variant="destructive"`. Never "OK".
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Amount
|
|
2
|
+
|
|
3
|
+
A money figure in tabular Space Mono, signed and colored by direction: `+1,234.56 USD`, `−42.05 USD`.
|
|
4
|
+
|
|
5
|
+
Provide `minor` (an integer amount in minor units, as a BigInt), `currency` (ISO 4217) and `minorUnits` (decimal places). Optional `sign` (`always` default, `auto`, `never`), `code` (show the currency code, default true), `size` (`sm` = `hud-num`, `md` = `amount-md` default, `lg` = `amount-lg`, `xl` = `amount-xl`) and `tone` (`auto`, `plain` ink, `muted` ink-soft).
|
|
6
|
+
|
|
7
|
+
- Positive is `income-ink`, negative `expense-ink`, zero `ink`. The sign is always printed, so color is never the only cue.
|
|
8
|
+
- Negatives use a true minus (−), which lines up with + in mono.
|
|
9
|
+
- Never format money from floats; amounts are integer minor units end to end.
|
|
10
|
+
- Use `muted` for a secondary figure, like the other currency of a transfer.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# IconPicker and ColorPicker
|
|
2
|
+
|
|
3
|
+
Swatch grids for choosing a category's glyph and palette color.
|
|
4
|
+
|
|
5
|
+
Both take `value` and `onChange`. `IconPicker` offers the curated Lucide set; `ColorPicker` offers the sixteen `cat-*` colors.
|
|
6
|
+
|
|
7
|
+
- They're native radio groups under the swatches, so arrow keys move the choice.
|
|
8
|
+
- Show a CategoryIcon preview next to them so people see the pair together.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Badge
|
|
2
|
+
|
|
3
|
+
Stadium chip in HUD type for states and counts.
|
|
4
|
+
|
|
5
|
+
Provide `children` (one or two words). Optional `variant`.
|
|
6
|
+
|
|
7
|
+
- `default`: `shell-recess` fill, like a slot molded into the part.
|
|
8
|
+
- `signal`: the one badge that matters most. `tint`: in-progress states. `outline`: quiet, on shell.
|
|
9
|
+
- `secondary`: a raised `shell` chip with `shadow-mold`, for use on `canvas` or `shell-recess`.
|
|
10
|
+
- `destructive`: `danger` text on `danger-tint`, for errors.
|
|
11
|
+
- Text is always uppercase `hud`. Keep it short; a sentence belongs in body text.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# BudgetMeter
|
|
2
|
+
|
|
3
|
+
How much of a budget is spent: a sunken `shell-recess` track (`shadow-press`) filled to the share spent, and a thin `ink` tick with a diamond head where today falls in the period.
|
|
4
|
+
|
|
5
|
+
Provide `spent` and `budget` (minor units, BigInt), `label` (its accessible name, e.g. "Food budget") and optionally `elapsed` (0–1, the share of the period that has passed; omit it outside the period to hide the tick). `size` is `md` (12px track) or `sm` (8px, for history rows).
|
|
6
|
+
|
|
7
|
+
- The fill is `signal` while within budget and turns `danger` once spending passes it; it stops at the end of the track.
|
|
8
|
+
- Fill ahead of the tick means spending is ahead of the calendar.
|
|
9
|
+
- It's a `meter` for assistive tech, valued in percent spent.
|
|
10
|
+
- Always pair it with the figures in text ("12.34 USD of 100.00 USD spent", "Over by 2.34 USD"); color is never the only cue.
|
|
11
|
+
- Put the period's dates under it, and a "◆ Today" caption under the tick.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
Stadium-shaped molded button: signal orange for the main action, white shell for the second, and quieter variants for everything else.
|
|
4
|
+
|
|
5
|
+
Provide `children` (label, sentence case, 1–3 words) and `onClick`. For a link, pass `asChild` and put an `<a>` (or your router link) inside. Optional `variant`, `size` and `arrow` (adds a mono →).
|
|
6
|
+
|
|
7
|
+
- `default`: `signal` fill, `ink` label, `shadow-mold`. The main action of a block: "Start free trial", "Save changes". Never white text on signal.
|
|
8
|
+
- `secondary`: `shell` fill with `shadow-mold`, for the second action, and the only button on a signal block.
|
|
9
|
+
- `outline`: `shell` with a `seam` border, for form triggers and toolbar actions.
|
|
10
|
+
- `ghost`: no fill until hover, for icon buttons and row actions.
|
|
11
|
+
- `destructive`: `danger` fill with `shell` text. Only for the action that deletes.
|
|
12
|
+
- `link`: `signal-ink` text with an underline on hover.
|
|
13
|
+
- `bracket`: text wrapped in `signal-ink` mono brackets, `[ GitHub ]`. Inline links on cards and in the footer.
|
|
14
|
+
- Pressed: moves down 1px and swaps to `shadow-press`. Focus: a `signal-ink` ring.
|
|
15
|
+
- Height `control-height` (44px) by default, `radius-full`, `label` style. Sizes `xs`, `sm`, `lg` and the square `icon` sizes are for dense toolbars.
|
|
16
|
+
- Icons are Lucide at `strokeWidth={1.25}`, before the label.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Calendar
|
|
2
|
+
|
|
3
|
+
The month grid on its own, on react-day-picker. DatePicker wraps it in a field.
|
|
4
|
+
|
|
5
|
+
Takes react-day-picker props: `mode` (`single`, `multiple`, `range`), `selected`, `onSelect`, `month`, `onMonthChange`, `disabled`. Weeks start on Monday and outside days show by default.
|
|
6
|
+
|
|
7
|
+
- The caption is `hud` ("OCTOBER 2026"), weekdays are `hud-sm` in `ink-soft`.
|
|
8
|
+
- Days are 36px stadiums in tabular mono. Selected: `signal` fill with `ink` text. Today: a `signal-ink` ring.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CategoryIcon
|
|
2
|
+
|
|
3
|
+
A category's Lucide glyph in `ink` on a disc of its palette color: the marker beside every transaction, budget and category row.
|
|
4
|
+
|
|
5
|
+
Provide `icon` (a Lucide name from the curated set, e.g. `shopping-cart`) and `color` (a `cat-*` palette token). Optional `size` (`sm` 28px, `md` 36px default, `lg` 48px) and `label` (accessible name; omit when the category name sits next to it). `ColorDot` is the 10px dot used for labels.
|
|
6
|
+
|
|
7
|
+
- Glyphs are 1.25px Lucide strokes in `ink`; every `cat-*` color keeps ink at 5.8:1 or better.
|
|
8
|
+
- The disc is molded: a soft top highlight and bottom shade, no outline.
|
|
9
|
+
- Transfers use `arrow-left-right` on `cat-slate`.
|
|
10
|
+
- Pair it with the category name; color alone never identifies a category.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Charts
|
|
2
|
+
|
|
3
|
+
Recharts wrapped in Module/01 marks: thin lines, 4px rounded bar ends, a dashed `seam` grid, mono axis ticks in `ink-soft`, and a `hud-mark` baseline. Every chart has a hover tooltip: a `shell` card with a `hud-sm` title and tabular values in `ink`.
|
|
4
|
+
|
|
5
|
+
- `BalanceChart` — one series over time: a 2px `chart-line` stroke over a `signal-tint` area, with a crosshair. A single series has no legend; the panel title names it.
|
|
6
|
+
- `FlowChart` — income above the baseline in `chart-income`, expenses below it in `chart-expense`. Direction is a second cue besides color, and a legend sits under the plot. Pass `only` for a single series (no legend).
|
|
7
|
+
- `DonutChart` — shares by category color, clockwise from 12 o'clock. The top 7 categories plus "Other" (`cat-slate`, `ellipsis` icon), 2px `shell` gaps between slices, and the total in the center (it shrinks to fit the hole). Every slice of 2% or more gets a callout outside the ring: a 1.5px leader in the slice color, the category's `CategoryIcon` (pass `icon` on each slice; without icons the marker is a color dot), and the share in `hud-sm` `ink` past it. Callouts are pushed apart around the ring so they never overlap, and the leader leaves from inside its own slice. On a narrow panel the shares drop out before the ring gets too small. Labels never sit on slices; still put the ranked list next to it, since it names every slice.
|
|
8
|
+
|
|
9
|
+
Each takes `money` (`currency`, `minorUnits`) and amounts as BigInt minor units; tooltips format them with the sign and currency.
|
|
10
|
+
|
|
11
|
+
- Axis ticks use compact numbers (`11.52K`) with enough digits that neighbours never read the same.
|
|
12
|
+
- Never use two y-axes. Text never takes a series color.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Checkbox
|
|
2
|
+
|
|
3
|
+
A small sunken square that fills `signal` when checked.
|
|
4
|
+
|
|
5
|
+
Takes Radix Checkbox props: `checked`, `defaultChecked`, `onCheckedChange`, `disabled`. Pair it with a Label through `id` and `htmlFor`.
|
|
6
|
+
|
|
7
|
+
- Unchecked it's a `shadow-press` well; checked it carries an `ink` check on `signal`.
|
|
8
|
+
- Use it for options that apply on submit. A setting that applies at once is a Toggle.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Combobox
|
|
2
|
+
|
|
3
|
+
A searchable single-choice picker: a molded `shell` stadium trigger opening a `shell` popover with a search well and a list. Use it for categories, currencies and any list too long for a Select.
|
|
4
|
+
|
|
5
|
+
Provide `value` and `onChange` (option keys), `options` (or `groups` with headings), `getKey`, and `renderOption`. Optional `getSearchText`, `renderValue`, `placeholder`, `searchPlaceholder`, `emptyText`, `footer` (e.g. "Edit categories →" in `hud-sm` `signal-ink`), `id`, `invalid`.
|
|
6
|
+
|
|
7
|
+
- The trigger shows the selected option (glyph + name) or the placeholder in `ink-soft`, with a `chevrons-up-down` glyph at 1.25px.
|
|
8
|
+
- Options are rows with the option's own glyph; the selected one carries a check at the end.
|
|
9
|
+
|
|
10
|
+
## Form flow
|
|
11
|
+
|
|
12
|
+
Forms built from kit controls move focus the way people fill them in, with no per-form wiring:
|
|
13
|
+
|
|
14
|
+
- `Dialog` and `Sheet` open with focus on their first field (not the close button or tabs). If that field is an empty Combobox, its list opens too, once the entrance animation has finished.
|
|
15
|
+
- **Type to search**: a letter on the focused trigger opens the list with that letter as the search.
|
|
16
|
+
- **Pick to advance**: choosing an option (click or Enter) closes the list and focuses the next field. `Select` and `DatePicker` do the same. Escape returns to the trigger.
|
|
17
|
+
- Tab follows layout order, so lay fields out in the order they are filled.
|
|
18
|
+
- Rejected fields use the fault feedback (see Field).
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Command
|
|
2
|
+
|
|
3
|
+
A searchable list on cmdk: the engine inside Combobox, and a command palette on its own.
|
|
4
|
+
|
|
5
|
+
Compose `Command` with `CommandInput`, `CommandList`, `CommandEmpty`, `CommandGroup` and `CommandItem`. `CommandDialog` puts it in a Dialog.
|
|
6
|
+
|
|
7
|
+
- Reach for Combobox or MultiCombobox for form fields. Use Command directly for a palette or a custom picker.
|
|
8
|
+
- Group headings are `hud-sm`; the empty state is one plain sentence.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Crosshair
|
|
2
|
+
|
|
3
|
+
12px plus-mark used as a registration mark on corners and image frames.
|
|
4
|
+
|
|
5
|
+
Optional `tone` (`signal` uses `signal-ink`), `className`, `style` for positioning.
|
|
6
|
+
|
|
7
|
+
- Default color `hud-mark`. Put one in a corner of panels and two on opposite corners of media frames; never more than two per part.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# CtaBanner
|
|
2
|
+
|
|
3
|
+
The big signal orange call to action at the foot of the page: a headline, a line of text, a grill and one shell button.
|
|
4
|
+
|
|
5
|
+
Provide `title` and `action` (a `secondary` Button), optional `text` and `code` (microprint).
|
|
6
|
+
|
|
7
|
+
- `signal` fill, `ink` text, `radius-xl` with a `notch-lg` cut, grill slots in `signal-shade`.
|
|
8
|
+
- Once per page, before the footer. It's the largest orange surface; let it be.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DatePicker
|
|
2
|
+
|
|
3
|
+
A calendar date in a sunken well that opens a Module/01 month calendar, with Today and Yesterday shortcuts. `Calendar` is the month grid on its own.
|
|
4
|
+
|
|
5
|
+
Provide `value` and `onChange` as `"YYYY-MM-DD"` strings (calendar dates have no time zone), plus `id` for its Field. Optional `placeholder` and `disabled`. `Calendar` takes react-day-picker props (`mode="single"`, `selected`, `onSelect`, `month`, `onMonthChange`).
|
|
6
|
+
|
|
7
|
+
- The field matches TextInput: `shell-recess` well, `shadow-press`, `radius-md`, `control-height`, a 1.25px `calendar-days` glyph in `ink-soft`. Open, it takes a `signal-ink` border.
|
|
8
|
+
- The label stays short: "Today, Oct 29", "Yesterday, Oct 28", "Tue, Oct 20"; the year appears only outside the current year.
|
|
9
|
+
- The calendar sits in a `shell` popover with `shadow-float` and `radius-lg`. The caption is `hud` ("OCTOBER 2026"), weekdays are `hud-sm` in `ink-soft`, and weeks start on Monday.
|
|
10
|
+
- Days are 36px stadiums in tabular mono. Selected: `signal` fill with `ink` text and `shadow-mold`. Today: a `signal-ink` ring. Other months' days: `hud-mark`.
|
|
11
|
+
- Month arrows are small molded `shell` stadiums at the caption's right.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Dialog
|
|
2
|
+
|
|
3
|
+
A centered modal part over an `overlay` scrim, on Radix Dialog.
|
|
4
|
+
|
|
5
|
+
Compose `Dialog`, `DialogTrigger` and `DialogContent` with a `DialogHeader` (`DialogTitle`, `DialogDescription`) and a `DialogFooter`. `showCloseButton={false}` on the content drops the corner close button.
|
|
6
|
+
|
|
7
|
+
- For short, focused tasks: a confirmation with a field or two. Longer editors open in a Sheet.
|
|
8
|
+
- It opens with focus on its first field, not the close button. Don't add `autoFocus` inside.
|
|
9
|
+
- The title names the task in plain words; the main action sits last in the footer.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# DropdownMenu
|
|
2
|
+
|
|
3
|
+
A menu of actions that opens from a button, on Radix DropdownMenu.
|
|
4
|
+
|
|
5
|
+
Compose `DropdownMenu`, `DropdownMenuTrigger` and `DropdownMenuContent` with `DropdownMenuItem`s. Labels, separators, groups, checkbox and radio items and submenus are available. `variant="destructive"` marks the deleting action.
|
|
6
|
+
|
|
7
|
+
- Items are verbs in sentence case ("Rename", "Move to…"), with an optional Lucide glyph before the label.
|
|
8
|
+
- Put the destructive item last, after a separator.
|
|
9
|
+
- For actions. Choosing a value is a Select.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Field
|
|
2
|
+
|
|
3
|
+
A form row: label, one control, then an error or help line. `TextInput` is the plain text well that goes in it; `FieldLabel` is the label on its own (FxConverter uses it).
|
|
4
|
+
|
|
5
|
+
Provide `label` and `children` (the control), and `htmlFor` with the control's `id`. Optional `error` (turns the label `danger` with a fault LED; the message is announced to screen readers, not shown) or `help` (in `ink-soft`).
|
|
6
|
+
|
|
7
|
+
- Labels use `body-sm` in `ink-soft`, sentence case, above the control with a 6px gap.
|
|
8
|
+
- `TextInput` matches MoneyInput: `shell-recess` well, `shadow-press`, `radius-md`, `control-height`, `body-md` text.
|
|
9
|
+
- Put "(optional)" in the label of optional fields instead of marking required ones.
|
|
10
|
+
- Forms open in a side sheet on desktop and a bottom sheet on phones.
|
|
11
|
+
|
|
12
|
+
## Fault feedback
|
|
13
|
+
|
|
14
|
+
When a submit is rejected, the offending control reacts like a part refusing input. Call `fault(idOrElement)`, then set the Field's `error`.
|
|
15
|
+
|
|
16
|
+
- **Servo jitter**: 320ms, ±3px horizontally, stepped (it jumps between positions, no easing), so it reads mechanical rather than wobbly.
|
|
17
|
+
- **Ping**: one 2px `danger` ring leaves the part's outline and fades over 700ms, like a radar ping. No blur, no glow.
|
|
18
|
+
- **Fault label**: the label turns `danger` and gains a 6px `danger` LED with a `danger-tint` halo that blinks three times and stays lit. No line under the control; the toast carries the message and screen readers hear it.
|
|
19
|
+
- Focus moves to the control. A MoneyInput faults as one part; an FxConverter faults all three wells.
|
|
20
|
+
- Editing the control clears its error. The toast still reports the problem too.
|
|
21
|
+
- Reduced motion: no jitter or ping, just a short static `danger` outline.
|
|
22
|
+
- Server rejections that name a field (`rate: amounts don't match…`) fault that field the same way.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Footer
|
|
2
|
+
|
|
3
|
+
Page foot: a tick ruler, microprint on either side and bracketed links in the middle.
|
|
4
|
+
|
|
5
|
+
Provide `links` (`[{label, href}]`), and optional `left` and `right` microprint (build stamp, copyright) and `rulerLabels`.
|
|
6
|
+
|
|
7
|
+
- Sits on `canvas`, no fill change. Microprint here is readable, so it uses `ink-soft`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# FxConverter
|
|
2
|
+
|
|
3
|
+
Three linked inputs for a cross-currency transfer: amount sent, amount received and the rate. Editing one recomputes the least recently edited of the other two.
|
|
4
|
+
|
|
5
|
+
Provide `from` and `to` (`{code, minorUnits}`), a controlled `value` (start from `fx.initialFxState()`) and `onChange`. Read the result with `fx.fxResult(value, {fromMinorUnits, toMinorUnits})`: integer minor units for both sides plus the rate at 10 decimals, or null while incomplete.
|
|
6
|
+
|
|
7
|
+
- The rule: `to = from × rate`, `from = to ÷ rate`, `rate = to ÷ from`. The field touched longest ago is overwritten by the other two. Before anything is touched, typing both amounts derives the rate, the usual case when copying a bank statement.
|
|
8
|
+
- The field that will be recomputed next shows a small `auto` mark in `hud-mark`.
|
|
9
|
+
- Rate means target units per one source unit, labelled "Rate (UYU per USD)". Computed rates show 6 decimals and keep 10 for storage.
|
|
10
|
+
- Amounts round half-even to each currency's decimals.
|
|
11
|
+
- Same-currency transfers show one MoneyInput instead.
|
|
12
|
+
- Three columns from 32rem of its own width (a container query), stacked below that, so it fits sheets and cards at any viewport.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# GlassPanel
|
|
2
|
+
|
|
3
|
+
Frosted clear-plastic panel, like the UFO dome or a clear case, that lets what is behind it show through.
|
|
4
|
+
|
|
5
|
+
Provide `children`. Use over something with color or texture (a studio image, the signal block, a grill); on plain canvas it disappears.
|
|
6
|
+
|
|
7
|
+
- `glass` fill, 16px backdrop blur, `shadow-glass` edge highlight, `radius-lg`.
|
|
8
|
+
- At most one or two per page beyond the nav bar. Text on it stays `ink`.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Grill
|
|
2
|
+
|
|
3
|
+
A row of stadium slots like a pegboard or speaker grill.
|
|
4
|
+
|
|
5
|
+
Optional `count` (default 6), `slotWidth`, `gap`, `tone` (`recess` default, `signal` for orange slots on shell, `on-signal` for slots cut into a signal surface).
|
|
6
|
+
|
|
7
|
+
- Slots are `radius-full`, sunken with `shadow-press`. Use as a texture on the hero side, the call-to-action block and card corners, a few slots at a time.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Hero
|
|
2
|
+
|
|
3
|
+
The opening shell: the page title or product name in Michroma, a subtitle and intro, actions, a spec row, and a studio image frame with grill and coordinates.
|
|
4
|
+
|
|
5
|
+
Provide `title`. Optional `subtitle` (mono, `signal-ink`), `lead` (one or two sentences), `actions` (Buttons), `specs` (SpecReadout items), `image` (an `<img>`: a product shot, a screenshot, a portrait), `imageLabel`, `serial`, `coords` (microprint), or `media` to replace the image frame with your own.
|
|
6
|
+
|
|
7
|
+
- `shell` part with `radius-xl` and a `notch-lg` cut, a `signal` hinge tab on its top edge, a signal crosshair bottom-right.
|
|
8
|
+
- Title in `display-xl` (`display-lg` on phones); lead in `body-lg` `ink-soft`. The image sits on a `studio` backdrop; no image shows a crosshair placeholder.
|
|
9
|
+
- One per page. It renders the page `h1`.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# HudLabel
|
|
2
|
+
|
|
3
|
+
Mono overline with a signal code chip, a label and a seam rule that runs to an end marker.
|
|
4
|
+
|
|
5
|
+
Provide `children` (label) and optional `code` (e.g. `S-02`), `end` (right-side microprint like `02/04`), `rule={false}` to drop the line.
|
|
6
|
+
|
|
7
|
+
- The code chip is `signal` with `ink` text, `radius-xs`. Labels in `ink-soft`.
|
|
8
|
+
- Sits `space-3` above every section heading and at the top of large panels.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Input
|
|
2
|
+
|
|
3
|
+
The plain text well: `shell-recess` fill, `shadow-press`, `radius-md`, `control-height`.
|
|
4
|
+
|
|
5
|
+
Takes every native `<input>` prop. Wrap it in a Field and pass the same `id` as the Field's `htmlFor`.
|
|
6
|
+
|
|
7
|
+
- Text is `body-md` (16px), so phones don't zoom in on focus.
|
|
8
|
+
- Focus adds a `signal-ink` ring. `aria-invalid` tints the well `danger-tint`.
|
|
9
|
+
- Placeholders are examples ("Write a note"), in `ink-soft`. They never replace the label.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# MediaCard
|
|
2
|
+
|
|
3
|
+
A card shot like a product: studio media frame with crosshairs and a code, kind and status, title, description, tags and bracket links, with an orange hinge tab. Use it for products, features, case studies, articles or projects.
|
|
4
|
+
|
|
5
|
+
Provide `title`, and optional `code` (`C-01`), `image`, `imageAlt`, `kind` ("Product", "Case study"), `status` ("Live" gets a green LED; others a tint tag), `description` (1–2 sentences), `tags`, `links` (`[{label, href}]`), `hingeLeft`.
|
|
6
|
+
|
|
7
|
+
- A Panel at `notch-md` with 14px inset; media on `studio` at `radius-md`.
|
|
8
|
+
- Lay out two or three across with `space-8` gaps; vary `hingeLeft` so tabs don't line up.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# MoneyInput
|
|
2
|
+
|
|
3
|
+
A sunken decimal well for amounts, right-aligned in tabular mono, with the currency code as a suffix.
|
|
4
|
+
|
|
5
|
+
Provide `currency` and the usual input props (`value`, `onChange`, `id`). The value is the raw string the person typed; parse it with `money.parseAmount(value, minorUnits)`, which returns integer minor units or null.
|
|
6
|
+
|
|
7
|
+
- `shell-recess` fill with `shadow-press`, `radius-md`, `control-height`. Focus draws a `signal-ink` border and a soft ring.
|
|
8
|
+
- Opens the decimal keypad on phones (`inputMode="decimal"`). On phones the figure grows to `amount-lg`: inputs under 16px make mobile browsers zoom in on focus. Search fields in pickers use `body-md` on phones for the same reason.
|
|
9
|
+
- Invalid (`aria-invalid`): `danger` border on a `danger-tint` well; put the reason under it in a Field.
|
|
10
|
+
- Amounts are entered positive; the transaction kind gives the direction.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# MultiCombobox
|
|
2
|
+
|
|
3
|
+
A searchable multi-choice picker for "which ones count" fields, like a report's teams and tags. Selecting nothing means all, and the trigger then reads `allLabel` ("All teams").
|
|
4
|
+
|
|
5
|
+
Takes the same option props as Combobox (`options` or `groups`, `getKey`, `getSearchText`, `renderOption`), plus `value` (selected keys), `allLabel` and `noun` (plural, for "3 teams").
|
|
6
|
+
|
|
7
|
+
- The list stays open while you toggle options, with a check on each selected one. Escape or a click outside closes it back onto the trigger, and Tab moves on to the next field.
|
|
8
|
+
- Typing on the focused trigger opens it with that text as the search, like Combobox.
|
|
9
|
+
- With one option selected, the trigger shows it; with more, a count.
|
|
10
|
+
- "Use all …" under the list clears the selection.
|
|
11
|
+
- Use it in forms; for report filters in a toolbar, a smaller secondary button works the same way.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# NavBar
|
|
2
|
+
|
|
3
|
+
Floating frosted stadium bar: brand on the left, numbered links, and an end slot.
|
|
4
|
+
|
|
5
|
+
Provide `brand` and `links` (`[{label, href, active}]`, 3–5). Optional `serial` (microprint under the brand), `end` (a StatusLed, a Button or a user menu) and `renderLink` to render links with your router.
|
|
6
|
+
|
|
7
|
+
- `glass` with blur and `shadow-glass`, `radius-full`, `nav-height` (64px). Float it `space-4` from the top, sticky.
|
|
8
|
+
- Links get mono numbers `01` `02`… on wide screens; the active one turns `signal-ink`.
|
|
9
|
+
- Mark a link `desktopOnly` when the end slot offers it on phones.
|
|
10
|
+
- It needs color or content scrolling behind it to read as glass.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Panel
|
|
2
|
+
|
|
3
|
+
The molded white part: a rounded shell with one hard notched corner, a serial in microprint and a corner crosshair.
|
|
4
|
+
|
|
5
|
+
Provide `children`. Optional `serial` (microprint top-left, e.g. `W-01 · USD`), `notch` (`md` default, `sm`, `lg`, or `false`), `recess` (sunken `shell-recess` fill), `cross` (corner crosshair), `hinge` (left offset of a signal hinge tab) and `bodyClassName` (padding and layout of the inner part).
|
|
6
|
+
|
|
7
|
+
- `shell` fill, `radius-lg`, padding `space-8`, lifted by `shadow-float` (as a drop-shadow so the notch keeps it). The notch sits top-right.
|
|
8
|
+
- One notch per part, one hinge per part. Vary the hinge position from card to card.
|
|
9
|
+
- Lists live in one Panel with `bodyClassName="p-0"`; summary tiles are small Panels with `notch="sm"`.
|
|
10
|
+
- `HingeTab` is the tab on its own, for custom parts.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Popover
|
|
2
|
+
|
|
3
|
+
A floating `shell` part anchored to a trigger, on Radix Popover.
|
|
4
|
+
|
|
5
|
+
Compose `Popover`, `PopoverTrigger` and `PopoverContent` (`align`, `side`, `sideOffset`). `PopoverHeader`, `PopoverTitle` and `PopoverDescription` give it a heading.
|
|
6
|
+
|
|
7
|
+
- `shell` fill, `radius-lg`, `shadow-float`.
|
|
8
|
+
- For pickers and small forms. Use the kit's pickers (Combobox, DatePicker) before building one by hand.
|