Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

import React, { Fragment, useState, useEffect, useRef } from "react";
import { useRouter } from "next/navigation";
import { Transition, Tab } from "@headlessui/react";
import {
Transition,
Tab,
TabGroup,
TabPanels,
TabPanel,
TabList,
TransitionChild,
} from "@headlessui/react";
import { useTranslation } from "@i18n/client";
import { CircleButton } from "@clientComponents/globals/Buttons/CircleButton";

Expand Down Expand Up @@ -146,10 +154,10 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
</CircleButton>
</div>
</div>
<Transition.Root show={open} as={Fragment}>
<Transition show={open} as={Fragment}>
<div className="sticky top-0">
<div className="flex">
<Transition.Child
<TransitionChild
as={Fragment}
enter="transform transition ease-in-out duration-500"
enterFrom="translate-x-full"
Expand Down Expand Up @@ -182,8 +190,8 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
</div>
{/* Panel Header --> */}
{/* <-- Tabs */}
<Tab.Group selectedIndex={selectedIndex}>
<Tab.List className={"flex justify-between border-b border-gray-200"}>
<TabGroup selectedIndex={selectedIndex}>
<TabList className={"flex justify-between border-b border-gray-200"}>
<TabButton
text={t("rightPanel.pages")}
onClick={() => {
Expand All @@ -204,9 +212,9 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
router.push(`/${i18n.language}/form-builder/${id}/edit/logic`);
}}
/>
</Tab.List>
<Tab.Panels>
<Tab.Panel>
</TabList>
<TabPanels>
<TabPanel>
{/* Tree */}
<SkipLinkReusable anchor="#pagesTitle">
{t("skipLink.pages")}
Expand All @@ -224,8 +232,8 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
/>
</div>
{/* end tree */}
</Tab.Panel>
<Tab.Panel>
</TabPanel>
<TabPanel>
{/* Translate */}
<SkipLinkReusable anchor="#editTranslationsHeading">
{t("skipLink.translate")}
Expand All @@ -234,8 +242,8 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
<DownloadCSVWithGroups />
</div>
{/* End translate */}
</Tab.Panel>
<Tab.Panel>
</TabPanel>
<TabPanel>
{/* Logic */}
<SkipLinkReusable anchor="#logicTitle">
{t("skipLink.logic")}
Expand All @@ -246,16 +254,16 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
)}
</div>
{/* end logic */}
</Tab.Panel>
</Tab.Panels>
</Tab.Group>
</TabPanel>
</TabPanels>
</TabGroup>
{/* --> */}
</div>
</div>
</Transition.Child>
</TransitionChild>
</div>
</div>
</Transition.Root>
</Transition>
</section>
);
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@hcaptcha/types": "^1.0.4",
"@headless-tree/core": "^1.4.0",
"@headless-tree/react": "^1.4.0",
"@headlessui/react": "^2.2.0",
"@headlessui/react": "^2.2.7",
"@neshca/cache-handler": "^1.2.1",
"@next/mdx": "15.5.0",
"@prisma/client": "6",
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2786,7 +2786,7 @@ __metadata:
languageName: node
linkType: hard

"@headlessui/react@npm:^2.2.0":
"@headlessui/react@npm:^2.2.7":
version: 2.2.7
resolution: "@headlessui/react@npm:2.2.7"
dependencies:
Expand Down Expand Up @@ -13205,7 +13205,7 @@ __metadata:
"@hcaptcha/types": "npm:^1.0.4"
"@headless-tree/core": "npm:^1.4.0"
"@headless-tree/react": "npm:^1.4.0"
"@headlessui/react": "npm:^2.2.0"
"@headlessui/react": "npm:^2.2.7"
"@jest/globals": "npm:^29.7.0"
"@neshca/cache-handler": "npm:^1.2.1"
"@next/mdx": "npm:15.5.0"
Expand Down
Loading