Skip to content

Commit afede63

Browse files
authored
Merge branch 'main' into feature/beta_permisions
2 parents 9bc47f7 + 99d01fe commit afede63

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

app/(gcforms)/[locale]/(form administration)/form-builder/components/shared/right-panel/RightPanel.tsx

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
import React, { Fragment, useState, useEffect, useRef } from "react";
44
import { useRouter } from "next/navigation";
5-
import { Transition, Tab } from "@headlessui/react";
5+
import {
6+
Transition,
7+
Tab,
8+
TabGroup,
9+
TabPanels,
10+
TabPanel,
11+
TabList,
12+
TransitionChild,
13+
} from "@headlessui/react";
614
import { useTranslation } from "@i18n/client";
715
import { CircleButton } from "@clientComponents/globals/Buttons/CircleButton";
816

@@ -146,10 +154,10 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
146154
</CircleButton>
147155
</div>
148156
</div>
149-
<Transition.Root show={open} as={Fragment}>
157+
<Transition show={open} as={Fragment}>
150158
<div className="sticky top-0">
151159
<div className="flex">
152-
<Transition.Child
160+
<TransitionChild
153161
as={Fragment}
154162
enter="transform transition ease-in-out duration-500"
155163
enterFrom="translate-x-full"
@@ -182,8 +190,8 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
182190
</div>
183191
{/* Panel Header --> */}
184192
{/* <-- Tabs */}
185-
<Tab.Group selectedIndex={selectedIndex}>
186-
<Tab.List className={"flex justify-between border-b border-gray-200"}>
193+
<TabGroup selectedIndex={selectedIndex}>
194+
<TabList className={"flex justify-between border-b border-gray-200"}>
187195
<TabButton
188196
text={t("rightPanel.pages")}
189197
onClick={() => {
@@ -204,9 +212,9 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
204212
router.push(`/${i18n.language}/form-builder/${id}/edit/logic`);
205213
}}
206214
/>
207-
</Tab.List>
208-
<Tab.Panels>
209-
<Tab.Panel>
215+
</TabList>
216+
<TabPanels>
217+
<TabPanel>
210218
{/* Tree */}
211219
<SkipLinkReusable anchor="#pagesTitle">
212220
{t("skipLink.pages")}
@@ -224,8 +232,8 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
224232
/>
225233
</div>
226234
{/* end tree */}
227-
</Tab.Panel>
228-
<Tab.Panel>
235+
</TabPanel>
236+
<TabPanel>
229237
{/* Translate */}
230238
<SkipLinkReusable anchor="#editTranslationsHeading">
231239
{t("skipLink.translate")}
@@ -234,8 +242,8 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
234242
<DownloadCSVWithGroups />
235243
</div>
236244
{/* End translate */}
237-
</Tab.Panel>
238-
<Tab.Panel>
245+
</TabPanel>
246+
<TabPanel>
239247
{/* Logic */}
240248
<SkipLinkReusable anchor="#logicTitle">
241249
{t("skipLink.logic")}
@@ -246,16 +254,16 @@ export const RightPanel = ({ id, lang }: { id: string; lang: Language }) => {
246254
)}
247255
</div>
248256
{/* end logic */}
249-
</Tab.Panel>
250-
</Tab.Panels>
251-
</Tab.Group>
257+
</TabPanel>
258+
</TabPanels>
259+
</TabGroup>
252260
{/* --> */}
253261
</div>
254262
</div>
255-
</Transition.Child>
263+
</TransitionChild>
256264
</div>
257265
</div>
258-
</Transition.Root>
266+
</Transition>
259267
</section>
260268
);
261269
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@hcaptcha/types": "^1.0.4",
7171
"@headless-tree/core": "^1.4.0",
7272
"@headless-tree/react": "^1.4.0",
73-
"@headlessui/react": "^2.2.0",
73+
"@headlessui/react": "^2.2.7",
7474
"@neshca/cache-handler": "^1.2.1",
7575
"@next/mdx": "15.5.0",
7676
"@prisma/client": "6",

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2779,7 +2779,7 @@ __metadata:
27792779
languageName: node
27802780
linkType: hard
27812781

2782-
"@headlessui/react@npm:^2.2.0":
2782+
"@headlessui/react@npm:^2.2.7":
27832783
version: 2.2.7
27842784
resolution: "@headlessui/react@npm:2.2.7"
27852785
dependencies:
@@ -13206,7 +13206,7 @@ __metadata:
1320613206
"@hcaptcha/types": "npm:^1.0.4"
1320713207
"@headless-tree/core": "npm:^1.4.0"
1320813208
"@headless-tree/react": "npm:^1.4.0"
13209-
"@headlessui/react": "npm:^2.2.0"
13209+
"@headlessui/react": "npm:^2.2.7"
1321013210
"@jest/globals": "npm:^29.7.0"
1321113211
"@neshca/cache-handler": "npm:^1.2.1"
1321213212
"@next/mdx": "npm:15.5.0"

0 commit comments

Comments
 (0)