@wealthx/shadcn 1.2.0 → 1.2.2
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/.turbo/turbo-build.log +93 -84
- package/CHANGELOG.md +13 -0
- package/dist/{chunk-NXA3CZ7A.mjs → chunk-4Y6R4WEC.mjs} +2 -0
- package/dist/{chunk-AH52LG6N.mjs → chunk-7MMXNK3C.mjs} +2 -0
- package/dist/{chunk-4CX4SBRO.mjs → chunk-A6AAWBPF.mjs} +1 -1
- package/dist/{chunk-WOEHFRGB.mjs → chunk-BDYZCBRT.mjs} +4 -4
- package/dist/{chunk-5QQVZTVZ.mjs → chunk-BL3DXM2X.mjs} +2 -1
- package/dist/{chunk-PMB3A7V3.mjs → chunk-EI5F6FMT.mjs} +1 -1
- package/dist/{chunk-QVKWW6KE.mjs → chunk-GGM2UYGG.mjs} +2 -1
- package/dist/{chunk-KMCGSZTX.mjs → chunk-JNQORUPP.mjs} +2 -1
- package/dist/{chunk-PJHPSRYD.mjs → chunk-K3JYD4IU.mjs} +2 -1
- package/dist/{chunk-CSDO6VBW.mjs → chunk-LBMRIB3G.mjs} +10 -10
- package/dist/{chunk-SMQ3DG25.mjs → chunk-LHYCMLVA.mjs} +2 -1
- package/dist/{chunk-NLCKVHWB.mjs → chunk-OPNQAVVH.mjs} +2 -1
- package/dist/{chunk-2SF672SZ.mjs → chunk-RYCLWMZ7.mjs} +2 -1
- package/dist/{chunk-PG6K5XEC.mjs → chunk-S4QRUQNW.mjs} +1 -1
- package/dist/{chunk-YKPROFLB.mjs → chunk-SIZMLSRU.mjs} +2 -1
- package/dist/{chunk-LE6YFY6D.mjs → chunk-SWGT756Z.mjs} +2 -1
- package/dist/{chunk-6FCGKSZX.mjs → chunk-TS2ZX2VS.mjs} +2 -0
- package/dist/chunk-U4NDAF2P.mjs +207 -0
- package/dist/{chunk-DOH3EHX7.mjs → chunk-U5X52X37.mjs} +1 -1
- package/dist/{chunk-WA6O6EUR.mjs → chunk-URGMJAE3.mjs} +9 -9
- package/dist/{chunk-ZRO5JO3H.mjs → chunk-UT4KJR7V.mjs} +48 -12
- package/dist/{chunk-SYOD63OZ.mjs → chunk-VGSESELX.mjs} +2 -2
- package/dist/{chunk-RRBS6D63.mjs → chunk-VPBN3WOO.mjs} +2 -1
- package/dist/chunk-ZRSDX6OW.mjs +385 -0
- package/dist/chunk-ZSHYDDRB.mjs +249 -0
- package/dist/components/ui/add-column-modal.mjs +3 -3
- package/dist/components/ui/add-lead-modal.mjs +2 -2
- package/dist/components/ui/backoffice-alert-history-chart.js +1 -1
- package/dist/components/ui/backoffice-alert-history-chart.mjs +1 -1
- package/dist/components/ui/backoffice-contact-history-chart.js +1 -1
- package/dist/components/ui/backoffice-contact-history-chart.mjs +1 -1
- package/dist/components/ui/borrowing-capacity-line-chart.js +1 -0
- package/dist/components/ui/borrowing-capacity-line-chart.mjs +1 -1
- package/dist/components/ui/cash-balance-line-chart.js +1 -0
- package/dist/components/ui/cash-balance-line-chart.mjs +1 -1
- package/dist/components/ui/cashflow-bar-chart.js +1 -1
- package/dist/components/ui/cashflow-bar-chart.mjs +1 -1
- package/dist/components/ui/color-picker.js +417 -0
- package/dist/components/ui/color-picker.mjs +22 -0
- package/dist/components/ui/data-table.js +44 -12
- package/dist/components/ui/data-table.mjs +1 -1
- package/dist/components/ui/date-picker.mjs +2 -2
- package/dist/components/ui/expense-bar-chart.js +1 -1
- package/dist/components/ui/expense-bar-chart.mjs +1 -1
- package/dist/components/ui/form-primitives.js +4 -4
- package/dist/components/ui/form-primitives.mjs +3 -3
- package/dist/components/ui/income-bar-chart.js +1 -1
- package/dist/components/ui/income-bar-chart.mjs +1 -1
- package/dist/components/ui/opportunity-edit-modals.js +4 -4
- package/dist/components/ui/opportunity-edit-modals.mjs +8 -8
- package/dist/components/ui/opportunity-summary-tab.js +4 -4
- package/dist/components/ui/opportunity-summary-tab.mjs +9 -9
- package/dist/components/ui/pipeline-board.js +4 -4
- package/dist/components/ui/pipeline-board.mjs +3 -3
- package/dist/components/ui/pipeline-dialogs.js +4 -4
- package/dist/components/ui/pipeline-dialogs.mjs +5 -5
- package/dist/components/ui/property-cashflow-doughnut-chart.js +1 -1
- package/dist/components/ui/property-cashflow-doughnut-chart.mjs +1 -1
- package/dist/components/ui/property-debt-equity-doughnut-chart.js +1 -1
- package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +1 -1
- package/dist/components/ui/property-mobile-estimate-line-chart.js +1 -0
- package/dist/components/ui/property-mobile-estimate-line-chart.mjs +1 -1
- package/dist/components/ui/sidebar-nav.js +540 -0
- package/dist/components/ui/sidebar-nav.mjs +11 -0
- package/dist/components/ui/stepper.js +283 -0
- package/dist/components/ui/stepper.mjs +18 -0
- package/dist/components/ui/toggle-group.js +4 -4
- package/dist/components/ui/toggle-group.mjs +2 -2
- package/dist/components/ui/toggle.js +4 -4
- package/dist/components/ui/toggle.mjs +1 -1
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +1 -1
- package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +1 -1
- package/dist/components/ui/transactions-income-expense-bar-chart.js +1 -1
- package/dist/components/ui/transactions-income-expense-bar-chart.mjs +1 -1
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +1 -1
- package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +1 -1
- package/dist/index.js +2154 -1302
- package/dist/index.mjs +115 -83
- package/dist/lib/typography.js +10 -10
- package/dist/lib/typography.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +16 -1
- package/src/components/index.tsx +41 -0
- package/src/components/ui/backoffice-alert-history-chart.tsx +2 -1
- package/src/components/ui/backoffice-contact-history-chart.tsx +2 -1
- package/src/components/ui/borrowing-capacity-line-chart.tsx +2 -0
- package/src/components/ui/cash-balance-line-chart.tsx +2 -0
- package/src/components/ui/cashflow-bar-chart.tsx +2 -1
- package/src/components/ui/color-picker.tsx +307 -0
- package/src/components/ui/data-table.tsx +91 -11
- package/src/components/ui/expense-bar-chart.tsx +2 -1
- package/src/components/ui/income-bar-chart.tsx +2 -1
- package/src/components/ui/property-cashflow-doughnut-chart.tsx +2 -1
- package/src/components/ui/property-debt-equity-doughnut-chart.tsx +2 -1
- package/src/components/ui/property-mobile-estimate-line-chart.tsx +2 -0
- package/src/components/ui/sidebar-nav.tsx +517 -0
- package/src/components/ui/stepper.tsx +347 -0
- package/src/components/ui/toggle.tsx +4 -4
- package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +2 -1
- package/src/components/ui/transactions-income-expense-bar-chart.tsx +2 -1
- package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +2 -1
- package/src/lib/typography.ts +11 -11
- package/src/styles/globals.css +19 -19
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +3 -0
- package/dist/{chunk-KUDCQ4FI.mjs → chunk-5MEWU56Z.mjs} +3 -3
- package/dist/{chunk-PR6V5XKM.mjs → chunk-CGH4DRNG.mjs} +3 -3
- package/dist/{chunk-3WMX6KWS.mjs → chunk-Y4QFWRNR.mjs} +8 -8
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Check } from "lucide-react";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Stepper — WealthX Design System
|
|
7
|
+
*
|
|
8
|
+
* Built from scratch (no Base UI primitive). Supports horizontal and vertical
|
|
9
|
+
* orientations with active, completed, and error step states.
|
|
10
|
+
*
|
|
11
|
+
* Figma: https://www.figma.com/design/9V9F0NGVsif8LGmEhVjOcT/Design-System---shadcn
|
|
12
|
+
*
|
|
13
|
+
* Composition:
|
|
14
|
+
* <Stepper activeStep={1}>
|
|
15
|
+
* <Step><StepItem label="..." description="..." /></Step>
|
|
16
|
+
* ...
|
|
17
|
+
* </Stepper>
|
|
18
|
+
*
|
|
19
|
+
* Vertical with expandable content:
|
|
20
|
+
* <Stepper activeStep={1} orientation="vertical">
|
|
21
|
+
* <Step>
|
|
22
|
+
* <div className="flex gap-4">
|
|
23
|
+
* <StepIndicator />
|
|
24
|
+
* <StepLabel description="...">Label</StepLabel>
|
|
25
|
+
* </div>
|
|
26
|
+
* <StepContent>...</StepContent>
|
|
27
|
+
* </Step>
|
|
28
|
+
* </Stepper>
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
// Context
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
|
|
35
|
+
interface StepperContextValue {
|
|
36
|
+
activeStep: number;
|
|
37
|
+
orientation: "horizontal" | "vertical";
|
|
38
|
+
totalSteps: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const StepperContext = React.createContext<StepperContextValue>({
|
|
42
|
+
activeStep: 0,
|
|
43
|
+
orientation: "horizontal",
|
|
44
|
+
totalSteps: 0,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
interface StepContextValue {
|
|
48
|
+
index: number;
|
|
49
|
+
isActive: boolean;
|
|
50
|
+
isCompleted: boolean;
|
|
51
|
+
isFirst: boolean;
|
|
52
|
+
isLast: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const StepContext = React.createContext<StepContextValue>({
|
|
56
|
+
index: 0,
|
|
57
|
+
isActive: false,
|
|
58
|
+
isCompleted: false,
|
|
59
|
+
isFirst: true,
|
|
60
|
+
isLast: false,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
// Stepper
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
|
|
67
|
+
export interface StepperProps {
|
|
68
|
+
/** 0-based index of the currently active step. */
|
|
69
|
+
activeStep?: number;
|
|
70
|
+
orientation?: "horizontal" | "vertical";
|
|
71
|
+
className?: string;
|
|
72
|
+
children: React.ReactNode;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function Stepper({
|
|
76
|
+
activeStep = 0,
|
|
77
|
+
orientation = "horizontal",
|
|
78
|
+
className,
|
|
79
|
+
children,
|
|
80
|
+
}: StepperProps) {
|
|
81
|
+
const totalSteps = React.Children.count(children);
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<StepperContext.Provider value={{ activeStep, orientation, totalSteps }}>
|
|
85
|
+
<div
|
|
86
|
+
data-slot="stepper"
|
|
87
|
+
className={cn(
|
|
88
|
+
"font-sans",
|
|
89
|
+
orientation === "horizontal"
|
|
90
|
+
? "flex w-full items-start"
|
|
91
|
+
: "flex flex-col",
|
|
92
|
+
className,
|
|
93
|
+
)}
|
|
94
|
+
>
|
|
95
|
+
{React.Children.map(children, (step, index) =>
|
|
96
|
+
React.isValidElement(step)
|
|
97
|
+
? React.cloneElement(
|
|
98
|
+
step as React.ReactElement<StepProps>,
|
|
99
|
+
{ _index: index } as Partial<StepProps>,
|
|
100
|
+
)
|
|
101
|
+
: step,
|
|
102
|
+
)}
|
|
103
|
+
</div>
|
|
104
|
+
</StepperContext.Provider>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
// Step
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
|
|
112
|
+
export interface StepProps {
|
|
113
|
+
/**
|
|
114
|
+
* Injected by `<Stepper>` via `React.cloneElement` — do not pass manually.
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
_index?: number;
|
|
118
|
+
/** Mark this step as errored regardless of active state. */
|
|
119
|
+
error?: boolean;
|
|
120
|
+
className?: string;
|
|
121
|
+
children: React.ReactNode;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function Step({ _index = 0, error, className, children }: StepProps) {
|
|
125
|
+
const { activeStep, orientation, totalSteps } =
|
|
126
|
+
React.useContext(StepperContext);
|
|
127
|
+
|
|
128
|
+
const isActive = _index === activeStep;
|
|
129
|
+
const isCompleted = _index < activeStep;
|
|
130
|
+
const isFirst = _index === 0;
|
|
131
|
+
const isLast = _index === totalSteps - 1;
|
|
132
|
+
|
|
133
|
+
return (
|
|
134
|
+
<StepContext.Provider
|
|
135
|
+
value={{ index: _index, isActive, isCompleted, isFirst, isLast }}
|
|
136
|
+
>
|
|
137
|
+
<div
|
|
138
|
+
data-slot="step"
|
|
139
|
+
aria-current={isActive ? "step" : undefined}
|
|
140
|
+
data-active={isActive || undefined}
|
|
141
|
+
data-completed={isCompleted || undefined}
|
|
142
|
+
data-error={error || undefined}
|
|
143
|
+
className={cn(
|
|
144
|
+
orientation === "horizontal"
|
|
145
|
+
? "flex flex-1 flex-col items-center"
|
|
146
|
+
: "flex flex-row gap-3",
|
|
147
|
+
className,
|
|
148
|
+
)}
|
|
149
|
+
>
|
|
150
|
+
{children}
|
|
151
|
+
</div>
|
|
152
|
+
</StepContext.Provider>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// ---------------------------------------------------------------------------
|
|
157
|
+
// StepIndicator — circle + connector lines
|
|
158
|
+
// ---------------------------------------------------------------------------
|
|
159
|
+
|
|
160
|
+
export interface StepIndicatorProps {
|
|
161
|
+
/** Pass `true` to render the circle in the error/destructive state. */
|
|
162
|
+
error?: boolean;
|
|
163
|
+
className?: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function StepIndicator({ error, className }: StepIndicatorProps) {
|
|
167
|
+
const { orientation } = React.useContext(StepperContext);
|
|
168
|
+
const { index, isActive, isCompleted, isFirst, isLast } =
|
|
169
|
+
React.useContext(StepContext);
|
|
170
|
+
|
|
171
|
+
const filled = isActive || isCompleted;
|
|
172
|
+
|
|
173
|
+
const circle = (
|
|
174
|
+
<div
|
|
175
|
+
className={cn(
|
|
176
|
+
"relative z-10 flex size-8 shrink-0 items-center justify-center rounded-full text-sm font-medium transition-colors",
|
|
177
|
+
!filled &&
|
|
178
|
+
!error &&
|
|
179
|
+
"border-2 border-border bg-background text-muted-foreground",
|
|
180
|
+
isActive &&
|
|
181
|
+
!error &&
|
|
182
|
+
"border-2 border-primary bg-primary text-primary-foreground",
|
|
183
|
+
isCompleted && !error && "bg-primary text-primary-foreground",
|
|
184
|
+
error &&
|
|
185
|
+
"border-2 border-destructive bg-destructive text-destructive-foreground",
|
|
186
|
+
)}
|
|
187
|
+
>
|
|
188
|
+
{isCompleted && !error ? (
|
|
189
|
+
<Check className="size-4" strokeWidth={2.5} />
|
|
190
|
+
) : (
|
|
191
|
+
<span>{index + 1}</span>
|
|
192
|
+
)}
|
|
193
|
+
</div>
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
if (orientation === "horizontal") {
|
|
197
|
+
return (
|
|
198
|
+
<div
|
|
199
|
+
data-slot="step-indicator"
|
|
200
|
+
className={cn("flex w-full items-center", className)}
|
|
201
|
+
>
|
|
202
|
+
<div
|
|
203
|
+
className={cn(
|
|
204
|
+
"h-[2px] flex-1 transition-colors",
|
|
205
|
+
isFirst
|
|
206
|
+
? "bg-transparent"
|
|
207
|
+
: isActive || isCompleted
|
|
208
|
+
? "bg-primary"
|
|
209
|
+
: "bg-border",
|
|
210
|
+
)}
|
|
211
|
+
/>
|
|
212
|
+
{circle}
|
|
213
|
+
<div
|
|
214
|
+
className={cn(
|
|
215
|
+
"h-[2px] flex-1 transition-colors",
|
|
216
|
+
isLast
|
|
217
|
+
? "bg-transparent"
|
|
218
|
+
: isCompleted
|
|
219
|
+
? "bg-primary"
|
|
220
|
+
: "bg-border",
|
|
221
|
+
)}
|
|
222
|
+
/>
|
|
223
|
+
</div>
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return (
|
|
228
|
+
<div
|
|
229
|
+
data-slot="step-indicator"
|
|
230
|
+
className={cn("flex w-8 shrink-0 flex-col items-center", className)}
|
|
231
|
+
>
|
|
232
|
+
{circle}
|
|
233
|
+
{!isLast && (
|
|
234
|
+
<div
|
|
235
|
+
data-slot="step-connector"
|
|
236
|
+
className={cn(
|
|
237
|
+
"mt-1 w-[2px] flex-1 transition-colors",
|
|
238
|
+
isActive || isCompleted ? "bg-primary" : "bg-border",
|
|
239
|
+
)}
|
|
240
|
+
/>
|
|
241
|
+
)}
|
|
242
|
+
</div>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// ---------------------------------------------------------------------------
|
|
247
|
+
// StepLabel
|
|
248
|
+
// ---------------------------------------------------------------------------
|
|
249
|
+
|
|
250
|
+
export interface StepLabelProps {
|
|
251
|
+
children: React.ReactNode;
|
|
252
|
+
description?: string;
|
|
253
|
+
/** Pass a string to show a custom error message, or `true` to show description in error colour. */
|
|
254
|
+
error?: string | boolean;
|
|
255
|
+
className?: string;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function StepLabel({
|
|
259
|
+
children,
|
|
260
|
+
description,
|
|
261
|
+
error,
|
|
262
|
+
className,
|
|
263
|
+
}: StepLabelProps) {
|
|
264
|
+
const { orientation } = React.useContext(StepperContext);
|
|
265
|
+
const { isActive, isCompleted, isLast } = React.useContext(StepContext);
|
|
266
|
+
|
|
267
|
+
const subtext = typeof error === "string" ? error : description;
|
|
268
|
+
|
|
269
|
+
return (
|
|
270
|
+
<div
|
|
271
|
+
data-slot="step-label"
|
|
272
|
+
className={cn(
|
|
273
|
+
"flex flex-col",
|
|
274
|
+
orientation === "horizontal"
|
|
275
|
+
? "mt-2 items-center text-center"
|
|
276
|
+
: cn("flex-1", !isLast && "pb-5"),
|
|
277
|
+
className,
|
|
278
|
+
)}
|
|
279
|
+
>
|
|
280
|
+
<span
|
|
281
|
+
className={cn(
|
|
282
|
+
"text-sm font-medium leading-tight transition-colors",
|
|
283
|
+
(isActive || isCompleted) && !error && "text-foreground",
|
|
284
|
+
!isActive && !isCompleted && !error && "text-muted-foreground",
|
|
285
|
+
error && "text-destructive",
|
|
286
|
+
)}
|
|
287
|
+
>
|
|
288
|
+
{children}
|
|
289
|
+
</span>
|
|
290
|
+
{subtext && (
|
|
291
|
+
<span
|
|
292
|
+
className={cn(
|
|
293
|
+
"mt-0.5 text-xs",
|
|
294
|
+
error ? "text-destructive" : "text-muted-foreground",
|
|
295
|
+
)}
|
|
296
|
+
>
|
|
297
|
+
{subtext}
|
|
298
|
+
</span>
|
|
299
|
+
)}
|
|
300
|
+
</div>
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// ---------------------------------------------------------------------------
|
|
305
|
+
// StepContent — visible only on the active step (vertical orientation)
|
|
306
|
+
// ---------------------------------------------------------------------------
|
|
307
|
+
|
|
308
|
+
export interface StepContentProps {
|
|
309
|
+
className?: string;
|
|
310
|
+
children: React.ReactNode;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
function StepContent({ className, children }: StepContentProps) {
|
|
314
|
+
const { isActive } = React.useContext(StepContext);
|
|
315
|
+
|
|
316
|
+
if (!isActive) return null;
|
|
317
|
+
|
|
318
|
+
return (
|
|
319
|
+
<div data-slot="step-content" className={cn("pb-4 pt-2", className)}>
|
|
320
|
+
{children}
|
|
321
|
+
</div>
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// ---------------------------------------------------------------------------
|
|
326
|
+
// StepItem — convenience wrapper for horizontal steppers
|
|
327
|
+
// Renders StepIndicator + StepLabel in a single element.
|
|
328
|
+
// ---------------------------------------------------------------------------
|
|
329
|
+
|
|
330
|
+
export interface StepItemProps {
|
|
331
|
+
label: string;
|
|
332
|
+
description?: string;
|
|
333
|
+
error?: string | boolean;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
function StepItem({ label, description, error }: StepItemProps) {
|
|
337
|
+
return (
|
|
338
|
+
<>
|
|
339
|
+
<StepIndicator error={!!error} />
|
|
340
|
+
<StepLabel description={description} error={error}>
|
|
341
|
+
{label}
|
|
342
|
+
</StepLabel>
|
|
343
|
+
</>
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export { Stepper, Step, StepIndicator, StepLabel, StepContent, StepItem };
|
|
@@ -15,7 +15,7 @@ import { cn } from "@/lib/utils";
|
|
|
15
15
|
* works correctly inside ToggleGroup where border-l is collapsed for connected items)
|
|
16
16
|
*/
|
|
17
17
|
const toggleVariants = cva(
|
|
18
|
-
"inline-flex items-center justify-center gap-2
|
|
18
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
19
19
|
{
|
|
20
20
|
variants: {
|
|
21
21
|
variant: {
|
|
@@ -24,9 +24,9 @@ const toggleVariants = cva(
|
|
|
24
24
|
"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
25
25
|
},
|
|
26
26
|
size: {
|
|
27
|
-
default: "h-9 min-w-9 px-2",
|
|
28
|
-
sm: "h-8 min-w-8 px-1.5 text-
|
|
29
|
-
lg: "h-10 min-w-10 px-2.5",
|
|
27
|
+
default: "h-9 min-w-9 px-2 text-label-large",
|
|
28
|
+
sm: "h-8 min-w-8 px-1.5 text-label-medium",
|
|
29
|
+
lg: "h-10 min-w-10 px-2.5 text-h5",
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
defaultVariants: {
|
|
@@ -2,6 +2,7 @@ import React, { useMemo } from "react";
|
|
|
2
2
|
import {
|
|
3
3
|
Chart as ChartJS,
|
|
4
4
|
ArcElement,
|
|
5
|
+
DoughnutController,
|
|
5
6
|
Tooltip,
|
|
6
7
|
type ChartOptions,
|
|
7
8
|
type ChartData,
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
DoughnutLegendRow,
|
|
21
22
|
} from "./chart-shared";
|
|
22
23
|
|
|
23
|
-
ChartJS.register(ArcElement, Tooltip);
|
|
24
|
+
ChartJS.register(ArcElement, DoughnutController, Tooltip);
|
|
24
25
|
|
|
25
26
|
// ---------------------------------------------------------------------------
|
|
26
27
|
// Types
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Chart as ChartJS,
|
|
4
4
|
CategoryScale,
|
|
5
5
|
LinearScale,
|
|
6
|
+
BarController,
|
|
6
7
|
BarElement,
|
|
7
8
|
Tooltip,
|
|
8
9
|
type ChartOptions,
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
FALLBACK_SECONDARY,
|
|
22
23
|
} from "./chart-shared";
|
|
23
24
|
|
|
24
|
-
ChartJS.register(CategoryScale, LinearScale, BarElement, Tooltip);
|
|
25
|
+
ChartJS.register(CategoryScale, LinearScale, BarController, BarElement, Tooltip);
|
|
25
26
|
|
|
26
27
|
// ---------------------------------------------------------------------------
|
|
27
28
|
// Constants
|
|
@@ -2,6 +2,7 @@ import React, { useMemo } from "react";
|
|
|
2
2
|
import {
|
|
3
3
|
Chart as ChartJS,
|
|
4
4
|
ArcElement,
|
|
5
|
+
DoughnutController,
|
|
5
6
|
Tooltip,
|
|
6
7
|
type ChartOptions,
|
|
7
8
|
type ChartData,
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
DoughnutLegendRow,
|
|
21
22
|
} from "./chart-shared";
|
|
22
23
|
|
|
23
|
-
ChartJS.register(ArcElement, Tooltip);
|
|
24
|
+
ChartJS.register(ArcElement, DoughnutController, Tooltip);
|
|
24
25
|
|
|
25
26
|
// ---------------------------------------------------------------------------
|
|
26
27
|
// Types
|
package/src/lib/typography.ts
CHANGED
|
@@ -44,12 +44,12 @@ export const TYPOGRAPHY_DISPLAY = {
|
|
|
44
44
|
|
|
45
45
|
/** Headings H1–H6 */
|
|
46
46
|
export const TYPOGRAPHY_HEADING = {
|
|
47
|
-
h1: style(700, "
|
|
47
|
+
h1: style(700, "1.875rem", "2.25rem"),
|
|
48
48
|
h2: style(600, "1.75rem", "2.25rem"),
|
|
49
49
|
h3: style(600, "1.5rem", "2rem"),
|
|
50
|
-
h4: style(600, "1.
|
|
50
|
+
h4: style(600, "1.25rem", "1.625rem"),
|
|
51
51
|
h5: style(600, "1.125rem", "1.5rem"),
|
|
52
|
-
h6: style(600, "
|
|
52
|
+
h6: style(600, "0.9375rem", "1.25rem"),
|
|
53
53
|
} as const;
|
|
54
54
|
|
|
55
55
|
/** Body text */
|
|
@@ -62,20 +62,20 @@ export const TYPOGRAPHY_BODY = {
|
|
|
62
62
|
/** Labels — buttons, form labels, badges */
|
|
63
63
|
export const TYPOGRAPHY_LABEL = {
|
|
64
64
|
large: style(600, "1rem", "1.25rem"),
|
|
65
|
-
medium: style(600, "0.
|
|
66
|
-
small: style(600, "0.
|
|
65
|
+
medium: style(600, "0.9375rem", "1.25rem"),
|
|
66
|
+
small: style(600, "0.8125rem", "1.125rem", { letterSpacing: "0.03125rem" }),
|
|
67
67
|
} as const;
|
|
68
68
|
|
|
69
|
-
/** Button — interactive control text (weight
|
|
69
|
+
/** Button — interactive control text (weight 600 / SemiBold) */
|
|
70
70
|
export const TYPOGRAPHY_BUTTON = {
|
|
71
|
-
default: style(
|
|
72
|
-
xs: style(
|
|
71
|
+
default: style(600, "0.875rem", "1.25rem"),
|
|
72
|
+
xs: style(600, "0.75rem", "1.25rem"),
|
|
73
73
|
} as const;
|
|
74
74
|
|
|
75
75
|
/** Utility — caption, overline, code */
|
|
76
76
|
export const TYPOGRAPHY_UTILITY = {
|
|
77
|
-
caption: style(
|
|
78
|
-
overline: style(600, "0.
|
|
77
|
+
caption: style(500, "0.8125rem", "1.125rem"),
|
|
78
|
+
overline: style(600, "0.75rem", "1rem", {
|
|
79
79
|
letterSpacing: "0.09375rem",
|
|
80
80
|
textTransform: "uppercase",
|
|
81
81
|
}),
|
|
@@ -105,7 +105,7 @@ export const TYPOGRAPHY_RESPONSIVE = {
|
|
|
105
105
|
letterSpacing: "-0.03125rem",
|
|
106
106
|
}),
|
|
107
107
|
"display-medium": style(700, "2rem", "2.334rem"),
|
|
108
|
-
h1: style(700, "1.
|
|
108
|
+
h1: style(700, "1.625rem", "2rem"),
|
|
109
109
|
h2: style(600, "1.5rem", "1.93rem"),
|
|
110
110
|
},
|
|
111
111
|
} as const;
|
package/src/styles/globals.css
CHANGED
|
@@ -177,8 +177,8 @@
|
|
|
177
177
|
--typography-display-small-weight: 600;
|
|
178
178
|
|
|
179
179
|
/* Headings */
|
|
180
|
-
--typography-h1-size:
|
|
181
|
-
--typography-h1-leading: 2.
|
|
180
|
+
--typography-h1-size: 1.875rem;
|
|
181
|
+
--typography-h1-leading: 2.25rem;
|
|
182
182
|
--typography-h1-weight: 700;
|
|
183
183
|
--typography-h2-size: 1.75rem;
|
|
184
184
|
--typography-h2-leading: 2.25rem;
|
|
@@ -186,14 +186,14 @@
|
|
|
186
186
|
--typography-h3-size: 1.5rem;
|
|
187
187
|
--typography-h3-leading: 2rem;
|
|
188
188
|
--typography-h3-weight: 600;
|
|
189
|
-
--typography-h4-size: 1.
|
|
190
|
-
--typography-h4-leading: 1.
|
|
189
|
+
--typography-h4-size: 1.25rem;
|
|
190
|
+
--typography-h4-leading: 1.625rem;
|
|
191
191
|
--typography-h4-weight: 600;
|
|
192
192
|
--typography-h5-size: 1.125rem;
|
|
193
193
|
--typography-h5-leading: 1.5rem;
|
|
194
194
|
--typography-h5-weight: 600;
|
|
195
|
-
--typography-h6-size:
|
|
196
|
-
--typography-h6-leading: 1.
|
|
195
|
+
--typography-h6-size: 0.9375rem;
|
|
196
|
+
--typography-h6-leading: 1.25rem;
|
|
197
197
|
--typography-h6-weight: 600;
|
|
198
198
|
|
|
199
199
|
/* Body */
|
|
@@ -211,28 +211,28 @@
|
|
|
211
211
|
--typography-label-large-size: 1rem;
|
|
212
212
|
--typography-label-large-leading: 1.25rem;
|
|
213
213
|
--typography-label-large-weight: 600;
|
|
214
|
-
--typography-label-medium-size: 0.
|
|
215
|
-
--typography-label-medium-leading: 1.
|
|
214
|
+
--typography-label-medium-size: 0.9375rem;
|
|
215
|
+
--typography-label-medium-leading: 1.25rem;
|
|
216
216
|
--typography-label-medium-weight: 600;
|
|
217
|
-
--typography-label-small-size: 0.
|
|
218
|
-
--typography-label-small-leading:
|
|
217
|
+
--typography-label-small-size: 0.8125rem;
|
|
218
|
+
--typography-label-small-leading: 1.125rem;
|
|
219
219
|
--typography-label-small-weight: 600;
|
|
220
220
|
--typography-label-small-tracking: 0.03125rem;
|
|
221
221
|
|
|
222
222
|
/* Button */
|
|
223
223
|
--typography-button-default-size: 0.875rem;
|
|
224
224
|
--typography-button-default-leading: 1.25rem;
|
|
225
|
-
--typography-button-default-weight:
|
|
225
|
+
--typography-button-default-weight: 600;
|
|
226
226
|
--typography-button-xs-size: 0.75rem;
|
|
227
227
|
--typography-button-xs-leading: 1.25rem;
|
|
228
|
-
--typography-button-xs-weight:
|
|
228
|
+
--typography-button-xs-weight: 600;
|
|
229
229
|
|
|
230
230
|
/* Utility */
|
|
231
|
-
--typography-caption-size: 0.
|
|
232
|
-
--typography-caption-leading:
|
|
233
|
-
--typography-caption-weight:
|
|
234
|
-
--typography-overline-size: 0.
|
|
235
|
-
--typography-overline-leading:
|
|
231
|
+
--typography-caption-size: 0.8125rem;
|
|
232
|
+
--typography-caption-leading: 1.125rem;
|
|
233
|
+
--typography-caption-weight: 500;
|
|
234
|
+
--typography-overline-size: 0.75rem;
|
|
235
|
+
--typography-overline-leading: 1rem;
|
|
236
236
|
--typography-overline-weight: 600;
|
|
237
237
|
--typography-overline-tracking: 0.09375rem;
|
|
238
238
|
--typography-code-size: 0.875rem;
|
|
@@ -259,8 +259,8 @@
|
|
|
259
259
|
--typography-display-large-leading: 2.8125rem;
|
|
260
260
|
--typography-display-medium-size: 2rem;
|
|
261
261
|
--typography-display-medium-leading: 2.334rem;
|
|
262
|
-
--typography-h1-size: 1.
|
|
263
|
-
--typography-h1-leading:
|
|
262
|
+
--typography-h1-size: 1.625rem;
|
|
263
|
+
--typography-h1-leading: 2rem;
|
|
264
264
|
--typography-h2-size: 1.5rem;
|
|
265
265
|
--typography-h2-leading: 1.93rem;
|
|
266
266
|
}
|