@valpro-labs/ui 1.1.7 → 1.1.9
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/blocks/mission-card-skeleton.js +1 -1
- package/dist/components/blocks/mission-card.js +1 -1
- package/dist/components/blocks/settings-row.d.ts +5 -1
- package/dist/components/blocks/settings-row.d.ts.map +1 -1
- package/dist/components/blocks/settings-row.js +2 -2
- package/dist/components/blocks/settings-row.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import { cn } from '../../lib/utils';
|
|
|
10
10
|
* Only the `<Text>` + progress bar content gets replaced with `<Skeleton>`.
|
|
11
11
|
*/
|
|
12
12
|
function MissionCardSkeleton({ className }) {
|
|
13
|
-
return (_jsxs(View, { className: cn('w-full gap-y-1', className), children: [_jsxs(View, { className: "flex flex-row items-center justify-between gap-x-2", children: [_jsx(Skeleton, { className: "h-6 w-3/4 rounded-md" }), _jsx(Skeleton, { className: "h-4 w-14 shrink-0 rounded-md" })] }), _jsxs(View, { className: "flex flex-row items-center gap-x-3", children: [_jsx(Skeleton, { className: "h-1.5 flex-1 rounded-full" }), _jsx(View, { className: "w-
|
|
13
|
+
return (_jsxs(View, { className: cn('w-full gap-y-1', className), children: [_jsxs(View, { className: "flex flex-row items-center justify-between gap-x-2", children: [_jsx(Skeleton, { className: "h-6 w-3/4 rounded-md" }), _jsx(Skeleton, { className: "h-4 w-14 shrink-0 rounded-md" })] }), _jsxs(View, { className: "flex flex-row items-center gap-x-3", children: [_jsx(Skeleton, { className: "h-1.5 flex-1 rounded-full" }), _jsx(View, { className: "w-20 shrink-0 flex-row items-center justify-center gap-x-0.5", children: _jsx(Skeleton, { className: "h-3 w-14 rounded-md" }) })] })] }));
|
|
14
14
|
}
|
|
15
15
|
export { MissionCardSkeleton };
|
|
16
16
|
//# sourceMappingURL=mission-card-skeleton.js.map
|
|
@@ -26,7 +26,7 @@ function formatCount(num) {
|
|
|
26
26
|
function MissionCard({ title, xpReward, progress, total, xpLabel = 'XP', className, }) {
|
|
27
27
|
const percent = total > 0 ? Math.min(progress / total, 1) : 0;
|
|
28
28
|
const completed = percent >= 1;
|
|
29
|
-
return (_jsxs(View, { className: cn('w-full gap-y-1', className), children: [_jsxs(View, { className: "flex flex-row items-center justify-between gap-x-2", children: [_jsx(Text, { numberOfLines:
|
|
29
|
+
return (_jsxs(View, { className: cn('w-full gap-y-1', className), children: [_jsxs(View, { className: "flex flex-row items-center justify-between gap-x-2", children: [_jsx(Text, { numberOfLines: 1, ellipsizeMode: "tail", className: "text-foreground flex-1 text-base font-medium", children: title }), _jsxs(Text, { className: cn('shrink-0 text-xs font-bold tabular-nums', completed ? 'text-val-green-ui' : 'text-val-green-ui/50'), children: ["+", xpReward.toLocaleString(), " ", xpLabel] })] }), _jsxs(View, { className: "flex flex-row items-center gap-x-3", children: [_jsx(Progress, { value: percent * 100, className: "bg-muted h-1.5 flex-1", indicatorClassName: cn('shadow-[0_0_8px_rgba(34,255,197,0.5)]', completed ? 'bg-val-green-ui' : 'bg-val-green-ui/50') }), _jsxs(View, { className: "w-20 shrink-0 flex-row items-center justify-center gap-x-0.5", children: [_jsx(Text, { className: "text-muted-foreground flex-1 text-right text-xs leading-none tabular-nums", children: formatCount(progress) }), _jsx(Text, { className: "text-muted-foreground text-xs leading-none", children: "/" }), _jsx(Text, { className: "text-muted-foreground text-xs leading-none tabular-nums", children: formatCount(total) })] })] })] }));
|
|
30
30
|
}
|
|
31
31
|
export { MissionCard };
|
|
32
32
|
//# sourceMappingURL=mission-card.js.map
|
|
@@ -20,6 +20,10 @@ interface SettingsRowProps {
|
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
/** Extra classes merged onto the row wrapper. */
|
|
22
22
|
className?: string;
|
|
23
|
+
/** Extra classes merged onto the label `<Text>` (e.g. `text-destructive` for a destructive row). */
|
|
24
|
+
labelClassName?: string;
|
|
25
|
+
/** Extra classes merged onto the sub-label `<Text>`. */
|
|
26
|
+
subClassName?: string;
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* Single row inside a `SettingsGroup` — leading icon, label (with optional
|
|
@@ -30,7 +34,7 @@ interface SettingsRowProps {
|
|
|
30
34
|
* feedback. Without, renders a plain `View` for read-only rows (e.g. a
|
|
31
35
|
* version display where `rightSlot` is just a value `<Text>`).
|
|
32
36
|
*/
|
|
33
|
-
declare function SettingsRow({ icon, label, sub, rightSlot, onPress, disabled, className, }: SettingsRowProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare function SettingsRow({ icon, label, sub, rightSlot, onPress, disabled, className, labelClassName, subClassName, }: SettingsRowProps): import("react/jsx-runtime").JSX.Element;
|
|
34
38
|
export { SettingsRow };
|
|
35
39
|
export type { SettingsRowProps };
|
|
36
40
|
//# sourceMappingURL=settings-row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-row.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/settings-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,UAAU,gBAAgB;IACxB,yFAAyF;IACzF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"settings-row.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/settings-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,UAAU,gBAAgB;IACxB,yFAAyF;IACzF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID;;;;;;;;GAQG;AACH,iBAAS,WAAW,CAAC,EACnB,IAAI,EACJ,KAAK,EACL,GAAG,EACH,SAAS,EACT,OAAO,EACP,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,GACb,EAAE,gBAAgB,2CA6BlB;AAED,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -13,8 +13,8 @@ const ROW_CLASSES = 'h-auto min-h-12 flex-row items-center gap-x-3 rounded-none
|
|
|
13
13
|
* feedback. Without, renders a plain `View` for read-only rows (e.g. a
|
|
14
14
|
* version display where `rightSlot` is just a value `<Text>`).
|
|
15
15
|
*/
|
|
16
|
-
function SettingsRow({ icon, label, sub, rightSlot, onPress, disabled, className, }) {
|
|
17
|
-
const content = (_jsxs(_Fragment, { children: [icon, _jsxs(View, { className: "flex-1", children: [_jsx(Text, { className:
|
|
16
|
+
function SettingsRow({ icon, label, sub, rightSlot, onPress, disabled, className, labelClassName, subClassName, }) {
|
|
17
|
+
const content = (_jsxs(_Fragment, { children: [icon, _jsxs(View, { className: "flex-1", children: [_jsx(Text, { className: cn('text-foreground text-sm font-normal', labelClassName), children: label }), sub ? (_jsx(Text, { className: cn('text-muted-foreground mt-px text-xs font-normal', subClassName), children: sub })) : null] }), rightSlot] }));
|
|
18
18
|
if (!onPress) {
|
|
19
19
|
return _jsx(View, { className: cn(ROW_CLASSES, className), children: content });
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-row.js","sourceRoot":"","sources":["../../../src/components/blocks/settings-row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"settings-row.js","sourceRoot":"","sources":["../../../src/components/blocks/settings-row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AA6BjC,MAAM,WAAW,GAAG,wEAAwE,CAAC;AAE7F;;;;;;;;GAQG;AACH,SAAS,WAAW,CAAC,EACnB,IAAI,EACJ,KAAK,EACL,GAAG,EACH,SAAS,EACT,OAAO,EACP,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,GACK;IACjB,MAAM,OAAO,GAAG,CACd,8BACG,IAAI,EACL,MAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,aACtB,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,qCAAqC,EAAE,cAAc,CAAC,YAAG,KAAK,GAAQ,EACzF,GAAG,CAAC,CAAC,CAAC,CACL,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,iDAAiD,EAAE,YAAY,CAAC,YACjF,GAAG,GACC,CACR,CAAC,CAAC,CAAC,IAAI,IACH,EACN,SAAS,IACT,CACJ,CAAC;IAEF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,YAAG,OAAO,GAAQ,CAAC;IACvE,CAAC;IAED,OAAO,CACL,KAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,YACpC,OAAO,GACD,CACV,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|