@valpro-labs/ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/components/blocks/accessory-card.d.ts +37 -0
- package/dist/components/blocks/accessory-card.d.ts.map +1 -0
- package/dist/components/blocks/accessory-card.js +42 -0
- package/dist/components/blocks/accessory-card.js.map +1 -0
- package/dist/components/blocks/agent-card.d.ts +28 -0
- package/dist/components/blocks/agent-card.d.ts.map +1 -0
- package/dist/components/blocks/agent-card.js +21 -0
- package/dist/components/blocks/agent-card.js.map +1 -0
- package/dist/components/blocks/bundle-card.d.ts +37 -0
- package/dist/components/blocks/bundle-card.d.ts.map +1 -0
- package/dist/components/blocks/bundle-card.js +33 -0
- package/dist/components/blocks/bundle-card.js.map +1 -0
- package/dist/components/blocks/daily-progress-skeleton.d.ts +8 -0
- package/dist/components/blocks/daily-progress-skeleton.d.ts.map +1 -0
- package/dist/components/blocks/daily-progress-skeleton.js +31 -0
- package/dist/components/blocks/daily-progress-skeleton.js.map +1 -0
- package/dist/components/blocks/daily-progress.d.ts +16 -0
- package/dist/components/blocks/daily-progress.d.ts.map +1 -0
- package/dist/components/blocks/daily-progress.js +209 -0
- package/dist/components/blocks/daily-progress.js.map +1 -0
- package/dist/components/blocks/expression-wheel.d.ts +30 -0
- package/dist/components/blocks/expression-wheel.d.ts.map +1 -0
- package/dist/components/blocks/expression-wheel.js +76 -0
- package/dist/components/blocks/expression-wheel.js.map +1 -0
- package/dist/components/blocks/friend-party-others-row.d.ts +20 -0
- package/dist/components/blocks/friend-party-others-row.d.ts.map +1 -0
- package/dist/components/blocks/friend-party-others-row.js +17 -0
- package/dist/components/blocks/friend-party-others-row.js.map +1 -0
- package/dist/components/blocks/friend-row-skeleton.d.ts +13 -0
- package/dist/components/blocks/friend-row-skeleton.d.ts.map +1 -0
- package/dist/components/blocks/friend-row-skeleton.js +14 -0
- package/dist/components/blocks/friend-row-skeleton.js.map +1 -0
- package/dist/components/blocks/friend-row.d.ts +39 -0
- package/dist/components/blocks/friend-row.d.ts.map +1 -0
- package/dist/components/blocks/friend-row.js +39 -0
- package/dist/components/blocks/friend-row.js.map +1 -0
- package/dist/components/blocks/index.d.ts +2 -0
- package/dist/components/blocks/index.d.ts.map +1 -0
- package/dist/components/blocks/index.js +4 -0
- package/dist/components/blocks/index.js.map +1 -0
- package/dist/components/blocks/item-bought-overlay.d.ts +32 -0
- package/dist/components/blocks/item-bought-overlay.d.ts.map +1 -0
- package/dist/components/blocks/item-bought-overlay.js +20 -0
- package/dist/components/blocks/item-bought-overlay.js.map +1 -0
- package/dist/components/blocks/map-banner.d.ts +39 -0
- package/dist/components/blocks/map-banner.d.ts.map +1 -0
- package/dist/components/blocks/map-banner.js +22 -0
- package/dist/components/blocks/map-banner.js.map +1 -0
- package/dist/components/blocks/match-card-skeleton.d.ts +13 -0
- package/dist/components/blocks/match-card-skeleton.d.ts.map +1 -0
- package/dist/components/blocks/match-card-skeleton.js +14 -0
- package/dist/components/blocks/match-card-skeleton.js.map +1 -0
- package/dist/components/blocks/match-card.d.ts +52 -0
- package/dist/components/blocks/match-card.d.ts.map +1 -0
- package/dist/components/blocks/match-card.js +48 -0
- package/dist/components/blocks/match-card.js.map +1 -0
- package/dist/components/blocks/match-info-row.d.ts +30 -0
- package/dist/components/blocks/match-info-row.d.ts.map +1 -0
- package/dist/components/blocks/match-info-row.js +18 -0
- package/dist/components/blocks/match-info-row.js.map +1 -0
- package/dist/components/blocks/mission-card-skeleton.d.ts +15 -0
- package/dist/components/blocks/mission-card-skeleton.d.ts.map +1 -0
- package/dist/components/blocks/mission-card-skeleton.js +16 -0
- package/dist/components/blocks/mission-card-skeleton.js.map +1 -0
- package/dist/components/blocks/mission-card.d.ts +28 -0
- package/dist/components/blocks/mission-card.d.ts.map +1 -0
- package/dist/components/blocks/mission-card.js +32 -0
- package/dist/components/blocks/mission-card.js.map +1 -0
- package/dist/components/blocks/mission-list.d.ts +42 -0
- package/dist/components/blocks/mission-list.d.ts.map +1 -0
- package/dist/components/blocks/mission-list.js +27 -0
- package/dist/components/blocks/mission-list.js.map +1 -0
- package/dist/components/blocks/offer-card.d.ts +44 -0
- package/dist/components/blocks/offer-card.d.ts.map +1 -0
- package/dist/components/blocks/offer-card.js +71 -0
- package/dist/components/blocks/offer-card.js.map +1 -0
- package/dist/components/blocks/owned-item-card.d.ts +54 -0
- package/dist/components/blocks/owned-item-card.d.ts.map +1 -0
- package/dist/components/blocks/owned-item-card.js +37 -0
- package/dist/components/blocks/owned-item-card.js.map +1 -0
- package/dist/components/blocks/player-card-skeleton.d.ts +13 -0
- package/dist/components/blocks/player-card-skeleton.d.ts.map +1 -0
- package/dist/components/blocks/player-card-skeleton.js +14 -0
- package/dist/components/blocks/player-card-skeleton.js.map +1 -0
- package/dist/components/blocks/player-card.d.ts +28 -0
- package/dist/components/blocks/player-card.d.ts.map +1 -0
- package/dist/components/blocks/player-card.js +22 -0
- package/dist/components/blocks/player-card.js.map +1 -0
- package/dist/components/blocks/player-row.d.ts +37 -0
- package/dist/components/blocks/player-row.d.ts.map +1 -0
- package/dist/components/blocks/player-row.js +23 -0
- package/dist/components/blocks/player-row.js.map +1 -0
- package/dist/components/blocks/rank-card.d.ts +42 -0
- package/dist/components/blocks/rank-card.d.ts.map +1 -0
- package/dist/components/blocks/rank-card.js +23 -0
- package/dist/components/blocks/rank-card.js.map +1 -0
- package/dist/components/blocks/rank-pyramid.d.ts +35 -0
- package/dist/components/blocks/rank-pyramid.d.ts.map +1 -0
- package/dist/components/blocks/rank-pyramid.js +97 -0
- package/dist/components/blocks/rank-pyramid.js.map +1 -0
- package/dist/components/blocks/rank-tier-card-skeleton.d.ts +13 -0
- package/dist/components/blocks/rank-tier-card-skeleton.d.ts.map +1 -0
- package/dist/components/blocks/rank-tier-card-skeleton.js +14 -0
- package/dist/components/blocks/rank-tier-card-skeleton.js.map +1 -0
- package/dist/components/blocks/rank-tier-card.d.ts +27 -0
- package/dist/components/blocks/rank-tier-card.d.ts.map +1 -0
- package/dist/components/blocks/rank-tier-card.js +21 -0
- package/dist/components/blocks/rank-tier-card.js.map +1 -0
- package/dist/components/blocks/reward-item.d.ts +38 -0
- package/dist/components/blocks/reward-item.d.ts.map +1 -0
- package/dist/components/blocks/reward-item.js +29 -0
- package/dist/components/blocks/reward-item.js.map +1 -0
- package/dist/components/blocks/role-card.d.ts +24 -0
- package/dist/components/blocks/role-card.d.ts.map +1 -0
- package/dist/components/blocks/role-card.js +25 -0
- package/dist/components/blocks/role-card.js.map +1 -0
- package/dist/components/blocks/section-title.d.ts +21 -0
- package/dist/components/blocks/section-title.d.ts.map +1 -0
- package/dist/components/blocks/section-title.js +17 -0
- package/dist/components/blocks/section-title.js.map +1 -0
- package/dist/components/blocks/settings-group.d.ts +19 -0
- package/dist/components/blocks/settings-group.d.ts.map +1 -0
- package/dist/components/blocks/settings-group.js +15 -0
- package/dist/components/blocks/settings-group.js.map +1 -0
- package/dist/components/blocks/settings-row.d.ts +36 -0
- package/dist/components/blocks/settings-row.d.ts.map +1 -0
- package/dist/components/blocks/settings-row.js +24 -0
- package/dist/components/blocks/settings-row.js.map +1 -0
- package/dist/components/blocks/skin-tile.d.ts +39 -0
- package/dist/components/blocks/skin-tile.d.ts.map +1 -0
- package/dist/components/blocks/skin-tile.js +26 -0
- package/dist/components/blocks/skin-tile.js.map +1 -0
- package/dist/components/blocks/wallet.d.ts +27 -0
- package/dist/components/blocks/wallet.d.ts.map +1 -0
- package/dist/components/blocks/wallet.js +21 -0
- package/dist/components/blocks/wallet.js.map +1 -0
- package/dist/components/blocks/weapon-category-grid.d.ts +50 -0
- package/dist/components/blocks/weapon-category-grid.d.ts.map +1 -0
- package/dist/components/blocks/weapon-category-grid.js +25 -0
- package/dist/components/blocks/weapon-category-grid.js.map +1 -0
- package/dist/components/ui/button.d.ts +15 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +61 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/image.d.ts +7 -0
- package/dist/components/ui/image.d.ts.map +1 -0
- package/dist/components/ui/image.js +9 -0
- package/dist/components/ui/image.js.map +1 -0
- package/dist/components/ui/image.web.d.ts +40 -0
- package/dist/components/ui/image.web.d.ts.map +1 -0
- package/dist/components/ui/image.web.js +33 -0
- package/dist/components/ui/image.web.js.map +1 -0
- package/dist/components/ui/progress.d.ts +9 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +36 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/progress.web.d.ts +16 -0
- package/dist/components/ui/progress.web.d.ts.map +1 -0
- package/dist/components/ui/progress.web.js +20 -0
- package/dist/components/ui/progress.web.js.map +1 -0
- package/dist/components/ui/separator.d.ts +9 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +8 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +7 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +17 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/skeleton.web.d.ts +14 -0
- package/dist/components/ui/skeleton.web.d.ts.map +1 -0
- package/dist/components/ui/skeleton.web.js +15 -0
- package/dist/components/ui/skeleton.web.js.map +1 -0
- package/dist/components/ui/text.d.ts +13 -0
- package/dist/components/ui/text.d.ts.map +1 -0
- package/dist/components/ui/text.js +49 -0
- package/dist/components/ui/text.js.map +1 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/svg-shim.d.ts +12 -0
- package/dist/lib/svg-shim.d.ts.map +1 -0
- package/dist/lib/svg-shim.js +12 -0
- package/dist/lib/svg-shim.js.map +1 -0
- package/dist/lib/svg-shim.web.d.ts +32 -0
- package/dist/lib/svg-shim.web.d.ts.map +1 -0
- package/dist/lib/svg-shim.web.js +16 -0
- package/dist/lib/svg-shim.web.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/weapon-grid-transform.d.ts +30 -0
- package/dist/lib/weapon-grid-transform.d.ts.map +1 -0
- package/dist/lib/weapon-grid-transform.js +106 -0
- package/dist/lib/weapon-grid-transform.js.map +1 -0
- package/dist/styles/global.css +132 -0
- package/package.json +102 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type PlayerRowRole = 'me' | 'ally' | 'enemy';
|
|
3
|
+
interface PlayerRowProps {
|
|
4
|
+
/** Agent display icon URL — fills the left square. */
|
|
5
|
+
agentIconUrl?: string;
|
|
6
|
+
/** Player display name. Falls back to nothing if omitted. */
|
|
7
|
+
name?: string;
|
|
8
|
+
/** Row tint: `me` → yellow, `ally` → green, `enemy` → red. */
|
|
9
|
+
role: PlayerRowRole;
|
|
10
|
+
/** Pre-formatted KDA, e.g. `"21/14/8"`. */
|
|
11
|
+
kda?: string;
|
|
12
|
+
/** Average combat score shown under the KDA line. */
|
|
13
|
+
avgScore?: number;
|
|
14
|
+
/** Competitive tier icon URL — small badge rendered before the name. */
|
|
15
|
+
tierIconUrl?: string;
|
|
16
|
+
/** Marker shown next to the avg-score line. Consumer supplies (e.g. phosphor `<ChartBar />`). */
|
|
17
|
+
scoreIcon?: React.ReactNode;
|
|
18
|
+
/** Extra classes merged onto the outer row wrapper. */
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Single scoreboard row inside the match-detail player list — agent icon
|
|
23
|
+
* on the left, optional tier badge, player name, KDA / avg-score on the
|
|
24
|
+
* right. Background tint is driven by `role`:
|
|
25
|
+
* - `me` — yellow (highlights the viewer)
|
|
26
|
+
* - `ally` — green
|
|
27
|
+
* - `enemy` — red
|
|
28
|
+
*
|
|
29
|
+
* Data-free: the consumer resolves the agent + tier icons, formats KDA,
|
|
30
|
+
* and decides role. Stack instances with a `<Separator />` between rows
|
|
31
|
+
* inside a `bg-card rounded-2xl overflow-hidden` container to match the
|
|
32
|
+
* app's scoreboard card.
|
|
33
|
+
*/
|
|
34
|
+
declare function PlayerRow({ agentIconUrl, name, role, kda, avgScore, tierIconUrl, scoreIcon, className, }: PlayerRowProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export { PlayerRow };
|
|
36
|
+
export type { PlayerRowProps, PlayerRowRole };
|
|
37
|
+
//# sourceMappingURL=player-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player-row.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/player-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,KAAK,aAAa,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7C,UAAU,cAAc;IACtB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,IAAI,EAAE,aAAa,CAAC;IACpB,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iGAAiG;IACjG,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,SAAS,CAAC,EACjB,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,WAAW,EACX,SAAS,EACT,SAAS,GACV,EAAE,cAAc,2CA8ChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { Image } from '../../components/ui/image';
|
|
4
|
+
import { Text } from '../../components/ui/text';
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
/**
|
|
7
|
+
* Single scoreboard row inside the match-detail player list — agent icon
|
|
8
|
+
* on the left, optional tier badge, player name, KDA / avg-score on the
|
|
9
|
+
* right. Background tint is driven by `role`:
|
|
10
|
+
* - `me` — yellow (highlights the viewer)
|
|
11
|
+
* - `ally` — green
|
|
12
|
+
* - `enemy` — red
|
|
13
|
+
*
|
|
14
|
+
* Data-free: the consumer resolves the agent + tier icons, formats KDA,
|
|
15
|
+
* and decides role. Stack instances with a `<Separator />` between rows
|
|
16
|
+
* inside a `bg-card rounded-2xl overflow-hidden` container to match the
|
|
17
|
+
* app's scoreboard card.
|
|
18
|
+
*/
|
|
19
|
+
function PlayerRow({ agentIconUrl, name, role, kda, avgScore, tierIconUrl, scoreIcon, className, }) {
|
|
20
|
+
return (_jsxs(View, { className: cn('flex-row items-center', role === 'me' && 'bg-val-yellow/80 dark:bg-val-yellow/80', role === 'ally' && 'bg-val-green/80 dark:bg-val-green/60', role === 'enemy' && 'bg-val-red/80 dark:bg-val-red/65', className), children: [_jsx(View, { className: "aspect-square h-16", children: agentIconUrl ? (_jsx(Image, { source: agentIconUrl, style: { width: '100%', height: '100%' }, contentFit: "cover" })) : null }), tierIconUrl ? (_jsx(View, { className: "h-10 w-10", children: _jsx(Image, { source: tierIconUrl, style: { width: '100%', height: '100%' }, contentFit: "contain" }) })) : null, _jsxs(View, { className: "flex-1 flex-row items-center gap-x-2 pr-4 pl-2", children: [_jsx(Text, { className: "flex-1 text-lg font-bold text-black dark:text-white", numberOfLines: 1, children: name }), kda != null && avgScore != null ? (_jsxs(View, { className: "items-end", children: [_jsx(Text, { className: "text-lg font-bold text-black dark:text-white", children: kda }), _jsxs(View, { className: "flex-row items-center gap-x-1", children: [scoreIcon, _jsx(Text, { className: "text-xs text-black/70 dark:text-white/70", children: avgScore.toLocaleString() })] })] })) : null] })] }));
|
|
21
|
+
}
|
|
22
|
+
export { PlayerRow };
|
|
23
|
+
//# sourceMappingURL=player-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player-row.js","sourceRoot":"","sources":["../../../src/components/blocks/player-row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAuBjC;;;;;;;;;;;;GAYG;AACH,SAAS,SAAS,CAAC,EACjB,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,WAAW,EACX,SAAS,EACT,SAAS,GACM;IACf,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,uBAAuB,EACvB,IAAI,KAAK,IAAI,IAAI,wCAAwC,EACzD,IAAI,KAAK,MAAM,IAAI,sCAAsC,EACzD,IAAI,KAAK,OAAO,IAAI,kCAAkC,EACtD,SAAS,CACV,aACD,KAAC,IAAI,IAAC,SAAS,EAAC,oBAAoB,YACjC,YAAY,CAAC,CAAC,CAAC,CACd,KAAC,KAAK,IACJ,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EACxC,UAAU,EAAC,OAAO,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,GACH,EACN,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,IAAI,IAAC,SAAS,EAAC,WAAW,YACzB,KAAC,KAAK,IACJ,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EACxC,UAAU,EAAC,SAAS,GACpB,GACG,CACR,CAAC,CAAC,CAAC,IAAI,EACR,MAAC,IAAI,IAAC,SAAS,EAAC,gDAAgD,aAC9D,KAAC,IAAI,IAAC,SAAS,EAAC,qDAAqD,EAAC,aAAa,EAAE,CAAC,YACnF,IAAI,GACA,EACN,GAAG,IAAI,IAAI,IAAI,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CACjC,MAAC,IAAI,IAAC,SAAS,EAAC,WAAW,aACzB,KAAC,IAAI,IAAC,SAAS,EAAC,8CAA8C,YAAE,GAAG,GAAQ,EAC3E,MAAC,IAAI,IAAC,SAAS,EAAC,+BAA+B,aAC5C,SAAS,EACV,KAAC,IAAI,IAAC,SAAS,EAAC,0CAA0C,YACvD,QAAQ,CAAC,cAAc,EAAE,GACrB,IACF,IACF,CACR,CAAC,CAAC,CAAC,IAAI,IACH,IACF,CACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type RankPyramidTier } from '../../components/blocks/rank-pyramid';
|
|
3
|
+
interface RankCardProps {
|
|
4
|
+
/** Season header shown above the tier icon, e.g. `"E11 A2"`. */
|
|
5
|
+
seasonTitle: string;
|
|
6
|
+
/** Competitive tier display icon URL. */
|
|
7
|
+
tierIcon?: string;
|
|
8
|
+
/** Tier name, e.g. `"Diamond 2"`. */
|
|
9
|
+
tierName?: string;
|
|
10
|
+
/** Ranked Rating value. */
|
|
11
|
+
rankedRating?: number;
|
|
12
|
+
/** Suffix shown after the RR value (default `"RR"`). Pass `""` to hide. */
|
|
13
|
+
rrLabel?: string;
|
|
14
|
+
/** Header shown above the pyramid, e.g. `"ACT RANK"`. */
|
|
15
|
+
actRankLabel: string;
|
|
16
|
+
/** Pre-sorted (highest first) filled-slot list forwarded to the pyramid. */
|
|
17
|
+
filledTiers?: ReadonlyArray<RankPyramidTier>;
|
|
18
|
+
/** Border icon URL drawn behind the pyramid. */
|
|
19
|
+
borderIcon?: string;
|
|
20
|
+
/** Pyramid outer width in px. Defaults to `80` to match the career screen. */
|
|
21
|
+
pyramidSize?: number;
|
|
22
|
+
/** Chevron rendered on the far right when `onPress` is set (e.g. phosphor `<CaretRight />`). */
|
|
23
|
+
chevron?: React.ReactNode;
|
|
24
|
+
/** Tap handler. When omitted the card renders without `Pressable` and hides the chevron slot. */
|
|
25
|
+
onPress?: () => void;
|
|
26
|
+
/** Show the skeleton placeholder for the tier column; the pyramid shows its empty-state. */
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
/** Extra classes merged onto the outer row wrapper. */
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Career rank card — composes `RankTierCard` (season + tier icon + RR) next to
|
|
33
|
+
* `RankPyramid` (act-rank wins), with an optional chevron + tap handler for
|
|
34
|
+
* the rank-history drill-in.
|
|
35
|
+
*
|
|
36
|
+
* Data-free: the consumer resolves tier metadata, pre-sorts the pyramid's
|
|
37
|
+
* filled-slot list, and supplies the chevron icon and navigation handler.
|
|
38
|
+
*/
|
|
39
|
+
declare function RankCard({ seasonTitle, tierIcon, tierName, rankedRating, rrLabel, actRankLabel, filledTiers, borderIcon, pyramidSize, chevron, onPress, isLoading, className, }: RankCardProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export { RankCard };
|
|
41
|
+
export type { RankCardProps };
|
|
42
|
+
//# sourceMappingURL=rank-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rank-card.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/rank-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAKrF,UAAU,aAAa;IACrB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,YAAY,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC7C,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gGAAgG;IAChG,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iGAAiG;IACjG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,iBAAS,QAAQ,CAAC,EAChB,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAU,EACV,WAAgB,EAChB,OAAO,EACP,OAAO,EACP,SAAiB,EACjB,SAAS,GACV,EAAE,aAAa,2CA0Cf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Pressable, View } from 'react-native';
|
|
3
|
+
import { RankPyramid } from '../../components/blocks/rank-pyramid';
|
|
4
|
+
import { RankTierCard } from '../../components/blocks/rank-tier-card';
|
|
5
|
+
import { Text } from '../../components/ui/text';
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
|
+
/**
|
|
8
|
+
* Career rank card — composes `RankTierCard` (season + tier icon + RR) next to
|
|
9
|
+
* `RankPyramid` (act-rank wins), with an optional chevron + tap handler for
|
|
10
|
+
* the rank-history drill-in.
|
|
11
|
+
*
|
|
12
|
+
* Data-free: the consumer resolves tier metadata, pre-sorts the pyramid's
|
|
13
|
+
* filled-slot list, and supplies the chevron icon and navigation handler.
|
|
14
|
+
*/
|
|
15
|
+
function RankCard({ seasonTitle, tierIcon, tierName, rankedRating, rrLabel, actRankLabel, filledTiers, borderIcon, pyramidSize = 80, chevron, onPress, isLoading = false, className, }) {
|
|
16
|
+
const content = (_jsxs(View, { className: cn('flex-row items-center px-4 py-3', className), children: [_jsxs(View, { className: "flex-1 flex-row items-start justify-center gap-x-6", children: [_jsx(RankTierCard, { seasonTitle: seasonTitle, tierIcon: tierIcon, tierName: tierName, rankedRating: rankedRating, rrLabel: rrLabel, isLoading: isLoading }), _jsxs(View, { className: "items-center self-stretch", children: [_jsx(Text, { className: "text-muted-foreground mb-1 text-xs font-medium tracking-widest uppercase", children: actRankLabel }), _jsx(View, { className: "flex-1 justify-center", children: _jsx(RankPyramid, { filledTiers: isLoading ? undefined : filledTiers, borderIcon: isLoading ? undefined : borderIcon, size: pyramidSize }) })] })] }), chevron ? (_jsx(View, { style: { opacity: onPress ? 1 : 0 }, children: chevron })) : null] }));
|
|
17
|
+
if (onPress) {
|
|
18
|
+
return (_jsx(Pressable, { onPress: onPress, style: ({ pressed }) => (pressed ? { opacity: 0.6 } : null), children: content }));
|
|
19
|
+
}
|
|
20
|
+
return content;
|
|
21
|
+
}
|
|
22
|
+
export { RankCard };
|
|
23
|
+
//# sourceMappingURL=rank-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rank-card.js","sourceRoot":"","sources":["../../../src/components/blocks/rank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C,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,YAAG,OAAO,GAAQ,CAC5D,CAAC,CAAC,CAAC,IAAI,IACH,CACR,CAAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,KAAC,SAAS,IAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YACrF,OAAO,GACE,CACb,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface RankPyramidTier {
|
|
2
|
+
/** Icon URL to use when the slot is geometrically up-facing. */
|
|
3
|
+
upIcon?: string;
|
|
4
|
+
/** Icon URL to use when the slot is geometrically down-facing. */
|
|
5
|
+
downIcon?: string;
|
|
6
|
+
}
|
|
7
|
+
interface RankPyramidProps {
|
|
8
|
+
/** Pre-sorted (highest tier first) list of filled slots. Excess entries beyond the triangle count are ignored. */
|
|
9
|
+
filledTiers?: ReadonlyArray<RankPyramidTier>;
|
|
10
|
+
/** Background border image URL drawn behind the triangles, tinted with the muted-foreground token. */
|
|
11
|
+
borderIcon?: string;
|
|
12
|
+
/** Outer width in px. Height derives to equilateral proportions. */
|
|
13
|
+
size?: number;
|
|
14
|
+
/** Row count when collapsed. */
|
|
15
|
+
rowsCollapsed?: number;
|
|
16
|
+
/** Row count when expanded. */
|
|
17
|
+
rowsExpanded?: number;
|
|
18
|
+
/** Starting expanded state. The component toggles on press. */
|
|
19
|
+
defaultExpanded?: boolean;
|
|
20
|
+
/** Extra classes merged onto the outer Pressable. */
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Act-rank pyramid: a stack of up- and down-facing triangles representing
|
|
25
|
+
* competitive wins, with an optional border image tinted behind it. Pressing
|
|
26
|
+
* toggles between a compact `rowsCollapsed` view and an expanded `rowsExpanded`
|
|
27
|
+
* view.
|
|
28
|
+
*
|
|
29
|
+
* Data-free: the consumer resolves tier triangle icons and border URLs and
|
|
30
|
+
* passes them in as a pre-sorted list.
|
|
31
|
+
*/
|
|
32
|
+
declare function RankPyramid({ filledTiers, borderIcon, size, rowsCollapsed, rowsExpanded, defaultExpanded, className, }: RankPyramidProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export { RankPyramid };
|
|
34
|
+
export type { RankPyramidProps, RankPyramidTier };
|
|
35
|
+
//# sourceMappingURL=rank-pyramid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rank-pyramid.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/rank-pyramid.tsx"],"names":[],"mappings":"AAyEA,UAAU,eAAe;IACvB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,gBAAgB;IACxB,kHAAkH;IAClH,WAAW,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC7C,sGAAsG;IACtG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,iBAAS,WAAW,CAAC,EACnB,WAAW,EACX,UAAU,EACV,IAAU,EACV,aAAsC,EACtC,YAAoC,EACpC,eAAuB,EACvB,SAAS,GACV,EAAE,gBAAgB,2CAmFlB;AAED,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
|
+
import { Pressable } from 'react-native';
|
|
4
|
+
import { useCSSVariable } from 'uniwind';
|
|
5
|
+
import { Image } from '../../components/ui/image';
|
|
6
|
+
import { Path, Svg } from '../../lib/svg-shim';
|
|
7
|
+
import { cn } from '../../lib/utils';
|
|
8
|
+
const ROWS_COLLAPSED_DEFAULT = 3;
|
|
9
|
+
const ROWS_EXPANDED_DEFAULT = 7;
|
|
10
|
+
const BORDER_SCALE = 1.8;
|
|
11
|
+
const BORDER_OFFSET_Y = -1;
|
|
12
|
+
function buildTrianglePositions(width, height, numRows) {
|
|
13
|
+
const positions = [];
|
|
14
|
+
const rowHeight = height / numRows;
|
|
15
|
+
for (let row = 0; row < numRows; row++) {
|
|
16
|
+
const count = 2 * row + 1;
|
|
17
|
+
const topRowWidth = width / numRows;
|
|
18
|
+
const rowWidth = topRowWidth * (row + 1);
|
|
19
|
+
const triWidth = rowWidth / (row + 1);
|
|
20
|
+
const xOffset = (width - rowWidth) / 2;
|
|
21
|
+
const yTop = row * rowHeight;
|
|
22
|
+
const yBottom = yTop + rowHeight;
|
|
23
|
+
for (let col = 0; col < count; col++) {
|
|
24
|
+
const isUp = col % 2 === 0;
|
|
25
|
+
const pairIndex = Math.floor(col / 2);
|
|
26
|
+
let path;
|
|
27
|
+
let bbox;
|
|
28
|
+
if (isUp) {
|
|
29
|
+
const left = xOffset + pairIndex * triWidth;
|
|
30
|
+
const right = left + triWidth;
|
|
31
|
+
const topX = (left + right) / 2;
|
|
32
|
+
path = `M ${topX} ${yTop} L ${right} ${yBottom} L ${left} ${yBottom} Z`;
|
|
33
|
+
bbox = { x: left, y: yTop, w: triWidth, h: rowHeight };
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const left = xOffset + pairIndex * triWidth;
|
|
37
|
+
const right = left + triWidth;
|
|
38
|
+
const topX = (left + right) / 2 + triWidth / 2;
|
|
39
|
+
path = `M ${left + triWidth / 2} ${yTop} L ${right + triWidth / 2} ${yTop} L ${topX} ${yBottom} Z`;
|
|
40
|
+
bbox = { x: left + triWidth / 2, y: yTop, w: triWidth, h: rowHeight };
|
|
41
|
+
}
|
|
42
|
+
positions.push({ row, col, up: isUp, path, bbox });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return positions;
|
|
46
|
+
}
|
|
47
|
+
function useColorVar(name) {
|
|
48
|
+
const value = useCSSVariable(name);
|
|
49
|
+
return typeof value === 'string' ? value : '';
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Act-rank pyramid: a stack of up- and down-facing triangles representing
|
|
53
|
+
* competitive wins, with an optional border image tinted behind it. Pressing
|
|
54
|
+
* toggles between a compact `rowsCollapsed` view and an expanded `rowsExpanded`
|
|
55
|
+
* view.
|
|
56
|
+
*
|
|
57
|
+
* Data-free: the consumer resolves tier triangle icons and border URLs and
|
|
58
|
+
* passes them in as a pre-sorted list.
|
|
59
|
+
*/
|
|
60
|
+
function RankPyramid({ filledTiers, borderIcon, size = 100, rowsCollapsed = ROWS_COLLAPSED_DEFAULT, rowsExpanded = ROWS_EXPANDED_DEFAULT, defaultExpanded = false, className, }) {
|
|
61
|
+
const width = size;
|
|
62
|
+
const height = size * (Math.sqrt(3) / 2);
|
|
63
|
+
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
64
|
+
const numRows = expanded ? rowsExpanded : rowsCollapsed;
|
|
65
|
+
const triangles = useMemo(() => buildTrianglePositions(width, height, numRows), [width, height, numRows]);
|
|
66
|
+
const slots = useMemo(() => (filledTiers ?? []).slice(0, triangles.length), [filledTiers, triangles.length]);
|
|
67
|
+
const foreground = useColorVar('--color-foreground');
|
|
68
|
+
const mutedForeground = useColorVar('--color-muted-foreground');
|
|
69
|
+
const card = useColorVar('--color-card');
|
|
70
|
+
return (_jsxs(Pressable, { onPress: () => setExpanded((v) => !v), style: { width, height }, className: cn(className), children: [borderIcon ? (_jsx(Image, { source: borderIcon, style: {
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
width: width * BORDER_SCALE,
|
|
73
|
+
height: height * BORDER_SCALE,
|
|
74
|
+
left: -(width * (BORDER_SCALE - 1)) / 2,
|
|
75
|
+
top: BORDER_OFFSET_Y - (height * (BORDER_SCALE - 1)) / 2,
|
|
76
|
+
tintColor: mutedForeground || undefined,
|
|
77
|
+
}, contentFit: "contain", pointerEvents: "none" })) : null, _jsx(Svg, { style: { position: 'absolute' }, width: width, height: height, viewBox: `0 0 ${width} ${height}`, children: triangles.map((tri, index) => {
|
|
78
|
+
const isFilled = index < slots.length;
|
|
79
|
+
if (isFilled)
|
|
80
|
+
return null;
|
|
81
|
+
return (_jsx(Path, { d: tri.path, fill: card, stroke: foreground, strokeWidth: 0.5, strokeOpacity: 0.3 }, `${tri.row}-${tri.col}`));
|
|
82
|
+
}) }), slots.map((slot, index) => {
|
|
83
|
+
const tri = triangles[index];
|
|
84
|
+
const iconUrl = tri.up ? slot.upIcon : slot.downIcon;
|
|
85
|
+
if (!iconUrl)
|
|
86
|
+
return null;
|
|
87
|
+
return (_jsx(Image, { source: iconUrl, style: {
|
|
88
|
+
position: 'absolute',
|
|
89
|
+
left: tri.bbox.x,
|
|
90
|
+
top: tri.bbox.y,
|
|
91
|
+
width: tri.bbox.w,
|
|
92
|
+
height: tri.bbox.h,
|
|
93
|
+
}, contentFit: "fill" }, `img-${tri.row}-${tri.col}`));
|
|
94
|
+
})] }));
|
|
95
|
+
}
|
|
96
|
+
export { RankPyramid };
|
|
97
|
+
//# sourceMappingURL=rank-pyramid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rank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,OAAO,IAAI,CAAC;oBAC1B,OAAO,CACL,KAAC,IAAI,IAEH,CAAC,EAAE,GAAG,CAAC,IAAI,EACX,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,GAAG,EAChB,aAAa,EAAE,GAAG,IALb,GAAG,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,CAM5B,CACH,CAAC;gBACJ,CAAC,CAAC,GACE,EAEL,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBACzB,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,CAAE,CAAC;gBAC9B,MAAM,OAAO,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACrD,IAAI,CAAC,OAAO;oBAAE,OAAO,IAAI,CAAC;gBAC1B,OAAO,CACL,KAAC,KAAK,IAEJ,MAAM,EAAE,OAAO,EACf,KAAK,EAAE;wBACL,QAAQ,EAAE,UAAU;wBACpB,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;wBAChB,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;wBACf,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;wBACjB,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;qBACnB,EACD,UAAU,EAAC,MAAM,IATZ,OAAO,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,CAUhC,CACH,CAAC;YACJ,CAAC,CAAC,IACQ,CACb,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface RankTierCardSkeletonProps {
|
|
2
|
+
/** Extra classes merged onto the outer column wrapper. */
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Loading placeholder for `RankTierCard`. Mirrors the season label, 64×64 tier
|
|
7
|
+
* icon, tier name, and RR rows so the layout doesn't shift once rank data
|
|
8
|
+
* resolves.
|
|
9
|
+
*/
|
|
10
|
+
declare function RankTierCardSkeleton({ className }: RankTierCardSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { RankTierCardSkeleton };
|
|
12
|
+
export type { RankTierCardSkeletonProps };
|
|
13
|
+
//# sourceMappingURL=rank-tier-card-skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rank-tier-card-skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/rank-tier-card-skeleton.tsx"],"names":[],"mappings":"AAKA,UAAU,yBAAyB;IACjC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE,yBAAyB,2CASrE;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { Skeleton } from '../../components/ui/skeleton';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
/**
|
|
6
|
+
* Loading placeholder for `RankTierCard`. Mirrors the season label, 64×64 tier
|
|
7
|
+
* icon, tier name, and RR rows so the layout doesn't shift once rank data
|
|
8
|
+
* resolves.
|
|
9
|
+
*/
|
|
10
|
+
function RankTierCardSkeleton({ className }) {
|
|
11
|
+
return (_jsxs(View, { className: cn('items-center', className), children: [_jsx(Skeleton, { className: "mb-1 h-4 w-12 rounded-md" }), _jsx(Skeleton, { style: { width: 64, height: 64 }, className: "rounded-md" }), _jsx(Skeleton, { className: "mt-1 h-6 w-24 rounded-md" }), _jsx(Skeleton, { className: "mt-0.5 h-5 w-14 rounded-md" })] }));
|
|
12
|
+
}
|
|
13
|
+
export { RankTierCardSkeleton };
|
|
14
|
+
//# sourceMappingURL=rank-tier-card-skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rank-tier-card-skeleton.js","sourceRoot":"","sources":["../../../src/components/blocks/rank-tier-card-skeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAOjC;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,EAAE,SAAS,EAA6B;IACpE,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC,aAC5C,KAAC,QAAQ,IAAC,SAAS,EAAC,0BAA0B,GAAG,EACjD,KAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,YAAY,GAAG,EACrE,KAAC,QAAQ,IAAC,SAAS,EAAC,0BAA0B,GAAG,EACjD,KAAC,QAAQ,IAAC,SAAS,EAAC,4BAA4B,GAAG,IAC9C,CACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface RankTierCardProps {
|
|
2
|
+
/** Section header above the tier icon, e.g. `"E11 A2"`. */
|
|
3
|
+
seasonTitle: string;
|
|
4
|
+
/** Competitive tier display icon URL. */
|
|
5
|
+
tierIcon?: string;
|
|
6
|
+
/** Tier name, e.g. `"Diamond 2"`. */
|
|
7
|
+
tierName?: string;
|
|
8
|
+
/** Ranked Rating value. */
|
|
9
|
+
rankedRating?: number;
|
|
10
|
+
/** Suffix shown after the RR value (default `"RR"`). Pass `""` to hide. */
|
|
11
|
+
rrLabel?: string;
|
|
12
|
+
/** Show the skeleton placeholder instead of the real content. */
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
/** Extra classes merged onto the outer column wrapper. */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Rank tier summary column — season label, tier icon, tier name, and RR,
|
|
19
|
+
* stacked and horizontally centered. Composes into the career rank card or
|
|
20
|
+
* any other surface that needs to display a player's current tier.
|
|
21
|
+
*
|
|
22
|
+
* Data-free: the consumer resolves tier metadata.
|
|
23
|
+
*/
|
|
24
|
+
declare function RankTierCard({ seasonTitle, tierIcon, tierName, rankedRating, rrLabel, isLoading, className, }: RankTierCardProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { RankTierCard };
|
|
26
|
+
export type { RankTierCardProps };
|
|
27
|
+
//# sourceMappingURL=rank-tier-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rank-tier-card.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/rank-tier-card.tsx"],"names":[],"mappings":"AAOA,UAAU,iBAAiB;IACzB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,iBAAS,YAAY,CAAC,EACpB,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,OAAc,EACd,SAAiB,EACjB,SAAS,GACV,EAAE,iBAAiB,2CA8BnB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { RankTierCardSkeleton } from '../../components/blocks/rank-tier-card-skeleton';
|
|
4
|
+
import { Image } from '../../components/ui/image';
|
|
5
|
+
import { Text } from '../../components/ui/text';
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
|
+
/**
|
|
8
|
+
* Rank tier summary column — season label, tier icon, tier name, and RR,
|
|
9
|
+
* stacked and horizontally centered. Composes into the career rank card or
|
|
10
|
+
* any other surface that needs to display a player's current tier.
|
|
11
|
+
*
|
|
12
|
+
* Data-free: the consumer resolves tier metadata.
|
|
13
|
+
*/
|
|
14
|
+
function RankTierCard({ seasonTitle, tierIcon, tierName, rankedRating, rrLabel = 'RR', isLoading = false, className, }) {
|
|
15
|
+
if (isLoading) {
|
|
16
|
+
return _jsx(RankTierCardSkeleton, { className: className });
|
|
17
|
+
}
|
|
18
|
+
return (_jsxs(View, { className: cn('items-center', className), children: [_jsx(Text, { className: "text-muted-foreground mb-1 text-xs font-medium tracking-widest uppercase", children: seasonTitle }), _jsx(View, { className: "h-16 w-16", children: tierIcon ? (_jsx(Image, { source: tierIcon, style: { width: '100%', height: '100%' }, contentFit: "contain" })) : null }), tierName ? (_jsx(Text, { className: "text-foreground mt-1 text-base font-bold tracking-wide uppercase", children: tierName })) : null, _jsxs(Text, { className: "text-muted-foreground mt-0.5 text-sm font-medium", children: [rankedRating ?? 0, rrLabel ? ` ${rrLabel}` : ''] })] }));
|
|
19
|
+
}
|
|
20
|
+
export { RankTierCard };
|
|
21
|
+
//# sourceMappingURL=rank-tier-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rank-tier-card.js","sourceRoot":"","sources":["../../../src/components/blocks/rank-tier-card.tsx"],"names":[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Y,EAAE,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface RewardItemProps {
|
|
2
|
+
/** Reward icon URL. Falls back to a muted square placeholder when omitted. */
|
|
3
|
+
iconUrl?: string;
|
|
4
|
+
/** Tint the icon with `--color-foreground`. Useful for title / currency glyphs shipped as text masks. */
|
|
5
|
+
tinted?: boolean;
|
|
6
|
+
/** Reward display name (main label). */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Quantity multiplier; suffixes `"x{amount}"` after the name when > 1. */
|
|
9
|
+
amount?: number;
|
|
10
|
+
/** Sub-label shown under the name — e.g. `"TIER 5"` or `"EPILOGUE 2"`. Consumer resolves the string (i18n, etc.). */
|
|
11
|
+
tierLabel?: string;
|
|
12
|
+
/** XP accumulated toward this level. Pair with `xp` to draw the next-level progress stripe. */
|
|
13
|
+
progressionXp?: number;
|
|
14
|
+
/** XP required to reach this level. */
|
|
15
|
+
xp?: number;
|
|
16
|
+
/** Paints the row with a green completed tint. */
|
|
17
|
+
isCompleted?: boolean;
|
|
18
|
+
/** Enables the progress stripe underlay (needs `xp` + `progressionXp`). */
|
|
19
|
+
isNext?: boolean;
|
|
20
|
+
/** Hide the tier sub-label while keeping its height, so adjacent rows line up. */
|
|
21
|
+
hideTier?: boolean;
|
|
22
|
+
/** Extra classes merged onto the outer row wrapper. */
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One row inside a battle-pass / event-pass reward list — thumbnail on the
|
|
27
|
+
* left, reward name + tier sub-label stacked on the right. Completed rows
|
|
28
|
+
* get a green wash; the current "next" row gets an XP progress stripe.
|
|
29
|
+
*
|
|
30
|
+
* Data-free: the consumer resolves the reward metadata, chooses when to
|
|
31
|
+
* render `"TIER N"` / `"EPILOGUE N"`, and passes the raw icon URL + flags.
|
|
32
|
+
* Stack instances with `<Separator />` in between to rebuild the app's
|
|
33
|
+
* `RewardList` container on the caller side.
|
|
34
|
+
*/
|
|
35
|
+
declare function RewardItem({ iconUrl, tinted, name, amount, tierLabel, progressionXp, xp, isCompleted, isNext, hideTier, className, }: RewardItemProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export { RewardItem };
|
|
37
|
+
export type { RewardItemProps };
|
|
38
|
+
//# sourceMappingURL=reward-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reward-item.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/reward-item.tsx"],"names":[],"mappings":"AAQA,UAAU,eAAe;IACvB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yGAAyG;IACzG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qHAAqH;IACrH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,iBAAS,UAAU,CAAC,EAClB,OAAO,EACP,MAAc,EACd,IAAI,EACJ,MAAM,EACN,SAAS,EACT,aAAa,EACb,EAAE,EACF,WAAmB,EACnB,MAAc,EACd,QAAgB,EAChB,SAAS,GACV,EAAE,eAAe,2CA0DjB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useCSSVariable } from 'uniwind';
|
|
4
|
+
import { Image } from '../../components/ui/image';
|
|
5
|
+
import { Text } from '../../components/ui/text';
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
|
+
/**
|
|
8
|
+
* One row inside a battle-pass / event-pass reward list — thumbnail on the
|
|
9
|
+
* left, reward name + tier sub-label stacked on the right. Completed rows
|
|
10
|
+
* get a green wash; the current "next" row gets an XP progress stripe.
|
|
11
|
+
*
|
|
12
|
+
* Data-free: the consumer resolves the reward metadata, chooses when to
|
|
13
|
+
* render `"TIER N"` / `"EPILOGUE N"`, and passes the raw icon URL + flags.
|
|
14
|
+
* Stack instances with `<Separator />` in between to rebuild the app's
|
|
15
|
+
* `RewardList` container on the caller side.
|
|
16
|
+
*/
|
|
17
|
+
function RewardItem({ iconUrl, tinted = false, name, amount, tierLabel, progressionXp, xp, isCompleted = false, isNext = false, hideTier = false, className, }) {
|
|
18
|
+
const foregroundRaw = useCSSVariable('--color-foreground');
|
|
19
|
+
const foreground = typeof foregroundRaw === 'string' ? foregroundRaw : undefined;
|
|
20
|
+
const showProgress = !isCompleted && isNext && !!xp && progressionXp !== undefined;
|
|
21
|
+
const progressPct = showProgress ? Math.min(100, (progressionXp / xp) * 100) : 0;
|
|
22
|
+
return (_jsxs(View, { className: cn('relative flex-row items-center gap-x-3 overflow-hidden px-4 py-3', isCompleted && 'bg-val-green-ui/20', className), children: [showProgress ? (_jsx(View, { className: "bg-val-green-ui/10 absolute top-0 bottom-0 left-0", style: { width: `${progressPct}%` } })) : null, _jsx(View, { className: "size-10 items-center justify-center", children: iconUrl ? (_jsx(Image, { source: iconUrl, style: {
|
|
23
|
+
width: '100%',
|
|
24
|
+
height: '100%',
|
|
25
|
+
tintColor: tinted ? foreground : undefined,
|
|
26
|
+
}, contentFit: "contain" })) : (_jsx(View, { className: "bg-muted h-full w-full" })) }), _jsxs(View, { className: "flex-1", children: [_jsxs(Text, { className: "text-foreground text-base font-bold tracking-tight uppercase", numberOfLines: 1, children: [name, amount && amount > 1 ? ` x${amount}` : ''] }), tierLabel ? (_jsx(View, { className: cn('mt-0.5 flex-row items-center gap-x-2', hideTier && 'opacity-0'), children: _jsx(Text, { className: cn('text-xs font-bold uppercase', isCompleted ? 'text-val-green-ui' : 'text-muted-foreground'), children: tierLabel }) })) : null] })] }));
|
|
27
|
+
}
|
|
28
|
+
export { RewardItem };
|
|
29
|
+
//# sourceMappingURL=reward-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reward-item.js","sourceRoot":"","sources":["../../../src/components/blocks/reward-item.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AA2BjC;;;;;;;;;GASG;AACH,SAAS,UAAU,CAAC,EAClB,OAAO,EACP,MAAM,GAAG,KAAK,EACd,IAAI,EACJ,MAAM,EACN,SAAS,EACT,aAAa,EACb,EAAE,EACF,WAAW,GAAG,KAAK,EACnB,MAAM,GAAG,KAAK,EACd,QAAQ,GAAG,KAAK,EAChB,SAAS,GACO;IAChB,MAAM,aAAa,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG,OAAO,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;IAEjF,MAAM,YAAY,GAAG,CAAC,WAAW,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,IAAI,aAAa,KAAK,SAAS,CAAC;IACnF,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GA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AC,CAAC,CAAC,IAAI,IACH,IACF,CACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface RoleCardProps {
|
|
3
|
+
/** Role display icon URL. Tinted with the foreground / active color. */
|
|
4
|
+
iconUrl?: string;
|
|
5
|
+
/** Size of the rendered role icon, in pixels. */
|
|
6
|
+
iconSize?: number;
|
|
7
|
+
/** Highlights the card with the active/selected tint. */
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
/** Fallback content rendered when `iconUrl` is omitted (e.g. an "all roles" glyph). */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/** Tap handler. When omitted the card renders without `Pressable`. */
|
|
12
|
+
onPress?: () => void;
|
|
13
|
+
/** Extra classes merged onto the outer card wrapper. */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Role filter tile — square card centered on a tintable role glyph, used to
|
|
18
|
+
* filter an agent-pass grid by role. Pair with an "all roles" variant by
|
|
19
|
+
* omitting `iconUrl` and passing a glyph via `children`.
|
|
20
|
+
*/
|
|
21
|
+
declare function RoleCard({ iconUrl, iconSize, selected, children, onPress, className, }: RoleCardProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { RoleCard };
|
|
23
|
+
export type { RoleCardProps };
|
|
24
|
+
//# sourceMappingURL=role-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-card.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/role-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,UAAU,aAAa;IACrB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,EAChB,OAAO,EACP,QAAa,EACb,QAAgB,EAChB,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE,aAAa,2CA+Bf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Pressable, View } from 'react-native';
|
|
3
|
+
import { useCSSVariable } from 'uniwind';
|
|
4
|
+
import { Image } from '../../components/ui/image';
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
function useColorVar(name) {
|
|
7
|
+
const v = useCSSVariable(name);
|
|
8
|
+
return typeof v === 'string' ? v : undefined;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Role filter tile — square card centered on a tintable role glyph, used to
|
|
12
|
+
* filter an agent-pass grid by role. Pair with an "all roles" variant by
|
|
13
|
+
* omitting `iconUrl` and passing a glyph via `children`.
|
|
14
|
+
*/
|
|
15
|
+
function RoleCard({ iconUrl, iconSize = 40, selected = false, children, onPress, className, }) {
|
|
16
|
+
const foreground = useColorVar('--color-foreground');
|
|
17
|
+
const valGreenUi = useColorVar('--color-val-green-ui');
|
|
18
|
+
const tint = selected ? valGreenUi : foreground;
|
|
19
|
+
const card = (_jsx(View, { className: cn('bg-card aspect-square items-center justify-center rounded-xl', selected && 'bg-val-green/30', className), children: iconUrl ? (_jsx(Image, { source: iconUrl, style: { width: iconSize, height: iconSize, tintColor: tint }, contentFit: "contain" })) : (children) }));
|
|
20
|
+
if (!onPress)
|
|
21
|
+
return card;
|
|
22
|
+
return (_jsx(Pressable, { onPress: onPress, style: ({ pressed }) => ({ opacity: pressed ? 0.8 : 1 }), children: card }));
|
|
23
|
+
}
|
|
24
|
+
export { RoleCard };
|
|
25
|
+
//# sourceMappingURL=role-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-card.js","sourceRoot":"","sources":["../../../src/components/blocks/role-card.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAiBjC,SAAS,WAAW,CAAC,IAAY;IAC/B,MAAM,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAS,QAAQ,CAAC,EAChB,OAAO,EACP,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,OAAO,EACP,SAAS,GACK;IACd,MAAM,UAAU,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,WAAW,CAAC,sBAAsB,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC;IAEhD,MAAM,IAAI,GAAG,CACX,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,8DAA8D,EAC9D,QAAQ,IAAI,iBAAiB,EAC7B,SAAS,CACV,YACA,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,KAAK,IACJ,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,EAC7D,UAAU,EAAC,SAAS,GACpB,CACH,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,GACI,CACR,CAAC;IAEF,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,OAAO,CACL,KAAC,SAAS,IAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,YAClF,IAAI,GACK,CACb,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface SectionTitleProps {
|
|
3
|
+
/** Uppercase section label shown on the left. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Trailing slot — e.g. a countdown, refresh button, or loading spinner. */
|
|
6
|
+
rightElement?: React.ReactNode;
|
|
7
|
+
/** Extra classes merged onto the outer row. */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Section header used above the cards on the home screen — a muted,
|
|
12
|
+
* uppercase label on the left with an optional trailing slot on the right
|
|
13
|
+
* (countdown, refresh icon, activity indicator, etc.).
|
|
14
|
+
*
|
|
15
|
+
* Purely presentational: the consumer formats the label and supplies the
|
|
16
|
+
* trailing node. Does not render the card body that follows it.
|
|
17
|
+
*/
|
|
18
|
+
declare function SectionTitle({ title, rightElement, className }: SectionTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { SectionTitle };
|
|
20
|
+
export type { SectionTitleProps };
|
|
21
|
+
//# sourceMappingURL=section-title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-title.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/section-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,UAAU,iBAAiB;IACzB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAU1E;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { Text } from '../../components/ui/text';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
/**
|
|
6
|
+
* Section header used above the cards on the home screen — a muted,
|
|
7
|
+
* uppercase label on the left with an optional trailing slot on the right
|
|
8
|
+
* (countdown, refresh icon, activity indicator, etc.).
|
|
9
|
+
*
|
|
10
|
+
* Purely presentational: the consumer formats the label and supplies the
|
|
11
|
+
* trailing node. Does not render the card body that follows it.
|
|
12
|
+
*/
|
|
13
|
+
function SectionTitle({ title, rightElement, className }) {
|
|
14
|
+
return (_jsxs(View, { className: cn('flex-row items-center justify-between px-1 pb-1.5', className), children: [_jsx(Text, { className: "text-muted-foreground text-base font-semibold uppercase", children: title }), rightElement] }));
|
|
15
|
+
}
|
|
16
|
+
export { SectionTitle };
|
|
17
|
+
//# sourceMappingURL=section-title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-title.js","sourceRoot":"","sources":["../../../src/components/blocks/section-title.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAWjC;;;;;;;GAOG;AACH,SAAS,YAAY,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAqB;IACzE,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,mDAAmD,EAAE,SAAS,CAAC,aAC7E,KAAC,IAAI,IAAC,SAAS,EAAC,yDAAyD,YACtE,KAAK,GACD,EACN,YAAY,IACR,CACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface SettingsGroupProps {
|
|
3
|
+
/** Optional uppercase header label rendered above the card. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Row content — typically `SettingsRow`s separated by `Separator`. */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/** Extra classes merged onto the rounded card wrapper. */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Rounded card container for a cluster of settings rows, with an optional
|
|
12
|
+
* uppercase label above. Matches the grouping used on the app's settings
|
|
13
|
+
* screen — consumer composes `SettingsRow`s inside, interleaving
|
|
14
|
+
* `Separator` between rows as needed.
|
|
15
|
+
*/
|
|
16
|
+
declare function SettingsGroup({ label, children, className }: SettingsGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export { SettingsGroup };
|
|
18
|
+
export type { SettingsGroupProps };
|
|
19
|
+
//# sourceMappingURL=settings-group.d.ts.map
|