@orangecheck/design 0.25.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.js +32 -0
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +33 -1
- package/dist/chrome.mjs.map +1 -1
- package/dist/components.js +32 -0
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +33 -1
- package/dist/components.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +91 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +91 -7
- package/dist/index.mjs.map +1 -1
- package/dist/styles/aurora.css +27 -0
- package/dist/styles/theme.css +80 -0
- package/dist/tokens.d.mts +9 -1
- package/dist/tokens.d.ts +9 -1
- package/dist/tokens.js +91 -5
- package/dist/tokens.js.map +1 -1
- package/dist/tokens.mjs +92 -8
- package/dist/tokens.mjs.map +1 -1
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -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
|
}
|