Skip to content

Commit

Permalink
bumper js-utils så vi får den nye logoen til biblioteksentralen
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvold committed Oct 3, 2024
1 parent 14b438b commit fe3afe8
Show file tree
Hide file tree
Showing 19 changed files with 3,741 additions and 5,395 deletions.
9,073 changes: 3,707 additions & 5,366 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
"version": "1.0.0",
"author": "Biblioteksentralen",
"dependencies": {
"@biblioteksentralen/js-utils": "^1.7.0",
"@biblioteksentralen/icons": "^2.0.1",
"@biblioteksentralen/react": "^2.0.0",
"@biblioteksentralen/utils": "^2.0.0",
"next": "^13.4.2",
"react": "^18.2.0",
"react-feather": "^2.0.10",
"react-dom": "^18.2.0",
"swr": "^2.1.5"
},
Expand Down
3 changes: 2 additions & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BiblioteksentralenLogoWithName, Flex, Link, Stack, Text } from "@biblioteksentralen/js-utils";
import { BiblioteksentralenLogoWithName } from "@biblioteksentralen/icons";
import { Flex, Link, Stack, Text } from "@biblioteksentralen/react";
import { Box, Container } from "@chakra-ui/react";

function Footer() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Container, Flex, Link } from "@biblioteksentralen/js-utils";
import { Box, Container, Flex, Link } from "@biblioteksentralen/react";
import { css } from "@emotion/react";
import NextLink from "next/link";

Expand Down
2 changes: 1 addition & 1 deletion src/components/Plausible.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isDevelopment } from "@biblioteksentralen/js-utils";
import { isDevelopment } from "@biblioteksentralen/utils";
import Script from "next/script";
import React from "react";

Expand Down
2 changes: 1 addition & 1 deletion src/components/SEO.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { withErrorBoundary } from "@biblioteksentralen/js-utils";
import { withErrorBoundary } from "@biblioteksentralen/react";
import Head from "next/head";
import React, { useEffect } from "react";

Expand Down
8 changes: 4 additions & 4 deletions src/components/SearchInput.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {
Box,
BoxProps,
BsSearch,
Button,
Container,
InputGroup,
InputLeftElement,
Stack,
usePrevious,
} from "@biblioteksentralen/js-utils";
} from "@biblioteksentralen/react";
import { Input } from "@chakra-ui/react";
import styled from "@emotion/styled";
import { useRouter } from "next/dist/client/router";
import React, { useCallback, useEffect, useId, useRef, useState } from "react";
import { useMount } from "../utils/useMount";
import { Search } from "react-feather";

