@nous-research/ui 0.2.6 → 0.2.7

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,15 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
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
- label: string;
6
- value: string;
5
+ label: string | {
6
+ key: string;
7
+ node: ReactNode;
8
+ };
9
+ value: string | {
10
+ key: string;
11
+ node: ReactNode;
12
+ };
7
13
  }[];
8
14
  flip?: boolean;
9
15
  }
@@ -3,9 +3,9 @@ import { cn } from '../../utils';
3
3
  import { Typography } from './typography';
4
4
  export function Stats({ className, items, flip, ...props }) {
5
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));
6
+ const valueText = (_jsx(Typography, { className: "text-xs leading-[1.4] tracking-widest", expanded: true, children: typeof value === 'string' ? value : value.node }));
7
+ const labelText = (_jsx(Typography, { className: "leading-none tracking-[0.2em] opacity-60", mono: true, children: typeof label === 'string' ? label : label.node }));
8
+ return (_jsxs("div", { className: "text-midground grid grid-cols-[auto_1fr_auto] items-center gap-2.5 uppercase", children: [flip ? labelText : valueText, _jsx(Typography, { className: "min-w-0 overflow-hidden text-[13px] leading-[1.4] tracking-[0.4em] opacity-20", expanded: true, children: '·'.repeat(100) }), flip ? valueText : labelText] }, (typeof label === 'string' ? label : label.key) + '@@@' + (typeof value === 'string' ? value : value.key)));
9
9
  }) }));
10
10
  }
11
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,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"}
1
+ {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/ui/components/stats.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,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