@twentyfirstmedia/ui-core 0.6.0 → 0.7.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/dist/components/household.d.ts +19 -0
- package/dist/components/household.d.ts.map +1 -0
- package/dist/components/household.js +137 -0
- package/dist/components/household.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/life.d.ts +26 -0
- package/dist/components/life.d.ts.map +1 -0
- package/dist/components/life.js +186 -0
- package/dist/components/life.js.map +1 -0
- package/dist/components/types.d.ts +332 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/strings.d.ts +96 -0
- package/dist/strings.d.ts.map +1 -1
- package/dist/strings.js +73 -1
- package/dist/strings.js.map +1 -1
- package/dist/themes.css +14121 -11161
- package/package.json +1 -1
- package/src/components/household.tsx +489 -0
- package/src/components/index.ts +22 -0
- package/src/components/life.tsx +672 -0
- package/src/components/types.ts +322 -0
- package/src/index.ts +2 -0
- package/src/strings.ts +241 -0
package/src/components/types.ts
CHANGED
|
@@ -2833,3 +2833,325 @@ export interface QrCodeProps extends BaseProps {
|
|
|
2833
2833
|
/** Accessible name (default "QR code"). */
|
|
2834
2834
|
label?: string;
|
|
2835
2835
|
}
|
|
2836
|
+
|
|
2837
|
+
/* ── Life: wellbeing, health, goals, AI insights, consent ── */
|
|
2838
|
+
export interface Habit {
|
|
2839
|
+
id: string;
|
|
2840
|
+
label: string;
|
|
2841
|
+
icon?: IconName;
|
|
2842
|
+
tint?: Tint;
|
|
2843
|
+
/** One entry per day, oldest first, today last: true done, false missed, null no data. */
|
|
2844
|
+
days: (boolean | null)[];
|
|
2845
|
+
/** Days in a row (shown as "12-day streak"). */
|
|
2846
|
+
streak?: number;
|
|
2847
|
+
/** A short target, e.g. "8 glasses" or "3× a week". */
|
|
2848
|
+
goal?: string;
|
|
2849
|
+
}
|
|
2850
|
+
export interface HabitTrackerProps extends BaseProps {
|
|
2851
|
+
habits: Habit[];
|
|
2852
|
+
/** Labels of the day columns, oldest first (default: weekday initials ending today). */
|
|
2853
|
+
dayLabels?: string[];
|
|
2854
|
+
/** Today's box of a habit was toggled. */
|
|
2855
|
+
onToggle?: (id: string, done: boolean) => void;
|
|
2856
|
+
/** Accessible name of the list (default "Habits"). */
|
|
2857
|
+
label?: string;
|
|
2858
|
+
}
|
|
2859
|
+
export type MoodLevel = 1 | 2 | 3 | 4 | 5;
|
|
2860
|
+
export interface MoodPickerProps extends BaseProps {
|
|
2861
|
+
value?: MoodLevel | null;
|
|
2862
|
+
defaultValue?: MoodLevel | null;
|
|
2863
|
+
onChange?: (mood: MoodLevel) => void;
|
|
2864
|
+
/** The question (default "How are you feeling?"). */
|
|
2865
|
+
label?: ReactNode;
|
|
2866
|
+
/** Words for the five levels, lowest first (default Awful, Low, Okay, Good, Great). */
|
|
2867
|
+
levels?: [string, string, string, string, string];
|
|
2868
|
+
/** Only the faces; the words stay as accessible names. */
|
|
2869
|
+
compact?: boolean;
|
|
2870
|
+
}
|
|
2871
|
+
export interface VitalTileProps extends BaseProps {
|
|
2872
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
2873
|
+
surface?: Surface;
|
|
2874
|
+
label: string;
|
|
2875
|
+
value: number;
|
|
2876
|
+
unit?: string;
|
|
2877
|
+
icon?: IconName;
|
|
2878
|
+
/** The healthy range [low, high]; the tile says whether the value is below, in or above it. */
|
|
2879
|
+
normal?: [number, number];
|
|
2880
|
+
/** The whole scale of the band [min, max] (default: the normal range with room on both sides). */
|
|
2881
|
+
scale?: [number, number];
|
|
2882
|
+
/** Recent values, oldest first, drawn as a sparkline. */
|
|
2883
|
+
trend?: number[];
|
|
2884
|
+
/** Under the value: when it was measured, the source … */
|
|
2885
|
+
caption?: ReactNode;
|
|
2886
|
+
/** Digits after the decimal point (default 0). */
|
|
2887
|
+
digits?: number;
|
|
2888
|
+
}
|
|
2889
|
+
export interface ActivityRing {
|
|
2890
|
+
label: string;
|
|
2891
|
+
value: number;
|
|
2892
|
+
goal: number;
|
|
2893
|
+
unit?: string;
|
|
2894
|
+
tint?: Tint;
|
|
2895
|
+
}
|
|
2896
|
+
export interface ActivityRingsProps extends BaseProps {
|
|
2897
|
+
/** Outer ring first. */
|
|
2898
|
+
rings: ActivityRing[];
|
|
2899
|
+
/** Diameter of the rings (default 132). */
|
|
2900
|
+
size?: number;
|
|
2901
|
+
/** Hide the legend beside the rings. */
|
|
2902
|
+
legend?: boolean;
|
|
2903
|
+
/** Accessible name (default "Activity"). */
|
|
2904
|
+
label?: string;
|
|
2905
|
+
}
|
|
2906
|
+
export type SleepStage = "awake" | "rem" | "light" | "deep";
|
|
2907
|
+
export interface SleepSegment {
|
|
2908
|
+
stage: SleepStage;
|
|
2909
|
+
start: Date | string | number;
|
|
2910
|
+
end: Date | string | number;
|
|
2911
|
+
}
|
|
2912
|
+
export interface SleepChartProps extends BaseProps {
|
|
2913
|
+
/** The night in order, from falling asleep to getting up. */
|
|
2914
|
+
segments: SleepSegment[];
|
|
2915
|
+
/** Accessible name (default "Sleep stages"). */
|
|
2916
|
+
label?: string;
|
|
2917
|
+
/** Hide the totals per stage under the chart. */
|
|
2918
|
+
summary?: boolean;
|
|
2919
|
+
}
|
|
2920
|
+
export interface MedicationItem {
|
|
2921
|
+
id: string;
|
|
2922
|
+
name: string;
|
|
2923
|
+
dose?: string;
|
|
2924
|
+
/** When, as shown ("08:00", "With breakfast"). */
|
|
2925
|
+
time: string;
|
|
2926
|
+
/** Set by the app, which knows the clock: default "taken" when `taken`, else "due". */
|
|
2927
|
+
status?: "taken" | "due" | "missed" | "upcoming";
|
|
2928
|
+
taken?: boolean;
|
|
2929
|
+
note?: string;
|
|
2930
|
+
icon?: IconName;
|
|
2931
|
+
}
|
|
2932
|
+
export interface MedicationListProps extends BaseProps {
|
|
2933
|
+
items: MedicationItem[];
|
|
2934
|
+
/** "Mark as taken" was pressed. */
|
|
2935
|
+
onTake?: (id: string) => void;
|
|
2936
|
+
/** Accessible name (default "Medication"). */
|
|
2937
|
+
label?: string;
|
|
2938
|
+
}
|
|
2939
|
+
export interface JournalEntryProps extends BaseProps {
|
|
2940
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
2941
|
+
surface?: Surface;
|
|
2942
|
+
date: Date | string | number;
|
|
2943
|
+
title?: string;
|
|
2944
|
+
mood?: MoodLevel;
|
|
2945
|
+
tags?: string[];
|
|
2946
|
+
children?: ReactNode;
|
|
2947
|
+
/** Buttons at the end (edit, share …). */
|
|
2948
|
+
actions?: ReactNode;
|
|
2949
|
+
}
|
|
2950
|
+
export interface GoalCardProps extends BaseProps {
|
|
2951
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
2952
|
+
surface?: Surface;
|
|
2953
|
+
title: string;
|
|
2954
|
+
value: number;
|
|
2955
|
+
target: number;
|
|
2956
|
+
/** How to show value and target (default number). */
|
|
2957
|
+
format?: "number" | "money" | "percent";
|
|
2958
|
+
/** Unit after numbers ("km", "books"). */
|
|
2959
|
+
unit?: string;
|
|
2960
|
+
currency?: string;
|
|
2961
|
+
due?: Date | string | number;
|
|
2962
|
+
icon?: IconName;
|
|
2963
|
+
tint?: Tint;
|
|
2964
|
+
milestones?: { label: string; done?: boolean }[];
|
|
2965
|
+
/** A note under the progress ("€250 a month keeps you on track"). */
|
|
2966
|
+
note?: ReactNode;
|
|
2967
|
+
}
|
|
2968
|
+
export interface InsightCardProps extends BaseProps {
|
|
2969
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
2970
|
+
surface?: Surface;
|
|
2971
|
+
title: string;
|
|
2972
|
+
children?: ReactNode;
|
|
2973
|
+
icon?: IconName;
|
|
2974
|
+
tone?: "info" | "success" | "warning" | "highlight";
|
|
2975
|
+
/** Above the title: area and time ("Money · 2 h ago"). */
|
|
2976
|
+
meta?: ReactNode;
|
|
2977
|
+
/** Where the insight comes from, as chips (like chat sources). */
|
|
2978
|
+
sources?: Source[];
|
|
2979
|
+
/** Why the assistant shows it; folded away behind "Why am I seeing this?". */
|
|
2980
|
+
why?: ReactNode;
|
|
2981
|
+
onAccept?: () => void;
|
|
2982
|
+
acceptLabel?: string;
|
|
2983
|
+
onSnooze?: () => void;
|
|
2984
|
+
onDismiss?: () => void;
|
|
2985
|
+
}
|
|
2986
|
+
export interface ConsentScope {
|
|
2987
|
+
id: string;
|
|
2988
|
+
label: string;
|
|
2989
|
+
description?: string;
|
|
2990
|
+
granted: boolean;
|
|
2991
|
+
/** Needed for the connection to work at all: shown, not switchable. */
|
|
2992
|
+
required?: boolean;
|
|
2993
|
+
}
|
|
2994
|
+
export interface ConsentConnector {
|
|
2995
|
+
id: string;
|
|
2996
|
+
name: string;
|
|
2997
|
+
icon?: IconName;
|
|
2998
|
+
/** A logo instead of the icon. */
|
|
2999
|
+
logo?: ReactNode;
|
|
3000
|
+
/** What the assistant uses it for. */
|
|
3001
|
+
purpose?: ReactNode;
|
|
3002
|
+
scopes: ConsentScope[];
|
|
3003
|
+
lastUsed?: Date | string | number;
|
|
3004
|
+
}
|
|
3005
|
+
export interface ConsentListProps extends BaseProps {
|
|
3006
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3007
|
+
surface?: Surface;
|
|
3008
|
+
connectors: ConsentConnector[];
|
|
3009
|
+
onScopeChange?: (connectorId: string, scopeId: string, granted: boolean) => void;
|
|
3010
|
+
onRevoke?: (connectorId: string) => void;
|
|
3011
|
+
/** Accessible name (default "Data access"). */
|
|
3012
|
+
label?: string;
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
/* ── Life: money, insurance, deadlines, documents ── */
|
|
3016
|
+
export interface BudgetCategory {
|
|
3017
|
+
id: string;
|
|
3018
|
+
label: string;
|
|
3019
|
+
icon?: IconName;
|
|
3020
|
+
tint?: Tint;
|
|
3021
|
+
spent: number;
|
|
3022
|
+
limit: number;
|
|
3023
|
+
}
|
|
3024
|
+
export interface BudgetListProps extends BaseProps {
|
|
3025
|
+
categories: BudgetCategory[];
|
|
3026
|
+
currency?: string;
|
|
3027
|
+
/** A category was picked (to show its transactions). */
|
|
3028
|
+
onSelect?: (id: string) => void;
|
|
3029
|
+
/** Accessible name (default "Budgets"). */
|
|
3030
|
+
label?: string;
|
|
3031
|
+
}
|
|
3032
|
+
export interface Subscription {
|
|
3033
|
+
id: string;
|
|
3034
|
+
name: string;
|
|
3035
|
+
icon?: IconName;
|
|
3036
|
+
/** A logo instead of the icon. */
|
|
3037
|
+
logo?: ReactNode;
|
|
3038
|
+
amount: number;
|
|
3039
|
+
period: "week" | "month" | "year";
|
|
3040
|
+
/** Next charge. */
|
|
3041
|
+
next?: Date | string | number;
|
|
3042
|
+
status?: "active" | "trial" | "cancelled";
|
|
3043
|
+
category?: string;
|
|
3044
|
+
}
|
|
3045
|
+
export interface SubscriptionListProps extends BaseProps {
|
|
3046
|
+
items: Subscription[];
|
|
3047
|
+
currency?: string;
|
|
3048
|
+
/** "Manage" on a subscription (cancel, change plan …). */
|
|
3049
|
+
onManage?: (id: string) => void;
|
|
3050
|
+
/** Hide the monthly and yearly totals. */
|
|
3051
|
+
totals?: boolean;
|
|
3052
|
+
/** Accessible name (default "Subscriptions"). */
|
|
3053
|
+
label?: string;
|
|
3054
|
+
}
|
|
3055
|
+
export interface NetWorthCardProps extends BaseProps {
|
|
3056
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3057
|
+
surface?: Surface;
|
|
3058
|
+
assets: { label: string; value: number; icon?: IconName }[];
|
|
3059
|
+
liabilities?: { label: string; value: number; icon?: IconName }[];
|
|
3060
|
+
/** Net worth over time, oldest first. */
|
|
3061
|
+
history?: number[];
|
|
3062
|
+
/** Change over `changeLabel` (e.g. +1,240 "since October"). */
|
|
3063
|
+
change?: number;
|
|
3064
|
+
changeLabel?: string;
|
|
3065
|
+
currency?: string;
|
|
3066
|
+
title?: string;
|
|
3067
|
+
}
|
|
3068
|
+
export interface DeadlineItem {
|
|
3069
|
+
id: string;
|
|
3070
|
+
title: string;
|
|
3071
|
+
/** What kind: "Contract", "ID card", "Tax" … */
|
|
3072
|
+
kind?: string;
|
|
3073
|
+
icon?: IconName;
|
|
3074
|
+
date: Date | string | number;
|
|
3075
|
+
amount?: number;
|
|
3076
|
+
done?: boolean;
|
|
3077
|
+
note?: string;
|
|
3078
|
+
}
|
|
3079
|
+
export interface DeadlineListProps extends BaseProps {
|
|
3080
|
+
items: DeadlineItem[];
|
|
3081
|
+
/** The day to count from (default: now). Set it for server rendering and stable output. */
|
|
3082
|
+
today?: Date | string | number;
|
|
3083
|
+
/** Days ahead that count as soon (default 14). */
|
|
3084
|
+
soon?: number;
|
|
3085
|
+
currency?: string;
|
|
3086
|
+
onDone?: (id: string) => void;
|
|
3087
|
+
/** Accessible name (default "Deadlines"). */
|
|
3088
|
+
label?: string;
|
|
3089
|
+
}
|
|
3090
|
+
export interface PolicyCardProps extends BaseProps {
|
|
3091
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3092
|
+
surface?: Surface;
|
|
3093
|
+
/** The kind of insurance: "Household contents", "Liability" … */
|
|
3094
|
+
type: string;
|
|
3095
|
+
insurer: string;
|
|
3096
|
+
icon?: IconName;
|
|
3097
|
+
tint?: Tint;
|
|
3098
|
+
policyNumber?: string;
|
|
3099
|
+
/** Show only the last four characters of the policy number. */
|
|
3100
|
+
maskNumber?: boolean;
|
|
3101
|
+
/** Sum insured: a number (money) or text ("unlimited"). */
|
|
3102
|
+
coverage?: number | ReactNode;
|
|
3103
|
+
premium?: { amount: number; period: "month" | "quarter" | "year" };
|
|
3104
|
+
deductible?: number;
|
|
3105
|
+
renews?: Date | string | number;
|
|
3106
|
+
status?: "active" | "pending" | "expiring" | "lapsed";
|
|
3107
|
+
currency?: string;
|
|
3108
|
+
/** Buttons at the foot (documents, report a claim …). */
|
|
3109
|
+
actions?: ReactNode;
|
|
3110
|
+
}
|
|
3111
|
+
export interface CoverageRow {
|
|
3112
|
+
id: string;
|
|
3113
|
+
risk: string;
|
|
3114
|
+
status: "covered" | "partial" | "none";
|
|
3115
|
+
note?: ReactNode;
|
|
3116
|
+
/** Which policy covers it. */
|
|
3117
|
+
policy?: string;
|
|
3118
|
+
}
|
|
3119
|
+
export interface CoverageMatrixProps extends BaseProps {
|
|
3120
|
+
rows: CoverageRow[];
|
|
3121
|
+
/** Accessible name and caption (default "Coverage"). */
|
|
3122
|
+
label?: string;
|
|
3123
|
+
}
|
|
3124
|
+
export interface ClaimStep {
|
|
3125
|
+
label: string;
|
|
3126
|
+
date?: Date | string | number;
|
|
3127
|
+
state: "done" | "current" | "todo" | "failed";
|
|
3128
|
+
note?: ReactNode;
|
|
3129
|
+
}
|
|
3130
|
+
export interface ClaimTimelineProps extends BaseProps {
|
|
3131
|
+
title: string;
|
|
3132
|
+
/** Reference and insurer under the title. */
|
|
3133
|
+
meta?: ReactNode;
|
|
3134
|
+
amount?: number;
|
|
3135
|
+
currency?: string;
|
|
3136
|
+
steps: ClaimStep[];
|
|
3137
|
+
}
|
|
3138
|
+
export interface LifeDocument {
|
|
3139
|
+
id: string;
|
|
3140
|
+
title: string;
|
|
3141
|
+
category?: string;
|
|
3142
|
+
icon?: IconName;
|
|
3143
|
+
holder?: string;
|
|
3144
|
+
expires?: Date | string | number;
|
|
3145
|
+
/** "PDF · 240 KB" */
|
|
3146
|
+
meta?: string;
|
|
3147
|
+
}
|
|
3148
|
+
export interface DocumentListProps extends BaseProps {
|
|
3149
|
+
documents: LifeDocument[];
|
|
3150
|
+
/** The day to count expiry from (default: now). */
|
|
3151
|
+
today?: Date | string | number;
|
|
3152
|
+
/** Days ahead that count as expiring soon (default 60). */
|
|
3153
|
+
soon?: number;
|
|
3154
|
+
onOpen?: (id: string) => void;
|
|
3155
|
+
/** Accessible name (default "Documents"). */
|
|
3156
|
+
label?: string;
|
|
3157
|
+
}
|
package/src/index.ts
CHANGED
package/src/strings.ts
CHANGED
|
@@ -492,6 +492,100 @@ export interface UIStrings {
|
|
|
492
492
|
contrastAA: string;
|
|
493
493
|
contrastAALarge: string;
|
|
494
494
|
contrastFails: string;
|
|
495
|
+
/* Life: HabitTracker, MoodPicker, VitalTile, ActivityRings, SleepChart, MedicationList, GoalCard, InsightCard, ConsentList */
|
|
496
|
+
habits: string;
|
|
497
|
+
/** "12-day streak" */
|
|
498
|
+
habitStreak: (days: number) => string;
|
|
499
|
+
/** "Mark {habit} done today" */
|
|
500
|
+
markHabitDone: (habit: string) => string;
|
|
501
|
+
habitDone: string;
|
|
502
|
+
habitMissed: string;
|
|
503
|
+
habitNoData: string;
|
|
504
|
+
howAreYou: string;
|
|
505
|
+
/** The five mood words, lowest first. */
|
|
506
|
+
moodLevels: [string, string, string, string, string];
|
|
507
|
+
inRange: string;
|
|
508
|
+
belowRange: string;
|
|
509
|
+
aboveRange: string;
|
|
510
|
+
/** "Normal 60–100" */
|
|
511
|
+
normalRange: (low: string, high: string) => string;
|
|
512
|
+
activity: string;
|
|
513
|
+
/** "6,240 of 8,000 steps" */
|
|
514
|
+
ofGoal: (value: string, goal: string) => string;
|
|
515
|
+
sleepStages: string;
|
|
516
|
+
/** Names of the sleep stages. */
|
|
517
|
+
sleepStageNames: Record<"awake" | "rem" | "light" | "deep", string>;
|
|
518
|
+
/** "7 h 32 min" */
|
|
519
|
+
durationHm: (hours: number, minutes: number) => string;
|
|
520
|
+
/** "Asleep 7 h 32 min" */
|
|
521
|
+
totalSleep: (duration: string) => string;
|
|
522
|
+
medication: string;
|
|
523
|
+
medTaken: string;
|
|
524
|
+
medDue: string;
|
|
525
|
+
medMissed: string;
|
|
526
|
+
medUpcoming: string;
|
|
527
|
+
/** "Mark {name} as taken" */
|
|
528
|
+
markTaken: (name: string) => string;
|
|
529
|
+
/** "By {date}" */
|
|
530
|
+
dueBy: (date: string) => string;
|
|
531
|
+
whyInsight: string;
|
|
532
|
+
insightAccept: string;
|
|
533
|
+
insightSnooze: string;
|
|
534
|
+
dataAccess: string;
|
|
535
|
+
revokeAccess: string;
|
|
536
|
+
/** "Last used {date}" */
|
|
537
|
+
lastUsed: (date: string) => string;
|
|
538
|
+
notUsedYet: string;
|
|
539
|
+
requiredScope: string;
|
|
540
|
+
/* Life: BudgetList, SubscriptionList, NetWorthCard, DeadlineList, PolicyCard, CoverageMatrix, ClaimTimeline, DocumentList */
|
|
541
|
+
budgets: string;
|
|
542
|
+
/** "€120 left" */
|
|
543
|
+
budgetLeft: (amount: string) => string;
|
|
544
|
+
/** "€40 over" */
|
|
545
|
+
budgetOver: (amount: string) => string;
|
|
546
|
+
subscriptions: string;
|
|
547
|
+
/** "€86 a month" */
|
|
548
|
+
perMonthTotal: (amount: string) => string;
|
|
549
|
+
/** "€1,032 a year" */
|
|
550
|
+
perYearTotal: (amount: string) => string;
|
|
551
|
+
/** "Manage {name}" */
|
|
552
|
+
manageItem: (name: string) => string;
|
|
553
|
+
/** "Trial" */
|
|
554
|
+
trialEnds: string;
|
|
555
|
+
cancelledLabel: string;
|
|
556
|
+
/** "Next on {date}" */
|
|
557
|
+
nextCharge: (date: string) => string;
|
|
558
|
+
/** Words for billing periods. */
|
|
559
|
+
periodWord: Record<"week" | "month" | "quarter" | "year", string>;
|
|
560
|
+
netWorth: string;
|
|
561
|
+
assetsLabel: string;
|
|
562
|
+
liabilitiesLabel: string;
|
|
563
|
+
deadlines: string;
|
|
564
|
+
/** "Overdue by 3 days" */
|
|
565
|
+
overdueBy: (days: number) => string;
|
|
566
|
+
dueToday: string;
|
|
567
|
+
/** "In 12 days" */
|
|
568
|
+
dueIn: (days: number) => string;
|
|
569
|
+
/** "Mark {title} done" */
|
|
570
|
+
markDone: (title: string) => string;
|
|
571
|
+
coverageLabel: string;
|
|
572
|
+
covered: string;
|
|
573
|
+
partlyCovered: string;
|
|
574
|
+
notCovered: string;
|
|
575
|
+
sumInsured: string;
|
|
576
|
+
deductibleLabel: string;
|
|
577
|
+
/** "Renews {date}" */
|
|
578
|
+
renewsOn: (date: string) => string;
|
|
579
|
+
policyNo: string;
|
|
580
|
+
/** Words for a policy's status. */
|
|
581
|
+
policyStatus: Record<"active" | "pending" | "expiring" | "lapsed", string>;
|
|
582
|
+
claimAmount: string;
|
|
583
|
+
documents: string;
|
|
584
|
+
expired: string;
|
|
585
|
+
/** "Expires in 40 days" */
|
|
586
|
+
expiresIn: (days: number) => string;
|
|
587
|
+
/** "Valid until {date}" */
|
|
588
|
+
expiresOn: (date: string) => string;
|
|
495
589
|
// @@KEYS
|
|
496
590
|
}
|
|
497
591
|
|
|
@@ -1491,6 +1585,151 @@ export const WORKSPACE_STRINGS: Pick<
|
|
|
1491
1585
|
accept: "Accept",
|
|
1492
1586
|
};
|
|
1493
1587
|
|
|
1588
|
+
/** Strings of the components in `life.tsx`. */
|
|
1589
|
+
export const LIFE_STRINGS: Pick<
|
|
1590
|
+
UIStrings,
|
|
1591
|
+
| "habits"
|
|
1592
|
+
| "habitStreak"
|
|
1593
|
+
| "markHabitDone"
|
|
1594
|
+
| "habitDone"
|
|
1595
|
+
| "habitMissed"
|
|
1596
|
+
| "habitNoData"
|
|
1597
|
+
| "howAreYou"
|
|
1598
|
+
| "moodLevels"
|
|
1599
|
+
| "inRange"
|
|
1600
|
+
| "belowRange"
|
|
1601
|
+
| "aboveRange"
|
|
1602
|
+
| "normalRange"
|
|
1603
|
+
| "activity"
|
|
1604
|
+
| "ofGoal"
|
|
1605
|
+
| "sleepStages"
|
|
1606
|
+
| "sleepStageNames"
|
|
1607
|
+
| "durationHm"
|
|
1608
|
+
| "totalSleep"
|
|
1609
|
+
| "medication"
|
|
1610
|
+
| "medTaken"
|
|
1611
|
+
| "medDue"
|
|
1612
|
+
| "medMissed"
|
|
1613
|
+
| "medUpcoming"
|
|
1614
|
+
| "markTaken"
|
|
1615
|
+
| "dueBy"
|
|
1616
|
+
| "whyInsight"
|
|
1617
|
+
| "insightAccept"
|
|
1618
|
+
| "insightSnooze"
|
|
1619
|
+
| "dataAccess"
|
|
1620
|
+
| "revokeAccess"
|
|
1621
|
+
| "lastUsed"
|
|
1622
|
+
| "notUsedYet"
|
|
1623
|
+
| "requiredScope"
|
|
1624
|
+
> = {
|
|
1625
|
+
habits: "Habits",
|
|
1626
|
+
habitStreak: (days) => `${days}-day streak`,
|
|
1627
|
+
markHabitDone: (habit) => `Mark ${habit} done today`,
|
|
1628
|
+
habitDone: "Done",
|
|
1629
|
+
habitMissed: "Missed",
|
|
1630
|
+
habitNoData: "No entry",
|
|
1631
|
+
howAreYou: "How are you feeling?",
|
|
1632
|
+
moodLevels: ["Awful", "Low", "Okay", "Good", "Great"],
|
|
1633
|
+
inRange: "In range",
|
|
1634
|
+
belowRange: "Below range",
|
|
1635
|
+
aboveRange: "Above range",
|
|
1636
|
+
normalRange: (low, high) => `Normal ${low}–${high}`,
|
|
1637
|
+
activity: "Activity",
|
|
1638
|
+
ofGoal: (value, goal) => `${value} of ${goal}`,
|
|
1639
|
+
sleepStages: "Sleep stages",
|
|
1640
|
+
sleepStageNames: { awake: "Awake", rem: "REM", light: "Light", deep: "Deep" },
|
|
1641
|
+
durationHm: (hours, minutes) =>
|
|
1642
|
+
hours ? (minutes ? `${hours} h ${minutes} min` : `${hours} h`) : `${minutes} min`,
|
|
1643
|
+
totalSleep: (duration) => `Asleep ${duration}`,
|
|
1644
|
+
medication: "Medication",
|
|
1645
|
+
medTaken: "Taken",
|
|
1646
|
+
medDue: "Due",
|
|
1647
|
+
medMissed: "Missed",
|
|
1648
|
+
medUpcoming: "Later",
|
|
1649
|
+
markTaken: (name) => `Mark ${name} as taken`,
|
|
1650
|
+
dueBy: (date) => `By ${date}`,
|
|
1651
|
+
whyInsight: "Why am I seeing this?",
|
|
1652
|
+
insightAccept: "Do it",
|
|
1653
|
+
insightSnooze: "Later",
|
|
1654
|
+
dataAccess: "Data access",
|
|
1655
|
+
revokeAccess: "Revoke access",
|
|
1656
|
+
lastUsed: (date) => `Last used ${date}`,
|
|
1657
|
+
notUsedYet: "Not used yet",
|
|
1658
|
+
requiredScope: "Required",
|
|
1659
|
+
};
|
|
1660
|
+
|
|
1661
|
+
/** Strings of the components in `household.tsx`. */
|
|
1662
|
+
export const HOUSEHOLD_STRINGS: Pick<
|
|
1663
|
+
UIStrings,
|
|
1664
|
+
| "budgets"
|
|
1665
|
+
| "budgetLeft"
|
|
1666
|
+
| "budgetOver"
|
|
1667
|
+
| "subscriptions"
|
|
1668
|
+
| "perMonthTotal"
|
|
1669
|
+
| "perYearTotal"
|
|
1670
|
+
| "manageItem"
|
|
1671
|
+
| "trialEnds"
|
|
1672
|
+
| "cancelledLabel"
|
|
1673
|
+
| "nextCharge"
|
|
1674
|
+
| "periodWord"
|
|
1675
|
+
| "netWorth"
|
|
1676
|
+
| "assetsLabel"
|
|
1677
|
+
| "liabilitiesLabel"
|
|
1678
|
+
| "deadlines"
|
|
1679
|
+
| "overdueBy"
|
|
1680
|
+
| "dueToday"
|
|
1681
|
+
| "dueIn"
|
|
1682
|
+
| "markDone"
|
|
1683
|
+
| "coverageLabel"
|
|
1684
|
+
| "covered"
|
|
1685
|
+
| "partlyCovered"
|
|
1686
|
+
| "notCovered"
|
|
1687
|
+
| "sumInsured"
|
|
1688
|
+
| "deductibleLabel"
|
|
1689
|
+
| "renewsOn"
|
|
1690
|
+
| "policyNo"
|
|
1691
|
+
| "policyStatus"
|
|
1692
|
+
| "claimAmount"
|
|
1693
|
+
| "documents"
|
|
1694
|
+
| "expired"
|
|
1695
|
+
| "expiresIn"
|
|
1696
|
+
| "expiresOn"
|
|
1697
|
+
> = {
|
|
1698
|
+
budgets: "Budgets",
|
|
1699
|
+
budgetLeft: (amount) => `${amount} left`,
|
|
1700
|
+
budgetOver: (amount) => `${amount} over`,
|
|
1701
|
+
subscriptions: "Subscriptions",
|
|
1702
|
+
perMonthTotal: (amount) => `${amount} a month`,
|
|
1703
|
+
perYearTotal: (amount) => `${amount} a year`,
|
|
1704
|
+
manageItem: (name) => `Manage ${name}`,
|
|
1705
|
+
trialEnds: "Trial",
|
|
1706
|
+
cancelledLabel: "Cancelled",
|
|
1707
|
+
nextCharge: (date) => `Next on ${date}`,
|
|
1708
|
+
periodWord: { week: "week", month: "month", quarter: "quarter", year: "year" },
|
|
1709
|
+
netWorth: "Net worth",
|
|
1710
|
+
assetsLabel: "Assets",
|
|
1711
|
+
liabilitiesLabel: "Liabilities",
|
|
1712
|
+
deadlines: "Deadlines",
|
|
1713
|
+
overdueBy: (days) => (days === 1 ? "Overdue by 1 day" : `Overdue by ${days} days`),
|
|
1714
|
+
dueToday: "Today",
|
|
1715
|
+
dueIn: (days) => (days === 1 ? "Tomorrow" : `In ${days} days`),
|
|
1716
|
+
markDone: (title) => `Mark ${title} done`,
|
|
1717
|
+
coverageLabel: "Coverage",
|
|
1718
|
+
covered: "Covered",
|
|
1719
|
+
partlyCovered: "Partly",
|
|
1720
|
+
notCovered: "Not covered",
|
|
1721
|
+
sumInsured: "Sum insured",
|
|
1722
|
+
deductibleLabel: "Deductible",
|
|
1723
|
+
renewsOn: (date) => `Renews ${date}`,
|
|
1724
|
+
policyNo: "Policy no.",
|
|
1725
|
+
policyStatus: { active: "Active", pending: "Pending", expiring: "Expiring", lapsed: "Lapsed" },
|
|
1726
|
+
claimAmount: "Claimed",
|
|
1727
|
+
documents: "Documents",
|
|
1728
|
+
expired: "Expired",
|
|
1729
|
+
expiresIn: (days) => (days === 1 ? "Expires tomorrow" : `Expires in ${days} days`),
|
|
1730
|
+
expiresOn: (date) => `Valid until ${date}`,
|
|
1731
|
+
};
|
|
1732
|
+
|
|
1494
1733
|
/** The English defaults: every group together. */
|
|
1495
1734
|
export const DEFAULT_STRINGS: UIStrings = /* @__PURE__ */ Object.assign(
|
|
1496
1735
|
{},
|
|
@@ -1509,6 +1748,8 @@ export const DEFAULT_STRINGS: UIStrings = /* @__PURE__ */ Object.assign(
|
|
|
1509
1748
|
FEEDBACK_STRINGS,
|
|
1510
1749
|
FORM_STRINGS,
|
|
1511
1750
|
FORMS_STRINGS,
|
|
1751
|
+
HOUSEHOLD_STRINGS,
|
|
1752
|
+
LIFE_STRINGS,
|
|
1512
1753
|
MAIL_STRINGS,
|
|
1513
1754
|
MEDIA_STRINGS,
|
|
1514
1755
|
NAVIGATION_STRINGS,
|