From 01345ca7ba33aa60ab5549335a2fca2e4d2f004e Mon Sep 17 00:00:00 2001 From: Nathan Panchout Date: Wed, 19 Mar 2025 10:00:35 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(front)=20updated=20imports=20to=20the?= =?UTF-8?q?=20UI=20Kit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Imports have been modified to use the gouvfr UI Kit, replacing the old one. This includes updating dependencies in the package.json file and adding version 0.1.3 of the UI Kit. --- src/frontend/apps/drive/cunningham.ts | 2 +- src/frontend/apps/drive/package.json | 2 +- .../explorer/components/ExplorerGrid.tsx | 2 +- .../components/explorer/ExplorerLayout.tsx | 2 +- .../layouts/components/header/Header.tsx | 2 +- src/frontend/apps/drive/src/pages/_app.tsx | 2 +- src/frontend/apps/drive/src/pages/index.tsx | 2 +- .../apps/drive/src/styles/globals.scss | 2 +- src/frontend/yarn.lock | 38 ++++++++++--------- 9 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/frontend/apps/drive/cunningham.ts b/src/frontend/apps/drive/cunningham.ts index 385910c0..ec0351a0 100644 --- a/src/frontend/apps/drive/cunningham.ts +++ b/src/frontend/apps/drive/cunningham.ts @@ -1,4 +1,4 @@ -import { cunninghamConfig } from "@lasuite/ui-kit"; +import { cunninghamConfig } from "@gouvfr-lasuite/ui-kit"; export default { ...cunninghamConfig, diff --git a/src/frontend/apps/drive/package.json b/src/frontend/apps/drive/package.json index aae30c17..2d5fd7c6 100644 --- a/src/frontend/apps/drive/package.json +++ b/src/frontend/apps/drive/package.json @@ -10,7 +10,7 @@ "build-theme": "cunningham -g css -o src/styles" }, "dependencies": { - "@lasuite/ui-kit": "../../../design-system", + "@gouvfr-lasuite/ui-kit": "0.1.3", "@openfun/cunningham-react": "3.0.0", "@tanstack/react-query": "5.66.9", "@tanstack/react-table": "8.20.6", diff --git a/src/frontend/apps/drive/src/features/explorer/components/ExplorerGrid.tsx b/src/frontend/apps/drive/src/features/explorer/components/ExplorerGrid.tsx index 687b619f..445b9635 100644 --- a/src/frontend/apps/drive/src/features/explorer/components/ExplorerGrid.tsx +++ b/src/frontend/apps/drive/src/features/explorer/components/ExplorerGrid.tsx @@ -12,7 +12,7 @@ import { NavigationEventType, useExplorer } from "./ExplorerContext"; import { FolderIcon } from "@/features/ui/components/icon/Icon"; import { FileIcon } from "@/features/ui/components/icon/Icon"; import clsx from "clsx"; -import { DropdownMenu } from "@lasuite/ui-kit"; +import { DropdownMenu } from "@gouvfr-lasuite/ui-kit"; import { Button, Loader, useCunningham } from "@openfun/cunningham-react"; import gridEmpty from "@/assets/grid_empty.png"; diff --git a/src/frontend/apps/drive/src/features/layouts/components/explorer/ExplorerLayout.tsx b/src/frontend/apps/drive/src/features/layouts/components/explorer/ExplorerLayout.tsx index 0f3755eb..93204f1e 100644 --- a/src/frontend/apps/drive/src/features/layouts/components/explorer/ExplorerLayout.tsx +++ b/src/frontend/apps/drive/src/features/layouts/components/explorer/ExplorerLayout.tsx @@ -1,6 +1,6 @@ import { login, useAuth } from "@/features/auth/Auth"; import { ExplorerTree } from "@/features/explorer/components/ExplorerTree"; -import { MainLayout } from "@lasuite/ui-kit"; +import { MainLayout } from "@gouvfr-lasuite/ui-kit"; import logo from "@/assets/logo.svg"; import { HeaderRight } from "../header/Header"; import { diff --git a/src/frontend/apps/drive/src/features/layouts/components/header/Header.tsx b/src/frontend/apps/drive/src/features/layouts/components/header/Header.tsx index 2b726e1d..48b8d0c7 100644 --- a/src/frontend/apps/drive/src/features/layouts/components/header/Header.tsx +++ b/src/frontend/apps/drive/src/features/layouts/components/header/Header.tsx @@ -1,4 +1,4 @@ -import { DropdownMenu, Header as KitHeader } from "@lasuite/ui-kit"; +import { DropdownMenu, Header as KitHeader } from "@gouvfr-lasuite/ui-kit"; import { Button } from "@openfun/cunningham-react"; import logo from "@/assets/logo.svg"; import { useAuth, logout } from "@/features/auth/Auth"; diff --git a/src/frontend/apps/drive/src/pages/_app.tsx b/src/frontend/apps/drive/src/pages/_app.tsx index c24d82a5..30672809 100644 --- a/src/frontend/apps/drive/src/pages/_app.tsx +++ b/src/frontend/apps/drive/src/pages/_app.tsx @@ -1,7 +1,7 @@ import type { ReactElement, ReactNode } from "react"; import type { NextPage } from "next"; import type { AppProps } from "next/app"; -import { CunninghamProvider } from "@lasuite/ui-kit"; +import { CunninghamProvider } from "@gouvfr-lasuite/ui-kit"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import "../styles/globals.scss"; diff --git a/src/frontend/apps/drive/src/pages/index.tsx b/src/frontend/apps/drive/src/pages/index.tsx index 17a645f9..9fc0c86f 100644 --- a/src/frontend/apps/drive/src/pages/index.tsx +++ b/src/frontend/apps/drive/src/pages/index.tsx @@ -2,7 +2,7 @@ import { GlobalLayout } from "@/features/layouts/components/global/GlobalLayout" import Head from "next/head"; import { useTranslation } from "next-i18next"; import { DefaultLayout } from "@/features/layouts/components/default/DefaultLayout"; -import { ProConnectButton } from "@lasuite/ui-kit"; +import { ProConnectButton } from "@gouvfr-lasuite/ui-kit"; import { login, useAuth } from "@/features/auth/Auth"; import { gotoLastVisitedItem } from "@/features/explorer/utils/utils"; import { useEffect } from "react"; diff --git a/src/frontend/apps/drive/src/styles/globals.scss b/src/frontend/apps/drive/src/styles/globals.scss index f7704e22..34ed16e5 100644 --- a/src/frontend/apps/drive/src/styles/globals.scss +++ b/src/frontend/apps/drive/src/styles/globals.scss @@ -1,4 +1,4 @@ -@use "@lasuite/ui-kit/style"; +@use "@gouvfr-lasuite/ui-kit/style"; @use "./cunningham-tokens.css"; @use "./../features/layouts/components/global/GlobalLayout.scss"; @use "./../features/layouts/components/explorer/ExplorerLayout.scss"; diff --git a/src/frontend/yarn.lock b/src/frontend/yarn.lock index 2cdcf036..67b3e3f6 100644 --- a/src/frontend/yarn.lock +++ b/src/frontend/yarn.lock @@ -174,6 +174,25 @@ dependencies: tslib "2" +"@gouvfr-lasuite/ui-kit@0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@gouvfr-lasuite/ui-kit/-/ui-kit-0.1.3.tgz#1be7f1bdf12e7428e630d6ce11fbc77c4c9b9b21" + integrity sha512-ba3ZrAIhX84cofa2IwiWhgE0wzz85+ySbOTvB1lP9jeWYvWn/N5HsnxphA9bEMIrx1Yi91upzmYLvjHRoDq1Ww== + dependencies: + "@dnd-kit/core" "6.3.1" + "@dnd-kit/modifiers" "9.0.0" + "@dnd-kit/sortable" "10.0.0" + "@openfun/cunningham-react" "3.0.0" + "@types/node" "22.10.7" + clsx "2.1.1" + cmdk "1.0.4" + react "19.0.0" + react-arborist "3.4.3" + react-aria-components "1.6.0" + react-dom "19.0.0" + react-resizable-panels "2.1.7" + react-stately "3.35.0" + "@humanfs/core@^0.19.1": version "0.19.1" resolved "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz" @@ -369,23 +388,6 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@lasuite/ui-kit@../../../design-system": - version "0.1.0" - dependencies: - "@dnd-kit/core" "6.3.1" - "@dnd-kit/modifiers" "9.0.0" - "@dnd-kit/sortable" "10.0.0" - "@openfun/cunningham-react" "3.0.0" - "@types/node" "22.10.7" - clsx "2.1.1" - cmdk "1.0.4" - react "19.0.0" - react-arborist "3.4.3" - react-aria-components "1.6.0" - react-dom "19.0.0" - react-resizable-panels "2.1.7" - react-stately "3.35.0" - "@next/env@15.1.7": version "15.1.7" resolved "https://registry.npmjs.org/@next/env/-/env-15.1.7.tgz" @@ -5126,7 +5128,7 @@ prelude-ls@^1.2.1: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -pretty-bytes@^6.1.1: +pretty-bytes@6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-6.1.1.tgz#38cd6bb46f47afbf667c202cfc754bffd2016a3b" integrity sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==