diff --git a/packages/ui/src/components/alert/alert.tsx b/packages/ui/src/components/alert/alert.tsx index ea7020adc..93fda638b 100644 --- a/packages/ui/src/components/alert/alert.tsx +++ b/packages/ui/src/components/alert/alert.tsx @@ -1,6 +1,6 @@ import type * as React from "react"; import { ExclamationCircleFill } from "react-bootstrap-icons"; -import { VariantProps, cva } from "class-variance-authority"; +import { type VariantProps, cva } from "class-variance-authority"; type AlertVariantsProps = VariantProps; diff --git a/packages/ui/src/components/breadcrumbs/breadcrumb-item.tsx b/packages/ui/src/components/breadcrumbs/breadcrumb-item.tsx index e11becca9..9bb582089 100644 --- a/packages/ui/src/components/breadcrumbs/breadcrumb-item.tsx +++ b/packages/ui/src/components/breadcrumbs/breadcrumb-item.tsx @@ -1,4 +1,4 @@ -import { AriaBreadcrumbItemProps, useBreadcrumbItem } from "@react-aria/breadcrumbs"; +import { type AriaBreadcrumbItemProps, useBreadcrumbItem } from "@react-aria/breadcrumbs"; import * as React from "react"; import { cn } from "mxcn"; import Link from "next/link"; diff --git a/packages/ui/src/components/breadcrumbs/breadcrumbs.tsx b/packages/ui/src/components/breadcrumbs/breadcrumbs.tsx index 35786662f..f152b9ceb 100644 --- a/packages/ui/src/components/breadcrumbs/breadcrumbs.tsx +++ b/packages/ui/src/components/breadcrumbs/breadcrumbs.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { AriaBreadcrumbsProps, useBreadcrumbs } from "@react-aria/breadcrumbs"; +import { type AriaBreadcrumbsProps, useBreadcrumbs } from "@react-aria/breadcrumbs"; interface Props extends AriaBreadcrumbsProps { children: React.ReactNode; diff --git a/packages/ui/src/components/button/button.tsx b/packages/ui/src/components/button/button.tsx index 7809faada..c4cc1b8b1 100644 --- a/packages/ui/src/components/button/button.tsx +++ b/packages/ui/src/components/button/button.tsx @@ -1,7 +1,7 @@ import * as React from "react"; -import { AriaButtonProps, useButton } from "@react-aria/button"; +import { type AriaButtonProps, useButton } from "@react-aria/button"; import { mergeProps } from "@react-aria/utils"; -import { VariantProps, cva } from "class-variance-authority"; +import { type VariantProps, cva } from "class-variance-authority"; import { cn } from "mxcn"; export const buttonVariants = cva( diff --git a/packages/ui/src/components/context-menu.tsx b/packages/ui/src/components/context-menu.tsx index b9fb7ae87..f70d6f078 100644 --- a/packages/ui/src/components/context-menu.tsx +++ b/packages/ui/src/components/context-menu.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import * as ContextMenuPrimitive from "@radix-ui/react-context-menu"; import { cn } from "mxcn"; -import { ButtonVariantProps, buttonVariants } from "./button/button"; +import { type ButtonVariantProps, buttonVariants } from "./button/button"; export const ContextMenu = ContextMenuPrimitive.Root; export const ContextMenuTrigger = ContextMenuPrimitive.Trigger; diff --git a/packages/ui/src/components/dropdown.tsx b/packages/ui/src/components/dropdown.tsx index 427b87acb..699252e95 100644 --- a/packages/ui/src/components/dropdown.tsx +++ b/packages/ui/src/components/dropdown.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; import { cn } from "mxcn"; import Link from "next/link"; -import { ButtonVariantProps, buttonVariants } from "./button/button"; +import { type ButtonVariantProps, buttonVariants } from "./button/button"; export const DropdownMenu = DropdownMenuPrimitive.Root; export const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; diff --git a/packages/ui/src/components/error-message.tsx b/packages/ui/src/components/error-message.tsx index c08c17c20..fad627827 100644 --- a/packages/ui/src/components/error-message.tsx +++ b/packages/ui/src/components/error-message.tsx @@ -1,4 +1,4 @@ -import { DOMAttributes } from "@react-types/shared"; +import type { DOMAttributes } from "@react-types/shared"; import { ExclamationTriangleFill } from "react-bootstrap-icons"; interface Props { diff --git a/packages/ui/src/components/fields/async-list-search-field/actions.tsx b/packages/ui/src/components/fields/async-list-search-field/actions.tsx index ac76f1f66..4e1bb0f82 100644 --- a/packages/ui/src/components/fields/async-list-search-field/actions.tsx +++ b/packages/ui/src/components/fields/async-list-search-field/actions.tsx @@ -1,4 +1,4 @@ -import { ComboBoxState } from "@react-stately/combobox"; +import { type ComboBoxState } from "@react-stately/combobox"; import { Button } from "../../button/button"; import { ChevronDown, X } from "react-bootstrap-icons"; import { cn } from "mxcn"; diff --git a/packages/ui/src/components/fields/checkbox-field.tsx b/packages/ui/src/components/fields/checkbox-field.tsx index b28e773a6..f8d0ceb2a 100644 --- a/packages/ui/src/components/fields/checkbox-field.tsx +++ b/packages/ui/src/components/fields/checkbox-field.tsx @@ -1,4 +1,4 @@ -import { AriaCheckboxProps, useCheckbox } from "@react-aria/checkbox"; +import { type AriaCheckboxProps, useCheckbox } from "@react-aria/checkbox"; import { VisuallyHidden } from "@react-aria/visually-hidden"; import { useToggleState } from "@react-stately/toggle"; import * as React from "react"; diff --git a/packages/ui/src/components/fields/date-picker-field.tsx b/packages/ui/src/components/fields/date-picker-field.tsx index 8d3f4aab8..b1bcb210c 100644 --- a/packages/ui/src/components/fields/date-picker-field.tsx +++ b/packages/ui/src/components/fields/date-picker-field.tsx @@ -1,10 +1,10 @@ import * as React from "react"; import { useDatePickerState } from "@react-stately/datepicker"; -import { useDatePicker, AriaDateFieldProps } from "@react-aria/datepicker"; +import { useDatePicker, type AriaDateFieldProps } from "@react-aria/datepicker"; import { Calendar2, ExclamationCircle, X } from "react-bootstrap-icons"; import { Button } from "../button/button"; import { useTranslations } from "next-intl"; -import { DateValue, parseDate } from "@internationalized/date"; +import { type DateValue, parseDate } from "@internationalized/date"; import formatISO9075 from "date-fns/formatISO9075"; import { ModalProvider } from "@react-aria/overlays"; import { cn } from "mxcn"; diff --git a/packages/ui/src/components/fields/radio-group-field.tsx b/packages/ui/src/components/fields/radio-group-field.tsx index a6d0078e9..7a9ca8bee 100644 --- a/packages/ui/src/components/fields/radio-group-field.tsx +++ b/packages/ui/src/components/fields/radio-group-field.tsx @@ -1,5 +1,10 @@ import * as React from "react"; -import { useRadioGroup, useRadio, AriaRadioProps, AriaRadioGroupProps } from "@react-aria/radio"; +import { + useRadioGroup, + useRadio, + type AriaRadioProps, + type AriaRadioGroupProps, +} from "@react-aria/radio"; import { useRadioGroupState } from "@react-stately/radio"; import { RadioContext, useRadioFieldContext } from "../../context/radio-field-context"; import { ErrorMessage } from "../error-message"; diff --git a/packages/ui/src/components/fields/switch-field.tsx b/packages/ui/src/components/fields/switch-field.tsx index bc8454ec1..758e124c6 100644 --- a/packages/ui/src/components/fields/switch-field.tsx +++ b/packages/ui/src/components/fields/switch-field.tsx @@ -1,4 +1,4 @@ -import { AriaSwitchProps, useSwitch } from "@react-aria/switch"; +import { type AriaSwitchProps, useSwitch } from "@react-aria/switch"; import { VisuallyHidden } from "@react-aria/visually-hidden"; import { useToggleState } from "@react-stately/toggle"; import * as React from "react"; diff --git a/packages/ui/src/components/fields/text-field.tsx b/packages/ui/src/components/fields/text-field.tsx index ec64ab1b3..b07ca1997 100644 --- a/packages/ui/src/components/fields/text-field.tsx +++ b/packages/ui/src/components/fields/text-field.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { AriaTextFieldOptions, TextFieldAria, useTextField } from "@react-aria/textfield"; +import { type AriaTextFieldOptions, type TextFieldAria, useTextField } from "@react-aria/textfield"; import { cn } from "mxcn"; import { Input } from "../inputs/input"; import { Textarea } from "../inputs/textarea"; diff --git a/packages/ui/src/components/inputs/date-picker/calendar/calendar.tsx b/packages/ui/src/components/inputs/date-picker/calendar/calendar.tsx index 15e74f8f7..ddf0df1a0 100644 --- a/packages/ui/src/components/inputs/date-picker/calendar/calendar.tsx +++ b/packages/ui/src/components/inputs/date-picker/calendar/calendar.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { useCalendarState } from "@react-stately/calendar"; -import { CalendarProps, useCalendar } from "@react-aria/calendar"; +import { type CalendarProps, useCalendar } from "@react-aria/calendar"; import { type DateValue, createCalendar } from "@internationalized/date"; import { CalendarGrid } from "./calendar-grid"; import { Button } from "../../../button/button"; diff --git a/packages/ui/src/components/inputs/date-picker/date-field.tsx b/packages/ui/src/components/inputs/date-picker/date-field.tsx index a61d6fde1..ba14f16ac 100644 --- a/packages/ui/src/components/inputs/date-picker/date-field.tsx +++ b/packages/ui/src/components/inputs/date-picker/date-field.tsx @@ -1,7 +1,11 @@ import * as React from "react"; import { useLocale } from "@react-aria/i18n"; -import { useDateFieldState, type DateSegment, DateFieldState } from "@react-stately/datepicker"; -import { AriaDatePickerProps, useDateField, useDateSegment } from "@react-aria/datepicker"; +import { + useDateFieldState, + type DateSegment, + type DateFieldState, +} from "@react-stately/datepicker"; +import { type AriaDatePickerProps, useDateField, useDateSegment } from "@react-aria/datepicker"; import { type DateValue, createCalendar } from "@internationalized/date"; import { cn } from "mxcn"; diff --git a/packages/ui/src/components/multi-form/multi-form-step.tsx b/packages/ui/src/components/multi-form/multi-form-step.tsx index 448233b7f..d5dbd9f40 100644 --- a/packages/ui/src/components/multi-form/multi-form-step.tsx +++ b/packages/ui/src/components/multi-form/multi-form-step.tsx @@ -1,4 +1,4 @@ -import { FormikProps, FormikValues, useFormikContext } from "formik"; +import { type FormikProps, type FormikValues, useFormikContext } from "formik"; export interface MultiFormStepItem { title: string; diff --git a/packages/ui/src/components/multi-form/multi-form.tsx b/packages/ui/src/components/multi-form/multi-form.tsx index c3f1f50cf..ad7fd480f 100644 --- a/packages/ui/src/components/multi-form/multi-form.tsx +++ b/packages/ui/src/components/multi-form/multi-form.tsx @@ -1,9 +1,16 @@ import * as React from "react"; -import { FormikHelpers, Form, Formik, FormikConfig, FormikProps, FormikValues } from "formik"; +import { + type FormikHelpers, + Form, + Formik, + type FormikConfig, + type FormikProps, + type FormikValues, +} from "formik"; import { cn } from "mxcn"; import { Button } from "../button/button"; import { ArrowLeft, ArrowRight } from "react-bootstrap-icons"; -import { MultiFormStep, MultiFormStepItem } from "./multi-form-step"; +import { MultiFormStep, type MultiFormStepItem } from "./multi-form-step"; interface Props extends Omit, "children"> { diff --git a/packages/ui/src/components/overlays/popover.tsx b/packages/ui/src/components/overlays/popover.tsx index feecd338b..b68cda90a 100644 --- a/packages/ui/src/components/overlays/popover.tsx +++ b/packages/ui/src/components/overlays/popover.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { FocusScope } from "@react-aria/focus"; -import { AriaDialogProps, useDialog } from "@react-aria/dialog"; +import { type AriaDialogProps, useDialog } from "@react-aria/dialog"; import { OverlayContainer, useOverlayPosition, diff --git a/packages/ui/src/hooks/select/useMultiSelectListState.ts b/packages/ui/src/hooks/select/useMultiSelectListState.ts index c69530edb..919765fe4 100644 --- a/packages/ui/src/hooks/select/useMultiSelectListState.ts +++ b/packages/ui/src/hooks/select/useMultiSelectListState.ts @@ -1,5 +1,5 @@ import type * as React from "react"; -import { ListState, useListState } from "@react-stately/list"; +import { type ListState, useListState } from "@react-stately/list"; import type { CollectionBase, MultipleSelection, Node } from "@react-types/shared"; export type MultiSelectListProps = CollectionBase & MultipleSelection; diff --git a/packages/ui/src/hooks/select/useMultiSelectState.ts b/packages/ui/src/hooks/select/useMultiSelectState.ts index 161910366..5243c9e46 100644 --- a/packages/ui/src/hooks/select/useMultiSelectState.ts +++ b/packages/ui/src/hooks/select/useMultiSelectState.ts @@ -1,6 +1,6 @@ import * as React from "react"; -import { MenuTriggerState, useMenuTriggerState } from "@react-stately/menu"; -import { MultiSelectListState, useMultiSelectListState } from "./useMultiSelectListState"; +import { type MenuTriggerState, useMenuTriggerState } from "@react-stately/menu"; +import { type MultiSelectListState, useMultiSelectListState } from "./useMultiSelectListState"; import type { OverlayTriggerProps } from "@react-types/overlays"; import type { diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index 21e4f9137..91ce3b77c 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -1,15 +1,10 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./dist", - "target": "ESNext", - "module": "CommonJS", - "moduleResolution": "node", - "declaration": true, - "skipLibCheck": true, - "importHelpers": true, - "esModuleInterop": true, - "jsx": "react-jsx" - }, - "exclude": ["dist", "node_modules"] + "moduleResolution": "Bundler", + "module": "ESNext", + "noEmit": true, + "jsx": "react-jsx", + "lib": ["ES2022", "DOM", "DOM.Iterable"] + } }