@orangecheck/design 0.25.0 → 0.27.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 +547 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +545 -11
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/styles/aurora.css +56 -0
- package/dist/styles/theme.css +80 -0
- package/dist/tokens.d.mts +27 -2
- package/dist/tokens.d.ts +27 -2
- package/dist/tokens.js +547 -8
- package/dist/tokens.js.map +1 -1
- package/dist/tokens.mjs +546 -12
- package/dist/tokens.mjs.map +1 -1
- package/package.json +1 -1
package/dist/chrome.js
CHANGED
|
@@ -817,6 +817,10 @@ function useOcSkin() {
|
|
|
817
817
|
}
|
|
818
818
|
return ctx;
|
|
819
819
|
}
|
|
820
|
+
function useOcMotion() {
|
|
821
|
+
const { motion, setMotion } = useOcSkin();
|
|
822
|
+
return { motion, setMotion };
|
|
823
|
+
}
|
|
820
824
|
var MODES = [
|
|
821
825
|
{ id: "light", label: "light", Icon: lucideReact.Sun },
|
|
822
826
|
{ id: "dark", label: "dark", Icon: lucideReact.Moon },
|
|
@@ -824,10 +828,12 @@ var MODES = [
|
|
|
824
828
|
];
|
|
825
829
|
function AppearanceControls({ className }) {
|
|
826
830
|
const { skin, setSkin, themes } = useOcSkin();
|
|
831
|
+
const { motion, setMotion } = useOcMotion();
|
|
827
832
|
const { theme, setTheme } = nextThemes.useTheme();
|
|
828
833
|
const [mounted, setMounted] = React.useState(false);
|
|
829
834
|
React.useEffect(() => setMounted(true), []);
|
|
830
835
|
const activeMode = mounted ? theme ?? "system" : null;
|
|
836
|
+
const activeMotion = mounted ? motion : null;
|
|
831
837
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
832
838
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "label-mono text-muted-foreground px-3 pt-3 pb-2", children: "mode" }),
|
|
833
839
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1 px-2 pb-2", children: MODES.map(({ id, label, Icon }) => {
|
|
@@ -874,6 +880,32 @@ function AppearanceControls({ className }) {
|
|
|
874
880
|
]
|
|
875
881
|
}
|
|
876
882
|
) }, t.id);
|
|
883
|
+
}) }),
|
|
884
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "label-mono text-muted-foreground border-t px-3 pt-3 pb-2", children: "ambient motion" }),
|
|
885
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-1 px-2 pb-3", children: [
|
|
886
|
+
{ id: "on", label: "on", Icon: lucideReact.Waves },
|
|
887
|
+
{ id: "off", label: "off", Icon: lucideReact.Pause }
|
|
888
|
+
].map(({ id, label, Icon }) => {
|
|
889
|
+
const active = activeMotion === id;
|
|
890
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
891
|
+
"button",
|
|
892
|
+
{
|
|
893
|
+
type: "button",
|
|
894
|
+
role: "menuitemradio",
|
|
895
|
+
"aria-checked": active,
|
|
896
|
+
"aria-label": id === "off" ? "pause ambient motion" : "ambient motion on",
|
|
897
|
+
onClick: () => setMotion(id),
|
|
898
|
+
className: cn(
|
|
899
|
+
"flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors",
|
|
900
|
+
active ? "border-primary text-foreground bg-accent" : "border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
901
|
+
),
|
|
902
|
+
children: [
|
|
903
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4", "aria-hidden": true }),
|
|
904
|
+
label
|
|
905
|
+
]
|
|
906
|
+
},
|
|
907
|
+
id
|
|
908
|
+
);
|
|
877
909
|
}) })
|
|
878
910
|
] });
|
|
879
911
|
}
|