@orangecheck/design 0.22.0 → 0.24.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,
@@ -4872,6 +4885,130 @@ function OcAppBar({
4872
4885
  }
4873
4886
  );
4874
4887
  }
4888
+ var GRID = {
4889
+ 1: "md:grid-cols-[1.2fr_1fr]",
4890
+ 2: "md:grid-cols-[1.2fr_1fr_1fr]",
4891
+ 3: "md:grid-cols-[1.2fr_1fr_1fr_1fr]",
4892
+ 4: "md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr]",
4893
+ 5: "md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr_1fr]"
4894
+ };
4895
+ var LINK_CLS = "text-muted-foreground hover:text-foreground font-mono text-xs tracking-wide lowercase transition-colors";
4896
+ function FooterLinkItem({ link }) {
4897
+ if (link.external) {
4898
+ return /* @__PURE__ */ jsxRuntime.jsxs("a", { href: link.href, target: "_blank", rel: "noreferrer", className: LINK_CLS, children: [
4899
+ "> ",
4900
+ link.label,
4901
+ " \u2197"
4902
+ ] });
4903
+ }
4904
+ return /* @__PURE__ */ jsxRuntime.jsxs(Link6__default.default, { href: link.href, className: LINK_CLS, children: [
4905
+ "> ",
4906
+ link.label
4907
+ ] });
4908
+ }
4909
+ function FooterColumnView({ column }) {
4910
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4911
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "label-mono text-primary mb-3", children: column.label }),
4912
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2", children: column.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(FooterLinkItem, { link }) }, `${column.label}:${link.href}`)) })
4913
+ ] });
4914
+ }
4915
+ function familyColumn(category, label) {
4916
+ return {
4917
+ label,
4918
+ links: FAMILY_PROPERTIES.filter((p) => p.category === category).map(
4919
+ (p) => ({
4920
+ href: p.origin,
4921
+ label: p.label,
4922
+ external: true
4923
+ })
4924
+ )
4925
+ };
4926
+ }
4927
+ function OcFamilyFooter({
4928
+ brand,
4929
+ columns = [],
4930
+ family,
4931
+ legalBase = "https://ochk.io",
4932
+ className
4933
+ }) {
4934
+ const familyCols = [];
4935
+ if (family === "products" || family === "both") {
4936
+ familyCols.push(familyColumn("product", "\xA7 products"));
4937
+ }
4938
+ if (family === "protocols" || family === "both") {
4939
+ familyCols.push(familyColumn("protocol", "\xA7 protocols"));
4940
+ }
4941
+ const allColumns = [...familyCols, ...columns];
4942
+ const grid = GRID[allColumns.length] ?? GRID[3];
4943
+ const year = (/* @__PURE__ */ new Date()).getFullYear();
4944
+ const legal = (path) => `${legalBase}${path}`;
4945
+ return /* @__PURE__ */ jsxRuntime.jsx("footer", { className: cn("border-t", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container py-10 sm:py-12 md:py-16", children: [
4946
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid gap-8 sm:grid-cols-2 sm:gap-10", grid), children: [
4947
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4948
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
4949
+ brand.mark,
4950
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-display text-sm font-bold tracking-tight", children: brand.wordmark })
4951
+ ] }),
4952
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground mt-3 max-w-[34ch] text-sm leading-relaxed", children: brand.tagline }),
4953
+ brand.meta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: brand.meta })
4954
+ ] }),
4955
+ allColumns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(FooterColumnView, { column }, column.label))
4956
+ ] }),
4957
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-10 flex flex-col items-start justify-between gap-3 border-t pt-6 font-mono text-[11px] tracking-widest uppercase sm:flex-row sm:items-center", children: [
4958
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
4959
+ "\xA9 ",
4960
+ year,
4961
+ " orangecheck \xB7 mit + cc-by-4.0"
4962
+ ] }),
4963
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-muted-foreground/80 flex flex-wrap items-center gap-x-4 gap-y-1", children: [
4964
+ /* @__PURE__ */ jsxRuntime.jsx(
4965
+ "a",
4966
+ {
4967
+ href: legal("/privacy"),
4968
+ className: "hover:text-foreground transition-colors",
4969
+ children: "privacy"
4970
+ }
4971
+ ),
4972
+ /* @__PURE__ */ jsxRuntime.jsx(
4973
+ "a",
4974
+ {
4975
+ href: legal("/terms"),
4976
+ className: "hover:text-foreground transition-colors",
4977
+ children: "terms"
4978
+ }
4979
+ ),
4980
+ /* @__PURE__ */ jsxRuntime.jsx(
4981
+ "a",
4982
+ {
4983
+ href: legal("/security"),
4984
+ className: "hover:text-foreground transition-colors",
4985
+ children: "security"
4986
+ }
4987
+ ),
4988
+ /* @__PURE__ */ jsxRuntime.jsx(
4989
+ "a",
4990
+ {
4991
+ href: legal("/trademark"),
4992
+ className: "hover:text-foreground transition-colors",
4993
+ children: "trademarks"
4994
+ }
4995
+ ),
4996
+ /* @__PURE__ */ jsxRuntime.jsx(
4997
+ "a",
4998
+ {
4999
+ href: legal("/contact"),
5000
+ className: "hover:text-foreground transition-colors",
5001
+ children: "contact"
5002
+ }
5003
+ )
5004
+ ] }),
5005
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground inline-flex items-center gap-1.5", children: [
5006
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary text-[13px] leading-none", children: "\u20BF" }),
5007
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "built with bitcoin" })
5008
+ ] })
5009
+ ] })
5010
+ ] }) });
5011
+ }
4875
5012
 
4876
5013
  exports.AccentList = AccentList;
4877
5014
  exports.AccentNote = AccentNote;
@@ -4936,12 +5073,14 @@ exports.OcAppearanceMenu = OcAppearanceMenu;
4936
5073
  exports.OcAurora = OcAurora;
4937
5074
  exports.OcDashboardHub = OcDashboardHub;
4938
5075
  exports.OcDashboardShell = OcDashboardShell;
5076
+ exports.OcFamilyFooter = OcFamilyFooter;
4939
5077
  exports.OcLogoDropdown = OcLogoDropdown;
4940
5078
  exports.OcPrimaryNav = OcPrimaryNav;
4941
5079
  exports.OcThemeBridge = OcThemeBridge;
4942
5080
  exports.OcThemePicker = OcThemePicker;
4943
5081
  exports.OcThemeProvider = OcThemeProvider;
4944
5082
  exports.Pagination = Pagination;
5083
+ exports.Panel = Panel;
4945
5084
  exports.Popover = Popover;
4946
5085
  exports.PopoverAnchor = PopoverAnchor;
4947
5086
  exports.PopoverContent = PopoverContent;