@orangecheck/design 0.24.0 → 0.26.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.
@@ -1701,6 +1701,10 @@ function useOcSkin() {
1701
1701
  }
1702
1702
  return ctx;
1703
1703
  }
1704
+ function useOcMotion() {
1705
+ const { motion, setMotion } = useOcSkin();
1706
+ return { motion, setMotion };
1707
+ }
1704
1708
  var MODES = [
1705
1709
  { id: "light", label: "light", Icon: lucideReact.Sun },
1706
1710
  { id: "dark", label: "dark", Icon: lucideReact.Moon },
@@ -1708,10 +1712,12 @@ var MODES = [
1708
1712
  ];
1709
1713
  function AppearanceControls({ className }) {
1710
1714
  const { skin, setSkin, themes } = useOcSkin();
1715
+ const { motion, setMotion } = useOcMotion();
1711
1716
  const { theme, setTheme } = nextThemes.useTheme();
1712
1717
  const [mounted, setMounted] = React2.useState(false);
1713
1718
  React2.useEffect(() => setMounted(true), []);
1714
1719
  const activeMode = mounted ? theme ?? "system" : null;
1720
+ const activeMotion = mounted ? motion : null;
1715
1721
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
1716
1722
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "label-mono text-muted-foreground px-3 pt-3 pb-2", children: "mode" }),
1717
1723
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1 px-2 pb-2", children: MODES.map(({ id, label, Icon: Icon2 }) => {
@@ -1758,6 +1764,32 @@ function AppearanceControls({ className }) {
1758
1764
  ]
1759
1765
  }
1760
1766
  ) }, t.id);
1767
+ }) }),
1768
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "label-mono text-muted-foreground border-t px-3 pt-3 pb-2", children: "ambient motion" }),
1769
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-1 px-2 pb-3", children: [
1770
+ { id: "on", label: "on", Icon: lucideReact.Waves },
1771
+ { id: "off", label: "off", Icon: lucideReact.Pause }
1772
+ ].map(({ id, label, Icon: Icon2 }) => {
1773
+ const active = activeMotion === id;
1774
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1775
+ "button",
1776
+ {
1777
+ type: "button",
1778
+ role: "menuitemradio",
1779
+ "aria-checked": active,
1780
+ "aria-label": id === "off" ? "pause ambient motion" : "ambient motion on",
1781
+ onClick: () => setMotion(id),
1782
+ className: cn(
1783
+ "flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors",
1784
+ active ? "border-primary text-foreground bg-accent" : "border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground"
1785
+ ),
1786
+ children: [
1787
+ /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-4", "aria-hidden": true }),
1788
+ label
1789
+ ]
1790
+ },
1791
+ id
1792
+ );
1761
1793
  }) })
1762
1794
  ] });
1763
1795
  }
@@ -3030,6 +3062,9 @@ function OcFamilyFooter({
3030
3062
  columns = [],
3031
3063
  family,
3032
3064
  legalBase = "https://ochk.io",
3065
+ legalCopyright,
3066
+ legalLinks,
3067
+ builtWith,
3033
3068
  className
3034
3069
  }) {
3035
3070
  const familyCols = [];
@@ -3043,6 +3078,13 @@ function OcFamilyFooter({
3043
3078
  const grid = GRID[allColumns.length] ?? GRID[3];
3044
3079
  const year = (/* @__PURE__ */ new Date()).getFullYear();
3045
3080
  const legal = (path) => `${legalBase}${path}`;
3081
+ const links = legalLinks ?? [
3082
+ { href: legal("/privacy"), label: "privacy" },
3083
+ { href: legal("/terms"), label: "terms" },
3084
+ { href: legal("/security"), label: "security" },
3085
+ { href: legal("/trademark"), label: "trademarks" },
3086
+ { href: legal("/contact"), label: "contact" }
3087
+ ];
3046
3088
  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: [
3047
3089
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid gap-8 sm:grid-cols-2 sm:gap-10", grid), children: [
3048
3090
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -3056,56 +3098,24 @@ function OcFamilyFooter({
3056
3098
  allColumns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(FooterColumnView, { column }, column.label))
3057
3099
  ] }),
3058
3100
  /* @__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: [
3059
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
3101
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: legalCopyright ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3060
3102
  "\xA9 ",
3061
3103
  year,
3062
3104
  " orangecheck \xB7 mit + cc-by-4.0"
3063
- ] }),
3064
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-muted-foreground/80 flex flex-wrap items-center gap-x-4 gap-y-1", children: [
3065
- /* @__PURE__ */ jsxRuntime.jsx(
3066
- "a",
3067
- {
3068
- href: legal("/privacy"),
3069
- className: "hover:text-foreground transition-colors",
3070
- children: "privacy"
3071
- }
3072
- ),
3073
- /* @__PURE__ */ jsxRuntime.jsx(
3074
- "a",
3075
- {
3076
- href: legal("/terms"),
3077
- className: "hover:text-foreground transition-colors",
3078
- children: "terms"
3079
- }
3080
- ),
3081
- /* @__PURE__ */ jsxRuntime.jsx(
3082
- "a",
3083
- {
3084
- href: legal("/security"),
3085
- className: "hover:text-foreground transition-colors",
3086
- children: "security"
3087
- }
3088
- ),
3089
- /* @__PURE__ */ jsxRuntime.jsx(
3090
- "a",
3091
- {
3092
- href: legal("/trademark"),
3093
- className: "hover:text-foreground transition-colors",
3094
- children: "trademarks"
3095
- }
3096
- ),
3097
- /* @__PURE__ */ jsxRuntime.jsx(
3098
- "a",
3099
- {
3100
- href: legal("/contact"),
3101
- className: "hover:text-foreground transition-colors",
3102
- children: "contact"
3103
- }
3104
- )
3105
- ] }),
3105
+ ] }) }),
3106
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground/80 flex flex-wrap items-center gap-x-4 gap-y-1", children: links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
3107
+ "a",
3108
+ {
3109
+ href: link.href,
3110
+ ...link.external ? { target: "_blank", rel: "noreferrer" } : {},
3111
+ className: "hover:text-foreground transition-colors",
3112
+ children: link.label
3113
+ },
3114
+ link.label
3115
+ )) }),
3106
3116
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground inline-flex items-center gap-1.5", children: [
3107
3117
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary text-[13px] leading-none", children: "\u20BF" }),
3108
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "built with bitcoin" })
3118
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: builtWith ?? "built with bitcoin" })
3109
3119
  ] })
3110
3120
  ] })
3111
3121
  ] }) });