@orangecheck/design 0.22.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
@@ -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,
@@ -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;