Skip to content

Commit ad2a56a

Browse files
Merge pull request #154 from linked-planet/dev
Dev
2 parents 0a24b13 + 5fb243d commit ad2a56a

File tree

120 files changed

+1897
-2062
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1897
-2062
lines changed

biome.json renamed to biome.jsonc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.0.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
33
"formatter": {
44
"enabled": true,
55
"formatWithErrors": true,
@@ -25,6 +25,9 @@
2525
"correctness": {
2626
"noUnusedImports": "warn"
2727
},
28+
"nursery": {
29+
"useUniqueElementIds": "off"
30+
},
2831
"style": {
2932
"noParameterAssign": "error",
3033
"useAsConstAssertion": "error",

library/src/components/Accordion.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as RAccordion from "@radix-ui/react-accordion"
22
import { ChevronDownIcon } from "lucide-react"
3-
import React, { type Ref } from "react"
3+
import { forwardRef, type Ref } from "react"
44
import { twMerge } from "tailwind-merge"
55

66
type AccordionSingleProps = Pick<
@@ -48,7 +48,7 @@ type AccordionItemProps = Pick<
4848
"value" | "id" | "className" | "style" | "children"
4949
>
5050

51-
const AccordionItem = React.forwardRef(
51+
const AccordionItem = forwardRef(
5252
(
5353
{ children, className, ...props }: AccordionItemProps,
5454
forwardedRef: Ref<HTMLDivElement>,
@@ -72,7 +72,7 @@ type AccordionTriggerProps = Pick<
7272
"id" | "onClick" | "onKeyDown" | "className" | "style" | "children"
7373
> & { testId?: string }
7474

75-
const AccordionTrigger = React.forwardRef(
75+
const AccordionTrigger = forwardRef(
7676
(
7777
{ children, className, ...props }: AccordionTriggerProps,
7878
forwardedRef: Ref<HTMLButtonElement>,
@@ -104,7 +104,7 @@ type AccordionContentProps = Pick<
104104
"id" | "className" | "style" | "children"
105105
> & { testId?: string }
106106

107-
const AccordionContent = React.forwardRef(
107+
const AccordionContent = forwardRef(
108108
(
109109
{ children, className, ...props }: AccordionContentProps,
110110
forwardedRef: Ref<HTMLDivElement>,

library/src/components/Blanket.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import ReactDOM from "react-dom"
21
import type { ComponentPropsWithoutRef } from "react"
2+
import ReactDOM from "react-dom"
33
import { twMerge } from "tailwind-merge"
44
import { usePortalContainer } from "../utils"
5+
56
type BlanketProps = ComponentPropsWithoutRef<"div"> & {
67
usePortal?: boolean | ShadowRoot
78
}
@@ -25,8 +26,8 @@ export function Blanket({
2526
role={role ?? "presentation"}
2627
{...props}
2728
>
28-
{/** biome-ignore lint/a11y/noStaticElementInteractions: <explanation> */}
29-
{/** biome-ignore lint/a11y/useKeyWithClickEvents: <explanation> */}
29+
{/** biome-ignore lint/a11y/noStaticElementInteractions: background blanke diff interaction handling */}
30+
{/** biome-ignore lint/a11y/useKeyWithClickEvents: No key handling needed */}
3031
<div
3132
onClick={(e) => {
3233
// this is necessary for the click to propagate to the blanket anywhere inside the children

library/src/components/BookCard.tsx

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import { css } from "@emotion/css"
12
import type React from "react"
2-
import { forwardRef } from "react"
33
import type { CSSProperties } from "react"
4-
5-
import { css } from "@emotion/css"
4+
import { forwardRef } from "react"
65

76
import { twMerge } from "tailwind-merge"
87
import { Collapsible } from "./Collapsible"
@@ -281,24 +280,27 @@ const CardHeaderUpperTitle = ({
281280
)
282281
}
283282

283+
/**
284+
* Styling element containing the actions of the card header
285+
*/
284286
const CardHeaderActions = ({
285287
children,
286288
id,
287289
testId,
288290
className,
289291
style,
290-
onClick,
291-
onKeyDown,
292-
onKeyUp,
292+
//onClick,
293+
//onKeyDown,
294+
//onKeyUp,
293295
}: {
294296
children: React.ReactNode
295297
id?: string
296298
testId?: string
297299
className?: string
298300
style?: CSSProperties
299-
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void
300-
onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void
301-
onKeyUp?: (event: React.KeyboardEvent<HTMLDivElement>) => void
301+
//onClick?: (event: React.MouseEvent<HTMLDivElement>) => void
302+
//onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void
303+
//onKeyUp?: (event: React.KeyboardEvent<HTMLDivElement>) => void
302304
}) => (
303305
<div
304306
className={twMerge(
@@ -308,32 +310,9 @@ const CardHeaderActions = ({
308310
id={id}
309311
data-testid={testId}
310312
style={style}
311-
onClick={onClick}
312-
onKeyDown={onKeyDown}
313-
onKeyUp={onKeyUp}
314-
>
315-
{children}
316-
</div>
317-
)
318-
319-
const CardHeaderActionsInfo = ({
320-
children,
321-
id,
322-
testId,
323-
className,
324-
style,
325-
}: {
326-
children: React.ReactNode
327-
id?: string
328-
testId?: string
329-
className?: string
330-
style?: CSSProperties
331-
}) => (
332-
<div
333-
className={twMerge("mr-2 box-border items-center text-sm", className)}
334-
id={id}
335-
data-testid={testId}
336-
style={style}
313+
//onClick={onClick}
314+
//onKeyDown={onKeyDown}
315+
//onKeyUp={onKeyUp}
337316
>
338317
{children}
339318
</div>
@@ -464,7 +443,6 @@ const BookCardComponents = {
464443
CardHeaderSubtitle,
465444
CardHeaderUpperTitle,
466445
CardHeaderActions,
467-
CardHeaderActionsInfo,
468446
CardGridBody,
469447
CardRowBody,
470448
CardColumnBody,
@@ -485,7 +463,6 @@ type BookCardProps = {
485463
bodyStyle?: CSSProperties
486464
bodyClassName?: string
487465
actions?: React.ReactNode
488-
actionsInfo?: React.ReactNode
489466
children?: React.ReactNode
490467
onOpenChanged?: (opened: boolean) => void
491468
id?: string
@@ -502,7 +479,6 @@ export const BookCard = forwardRef(
502479
closed,
503480
defaultOpen,
504481
actions,
505-
actionsInfo,
506482
bodyStyle,
507483
bodyClassName,
508484
bodyLayout,
@@ -549,14 +525,7 @@ export const BookCard = forwardRef(
549525
</CardHeaderSubtitle>
550526
)}
551527
</CardHeaderMeta>
552-
<CardHeaderActions>
553-
{actionsInfo && (
554-
<CardHeaderActionsInfo>
555-
{actionsInfo}
556-
</CardHeaderActionsInfo>
557-
)}
558-
{actions}
559-
</CardHeaderActions>
528+
<CardHeaderActions>{actions}</CardHeaderActions>
560529
</CardHeader>
561530
}
562531
>

library/src/components/Breadcrumbs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React, { useEffect, useState } from "react"
21
import type { ComponentPropsWithoutRef } from "react"
2+
import React, { useEffect, useState } from "react"
33
import { twMerge } from "tailwind-merge"
44

55
type BreadcrumbsProps = ComponentPropsWithoutRef<"div"> & {

0 commit comments

Comments
 (0)