From d120f43255564edb28c5ba508e6e7688bd9d803b Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Thu, 23 Oct 2025 23:27:13 +0200 Subject: [PATCH] Fix issues --- package.json | 1 - packages/shared/src/utils/helpers.ts | 6 +- packages/ui/src/components/button-group.tsx | 1 + packages/ui/src/components/calendar.tsx | 69 ++++++++++++++------- packages/ui/src/components/date-field.tsx | 1 + packages/ui/src/components/date-picker.tsx | 7 ++- packages/ui/src/components/field.tsx | 6 +- packages/ui/src/hooks/use-clipboard.ts | 12 +++- turbo.json | 4 ++ 9 files changed, 72 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index cbebb7a..1550b4a 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "deploy:main:staging": "turbo deploy:staging --filter=@xtablo/main", "deploy:main:prod": "turbo deploy:prod --filter=@xtablo/main", "deploy:external": "turbo deploy --filter=@xtablo/external", - "deploy:all": "pnpm deploy:main && pnpm deploy:external", "lint": "turbo lint", "lint:fix": "turbo lint:fix", "format": "turbo format", diff --git a/packages/shared/src/utils/helpers.ts b/packages/shared/src/utils/helpers.ts index 37bdf01..de3fa8f 100644 --- a/packages/shared/src/utils/helpers.ts +++ b/packages/shared/src/utils/helpers.ts @@ -193,11 +193,11 @@ export const parseICSFile = (icsContent: string): ParsedICSEvent[] => { }; for (let i = 0; i < lines.length; i++) { - let line = lines[i].trim(); + let line = lines[i]?.trim() || ""; // Handle line folding (lines starting with space or tab) - while (i + 1 < lines.length && /^[ \t]/.test(lines[i + 1])) { - line += lines[i + 1].substring(1); + while (i + 1 < lines.length && /^[ \t]/.test(lines[i + 1] || "")) { + line += lines[i + 1]?.substring(1) || ""; i++; } diff --git a/packages/ui/src/components/button-group.tsx b/packages/ui/src/components/button-group.tsx index 11dec76..1ad2df8 100644 --- a/packages/ui/src/components/button-group.tsx +++ b/packages/ui/src/components/button-group.tsx @@ -26,6 +26,7 @@ function ButtonGroup({ ...props }: React.ComponentProps<"div"> & VariantProps) { return ( + // biome-ignore lint/a11y/useSemanticElements: This is a UI grouping element, not a form fieldset
& { rootRef?: React.Ref }) => { + return
; +}; + +const CalendarChevron = ({ + className, + orientation, + ...props +}: React.SVGProps & { orientation?: "up" | "left" | "right" | "down" }) => { + switch (orientation) { + case "up": + return ; + case "left": + return ; + case "right": + return ; + case "down": + return ; + default: + return ; + } +}; + +const CalendarWeekNumber = ({ + children, + ...props +}: React.TdHTMLAttributes) => { + return ( + +
+ {children} +
+ + ); +}; + function Calendar({ className, classNames, @@ -104,30 +145,10 @@ function Calendar({ ...classNames, }} components={{ - Root: ({ className, rootRef, ...props }) => { - return
; - }, - Chevron: ({ className, orientation, ...props }) => { - if (orientation === "left") { - return ; - } - - if (orientation === "right") { - return ; - } - - return ; - }, + Root: CalendarRoot, + Chevron: CalendarChevron, DayButton: CalendarDayButton, - WeekNumber: ({ children, ...props }) => { - return ( - -
- {children} -
- - ); - }, + WeekNumber: CalendarWeekNumber, ...components, }} {...props} diff --git a/packages/ui/src/components/date-field.tsx b/packages/ui/src/components/date-field.tsx index 66f1136..9f22f34 100644 --- a/packages/ui/src/components/date-field.tsx +++ b/packages/ui/src/components/date-field.tsx @@ -113,6 +113,7 @@ export function DateFieldLabel({ "aria-required"?: boolean; }) { return ( + // biome-ignore lint/a11y/noLabelWithoutControl: This label is for display only within a custom date picker component