@nous-research/ui 0.2.4 → 0.2.6
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.
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare function Stats({ className, items, ...props }: StatsProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Stats({ className, items, flip, ...props }: StatsProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
interface StatsProps extends React.ComponentProps<'div'> {
|
|
4
4
|
items: {
|
|
5
5
|
label: string;
|
|
6
6
|
value: string;
|
|
7
7
|
}[];
|
|
8
|
+
flip?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../utils';
|
|
3
3
|
import { Typography } from './typography';
|
|
4
|
-
export function Stats({ className, items, ...props }) {
|
|
5
|
-
return (_jsx("div", { className: cn('flex w-full flex-col gap-5', className), ...props, children: items.map(({ label, value }) =>
|
|
4
|
+
export function Stats({ className, items, flip, ...props }) {
|
|
5
|
+
return (_jsx("div", { className: cn('flex w-full flex-col gap-5', className), ...props, children: items.map(({ label, value }) => {
|
|
6
|
+
const valueText = (_jsx(Typography, { className: "text-xs leading-[1.4] tracking-widest", expanded: true, children: value }));
|
|
7
|
+
const labelText = (_jsx(Typography, { className: "leading-none tracking-[0.2em] opacity-60", mono: true, children: label }));
|
|
8
|
+
return (_jsxs("div", { className: "text-midground grid grid-cols-[auto_1fr_auto] items-center gap-2.5 uppercase", children: [flip ? label : value, _jsx(Typography, { className: "min-w-0 overflow-hidden text-[13px] leading-[1.4] tracking-[0.4em] opacity-20", expanded: true, children: '·'.repeat(100) }), flip ? value : label] }, label));
|
|
9
|
+
}) }));
|
|
6
10
|
}
|
|
7
11
|
//# sourceMappingURL=stats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/ui/components/stats.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,UAAU,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAc;
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/ui/components/stats.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,UAAU,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,EAAc;IACpE,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAAM,KAAK,YACnE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;YAC9B,MAAM,SAAS,GAAG,CAChB,KAAC,UAAU,IACT,SAAS,EAAC,uCAAuC,EACjD,QAAQ,kBAEP,KAAK,GACK,CACd,CAAA;YACD,MAAM,SAAS,GAAG,CAChB,KAAC,UAAU,IAAC,SAAS,EAAC,0CAA0C,EAAC,IAAI,kBAClE,KAAK,GACK,CACd,CAAA;YAED,OAAO,CACL,eACE,SAAS,EAAC,8EAA8E,aAGvF,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAErB,KAAC,UAAU,IACT,SAAS,EAAC,+EAA+E,EACzF,QAAQ,kBAEP,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,GACL,EAEZ,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,KAXhB,KAAK,CAYN,CACP,CAAA;QACH,CAAC,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
|
package/dist/ui/globals.css
CHANGED