@bouku/core 0.2.5 → 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,8 +1,9 @@
1
1
  type Props = {
2
+ style?: string;
2
3
  label: string;
3
4
  value?: string | number | null;
4
5
  units?: string;
5
6
  note?: string;
6
7
  };
7
- export declare const Card: ({ label, value, units, note }: Props) => import("react").JSX.Element;
8
- export default Card;
8
+ export declare const CalloutCard: ({ style, label, value, units, note }: Props) => import("react").JSX.Element;
9
+ export default CalloutCard;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Card = void 0;
3
+ exports.CalloutCard = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const flex_1 = require("../container/flex");
6
- const Card = ({ label, value, units, note }) => ((0, jsx_runtime_1.jsxs)(flex_1.ColumnBox, { style: s.card, children: [(0, jsx_runtime_1.jsx)("span", { className: s.label, children: label }), (0, jsx_runtime_1.jsxs)("span", { className: s.value, children: [formatValue(value), " ", units] }), (0, jsx_runtime_1.jsx)("span", { className: s.note, children: note })] }));
7
- exports.Card = Card;
5
+ const _1 = require("../container/_");
6
+ const utils_1 = require("../../utils");
7
+ const CalloutCard = ({ style, label, value, units, note }) => ((0, jsx_runtime_1.jsxs)(_1.ColumnBox, { style: (0, utils_1.cn)(s.card, style), children: [(0, jsx_runtime_1.jsx)("span", { className: s.label, children: label }), (0, jsx_runtime_1.jsxs)("span", { className: s.value, children: [formatValue(value), " ", units] }), (0, jsx_runtime_1.jsx)("span", { className: s.note, children: note })] }));
8
+ exports.CalloutCard = CalloutCard;
8
9
  const formatValue = (x) => {
9
10
  if (!x)
10
11
  return "N/A";
@@ -14,9 +15,9 @@ const formatValue = (x) => {
14
15
  return x.toLocaleString("en-US");
15
16
  };
16
17
  const s = {
17
- card: "gap-2 flex-1 p-5 bg-surface border border-border-light rounded-md shadow hover:brightness-120 duration-200",
18
- label: "text-sm font-mono tracking-wide text-primary-dark uppercase",
19
- value: "text-5xl font-bold",
20
- note: "text-xs text-primary-dark"
18
+ card: "gap-1 flex-1 p-4 bg-surface border border-border rounded-md shadow hover:brightness-120 duration-200",
19
+ label: "text-sm font-mono text-primary-dark uppercase whitespace-nowrap",
20
+ value: "text-4xl font-bold whitespace-nowrap",
21
+ note: "text-xs text-primary-dark whitespace-nowrap"
21
22
  };
22
- exports.default = exports.Card;
23
+ exports.default = exports.CalloutCard;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "@bouku/core",
4
- "version": "0.2.5",
4
+ "version": "0.2.6",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "MIT",