@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.
package/dist/chrome.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { Boxes, ChevronDown, Check, CornerDownLeft, Plus, Loader2, Copy, X, Menu, Sun, Moon, Monitor } from 'lucide-react';
1
+ import { Boxes, ChevronDown, Check, CornerDownLeft, Plus, Loader2, Copy, X, Menu, Sun, Moon, Monitor, Waves, Pause } from 'lucide-react';
2
2
  import Link5 from 'next/link';
3
3
  import * as React from 'react';
4
4
  import { createContext, useState, useRef, useEffect, useId, useContext } from 'react';
@@ -792,6 +792,10 @@ function useOcSkin() {
792
792
  }
793
793
  return ctx;
794
794
  }
795
+ function useOcMotion() {
796
+ const { motion, setMotion } = useOcSkin();
797
+ return { motion, setMotion };
798
+ }
795
799
  var MODES = [
796
800
  { id: "light", label: "light", Icon: Sun },
797
801
  { id: "dark", label: "dark", Icon: Moon },
@@ -799,10 +803,12 @@ var MODES = [
799
803
  ];
800
804
  function AppearanceControls({ className }) {
801
805
  const { skin, setSkin, themes } = useOcSkin();
806
+ const { motion, setMotion } = useOcMotion();
802
807
  const { theme, setTheme } = useTheme();
803
808
  const [mounted, setMounted] = useState(false);
804
809
  useEffect(() => setMounted(true), []);
805
810
  const activeMode = mounted ? theme ?? "system" : null;
811
+ const activeMotion = mounted ? motion : null;
806
812
  return /* @__PURE__ */ jsxs("div", { className, children: [
807
813
  /* @__PURE__ */ jsx("div", { className: "label-mono text-muted-foreground px-3 pt-3 pb-2", children: "mode" }),
808
814
  /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-1 px-2 pb-2", children: MODES.map(({ id, label, Icon }) => {
@@ -849,6 +855,32 @@ function AppearanceControls({ className }) {
849
855
  ]
850
856
  }
851
857
  ) }, t.id);
858
+ }) }),
859
+ /* @__PURE__ */ jsx("div", { className: "label-mono text-muted-foreground border-t px-3 pt-3 pb-2", children: "ambient motion" }),
860
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-1 px-2 pb-3", children: [
861
+ { id: "on", label: "on", Icon: Waves },
862
+ { id: "off", label: "off", Icon: Pause }
863
+ ].map(({ id, label, Icon }) => {
864
+ const active = activeMotion === id;
865
+ return /* @__PURE__ */ jsxs(
866
+ "button",
867
+ {
868
+ type: "button",
869
+ role: "menuitemradio",
870
+ "aria-checked": active,
871
+ "aria-label": id === "off" ? "pause ambient motion" : "ambient motion on",
872
+ onClick: () => setMotion(id),
873
+ className: cn(
874
+ "flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors",
875
+ active ? "border-primary text-foreground bg-accent" : "border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground"
876
+ ),
877
+ children: [
878
+ /* @__PURE__ */ jsx(Icon, { className: "size-4", "aria-hidden": true }),
879
+ label
880
+ ]
881
+ },
882
+ id
883
+ );
852
884
  }) })
853
885
  ] });
854
886
  }
@@ -2121,6 +2153,9 @@ function OcFamilyFooter({
2121
2153
  columns = [],
2122
2154
  family,
2123
2155
  legalBase = "https://ochk.io",
2156
+ legalCopyright,
2157
+ legalLinks,
2158
+ builtWith,
2124
2159
  className
2125
2160
  }) {
2126
2161
  const familyCols = [];
@@ -2134,6 +2169,13 @@ function OcFamilyFooter({
2134
2169
  const grid = GRID[allColumns.length] ?? GRID[3];
2135
2170
  const year = (/* @__PURE__ */ new Date()).getFullYear();
2136
2171
  const legal = (path) => `${legalBase}${path}`;
2172
+ const links = legalLinks ?? [
2173
+ { href: legal("/privacy"), label: "privacy" },
2174
+ { href: legal("/terms"), label: "terms" },
2175
+ { href: legal("/security"), label: "security" },
2176
+ { href: legal("/trademark"), label: "trademarks" },
2177
+ { href: legal("/contact"), label: "contact" }
2178
+ ];
2137
2179
  return /* @__PURE__ */ jsx("footer", { className: cn("border-t", className), children: /* @__PURE__ */ jsxs("div", { className: "container py-10 sm:py-12 md:py-16", children: [
2138
2180
  /* @__PURE__ */ jsxs("div", { className: cn("grid gap-8 sm:grid-cols-2 sm:gap-10", grid), children: [
2139
2181
  /* @__PURE__ */ jsxs("div", { children: [
@@ -2147,56 +2189,24 @@ function OcFamilyFooter({
2147
2189
  allColumns.map((column) => /* @__PURE__ */ jsx(FooterColumnView, { column }, column.label))
2148
2190
  ] }),
2149
2191
  /* @__PURE__ */ 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: [
2150
- /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
2192
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: legalCopyright ?? /* @__PURE__ */ jsxs(Fragment, { children: [
2151
2193
  "\xA9 ",
2152
2194
  year,
2153
2195
  " orangecheck \xB7 mit + cc-by-4.0"
2154
- ] }),
2155
- /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground/80 flex flex-wrap items-center gap-x-4 gap-y-1", children: [
2156
- /* @__PURE__ */ jsx(
2157
- "a",
2158
- {
2159
- href: legal("/privacy"),
2160
- className: "hover:text-foreground transition-colors",
2161
- children: "privacy"
2162
- }
2163
- ),
2164
- /* @__PURE__ */ jsx(
2165
- "a",
2166
- {
2167
- href: legal("/terms"),
2168
- className: "hover:text-foreground transition-colors",
2169
- children: "terms"
2170
- }
2171
- ),
2172
- /* @__PURE__ */ jsx(
2173
- "a",
2174
- {
2175
- href: legal("/security"),
2176
- className: "hover:text-foreground transition-colors",
2177
- children: "security"
2178
- }
2179
- ),
2180
- /* @__PURE__ */ jsx(
2181
- "a",
2182
- {
2183
- href: legal("/trademark"),
2184
- className: "hover:text-foreground transition-colors",
2185
- children: "trademarks"
2186
- }
2187
- ),
2188
- /* @__PURE__ */ jsx(
2189
- "a",
2190
- {
2191
- href: legal("/contact"),
2192
- className: "hover:text-foreground transition-colors",
2193
- children: "contact"
2194
- }
2195
- )
2196
- ] }),
2196
+ ] }) }),
2197
+ /* @__PURE__ */ jsx("div", { className: "text-muted-foreground/80 flex flex-wrap items-center gap-x-4 gap-y-1", children: links.map((link) => /* @__PURE__ */ jsx(
2198
+ "a",
2199
+ {
2200
+ href: link.href,
2201
+ ...link.external ? { target: "_blank", rel: "noreferrer" } : {},
2202
+ className: "hover:text-foreground transition-colors",
2203
+ children: link.label
2204
+ },
2205
+ link.label
2206
+ )) }),
2197
2207
  /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground inline-flex items-center gap-1.5", children: [
2198
2208
  /* @__PURE__ */ jsx("span", { className: "text-primary text-[13px] leading-none", children: "\u20BF" }),
2199
- /* @__PURE__ */ jsx("span", { children: "built with bitcoin" })
2209
+ /* @__PURE__ */ jsx("span", { children: builtWith ?? "built with bitcoin" })
2200
2210
  ] })
2201
2211
  ] })
2202
2212
  ] }) });