diff --git a/.storybook/toolbar/ThemeNextToolbar.tsx b/.storybook/toolbar/ThemeNextToolbar.tsx index 6c21fea210e..40fe2da498a 100644 --- a/.storybook/toolbar/ThemeNextToolbar.tsx +++ b/.storybook/toolbar/ThemeNextToolbar.tsx @@ -8,7 +8,7 @@ import { import { BeakerIcon, CheckIcon } from "@storybook/icons"; import { useGlobals } from "@storybook/manager-api"; import { clsx } from "clsx"; -import React, { type AnchorHTMLAttributes } from "react"; +import type { AnchorHTMLAttributes } from "react"; import "./ThemeNextToolbar.css"; diff --git a/biome.jsonc b/biome.jsonc index ff7df2ec009..6032bf4c71a 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.9.1/schema.json", + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", "vcs": { "enabled": true, "clientKind": "git", @@ -50,6 +50,7 @@ "useSemanticElements": "off" }, "correctness": { + "noUnusedImports": "error", "useExhaustiveDependencies": { "level": "warn", "options": { diff --git a/cypress.config.ts b/cypress.config.ts index bf6a102a7f3..2bf3dbb9e3e 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -52,12 +52,18 @@ async function getViteConfig(config: UserConfig) { resolve: { alias: { "@salt-ds/core": path.resolve(__dirname, "./dist/salt-ds-core"), + "@salt-ds/countries": path.resolve( + __dirname, + "./dist/salt-ds-countries", + ), "@salt-ds/data-grid": path.resolve( __dirname, "./dist/salt-ds-data-grid", ), - "@salt-ds/lab": path.resolve(__dirname, "./dist/salt-ds-lab"), "@salt-ds/icons": path.resolve(__dirname, "./dist/salt-ds-icons"), + "@salt-ds/lab": path.resolve(__dirname, "./dist/salt-ds-lab"), + "@salt-ds/styles": path.resolve(__dirname, "./dist/salt-ds-styles"), + "@salt-ds/window": path.resolve(__dirname, "./dist/salt-ds-window"), }, }, optimizeDeps: { diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index 4c232397584..ca1fdcb7951 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../tsconfig.json", "compilerOptions": { + "jsx": "react-jsx", "types": ["cypress"] }, "include": ["**/*.ts", "**/*.tsx"] diff --git a/docs/components/LineBlock.tsx b/docs/components/LineBlock.tsx index 52aa2736776..02f542e744c 100644 --- a/docs/components/LineBlock.tsx +++ b/docs/components/LineBlock.tsx @@ -1,4 +1,3 @@ -import type { ReactNode } from "react"; import { ReplacementToken } from "./ReplacementToken"; import "./LineBlock.css"; diff --git a/package.json b/package.json index a13bce4aef6..9e71a600ea2 100644 --- a/package.json +++ b/package.json @@ -50,9 +50,9 @@ "chromatic": "chromatic" }, "dependencies": { - "@biomejs/biome": "^1.9.1", - "@biomejs/js-api": "^0.6.2", - "@biomejs/wasm-nodejs": "^1.9.1", + "@biomejs/biome": "1.9.4", + "@biomejs/js-api": "0.7.1", + "@biomejs/wasm-nodejs": "1.9.4", "@changesets/cli": "^2.27.7", "@cypress/code-coverage": "^3.12.35", "@faker-js/faker": "^8.0.0", @@ -127,7 +127,6 @@ "webpack-dev-server": "4.9.3", "webpack": "5.94.0", "recursive-readdir": "2.2.3", - "@storybook/test@npm:8.2.4": "patch:@storybook/test@npm%3A8.2.4#~/.yarn/patches/@storybook-test-npm-8.2.4-0a53c854b7.patch", "@joshwooding/vite-plugin-react-docgen-typescript": "0.4.0" }, "browserslist": { diff --git a/packages/ag-grid-theme/src/dependencies/dataGridExampleColumnsHdCompact.ts b/packages/ag-grid-theme/src/dependencies/dataGridExampleColumnsHdCompact.ts index f8efc1ebed0..c3a8b831308 100644 --- a/packages/ag-grid-theme/src/dependencies/dataGridExampleColumnsHdCompact.ts +++ b/packages/ag-grid-theme/src/dependencies/dataGridExampleColumnsHdCompact.ts @@ -1,5 +1,4 @@ import type { ColDef } from "ag-grid-community"; -import { DropdownEditor } from "./cell-editors/DropdownEditor"; import { FlagRenderer } from "./cell-renderers/FlagRenderer"; const dataGridExampleColumnsHdCompact: ColDef[] = [ diff --git a/packages/core/scripts/build.mjs b/packages/core/scripts/build.mjs index 87ed621fe7f..3235c92c663 100644 --- a/packages/core/scripts/build.mjs +++ b/packages/core/scripts/build.mjs @@ -1,6 +1,6 @@ import crypto from "node:crypto"; import fs from "node:fs"; -import path, { dirname } from "node:path"; +import path from "node:path"; import { fileURLToPath } from "node:url"; import { deleteSync } from "del"; import esbuild from "esbuild"; diff --git a/packages/core/src/file-drop-zone/FileDropZoneIcon.tsx b/packages/core/src/file-drop-zone/FileDropZoneIcon.tsx index a38a4a333cc..1dfcc8903be 100644 --- a/packages/core/src/file-drop-zone/FileDropZoneIcon.tsx +++ b/packages/core/src/file-drop-zone/FileDropZoneIcon.tsx @@ -1,4 +1,4 @@ -import { type IconProps, UploadIcon } from "@salt-ds/icons"; +import type { IconProps } from "@salt-ds/icons"; import { forwardRef } from "react"; import { useIcon } from "../semantic-icon-provider"; import { StatusIndicator, type ValidationStatus } from "../status-indicator"; diff --git a/packages/core/src/form-field/FormField.tsx b/packages/core/src/form-field/FormField.tsx index e928889376e..579baf56c9d 100644 --- a/packages/core/src/form-field/FormField.tsx +++ b/packages/core/src/form-field/FormField.tsx @@ -1,7 +1,7 @@ import { useComponentCssInjection } from "@salt-ds/styles"; import { useWindow } from "@salt-ds/window"; import { clsx } from "clsx"; -import { ForwardedRef, type HTMLAttributes, forwardRef } from "react"; +import { type HTMLAttributes, forwardRef } from "react"; import { type A11yValueProps, FormFieldContext } from "../form-field-context"; import { capitalize, makePrefixer, useId } from "../utils"; diff --git a/packages/core/stories/button/button.stories.tsx b/packages/core/stories/button/button.stories.tsx index cd54f010446..85698b4145a 100644 --- a/packages/core/stories/button/button.stories.tsx +++ b/packages/core/stories/button/button.stories.tsx @@ -1,10 +1,4 @@ -import { - Button, - type ButtonProps, - FlexLayout, - FlowLayout, - StackLayout, -} from "@salt-ds/core"; +import { Button, FlexLayout, FlowLayout, StackLayout } from "@salt-ds/core"; import { DownloadIcon, SearchIcon, diff --git a/packages/core/stories/card/card.qa.stories.tsx b/packages/core/stories/card/card.qa.stories.tsx index dc206db7799..bec626f00e1 100644 --- a/packages/core/stories/card/card.qa.stories.tsx +++ b/packages/core/stories/card/card.qa.stories.tsx @@ -1,4 +1,4 @@ -import { Card, H1, InteractableCard, Text } from "@salt-ds/core"; +import { Card, H1, Text } from "@salt-ds/core"; import type { Meta, StoryFn } from "@storybook/react"; import { QAContainer, diff --git a/packages/core/stories/floating-platform/NewWindow.tsx b/packages/core/stories/floating-platform/NewWindow.tsx index 0b2e2c633d3..6e90312c74c 100644 --- a/packages/core/stories/floating-platform/NewWindow.tsx +++ b/packages/core/stories/floating-platform/NewWindow.tsx @@ -4,9 +4,7 @@ import { WindowProvider, useWindow } from "@salt-ds/window"; import { type ComponentPropsWithoutRef, type ForwardedRef, - createContext, forwardRef, - useContext, useMemo, useState, } from "react"; diff --git a/packages/core/stories/form-field/form-field.qa.stories.tsx b/packages/core/stories/form-field/form-field.qa.stories.tsx index cc7118ab420..9ebe81743c2 100644 --- a/packages/core/stories/form-field/form-field.qa.stories.tsx +++ b/packages/core/stories/form-field/form-field.qa.stories.tsx @@ -1,9 +1,4 @@ -import { - FormField, - FormFieldHelperText, - FormFieldLabel, - Input, -} from "@salt-ds/core"; +import { FormField, FormFieldHelperText, FormFieldLabel } from "@salt-ds/core"; import type { Meta, StoryFn } from "@storybook/react"; import { QAContainer, diff --git a/packages/core/stories/navigation-item/navigation-item.stories.tsx b/packages/core/stories/navigation-item/navigation-item.stories.tsx index ac266031ae2..a127745e971 100644 --- a/packages/core/stories/navigation-item/navigation-item.stories.tsx +++ b/packages/core/stories/navigation-item/navigation-item.stories.tsx @@ -8,7 +8,7 @@ import { } from "@salt-ds/core"; import { NotificationIcon } from "@salt-ds/icons"; import type { Meta, StoryFn } from "@storybook/react"; -import React, { useState } from "react"; +import { useState } from "react"; import "./navigation-item.stories.css"; diff --git a/packages/core/stories/patterns/forms/forms.stories.tsx b/packages/core/stories/patterns/forms/forms.stories.tsx index 1eafd2fcb28..89823e686e7 100644 --- a/packages/core/stories/patterns/forms/forms.stories.tsx +++ b/packages/core/stories/patterns/forms/forms.stories.tsx @@ -1,43 +1,21 @@ import { - BorderItem, - BorderLayout, - Button, - Drawer, Dropdown, - FlexItem, - FlexLayout, FormField, FormFieldHelperText, FormFieldLabel, GridItem, GridLayout, - H1, - H2, Input, Label, MultilineInput, - NavigationItem, Option, RadioButton, RadioButtonGroup, StackLayout, Text, } from "@salt-ds/core"; -import { - CloseIcon, - GithubIcon, - MenuIcon, - StackoverflowIcon, - SymphonyIcon, -} from "@salt-ds/icons"; import type { Meta } from "@storybook/react"; -import { - type ChangeEvent, - FC, - HTMLAttributes, - ReactNode, - useState, -} from "react"; +import { type ChangeEvent, useState } from "react"; export default { title: "Patterns/Forms", diff --git a/packages/core/stories/patterns/navigation/navigation.stories.tsx b/packages/core/stories/patterns/navigation/navigation.stories.tsx index adc7c2facf4..07f02d235cc 100644 --- a/packages/core/stories/patterns/navigation/navigation.stories.tsx +++ b/packages/core/stories/patterns/navigation/navigation.stories.tsx @@ -7,17 +7,7 @@ import { NavigationItem, StackLayout, } from "@salt-ds/core"; -import { - GithubIcon, - LineChartIcon, - NotificationIcon, - PinIcon, - ReceiptIcon, - SearchIcon, - StackoverflowIcon, - SymphonyIcon, - UserIcon, -} from "@salt-ds/icons"; +import { GithubIcon, StackoverflowIcon, SymphonyIcon } from "@salt-ds/icons"; import type { Meta } from "@storybook/react"; import { useEffect, useState } from "react"; import logo from "../../assets/logo.svg"; diff --git a/packages/countries/stories/LazyCountrySymbol.qa.stories.tsx b/packages/countries/stories/LazyCountrySymbol.qa.stories.tsx index 52a3307618e..610623144a4 100644 --- a/packages/countries/stories/LazyCountrySymbol.qa.stories.tsx +++ b/packages/countries/stories/LazyCountrySymbol.qa.stories.tsx @@ -1,7 +1,6 @@ import { LazyCountrySymbol, countryMetaMap } from "@salt-ds/countries"; import type { CountryCode } from "@salt-ds/countries"; import type { Meta, StoryFn } from "@storybook/react"; -import { QAContainer } from "docs/components"; import { Suspense } from "react"; export default { diff --git a/packages/data-grid/src/Grid.tsx b/packages/data-grid/src/Grid.tsx index 56e9fb35f19..3d143916b86 100644 --- a/packages/data-grid/src/Grid.tsx +++ b/packages/data-grid/src/Grid.tsx @@ -2,7 +2,6 @@ import { makePrefixer } from "@salt-ds/core"; import { useComponentCssInjection } from "@salt-ds/styles"; import { useWindow } from "@salt-ds/window"; import { clsx } from "clsx"; -import type React from "react"; import { type CSSProperties, type KeyboardEvent, diff --git a/packages/data-grid/src/__tests__/__e2e__/Grid.cy.tsx b/packages/data-grid/src/__tests__/__e2e__/Grid.cy.tsx index 846fd08f104..dfa74095eaa 100644 --- a/packages/data-grid/src/__tests__/__e2e__/Grid.cy.tsx +++ b/packages/data-grid/src/__tests__/__e2e__/Grid.cy.tsx @@ -1,5 +1,3 @@ -import { ColumnGroup, Grid, GridColumn, SortOrder } from "@salt-ds/data-grid"; -import { Investor, db } from "@stories/dummyData"; import * as cellCustomizationStories from "@stories/grid-cellCustomization.stories"; import * as cellValidationStories from "@stories/grid-cellValidation.stories"; import * as columnGroupsStories from "@stories/grid-columnGroups.stories"; diff --git a/packages/data-grid/stories/grid-columnGroups.stories.tsx b/packages/data-grid/stories/grid-columnGroups.stories.tsx index fb9b52053cc..2567ff56e85 100644 --- a/packages/data-grid/stories/grid-columnGroups.stories.tsx +++ b/packages/data-grid/stories/grid-columnGroups.stories.tsx @@ -1,5 +1,5 @@ -import { ColumnGroup, Grid, GridColumn, GridProps } from "../src"; -import { DummyRow, dummyRowKeyGetter, rowData } from "./dummyData"; +import { ColumnGroup, Grid, GridColumn } from "../src"; +import { dummyRowKeyGetter, rowData } from "./dummyData"; import "./grid.stories.css"; import type { StoryFn } from "@storybook/react"; diff --git a/packages/data-grid/stories/grid-headerCustomization.stories.tsx b/packages/data-grid/stories/grid-headerCustomization.stories.tsx index 7f0a2524699..ddc83f4b0f7 100644 --- a/packages/data-grid/stories/grid-headerCustomization.stories.tsx +++ b/packages/data-grid/stories/grid-headerCustomization.stories.tsx @@ -4,7 +4,7 @@ import { ToggleButton, ToggleButtonGroup, } from "@salt-ds/core"; -import { ArrowDownIcon, ArrowUpIcon, HomeIcon, MenuIcon } from "@salt-ds/icons"; +import { ArrowDownIcon, ArrowUpIcon, MenuIcon } from "@salt-ds/icons"; import { MenuButton } from "@salt-ds/lab"; import { type SyntheticEvent, diff --git a/packages/data-grid/stories/grid-rowSelectionControlled.stories.tsx b/packages/data-grid/stories/grid-rowSelectionControlled.stories.tsx index 98db1adfa60..0a215648220 100644 --- a/packages/data-grid/stories/grid-rowSelectionControlled.stories.tsx +++ b/packages/data-grid/stories/grid-rowSelectionControlled.stories.tsx @@ -1,12 +1,7 @@ import { FlexLayout } from "@salt-ds/core"; import { useState } from "react"; -import { - Grid, - GridColumn, - GridProps, - RowSelectionCheckboxColumn, -} from "../src"; -import { DummyRow, dummyRowKeyGetter, rowData } from "./dummyData"; +import { Grid, GridColumn, RowSelectionCheckboxColumn } from "../src"; +import { dummyRowKeyGetter, rowData } from "./dummyData"; import "./grid.stories.css"; import type { StoryFn } from "@storybook/react"; diff --git a/packages/lab/src/__tests__/__e2e__/calendar/Calendar.single.cy.tsx b/packages/lab/src/__tests__/__e2e__/calendar/Calendar.single.cy.tsx index 42ed2a68049..09fbba33711 100644 --- a/packages/lab/src/__tests__/__e2e__/calendar/Calendar.single.cy.tsx +++ b/packages/lab/src/__tests__/__e2e__/calendar/Calendar.single.cy.tsx @@ -6,7 +6,7 @@ import { startOfMonth, today, } from "@internationalized/date"; -import { type CalendarProps, formatDate, getCurrentLocale } from "@salt-ds/lab"; +import { type CalendarProps, formatDate } from "@salt-ds/lab"; import * as calendarStories from "@stories/calendar/calendar.stories"; import { composeStories } from "@storybook/react"; diff --git a/packages/lab/src/__tests__/__e2e__/date-picker/DatePicker.range.cy.tsx b/packages/lab/src/__tests__/__e2e__/date-picker/DatePicker.range.cy.tsx index 5ed79cef81b..657296ba67f 100644 --- a/packages/lab/src/__tests__/__e2e__/date-picker/DatePicker.range.cy.tsx +++ b/packages/lab/src/__tests__/__e2e__/date-picker/DatePicker.range.cy.tsx @@ -7,7 +7,6 @@ import { } from "@internationalized/date"; import * as datePickerStories from "@stories/date-picker/date-picker.stories"; import { composeStories } from "@storybook/react"; -import React from "react"; import { formatDate } from "../../../calendar"; import { parseZonedDateTime } from "../../../date-input"; import { diff --git a/packages/lab/src/__tests__/__e2e__/date-picker/DatePicker.single.cy.tsx b/packages/lab/src/__tests__/__e2e__/date-picker/DatePicker.single.cy.tsx index a9dbb14b822..19089a3c9de 100644 --- a/packages/lab/src/__tests__/__e2e__/date-picker/DatePicker.single.cy.tsx +++ b/packages/lab/src/__tests__/__e2e__/date-picker/DatePicker.single.cy.tsx @@ -7,7 +7,6 @@ import { } from "@internationalized/date"; import * as datePickerStories from "@stories/date-picker/date-picker.stories"; import { composeStories } from "@storybook/react"; -import React from "react"; import { formatDate } from "../../../calendar"; import { parseZonedDateTime } from "../../../date-input"; import { diff --git a/packages/lab/src/__tests__/__e2e__/list/List.declarative.cy.tsx b/packages/lab/src/__tests__/__e2e__/list/List.declarative.cy.tsx index 8b484ad9a34..e0f961ae984 100644 --- a/packages/lab/src/__tests__/__e2e__/list/List.declarative.cy.tsx +++ b/packages/lab/src/__tests__/__e2e__/list/List.declarative.cy.tsx @@ -1,4 +1,4 @@ -import { List, ListItem, ListItemProps } from "@salt-ds/lab"; +import { List, ListItem } from "@salt-ds/lab"; import { version } from "react"; describe("A declarative list", () => { diff --git a/packages/lab/src/contact-details/internal/StarIcon.tsx b/packages/lab/src/contact-details/internal/StarIcon.tsx index 81fcf504c5c..d52e5c649fa 100644 --- a/packages/lab/src/contact-details/internal/StarIcon.tsx +++ b/packages/lab/src/contact-details/internal/StarIcon.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef } from "react"; +import { forwardRef } from "react"; const filledPath = "M6,0,4.21,4.05,0,4.58l3.11,3L2.29,12,6,9.5,9.71,12,8.89,7.62l3.11-3L7.79,4.05,6,0Z"; diff --git a/packages/lab/src/contact-details/internal/StarIconContainer.tsx b/packages/lab/src/contact-details/internal/StarIconContainer.tsx index 4c5ca461bd2..1fc52836805 100644 --- a/packages/lab/src/contact-details/internal/StarIconContainer.tsx +++ b/packages/lab/src/contact-details/internal/StarIconContainer.tsx @@ -1,6 +1,6 @@ import { makePrefixer } from "@salt-ds/core"; import { clsx } from "clsx"; -import React, { forwardRef, type HTMLAttributes } from "react"; +import { type HTMLAttributes, forwardRef } from "react"; import { StarIcon } from "./StarIcon"; const withBaseName = makePrefixer("saltContactFavoriteToggle"); diff --git a/packages/lab/src/date-picker/DatePickerActions.tsx b/packages/lab/src/date-picker/DatePickerActions.tsx index c0e98927df4..e6873a5ccbf 100644 --- a/packages/lab/src/date-picker/DatePickerActions.tsx +++ b/packages/lab/src/date-picker/DatePickerActions.tsx @@ -1,12 +1,12 @@ import { Button, type ButtonProps, makePrefixer } from "@salt-ds/core"; import { clsx } from "clsx"; -import React, { +import { type ComponentPropsWithoutRef, - forwardRef, - useEffect, - type SyntheticEvent, type MouseEventHandler, type Ref, + type SyntheticEvent, + forwardRef, + useEffect, } from "react"; import type { DateRangeSelection, SingleDateSelection } from "../calendar"; import { diff --git a/packages/lab/src/editable-label/EditableLabel.tsx b/packages/lab/src/editable-label/EditableLabel.tsx index 76a5adba893..352af3f5c79 100644 --- a/packages/lab/src/editable-label/EditableLabel.tsx +++ b/packages/lab/src/editable-label/EditableLabel.tsx @@ -1,11 +1,11 @@ import { useControlled, useIsomorphicLayoutEffect } from "@salt-ds/core"; import { clsx } from "clsx"; -import React, { +import { type ChangeEvent, type ForwardedRef, - forwardRef, type KeyboardEvent, type ReactElement, + forwardRef, useCallback, useRef, } from "react"; diff --git a/packages/lab/src/list-deprecated/internal/DescendantContext.jsx b/packages/lab/src/list-deprecated/internal/DescendantContext.jsx index 5656cd0c462..2582fed6fd3 100644 --- a/packages/lab/src/list-deprecated/internal/DescendantContext.jsx +++ b/packages/lab/src/list-deprecated/internal/DescendantContext.jsx @@ -1,5 +1,5 @@ import { useIsomorphicLayoutEffect } from "@salt-ds/core"; -import React, { createContext, useContext, useState, useRef } from "react"; +import { createContext, useContext, useRef, useState } from "react"; // ////////////////////////////////////////////////////////////////////////////// // SUPER HACKS AHEAD: The React team will hate this enough to hopefully give us diff --git a/packages/lab/src/list-deprecated/internal/Highlighter.jsx b/packages/lab/src/list-deprecated/internal/Highlighter.jsx index f0adebd626c..40f14d9fc85 100644 --- a/packages/lab/src/list-deprecated/internal/Highlighter.jsx +++ b/packages/lab/src/list-deprecated/internal/Highlighter.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { escapeRegExp } from "../../utils"; import { useComponentCssInjection } from "@salt-ds/styles"; diff --git a/packages/lab/src/responsive/overflowUtils.tsx b/packages/lab/src/responsive/overflowUtils.tsx index 27021dba116..b472dfd9eff 100644 --- a/packages/lab/src/responsive/overflowUtils.tsx +++ b/packages/lab/src/responsive/overflowUtils.tsx @@ -1,8 +1,7 @@ -import { - type ElementRef, - type OverflowItem, - collapsibleType, - type orientationType, +import type { + ElementRef, + OverflowItem, + orientationType, } from "./overflowTypes"; export const DropdownPlaceholder = () => null; diff --git a/packages/lab/src/static-list/StaticListItemContent.tsx b/packages/lab/src/static-list/StaticListItemContent.tsx index 02c462bd02a..dc20cbdfccb 100644 --- a/packages/lab/src/static-list/StaticListItemContent.tsx +++ b/packages/lab/src/static-list/StaticListItemContent.tsx @@ -4,7 +4,6 @@ import { useWindow } from "@salt-ds/window"; import { clsx } from "clsx"; import { type ComponentPropsWithoutRef, - type ForwardedRef, type ReactNode, forwardRef, } from "react"; diff --git a/packages/lab/src/stepper-input/StepperInput.tsx b/packages/lab/src/stepper-input/StepperInput.tsx index 17c11dbc4e9..3ecaa6ddab5 100644 --- a/packages/lab/src/stepper-input/StepperInput.tsx +++ b/packages/lab/src/stepper-input/StepperInput.tsx @@ -9,7 +9,6 @@ import { useFormFieldProps, useIcon, } from "@salt-ds/core"; -import { TriangleDownIcon, TriangleUpIcon } from "@salt-ds/icons"; import { useComponentCssInjection } from "@salt-ds/styles"; import { useWindow } from "@salt-ds/window"; import { clsx } from "clsx"; diff --git a/packages/lab/src/tabs/TabActivationIndicator.tsx b/packages/lab/src/tabs/TabActivationIndicator.tsx index 36614d1dfa1..cd949e5e8f5 100644 --- a/packages/lab/src/tabs/TabActivationIndicator.tsx +++ b/packages/lab/src/tabs/TabActivationIndicator.tsx @@ -1,5 +1,5 @@ import { makePrefixer } from "@salt-ds/core"; -import React, { useRef } from "react"; +import { useRef } from "react"; import { useActivationIndicator } from "./useActivationIndicator"; diff --git a/packages/lab/src/toolbar/internal/renderTrayTools.tsx b/packages/lab/src/toolbar/internal/renderTrayTools.tsx index 59536245af1..78f338117d9 100644 --- a/packages/lab/src/toolbar/internal/renderTrayTools.tsx +++ b/packages/lab/src/toolbar/internal/renderTrayTools.tsx @@ -1,4 +1,4 @@ -import React, { cloneElement, type ReactNode } from "react"; +import { type ReactNode, cloneElement } from "react"; import type { OverflowCollectionHookResult, OverflowItem, diff --git a/packages/lab/stories/calendar/calendar.stories.tsx b/packages/lab/stories/calendar/calendar.stories.tsx index 3a828fd84cc..97c56fc2044 100644 --- a/packages/lab/stories/calendar/calendar.stories.tsx +++ b/packages/lab/stories/calendar/calendar.stories.tsx @@ -7,7 +7,6 @@ import { getLocalTimeZone, isEqualDay, startOfMonth, - startOfYear, today, } from "@internationalized/date"; import { Button, Divider, StackLayout } from "@salt-ds/core"; diff --git a/packages/lab/stories/date-picker/CustomDatePickerPanel.tsx b/packages/lab/stories/date-picker/CustomDatePickerPanel.tsx index 5671d12652c..a40748b2073 100644 --- a/packages/lab/stories/date-picker/CustomDatePickerPanel.tsx +++ b/packages/lab/stories/date-picker/CustomDatePickerPanel.tsx @@ -17,7 +17,7 @@ import { type SingleDatePickerState, useDatePickerContext, } from "@salt-ds/lab"; -import React, { forwardRef } from "react"; +import { forwardRef } from "react"; const tenorOptions = [ { tenor: "5", label: "5 years" }, diff --git a/packages/lab/stories/date-picker/date-picker.qa.stories.tsx b/packages/lab/stories/date-picker/date-picker.qa.stories.tsx index 1f0c128cb01..a20e4b05bae 100644 --- a/packages/lab/stories/date-picker/date-picker.qa.stories.tsx +++ b/packages/lab/stories/date-picker/date-picker.qa.stories.tsx @@ -6,11 +6,9 @@ import { DatePickerRangePanel, DatePickerSingleInput, DatePickerSinglePanel, - getCurrentLocale, } from "@salt-ds/lab"; import type { StoryFn } from "@storybook/react"; import { QAContainer, type QAContainerProps } from "docs/components"; -import React from "react"; const testLocale = "en-GB"; diff --git a/packages/lab/stories/static-list/static-list.qa.stories.tsx b/packages/lab/stories/static-list/static-list.qa.stories.tsx index bb74e179f7a..298b63ee6d0 100644 --- a/packages/lab/stories/static-list/static-list.qa.stories.tsx +++ b/packages/lab/stories/static-list/static-list.qa.stories.tsx @@ -8,7 +8,7 @@ import { import type { Meta, StoryFn } from "@storybook/react"; import { clsx } from "clsx"; import { QAContainer, type QAContainerProps } from "docs/components"; -import React, { Fragment } from "react"; +import { Fragment } from "react"; import { complexEventsData, eventsData } from "../assets/exampleData"; export default { diff --git a/packages/lab/stories/static-list/static-list.stories.tsx b/packages/lab/stories/static-list/static-list.stories.tsx index b22c9011bd7..9205e478618 100644 --- a/packages/lab/stories/static-list/static-list.stories.tsx +++ b/packages/lab/stories/static-list/static-list.stories.tsx @@ -8,7 +8,7 @@ import { } from "@salt-ds/lab"; import type { Meta, StoryFn } from "@storybook/react"; import { clsx } from "clsx"; -import React, { Fragment, useState } from "react"; +import { Fragment, useState } from "react"; import { complexEventsData, eventsData } from "../assets/exampleData"; export default { diff --git a/packages/lab/stories/tree/tree.stories.jsx b/packages/lab/stories/tree/tree.stories.jsx index c96f30cd85c..cb45698d197 100644 --- a/packages/lab/stories/tree/tree.stories.jsx +++ b/packages/lab/stories/tree/tree.stories.jsx @@ -1,5 +1,4 @@ import { Tree } from "@salt-ds/lab"; -import React from "react"; import { groupByInitialLetter, usa_states_cities } from "../list/list.data"; import { folderData } from "./tree.data"; diff --git a/packages/styles/src/__tests__/__e2e__/TestComponent.tsx b/packages/styles/src/__tests__/__e2e__/TestComponent.tsx index dedd7c20d3d..7ad2240c0c7 100644 --- a/packages/styles/src/__tests__/__e2e__/TestComponent.tsx +++ b/packages/styles/src/__tests__/__e2e__/TestComponent.tsx @@ -1,4 +1,4 @@ -import React, { type ComponentPropsWithoutRef } from "react"; +import type { ComponentPropsWithoutRef } from "react"; import { useComponentCssInjection } from "@salt-ds/styles"; import { useWindow } from "@salt-ds/window"; diff --git a/packages/styles/src/style-injection-provider/index.tsx b/packages/styles/src/style-injection-provider/index.tsx index 17b7a33f803..3414a8661b5 100644 --- a/packages/styles/src/style-injection-provider/index.tsx +++ b/packages/styles/src/style-injection-provider/index.tsx @@ -1,4 +1,4 @@ -import React, { type ReactNode, createContext, useContext } from "react"; +import { type ReactNode, createContext, useContext } from "react"; export interface StyleInjectionContextType { value?: boolean; } diff --git a/site/src/components/app-header/AppHeader.tsx b/site/src/components/app-header/AppHeader.tsx index a008c8f9c84..1aff713d98d 100644 --- a/site/src/components/app-header/AppHeader.tsx +++ b/site/src/components/app-header/AppHeader.tsx @@ -12,7 +12,7 @@ import { import { GithubIcon, HelpIcon } from "@salt-ds/icons"; import { Logo, LogoImage } from "@salt-ds/lab"; import { useRouter } from "next/navigation"; -import React, { type FC } from "react"; +import type { FC } from "react"; import styles from "./AppHeader.module.css"; import { Search } from "./Search"; diff --git a/site/src/components/example-container/ExampleContainer.tsx b/site/src/components/example-container/ExampleContainer.tsx index 56ff695e440..55cdd86a2d4 100644 --- a/site/src/components/example-container/ExampleContainer.tsx +++ b/site/src/components/example-container/ExampleContainer.tsx @@ -1,6 +1,6 @@ import { CloseIcon, type IconProps, SuccessTickIcon } from "@salt-ds/icons"; import clsx from "clsx"; -import { ElementType, type FC, type ReactNode } from "react"; +import type { FC, ReactNode } from "react"; import styles from "./ExampleContainer.module.css"; export interface ExampleContainerProps { diff --git a/site/src/components/footer/Footer.tsx b/site/src/components/footer/Footer.tsx index 17b1bff3652..7ff5b3ce072 100644 --- a/site/src/components/footer/Footer.tsx +++ b/site/src/components/footer/Footer.tsx @@ -3,7 +3,7 @@ import { type FooterProps as MosaicFooterProps, } from "@jpmorganchase/mosaic-site-components"; import clsx from "clsx"; -import React, { type FC } from "react"; +import type { FC } from "react"; import styles from "./Footer.module.css"; type FooterLinkItem = { diff --git a/site/src/components/footer/withFooterAdapter.tsx b/site/src/components/footer/withFooterAdapter.tsx index 8d039fbd7df..0184daf4ad5 100644 --- a/site/src/components/footer/withFooterAdapter.tsx +++ b/site/src/components/footer/withFooterAdapter.tsx @@ -1,5 +1,5 @@ import { useFooter } from "@jpmorganchase/mosaic-store"; -import React, { type FC } from "react"; +import type { FC } from "react"; import type { FooterProps } from "./Footer"; export const withFooterAdapter = (Component: FC) => () => { diff --git a/site/src/components/mdx/anchorHeading/AnchorHeading.tsx b/site/src/components/mdx/anchorHeading/AnchorHeading.tsx index 66dd66b1428..06177dd612e 100644 --- a/site/src/components/mdx/anchorHeading/AnchorHeading.tsx +++ b/site/src/components/mdx/anchorHeading/AnchorHeading.tsx @@ -1,6 +1,5 @@ import { Link, type LinkProps } from "@jpmorganchase/mosaic-components"; import clsx from "clsx"; -import type React from "react"; import { type ElementType, type FC, diff --git a/site/src/components/status-pill/StatusPill.tsx b/site/src/components/status-pill/StatusPill.tsx index 8fd5d2e1aeb..cc6d6819373 100644 --- a/site/src/components/status-pill/StatusPill.tsx +++ b/site/src/components/status-pill/StatusPill.tsx @@ -1,5 +1,4 @@ import clsx from "clsx"; -import { ReactNode } from "react"; import styles from "./StatusPill.module.css"; interface StatusPillProps { diff --git a/site/src/examples/accordion/AdditionalLabels.tsx b/site/src/examples/accordion/AdditionalLabels.tsx index 5dfb343fcb2..d890c0d9a69 100644 --- a/site/src/examples/accordion/AdditionalLabels.tsx +++ b/site/src/examples/accordion/AdditionalLabels.tsx @@ -7,7 +7,6 @@ import { CheckboxGroup, FormField, FormFieldLabel, - Label, SplitLayout, StackLayout, Text, diff --git a/site/src/examples/border-layout/CustomRegionSize.tsx b/site/src/examples/border-layout/CustomRegionSize.tsx index 3427daf7acf..dc1ab91d6d7 100644 --- a/site/src/examples/border-layout/CustomRegionSize.tsx +++ b/site/src/examples/border-layout/CustomRegionSize.tsx @@ -1,5 +1,4 @@ import { BorderItem, BorderLayout } from "@salt-ds/core"; -import clsx from "clsx"; import type { ReactElement } from "react"; import styles from "./index.module.css"; diff --git a/site/src/examples/border-layout/GapBetweenRegions.tsx b/site/src/examples/border-layout/GapBetweenRegions.tsx index 55473a1b671..079af8c816e 100644 --- a/site/src/examples/border-layout/GapBetweenRegions.tsx +++ b/site/src/examples/border-layout/GapBetweenRegions.tsx @@ -1,5 +1,4 @@ import { BorderItem, BorderLayout } from "@salt-ds/core"; -import clsx from "clsx"; import type { ReactElement } from "react"; import styles from "./index.module.css"; diff --git a/site/src/examples/border-layout/HideRegions.tsx b/site/src/examples/border-layout/HideRegions.tsx index 1fd21a0c4db..eab5fcc9b7f 100644 --- a/site/src/examples/border-layout/HideRegions.tsx +++ b/site/src/examples/border-layout/HideRegions.tsx @@ -1,5 +1,4 @@ import { BorderItem, BorderLayout } from "@salt-ds/core"; -import clsx from "clsx"; import type { ReactElement } from "react"; import hideRegionsStyles from "./HideRegions.module.css"; import styles from "./index.module.css"; diff --git a/site/src/examples/button/Disabled.tsx b/site/src/examples/button/Disabled.tsx index fe9fa6fedbf..7295b25a2c1 100644 --- a/site/src/examples/button/Disabled.tsx +++ b/site/src/examples/button/Disabled.tsx @@ -1,5 +1,4 @@ import { Button, FlowLayout, StackLayout } from "@salt-ds/core"; -import { SendIcon } from "@salt-ds/icons"; import type { ReactElement } from "react"; export const Disabled = (): ReactElement => ( diff --git a/site/src/examples/button/FocusableWhenDisabled.tsx b/site/src/examples/button/FocusableWhenDisabled.tsx index 7645112ead1..47d12cf513e 100644 --- a/site/src/examples/button/FocusableWhenDisabled.tsx +++ b/site/src/examples/button/FocusableWhenDisabled.tsx @@ -1,4 +1,4 @@ -import { Button, FlowLayout, StackLayout } from "@salt-ds/core"; +import { Button } from "@salt-ds/core"; import type { ReactElement } from "react"; export const FocusableWhenDisabled = (): ReactElement => ( diff --git a/site/src/examples/button/IconAndText.tsx b/site/src/examples/button/IconAndText.tsx index a01c9b6efad..ebfc8fd8506 100644 --- a/site/src/examples/button/IconAndText.tsx +++ b/site/src/examples/button/IconAndText.tsx @@ -2,7 +2,6 @@ import { Button, FlowLayout, StackLayout } from "@salt-ds/core"; import { ChevronRightIcon, ExpandAllIcon, - ExportIcon, PrintIcon, SendIcon, ShareIcon, diff --git a/site/src/examples/button/IconOnly.tsx b/site/src/examples/button/IconOnly.tsx index 7a25b0b4a55..4bf77bf94c9 100644 --- a/site/src/examples/button/IconOnly.tsx +++ b/site/src/examples/button/IconOnly.tsx @@ -1,4 +1,4 @@ -import { Button, FlowLayout, StackLayout, Tooltip } from "@salt-ds/core"; +import { Button, FlowLayout, Tooltip } from "@salt-ds/core"; import { PrintIcon, SearchIcon, ShareIcon } from "@salt-ds/icons"; import type { ReactElement } from "react"; diff --git a/site/src/examples/button/Sentiment.tsx b/site/src/examples/button/Sentiment.tsx index 522904e8778..f7f76855706 100644 --- a/site/src/examples/button/Sentiment.tsx +++ b/site/src/examples/button/Sentiment.tsx @@ -1,4 +1,4 @@ -import { Button, FlowLayout, GridItem, GridLayout, Label } from "@salt-ds/core"; +import { Button, GridItem, GridLayout, Label } from "@salt-ds/core"; import type { ReactElement } from "react"; export const Sentiment = (): ReactElement => ( diff --git a/site/src/examples/calendar/Multiselect.tsx b/site/src/examples/calendar/Multiselect.tsx index 2876f09b4ee..a5e4409f1c8 100644 --- a/site/src/examples/calendar/Multiselect.tsx +++ b/site/src/examples/calendar/Multiselect.tsx @@ -1,4 +1,4 @@ -import { CalendarDate, getLocalTimeZone, today } from "@internationalized/date"; +import { CalendarDate } from "@internationalized/date"; import { Calendar, CalendarDateGrid, diff --git a/site/src/examples/calendar/TodayButton.tsx b/site/src/examples/calendar/TodayButton.tsx index 32973cf944e..68f71928605 100644 --- a/site/src/examples/calendar/TodayButton.tsx +++ b/site/src/examples/calendar/TodayButton.tsx @@ -7,7 +7,7 @@ import { CalendarWeekHeader, type UseCalendarSelectionSingleProps, } from "@salt-ds/lab"; -import React, { type ReactElement, useState } from "react"; +import { type ReactElement, useState } from "react"; export const TodayButton = (): ReactElement => { const [selectedDate, setSelectedDate] = useState< diff --git a/site/src/examples/card/Accents.tsx b/site/src/examples/card/Accents.tsx index 5eff334d538..328d21a8889 100644 --- a/site/src/examples/card/Accents.tsx +++ b/site/src/examples/card/Accents.tsx @@ -2,7 +2,6 @@ import { Card, type CardProps, H3, - Link, RadioButton, RadioButtonGroup, StackLayout, diff --git a/site/src/examples/date-picker/RangeBordered.tsx b/site/src/examples/date-picker/RangeBordered.tsx index dceab327b63..3833391e101 100644 --- a/site/src/examples/date-picker/RangeBordered.tsx +++ b/site/src/examples/date-picker/RangeBordered.tsx @@ -7,7 +7,7 @@ import { formatDate, getCurrentLocale, } from "@salt-ds/lab"; -import React, { type ReactElement, useCallback } from "react"; +import { type ReactElement, useCallback } from "react"; function formatDateRange( dateRange: DateRangeSelection | null, diff --git a/site/src/examples/date-picker/RangeWithConfirmation.tsx b/site/src/examples/date-picker/RangeWithConfirmation.tsx index 74d005b55a0..70561e74416 100644 --- a/site/src/examples/date-picker/RangeWithConfirmation.tsx +++ b/site/src/examples/date-picker/RangeWithConfirmation.tsx @@ -17,7 +17,7 @@ import { formatDate, getCurrentLocale, } from "@salt-ds/lab"; -import React, { type ReactElement, useCallback, useRef, useState } from "react"; +import { type ReactElement, useCallback, useRef, useState } from "react"; function formatDateRange( dateRange: DateRangeSelection | null, diff --git a/site/src/examples/date-picker/RangeWithCustomPanel.tsx b/site/src/examples/date-picker/RangeWithCustomPanel.tsx index 28ed2b9f941..6987900e669 100644 --- a/site/src/examples/date-picker/RangeWithCustomPanel.tsx +++ b/site/src/examples/date-picker/RangeWithCustomPanel.tsx @@ -13,7 +13,7 @@ import { getCurrentLocale, } from "@salt-ds/lab"; import { CustomDatePickerPanel } from "@salt-ds/lab/stories/date-picker/CustomDatePickerPanel"; -import React, { type ReactElement, useCallback } from "react"; +import { type ReactElement, useCallback } from "react"; function formatDateRange( dateRange: DateRangeSelection | null, diff --git a/site/src/examples/date-picker/RangeWithLocaleEsES.tsx b/site/src/examples/date-picker/RangeWithLocaleEsES.tsx index e6bce55679a..5eede14c4a6 100644 --- a/site/src/examples/date-picker/RangeWithLocaleEsES.tsx +++ b/site/src/examples/date-picker/RangeWithLocaleEsES.tsx @@ -4,7 +4,6 @@ import { FormFieldLabel as FormLabel, } from "@salt-ds/core"; import { - type DateInputRangeParserResult, DatePicker, DatePickerOverlay, DatePickerRangeInput, @@ -13,7 +12,7 @@ import { formatDate, getCurrentLocale, } from "@salt-ds/lab"; -import React, { type ReactElement, useCallback, useState } from "react"; +import { type ReactElement, useCallback, useState } from "react"; function formatDateRange( dateRange: DateRangeSelection | null, diff --git a/site/src/examples/date-picker/RangeWithMinMaxDate.tsx b/site/src/examples/date-picker/RangeWithMinMaxDate.tsx index c63dd19718c..12e643a6816 100644 --- a/site/src/examples/date-picker/RangeWithMinMaxDate.tsx +++ b/site/src/examples/date-picker/RangeWithMinMaxDate.tsx @@ -13,7 +13,7 @@ import { formatDate, getCurrentLocale, } from "@salt-ds/lab"; -import { type ReactElement, useCallback, useState } from "react"; +import { type ReactElement, useCallback } from "react"; function formatDateRange( dateRange: DateRangeSelection | null, diff --git a/site/src/examples/date-picker/SingleBordered.tsx b/site/src/examples/date-picker/SingleBordered.tsx index 947673bf0a7..72fd1a81e65 100644 --- a/site/src/examples/date-picker/SingleBordered.tsx +++ b/site/src/examples/date-picker/SingleBordered.tsx @@ -8,7 +8,7 @@ import { formatDate, getCurrentLocale, } from "@salt-ds/lab"; -import React, { type ReactElement, useCallback } from "react"; +import { type ReactElement, useCallback } from "react"; function formatSingleDate( date: DateValue | null, diff --git a/site/src/examples/date-picker/SingleWithConfirmation.tsx b/site/src/examples/date-picker/SingleWithConfirmation.tsx index 06e13082318..20f39fd6ae1 100644 --- a/site/src/examples/date-picker/SingleWithConfirmation.tsx +++ b/site/src/examples/date-picker/SingleWithConfirmation.tsx @@ -17,7 +17,7 @@ import { formatDate, getCurrentLocale, } from "@salt-ds/lab"; -import React, { type ReactElement, useCallback, useRef, useState } from "react"; +import { type ReactElement, useCallback, useRef, useState } from "react"; function formatSingleDate( date: DateValue | null, diff --git a/site/src/examples/date-picker/SingleWithCustomPanel.tsx b/site/src/examples/date-picker/SingleWithCustomPanel.tsx index 2dd445e8623..8b11ca43557 100644 --- a/site/src/examples/date-picker/SingleWithCustomPanel.tsx +++ b/site/src/examples/date-picker/SingleWithCustomPanel.tsx @@ -17,7 +17,7 @@ import { getCurrentLocale, } from "@salt-ds/lab"; import { CustomDatePickerPanel } from "@salt-ds/lab/stories/date-picker/CustomDatePickerPanel"; -import React, { type ReactElement, useCallback } from "react"; +import { type ReactElement, useCallback } from "react"; function formatSingleDate( date: DateValue | null, diff --git a/site/src/examples/date-picker/SingleWithLocaleEnUS.tsx b/site/src/examples/date-picker/SingleWithLocaleEnUS.tsx index 151aa204e58..e89dd85d306 100644 --- a/site/src/examples/date-picker/SingleWithLocaleEnUS.tsx +++ b/site/src/examples/date-picker/SingleWithLocaleEnUS.tsx @@ -9,9 +9,8 @@ import { DatePickerSingleInput, DatePickerSinglePanel, type SingleDateSelection, - formatDate, } from "@salt-ds/lab"; -import React, { type ReactElement, useCallback, useState } from "react"; +import { type ReactElement, useCallback, useState } from "react"; export const SingleWithLocaleEnUS = (): ReactElement => { const locale = "en-US"; diff --git a/site/src/examples/date-picker/SingleWithLocaleZhCN.tsx b/site/src/examples/date-picker/SingleWithLocaleZhCN.tsx index 7b9c17bdcc7..e2c2c9cbc70 100644 --- a/site/src/examples/date-picker/SingleWithLocaleZhCN.tsx +++ b/site/src/examples/date-picker/SingleWithLocaleZhCN.tsx @@ -13,11 +13,10 @@ import { DatePickerOverlay, DatePickerSingleInput, DatePickerSinglePanel, - type SingleDatePickerError, type SingleDateSelection, formatDate, } from "@salt-ds/lab"; -import React, { type ReactElement, useCallback, useState } from "react"; +import { type ReactElement, useCallback, useState } from "react"; export const SingleWithLocaleZhCN = (): ReactElement => { const locale = "zh-CN"; diff --git a/site/src/examples/date-picker/SingleWithMinMaxDate.tsx b/site/src/examples/date-picker/SingleWithMinMaxDate.tsx index b684158e0bd..27dbd2290f9 100644 --- a/site/src/examples/date-picker/SingleWithMinMaxDate.tsx +++ b/site/src/examples/date-picker/SingleWithMinMaxDate.tsx @@ -13,7 +13,7 @@ import { formatDate, getCurrentLocale, } from "@salt-ds/lab"; -import { type ReactElement, useCallback, useState } from "react"; +import { type ReactElement, useCallback } from "react"; function formatSingleDate( date: DateValue | null, diff --git a/site/src/examples/date-picker/SingleWithTodayButton.tsx b/site/src/examples/date-picker/SingleWithTodayButton.tsx index 2909457f09b..ab9af8454e6 100644 --- a/site/src/examples/date-picker/SingleWithTodayButton.tsx +++ b/site/src/examples/date-picker/SingleWithTodayButton.tsx @@ -23,7 +23,7 @@ import { getCurrentLocale, useDatePickerContext, } from "@salt-ds/lab"; -import React, { type ReactElement, useCallback } from "react"; +import { type ReactElement, useCallback } from "react"; const TodayButton = () => { const { diff --git a/site/src/examples/form-field/Label.tsx b/site/src/examples/form-field/Label.tsx index 5a80caca537..128e9509a6f 100644 --- a/site/src/examples/form-field/Label.tsx +++ b/site/src/examples/form-field/Label.tsx @@ -1,10 +1,4 @@ -import { - FlowLayout, - FormField, - FormFieldHelperText, - FormFieldLabel, - Input, -} from "@salt-ds/core"; +import { FlowLayout, FormField, FormFieldLabel, Input } from "@salt-ds/core"; import type { ReactElement } from "react"; export const Label = (): ReactElement => ( diff --git a/site/src/examples/form-field/LabelLeft.tsx b/site/src/examples/form-field/LabelLeft.tsx index 7da3c668d5d..a13425d3153 100644 --- a/site/src/examples/form-field/LabelLeft.tsx +++ b/site/src/examples/form-field/LabelLeft.tsx @@ -1,10 +1,4 @@ -import { - FlowLayout, - FormField, - FormFieldHelperText, - FormFieldLabel, - Input, -} from "@salt-ds/core"; +import { FlowLayout, FormField, FormFieldLabel, Input } from "@salt-ds/core"; import type { ReactElement } from "react"; export const LabelLeft = (): ReactElement => ( diff --git a/site/src/examples/form-field/LabelQuestion.tsx b/site/src/examples/form-field/LabelQuestion.tsx index 93bb998f912..974f13b06f7 100644 --- a/site/src/examples/form-field/LabelQuestion.tsx +++ b/site/src/examples/form-field/LabelQuestion.tsx @@ -1,9 +1,7 @@ import { FlowLayout, FormField, - FormFieldHelperText, FormFieldLabel, - Input, MultilineInput, } from "@salt-ds/core"; import type { ReactElement } from "react"; diff --git a/site/src/examples/form-field/MultipleChildren.tsx b/site/src/examples/form-field/MultipleChildren.tsx index 69ba7de0461..d2b8270d917 100644 --- a/site/src/examples/form-field/MultipleChildren.tsx +++ b/site/src/examples/form-field/MultipleChildren.tsx @@ -5,7 +5,6 @@ import { FormFieldHelperText, FormFieldLabel, Input, - MultilineInput, StackLayout, } from "@salt-ds/core"; import { type ChangeEvent, type ReactElement, useState } from "react"; diff --git a/site/src/examples/input/Secondary.tsx b/site/src/examples/input/Secondary.tsx index 5e3dffd3820..66cb45034b6 100644 --- a/site/src/examples/input/Secondary.tsx +++ b/site/src/examples/input/Secondary.tsx @@ -1,4 +1,4 @@ -import { FlowLayout, Input } from "@salt-ds/core"; +import { Input } from "@salt-ds/core"; import type { ReactElement } from "react"; export const Secondary = (): ReactElement => ( diff --git a/site/src/examples/multiline-input/ButtonAdornment.tsx b/site/src/examples/multiline-input/ButtonAdornment.tsx index 83c206f7c89..9d23eabb5c1 100644 --- a/site/src/examples/multiline-input/ButtonAdornment.tsx +++ b/site/src/examples/multiline-input/ButtonAdornment.tsx @@ -1,4 +1,4 @@ -import { Button, FlowLayout, MultilineInput, Text } from "@salt-ds/core"; +import { Button, FlowLayout, MultilineInput } from "@salt-ds/core"; import { BankCheckSolidIcon, BookmarkSolidIcon, diff --git a/site/src/examples/navigation-item/RenderElement.tsx b/site/src/examples/navigation-item/RenderElement.tsx index b2f9e1aa8a9..987a2a2e8a6 100644 --- a/site/src/examples/navigation-item/RenderElement.tsx +++ b/site/src/examples/navigation-item/RenderElement.tsx @@ -1,5 +1,5 @@ import { NavigationItem, StackLayout, Text } from "@salt-ds/core"; -import React, { type ReactElement, useState } from "react"; +import { type ReactElement, useState } from "react"; const CustomLinkImplementation = (props: any) => ( diff --git a/site/src/examples/spinner/LoadingPartial.tsx b/site/src/examples/spinner/LoadingPartial.tsx index 6b2f10a7e1e..6fbb8724fe3 100644 --- a/site/src/examples/spinner/LoadingPartial.tsx +++ b/site/src/examples/spinner/LoadingPartial.tsx @@ -10,7 +10,6 @@ import cx from "classnames"; import { type ComponentPropsWithoutRef, type ReactElement, - ReactNode, useEffect, useState, } from "react"; diff --git a/site/src/examples/static-list/ComplexLabel.tsx b/site/src/examples/static-list/ComplexLabel.tsx index e26764214e0..b644b4cc321 100644 --- a/site/src/examples/static-list/ComplexLabel.tsx +++ b/site/src/examples/static-list/ComplexLabel.tsx @@ -4,7 +4,7 @@ import { StaticListItem, StaticListItemContent, } from "@salt-ds/lab"; -import React, { type ReactElement } from "react"; +import type { ReactElement } from "react"; import { type ListEvent, complexEventsData } from "./exampleData"; const ListItem = ({ title, time }: ListEvent) => ( diff --git a/site/src/examples/static-list/Default.tsx b/site/src/examples/static-list/Default.tsx index 24cccc0a7eb..a052de2156d 100644 --- a/site/src/examples/static-list/Default.tsx +++ b/site/src/examples/static-list/Default.tsx @@ -1,6 +1,6 @@ import { Button, StackLayout, Text } from "@salt-ds/core"; import { StaticList, StaticListItem } from "@salt-ds/lab"; -import React, { type ReactElement, useState } from "react"; +import { type ReactElement, useState } from "react"; import { eventsData } from "./exampleData"; const ListItem = ({ event }: { event: string }) => ( diff --git a/site/src/examples/static-list/WithButtons.tsx b/site/src/examples/static-list/WithButtons.tsx index 6d055ce3ee9..346a0e1b4fd 100644 --- a/site/src/examples/static-list/WithButtons.tsx +++ b/site/src/examples/static-list/WithButtons.tsx @@ -1,18 +1,12 @@ import { Button, StackLayout, Text, useId } from "@salt-ds/core"; -import { - EditIcon, - NoteIcon, - OverflowMenuIcon, - TearOutIcon, - VideoIcon, -} from "@salt-ds/icons"; +import { OverflowMenuIcon, VideoIcon } from "@salt-ds/icons"; import { StaticList, StaticListItem, StaticListItemContent, } from "@salt-ds/lab"; import { clsx } from "clsx"; -import React, { type ReactElement } from "react"; +import type { ReactElement } from "react"; import { type ListEvent, complexEventsData } from "./exampleData"; const ListItem = ({ title, time }: ListEvent) => { diff --git a/site/src/examples/static-list/WithDividers.tsx b/site/src/examples/static-list/WithDividers.tsx index 9315f83dc14..49a79bb1d1a 100644 --- a/site/src/examples/static-list/WithDividers.tsx +++ b/site/src/examples/static-list/WithDividers.tsx @@ -4,7 +4,7 @@ import { StaticListItem, StaticListItemContent, } from "@salt-ds/lab"; -import React, { Fragment, type ReactElement } from "react"; +import { Fragment, type ReactElement } from "react"; import { type ListEvent, complexEventsData } from "./exampleData"; const ListItem = ({ title, time }: ListEvent) => ( diff --git a/site/src/examples/static-list/WithIcons.tsx b/site/src/examples/static-list/WithIcons.tsx index f4a96432e24..2b573b16dbe 100644 --- a/site/src/examples/static-list/WithIcons.tsx +++ b/site/src/examples/static-list/WithIcons.tsx @@ -1,11 +1,11 @@ import { StackLayout, Text } from "@salt-ds/core"; -import { CalendarIcon, NotificationIcon } from "@salt-ds/icons"; +import { CalendarIcon } from "@salt-ds/icons"; import { StaticList, StaticListItem, StaticListItemContent, } from "@salt-ds/lab"; -import React, { type ReactElement } from "react"; +import type { ReactElement } from "react"; import { type ListEvent, complexEventsData } from "./exampleData"; const ListItem = ({ title, time }: ListEvent) => ( diff --git a/site/src/examples/toggle-button/TextOnly.tsx b/site/src/examples/toggle-button/TextOnly.tsx index d7b38b4ec9f..8c921d53b2c 100644 --- a/site/src/examples/toggle-button/TextOnly.tsx +++ b/site/src/examples/toggle-button/TextOnly.tsx @@ -1,4 +1,4 @@ -import { ToggleButton, Tooltip } from "@salt-ds/core"; +import { ToggleButton } from "@salt-ds/core"; import type { ReactElement } from "react"; export const TextOnly = (): ReactElement => ( diff --git a/site/src/layouts/DetailComponent/DetailComponent.tsx b/site/src/layouts/DetailComponent/DetailComponent.tsx index 52c6fa52038..dc1b7d8378a 100644 --- a/site/src/layouts/DetailComponent/DetailComponent.tsx +++ b/site/src/layouts/DetailComponent/DetailComponent.tsx @@ -7,7 +7,7 @@ import { } from "@jpmorganchase/mosaic-store"; import { TabPanel, Tabs } from "@salt-ds/lab"; import { useRouter } from "next/navigation"; -import React, { type FC, useEffect, useState } from "react"; +import { type FC, useEffect, useState } from "react"; import ReactMarkdown from "react-markdown"; import { a, code, p, ul } from "../../components/mdx"; import { TableOfContents } from "../../components/toc"; diff --git a/site/src/layouts/DetailComponent/SecondarySidebar.tsx b/site/src/layouts/DetailComponent/SecondarySidebar.tsx index 2585d4f85a7..0a2e2348805 100644 --- a/site/src/layouts/DetailComponent/SecondarySidebar.tsx +++ b/site/src/layouts/DetailComponent/SecondarySidebar.tsx @@ -1,5 +1,5 @@ import { useRoute } from "@jpmorganchase/mosaic-store"; -import React, { type FC, type ReactNode } from "react"; +import type { FC, ReactNode } from "react"; import { LinkList } from "../../components/link-list/LinkList"; import { Heading4 } from "../../components/mdx/h4"; diff --git a/site/src/layouts/DetailComponent/TitleWithDrawer.tsx b/site/src/layouts/DetailComponent/TitleWithDrawer.tsx index 79069f602a2..fb1449f3a95 100644 --- a/site/src/layouts/DetailComponent/TitleWithDrawer.tsx +++ b/site/src/layouts/DetailComponent/TitleWithDrawer.tsx @@ -1,5 +1,5 @@ import { Button, useIcon } from "@salt-ds/core"; -import React, { type FC, type Dispatch, type SetStateAction } from "react"; +import type { Dispatch, FC, SetStateAction } from "react"; import layoutStyles from "../index.module.css"; import styles from "./TitleWithDrawer.module.css"; diff --git a/site/src/layouts/DetailPattern/DetailPattern.tsx b/site/src/layouts/DetailPattern/DetailPattern.tsx index 84e6e0ba766..1e593be5e3d 100644 --- a/site/src/layouts/DetailPattern/DetailPattern.tsx +++ b/site/src/layouts/DetailPattern/DetailPattern.tsx @@ -1,5 +1,5 @@ import { Sidebar } from "@jpmorganchase/mosaic-site-components"; -import React, { type FC } from "react"; +import type { FC } from "react"; import { TableOfContents } from "../../components/toc"; import { DetailBase } from "../DetailBase"; import type { LayoutProps } from "../types/index"; diff --git a/site/src/layouts/DetailTechnical/DetailTechnical.tsx b/site/src/layouts/DetailTechnical/DetailTechnical.tsx index e28774dc332..3af47ef3ad2 100644 --- a/site/src/layouts/DetailTechnical/DetailTechnical.tsx +++ b/site/src/layouts/DetailTechnical/DetailTechnical.tsx @@ -1,5 +1,5 @@ import { Sidebar } from "@jpmorganchase/mosaic-site-components"; -import React, { type FC } from "react"; +import type { FC } from "react"; import { TableOfContents } from "../../components/toc"; import { DetailBase } from "../DetailBase"; import type { LayoutProps } from "../types/index"; diff --git a/site/src/layouts/Landing/Landing.tsx b/site/src/layouts/Landing/Landing.tsx index 73f9266da63..a46bf84089e 100644 --- a/site/src/layouts/Landing/Landing.tsx +++ b/site/src/layouts/Landing/Landing.tsx @@ -1,4 +1,4 @@ -import React, { type FC } from "react"; +import type { FC } from "react"; import { AppHeader, Footer } from "../../components"; import { LayoutBase } from "@jpmorganchase/mosaic-layouts"; diff --git a/site/src/layouts/LayoutColumns/LayoutColumns.tsx b/site/src/layouts/LayoutColumns/LayoutColumns.tsx index 88609c68eb4..fcacb3f7d28 100644 --- a/site/src/layouts/LayoutColumns/LayoutColumns.tsx +++ b/site/src/layouts/LayoutColumns/LayoutColumns.tsx @@ -2,7 +2,7 @@ import { useBreakpoint } from "@jpmorganchase/mosaic-components"; import { Sidebar } from "@jpmorganchase/mosaic-site-components"; import { SaltProvider } from "@salt-ds/core"; import clsx from "clsx"; -import React, { type ReactNode } from "react"; +import type { ReactNode } from "react"; import styles from "./LayoutColumns.module.css"; export const LayoutColumns = ({ diff --git a/site/src/layouts/LayoutFullWidth/LayoutFullWidth.tsx b/site/src/layouts/LayoutFullWidth/LayoutFullWidth.tsx index 43a2cfdde4b..ca37713c171 100644 --- a/site/src/layouts/LayoutFullWidth/LayoutFullWidth.tsx +++ b/site/src/layouts/LayoutFullWidth/LayoutFullWidth.tsx @@ -1,4 +1,4 @@ -import React, { type FC } from "react"; +import type { FC } from "react"; import type { LayoutProps } from "../types/index"; import styles from "./LayoutFullWidth.module.css"; diff --git a/site/src/pages/index.tsx b/site/src/pages/index.tsx index ae2ff10b46c..f137f1e93ab 100644 --- a/site/src/pages/index.tsx +++ b/site/src/pages/index.tsx @@ -1,5 +1,4 @@ import { Image, Link } from "@jpmorganchase/mosaic-site-components"; -import React from "react"; import HomepageAccordion from "src/_index/accordion/Accordion"; import Features from "src/_index/features/Features"; import { Card, type CardProps } from "src/components/card/Card"; diff --git a/yarn.lock b/yarn.lock index be68742a4e5..fc62eabd1ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2404,18 +2404,18 @@ __metadata: languageName: node linkType: hard -"@biomejs/biome@npm:^1.9.1": - version: 1.9.1 - resolution: "@biomejs/biome@npm:1.9.1" - dependencies: - "@biomejs/cli-darwin-arm64": "npm:1.9.1" - "@biomejs/cli-darwin-x64": "npm:1.9.1" - "@biomejs/cli-linux-arm64": "npm:1.9.1" - "@biomejs/cli-linux-arm64-musl": "npm:1.9.1" - "@biomejs/cli-linux-x64": "npm:1.9.1" - "@biomejs/cli-linux-x64-musl": "npm:1.9.1" - "@biomejs/cli-win32-arm64": "npm:1.9.1" - "@biomejs/cli-win32-x64": "npm:1.9.1" +"@biomejs/biome@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/biome@npm:1.9.4" + dependencies: + "@biomejs/cli-darwin-arm64": "npm:1.9.4" + "@biomejs/cli-darwin-x64": "npm:1.9.4" + "@biomejs/cli-linux-arm64": "npm:1.9.4" + "@biomejs/cli-linux-arm64-musl": "npm:1.9.4" + "@biomejs/cli-linux-x64": "npm:1.9.4" + "@biomejs/cli-linux-x64-musl": "npm:1.9.4" + "@biomejs/cli-win32-arm64": "npm:1.9.4" + "@biomejs/cli-win32-x64": "npm:1.9.4" dependenciesMeta: "@biomejs/cli-darwin-arm64": optional: true @@ -2435,73 +2435,73 @@ __metadata: optional: true bin: biome: bin/biome - checksum: 10/ca385e220d6aca88df60cfe3139f91dc094d8debdaf0582488f47b204d5ba2052d5f7d225e07b2e5bdca6a56fe34047928f95d75a4501d5fae67b7a996f39635 + checksum: 10/bd8ff8fb4dc0581bd60a9b9ac28d0cd03ba17c6a1de2ab6228b7fda582079594ceee774f47e41aac2fc6d35de1637def2e32ef2e58fa24e22d1b24ef9ee5cefa languageName: node linkType: hard -"@biomejs/cli-darwin-arm64@npm:1.9.1": - version: 1.9.1 - resolution: "@biomejs/cli-darwin-arm64@npm:1.9.1" +"@biomejs/cli-darwin-arm64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-darwin-arm64@npm:1.9.4" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-darwin-x64@npm:1.9.1": - version: 1.9.1 - resolution: "@biomejs/cli-darwin-x64@npm:1.9.1" +"@biomejs/cli-darwin-x64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-darwin-x64@npm:1.9.4" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@biomejs/cli-linux-arm64-musl@npm:1.9.1": - version: 1.9.1 - resolution: "@biomejs/cli-linux-arm64-musl@npm:1.9.1" +"@biomejs/cli-linux-arm64-musl@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-linux-arm64-musl@npm:1.9.4" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-arm64@npm:1.9.1": - version: 1.9.1 - resolution: "@biomejs/cli-linux-arm64@npm:1.9.1" +"@biomejs/cli-linux-arm64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-linux-arm64@npm:1.9.4" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-linux-x64-musl@npm:1.9.1": - version: 1.9.1 - resolution: "@biomejs/cli-linux-x64-musl@npm:1.9.1" +"@biomejs/cli-linux-x64-musl@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-linux-x64-musl@npm:1.9.4" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-x64@npm:1.9.1": - version: 1.9.1 - resolution: "@biomejs/cli-linux-x64@npm:1.9.1" +"@biomejs/cli-linux-x64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-linux-x64@npm:1.9.4" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-win32-arm64@npm:1.9.1": - version: 1.9.1 - resolution: "@biomejs/cli-win32-arm64@npm:1.9.1" +"@biomejs/cli-win32-arm64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-win32-arm64@npm:1.9.4" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-win32-x64@npm:1.9.1": - version: 1.9.1 - resolution: "@biomejs/cli-win32-x64@npm:1.9.1" +"@biomejs/cli-win32-x64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-win32-x64@npm:1.9.4" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@biomejs/js-api@npm:^0.6.2": - version: 0.6.2 - resolution: "@biomejs/js-api@npm:0.6.2" +"@biomejs/js-api@npm:0.7.1": + version: 0.7.1 + resolution: "@biomejs/js-api@npm:0.7.1" peerDependencies: - "@biomejs/wasm-bundler": ^1.8.2 - "@biomejs/wasm-nodejs": ^1.8.2 - "@biomejs/wasm-web": ^1.8.2 + "@biomejs/wasm-bundler": ^1.9.2 + "@biomejs/wasm-nodejs": ^1.9.2 + "@biomejs/wasm-web": ^1.9.2 peerDependenciesMeta: "@biomejs/wasm-bundler": optional: true @@ -2509,14 +2509,14 @@ __metadata: optional: true "@biomejs/wasm-web": optional: true - checksum: 10/b5cde2821ac3a2473989b86bbc29fc7152cc3c71f98a7eed508b1a7cc648f0f4602ebe349eeda821f6c44bb93c561f2c3d1d571c7d98ac85b85cc77ff8b9b1c2 + checksum: 10/108d314ba659e79c2733e6aa9f06ba24e6dae330e00a1bbc3d50ea774964614b2920d461a95b7dbabe6b326cbee7356f285061bdda544bfd4b6e7fda1b6dc85c languageName: node linkType: hard -"@biomejs/wasm-nodejs@npm:^1.9.1": - version: 1.9.1 - resolution: "@biomejs/wasm-nodejs@npm:1.9.1" - checksum: 10/0283f407a246414db37dfd43803cfe7dbb966160a06053d60e5fbd7238acea3a5e1bd2b6be488f7268d40632645b13c39c1a6002931b24719a9236de2c83a400 +"@biomejs/wasm-nodejs@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/wasm-nodejs@npm:1.9.4" + checksum: 10/77cf4ae4228bcb04e17a2ec4330f79a70b646000534e84c8a7eea40d14a1043eaed63a7406f66260ccf4e05687b1b076f04e28e54530439a67251e107fffeb8e languageName: node linkType: hard @@ -5787,9 +5787,9 @@ __metadata: version: 0.0.0-use.local resolution: "@salt-ds/root@workspace:." dependencies: - "@biomejs/biome": "npm:^1.9.1" - "@biomejs/js-api": "npm:^0.6.2" - "@biomejs/wasm-nodejs": "npm:^1.9.1" + "@biomejs/biome": "npm:1.9.4" + "@biomejs/js-api": "npm:0.7.1" + "@biomejs/wasm-nodejs": "npm:1.9.4" "@changesets/cli": "npm:^2.27.7" "@cypress/code-coverage": "npm:^3.12.35" "@faker-js/faker": "npm:^8.0.0"