@twentyfirstmedia/elements 0.6.0 → 0.8.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.
@@ -2982,6 +2982,608 @@ export interface QrCodeProps extends BaseProps {
2982
2982
  label?: string;
2983
2983
  }
2984
2984
 
2985
+ /* ── Life: wellbeing, health, goals, AI insights, consent ── */
2986
+ export interface Habit {
2987
+ id: string;
2988
+ label: string;
2989
+ icon?: IconName;
2990
+ tint?: Tint;
2991
+ /** One entry per day, oldest first, today last: true done, false missed, null no data. */
2992
+ days: (boolean | null)[];
2993
+ /** Days in a row (shown as "12-day streak"). */
2994
+ streak?: number;
2995
+ /** A short target, e.g. "8 glasses" or "3× a week". */
2996
+ goal?: string;
2997
+ }
2998
+ export interface HabitTrackerProps extends BaseProps {
2999
+ habits: Habit[];
3000
+ /** Labels of the day columns, oldest first (default: weekday initials ending today). */
3001
+ dayLabels?: string[];
3002
+ /** Today's box of a habit was toggled. */
3003
+ onToggle?: (id: string, done: boolean) => void;
3004
+ /** Accessible name of the list (default "Habits"). */
3005
+ label?: string;
3006
+ }
3007
+ export type MoodLevel = 1 | 2 | 3 | 4 | 5;
3008
+ export interface MoodPickerProps extends BaseProps {
3009
+ value?: MoodLevel | null;
3010
+ defaultValue?: MoodLevel | null;
3011
+ onChange?: (mood: MoodLevel) => void;
3012
+ /** The question (default "How are you feeling?"). */
3013
+ label?: ReactNode;
3014
+ /** Words for the five levels, lowest first (default Awful, Low, Okay, Good, Great). */
3015
+ levels?: [string, string, string, string, string];
3016
+ /** Only the faces; the words stay as accessible names. */
3017
+ compact?: boolean;
3018
+ }
3019
+ export interface VitalTileProps extends BaseProps {
3020
+ /** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
3021
+ surface?: Surface;
3022
+ label: string;
3023
+ value: number;
3024
+ unit?: string;
3025
+ icon?: IconName;
3026
+ /** The healthy range [low, high]; the tile says whether the value is below, in or above it. */
3027
+ normal?: [number, number];
3028
+ /** The whole scale of the band [min, max] (default: the normal range with room on both sides). */
3029
+ scale?: [number, number];
3030
+ /** Recent values, oldest first, drawn as a sparkline. */
3031
+ trend?: number[];
3032
+ /** Under the value: when it was measured, the source … */
3033
+ caption?: ReactNode;
3034
+ /** Digits after the decimal point (default 0). */
3035
+ digits?: number;
3036
+ }
3037
+ export interface ActivityRing {
3038
+ label: string;
3039
+ value: number;
3040
+ goal: number;
3041
+ unit?: string;
3042
+ tint?: Tint;
3043
+ }
3044
+ export interface ActivityRingsProps extends BaseProps {
3045
+ /** Outer ring first. */
3046
+ rings: ActivityRing[];
3047
+ /** Diameter of the rings (default 132). */
3048
+ size?: number;
3049
+ /** Hide the legend beside the rings. */
3050
+ legend?: boolean;
3051
+ /** Accessible name (default "Activity"). */
3052
+ label?: string;
3053
+ }
3054
+ export type SleepStage = "awake" | "rem" | "light" | "deep";
3055
+ export interface SleepSegment {
3056
+ stage: SleepStage;
3057
+ start: Date | string | number;
3058
+ end: Date | string | number;
3059
+ }
3060
+ export interface SleepChartProps extends BaseProps {
3061
+ /** The night in order, from falling asleep to getting up. */
3062
+ segments: SleepSegment[];
3063
+ /** Accessible name (default "Sleep stages"). */
3064
+ label?: string;
3065
+ /** Hide the totals per stage under the chart. */
3066
+ summary?: boolean;
3067
+ }
3068
+ export interface MedicationItem {
3069
+ id: string;
3070
+ name: string;
3071
+ dose?: string;
3072
+ /** When, as shown ("08:00", "With breakfast"). */
3073
+ time: string;
3074
+ /** Set by the app, which knows the clock: default "taken" when `taken`, else "due". */
3075
+ status?: "taken" | "due" | "missed" | "upcoming";
3076
+ taken?: boolean;
3077
+ note?: string;
3078
+ icon?: IconName;
3079
+ }
3080
+ export interface MedicationListProps extends BaseProps {
3081
+ items: MedicationItem[];
3082
+ /** "Mark as taken" was pressed. */
3083
+ onTake?: (id: string) => void;
3084
+ /** Accessible name (default "Medication"). */
3085
+ label?: string;
3086
+ }
3087
+ export interface JournalEntryProps extends BaseProps {
3088
+ /** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
3089
+ surface?: Surface;
3090
+ date: Date | string | number;
3091
+ title?: string;
3092
+ mood?: MoodLevel;
3093
+ tags?: string[];
3094
+ children?: ReactNode;
3095
+ /** Buttons at the end (edit, share …). */
3096
+ actions?: ReactNode;
3097
+ }
3098
+ export interface GoalCardProps extends BaseProps {
3099
+ /** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
3100
+ surface?: Surface;
3101
+ title: string;
3102
+ value: number;
3103
+ target: number;
3104
+ /** How to show value and target (default number). */
3105
+ format?: "number" | "money" | "percent";
3106
+ /** Unit after numbers ("km", "books"). */
3107
+ unit?: string;
3108
+ currency?: string;
3109
+ due?: Date | string | number;
3110
+ icon?: IconName;
3111
+ tint?: Tint;
3112
+ milestones?: { label: string; done?: boolean }[];
3113
+ /** A note under the progress ("€250 a month keeps you on track"). */
3114
+ note?: ReactNode;
3115
+ }
3116
+ export interface InsightCardProps extends BaseProps {
3117
+ /** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
3118
+ surface?: Surface;
3119
+ title: string;
3120
+ children?: ReactNode;
3121
+ icon?: IconName;
3122
+ tone?: "info" | "success" | "warning" | "highlight";
3123
+ /** Above the title: area and time ("Money · 2 h ago"). */
3124
+ meta?: ReactNode;
3125
+ /** Where the insight comes from, as chips (like chat sources). */
3126
+ sources?: Source[];
3127
+ /** Why the assistant shows it; folded away behind "Why am I seeing this?". */
3128
+ why?: ReactNode;
3129
+ onAccept?: () => void;
3130
+ acceptLabel?: string;
3131
+ onSnooze?: () => void;
3132
+ onDismiss?: () => void;
3133
+ }
3134
+ export interface ConsentScope {
3135
+ id: string;
3136
+ label: string;
3137
+ description?: string;
3138
+ granted: boolean;
3139
+ /** Needed for the connection to work at all: shown, not switchable. */
3140
+ required?: boolean;
3141
+ /** What the permission allows: reading, acting (sending, booking, switching) or moving money. */
3142
+ level?: "read" | "act" | "money";
3143
+ /** The assistant asks you before it uses this permission. */
3144
+ asksFirst?: boolean;
3145
+ }
3146
+ export interface ConsentConnector {
3147
+ id: string;
3148
+ name: string;
3149
+ icon?: IconName;
3150
+ /** A logo instead of the icon. */
3151
+ logo?: ReactNode;
3152
+ /** What the assistant uses it for. */
3153
+ purpose?: ReactNode;
3154
+ scopes: ConsentScope[];
3155
+ lastUsed?: Date | string | number;
3156
+ }
3157
+ export interface ConsentListProps extends BaseProps {
3158
+ /** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
3159
+ surface?: Surface;
3160
+ connectors: ConsentConnector[];
3161
+ onScopeChange?: (connectorId: string, scopeId: string, granted: boolean) => void;
3162
+ onRevoke?: (connectorId: string) => void;
3163
+ /** Accessible name (default "Data access"). */
3164
+ label?: string;
3165
+ }
3166
+
3167
+ /* ── Life: money, insurance, deadlines, documents ── */
3168
+ export interface BudgetCategory {
3169
+ id: string;
3170
+ label: string;
3171
+ icon?: IconName;
3172
+ tint?: Tint;
3173
+ spent: number;
3174
+ limit: number;
3175
+ }
3176
+ export interface BudgetListProps extends BaseProps {
3177
+ categories: BudgetCategory[];
3178
+ currency?: string;
3179
+ /** A category was picked (to show its transactions). */
3180
+ onSelect?: (id: string) => void;
3181
+ /** Accessible name (default "Budgets"). */
3182
+ label?: string;
3183
+ }
3184
+ export interface Subscription {
3185
+ id: string;
3186
+ name: string;
3187
+ icon?: IconName;
3188
+ /** A logo instead of the icon. */
3189
+ logo?: ReactNode;
3190
+ amount: number;
3191
+ period: "week" | "month" | "year";
3192
+ /** Next charge. */
3193
+ next?: Date | string | number;
3194
+ status?: "active" | "trial" | "cancelled";
3195
+ category?: string;
3196
+ }
3197
+ export interface SubscriptionListProps extends BaseProps {
3198
+ items: Subscription[];
3199
+ currency?: string;
3200
+ /** "Manage" on a subscription (cancel, change plan …). */
3201
+ onManage?: (id: string) => void;
3202
+ /** Hide the monthly and yearly totals. */
3203
+ totals?: boolean;
3204
+ /** Accessible name (default "Subscriptions"). */
3205
+ label?: string;
3206
+ }
3207
+ export interface NetWorthCardProps extends BaseProps {
3208
+ /** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
3209
+ surface?: Surface;
3210
+ assets: { label: string; value: number; icon?: IconName }[];
3211
+ liabilities?: { label: string; value: number; icon?: IconName }[];
3212
+ /** Net worth over time, oldest first. */
3213
+ history?: number[];
3214
+ /** Change over `changeLabel` (e.g. +1,240 "since October"). */
3215
+ change?: number;
3216
+ changeLabel?: string;
3217
+ currency?: string;
3218
+ title?: string;
3219
+ }
3220
+ export interface DeadlineItem {
3221
+ id: string;
3222
+ title: string;
3223
+ /** What kind: "Contract", "ID card", "Tax" … */
3224
+ kind?: string;
3225
+ icon?: IconName;
3226
+ date: Date | string | number;
3227
+ amount?: number;
3228
+ done?: boolean;
3229
+ note?: string;
3230
+ }
3231
+ export interface DeadlineListProps extends BaseProps {
3232
+ items: DeadlineItem[];
3233
+ /** The day to count from (default: now). Set it for server rendering and stable output. */
3234
+ today?: Date | string | number;
3235
+ /** Days ahead that count as soon (default 14). */
3236
+ soon?: number;
3237
+ currency?: string;
3238
+ onDone?: (id: string) => void;
3239
+ /** Accessible name (default "Deadlines"). */
3240
+ label?: string;
3241
+ }
3242
+ export interface PolicyCardProps extends BaseProps {
3243
+ /** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
3244
+ surface?: Surface;
3245
+ /** The kind of insurance: "Household contents", "Liability" … */
3246
+ type: string;
3247
+ insurer: string;
3248
+ icon?: IconName;
3249
+ tint?: Tint;
3250
+ policyNumber?: string;
3251
+ /** Show only the last four characters of the policy number. */
3252
+ maskNumber?: boolean;
3253
+ /** Sum insured: a number (money) or text ("unlimited"). */
3254
+ coverage?: number | ReactNode;
3255
+ premium?: { amount: number; period: "month" | "quarter" | "year" };
3256
+ deductible?: number;
3257
+ renews?: Date | string | number;
3258
+ status?: "active" | "pending" | "expiring" | "lapsed";
3259
+ currency?: string;
3260
+ /** Buttons at the foot (documents, report a claim …). */
3261
+ actions?: ReactNode;
3262
+ }
3263
+ export interface CoverageRow {
3264
+ id: string;
3265
+ risk: string;
3266
+ status: "covered" | "partial" | "none";
3267
+ note?: ReactNode;
3268
+ /** Which policy covers it. */
3269
+ policy?: string;
3270
+ }
3271
+ export interface CoverageMatrixProps extends BaseProps {
3272
+ rows: CoverageRow[];
3273
+ /** Accessible name and caption (default "Coverage"). */
3274
+ label?: string;
3275
+ }
3276
+ export interface ClaimStep {
3277
+ label: string;
3278
+ date?: Date | string | number;
3279
+ state: "done" | "current" | "todo" | "failed";
3280
+ note?: ReactNode;
3281
+ }
3282
+ export interface ClaimTimelineProps extends BaseProps {
3283
+ title: string;
3284
+ /** Reference and insurer under the title. */
3285
+ meta?: ReactNode;
3286
+ amount?: number;
3287
+ currency?: string;
3288
+ steps: ClaimStep[];
3289
+ }
3290
+ export interface LifeDocument {
3291
+ id: string;
3292
+ title: string;
3293
+ category?: string;
3294
+ icon?: IconName;
3295
+ holder?: string;
3296
+ expires?: Date | string | number;
3297
+ /** "PDF · 240 KB" */
3298
+ meta?: string;
3299
+ }
3300
+ export interface DocumentListProps extends BaseProps {
3301
+ documents: LifeDocument[];
3302
+ /** The day to count expiry from (default: now). */
3303
+ today?: Date | string | number;
3304
+ /** Days ahead that count as expiring soon (default 60). */
3305
+ soon?: number;
3306
+ onOpen?: (id: string) => void;
3307
+ /** Accessible name (default "Documents"). */
3308
+ label?: string;
3309
+ }
3310
+
3311
+ /* ── Connectors: services an assistant reads from and acts in ── */
3312
+ /** The state of a connected service. */
3313
+ export type ServiceState = "connected" | "syncing" | "error" | "paused" | "off";
3314
+ export interface ServiceMarkProps extends BaseProps {
3315
+ /** The service's name: the accessible name, and the monogram when there is no icon or logo. */
3316
+ name: string;
3317
+ /** A brand logo (`brandGmail` …) or a line icon. */
3318
+ icon?: IconName;
3319
+ /** Your own logo (an `<img>` or `<svg>`) instead of the icon. */
3320
+ logo?: ReactNode;
3321
+ /** Letters for the monogram (default: the initials of `name`). */
3322
+ monogram?: string;
3323
+ /** 24, 36 (default) or 48 px. */
3324
+ size?: "sm" | "md" | "lg";
3325
+ tint?: Tint | "plain";
3326
+ /** A dot in the corner with the state in words for screen readers. */
3327
+ status?: ServiceState;
3328
+ /** Hidden from screen readers when the name is written next to it. */
3329
+ decorative?: boolean;
3330
+ }
3331
+ export interface Connector {
3332
+ id: string;
3333
+ name: string;
3334
+ icon?: IconName;
3335
+ logo?: ReactNode;
3336
+ /** Letters shown when there is neither icon nor logo (default: the initials of `name`). */
3337
+ monogram?: string;
3338
+ tint?: Tint | "plain";
3339
+ /** The group it is listed under ("Health & fitness", "Money" …). */
3340
+ category: string;
3341
+ description?: ReactNode;
3342
+ /** `available` (default), `connected`, `error` (needs a reconnect) or `soon`. */
3343
+ state?: "available" | "connected" | "error" | "soon";
3344
+ /** A hint under the description: "Needs the iPhone app", "Import an export file". */
3345
+ note?: ReactNode;
3346
+ /** The connected account ("mara@gmail.com"). */
3347
+ account?: string;
3348
+ }
3349
+ export interface ConnectorGalleryProps extends BaseProps {
3350
+ connectors: Connector[];
3351
+ /** Order of the groups; categories not listed follow in the order they appear. */
3352
+ categories?: string[];
3353
+ onConnect?: (id: string) => void;
3354
+ /** Opens a connected (or failing) connector. */
3355
+ onOpen?: (id: string) => void;
3356
+ /** A search field and category chips above the grid (default true). */
3357
+ filters?: boolean;
3358
+ /** Accessible name (default "Connectors"). */
3359
+ label?: string;
3360
+ }
3361
+ export interface SyncStatusProps extends BaseProps {
3362
+ state: "synced" | "syncing" | "error" | "paused" | "never";
3363
+ /** The last successful sync. */
3364
+ last?: Date | string | number;
3365
+ /** The next planned sync. */
3366
+ next?: Date | string | number;
3367
+ /** "Now" for the relative times; pass it so server and client render the same. */
3368
+ now?: Date | string | number;
3369
+ /** What the last sync brought: `{ label: "emails", value: 1204 }`. */
3370
+ counts?: { label: string; value: number }[];
3371
+ /** Why the sync failed. */
3372
+ error?: ReactNode;
3373
+ onSync?: () => void;
3374
+ /** One line: state and time only. */
3375
+ compact?: boolean;
3376
+ }
3377
+ export interface AgentAction {
3378
+ id: string;
3379
+ /** The service the action used. */
3380
+ service?: { name: string; icon?: IconName; logo?: ReactNode };
3381
+ /** Which agent did it ("Assistant", "Money agent"). */
3382
+ agent?: string;
3383
+ /** What happened, in a sentence: "Moved the dentist to Friday, 10:00". */
3384
+ text: ReactNode;
3385
+ at: Date | string | number;
3386
+ /** `read` (looked something up), `act` (changed something) or `money`. */
3387
+ kind?: "read" | "act" | "money";
3388
+ /** `done` (default), `waiting` for your approval, `declined`, `undone` or `failed`. */
3389
+ state?: "done" | "waiting" | "declined" | "undone" | "failed";
3390
+ detail?: ReactNode;
3391
+ }
3392
+ export interface AgentActivityProps extends BaseProps {
3393
+ items: AgentAction[];
3394
+ /** "Now" for the day headings; pass it so server and client render the same. */
3395
+ now?: Date | string | number;
3396
+ /** Offers "Undo" on finished actions that changed something. */
3397
+ onUndo?: (id: string) => void;
3398
+ /** Opens an action that waits for your approval. */
3399
+ onReview?: (id: string) => void;
3400
+ /** Accessible name (default "Agent activity"). */
3401
+ label?: string;
3402
+ }
3403
+ export interface ConnectionItem {
3404
+ id: string;
3405
+ name: string;
3406
+ icon?: IconName;
3407
+ logo?: ReactNode;
3408
+ monogram?: string;
3409
+ tint?: Tint | "plain";
3410
+ /** The connected account ("mara@gmail.com", "Giro ••• 4410"). */
3411
+ account?: ReactNode;
3412
+ state: ServiceState;
3413
+ /** How fresh the data is, shown as a compact `SyncStatus`. */
3414
+ sync?: { state: SyncStatusProps["state"]; last?: Date | string | number };
3415
+ }
3416
+ export interface ConnectionListProps extends BaseProps {
3417
+ items: ConnectionItem[];
3418
+ /** "Now" for the relative times; pass it so server and client render the same. */
3419
+ now?: Date | string | number;
3420
+ onManage?: (id: string) => void;
3421
+ /** Shown instead of "Manage" on connections in the `error` state. */
3422
+ onReconnect?: (id: string) => void;
3423
+ /** Accessible name (default "Connections"). */
3424
+ label?: string;
3425
+ }
3426
+
3427
+ /* ── Connected data: home, car, media, workouts, calls, bookings, golf, investments ── */
3428
+ /** The service a value comes from, shown as a small mark. */
3429
+ export interface ServiceRef {
3430
+ name: string;
3431
+ icon?: IconName;
3432
+ logo?: ReactNode;
3433
+ }
3434
+ export interface DeviceTileProps extends BaseProps {
3435
+ name: string;
3436
+ room?: string;
3437
+ icon?: IconName;
3438
+ /** The kind sets the default icon and which controls appear. */
3439
+ kind?: "switch" | "light" | "thermostat" | "vacuum" | "purifier" | "camera" | "lock" | "sensor";
3440
+ /** On or off; with `onToggle` a switch. */
3441
+ on?: boolean;
3442
+ onToggle?: (on: boolean) => void;
3443
+ /** The main reading: "21.5 °C", "Cleaning", "AQI 12". */
3444
+ value?: ReactNode;
3445
+ /** A line under the value: "Heating to 22 °C", "Kitchen · 18 m² left". */
3446
+ status?: ReactNode;
3447
+ /** Thermostat target in °C; with `onTarget` a − / + stepper (steps of `step`, default 0.5). */
3448
+ target?: number;
3449
+ onTarget?: (value: number) => void;
3450
+ step?: number;
3451
+ /** Battery in percent (vacuums, sensors, locks). */
3452
+ battery?: number;
3453
+ /** Quick actions: "Start", "Dock", "Boost". */
3454
+ actions?: { label: string; icon?: IconName; onClick?: () => void }[];
3455
+ /** The device does not answer. */
3456
+ offline?: boolean;
3457
+ service?: ServiceRef;
3458
+ }
3459
+ export interface VehicleCardProps extends BaseProps {
3460
+ name: string;
3461
+ model?: string;
3462
+ /** Battery (or tank) in percent. */
3463
+ battery: number;
3464
+ /** Range in km. */
3465
+ range?: number;
3466
+ /** The charge limit in percent, marked on the bar. */
3467
+ limit?: number;
3468
+ charging?: "charging" | "complete" | "plugged" | "unplugged";
3469
+ /** Charging power in kW while charging. */
3470
+ power?: number;
3471
+ /** When charging reaches the limit. */
3472
+ until?: Date | string | number;
3473
+ locked?: boolean;
3474
+ /** Inside temperature in °C. */
3475
+ inside?: number;
3476
+ climateOn?: boolean;
3477
+ location?: ReactNode;
3478
+ onLock?: (locked: boolean) => void;
3479
+ onClimate?: (on: boolean) => void;
3480
+ service?: ServiceRef;
3481
+ }
3482
+ export interface NowPlayingProps extends BaseProps {
3483
+ title: string;
3484
+ artist?: string;
3485
+ album?: string;
3486
+ /** Cover art: an `<img>`. */
3487
+ art?: ReactNode;
3488
+ /** Position and length in seconds. */
3489
+ position?: number;
3490
+ duration?: number;
3491
+ playing?: boolean;
3492
+ /** Where it plays: "Living room speaker". */
3493
+ device?: string;
3494
+ onPlayPause?: () => void;
3495
+ onNext?: () => void;
3496
+ onPrevious?: () => void;
3497
+ service?: ServiceRef;
3498
+ }
3499
+ export interface WorkoutCardProps extends BaseProps {
3500
+ /** "Run", "Ride", "Strength", "Golf" … */
3501
+ type: string;
3502
+ icon?: IconName;
3503
+ date: Date | string | number;
3504
+ /** Minutes. */
3505
+ duration: number;
3506
+ /** Kilometres. */
3507
+ distance?: number;
3508
+ calories?: number;
3509
+ /** Average heart rate in bpm. */
3510
+ heartRate?: number;
3511
+ /** Minutes in heart-rate zones 1–5. */
3512
+ zones?: number[];
3513
+ service?: ServiceRef;
3514
+ }
3515
+ export interface CallItem {
3516
+ id: string;
3517
+ name: string;
3518
+ number?: string;
3519
+ direction: "incoming" | "outgoing" | "missed";
3520
+ at: Date | string | number;
3521
+ /** Seconds. */
3522
+ duration?: number;
3523
+ /** What the call was about (an assistant's summary). */
3524
+ summary?: ReactNode;
3525
+ }
3526
+ export interface CallLogProps extends BaseProps {
3527
+ calls: CallItem[];
3528
+ /** "Now" for the day headings. */
3529
+ now?: Date | string | number;
3530
+ onCall?: (id: string) => void;
3531
+ onOpen?: (id: string) => void;
3532
+ /** Accessible name (default "Calls"). */
3533
+ label?: string;
3534
+ }
3535
+ export interface ReservationCardProps extends BaseProps {
3536
+ kind: "stay" | "flight" | "train" | "ride" | "order" | "event";
3537
+ title: string;
3538
+ /** "Hotel Atlantic · 2 nights", "LH 2024 · Seat 14A". */
3539
+ subtitle?: ReactNode;
3540
+ start: Date | string | number;
3541
+ end?: Date | string | number;
3542
+ /** Where: an address, airport codes, a restaurant. */
3543
+ place?: ReactNode;
3544
+ /** Booking or order number. */
3545
+ code?: string;
3546
+ status?: "confirmed" | "pending" | "cancelled" | "delayed" | "onTheWay" | "delivered";
3547
+ /** Extra words for the status: "+25 min", "Arrives 19:40". */
3548
+ statusText?: string;
3549
+ service?: ServiceRef;
3550
+ actions?: ReactNode;
3551
+ }
3552
+ export interface GolfHole {
3553
+ par: number;
3554
+ strokes?: number;
3555
+ putts?: number;
3556
+ }
3557
+ export interface ScorecardProps extends BaseProps {
3558
+ course: string;
3559
+ date?: Date | string | number;
3560
+ /** 9 or 18 holes. */
3561
+ holes: GolfHole[];
3562
+ /** Tee and course rating: "Yellow · CR 71.2 / SR 128". */
3563
+ tee?: string;
3564
+ service?: ServiceRef;
3565
+ }
3566
+ export interface Holding {
3567
+ id: string;
3568
+ name: string;
3569
+ /** Ticker or ISIN. */
3570
+ symbol?: string;
3571
+ value: number;
3572
+ /** Change in percent over `period`. */
3573
+ change?: number;
3574
+ /** Share of the portfolio in percent. */
3575
+ weight?: number;
3576
+ }
3577
+ export interface HoldingsListProps extends BaseProps {
3578
+ holdings: Holding[];
3579
+ currency?: string;
3580
+ /** The period of `change` ("today", "1 year"). */
3581
+ period?: string;
3582
+ onSelect?: (id: string) => void;
3583
+ /** Accessible name (default "Holdings"). */
3584
+ label?: string;
3585
+ }
3586
+
2985
3587
  export interface IconProps {
2986
3588
  name: IconName;
2987
3589
  /** Pixel size (default 16; 14 in chips and badges, 20 in navigation). */
@@ -3045,6 +3647,68 @@ export type TfTwoFactorSetupElement = TfElement<TwoFactorSetupProps>;
3045
3647
  export type TfColorFieldElement = TfElement<ColorFieldProps>;
3046
3648
  /** `<tf-qr-code>`: A QR code drawn as SVG and encoded on the device, so the text (a sign-in secret, an invite link) never goes to a service. */
3047
3649
  export type TfQrCodeElement = TfElement<QrCodeProps>;
3650
+ /** `<tf-habit-tracker>`: Habits with their last days as a row of marks: done, missed or no entry, today's mark a toggle. */
3651
+ export type TfHabitTrackerElement = TfElement<HabitTrackerProps>;
3652
+ /** `<tf-mood-picker>`: A five-step mood scale with faces and words, as a radio group. */
3653
+ export type TfMoodPickerElement = TfElement<MoodPickerProps>;
3654
+ /** `<tf-vital-tile>`: One health value with its healthy range: the value, a band with the normal zone and a marker, a status in words (in range, below, above) and an optional trend. */
3655
+ export type TfVitalTileElement = TfElement<VitalTileProps>;
3656
+ /** `<tf-activity-rings>`: Concentric progress rings for daily goals (move, exercise, stand, steps, water) with a legend. */
3657
+ export type TfActivityRingsElement = TfElement<ActivityRingsProps>;
3658
+ /** `<tf-sleep-chart>`: A night as sleep stages over time, one lane per stage (awake, REM, light, deep), with the time asleep and the time per stage. */
3659
+ export type TfSleepChartElement = TfElement<SleepChartProps>;
3660
+ /** `<tf-medication-list>`: Today's doses in order, each with its time, name, dose, a status in words and a "taken" button. */
3661
+ export type TfMedicationListElement = TfElement<MedicationListProps>;
3662
+ /** `<tf-journal-entry>`: A journal or diary entry: the date, the mood of the day, a title, the text and tags, with room for actions such as edit or share. */
3663
+ export type TfJournalEntryElement = TfElement<JournalEntryProps>;
3664
+ /** `<tf-goal-card>`: A goal with its progress toward a target, a due date, milestones and a note. */
3665
+ export type TfGoalCardElement = TfElement<GoalCardProps>;
3666
+ /** `<tf-insight-card>`: Something the assistant noticed: what, where it comes from, why it is shown and what to do. */
3667
+ export type TfInsightCardElement = TfElement<InsightCardProps>;
3668
+ /** `<tf-consent-list>`: What each connected source lets the assistant read or do: one card per source with its purpose, last use and a switch per scope, plus "Revoke access". */
3669
+ export type TfConsentListElement = TfElement<ConsentListProps>;
3670
+ /** `<tf-budget-list>`: Spending per category against its limit: spent and limit, a bar, and what is left or over in words. */
3671
+ export type TfBudgetListElement = TfElement<BudgetListProps>;
3672
+ /** `<tf-subscription-list>`: Recurring payments with their next charge, trial and cancelled states, and what they cost together a month and a year. */
3673
+ export type TfSubscriptionListElement = TfElement<SubscriptionListProps>;
3674
+ /** `<tf-net-worth-card>`: What you own minus what you owe: the total, its change and trend, and the assets and liabilities behind it. */
3675
+ export type TfNetWorthCardElement = TfElement<NetWorthCardProps>;
3676
+ /** `<tf-deadline-list>`: Bills, renewals, notice periods and expiring documents in date order, each with "Today", "In 12 days" or "Overdue by 3 days" in words. */
3677
+ export type TfDeadlineListElement = TfElement<DeadlineListProps>;
3678
+ /** `<tf-policy-card>`: One insurance policy: type and insurer, sum insured, premium, deductible, policy number, renewal date and status (active, pending, expiring, lapsed), with room for actions. */
3679
+ export type TfPolicyCardElement = TfElement<PolicyCardProps>;
3680
+ /** `<tf-coverage-matrix>`: Life risks and whether a policy covers them: covered, partly or not covered, with the policy and a note, and a count of each above the table. */
3681
+ export type TfCoverageMatrixElement = TfElement<CoverageMatrixProps>;
3682
+ /** `<tf-claim-timeline>`: An insurance claim from report to payout: steps that are done, current, still to come or failed, with dates and notes, and the amount claimed. */
3683
+ export type TfClaimTimelineElement = TfElement<ClaimTimelineProps>;
3684
+ /** `<tf-document-list>`: Important papers (IDs, contracts, policies, certificates) with category, holder and expiry: "Expired", "Expires in 19 days" or "Valid until May 2031". */
3685
+ export type TfDocumentListElement = TfElement<DocumentListProps>;
3686
+ /** `<tf-service-mark>`: A connected service's mark: its brand logo from the icon library (brandGmail, brandTesla …), your own logo, or a monogram for a service without a logo ("KS" for a local nursery). */
3687
+ export type TfServiceMarkElement = TfElement<ServiceMarkProps>;
3688
+ /** `<tf-connector-gallery>`: Every service an assistant can connect to, grouped by category, with a search field and category chips. */
3689
+ export type TfConnectorGalleryElement = TfElement<ConnectorGalleryProps>;
3690
+ /** `<tf-connection-list>`: The services you are connected to: mark with state dot, the connected account, how fresh the data is (a compact SyncStatus) and Manage, or Reconnect for a connection that needs attention. */
3691
+ export type TfConnectionListElement = TfElement<ConnectionListProps>;
3692
+ /** `<tf-sync-status>`: When a connected service last synced, in words ("Synced 6 minutes ago"), when it syncs next, what the last sync brought ("1,204 emails") and why a sync failed, with "Sync now". */
3693
+ export type TfSyncStatusElement = TfElement<SyncStatusProps>;
3694
+ /** `<tf-agent-activity>`: What agents did with your connected services, newest first and grouped by day: each action with its service, agent and time, whether it read something, changed something or touched money, and its state (waiting for you, declined, undone, fa */
3695
+ export type TfAgentActivityElement = TfElement<AgentActivityProps>;
3696
+ /** `<tf-device-tile>`: A smart-home device (from Google Home, Apple Home, SmartThings, tado°, Dyson, eufy, Dreame …): its reading, its state and the controls its kind needs. */
3697
+ export type TfDeviceTileElement = TfElement<DeviceTileProps>;
3698
+ /** `<tf-vehicle-card>`: An electric car: charge in percent with the limit marked on the bar, range, charging state with power and when it is done, lock and climate as buttons, the inside temperature and where it is. */
3699
+ export type TfVehicleCardElement = TfElement<VehicleCardProps>;
3700
+ /** `<tf-now-playing>`: What is playing (Spotify, a speaker, a podcast app): cover, title and artist, the device, progress with times and previous / play-pause / next. */
3701
+ export type TfNowPlayingElement = TfElement<NowPlayingProps>;
3702
+ /** `<tf-workout-card>`: One workout from Apple Fitness, Strava, Garmin or a golf app: type, time, duration, distance, calories, average heart rate and minutes in each heart-rate zone as a bar with a legend in words. */
3703
+ export type TfWorkoutCardElement = TfElement<WorkoutCardProps>;
3704
+ /** `<tf-call-log>`: Your calls grouped by day: incoming, outgoing and missed with time and length, and what the call was about when an assistant summarised it. */
3705
+ export type TfCallLogElement = TfElement<CallLogProps>;
3706
+ /** `<tf-reservation-card>`: A booking or order: a stay, flight, train, ride, delivery or ticket with its dates, place, booking number and status (confirmed, pending, delayed, on the way, delivered, cancelled) plus a note like "+25 min". */
3707
+ export type TfReservationCardElement = TfElement<ReservationCardProps>;
3708
+ /** `<tf-scorecard>`: A round of golf: par and strokes for each hole in the usual marks (circle for a birdie, double circle for an eagle, square for a bogey, double square for worse), putts, Out, In and the total against par. */
3709
+ export type TfScorecardElement = TfElement<ScorecardProps>;
3710
+ /** `<tf-holdings-list>`: Positions in a portfolio: name and ISIN or ticker, value, change over a period (arrow, sign and colour) and the share of the portfolio as a bar. */
3711
+ export type TfHoldingsListElement = TfElement<HoldingsListProps>;
3048
3712
  /** `<tf-agent-card>`: One agent at a glance (AgentCard) and everything about it beside a chat (AgentDetails). */
3049
3713
  export type TfAgentCardElement = TfElement<AgentCardProps>;
3050
3714
  /** `<tf-agent-details>`: The AgentDetails component as a custom element. */
@@ -3459,6 +4123,37 @@ declare global {
3459
4123
  "tf-two-factor-setup": TfTwoFactorSetupElement;
3460
4124
  "tf-color-field": TfColorFieldElement;
3461
4125
  "tf-qr-code": TfQrCodeElement;
4126
+ "tf-habit-tracker": TfHabitTrackerElement;
4127
+ "tf-mood-picker": TfMoodPickerElement;
4128
+ "tf-vital-tile": TfVitalTileElement;
4129
+ "tf-activity-rings": TfActivityRingsElement;
4130
+ "tf-sleep-chart": TfSleepChartElement;
4131
+ "tf-medication-list": TfMedicationListElement;
4132
+ "tf-journal-entry": TfJournalEntryElement;
4133
+ "tf-goal-card": TfGoalCardElement;
4134
+ "tf-insight-card": TfInsightCardElement;
4135
+ "tf-consent-list": TfConsentListElement;
4136
+ "tf-budget-list": TfBudgetListElement;
4137
+ "tf-subscription-list": TfSubscriptionListElement;
4138
+ "tf-net-worth-card": TfNetWorthCardElement;
4139
+ "tf-deadline-list": TfDeadlineListElement;
4140
+ "tf-policy-card": TfPolicyCardElement;
4141
+ "tf-coverage-matrix": TfCoverageMatrixElement;
4142
+ "tf-claim-timeline": TfClaimTimelineElement;
4143
+ "tf-document-list": TfDocumentListElement;
4144
+ "tf-service-mark": TfServiceMarkElement;
4145
+ "tf-connector-gallery": TfConnectorGalleryElement;
4146
+ "tf-connection-list": TfConnectionListElement;
4147
+ "tf-sync-status": TfSyncStatusElement;
4148
+ "tf-agent-activity": TfAgentActivityElement;
4149
+ "tf-device-tile": TfDeviceTileElement;
4150
+ "tf-vehicle-card": TfVehicleCardElement;
4151
+ "tf-now-playing": TfNowPlayingElement;
4152
+ "tf-workout-card": TfWorkoutCardElement;
4153
+ "tf-call-log": TfCallLogElement;
4154
+ "tf-reservation-card": TfReservationCardElement;
4155
+ "tf-scorecard": TfScorecardElement;
4156
+ "tf-holdings-list": TfHoldingsListElement;
3462
4157
  "tf-agent-card": TfAgentCardElement;
3463
4158
  "tf-agent-details": TfAgentDetailsElement;
3464
4159
  "tf-chat-list": TfChatListElement;