@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 }) => (_jsxs("div", { className: "text-midground grid grid-cols-[auto_1fr_auto] items-center gap-2.5 uppercase", children: [_jsx(Typography, { className: "text-xs leading-[1.4] tracking-widest", expanded: true, children: value }), _jsx(Typography, { className: "min-w-0 overflow-hidden text-[13px] leading-[1.4] tracking-[0.4em] opacity-20", expanded: true, children: '·'.repeat(100) }), _jsx(Typography, { className: "leading-none tracking-[0.2em] opacity-60", mono: true, children: label })] }, label))) }));
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;IAC9D,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,CAAC,CAC/B,eACE,SAAS,EAAC,8EAA8E,aAGxF,KAAC,UAAU,IACT,SAAS,EAAC,uCAAuC,EACjD,QAAQ,kBAEP,KAAK,GACK,EAEb,KAAC,UAAU,IACT,SAAS,EAAC,+EAA+E,EACzF,QAAQ,kBAEP,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,GACL,EAEb,KAAC,UAAU,IAAC,SAAS,EAAC,0CAA0C,EAAC,IAAI,kBAClE,KAAK,GACK,KAlBR,KAAK,CAmBN,CACP,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,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"}
@@ -321,7 +321,7 @@
321
321
  }
322
322
 
323
323
  html {
324
- font-size: clamp(10pt, var(--vsq) * 5, 14pt);
324
+ font-size: clamp(12px, calc(12px + 2 * ((100vw - 1400px) / 400)), 16px);
325
325
  }
326
326
 
327
327
  body {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nous-research/ui",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "sideEffects": [