const StyledForm = styled.form`
display: flex;
Expand Down Expand Up @@ -77,8 +77,8 @@ function SearchInput({ ...chakraProps }: BoxProps) {
</Box>
<StyledForm role="search" onSubmit={handleSubmit}>
<InputGroup>
<InputLeftElement pointerEvents="none" color="whiteAlpha.400" aria-hidden>
<BsSearch />
<InputLeftElement pointerEvents="none" color="whiteAlpha.500" aria-hidden>
<Search size="1em" />
</InputLeftElement>
<Input
id={inputId}
Expand Down
2 changes: 1 addition & 1 deletion src/components/lignendeBøker/LignendeBok.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, ChakraProps, colors, Flex, Grid, LinkBox, LinkOverlay } from "@biblioteksentralen/js-utils";
import { Box, ChakraProps, colors, Flex, Grid, LinkBox, LinkOverlay } from "@biblioteksentralen/react";
import NextLink from "next/link";
import { getVerkUrl } from "../../pages/verk/[workId]";
import { ReadalikesResponse, WorksResponse } from "../../utils/forrigebokApi";
Expand Down
2 changes: 1 addition & 1 deletion src/components/lignendeBøker/LignendeBøker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Container, ContainerProps, Heading, List, withErrorBoundary } from "@biblioteksentralen/js-utils";
import { Container, ContainerProps, Heading, List, withErrorBoundary } from "@biblioteksentralen/react";
import { css, keyframes } from "@emotion/react";
import { Work } from "../../utils/forrigebokApi";
import Lignendebok from "./LignendeBok";
Expand Down
5 changes: 3 additions & 2 deletions src/components/verk/CoverImage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BookIcon, colors, seededRandom } from "@biblioteksentralen/js-utils";
import { BookIcon } from "@biblioteksentralen/icons";
import { colors, seededRandom } from "@biblioteksentralen/utils";
import { Box, ChakraProps, Image, Skeleton } from "@chakra-ui/react";
import { css } from "@emotion/react";
import { WorksResponse } from "../../utils/forrigebokApi";
Expand Down Expand Up @@ -30,7 +31,7 @@ function Coverimage({ verk, ...chakraProps }: Props) {
width="100%"
{...chakraProps}
>
<BookIcon aria-hidden />
<BookIcon fontSize="1em" aria-hidden />
</Box>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/verk/Metadata.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChakraProps, Flex, FlexProps, Link, Stack } from "@biblioteksentralen/js-utils";
import { ChakraProps, Flex, FlexProps, Link, Stack } from "@biblioteksentralen/react";
import styled from "@emotion/styled";
import { useState } from "react";
import { WorksResponse } from "../../utils/forrigebokApi";
Expand Down
2 changes: 1 addition & 1 deletion src/components/verk/Sammendrag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, ChakraProps, List } from "@chakra-ui/react";
import StarProgressBar from "../StarProgressBar";
import NextLink from "next/link";
import { WorksResponse } from "../../utils/forrigebokApi";
import { colors } from "@biblioteksentralen/js-utils";
import { colors } from "@biblioteksentralen/react";
import { getTermUrl } from "../../pages/term/[id]";

function Sammendrag({ verk, ...chakraProps }: { verk: WorksResponse["works"][number] } & ChakraProps) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/verk/VerkInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Container, Text, withErrorBoundary } from "@biblioteksentralen/js-utils";
import { Container, Text, withErrorBoundary } from "@biblioteksentralen/react";
import styled from "@emotion/styled";
import { WorksResponse } from "../../utils/forrigebokApi";
import Coverimage from "./CoverImage";
Expand Down
2 changes: 1 addition & 1 deletion src/components/verk/VerkPreview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, LinkBox, LinkOverlay, withErrorBoundary } from "@biblioteksentralen/js-utils";
import { Box, LinkBox, LinkOverlay, withErrorBoundary } from "@biblioteksentralen/react";
import NextLink from "next/link";
import { getVerkUrl } from "../../pages/verk/[workId]";
import { WorksResponse } from "../../utils/forrigebokApi";
Expand Down
3 changes: 2 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { BiblioteksentralenProvider, Box, colors, Grid, isDevelopment } from "@biblioteksentralen/js-utils";
import { BiblioteksentralenProvider, Box, colors, Grid } from "@biblioteksentralen/react";
import { AppProps } from "next/app";
import Head from "next/head";
import { useEffect } from "react";
import Footer from "../components/Footer";
import Header from "../components/Header";
import { PlausibleSetup } from "../components/Plausible";
import { isDevelopment } from "@biblioteksentralen/utils";

const LogVercelInfo = () => {
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { VisuallyHidden } from "@biblioteksentralen/js-utils";
import { VisuallyHidden } from "@biblioteksentralen/react";
import { Container, Heading, List, Stack } from "@chakra-ui/react";
import { GetStaticProps } from "next";
import SearchInput from "../components/SearchInput";
Expand Down
13 changes: 6 additions & 7 deletions src/pages/sok.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
colors,
Container,
Flex,
keyframes,
Link,
LinkBox,
LinkOverlay,
Expand All @@ -14,8 +13,8 @@ import {
Spinner,
Stack,
Text,
} from "@biblioteksentralen/js-utils";
import { css } from "@emotion/react";
} from "@biblioteksentralen/react";
import { css, keyframes } from "@emotion/react";
import NextLink from "next/link";
import { useRouter } from "next/router";
import useSWR from "swr";
Expand Down Expand Up @@ -84,10 +83,10 @@ const IngenTreff = (props: { query: string }) => (
);

const slideDown = keyframes`
from {
opacity: 0;
transform: translateY(-1rem) scale(0.95);
}
from {
opacity: 0;
transform: translateY(-1rem) scale(0.95);
}
`;

const TreffListe = (props: { data: WorksResponse }) => (
Expand Down
4 changes: 2 additions & 2 deletions src/pages/term/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { colors, Container, Heading, List, ListItem, Stack, Text } from "@biblioteksentralen/js-utils";
import { colors, Container, Heading, List, ListItem, Stack, Text } from "@biblioteksentralen/react";
import { GetStaticPaths, GetStaticProps } from "next";
import SEO from "../../components/SEO";
import StarProgressBar from "../../components/StarProgressBar";
import VerkPreview from "../../components/verk/VerkPreview";
import { forrigebokFetcher } from "../../utils/forrigebokFetcher";
import { ReadalikesResponse, VocabularyResponse } from "../../utils/forrigebokApi";
import { forrigebokFetcher } from "../../utils/forrigebokFetcher";
import { slugifyString } from "../../utils/slugifyString";

export const getStaticPaths: GetStaticPaths = async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/verk/[workId].tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from "@biblioteksentralen/js-utils";
import { Grid } from "@biblioteksentralen/react";
import { GetStaticPaths, GetStaticProps } from "next";
import LignendeBøker from "../../components/lignendeBøker/LignendeBøker";
import SEO from "../../components/SEO";
Expand Down

0 comments on commit fe3afe8

Please sign in to comment.