@orangecheck/design 0.21.0 → 0.23.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/dist/index.js CHANGED
@@ -65,6 +65,12 @@ function cn(...inputs) {
65
65
 
66
66
  // src/tokens/themes.ts
67
67
  var OC_THEMES = [
68
+ {
69
+ id: "ember",
70
+ label: "ember",
71
+ description: "the warmth \u2014 burnt-sienna terracotta, soft 1rem corners, pill buttons, Hanken Grotesk \xB7 approachable, human",
72
+ accent: "#da6736"
73
+ },
68
74
  {
69
75
  id: "orangecheck",
70
76
  label: "orangecheck",
@@ -88,19 +94,13 @@ var OC_THEMES = [
88
94
  label: "gold",
89
95
  description: "sound money \u2014 digital gold, hard 0.125rem milled edge, mono ledger \xB7 21M",
90
96
  accent: "#e3b831"
91
- },
92
- {
93
- id: "ember",
94
- label: "ember",
95
- description: "the warmth \u2014 burnt-sienna terracotta, soft 1rem corners, pill buttons, Hanken Grotesk \xB7 approachable, human",
96
- accent: "#da6736"
97
97
  }
98
98
  ];
99
99
  var OC_DEFAULT_ACCENT = "#f97316";
100
100
  function accentFor(id) {
101
101
  return OC_THEMES.find((t) => t.id === id)?.accent ?? OC_DEFAULT_ACCENT;
102
102
  }
103
- var DEFAULT_OC_THEME = "orangecheck";
103
+ var DEFAULT_OC_THEME = "ember";
104
104
  function isKnownTheme(id) {
105
105
  return !!id && OC_THEMES.some((t) => t.id === id);
106
106
  }
@@ -2544,11 +2544,11 @@ var COL_CLASS = {
2544
2544
  4: "md:grid-cols-2 lg:grid-cols-4"
2545
2545
  };
2546
2546
  function StatGrid({ items, columns = 3, className = "" }) {
2547
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `bg-border grid gap-px border ${COL_CLASS[columns]} ${className}`, children: items.map((it, i) => /* @__PURE__ */ jsxRuntime.jsx(Tile, { item: it }, `${it.label}-${i}`)) });
2547
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `oc-stat-grid bg-border grid gap-px border ${COL_CLASS[columns]} ${className}`, children: items.map((it, i) => /* @__PURE__ */ jsxRuntime.jsx(Tile, { item: it }, `${it.label}-${i}`)) });
2548
2548
  }
2549
2549
  function Tile({ item }) {
2550
2550
  const tone = item.tone ?? (item.accent ? "primary" : "default");
2551
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-background p-5", children: [
2551
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oc-stat-tile bg-background p-5", children: [
2552
2552
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground/80 font-mono text-[10px] tracking-widest uppercase", children: item.label }),
2553
2553
  /* @__PURE__ */ jsxRuntime.jsx(
2554
2554
  "div",
@@ -2567,7 +2567,7 @@ function StatTile({ children, ...item }) {
2567
2567
  ] });
2568
2568
  }
2569
2569
  function StatCard({ pad = "default", className, ...stat }) {
2570
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("border bg-card", pad === "sm" ? "p-3 md:p-4" : "p-5", className), children: /* @__PURE__ */ jsxRuntime.jsx(StatBlock, { ...stat }) });
2570
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("oc-stat-card border bg-card", pad === "sm" ? "p-3 md:p-4" : "p-5", className), children: /* @__PURE__ */ jsxRuntime.jsx(StatBlock, { ...stat }) });
2571
2571
  }
2572
2572
  var FRAME = {
2573
2573
  info: "border-primary/30 bg-primary/5",
@@ -2604,7 +2604,7 @@ function DefinitionList({ items, className }) {
2604
2604
  "dl",
2605
2605
  {
2606
2606
  className: cn(
2607
- "grid gap-x-5 gap-y-2 text-sm sm:grid-cols-[auto_1fr] sm:items-baseline",
2607
+ "oc-deflist grid gap-x-5 gap-y-2 text-sm sm:grid-cols-[auto_1fr] sm:items-baseline",
2608
2608
  className
2609
2609
  ),
2610
2610
  children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(React2.Fragment, { children: [
@@ -2620,7 +2620,7 @@ function DataRow({ children, meta, action, as, className }) {
2620
2620
  Tag,
2621
2621
  {
2622
2622
  className: cn(
2623
- "flex flex-col gap-1 py-3 sm:flex-row sm:items-baseline sm:justify-between sm:gap-4",
2623
+ "oc-data-row flex flex-col gap-1 py-3 sm:flex-row sm:items-baseline sm:justify-between sm:gap-4",
2624
2624
  className
2625
2625
  ),
2626
2626
  children: [
@@ -2633,6 +2633,19 @@ function DataRow({ children, meta, action, as, className }) {
2633
2633
  }
2634
2634
  );
2635
2635
  }
2636
+ function Panel({ label, title, action, flush, className, children }) {
2637
+ const hasHeader = label || title || action;
2638
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cn("oc-panel py-8", !flush && "border-t", className), children: [
2639
+ hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 flex items-start justify-between gap-3", children: [
2640
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
2641
+ label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "label-mono text-primary mb-1", children: label }),
2642
+ title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-display text-lg font-bold tracking-tight", children: title })
2643
+ ] }),
2644
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: action })
2645
+ ] }),
2646
+ children
2647
+ ] });
2648
+ }
2636
2649
  function TwoToneHeading({
2637
2650
  lead,
2638
2651
  muted,
@@ -2642,7 +2655,7 @@ function TwoToneHeading({
2642
2655
  }) {
2643
2656
  const Tag = as ?? "h2";
2644
2657
  const leadColor = tone === "onBrand" ? "text-primary-foreground" : "text-foreground";
2645
- const mutedColor = tone === "onBrand" ? "text-primary-foreground/60" : "text-foreground/40";
2658
+ const mutedColor = tone === "onBrand" ? "text-primary-foreground/75" : "text-foreground/40";
2646
2659
  return /* @__PURE__ */ jsxRuntime.jsxs(
2647
2660
  Tag,
2648
2661
  {
@@ -4942,6 +4955,7 @@ exports.OcThemeBridge = OcThemeBridge;
4942
4955
  exports.OcThemePicker = OcThemePicker;
4943
4956
  exports.OcThemeProvider = OcThemeProvider;
4944
4957
  exports.Pagination = Pagination;
4958
+ exports.Panel = Panel;
4945
4959
  exports.Popover = Popover;
4946
4960
  exports.PopoverAnchor = PopoverAnchor;
4947
4961
  exports.PopoverContent = PopoverContent;