diff --git a/.eslintrc.js b/.eslintrc.js index db3353a851..dcae958e29 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -50,6 +50,19 @@ module.exports = { // being applied to subsequent plugin imports/extensions. Wild. files: ['*.tsx', '*.ts'], rules: { + // Bundlers (esbuild/Vite dev, tsdown/rolldown) elide type-only + // imports based on per-file usage heuristics, not full type info. + // A value-imported type re-exported via `export type {}` can look + // used to the heuristic, get preserved as a runtime import, and + // crash at runtime since the source has no matching runtime export. + '@typescript-eslint/consistent-type-imports': [ + 'error', + { + prefer: 'type-imports', + fixStyle: 'separate-type-imports', + disallowTypeAnnotations: false, + }, + ], '@typescript-eslint/no-empty-object-type': [ 'error', { diff --git a/package.json b/package.json index f3e072c4ff..0e7a8aae08 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "@storybook/react-vite": "10.3.3", "@svgr/cli": "5.5.0", "@swc-node/register": "^1.11.1", - "@swc/core": "^1.15.18", + "@swc/core": "1.15.43", + "@swc/plugin-emotion": "14.15.0", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^7.0.1", "@testing-library/react": "^16.0.0", @@ -61,6 +62,7 @@ "@typescript-eslint/eslint-plugin": "^8.57.0", "@typescript-eslint/parser": "^8.57.0", "@vitejs/plugin-react": "^5.0.0", + "@vitejs/plugin-react-swc": "4.3.0", "@vitest/browser": "^3.2.4", "babel-jest": "30.4.1", "babel-plugin-macros": "^3.0.1", @@ -112,6 +114,7 @@ "repository": "git@github.com:Codecademy/skillsoft-gamut.git", "resolutions": { "@react-aria/interactions": "3.25.0", + "@swc/core": "1.15.43", "@types/react": "^18.2.0", "@types/react-dom": "^18.2.0", "@types/react-test-renderer": "^18.2.0", diff --git a/packages/eslint-plugin-gamut/package.json b/packages/eslint-plugin-gamut/package.json index 38d46280ba..a9fb434e9b 100644 --- a/packages/eslint-plugin-gamut/package.json +++ b/packages/eslint-plugin-gamut/package.json @@ -17,7 +17,6 @@ ], "license": "MIT", "main": "./dist/index.js", - "module": "dist/index.js", "publishConfig": { "access": "public" }, diff --git a/packages/eslint-plugin-gamut/src/gamut-import-paths.ts b/packages/eslint-plugin-gamut/src/gamut-import-paths.ts index ae14db6fb9..fdbc1b7572 100644 --- a/packages/eslint-plugin-gamut/src/gamut-import-paths.ts +++ b/packages/eslint-plugin-gamut/src/gamut-import-paths.ts @@ -1,4 +1,4 @@ -import { TSESTree } from '@typescript-eslint/utils'; +import type { TSESTree } from '@typescript-eslint/utils'; import { createRule } from './createRule'; diff --git a/packages/eslint-plugin-gamut/src/require-styled-target-for-selector.ts b/packages/eslint-plugin-gamut/src/require-styled-target-for-selector.ts index f9bda7e38c..3a0cac9319 100644 --- a/packages/eslint-plugin-gamut/src/require-styled-target-for-selector.ts +++ b/packages/eslint-plugin-gamut/src/require-styled-target-for-selector.ts @@ -1,4 +1,5 @@ -import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils'; +import type { TSESTree } from '@typescript-eslint/utils'; +import { AST_NODE_TYPES } from '@typescript-eslint/utils'; import { createRule } from './createRule'; diff --git a/packages/eslint-plugin-gamut/src/utils.ts b/packages/eslint-plugin-gamut/src/utils.ts index 25d81ad4c2..1786db4080 100644 --- a/packages/eslint-plugin-gamut/src/utils.ts +++ b/packages/eslint-plugin-gamut/src/utils.ts @@ -1,4 +1,5 @@ -import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils'; +import type { TSESTree } from '@typescript-eslint/utils'; +import { AST_NODE_TYPES } from '@typescript-eslint/utils'; export const isNamedVariableTheme = ( arrowExpression: TSESTree.ArrowFunctionExpression diff --git a/packages/gamut-icons/icon-template.js b/packages/gamut-icons/icon-template.js index b6a970f77e..8a16cfa28f 100644 --- a/packages/gamut-icons/icon-template.js +++ b/packages/gamut-icons/icon-template.js @@ -5,7 +5,8 @@ function iconTemplate(api, opts, { jsx }) { return template.ast` import * as React from 'react'; - import { Svg, GamutIconProps } from '../../props'; + import { Svg } from '../../props'; + import type { GamutIconProps } from '../../props'; import { useIconId } from '../../useIconId'; export const ${exportName} = React.forwardRef(({ diff --git a/packages/gamut-icons/src/props.ts b/packages/gamut-icons/src/props.ts index d28e2a7c41..47d65e8e87 100644 --- a/packages/gamut-icons/src/props.ts +++ b/packages/gamut-icons/src/props.ts @@ -1,6 +1,7 @@ import styled from '@emotion/styled'; import { styledOptions, system } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; export interface IconStyleProps extends StyleProps { /** diff --git a/packages/gamut-illustrations/src/AIBuilder.tsx b/packages/gamut-illustrations/src/AIBuilder.tsx index 0878d7f0a8..02383b0419 100644 --- a/packages/gamut-illustrations/src/AIBuilder.tsx +++ b/packages/gamut-illustrations/src/AIBuilder.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const AIBuilder: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/AIBuilderLanding.tsx b/packages/gamut-illustrations/src/AIBuilderLanding.tsx index fd57faf2af..7840a60a7b 100644 --- a/packages/gamut-illustrations/src/AIBuilderLanding.tsx +++ b/packages/gamut-illustrations/src/AIBuilderLanding.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const AIBuilderLanding: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Achievement.tsx b/packages/gamut-illustrations/src/Achievement.tsx index 9324c0d5e6..d0e2027e0a 100644 --- a/packages/gamut-illustrations/src/Achievement.tsx +++ b/packages/gamut-illustrations/src/Achievement.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Achievement: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Announcement.tsx b/packages/gamut-illustrations/src/Announcement.tsx index 6884910fb4..c39052a1a2 100644 --- a/packages/gamut-illustrations/src/Announcement.tsx +++ b/packages/gamut-illustrations/src/Announcement.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Announcement: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Bee.tsx b/packages/gamut-illustrations/src/Bee.tsx index ea27cf1c16..2947f26e83 100644 --- a/packages/gamut-illustrations/src/Bee.tsx +++ b/packages/gamut-illustrations/src/Bee.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Bee: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Bell.tsx b/packages/gamut-illustrations/src/Bell.tsx index 242fa42a46..96d915e281 100644 --- a/packages/gamut-illustrations/src/Bell.tsx +++ b/packages/gamut-illustrations/src/Bell.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Bell: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/BinaryBlocks.tsx b/packages/gamut-illustrations/src/BinaryBlocks.tsx index 421018bc60..b3b2e4ea53 100644 --- a/packages/gamut-illustrations/src/BinaryBlocks.tsx +++ b/packages/gamut-illustrations/src/BinaryBlocks.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const BinaryBlocks: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/BinaryStairs.tsx b/packages/gamut-illustrations/src/BinaryStairs.tsx index 596b5e701e..003831d9b7 100644 --- a/packages/gamut-illustrations/src/BinaryStairs.tsx +++ b/packages/gamut-illustrations/src/BinaryStairs.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const BinaryStairs: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Blocks.tsx b/packages/gamut-illustrations/src/Blocks.tsx index 3cc2877bac..1f6cc04fdf 100644 --- a/packages/gamut-illustrations/src/Blocks.tsx +++ b/packages/gamut-illustrations/src/Blocks.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from '.'; +import type { IllustrationProps } from '.'; export const Blocks: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Blueprint.tsx b/packages/gamut-illustrations/src/Blueprint.tsx index 855d96f8b1..4111c94df9 100644 --- a/packages/gamut-illustrations/src/Blueprint.tsx +++ b/packages/gamut-illustrations/src/Blueprint.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Blueprint: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/BlueprintWhite.tsx b/packages/gamut-illustrations/src/BlueprintWhite.tsx index afde25ea25..eaaabd06c5 100644 --- a/packages/gamut-illustrations/src/BlueprintWhite.tsx +++ b/packages/gamut-illustrations/src/BlueprintWhite.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const BlueprintWhite: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/BookAndNotepad.tsx b/packages/gamut-illustrations/src/BookAndNotepad.tsx index c20ff57c21..67518d15e7 100644 --- a/packages/gamut-illustrations/src/BookAndNotepad.tsx +++ b/packages/gamut-illustrations/src/BookAndNotepad.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const BookAndNotepad: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Browser.tsx b/packages/gamut-illustrations/src/Browser.tsx index e92e4ccaed..030541a87d 100644 --- a/packages/gamut-illustrations/src/Browser.tsx +++ b/packages/gamut-illustrations/src/Browser.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Browser: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/BrowserLock.tsx b/packages/gamut-illustrations/src/BrowserLock.tsx index 80c99d35ff..dca570e2d2 100644 --- a/packages/gamut-illustrations/src/BrowserLock.tsx +++ b/packages/gamut-illustrations/src/BrowserLock.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const BrowserLock: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/BrowserPuzzle.tsx b/packages/gamut-illustrations/src/BrowserPuzzle.tsx index 30842d7e73..91a382bfb4 100644 --- a/packages/gamut-illustrations/src/BrowserPuzzle.tsx +++ b/packages/gamut-illustrations/src/BrowserPuzzle.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const BrowserPuzzle: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/ChatBox.tsx b/packages/gamut-illustrations/src/ChatBox.tsx index fac39a2a67..9c23d32a1e 100644 --- a/packages/gamut-illustrations/src/ChatBox.tsx +++ b/packages/gamut-illustrations/src/ChatBox.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const ChatBox: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/CodeCelebration.tsx b/packages/gamut-illustrations/src/CodeCelebration.tsx index 785b2cdc7e..2a3a8458ac 100644 --- a/packages/gamut-illustrations/src/CodeCelebration.tsx +++ b/packages/gamut-illustrations/src/CodeCelebration.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const CodeCelebration: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Coffee.tsx b/packages/gamut-illustrations/src/Coffee.tsx index 9aabd674e8..b66e1f28f0 100644 --- a/packages/gamut-illustrations/src/Coffee.tsx +++ b/packages/gamut-illustrations/src/Coffee.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Coffee: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Confetti.tsx b/packages/gamut-illustrations/src/Confetti.tsx index 0a1ad5fbe5..5db425fca3 100644 --- a/packages/gamut-illustrations/src/Confetti.tsx +++ b/packages/gamut-illustrations/src/Confetti.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Confetti: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Conversation.tsx b/packages/gamut-illustrations/src/Conversation.tsx index cbf0827d8c..c9b0c98635 100644 --- a/packages/gamut-illustrations/src/Conversation.tsx +++ b/packages/gamut-illustrations/src/Conversation.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Conversation: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/CubeIllustration.tsx b/packages/gamut-illustrations/src/CubeIllustration.tsx index 16359f945d..63004b4ecb 100644 --- a/packages/gamut-illustrations/src/CubeIllustration.tsx +++ b/packages/gamut-illustrations/src/CubeIllustration.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const CubeIllustration: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/CustomProject.tsx b/packages/gamut-illustrations/src/CustomProject.tsx index d5835981b2..aba2f96137 100644 --- a/packages/gamut-illustrations/src/CustomProject.tsx +++ b/packages/gamut-illustrations/src/CustomProject.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const CustomProject: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/EmailAt.tsx b/packages/gamut-illustrations/src/EmailAt.tsx index 15ccc2ab4c..e79e216b46 100644 --- a/packages/gamut-illustrations/src/EmailAt.tsx +++ b/packages/gamut-illustrations/src/EmailAt.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const EmailAt: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Envelope.tsx b/packages/gamut-illustrations/src/Envelope.tsx index b1edb00dc0..fd9c1bf192 100644 --- a/packages/gamut-illustrations/src/Envelope.tsx +++ b/packages/gamut-illustrations/src/Envelope.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Envelope: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/ErrorWindow.tsx b/packages/gamut-illustrations/src/ErrorWindow.tsx index e8f3f856f2..67b601df71 100644 --- a/packages/gamut-illustrations/src/ErrorWindow.tsx +++ b/packages/gamut-illustrations/src/ErrorWindow.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const ErrorWindow: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Events.tsx b/packages/gamut-illustrations/src/Events.tsx index ab09ede378..bc861b6090 100644 --- a/packages/gamut-illustrations/src/Events.tsx +++ b/packages/gamut-illustrations/src/Events.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Events: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/ExplodedCube.tsx b/packages/gamut-illustrations/src/ExplodedCube.tsx index 226e92c963..952bfc0157 100644 --- a/packages/gamut-illustrations/src/ExplodedCube.tsx +++ b/packages/gamut-illustrations/src/ExplodedCube.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const ExplodedCube: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/ExplodedCubeLight.tsx b/packages/gamut-illustrations/src/ExplodedCubeLight.tsx index 1829739ca4..1c610eb703 100644 --- a/packages/gamut-illustrations/src/ExplodedCubeLight.tsx +++ b/packages/gamut-illustrations/src/ExplodedCubeLight.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const ExplodedCubeLight: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Heart.tsx b/packages/gamut-illustrations/src/Heart.tsx index 6ac582e90c..a679137f81 100644 --- a/packages/gamut-illustrations/src/Heart.tsx +++ b/packages/gamut-illustrations/src/Heart.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Heart: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Hills.tsx b/packages/gamut-illustrations/src/Hills.tsx index 2a001479b9..ebd6a7d23a 100644 --- a/packages/gamut-illustrations/src/Hills.tsx +++ b/packages/gamut-illustrations/src/Hills.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Hills: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/HomeOffice.tsx b/packages/gamut-illustrations/src/HomeOffice.tsx index e092aeebf8..6a0dcce506 100644 --- a/packages/gamut-illustrations/src/HomeOffice.tsx +++ b/packages/gamut-illustrations/src/HomeOffice.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const HomeOffice: React.FC = ({ className, diff --git a/packages/gamut-illustrations/src/InnovationBuildingBlocks.tsx b/packages/gamut-illustrations/src/InnovationBuildingBlocks.tsx index 5f5bb84146..fd2fd70d1a 100644 --- a/packages/gamut-illustrations/src/InnovationBuildingBlocks.tsx +++ b/packages/gamut-illustrations/src/InnovationBuildingBlocks.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const InnovationBuildingBlocks: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Interest.tsx b/packages/gamut-illustrations/src/Interest.tsx index a4b05bf044..9fe66637c8 100644 --- a/packages/gamut-illustrations/src/Interest.tsx +++ b/packages/gamut-illustrations/src/Interest.tsx @@ -1,6 +1,6 @@ -import React from 'react'; +import type React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Interest: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Interview.tsx b/packages/gamut-illustrations/src/Interview.tsx index 60c5868554..8f7c285d8c 100644 --- a/packages/gamut-illustrations/src/Interview.tsx +++ b/packages/gamut-illustrations/src/Interview.tsx @@ -1,6 +1,6 @@ -import React from 'react'; +import type React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Interview: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Keyhole.tsx b/packages/gamut-illustrations/src/Keyhole.tsx index 09881a424b..c418dea375 100644 --- a/packages/gamut-illustrations/src/Keyhole.tsx +++ b/packages/gamut-illustrations/src/Keyhole.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Keyhole: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Knowledge.tsx b/packages/gamut-illustrations/src/Knowledge.tsx index f4045f641a..839cce8558 100644 --- a/packages/gamut-illustrations/src/Knowledge.tsx +++ b/packages/gamut-illustrations/src/Knowledge.tsx @@ -1,6 +1,6 @@ -import React from 'react'; +import type React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Knowledge: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/LightBulbAndGears.tsx b/packages/gamut-illustrations/src/LightBulbAndGears.tsx index cadae5d52d..f90f0a02df 100644 --- a/packages/gamut-illustrations/src/LightBulbAndGears.tsx +++ b/packages/gamut-illustrations/src/LightBulbAndGears.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const LightBulbAndGears: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/MagnifyingGlass.tsx b/packages/gamut-illustrations/src/MagnifyingGlass.tsx index 7048ceef8e..6700d09612 100644 --- a/packages/gamut-illustrations/src/MagnifyingGlass.tsx +++ b/packages/gamut-illustrations/src/MagnifyingGlass.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const MagnifyingGlass: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Maze.tsx b/packages/gamut-illustrations/src/Maze.tsx index 9a7fe3add7..dd432cd0fe 100644 --- a/packages/gamut-illustrations/src/Maze.tsx +++ b/packages/gamut-illustrations/src/Maze.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Maze: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Megaphone.tsx b/packages/gamut-illustrations/src/Megaphone.tsx index 864b04a0d6..868a69e731 100644 --- a/packages/gamut-illustrations/src/Megaphone.tsx +++ b/packages/gamut-illustrations/src/Megaphone.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Megaphone: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/MobilePhone.tsx b/packages/gamut-illustrations/src/MobilePhone.tsx index 7db7beb5a8..7627eff45a 100644 --- a/packages/gamut-illustrations/src/MobilePhone.tsx +++ b/packages/gamut-illustrations/src/MobilePhone.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const MobilePhone: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/MoneyBack.tsx b/packages/gamut-illustrations/src/MoneyBack.tsx index cfc67109c0..603f486e4b 100644 --- a/packages/gamut-illustrations/src/MoneyBack.tsx +++ b/packages/gamut-illustrations/src/MoneyBack.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const MoneyBack: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/New.tsx b/packages/gamut-illustrations/src/New.tsx index ec7c5d229a..84ca6d612f 100644 --- a/packages/gamut-illustrations/src/New.tsx +++ b/packages/gamut-illustrations/src/New.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const New: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/NumberBlocks.tsx b/packages/gamut-illustrations/src/NumberBlocks.tsx index d4ec991fb7..cb5611ca13 100644 --- a/packages/gamut-illustrations/src/NumberBlocks.tsx +++ b/packages/gamut-illustrations/src/NumberBlocks.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const NumberBlocks: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/OfficeAnnouncement.tsx b/packages/gamut-illustrations/src/OfficeAnnouncement.tsx index ad6948a13f..d4b2144e16 100644 --- a/packages/gamut-illustrations/src/OfficeAnnouncement.tsx +++ b/packages/gamut-illustrations/src/OfficeAnnouncement.tsx @@ -1,4 +1,4 @@ -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const OfficeAnnouncement: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Onboarding.tsx b/packages/gamut-illustrations/src/Onboarding.tsx index 1e79ee75fa..11a17d84cf 100644 --- a/packages/gamut-illustrations/src/Onboarding.tsx +++ b/packages/gamut-illustrations/src/Onboarding.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Onboarding: React.FC = (props) => ( = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/PortfolioProject.tsx b/packages/gamut-illustrations/src/PortfolioProject.tsx index fd0f138587..70419bd3a6 100644 --- a/packages/gamut-illustrations/src/PortfolioProject.tsx +++ b/packages/gamut-illustrations/src/PortfolioProject.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const PortfolioProject: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/PracticeProject.tsx b/packages/gamut-illustrations/src/PracticeProject.tsx index 684cce3fbf..ac928a3efc 100644 --- a/packages/gamut-illustrations/src/PracticeProject.tsx +++ b/packages/gamut-illustrations/src/PracticeProject.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const PracticeProject: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/PracticeTarget.tsx b/packages/gamut-illustrations/src/PracticeTarget.tsx index 646af2be3b..cefe8f67a8 100644 --- a/packages/gamut-illustrations/src/PracticeTarget.tsx +++ b/packages/gamut-illustrations/src/PracticeTarget.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const PracticeTarget: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/ProgressCharts.tsx b/packages/gamut-illustrations/src/ProgressCharts.tsx index bced08c1bb..9aef76977c 100644 --- a/packages/gamut-illustrations/src/ProgressCharts.tsx +++ b/packages/gamut-illustrations/src/ProgressCharts.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const ProgressCharts: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/ProgressChartsLight.tsx b/packages/gamut-illustrations/src/ProgressChartsLight.tsx index 2bd8778cd7..4911f91512 100644 --- a/packages/gamut-illustrations/src/ProgressChartsLight.tsx +++ b/packages/gamut-illustrations/src/ProgressChartsLight.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const ProgressChartsLight: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/ProjectReview.tsx b/packages/gamut-illustrations/src/ProjectReview.tsx index efc099ac91..6adc507a43 100644 --- a/packages/gamut-illustrations/src/ProjectReview.tsx +++ b/packages/gamut-illustrations/src/ProjectReview.tsx @@ -1,6 +1,6 @@ -import React from 'react'; +import type React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const ProjectReview: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Purpose.tsx b/packages/gamut-illustrations/src/Purpose.tsx index 7ee3806438..17efcd3042 100644 --- a/packages/gamut-illustrations/src/Purpose.tsx +++ b/packages/gamut-illustrations/src/Purpose.tsx @@ -1,6 +1,6 @@ -import React from 'react'; +import type React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Purpose: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Puzzle.tsx b/packages/gamut-illustrations/src/Puzzle.tsx index e6843da5bb..8a86342544 100644 --- a/packages/gamut-illustrations/src/Puzzle.tsx +++ b/packages/gamut-illustrations/src/Puzzle.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Puzzle: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Python.tsx b/packages/gamut-illustrations/src/Python.tsx index febc5356a4..96444ec356 100644 --- a/packages/gamut-illustrations/src/Python.tsx +++ b/packages/gamut-illustrations/src/Python.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Python: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/SevenDayTrial.tsx b/packages/gamut-illustrations/src/SevenDayTrial.tsx index 38ba718144..ffb4fb801a 100644 --- a/packages/gamut-illustrations/src/SevenDayTrial.tsx +++ b/packages/gamut-illustrations/src/SevenDayTrial.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const SevenDayTrial: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/StackedFruits.tsx b/packages/gamut-illustrations/src/StackedFruits.tsx index ff7da105b9..391e89b532 100644 --- a/packages/gamut-illustrations/src/StackedFruits.tsx +++ b/packages/gamut-illustrations/src/StackedFruits.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const StackedFruits: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/StackedFruitsLight.tsx b/packages/gamut-illustrations/src/StackedFruitsLight.tsx index 55a7971b9b..39005f01a2 100644 --- a/packages/gamut-illustrations/src/StackedFruitsLight.tsx +++ b/packages/gamut-illustrations/src/StackedFruitsLight.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const StackedFruitsLight: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/StackedPages.tsx b/packages/gamut-illustrations/src/StackedPages.tsx index a5a50ed624..fcf2f55552 100644 --- a/packages/gamut-illustrations/src/StackedPages.tsx +++ b/packages/gamut-illustrations/src/StackedPages.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const StackedPages: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/StackedPagesVariant.tsx b/packages/gamut-illustrations/src/StackedPagesVariant.tsx index 7561b6546d..ac642a4b3b 100644 --- a/packages/gamut-illustrations/src/StackedPagesVariant.tsx +++ b/packages/gamut-illustrations/src/StackedPagesVariant.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const StackedPagesVariant: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/StairsToWindow.tsx b/packages/gamut-illustrations/src/StairsToWindow.tsx index 4e8943f422..a8be4bf89f 100644 --- a/packages/gamut-illustrations/src/StairsToWindow.tsx +++ b/packages/gamut-illustrations/src/StairsToWindow.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const StairsToWindow: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/StairsToWindowLight.tsx b/packages/gamut-illustrations/src/StairsToWindowLight.tsx index 86ff0b4ae8..13d08f99ae 100644 --- a/packages/gamut-illustrations/src/StairsToWindowLight.tsx +++ b/packages/gamut-illustrations/src/StairsToWindowLight.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const StairsToWindowLight: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Sun.tsx b/packages/gamut-illustrations/src/Sun.tsx index 90e1fa4479..de47cc0c52 100644 --- a/packages/gamut-illustrations/src/Sun.tsx +++ b/packages/gamut-illustrations/src/Sun.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Sun: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Syllabus.tsx b/packages/gamut-illustrations/src/Syllabus.tsx index f322a893bd..cf958e6fc3 100644 --- a/packages/gamut-illustrations/src/Syllabus.tsx +++ b/packages/gamut-illustrations/src/Syllabus.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Syllabus: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Tag25PercentOff.tsx b/packages/gamut-illustrations/src/Tag25PercentOff.tsx index 6782d2f821..d0c093190b 100644 --- a/packages/gamut-illustrations/src/Tag25PercentOff.tsx +++ b/packages/gamut-illustrations/src/Tag25PercentOff.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Tag25PercentOff: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Tag30PercentOff.tsx b/packages/gamut-illustrations/src/Tag30PercentOff.tsx index 612bc1588b..780b02d977 100644 --- a/packages/gamut-illustrations/src/Tag30PercentOff.tsx +++ b/packages/gamut-illustrations/src/Tag30PercentOff.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Tag30PercentOff: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Tag50PercentOff.tsx b/packages/gamut-illustrations/src/Tag50PercentOff.tsx index 1c6d32f7a3..0277c1bb66 100644 --- a/packages/gamut-illustrations/src/Tag50PercentOff.tsx +++ b/packages/gamut-illustrations/src/Tag50PercentOff.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Tag50PercentOff: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/TagCelebration.tsx b/packages/gamut-illustrations/src/TagCelebration.tsx index a56d3b3425..6b53b7ddb7 100644 --- a/packages/gamut-illustrations/src/TagCelebration.tsx +++ b/packages/gamut-illustrations/src/TagCelebration.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const TagCelebration: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Target.tsx b/packages/gamut-illustrations/src/Target.tsx index f5e6a7948f..656df84dab 100644 --- a/packages/gamut-illustrations/src/Target.tsx +++ b/packages/gamut-illustrations/src/Target.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Target: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/TinyBlocks.tsx b/packages/gamut-illustrations/src/TinyBlocks.tsx index b41ef0e3da..b22a8ed3ac 100644 --- a/packages/gamut-illustrations/src/TinyBlocks.tsx +++ b/packages/gamut-illustrations/src/TinyBlocks.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const TinyBlocks: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-illustrations/src/Warning.tsx b/packages/gamut-illustrations/src/Warning.tsx index 9ecbc2b882..85c24f4586 100644 --- a/packages/gamut-illustrations/src/Warning.tsx +++ b/packages/gamut-illustrations/src/Warning.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { IllustrationProps } from './types'; +import type { IllustrationProps } from './types'; export const Warning: React.FC = ({ 'aria-hidden': ariaHidden, diff --git a/packages/gamut-patterns/pattern-template.js b/packages/gamut-patterns/pattern-template.js index bd432679f9..fea336da2d 100644 --- a/packages/gamut-patterns/pattern-template.js +++ b/packages/gamut-patterns/pattern-template.js @@ -9,7 +9,8 @@ function patternTemplate(api, opts, { jsx }) { return template.ast` import * as React from 'react'; - import { Svg, PatternProps } from '../props'; + import { Svg } from '../props'; + import type { PatternProps } from '../props'; import { usePatternId } from '../usePatternId'; export const ${exportName} = React.forwardRef(({ diff --git a/packages/gamut-patterns/src/props.tsx b/packages/gamut-patterns/src/props.tsx index 459280e23d..9026f05a46 100644 --- a/packages/gamut-patterns/src/props.tsx +++ b/packages/gamut-patterns/src/props.tsx @@ -1,7 +1,9 @@ import styled from '@emotion/styled'; import { styledOptions, system } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; -import { ComponentProps, forwardRef } from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; const patternStyles = variance.compose( system.layout, diff --git a/packages/gamut-patterns/tests/patterns.test.tsx b/packages/gamut-patterns/tests/patterns.test.tsx index 3f45a00df5..a15252f2a7 100644 --- a/packages/gamut-patterns/tests/patterns.test.tsx +++ b/packages/gamut-patterns/tests/patterns.test.tsx @@ -1,7 +1,7 @@ import { render } from '@testing-library/react'; import * as patterns from '../src/patterns'; -import { CheckerDense as GenericPatternComponent } from '../src/patterns/CheckerDense'; +import type { CheckerDense as GenericPatternComponent } from '../src/patterns/CheckerDense'; const patternComponents = patterns as Record< string, diff --git a/packages/gamut-styles/src/AssetProvider.tsx b/packages/gamut-styles/src/AssetProvider.tsx index fa409070dc..479b2161eb 100644 --- a/packages/gamut-styles/src/AssetProvider.tsx +++ b/packages/gamut-styles/src/AssetProvider.tsx @@ -1,9 +1,10 @@ -import { Theme } from '@emotion/react'; -import * as React from 'react'; +import type { Theme } from '@emotion/react'; +import type * as React from 'react'; import { webFonts } from './remoteAssets/fonts'; import { coreTheme } from './themes'; -import { FontConfig, getFonts } from './utilities/fontUtils'; +import type { FontConfig } from './utilities/fontUtils'; +import { getFonts } from './utilities/fontUtils'; /* * Only preload woff2 fonts, since woff1 are only included as fallbacks. diff --git a/packages/gamut-styles/src/Background.tsx b/packages/gamut-styles/src/Background.tsx index c9a0b4c9f4..73858c1d69 100644 --- a/packages/gamut-styles/src/Background.tsx +++ b/packages/gamut-styles/src/Background.tsx @@ -1,14 +1,14 @@ import { getContrast } from 'polished'; -import { ComponentProps, forwardRef, useCallback, useMemo } from 'react'; +import type { ComponentProps } from 'react'; +import { forwardRef, useCallback, useMemo } from 'react'; -import { +import type { ColorAlias, - ColorMode, ColorModes, ColorModeShape, Colors, - useColorModes, } from './ColorMode'; +import { ColorMode, useColorModes } from './ColorMode'; export interface BackgroundProps extends Omit< diff --git a/packages/gamut-styles/src/ColorMode.tsx b/packages/gamut-styles/src/ColorMode.tsx index f9ea6f8db9..4231b83d97 100644 --- a/packages/gamut-styles/src/ColorMode.tsx +++ b/packages/gamut-styles/src/ColorMode.tsx @@ -1,15 +1,12 @@ -import { CSSObject, Theme, ThemeProvider, useTheme } from '@emotion/react'; +import type { CSSObject, Theme } from '@emotion/react'; +import { ThemeProvider, useTheme } from '@emotion/react'; import styled from '@emotion/styled'; -import { - serializeTokens, - StyleProps, - ThemeProps, - variance, -} from '@skillsoft/variance'; +import type { StyleProps, ThemeProps } from '@skillsoft/variance'; +import { serializeTokens, variance } from '@skillsoft/variance'; import mapValues from 'lodash/mapValues'; import pick from 'lodash/pick'; +import type { ComponentProps } from 'react'; import { - ComponentProps, createContext, forwardRef, useContext, @@ -18,7 +15,7 @@ import { useState, } from 'react'; -import { theme as GamutTheme } from '.'; +import type { theme as GamutTheme } from '.'; import { background, border, diff --git a/packages/gamut-styles/src/GamutProvider.tsx b/packages/gamut-styles/src/GamutProvider.tsx index 28d6c71741..39ab7a5544 100644 --- a/packages/gamut-styles/src/GamutProvider.tsx +++ b/packages/gamut-styles/src/GamutProvider.tsx @@ -1,10 +1,6 @@ -import { - CacheProvider, - EmotionCache, - Theme, - ThemeProvider, -} from '@emotion/react'; -import { CSSObject } from '@skillsoft/variance'; +import type { EmotionCache, Theme } from '@emotion/react'; +import { CacheProvider, ThemeProvider } from '@emotion/react'; +import type { CSSObject } from '@skillsoft/variance'; import { MotionConfig } from 'framer-motion'; import { setNonce } from 'get-nonce'; import { useContext, useEffect, useMemo, useRef } from 'react'; diff --git a/packages/gamut-styles/src/__tests__/Background.test.tsx b/packages/gamut-styles/src/__tests__/Background.test.tsx index fd86e7e6aa..69a84b9f2e 100644 --- a/packages/gamut-styles/src/__tests__/Background.test.tsx +++ b/packages/gamut-styles/src/__tests__/Background.test.tsx @@ -2,7 +2,7 @@ import { matchers } from '@emotion/jest'; import { ThemeProvider, useTheme } from '@emotion/react'; import { setupRtl as setupRtlBase } from 'component-test-setup'; import overArgs from 'lodash/overArgs'; -import * as React from 'react'; +import type * as React from 'react'; import { Background } from '../Background'; import { coreTheme as theme } from '../themes'; diff --git a/packages/gamut-styles/src/__tests__/testUtils.tsx b/packages/gamut-styles/src/__tests__/testUtils.tsx index 0a2b521d06..318e136f44 100644 --- a/packages/gamut-styles/src/__tests__/testUtils.tsx +++ b/packages/gamut-styles/src/__tests__/testUtils.tsx @@ -1,6 +1,6 @@ import { setupRtl as setupRtlBase } from 'component-test-setup'; import overArgs from 'lodash/overArgs'; -import * as React from 'react'; +import type * as React from 'react'; import { GamutProvider } from '../GamutProvider'; import { coreTheme as theme } from '../themes'; diff --git a/packages/gamut-styles/src/cache/createEmotionCache.ts b/packages/gamut-styles/src/cache/createEmotionCache.ts index 234dc8a0b4..806285015d 100644 --- a/packages/gamut-styles/src/cache/createEmotionCache.ts +++ b/packages/gamut-styles/src/cache/createEmotionCache.ts @@ -1,4 +1,5 @@ -import createCache, { Options, StylisPlugin } from '@emotion/cache'; +import type { Options, StylisPlugin } from '@emotion/cache'; +import createCache from '@emotion/cache'; import { prefixer } from 'stylis'; import { focusVisible } from './stylisPlugins'; diff --git a/packages/gamut-styles/src/cache/stylisPlugins/focusVisible.ts b/packages/gamut-styles/src/cache/stylisPlugins/focusVisible.ts index 2cd50d8a99..2d6f278fb8 100644 --- a/packages/gamut-styles/src/cache/stylisPlugins/focusVisible.ts +++ b/packages/gamut-styles/src/cache/stylisPlugins/focusVisible.ts @@ -1,4 +1,4 @@ -import { StylisPlugin } from '@emotion/cache'; +import type { StylisPlugin } from '@emotion/cache'; export const focusVisible: StylisPlugin = (element) => { if (element.type === 'rule' && element.value.includes(':focus-visible')) { diff --git a/packages/gamut-styles/src/globals/Reboot.tsx b/packages/gamut-styles/src/globals/Reboot.tsx index b149315868..511d19d8c7 100644 --- a/packages/gamut-styles/src/globals/Reboot.tsx +++ b/packages/gamut-styles/src/globals/Reboot.tsx @@ -1,5 +1,6 @@ -import { css, Global, Theme } from '@emotion/react'; -import * as React from 'react'; +import type { Theme } from '@emotion/react'; +import { css, Global } from '@emotion/react'; +import type * as React from 'react'; export const Reboot: React.FC<{ theme: Theme }> = ({ theme }) => { const { useLogicalProperties } = theme; diff --git a/packages/gamut-styles/src/globals/Typography.tsx b/packages/gamut-styles/src/globals/Typography.tsx index eb4cb09b8a..f77f7fe9d4 100644 --- a/packages/gamut-styles/src/globals/Typography.tsx +++ b/packages/gamut-styles/src/globals/Typography.tsx @@ -1,8 +1,9 @@ import { css, Global } from '@emotion/react'; -import * as React from 'react'; +import type * as React from 'react'; -import { coreTheme } from '../themes'; -import { FontConfig, getFonts } from '../utilities/fontUtils'; +import type { coreTheme } from '../themes'; +import type { FontConfig } from '../utilities/fontUtils'; +import { getFonts } from '../utilities/fontUtils'; /** * Typography component that applies global typography styles to the application. diff --git a/packages/gamut-styles/src/globals/Variables.tsx b/packages/gamut-styles/src/globals/Variables.tsx index a1308ca7be..a44616c0db 100644 --- a/packages/gamut-styles/src/globals/Variables.tsx +++ b/packages/gamut-styles/src/globals/Variables.tsx @@ -1,6 +1,6 @@ import { css, Global } from '@emotion/react'; -import { CSSObject } from '@skillsoft/variance'; -import * as React from 'react'; +import type { CSSObject } from '@skillsoft/variance'; +import type * as React from 'react'; const scopeVariables = (vars: CSSObject, scope = ':root') => css({ [scope]: vars }); diff --git a/packages/gamut-styles/src/styles/responsive.ts b/packages/gamut-styles/src/styles/responsive.ts index ab1ffd6894..2f4d481dbb 100644 --- a/packages/gamut-styles/src/styles/responsive.ts +++ b/packages/gamut-styles/src/styles/responsive.ts @@ -1,6 +1,8 @@ -import { css, SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/react'; +import { css } from '@emotion/react'; -import { mediaQueries, MediaSize } from '../variables/responsive'; +import type { MediaSize } from '../variables/responsive'; +import { mediaQueries } from '../variables/responsive'; export const atViewport = ( size: MediaSize, diff --git a/packages/gamut-styles/src/styles/transitionConcat.ts b/packages/gamut-styles/src/styles/transitionConcat.ts index b95f12d305..a6cfea7674 100644 --- a/packages/gamut-styles/src/styles/transitionConcat.ts +++ b/packages/gamut-styles/src/styles/transitionConcat.ts @@ -1,4 +1,4 @@ -import { Property, StandardPropertiesHyphen } from 'csstype'; +import type { Property, StandardPropertiesHyphen } from 'csstype'; import { timing } from '../variables'; diff --git a/packages/gamut-styles/src/utilities/__tests__/useLogicalProperties.test.tsx b/packages/gamut-styles/src/utilities/__tests__/useLogicalProperties.test.tsx index 7b00e42d5e..7de837eed5 100644 --- a/packages/gamut-styles/src/utilities/__tests__/useLogicalProperties.test.tsx +++ b/packages/gamut-styles/src/utilities/__tests__/useLogicalProperties.test.tsx @@ -1,5 +1,6 @@ -import { Theme, ThemeProvider } from '@emotion/react'; -import * as React from 'react'; +import type { Theme } from '@emotion/react'; +import { ThemeProvider } from '@emotion/react'; +import type * as React from 'react'; import { setupRtl } from '../../__tests__/testUtils'; import { coreTheme as theme } from '../../themes'; diff --git a/packages/gamut-styles/src/utilities/fontUtils.ts b/packages/gamut-styles/src/utilities/fontUtils.ts index 11d3fe9a56..3dcb15171b 100644 --- a/packages/gamut-styles/src/utilities/fontUtils.ts +++ b/packages/gamut-styles/src/utilities/fontUtils.ts @@ -1,5 +1,5 @@ -import { Theme } from '@emotion/react'; -import * as React from 'react'; +import type { Theme } from '@emotion/react'; +import type * as React from 'react'; import { webFonts } from '../remoteAssets/fonts'; diff --git a/packages/gamut-styles/src/utilities/themed.ts b/packages/gamut-styles/src/utilities/themed.ts index ded2152593..48601cc4f4 100644 --- a/packages/gamut-styles/src/utilities/themed.ts +++ b/packages/gamut-styles/src/utilities/themed.ts @@ -1,5 +1,5 @@ -import { Theme } from '@emotion/react'; -import { Path, PathValue } from '@skillsoft/variance'; +import type { Theme } from '@emotion/react'; +import type { Path, PathValue } from '@skillsoft/variance'; import get from 'lodash/get'; /** diff --git a/packages/gamut-styles/src/variance/utils.ts b/packages/gamut-styles/src/variance/utils.ts index f29b7bef66..c6cf8a1033 100644 --- a/packages/gamut-styles/src/variance/utils.ts +++ b/packages/gamut-styles/src/variance/utils.ts @@ -1,5 +1,5 @@ import isPropValid from '@emotion/is-prop-valid'; -import { ThemeProps } from '@skillsoft/variance'; +import type { ThemeProps } from '@skillsoft/variance'; import type React from 'react'; import { all as allProps } from './config'; diff --git a/packages/gamut-tests/src/index.tsx b/packages/gamut-tests/src/index.tsx index 7fcf520fc4..bc5de7283f 100644 --- a/packages/gamut-tests/src/index.tsx +++ b/packages/gamut-tests/src/index.tsx @@ -1,7 +1,7 @@ import { GamutProvider, theme } from '@skillsoft/gamut-styles'; import { setupRtl as setupRtlBase } from 'component-test-setup'; import overArgs from 'lodash/overArgs'; -import * as React from 'react'; +import type * as React from 'react'; // See https://skillsoftdev.atlassian.net/wiki/spaces/779a16d9c7ea452eab11b39cbbe771ce/pages/4441315387/Frontend+Unit+Tests for more info diff --git a/packages/gamut/src/Alert/Alert.tsx b/packages/gamut/src/Alert/Alert.tsx index b6c8497255..d61feb3391 100644 --- a/packages/gamut/src/Alert/Alert.tsx +++ b/packages/gamut/src/Alert/Alert.tsx @@ -6,10 +6,11 @@ import { useMeasure } from 'react-use'; import { Rotation } from '../Animation'; import { Box } from '../Box'; -import { FillButton, IconButton, TextButton } from '../Button'; -import { CloseButtonProps } from '../Modals/types'; +import type { FillButton } from '../Button'; +import { IconButton, TextButton } from '../Button'; +import type { CloseButtonProps } from '../Modals/types'; import { ToolTip } from '../Tip/ToolTip'; -import { WithChildrenProp } from '../utils'; +import type { WithChildrenProp } from '../utils'; import { AlertBanner, AlertBox, diff --git a/packages/gamut/src/Alert/elements.tsx b/packages/gamut/src/Alert/elements.tsx index 570a30b9e1..caae1f4d8b 100644 --- a/packages/gamut/src/Alert/elements.tsx +++ b/packages/gamut/src/Alert/elements.tsx @@ -1,11 +1,12 @@ import styled from '@emotion/styled'; import { Background, css } from '@skillsoft/gamut-styles'; import { motion } from 'framer-motion'; -import { ComponentProps, forwardRef } from 'react'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; import { Box } from '../Box'; import { FillButton } from '../Button'; -import { AlertProps } from './Alert'; +import type { AlertProps } from './Alert'; import { placementVariants } from './variants'; const StyledAlertBanner = diff --git a/packages/gamut/src/Anchor/index.tsx b/packages/gamut/src/Anchor/index.tsx index 44c61cf84a..34af1ecbb7 100644 --- a/packages/gamut/src/Anchor/index.tsx +++ b/packages/gamut/src/Anchor/index.tsx @@ -1,20 +1,17 @@ import styled from '@emotion/styled'; import { styledOptions, system, variant } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; -import { - ComponentProps, - ComponentType, - forwardRef, - HTMLProps, - Ref, -} from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; +import type { ComponentProps, ComponentType, HTMLProps, Ref } from 'react'; +import { forwardRef } from 'react'; import { ButtonBase, InteractiveSelectors, narrowButtonBaseRef, } from '../ButtonBase/ButtonBase'; -import { AppendedIconProps, appendIconToContent } from '../helpers'; +import type { AppendedIconProps } from '../helpers'; +import { appendIconToContent } from '../helpers'; export interface AnchorProps extends StyleProps, diff --git a/packages/gamut/src/Animation/ExpandInCollapseOut.tsx b/packages/gamut/src/Animation/ExpandInCollapseOut.tsx index 7d86666b85..c0c49a741d 100644 --- a/packages/gamut/src/Animation/ExpandInCollapseOut.tsx +++ b/packages/gamut/src/Animation/ExpandInCollapseOut.tsx @@ -1,7 +1,7 @@ import { timingValues } from '@skillsoft/gamut-styles'; import { motion } from 'framer-motion'; -import { WithChildrenProp } from '../utils'; +import type { WithChildrenProp } from '../utils'; export const ExpandInCollapseOut: React.FC = ({ children, diff --git a/packages/gamut/src/Animation/FadeInSlideOut.tsx b/packages/gamut/src/Animation/FadeInSlideOut.tsx index 4c8bb7ab4b..36a5098d2c 100644 --- a/packages/gamut/src/Animation/FadeInSlideOut.tsx +++ b/packages/gamut/src/Animation/FadeInSlideOut.tsx @@ -1,9 +1,9 @@ import { timingValues } from '@skillsoft/gamut-styles'; import { motion } from 'framer-motion'; -import * as React from 'react'; +import type * as React from 'react'; import { Box } from '../Box'; -import { WithChildrenProp } from '../utils'; +import type { WithChildrenProp } from '../utils'; const exitDuration = timingValues.fast / 1000; diff --git a/packages/gamut/src/Animation/Rotation.tsx b/packages/gamut/src/Animation/Rotation.tsx index 0bef1f06dd..8681cc13a2 100644 --- a/packages/gamut/src/Animation/Rotation.tsx +++ b/packages/gamut/src/Animation/Rotation.tsx @@ -1,8 +1,8 @@ import { timingValues } from '@skillsoft/gamut-styles'; import { motion } from 'framer-motion'; -import * as React from 'react'; +import type * as React from 'react'; -import { WithChildrenProp } from '../utils'; +import type { WithChildrenProp } from '../utils'; export interface RotationProps extends WithChildrenProp { /** diff --git a/packages/gamut/src/Badge/index.tsx b/packages/gamut/src/Badge/index.tsx index 17f602f57c..5a0da3b84a 100644 --- a/packages/gamut/src/Badge/index.tsx +++ b/packages/gamut/src/Badge/index.tsx @@ -1,14 +1,11 @@ import styled from '@emotion/styled'; -import { - Colors, - styledOptions, - system, - variant, -} from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; +import type { Colors } from '@skillsoft/gamut-styles'; +import { styledOptions, system, variant } from '@skillsoft/gamut-styles'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; import { appendIconToContent } from '../helpers'; -import { IconComponentType, WithChildrenProp } from '../utils'; +import type { IconComponentType, WithChildrenProp } from '../utils'; import { determineIconSize, determineIconSpacing } from './helpers'; const colorVariants = variant({ diff --git a/packages/gamut/src/BarChart/BarChartProvider.tsx b/packages/gamut/src/BarChart/BarChartProvider.tsx index d557a94149..37a540baf8 100644 --- a/packages/gamut/src/BarChart/BarChartProvider.tsx +++ b/packages/gamut/src/BarChart/BarChartProvider.tsx @@ -1,10 +1,8 @@ import { createContext } from 'react'; -import { - BarChartTranslations, - defaultBarChartTranslations, -} from './shared/translations'; -import { BarChartStyles, MaxScaleValue } from './shared/types'; +import type { BarChartTranslations } from './shared/translations'; +import { defaultBarChartTranslations } from './shared/translations'; +import type { BarChartStyles, MaxScaleValue } from './shared/types'; export interface BarChartContextProps { maxScaleValue: MaxScaleValue; diff --git a/packages/gamut/src/BarChart/BarRow/ValueLabelsContent.tsx b/packages/gamut/src/BarChart/BarRow/ValueLabelsContent.tsx index 8d14d6c357..7dcc081a21 100644 --- a/packages/gamut/src/BarChart/BarRow/ValueLabelsContent.tsx +++ b/packages/gamut/src/BarChart/BarRow/ValueLabelsContent.tsx @@ -2,7 +2,7 @@ import { MiniArrowRightIcon } from '@skillsoft/gamut-icons'; import { Text } from '../../Typography'; import { iconPadding } from '../shared/styles'; -import { BarChartStyles } from '../shared/types'; +import type { BarChartStyles } from '../shared/types'; export type ValueLabelsContentProps = { seriesOneFormatted: string; diff --git a/packages/gamut/src/BarChart/BarRow/index.tsx b/packages/gamut/src/BarChart/BarRow/index.tsx index c7a41c0841..0eb199c120 100644 --- a/packages/gamut/src/BarChart/BarRow/index.tsx +++ b/packages/gamut/src/BarChart/BarRow/index.tsx @@ -1,15 +1,10 @@ -import { - forwardRef, - MouseEventHandler, - MutableRefObject, - useMemo, - useRef, -} from 'react'; +import type { MouseEventHandler, MutableRefObject } from 'react'; +import { forwardRef, useMemo, useRef } from 'react'; import { Box, FlexBox } from '../../Box'; import { Text } from '../../Typography'; import { iconPadding, iconWidth, minBarWidth } from '../shared/styles'; -import { BarProps } from '../shared/types'; +import type { BarProps } from '../shared/types'; import { calculateBarWidth, formatValueWithUnit, diff --git a/packages/gamut/src/BarChart/__tests__/BarChart.test.tsx b/packages/gamut/src/BarChart/__tests__/BarChart.test.tsx index d14d16b381..c792d0f30c 100644 --- a/packages/gamut/src/BarChart/__tests__/BarChart.test.tsx +++ b/packages/gamut/src/BarChart/__tests__/BarChart.test.tsx @@ -1,11 +1,12 @@ import { TerminalIcon } from '@skillsoft/gamut-icons'; import { setupRtl } from '@skillsoft/gamut-tests'; import userEvent from '@testing-library/user-event'; -import { act, HTMLProps } from 'react'; +import type { HTMLProps } from 'react'; +import { act } from 'react'; -import { ButtonProps } from '../../Button'; +import type { ButtonProps } from '../../Button'; import { BarChart } from '..'; -import { BarProps } from '../shared/types'; +import type { BarProps } from '../shared/types'; const defaultBarValues = [ { categoryLabel: 'Python', seriesOneValue: 100 }, diff --git a/packages/gamut/src/BarChart/index.tsx b/packages/gamut/src/BarChart/index.tsx index c8dbbf18a6..9175420228 100644 --- a/packages/gamut/src/BarChart/index.tsx +++ b/packages/gamut/src/BarChart/index.tsx @@ -7,14 +7,14 @@ import { BarRow } from './BarRow'; import { GridLines } from './layout/GridLines'; import { ScaleChartHeader } from './layout/ScaleChartHeader'; import { BarsList } from './shared/elements'; -import { +import type { BarChartSingleValueBarSummaryContext, BarChartStackedSummaryContext, BarChartTranslations, - defaultBarChartTranslations, PartialBarChartTranslations, } from './shared/translations'; -import { BarChartProps, BarProps, InferBarType } from './shared/types'; +import { defaultBarChartTranslations } from './shared/translations'; +import type { BarChartProps, BarProps, InferBarType } from './shared/types'; import { StyledFormGroupLabel, WidthSelect } from './SortSelect'; import { getBarRowKey } from './utils'; import { useBarChart, useBarChartSort } from './utils/hooks'; diff --git a/packages/gamut/src/BarChart/layout/GridLines.tsx b/packages/gamut/src/BarChart/layout/GridLines.tsx index b10e3c1470..030fe50aa7 100644 --- a/packages/gamut/src/BarChart/layout/GridLines.tsx +++ b/packages/gamut/src/BarChart/layout/GridLines.tsx @@ -1,9 +1,10 @@ import styled from '@emotion/styled'; import { css } from '@skillsoft/gamut-styles'; -import React, { useMemo } from 'react'; +import type React from 'react'; +import { useMemo } from 'react'; import { Box } from '../../Box'; -import { ScaleAxisLayoutProps } from '../shared/types'; +import type { ScaleAxisLayoutProps } from '../shared/types'; import { useLabelPositions } from '../utils/hooks'; import { LabelSpacer } from './LabelSpacer'; diff --git a/packages/gamut/src/BarChart/layout/LabelSpacer.tsx b/packages/gamut/src/BarChart/layout/LabelSpacer.tsx index edaaedb199..24be3404c0 100644 --- a/packages/gamut/src/BarChart/layout/LabelSpacer.tsx +++ b/packages/gamut/src/BarChart/layout/LabelSpacer.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { css } from '@skillsoft/gamut-styles'; -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Box } from '../../Box'; import { barListItemPadding } from '../shared/styles'; diff --git a/packages/gamut/src/BarChart/layout/ScaleChartHeader.tsx b/packages/gamut/src/BarChart/layout/ScaleChartHeader.tsx index d76870d7da..15129175ad 100644 --- a/packages/gamut/src/BarChart/layout/ScaleChartHeader.tsx +++ b/packages/gamut/src/BarChart/layout/ScaleChartHeader.tsx @@ -1,10 +1,11 @@ import styled from '@emotion/styled'; import { css } from '@skillsoft/gamut-styles'; -import React, { useMemo } from 'react'; +import type React from 'react'; +import { useMemo } from 'react'; import { Box, FlexBox } from '../../Box'; import { Text } from '../../Typography'; -import { ScaleAxisLayoutProps } from '../shared/types'; +import type { ScaleAxisLayoutProps } from '../shared/types'; import { formatNumberUnitCompact } from '../utils'; import { useBarChartContext, useLabelPositions } from '../utils/hooks'; import { LabelSpacer } from './LabelSpacer'; diff --git a/packages/gamut/src/BarChart/shared/types.tsx b/packages/gamut/src/BarChart/shared/types.tsx index c98c17a65e..e7e0dd7108 100644 --- a/packages/gamut/src/BarChart/shared/types.tsx +++ b/packages/gamut/src/BarChart/shared/types.tsx @@ -1,12 +1,12 @@ -import { GamutIconProps } from '@skillsoft/gamut-icons'; -import { ColorAlias } from '@skillsoft/gamut-styles'; -import { ComponentProps, HTMLProps } from 'react'; +import type { GamutIconProps } from '@skillsoft/gamut-icons'; +import type { ColorAlias } from '@skillsoft/gamut-styles'; +import type { ComponentProps, HTMLProps } from 'react'; -import { ButtonProps } from '../../Button'; -import { Text } from '../../Typography/Text'; -import { HeadingTags } from '../../Typography/types'; -import { CustomSortOption } from '../utils/hooks'; -import { PartialBarChartTranslations } from './translations'; +import type { ButtonProps } from '../../Button'; +import type { Text } from '../../Typography/Text'; +import type { HeadingTags } from '../../Typography/types'; +import type { CustomSortOption } from '../utils/hooks'; +import type { PartialBarChartTranslations } from './translations'; type titleType = | string diff --git a/packages/gamut/src/BarChart/utils/hooks.ts b/packages/gamut/src/BarChart/utils/hooks.ts index 12348ef0a3..0dade7e0d6 100644 --- a/packages/gamut/src/BarChart/utils/hooks.ts +++ b/packages/gamut/src/BarChart/utils/hooks.ts @@ -1,4 +1,5 @@ -import { Colors, isColorAlias, useColorModes } from '@skillsoft/gamut-styles'; +import type { Colors } from '@skillsoft/gamut-styles'; +import { isColorAlias, useColorModes } from '@skillsoft/gamut-styles'; import { getContrast } from 'polished'; import { useCallback, @@ -10,14 +11,11 @@ import { useState, } from 'react'; -import { SelectOptions } from '../../Form/inputs/Select'; -import { - BarChartContext, - BarChartContextProps, - defaultStyleConfig, -} from '../BarChartProvider'; -import { BarChartTranslations } from '../shared/translations'; -import { +import type { SelectOptions } from '../../Form/inputs/Select'; +import type { BarChartContextProps } from '../BarChartProvider'; +import { BarChartContext, defaultStyleConfig } from '../BarChartProvider'; +import type { BarChartTranslations } from '../shared/translations'; +import type { BarChartStyles, BarProps, InferBarType, diff --git a/packages/gamut/src/BarChart/utils/index.tsx b/packages/gamut/src/BarChart/utils/index.tsx index c98b3f3c49..6dee493e27 100644 --- a/packages/gamut/src/BarChart/utils/index.tsx +++ b/packages/gamut/src/BarChart/utils/index.tsx @@ -1,9 +1,9 @@ +import type { BarChartTranslations } from '../shared/translations'; import { - BarChartTranslations, getDefaultSingleValueBarSummary, getDefaultStackedBarSummary, } from '../shared/translations'; -import { +import type { BarChartUnit, BarProps, MaxScaleValue, diff --git a/packages/gamut/src/BodyPortal/index.tsx b/packages/gamut/src/BodyPortal/index.tsx index 1b31b9bf60..6eb3f59994 100644 --- a/packages/gamut/src/BodyPortal/index.tsx +++ b/packages/gamut/src/BodyPortal/index.tsx @@ -1,7 +1,7 @@ import styled from '@emotion/styled'; import { ColorMode, system, useCurrentMode } from '@skillsoft/gamut-styles'; +import type * as React from 'react'; import { useState } from 'react'; -import * as React from 'react'; import ReactDOM from 'react-dom'; import { useIsomorphicLayoutEffect } from 'react-use'; diff --git a/packages/gamut/src/Box/Box.tsx b/packages/gamut/src/Box/Box.tsx index 12d85e387f..81b6c7ccee 100644 --- a/packages/gamut/src/Box/Box.tsx +++ b/packages/gamut/src/Box/Box.tsx @@ -1,7 +1,8 @@ import styled from '@emotion/styled'; import { styledOptions } from '@skillsoft/gamut-styles'; -import { BoxProps, boxProps, sharedStates } from './props'; +import type { BoxProps } from './props'; +import { boxProps, sharedStates } from './props'; export const Box = styled('div', styledOptions(['fit']))( sharedStates, diff --git a/packages/gamut/src/Box/FlexBox.tsx b/packages/gamut/src/Box/FlexBox.tsx index e6ccc4b410..582d42dd64 100644 --- a/packages/gamut/src/Box/FlexBox.tsx +++ b/packages/gamut/src/Box/FlexBox.tsx @@ -1,7 +1,8 @@ import styled from '@emotion/styled'; import { css, styledOptions } from '@skillsoft/gamut-styles'; -import { boxProps, FlexBoxProps, flexStates, sharedStates } from './props'; +import type { FlexBoxProps } from './props'; +import { boxProps, flexStates, sharedStates } from './props'; export const FlexBox = styled( 'div', diff --git a/packages/gamut/src/Box/GridBox.tsx b/packages/gamut/src/Box/GridBox.tsx index 6ba4cf869d..788c26995d 100644 --- a/packages/gamut/src/Box/GridBox.tsx +++ b/packages/gamut/src/Box/GridBox.tsx @@ -1,7 +1,8 @@ import styled from '@emotion/styled'; import { styledOptions, system } from '@skillsoft/gamut-styles'; -import { boxProps, GridBoxProps, gridStates, sharedStates } from './props'; +import type { GridBoxProps } from './props'; +import { boxProps, gridStates, sharedStates } from './props'; export const GridBox = styled( 'div', diff --git a/packages/gamut/src/Box/props.ts b/packages/gamut/src/Box/props.ts index e7cde50c5d..1c21c4f69d 100644 --- a/packages/gamut/src/Box/props.ts +++ b/packages/gamut/src/Box/props.ts @@ -1,7 +1,8 @@ import { system } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; -import { WithChildrenProp } from '../utils'; +import type { WithChildrenProp } from '../utils'; export const boxProps = variance.compose( system.space, diff --git a/packages/gamut/src/Breadcrumbs/index.tsx b/packages/gamut/src/Breadcrumbs/index.tsx index abc791d996..4d204cbe0f 100644 --- a/packages/gamut/src/Breadcrumbs/index.tsx +++ b/packages/gamut/src/Breadcrumbs/index.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { css } from '@skillsoft/gamut-styles'; -import * as React from 'react'; +import type * as React from 'react'; import { Anchor } from '../Anchor'; import { Box, FlexBox } from '../Box'; diff --git a/packages/gamut/src/Button/FillButton.tsx b/packages/gamut/src/Button/FillButton.tsx index f88710127a..a7d137a6f3 100644 --- a/packages/gamut/src/Button/FillButton.tsx +++ b/packages/gamut/src/Button/FillButton.tsx @@ -1,11 +1,11 @@ import { forwardRef } from 'react'; -import { ButtonBaseElements } from '../ButtonBase/ButtonBase'; +import type { ButtonBaseElements } from '../ButtonBase/ButtonBase'; +import type { InlineIconButtonProps } from './shared'; import { createButtonComponent, fillButtonVariants, InlineIconButton, - InlineIconButtonProps, sizeVariants, } from './shared'; diff --git a/packages/gamut/src/Button/IconButton.tsx b/packages/gamut/src/Button/IconButton.tsx index 1e20022921..d95f767b87 100644 --- a/packages/gamut/src/Button/IconButton.tsx +++ b/packages/gamut/src/Button/IconButton.tsx @@ -1,8 +1,10 @@ -import { ComponentProps, forwardRef } from 'react'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; -import { ButtonBaseElements } from '../ButtonBase/ButtonBase'; -import { ToolTip, ToolTipProps } from '../Tip/ToolTip'; -import { IconComponentType } from '../utils'; +import type { ButtonBaseElements } from '../ButtonBase/ButtonBase'; +import type { ToolTipProps } from '../Tip/ToolTip'; +import { ToolTip } from '../Tip/ToolTip'; +import type { IconComponentType } from '../utils'; import { createButtonComponent, iconSizeMapping, diff --git a/packages/gamut/src/Button/StrokeButton.tsx b/packages/gamut/src/Button/StrokeButton.tsx index bd4c8b5a2f..6427fd51a3 100644 --- a/packages/gamut/src/Button/StrokeButton.tsx +++ b/packages/gamut/src/Button/StrokeButton.tsx @@ -1,10 +1,10 @@ import { forwardRef } from 'react'; -import { ButtonBaseElements } from '../ButtonBase/ButtonBase'; +import type { ButtonBaseElements } from '../ButtonBase/ButtonBase'; +import type { InlineIconButtonProps } from './shared'; import { createButtonComponent, InlineIconButton, - InlineIconButtonProps, sizeVariants, strokeButtonVariants, } from './shared'; diff --git a/packages/gamut/src/Button/TextButton.tsx b/packages/gamut/src/Button/TextButton.tsx index 49bafaa1d4..83b87b6c6e 100644 --- a/packages/gamut/src/Button/TextButton.tsx +++ b/packages/gamut/src/Button/TextButton.tsx @@ -1,10 +1,10 @@ import { forwardRef } from 'react'; -import { ButtonBaseElements } from '../ButtonBase/ButtonBase'; +import type { ButtonBaseElements } from '../ButtonBase/ButtonBase'; +import type { InlineIconButtonProps } from './shared'; import { createButtonComponent, InlineIconButton, - InlineIconButtonProps, sizeVariants, textButtonVariants, } from './shared'; diff --git a/packages/gamut/src/Button/__tests__/mocks.tsx b/packages/gamut/src/Button/__tests__/mocks.tsx index 849ad5bcd4..df7e2c0b5d 100644 --- a/packages/gamut/src/Button/__tests__/mocks.tsx +++ b/packages/gamut/src/Button/__tests__/mocks.tsx @@ -1,6 +1,7 @@ import { ColorMode } from '@skillsoft/gamut-styles'; import { MockGamutProvider } from '@skillsoft/gamut-tests'; -import React, { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; +import type React from 'react'; import { Box } from '../../Box'; import { IconButton } from '..'; diff --git a/packages/gamut/src/Button/shared/InlineIconButton.tsx b/packages/gamut/src/Button/shared/InlineIconButton.tsx index 7425b89a5f..cf3ae6d82c 100644 --- a/packages/gamut/src/Button/shared/InlineIconButton.tsx +++ b/packages/gamut/src/Button/shared/InlineIconButton.tsx @@ -1,10 +1,10 @@ import { forwardRef } from 'react'; -import { ButtonBaseElements } from '../../ButtonBase/ButtonBase'; +import type { ButtonBaseElements } from '../../ButtonBase/ButtonBase'; import { appendIconToContent } from '../../helpers'; -import { FillButtonProps } from '../FillButton'; -import { StrokeButtonProps } from '../StrokeButton'; -import { TextButtonProps } from '../TextButton'; +import type { FillButtonProps } from '../FillButton'; +import type { StrokeButtonProps } from '../StrokeButton'; +import type { TextButtonProps } from '../TextButton'; type InlineIconButtonComponents = | FillButtonProps diff --git a/packages/gamut/src/Button/shared/styles.ts b/packages/gamut/src/Button/shared/styles.ts index fe68ba1fc4..28940519f8 100644 --- a/packages/gamut/src/Button/shared/styles.ts +++ b/packages/gamut/src/Button/shared/styles.ts @@ -6,10 +6,11 @@ import { system, transitionConcat, } from '@skillsoft/gamut-styles'; -import { CSSObject, ThemeProps, variance } from '@skillsoft/variance'; +import type { CSSObject, ThemeProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; import { ButtonBase, InteractiveSelectors } from '../../ButtonBase/ButtonBase'; -import { ButtonBaseProps } from './types'; +import type { ButtonBaseProps } from './types'; export const config = styledOptions<'button', 'size'>(['size']); diff --git a/packages/gamut/src/Button/shared/types.ts b/packages/gamut/src/Button/shared/types.ts index ce180c7a21..4a946a63a5 100644 --- a/packages/gamut/src/Button/shared/types.ts +++ b/packages/gamut/src/Button/shared/types.ts @@ -1,15 +1,15 @@ -import { ColorModes } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { ComponentProps, HTMLProps } from 'react'; +import type { ColorModes } from '@skillsoft/gamut-styles'; +import type { StyleProps } from '@skillsoft/variance'; +import type { ComponentProps, HTMLProps } from 'react'; -import { ButtonBase } from '../../ButtonBase'; -import { IconComponentType } from '../../utils'; -import { CTAButton } from '../CTAButton'; -import { FillButton } from '../FillButton'; -import { IconButton } from '../IconButton'; -import { StrokeButton } from '../StrokeButton'; -import { TextButton } from '../TextButton'; -import { buttonProps, buttonVariants } from './styles'; +import type { ButtonBase } from '../../ButtonBase'; +import type { IconComponentType } from '../../utils'; +import type { CTAButton } from '../CTAButton'; +import type { FillButton } from '../FillButton'; +import type { IconButton } from '../IconButton'; +import type { StrokeButton } from '../StrokeButton'; +import type { TextButton } from '../TextButton'; +import type { buttonProps, buttonVariants } from './styles'; export interface ButtonBaseProps extends StyleProps { onClick?: HTMLProps['onClick']; diff --git a/packages/gamut/src/ButtonBase/ButtonBase.tsx b/packages/gamut/src/ButtonBase/ButtonBase.tsx index 418ce142f1..bfc40c21ae 100644 --- a/packages/gamut/src/ButtonBase/ButtonBase.tsx +++ b/packages/gamut/src/ButtonBase/ButtonBase.tsx @@ -1,6 +1,7 @@ import styled from '@emotion/styled'; import { css, styledOptions } from '@skillsoft/gamut-styles'; -import { ComponentProps, forwardRef, HTMLProps, Ref } from 'react'; +import type { ComponentProps, HTMLProps, Ref } from 'react'; +import { forwardRef } from 'react'; export type ButtonBaseElements = HTMLAnchorElement | HTMLButtonElement; export type ButtonBaseRef = Ref; diff --git a/packages/gamut/src/Card/elements.tsx b/packages/gamut/src/Card/elements.tsx index d38a348968..8b2280db61 100644 --- a/packages/gamut/src/Card/elements.tsx +++ b/packages/gamut/src/Card/elements.tsx @@ -4,7 +4,7 @@ import { motion } from 'framer-motion'; import { Box } from '../Box'; import { cardVariants, shadowVariants } from './styles'; -import { CardWrapperProps } from './types'; +import type { CardWrapperProps } from './types'; export const MotionBox = motion.create(Box); diff --git a/packages/gamut/src/Card/index.tsx b/packages/gamut/src/Card/index.tsx index c2642d01db..ed9db004d9 100644 --- a/packages/gamut/src/Card/index.tsx +++ b/packages/gamut/src/Card/index.tsx @@ -1,10 +1,11 @@ import { CheckerDense } from '@skillsoft/gamut-patterns'; -import { borderRadii, Colors } from '@skillsoft/gamut-styles'; -import * as React from 'react'; +import type { Colors } from '@skillsoft/gamut-styles'; +import { borderRadii } from '@skillsoft/gamut-styles'; +import type * as React from 'react'; import { DynamicCardWrapper, MotionBox, StaticCardWrapper } from './elements'; import { patternFadeInOut, useCardElevation } from './styles'; -import { CardProps } from './types'; +import type { CardProps } from './types'; type BorderRadiusToken = keyof typeof borderRadii; diff --git a/packages/gamut/src/Card/styles.tsx b/packages/gamut/src/Card/styles.tsx index a64a616ca2..c251251bbd 100644 --- a/packages/gamut/src/Card/styles.tsx +++ b/packages/gamut/src/Card/styles.tsx @@ -1,11 +1,8 @@ -import { Theme, useTheme } from '@emotion/react'; -import { - ElevationState, - theme, - timingValues, - variant, -} from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { Theme } from '@emotion/react'; +import { useTheme } from '@emotion/react'; +import type { ElevationState } from '@skillsoft/gamut-styles'; +import { theme, timingValues, variant } from '@skillsoft/gamut-styles'; +import type { StyleProps } from '@skillsoft/variance'; /** * The theme's elevation scale is flattened to dashcase tokens (`rest-shadow`, diff --git a/packages/gamut/src/Card/types.tsx b/packages/gamut/src/Card/types.tsx index df6f39d7f6..37007ed308 100644 --- a/packages/gamut/src/Card/types.tsx +++ b/packages/gamut/src/Card/types.tsx @@ -1,11 +1,11 @@ -import { PatternProps } from '@skillsoft/gamut-patterns'; -import { StyleProps } from '@skillsoft/variance'; -import { ComponentProps } from 'react'; +import type { PatternProps } from '@skillsoft/gamut-patterns'; +import type { StyleProps } from '@skillsoft/variance'; +import type { ComponentProps } from 'react'; -import { Box } from '../Box'; -import { WithChildrenProp } from '../utils'; -import { DynamicCardWrapper } from './elements'; -import { cardVariants, shadowVariants } from './styles'; +import type { Box } from '../Box'; +import type { WithChildrenProp } from '../utils'; +import type { DynamicCardWrapper } from './elements'; +import type { cardVariants, shadowVariants } from './styles'; export interface CardWrapperProps extends StyleProps, diff --git a/packages/gamut/src/Coachmark/index.tsx b/packages/gamut/src/Coachmark/index.tsx index 999c3c0a11..d91283e1cd 100644 --- a/packages/gamut/src/Coachmark/index.tsx +++ b/packages/gamut/src/Coachmark/index.tsx @@ -1,13 +1,13 @@ +import type * as React from 'react'; import { useRef } from 'react'; -import * as React from 'react'; import { DelayedRenderWrapper } from '../DelayedRenderWrapper'; -import { - Popover, +import type { PopoverFocusProps, PopoverProps, PopoverYPositionType, } from '../Popover'; +import { Popover } from '../Popover'; export type CoachmarkProps = PopoverFocusProps & { /** diff --git a/packages/gamut/src/ConnectedForm/ConnectedForm.tsx b/packages/gamut/src/ConnectedForm/ConnectedForm.tsx index f9fa259d0a..bde26292f4 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedForm.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedForm.tsx @@ -1,21 +1,20 @@ import { forwardRef, useEffect, useMemo } from 'react'; import * as React from 'react'; -import { +import type { FieldValues, - FormProvider, FormProviderProps, Mode, Path, RegisterOptions, SubmitErrorHandler, SubmitHandler, - useForm, UseFormProps, } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form'; import { Form } from '../Form'; -import { FormProps } from '../Form/elements/Form'; -import { FormValues } from '../Form/types'; +import type { FormProps } from '../Form/elements/Form'; +import type { FormValues } from '../Form/types'; import { submitSuccessStatus } from './utils'; export interface FormContextProps { diff --git a/packages/gamut/src/ConnectedForm/ConnectedFormGroup.tsx b/packages/gamut/src/ConnectedForm/ConnectedFormGroup.tsx index e998090a6d..5b2318c2c7 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedFormGroup.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedFormGroup.tsx @@ -1,15 +1,16 @@ import styled from '@emotion/styled'; import { css } from '@skillsoft/gamut-styles'; +import type * as React from 'react'; import { useEffect, useId } from 'react'; -import * as React from 'react'; -import { RegisterOptions } from 'react-hook-form'; +import type { RegisterOptions } from 'react-hook-form'; -import { FormError, FormGroup, FormGroupLabel, FormGroupProps } from '..'; import { Anchor } from '../Anchor'; +import type { FormGroupProps } from '../Form'; +import { FormError, FormGroup, FormGroupLabel } from '../Form'; import { Markdown } from '../Markdown'; -import { InfoTipSubComponentProps } from '../Tip/InfoTip/type-utils'; +import type { InfoTipSubComponentProps } from '../Tip/InfoTip/type-utils'; import { Text } from '../Typography'; -import { ConnectedField, FieldProps, SubmitContextProps } from './types'; +import type { ConnectedField, FieldProps, SubmitContextProps } from './types'; import { getErrorMessage, useField } from './utils'; const ErrorAnchor = styled(Anchor)( diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedCheckbox.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedCheckbox.tsx index a13b0c37e8..2255750d29 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedCheckbox.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedCheckbox.tsx @@ -1,10 +1,10 @@ -import * as React from 'react'; +import type * as React from 'react'; import { useId } from 'react'; import { Controller } from 'react-hook-form'; -import { Checkbox } from '../..'; -import { useField } from '..'; -import { ConnectedCheckboxProps } from './types'; +import { Checkbox } from '../../Form'; +import { useField } from '../utils'; +import type { ConnectedCheckboxProps } from './types'; export const ConnectedCheckbox: React.FC = ({ className, diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedInput.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedInput.tsx index 9ec0c7615a..ad40cc01a0 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedInput.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedInput.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { Input } from '../..'; -import { useField } from '..'; -import { ConnectedInputProps } from './types'; +import { Input } from '../../Form'; +import { useField } from '../utils'; +import type { ConnectedInputProps } from './types'; export const ConnectedInput: React.FC = ({ disabled, diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/__tests__/ConnectedNestedCheckboxes.test.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/__tests__/ConnectedNestedCheckboxes.test.tsx index c38502bbd3..52cf06dd39 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/__tests__/ConnectedNestedCheckboxes.test.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/__tests__/ConnectedNestedCheckboxes.test.tsx @@ -4,7 +4,7 @@ import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { ConnectedForm, ConnectedFormGroup, SubmitButton } from '../../..'; -import { NestedConnectedCheckboxOption } from '../../types'; +import type { NestedConnectedCheckboxOption } from '../../types'; import { ConnectedNestedCheckboxes } from '../index'; const mockOptions: NestedConnectedCheckboxOption[] = [ diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/index.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/index.tsx index 964acba677..e393187b85 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/index.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/index.tsx @@ -1,10 +1,10 @@ -import * as React from 'react'; +import type * as React from 'react'; import { useEffect, useMemo, useState } from 'react'; import { Controller } from 'react-hook-form'; -import { Box } from '../../..'; -import { useField } from '../..'; -import { ConnectedNestedCheckboxesProps } from '../types'; +import { Box } from '../../../Box'; +import { useField } from '../../utils'; +import type { ConnectedNestedCheckboxesProps } from '../types'; import { calculateStates, flattenOptions, diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/utils.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/utils.tsx index 45d387f160..e7ed301a7b 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/utils.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/utils.tsx @@ -1,6 +1,11 @@ -import { Box, Checkbox, CheckboxLabelUnion } from '../../..'; -import { NestedGridFormCheckboxOption } from '../../../GridForm/types'; -import { MinimalCheckboxProps, NestedConnectedCheckboxOption } from '../types'; +import { Box } from '../../../Box'; +import type { CheckboxLabelUnion } from '../../../Form'; +import { Checkbox } from '../../../Form'; +import type { NestedGridFormCheckboxOption } from '../../../GridForm/types'; +import type { + MinimalCheckboxProps, + NestedConnectedCheckboxOption, +} from '../types'; type FlatCheckbox = Omit & CheckboxLabelUnion & { diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadio.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadio.tsx index 7cd5f856c3..654dbb3957 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadio.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadio.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { Radio } from '../..'; -import { useField } from '..'; -import { ConnectedRadioProps } from './types'; +import { Radio } from '../../Form'; +import { useField } from '../utils'; +import type { ConnectedRadioProps } from './types'; export const ConnectedRadio: React.FC = ({ disabled, diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadioGroup.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadioGroup.tsx index cf8965b126..73f7f16f44 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadioGroup.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadioGroup.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { RadioGroup } from '../..'; -import { useField } from '..'; -import { ConnectedRadioGroupProps } from './types'; +import { RadioGroup } from '../../Form'; +import { useField } from '../utils'; +import type { ConnectedRadioGroupProps } from './types'; export const ConnectedRadioGroup: React.FC = ({ name, diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadioGroupInput.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadioGroupInput.tsx index 6656cf4c71..567ff07926 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadioGroupInput.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedRadioGroupInput.tsx @@ -1,7 +1,7 @@ -import * as React from 'react'; +import type * as React from 'react'; import { ConnectedRadio, ConnectedRadioGroup } from '.'; -import { ConnectedRadioGroupInputProps } from './types'; +import type { ConnectedRadioGroupInputProps } from './types'; export const ConnectedRadioGroupInput: React.FC< ConnectedRadioGroupInputProps diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedSelect.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedSelect.tsx index d00138eaae..1967820b84 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedSelect.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedSelect.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { Select } from '../..'; -import { useField } from '..'; -import { ConnectedSelectProps } from './types'; +import { Select } from '../../Form'; +import { useField } from '../utils'; +import type { ConnectedSelectProps } from './types'; export const ConnectedSelect: React.FC = ({ disabled, diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedTextArea.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedTextArea.tsx index 8182b7fa5d..15328b96ed 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedTextArea.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedTextArea.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { TextArea } from '../..'; -import { useField } from '..'; -import { ConnectedTextAreaProps } from './types'; +import { TextArea } from '../../Form'; +import { useField } from '../utils'; +import type { ConnectedTextAreaProps } from './types'; export const ConnectedTextArea: React.FC = ({ disabled, diff --git a/packages/gamut/src/ConnectedForm/ConnectedInputs/types.tsx b/packages/gamut/src/ConnectedForm/ConnectedInputs/types.tsx index 71b4f5f6a4..0ececfa0c5 100644 --- a/packages/gamut/src/ConnectedForm/ConnectedInputs/types.tsx +++ b/packages/gamut/src/ConnectedForm/ConnectedInputs/types.tsx @@ -1,7 +1,7 @@ -import { ReactNode } from 'react'; -import { RegisterOptions } from 'react-hook-form'; +import type { ReactNode } from 'react'; +import type { RegisterOptions } from 'react-hook-form'; -import { +import type { CheckboxLabelUnion, CheckboxProps, InputWrapperProps, diff --git a/packages/gamut/src/ConnectedForm/SubmitButton.tsx b/packages/gamut/src/ConnectedForm/SubmitButton.tsx index dc33a67b21..d5a0354bfb 100644 --- a/packages/gamut/src/ConnectedForm/SubmitButton.tsx +++ b/packages/gamut/src/ConnectedForm/SubmitButton.tsx @@ -1,9 +1,10 @@ -import { ComponentType } from 'react'; -import * as React from 'react'; -import { FieldValues, FormState } from 'react-hook-form'; +import type { ComponentType } from 'react'; +import type * as React from 'react'; +import type { FieldValues, FormState } from 'react-hook-form'; import { Box, FlexBox } from '../Box'; -import { ButtonProps, FillButton } from '../Button'; +import type { ButtonProps } from '../Button'; +import { FillButton } from '../Button'; import { Spinner } from '../Loading/Spinner'; import { Text } from '../Typography'; import { useSubmitState } from './utils'; diff --git a/packages/gamut/src/ConnectedForm/__fixtures__/helpers.tsx b/packages/gamut/src/ConnectedForm/__fixtures__/helpers.tsx index e1db0a7b28..404ca38528 100644 --- a/packages/gamut/src/ConnectedForm/__fixtures__/helpers.tsx +++ b/packages/gamut/src/ConnectedForm/__fixtures__/helpers.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import type * as React from 'react'; import { ConnectedCheckbox, diff --git a/packages/gamut/src/ConnectedForm/__tests__/ConnectedForm.test.tsx b/packages/gamut/src/ConnectedForm/__tests__/ConnectedForm.test.tsx index cedf29a603..5357b93ba3 100644 --- a/packages/gamut/src/ConnectedForm/__tests__/ConnectedForm.test.tsx +++ b/packages/gamut/src/ConnectedForm/__tests__/ConnectedForm.test.tsx @@ -1,8 +1,10 @@ import { setupRtl } from '@skillsoft/gamut-tests'; -import { fireEvent, queries } from '@testing-library/dom'; -import { act, RenderResult, waitFor } from '@testing-library/react'; +import type { queries } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/dom'; +import type { RenderResult } from '@testing-library/react'; +import { act, waitFor } from '@testing-library/react'; -import { InfoTipProps } from '../../Tip/InfoTip'; +import type { InfoTipProps } from '../../Tip/InfoTip'; import { createPromise } from '../../utils'; import { ConnectedForm, diff --git a/packages/gamut/src/ConnectedForm/__tests__/SubmitButton.test.tsx b/packages/gamut/src/ConnectedForm/__tests__/SubmitButton.test.tsx index a883821314..de5ee19f62 100644 --- a/packages/gamut/src/ConnectedForm/__tests__/SubmitButton.test.tsx +++ b/packages/gamut/src/ConnectedForm/__tests__/SubmitButton.test.tsx @@ -1,6 +1,7 @@ import { theme } from '@skillsoft/gamut-styles'; import { setupRtl } from '@skillsoft/gamut-tests'; -import hookform, { FormState } from 'react-hook-form'; +import type { FormState } from 'react-hook-form'; +import hookform from 'react-hook-form'; import { CTAButton } from '../../Button'; import { SubmitButton } from '../SubmitButton'; diff --git a/packages/gamut/src/ConnectedForm/__tests__/useDebouncedField.test.tsx b/packages/gamut/src/ConnectedForm/__tests__/useDebouncedField.test.tsx index 6e18e32ed7..2b42cae829 100644 --- a/packages/gamut/src/ConnectedForm/__tests__/useDebouncedField.test.tsx +++ b/packages/gamut/src/ConnectedForm/__tests__/useDebouncedField.test.tsx @@ -1,10 +1,10 @@ import { setupRtl } from '@skillsoft/gamut-tests'; import { fireEvent } from '@testing-library/dom'; import { act } from '@testing-library/react'; -import * as React from 'react'; +import type * as React from 'react'; import { Checkbox, Input } from '../../Form'; -import { WithChildrenProp } from '../../utils'; +import type { WithChildrenProp } from '../../utils'; import { ConnectedForm } from '../ConnectedForm'; import { useDebouncedField, useFormState } from '../utils'; diff --git a/packages/gamut/src/ConnectedForm/types.ts b/packages/gamut/src/ConnectedForm/types.ts index 324697f984..2aebcc1542 100644 --- a/packages/gamut/src/ConnectedForm/types.ts +++ b/packages/gamut/src/ConnectedForm/types.ts @@ -1,6 +1,6 @@ -import { FieldValues, FormState } from 'react-hook-form'; +import type { FieldValues, FormState } from 'react-hook-form'; -import { +import type { ConnectedCheckbox, ConnectedInput, ConnectedNestedCheckboxes, @@ -8,7 +8,7 @@ import { ConnectedSelect, ConnectedTextArea, } from './ConnectedInputs'; -import { BaseConnectedFieldProps } from './ConnectedInputs/types'; +import type { BaseConnectedFieldProps } from './ConnectedInputs/types'; export type ConnectedField = | typeof ConnectedCheckbox diff --git a/packages/gamut/src/ConnectedForm/utils.tsx b/packages/gamut/src/ConnectedForm/utils.tsx index 7330477fa9..a766e320bc 100644 --- a/packages/gamut/src/ConnectedForm/utils.tsx +++ b/packages/gamut/src/ConnectedForm/utils.tsx @@ -1,34 +1,27 @@ import isNull from 'lodash/isNull'; import isUndefined from 'lodash/isUndefined'; import omit from 'lodash/omit'; -import { +import type { ChangeEvent, ChangeEventHandler, HTMLInputTypeAttribute, - useContext, - useEffect, - useMemo, - useState, } from 'react'; -import { +import { useContext, useEffect, useMemo, useState } from 'react'; +import type { FieldError, FieldErrorsImpl, Merge, Path, RegisterOptions, - useFieldArray, - useFormContext, } from 'react-hook-form'; +import { useFieldArray, useFormContext } from 'react-hook-form'; import { FormRequiredText } from '../Form'; -import { - ConnectedForm, - ConnectedFormGroup, - ConnectedFormGroupProps, - ConnectedFormProps, - FormPropsContext, -} from '.'; -import { ConnectedField, SubmitContextProps } from './types'; +import type { ConnectedFormProps } from './ConnectedForm'; +import { ConnectedForm, FormPropsContext } from './ConnectedForm'; +import type { ConnectedFormGroupProps } from './ConnectedFormGroup'; +import { ConnectedFormGroup } from './ConnectedFormGroup'; +import type { ConnectedField, SubmitContextProps } from './types'; interface ConnectedGroupStrictProps { ( diff --git a/packages/gamut/src/DataList/Controls/ExpandControl.tsx b/packages/gamut/src/DataList/Controls/ExpandControl.tsx index f8cbefdc60..215feef550 100644 --- a/packages/gamut/src/DataList/Controls/ExpandControl.tsx +++ b/packages/gamut/src/DataList/Controls/ExpandControl.tsx @@ -1,10 +1,10 @@ import { MiniChevronDownIcon } from '@skillsoft/gamut-icons'; -import * as React from 'react'; +import type * as React from 'react'; import { Rotation } from '../../Animation'; import { FlexBox } from '../../Box/FlexBox'; import { TextButton } from '../../Button/TextButton'; -import { RowChange } from '../types'; +import type { RowChange } from '../types'; export interface ExpandColProps { expanded?: boolean; diff --git a/packages/gamut/src/DataList/Controls/FilterControl.tsx b/packages/gamut/src/DataList/Controls/FilterControl.tsx index cfcdd09982..a6811066e4 100644 --- a/packages/gamut/src/DataList/Controls/FilterControl.tsx +++ b/packages/gamut/src/DataList/Controls/FilterControl.tsx @@ -2,15 +2,15 @@ import styled from '@emotion/styled'; import { FilterIcon } from '@skillsoft/gamut-icons'; import { states } from '@skillsoft/gamut-styles'; import kebabCase from 'lodash/kebabCase'; +import type * as React from 'react'; import { useRef, useState } from 'react'; -import * as React from 'react'; import { Checkbox, FlexBox, Menu, MenuItem, Text } from '../..'; import { Anchor } from '../../Anchor'; import { PopoverContainer } from '../../PopoverContainer'; import { useControlContext } from '../hooks/useListControls'; import { useListState } from '../hooks/useListState'; -import { FilterOption, OnFilter } from '../types'; +import type { FilterOption, OnFilter } from '../types'; export interface FilterProps { columnKey: string; diff --git a/packages/gamut/src/DataList/Controls/SelectControl.tsx b/packages/gamut/src/DataList/Controls/SelectControl.tsx index c3a1be3d39..b7cad89dec 100644 --- a/packages/gamut/src/DataList/Controls/SelectControl.tsx +++ b/packages/gamut/src/DataList/Controls/SelectControl.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import type * as React from 'react'; import { Checkbox } from '../../Form/inputs/Checkbox'; import { Text } from '../../Typography/Text'; -import { RowChange } from '../types'; +import type { RowChange } from '../types'; export const SelectControl: React.FC<{ disabled?: boolean; diff --git a/packages/gamut/src/DataList/Controls/SortControl.tsx b/packages/gamut/src/DataList/Controls/SortControl.tsx index e847f5b6fd..201bd06e1e 100644 --- a/packages/gamut/src/DataList/Controls/SortControl.tsx +++ b/packages/gamut/src/DataList/Controls/SortControl.tsx @@ -1,12 +1,12 @@ import styled from '@emotion/styled'; import { ArrowChevronDownFilledIcon } from '@skillsoft/gamut-icons'; import { css, states } from '@skillsoft/gamut-styles'; -import * as React from 'react'; +import type * as React from 'react'; import { Anchor } from '../..'; import { FlexBox } from '../../Box'; import { useListState } from '../hooks/useListState'; -import { OnSort, SortDirection, SortOrder } from '../types'; +import type { OnSort, SortDirection, SortOrder } from '../types'; const SortAnchor = styled(Anchor)( css({ diff --git a/packages/gamut/src/DataList/DataGrid.tsx b/packages/gamut/src/DataList/DataGrid.tsx index 81ed85b27c..42cda096af 100644 --- a/packages/gamut/src/DataList/DataGrid.tsx +++ b/packages/gamut/src/DataList/DataGrid.tsx @@ -1,14 +1,16 @@ -import { system } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { ComponentProps, useMemo } from 'react'; +import type { system } from '@skillsoft/gamut-styles'; +import type { StyleProps } from '@skillsoft/variance'; +import type { ComponentProps } from 'react'; +import { useMemo } from 'react'; import { List } from '../List'; import { EmptyRows } from './EmptyRows'; import { ListControlContext, useListControls } from './hooks/useListControls'; import { ListStateContext } from './hooks/useListState'; import { HeaderRow } from './Tables/Rows/TableHeaderRow'; -import { DataRow, MarshaledColProps } from './Tables/Rows/TableRow'; -import { ColumnConfig, DataListControls, IdentifiableKeys } from './types'; +import type { MarshaledColProps } from './Tables/Rows/TableRow'; +import { DataRow } from './Tables/Rows/TableRow'; +import type { ColumnConfig, DataListControls, IdentifiableKeys } from './types'; export interface DataGridProps< Row, diff --git a/packages/gamut/src/DataList/DataList.tsx b/packages/gamut/src/DataList/DataList.tsx index cdda4f9e9a..744657b313 100644 --- a/packages/gamut/src/DataList/DataList.tsx +++ b/packages/gamut/src/DataList/DataList.tsx @@ -1,7 +1,8 @@ -import { ReactElement } from 'react'; +import type { ReactElement } from 'react'; -import { DataGrid, DataGridProps } from './DataGrid'; -import { ColumnConfig, IdentifiableKeys } from './types'; +import type { DataGridProps } from './DataGrid'; +import { DataGrid } from './DataGrid'; +import type { ColumnConfig, IdentifiableKeys } from './types'; export interface DataList { , Cols extends ColumnConfig[]>( diff --git a/packages/gamut/src/DataList/DataTable.tsx b/packages/gamut/src/DataList/DataTable.tsx index feb7e5778c..27c34ea3a3 100644 --- a/packages/gamut/src/DataList/DataTable.tsx +++ b/packages/gamut/src/DataList/DataTable.tsx @@ -1,7 +1,8 @@ -import { ReactElement } from 'react'; +import type { ReactElement } from 'react'; -import { DataGrid, DataGridProps } from './DataGrid'; -import { ColumnConfig, IdentifiableKeys } from './types'; +import type { DataGridProps } from './DataGrid'; +import { DataGrid } from './DataGrid'; +import type { ColumnConfig, IdentifiableKeys } from './types'; export interface DataTable { , Cols extends ColumnConfig[]>( diff --git a/packages/gamut/src/DataList/Tables/Rows/TableHeaderRow.tsx b/packages/gamut/src/DataList/Tables/Rows/TableHeaderRow.tsx index 705c0705c4..8c74d3c3af 100644 --- a/packages/gamut/src/DataList/Tables/Rows/TableHeaderRow.tsx +++ b/packages/gamut/src/DataList/Tables/Rows/TableHeaderRow.tsx @@ -1,4 +1,5 @@ -import { memo, ReactElement } from 'react'; +import type { ReactElement } from 'react'; +import { memo } from 'react'; import { FlexBox } from '../../..'; import { ListCol } from '../../../List'; @@ -11,7 +12,7 @@ import { } from '../../Controls'; import { useControlContext } from '../../hooks/useListControls'; import { useListState } from '../../hooks/useListState'; -import { ColumnConfig, Query } from '../../types'; +import type { ColumnConfig, Query } from '../../types'; import { StyledHeaderRow } from './elements'; interface HeaderComponent { diff --git a/packages/gamut/src/DataList/Tables/Rows/TableRow.tsx b/packages/gamut/src/DataList/Tables/Rows/TableRow.tsx index 599e85ff86..4d872d8642 100644 --- a/packages/gamut/src/DataList/Tables/Rows/TableRow.tsx +++ b/packages/gamut/src/DataList/Tables/Rows/TableRow.tsx @@ -1,19 +1,14 @@ -import { - isValidElement, - memo, - ReactElement, - useCallback, - useMemo, -} from 'react'; +import type { ReactElement } from 'react'; +import { isValidElement, memo, useCallback, useMemo } from 'react'; import { Text } from '../../..'; import { ListCol, ListRow } from '../../../List'; -import { ColProps } from '../../../List/elements'; +import type { ColProps } from '../../../List/elements'; import { useListContext } from '../../../List/ListProvider'; import { Shimmer } from '../../../Loading/Shimmer'; import { ExpandControl, SelectControl } from '../../Controls'; import { useControlContext } from '../../hooks/useListControls'; -import { ColumnConfig, IdentifiableKeys } from '../../types'; +import type { ColumnConfig, IdentifiableKeys } from '../../types'; export type MarshaledColProps = Partial>; diff --git a/packages/gamut/src/DataList/__tests__/DataGrid.test.tsx b/packages/gamut/src/DataList/__tests__/DataGrid.test.tsx index b59e8d9ad1..7f8cc00328 100644 --- a/packages/gamut/src/DataList/__tests__/DataGrid.test.tsx +++ b/packages/gamut/src/DataList/__tests__/DataGrid.test.tsx @@ -1,15 +1,11 @@ import { matchers } from '@emotion/jest'; import { MockGamutProvider, setupRtl } from '@skillsoft/gamut-tests'; -import { - act, - fireEvent, - render, - RenderResult, - screen, -} from '@testing-library/react'; - -import { DataGrid, DataGridProps } from '../DataGrid'; -import { ColumnConfig } from '../types'; +import type { RenderResult } from '@testing-library/react'; +import { act, fireEvent, render, screen } from '@testing-library/react'; + +import type { DataGridProps } from '../DataGrid'; +import { DataGrid } from '../DataGrid'; +import type { ColumnConfig } from '../types'; // Add the custom matchers provided by '@emotion/jest' expect.extend(matchers); diff --git a/packages/gamut/src/DataList/hooks/useListControls.tsx b/packages/gamut/src/DataList/hooks/useListControls.tsx index 41bc145201..54db9639cd 100644 --- a/packages/gamut/src/DataList/hooks/useListControls.tsx +++ b/packages/gamut/src/DataList/hooks/useListControls.tsx @@ -1,7 +1,7 @@ import kebabCase from 'lodash/kebabCase'; import { createContext, useCallback, useContext, useMemo } from 'react'; -import { +import type { ColumnConfig, DataListControls, ExpandRow, diff --git a/packages/gamut/src/DataList/hooks/useListState.tsx b/packages/gamut/src/DataList/hooks/useListState.tsx index 0159001de2..c783112b40 100644 --- a/packages/gamut/src/DataList/hooks/useListState.tsx +++ b/packages/gamut/src/DataList/hooks/useListState.tsx @@ -1,6 +1,6 @@ import { createContext, useContext } from 'react'; -import { Query } from '../types'; +import type { Query } from '../types'; interface ListState { query?: Query; diff --git a/packages/gamut/src/DataList/hooks/useLocalQuery.tsx b/packages/gamut/src/DataList/hooks/useLocalQuery.tsx index 8bba85ac24..ddbb1cd58b 100644 --- a/packages/gamut/src/DataList/hooks/useLocalQuery.tsx +++ b/packages/gamut/src/DataList/hooks/useLocalQuery.tsx @@ -1,7 +1,12 @@ import orderBy from 'lodash/orderBy'; import { useCallback, useMemo, useState } from 'react'; -import { ColumnConfig, IdentifiableKeys, OnQueryChange, Query } from '../types'; +import type { + ColumnConfig, + IdentifiableKeys, + OnQueryChange, + Query, +} from '../types'; export interface LocalQueryShape< Row, diff --git a/packages/gamut/src/DataList/types.ts b/packages/gamut/src/DataList/types.ts index ccfa239a32..50e9375bf0 100644 --- a/packages/gamut/src/DataList/types.ts +++ b/packages/gamut/src/DataList/types.ts @@ -1,6 +1,6 @@ -import { ReactElement } from 'react'; +import type { ReactElement } from 'react'; -import { ListColProps } from '..'; +import type { ListColProps } from '..'; export type SortDirection = 'asc' | 'desc' | 'none'; diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarBody.tsx b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarBody.tsx index 334e3dd3c3..a397af2242 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarBody.tsx +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarBody.tsx @@ -1,8 +1,8 @@ +import type * as React from 'react'; import { useCallback, useLayoutEffect, useMemo, useRef } from 'react'; -import * as React from 'react'; import { useIsoFirstWeekday, useResolvedLocale } from '../../utils/locale'; -import { CalendarBodyProps } from './types'; +import type { CalendarBodyProps } from './types'; import { getDatesWithRow, getMonthGrid, diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarFooter.tsx b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarFooter.tsx index fc6591ae3f..714a123b26 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarFooter.tsx +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarFooter.tsx @@ -1,9 +1,9 @@ -import * as React from 'react'; +import type * as React from 'react'; import { FlexBox } from '../../../Box'; import { TextButton } from '../../../Button'; import { DEFAULT_DATE_PICKER_TRANSLATIONS } from '../../utils/translations'; -import { CalendarFooterProps } from './types'; +import type { CalendarFooterProps } from './types'; export const CalendarFooter: React.FC = ({ clearButton, diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarHeader.tsx b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarHeader.tsx index 9b7e03011b..229029f7a4 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarHeader.tsx +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarHeader.tsx @@ -1,11 +1,11 @@ -import * as React from 'react'; +import type * as React from 'react'; import { FlexBox } from '../../../Box'; import { Text } from '../../../Typography'; import { useResolvedLocale } from '../../utils/locale'; import { CalendarNavLastMonth } from './CalendarNavLastMonth'; import { CalendarNavNextMonth } from './CalendarNavNextMonth'; -import { CalendarHeaderProps } from './types'; +import type { CalendarHeaderProps } from './types'; import { formatMonthYear } from './utils/format'; export const CalendarHeader: React.FC = ({ diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarNavLastMonth.tsx b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarNavLastMonth.tsx index fc1f709fe9..77bb0f2bc0 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarNavLastMonth.tsx +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarNavLastMonth.tsx @@ -7,7 +7,7 @@ import * as React from 'react'; import { IconButton } from '../../../Button'; import { useResolvedLocale } from '../../utils/locale'; -import { CalendarNavProps } from './types'; +import type { CalendarNavProps } from './types'; import { getRelativeMonthLabels } from './utils/format'; export const CalendarNavLastMonth: React.FC = ({ diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarNavNextMonth.tsx b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarNavNextMonth.tsx index d816b95af5..bffa716d82 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarNavNextMonth.tsx +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarNavNextMonth.tsx @@ -7,7 +7,7 @@ import * as React from 'react'; import { IconButton } from '../../../Button'; import { useResolvedLocale } from '../../utils/locale'; -import { CalendarNavProps } from './types'; +import type { CalendarNavProps } from './types'; import { getRelativeMonthLabels } from './utils/format'; export const CalendarNavNextMonth: React.FC = ({ diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarWrapper.tsx b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarWrapper.tsx index 2ce9a2153a..a5a07d6578 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarWrapper.tsx +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/CalendarWrapper.tsx @@ -1,8 +1,8 @@ import { CheckerDense } from '@skillsoft/gamut-patterns'; -import * as React from 'react'; +import type * as React from 'react'; import { Box } from '../../../Box'; -import { WithChildrenProp } from '../../../utils'; +import type { WithChildrenProp } from '../../../utils'; export const CalendarWrapper: React.FC = ({ children }) => ( diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/utils/__tests__/keyHandler.test.tsx b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/utils/__tests__/keyHandler.test.tsx index a404686ec5..fc3c5ecea3 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/utils/__tests__/keyHandler.test.tsx +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/utils/__tests__/keyHandler.test.tsx @@ -1,7 +1,8 @@ import type { KeyboardEvent } from 'react'; import { getDatesWithRow, getMonthGrid, matchDisabledDates } from '../dateGrid'; -import { keyHandler, KeyHandlerParams } from '../keyHandler'; +import type { KeyHandlerParams } from '../keyHandler'; +import { keyHandler } from '../keyHandler'; const makeEvent = ( key: string, diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/utils/elements.tsx b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/utils/elements.tsx index 30eebe67f0..af3adcea1c 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/utils/elements.tsx +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/Calendar/utils/elements.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { css, states, transitionConcat } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; export const CalendarTable = styled.table( css({ diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/index.tsx b/packages/gamut/src/DatePicker/DatePickerCalendar/index.tsx index 0355791694..2b93ea3189 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/index.tsx +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/index.tsx @@ -11,7 +11,7 @@ import { useMedia } from 'react-use'; import { Box, FlexBox } from '../../Box'; import { useDatePicker } from '../DatePickerContext'; -import { CalendarQuickAction } from '../sharedTypes'; +import type { CalendarQuickAction } from '../sharedTypes'; import { CalendarBody, CalendarFooter, diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/utils/dateSelect.ts b/packages/gamut/src/DatePicker/DatePickerCalendar/utils/dateSelect.ts index 77425c45b0..ffc9904be8 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/utils/dateSelect.ts +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/utils/dateSelect.ts @@ -2,7 +2,7 @@ import type { DatePickerRangeContextValue, DatePickerSingleContextValue, } from '../../DatePickerContext/types'; -import { DatePickerSharedProps } from '../../sharedTypes'; +import type { DatePickerSharedProps } from '../../sharedTypes'; import type { DatePickerProps, DatePickerRangeProps } from '../../types'; import { getOrderedCalendarEndpoints, diff --git a/packages/gamut/src/DatePicker/DatePickerCalendar/utils/quickActions.ts b/packages/gamut/src/DatePicker/DatePickerCalendar/utils/quickActions.ts index 9cb87101ea..befec4304d 100644 --- a/packages/gamut/src/DatePicker/DatePickerCalendar/utils/quickActions.ts +++ b/packages/gamut/src/DatePicker/DatePickerCalendar/utils/quickActions.ts @@ -1,6 +1,6 @@ -import { CalendarQuickAction } from '../../sharedTypes'; +import type { CalendarQuickAction } from '../../sharedTypes'; import { stringifyLocale } from '../../utils/locale'; -import { DatePickerTranslations } from '../../utils/translations'; +import type { DatePickerTranslations } from '../../utils/translations'; import { capitalizeFirst } from '../Calendar/utils/format'; const getRelativeDisplayText = ({ diff --git a/packages/gamut/src/DatePicker/DatePickerContext/index.tsx b/packages/gamut/src/DatePicker/DatePickerContext/index.tsx index 725c4badd1..d0fc0b92dc 100644 --- a/packages/gamut/src/DatePicker/DatePickerContext/index.tsx +++ b/packages/gamut/src/DatePicker/DatePickerContext/index.tsx @@ -1,6 +1,7 @@ import { useContext } from 'react'; -import { DatePickerContext, DatePickerContextValue } from './types'; +import type { DatePickerContextValue } from './types'; +import { DatePickerContext } from './types'; export const DatePickerProvider = DatePickerContext.Provider; diff --git a/packages/gamut/src/DatePicker/DatePickerContext/types.ts b/packages/gamut/src/DatePicker/DatePickerContext/types.ts index b9eabec0d1..5d6ef9368a 100644 --- a/packages/gamut/src/DatePicker/DatePickerContext/types.ts +++ b/packages/gamut/src/DatePicker/DatePickerContext/types.ts @@ -1,6 +1,9 @@ import { createContext } from 'react'; -import { CalendarQuickAction, DatePickerSharedProps } from '../sharedTypes'; +import type { + CalendarQuickAction, + DatePickerSharedProps, +} from '../sharedTypes'; import type { DatePickerTranslations } from '../utils/translations'; interface DatePickerBaseContextValue diff --git a/packages/gamut/src/DatePicker/DatePickerInput/Segment/elements.tsx b/packages/gamut/src/DatePicker/DatePickerInput/Segment/elements.tsx index 3318384870..58aa753f94 100644 --- a/packages/gamut/src/DatePicker/DatePickerInput/Segment/elements.tsx +++ b/packages/gamut/src/DatePicker/DatePickerInput/Segment/elements.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { css, states } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; const segmentStyles = states({ isEmpty: { diff --git a/packages/gamut/src/DatePicker/DatePickerInput/Segment/index.tsx b/packages/gamut/src/DatePicker/DatePickerInput/Segment/index.tsx index eeef657ac0..142f5110a0 100644 --- a/packages/gamut/src/DatePicker/DatePickerInput/Segment/index.tsx +++ b/packages/gamut/src/DatePicker/DatePickerInput/Segment/index.tsx @@ -2,13 +2,13 @@ import { type Dispatch, type SetStateAction, useCallback, useId } from 'react'; import type { DatePartKind } from '../utils'; import { Segment } from './elements'; +import type { SegmentValues } from './utils'; import { appendSegmentDigit, getSegmentPlaceholder, getSegmentSpinBounds, parseSegmentNumericString, segmentMaxLength, - SegmentValues, spinSegment, } from './utils'; diff --git a/packages/gamut/src/DatePicker/DatePickerInput/elements.tsx b/packages/gamut/src/DatePicker/DatePickerInput/elements.tsx index c5541258af..317860b4a4 100644 --- a/packages/gamut/src/DatePicker/DatePickerInput/elements.tsx +++ b/packages/gamut/src/DatePicker/DatePickerInput/elements.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { variant } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; import { FlexBox } from '../../Box'; import { diff --git a/packages/gamut/src/DatePicker/types.ts b/packages/gamut/src/DatePicker/types.ts index c35cf19d35..26aa533355 100644 --- a/packages/gamut/src/DatePicker/types.ts +++ b/packages/gamut/src/DatePicker/types.ts @@ -1,8 +1,8 @@ -import { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; -import { Input } from '../Form/inputs/Input'; -import { CalendarQuickAction, DatePickerSharedProps } from './sharedTypes'; -import { DatePickerTranslations } from './utils/translations'; +import type { Input } from '../Form/inputs/Input'; +import type { CalendarQuickAction, DatePickerSharedProps } from './sharedTypes'; +import type { DatePickerTranslations } from './utils/translations'; interface DatePickerBaseProps extends DatePickerSharedProps { diff --git a/packages/gamut/src/DelayedRenderWrapper/DelayedRenderWrapper.tsx b/packages/gamut/src/DelayedRenderWrapper/DelayedRenderWrapper.tsx index d78daf4f7b..03a45f3cdd 100644 --- a/packages/gamut/src/DelayedRenderWrapper/DelayedRenderWrapper.tsx +++ b/packages/gamut/src/DelayedRenderWrapper/DelayedRenderWrapper.tsx @@ -1,4 +1,5 @@ -import React, { useEffect, useState } from 'react'; +import type React from 'react'; +import { useEffect, useState } from 'react'; interface DelayedRenderWrapperProps { delay: number; diff --git a/packages/gamut/src/Disclosure/DisclosureBody/index.tsx b/packages/gamut/src/Disclosure/DisclosureBody/index.tsx index 11015c4015..81786105e0 100644 --- a/packages/gamut/src/Disclosure/DisclosureBody/index.tsx +++ b/packages/gamut/src/Disclosure/DisclosureBody/index.tsx @@ -1,9 +1,9 @@ -import * as React from 'react'; +import type * as React from 'react'; import { Text } from '../../Typography'; import { DisclosureBodyWrapper } from '../elements'; import { getSpacing, renderButton } from '../helpers'; -import { DisclosureBodyProps } from '../types'; +import type { DisclosureBodyProps } from '../types'; export const DisclosureBody: React.FC = ({ body, diff --git a/packages/gamut/src/Disclosure/DisclosureButton/index.tsx b/packages/gamut/src/Disclosure/DisclosureButton/index.tsx index 9dbbc89501..573041e75c 100644 --- a/packages/gamut/src/Disclosure/DisclosureButton/index.tsx +++ b/packages/gamut/src/Disclosure/DisclosureButton/index.tsx @@ -2,14 +2,14 @@ import { ArrowChevronDownIcon, MiniChevronDownIcon, } from '@skillsoft/gamut-icons'; -import * as React from 'react'; +import type * as React from 'react'; import { Rotation } from '../../Animation'; import { Box, FlexBox } from '../../Box'; import { Text } from '../../Typography'; import { DisclosureButtonWrapper } from '../elements'; import { getRotationSize, getSpacing, getTitleSize } from '../helpers'; -import { DisclosureButtonProps } from '../types'; +import type { DisclosureButtonProps } from '../types'; export const DisclosureButton: React.FC = ({ disabled = false, diff --git a/packages/gamut/src/Disclosure/elements.tsx b/packages/gamut/src/Disclosure/elements.tsx index da8e64c5dc..4903d7a234 100644 --- a/packages/gamut/src/Disclosure/elements.tsx +++ b/packages/gamut/src/Disclosure/elements.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { states, variant } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; import { Anchor } from '../Anchor'; import { FlexBox } from '../Box'; diff --git a/packages/gamut/src/Disclosure/index.tsx b/packages/gamut/src/Disclosure/index.tsx index 599dc611a9..e817b006e5 100644 --- a/packages/gamut/src/Disclosure/index.tsx +++ b/packages/gamut/src/Disclosure/index.tsx @@ -1,12 +1,12 @@ import { AnimatePresence } from 'framer-motion'; +import type * as React from 'react'; import { useState } from 'react'; -import * as React from 'react'; import { ExpandInCollapseOut } from '../Animation'; import { DisclosureBody } from './DisclosureBody'; import { DisclosureButton } from './DisclosureButton'; import { DisclosureWrapper } from './elements'; -import { DisclosureProps } from './types'; +import type { DisclosureProps } from './types'; export const Disclosure: React.FC = ({ body, diff --git a/packages/gamut/src/Disclosure/types.ts b/packages/gamut/src/Disclosure/types.ts index 9083bad688..68abaaa7ee 100644 --- a/packages/gamut/src/Disclosure/types.ts +++ b/packages/gamut/src/Disclosure/types.ts @@ -1,4 +1,4 @@ -import { +import type { DisclosureBodyWrapperStyles, DisclosureWrapperStyles, } from './elements'; diff --git a/packages/gamut/src/Drawer/__tests__/Drawer.test.tsx b/packages/gamut/src/Drawer/__tests__/Drawer.test.tsx index db1b54f388..2b797d0913 100644 --- a/packages/gamut/src/Drawer/__tests__/Drawer.test.tsx +++ b/packages/gamut/src/Drawer/__tests__/Drawer.test.tsx @@ -1,5 +1,6 @@ import { setupRtl } from '@skillsoft/gamut-tests'; -import { RenderResult, waitFor } from '@testing-library/react'; +import type { RenderResult } from '@testing-library/react'; +import { waitFor } from '@testing-library/react'; import { Drawer } from '..'; diff --git a/packages/gamut/src/Drawer/index.tsx b/packages/gamut/src/Drawer/index.tsx index 52b7cac713..663fac6081 100644 --- a/packages/gamut/src/Drawer/index.tsx +++ b/packages/gamut/src/Drawer/index.tsx @@ -4,7 +4,8 @@ import { AnimatePresence, motion } from 'framer-motion'; import { useEffect, useRef } from 'react'; import { useMedia } from 'react-use'; -import { Box, BoxProps } from '../Box'; +import type { BoxProps } from '../Box'; +import { Box } from '../Box'; import { focusVisibleStyle } from '../utils'; const drawerVisibleStyle = focusVisibleStyle('-3px'); diff --git a/packages/gamut/src/FeatureShimmer/index.tsx b/packages/gamut/src/FeatureShimmer/index.tsx index efd20dea23..9c295d02a7 100644 --- a/packages/gamut/src/FeatureShimmer/index.tsx +++ b/packages/gamut/src/FeatureShimmer/index.tsx @@ -2,7 +2,8 @@ import styled from '@emotion/styled'; import { css } from '@skillsoft/gamut-styles'; import { motion, useReducedMotion } from 'framer-motion'; -import { Box, BoxProps } from '../Box'; +import type { BoxProps } from '../Box'; +import { Box } from '../Box'; const BaseContainer = motion.create(Box); const Shimmer = styled(BaseContainer)( diff --git a/packages/gamut/src/Flyout/__tests__/Flyout.test.tsx b/packages/gamut/src/Flyout/__tests__/Flyout.test.tsx index d899136e10..6b5994de76 100644 --- a/packages/gamut/src/Flyout/__tests__/Flyout.test.tsx +++ b/packages/gamut/src/Flyout/__tests__/Flyout.test.tsx @@ -1,6 +1,7 @@ import { setupRtl } from '@skillsoft/gamut-tests'; import { fireEvent } from '@testing-library/dom'; -import { act, RenderResult, waitFor } from '@testing-library/react'; +import type { RenderResult } from '@testing-library/react'; +import { act, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { Flyout } from '..'; diff --git a/packages/gamut/src/Flyout/index.tsx b/packages/gamut/src/Flyout/index.tsx index f58c973746..efd317410e 100644 --- a/packages/gamut/src/Flyout/index.tsx +++ b/packages/gamut/src/Flyout/index.tsx @@ -1,13 +1,14 @@ import { MiniDeleteIcon } from '@skillsoft/gamut-icons'; -import { Background, Colors } from '@skillsoft/gamut-styles'; -import * as React from 'react'; +import type { Colors } from '@skillsoft/gamut-styles'; +import { Background } from '@skillsoft/gamut-styles'; +import type * as React from 'react'; import { FlexBox } from '../Box'; import { IconButton } from '../Button'; import { Drawer } from '../Drawer'; import { Overlay } from '../Overlay'; import { Text } from '../Typography'; -import { WithChildrenProp } from '../utils'; +import type { WithChildrenProp } from '../utils'; export interface FlyoutProps extends WithChildrenProp { /** diff --git a/packages/gamut/src/FocusTrap/__tests__/FocusTrap.test.tsx b/packages/gamut/src/FocusTrap/__tests__/FocusTrap.test.tsx index 07044fcb9a..2ea07b9c2a 100644 --- a/packages/gamut/src/FocusTrap/__tests__/FocusTrap.test.tsx +++ b/packages/gamut/src/FocusTrap/__tests__/FocusTrap.test.tsx @@ -1,8 +1,9 @@ import { setupRtl } from '@skillsoft/gamut-tests'; import { fireEvent, screen } from '@testing-library/react'; -import * as React from 'react'; +import type * as React from 'react'; -import { FocusTrap, FocusTrapProps } from '..'; +import type { FocusTrapProps } from '..'; +import { FocusTrap } from '..'; const FocusTrapContainer: React.FC> = (props) => { return ( diff --git a/packages/gamut/src/FocusTrap/index.tsx b/packages/gamut/src/FocusTrap/index.tsx index 8449357039..c56839818d 100644 --- a/packages/gamut/src/FocusTrap/index.tsx +++ b/packages/gamut/src/FocusTrap/index.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import type * as React from 'react'; import { FocusOn } from 'react-focus-on'; -import { ReactFocusOnProps } from 'react-focus-on/dist/es5/types'; +import type { ReactFocusOnProps } from 'react-focus-on/dist/es5/types'; -import { WithChildrenProp } from '../utils'; +import type { WithChildrenProp } from '../utils'; const focusOnStyles = { /** diff --git a/packages/gamut/src/Form/SelectDropdown/SelectDropdown.tsx b/packages/gamut/src/Form/SelectDropdown/SelectDropdown.tsx index c2c9ff0d90..81d490af23 100644 --- a/packages/gamut/src/Form/SelectDropdown/SelectDropdown.tsx +++ b/packages/gamut/src/Form/SelectDropdown/SelectDropdown.tsx @@ -1,9 +1,9 @@ import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { screenReaderOnly } from '@skillsoft/gamut-styles'; +import type * as React from 'react'; import { useId, useMemo, useRef, useState } from 'react'; -import * as React from 'react'; -import { StylesConfig } from 'react-select'; +import type { StylesConfig } from 'react-select'; import { getDefaultComponents } from './core/constants'; import { getMemoizedStyles } from './core/styles'; @@ -18,7 +18,7 @@ import { import { useNoOptionsAnnouncement } from './hooks/useNoOptionsAnnouncement'; import { useSelectHandlers } from './hooks/useSelectHandlers'; import { useSelectOptions } from './hooks/useSelectOptions'; -import { OptionStrict, SelectDropdownProps } from './types'; +import type { OptionStrict, SelectDropdownProps } from './types'; /** Announces the custom `validationMessage` menu text - see `useNoOptionsAnnouncement`. */ const NoOptionsLiveRegion = styled.div(screenReaderOnly); diff --git a/packages/gamut/src/Form/SelectDropdown/__tests__/utils.test.tsx b/packages/gamut/src/Form/SelectDropdown/__tests__/utils.test.tsx index dcc9f3270d..4c1a357fe1 100644 --- a/packages/gamut/src/Form/SelectDropdown/__tests__/utils.test.tsx +++ b/packages/gamut/src/Form/SelectDropdown/__tests__/utils.test.tsx @@ -1,4 +1,4 @@ -import { SelectOptionBase } from '../../utils'; +import type { SelectOptionBase } from '../../utils'; import { filterValueFromOptions, getCreatedOptionValue, @@ -6,7 +6,7 @@ import { isOptionsGrouped, removeValueFromSelectedOptions, } from '../core/utils'; -import { ExtendedOption, SelectDropdownGroup } from '../types'; +import type { ExtendedOption, SelectDropdownGroup } from '../types'; describe('SelectDropdown Utils', () => { describe('getCreatedOptionValue', () => { diff --git a/packages/gamut/src/Form/SelectDropdown/core/constants.ts b/packages/gamut/src/Form/SelectDropdown/core/constants.ts index c095fd8fb7..a5629613a2 100644 --- a/packages/gamut/src/Form/SelectDropdown/core/constants.ts +++ b/packages/gamut/src/Form/SelectDropdown/core/constants.ts @@ -1,4 +1,4 @@ -import { ComponentType } from 'react'; +import type { ComponentType } from 'react'; import { AbbreviatedSingleValue, diff --git a/packages/gamut/src/Form/SelectDropdown/core/styles.ts b/packages/gamut/src/Form/SelectDropdown/core/styles.ts index 7194c5b7a9..c35c652766 100644 --- a/packages/gamut/src/Form/SelectDropdown/core/styles.ts +++ b/packages/gamut/src/Form/SelectDropdown/core/styles.ts @@ -1,10 +1,6 @@ -import { - css, - states, - theme as GamutTheme, - variant, -} from '@skillsoft/gamut-styles'; -import { StylesConfig } from 'react-select'; +import type { theme as GamutTheme } from '@skillsoft/gamut-styles'; +import { css, states, variant } from '@skillsoft/gamut-styles'; +import type { StylesConfig } from 'react-select'; import { dismissSharedStyles, @@ -19,8 +15,8 @@ import { formFieldPaddingStyles, InputSelectors, } from '../../styles'; -import { ControlState, OptionState } from '../types'; -import { BaseSelectComponentProps } from '../types/styles'; +import type { ControlState, OptionState } from '../types'; +import type { BaseSelectComponentProps } from '../types/styles'; const selectDropdownStyles = css({ ...formBaseFieldStylesObject, diff --git a/packages/gamut/src/Form/SelectDropdown/core/translations.ts b/packages/gamut/src/Form/SelectDropdown/core/translations.ts index ded062ebd6..0ae06f37bc 100644 --- a/packages/gamut/src/Form/SelectDropdown/core/translations.ts +++ b/packages/gamut/src/Form/SelectDropdown/core/translations.ts @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { ExtendedOption } from '../types/options'; +import type { ExtendedOption } from '../types/options'; /** * Function form of the no-options message: receives the current input value diff --git a/packages/gamut/src/Form/SelectDropdown/core/utils.ts b/packages/gamut/src/Form/SelectDropdown/core/utils.ts index 3317279c87..16b273ae2d 100644 --- a/packages/gamut/src/Form/SelectDropdown/core/utils.ts +++ b/packages/gamut/src/Form/SelectDropdown/core/utils.ts @@ -1,8 +1,8 @@ -import { ActionMeta, Options as OptionsType } from 'react-select'; +import type { ActionMeta, Options as OptionsType } from 'react-select'; import { isDefined } from '../../../utils/nullish'; -import { SelectOptionBase } from '../../utils'; -import { +import type { SelectOptionBase } from '../../utils'; +import type { BaseOnChangeProps, ExtendedOption, MultiSelectDropdownProps, @@ -12,7 +12,7 @@ import { SelectDropdownProps, SingleSelectDropdownProps, } from '../types'; -import { ValidationMessage, ValidationMessageFn } from './translations'; +import type { ValidationMessage, ValidationMessageFn } from './translations'; export const isMultipleSelectProps = ( props: BaseOnChangeProps diff --git a/packages/gamut/src/Form/SelectDropdown/elements/containers.tsx b/packages/gamut/src/Form/SelectDropdown/elements/containers.tsx index bd22addd06..135a4b7e28 100644 --- a/packages/gamut/src/Form/SelectDropdown/elements/containers.tsx +++ b/packages/gamut/src/Form/SelectDropdown/elements/containers.tsx @@ -1,13 +1,13 @@ -import { createContext, ReactNode, useEffect, useLayoutEffect } from 'react'; +import type { ReactNode } from 'react'; +import { createContext, useEffect, useLayoutEffect } from 'react'; +import type { GroupBase, Props } from 'react-select'; import ReactSelect, { components as SelectDropdownElements, - GroupBase, - Props, } from 'react-select'; import CreatableSelect from 'react-select/creatable'; import { DEFAULT_SELECT_DROPDOWN_TRANSLATIONS } from '../core/translations'; -import { +import type { CustomSelectComponentProps, SelectDropdownContextValueTypes, TypedReactSelectProps, diff --git a/packages/gamut/src/Form/SelectDropdown/elements/controls.tsx b/packages/gamut/src/Form/SelectDropdown/elements/controls.tsx index e2985b60b3..1575e0ac7b 100644 --- a/packages/gamut/src/Form/SelectDropdown/elements/controls.tsx +++ b/packages/gamut/src/Form/SelectDropdown/elements/controls.tsx @@ -1,6 +1,6 @@ import { components as SelectDropdownElements } from 'react-select'; -import { SizedIndicatorProps } from '../types'; +import type { SizedIndicatorProps } from '../types'; import { indicatorIcons } from './constants'; const { DropdownIndicator } = SelectDropdownElements; diff --git a/packages/gamut/src/Form/SelectDropdown/elements/multi-value.tsx b/packages/gamut/src/Form/SelectDropdown/elements/multi-value.tsx index 9a81ec16e5..e2c9dacdc7 100644 --- a/packages/gamut/src/Form/SelectDropdown/elements/multi-value.tsx +++ b/packages/gamut/src/Form/SelectDropdown/elements/multi-value.tsx @@ -2,15 +2,16 @@ import { css } from '@emotion/react'; import styled from '@emotion/styled'; import { MiniDeleteIcon } from '@skillsoft/gamut-icons'; import { theme } from '@skillsoft/gamut-styles'; -import { KeyboardEvent, useContext } from 'react'; -import { - components as SelectDropdownElements, +import type { KeyboardEvent } from 'react'; +import { useContext } from 'react'; +import type { GroupBase, MultiValueProps, MultiValueRemoveProps, } from 'react-select'; +import { components as SelectDropdownElements } from 'react-select'; -import { ExtendedOption, SizedIndicatorProps } from '../types'; +import type { ExtendedOption, SizedIndicatorProps } from '../types'; import { indicatorIcons } from './constants'; import { SelectDropdownContext } from './containers'; diff --git a/packages/gamut/src/Form/SelectDropdown/elements/options.tsx b/packages/gamut/src/Form/SelectDropdown/elements/options.tsx index 8cbb70e32e..e91b25178a 100644 --- a/packages/gamut/src/Form/SelectDropdown/elements/options.tsx +++ b/packages/gamut/src/Form/SelectDropdown/elements/options.tsx @@ -1,11 +1,9 @@ import { CheckIcon } from '@skillsoft/gamut-icons'; -import { - components as SelectDropdownElements, - SingleValueProps, -} from 'react-select'; +import type { SingleValueProps } from 'react-select'; +import { components as SelectDropdownElements } from 'react-select'; import { Box, FlexBox } from '../../../Box'; -import { +import type { CustomSelectComponentProps, ExtendedOption, SelectDropdownGroup, diff --git a/packages/gamut/src/Form/SelectDropdown/hooks/__tests__/useNoOptionsAnnouncement.test.tsx b/packages/gamut/src/Form/SelectDropdown/hooks/__tests__/useNoOptionsAnnouncement.test.tsx index 93f6749661..56260c508e 100644 --- a/packages/gamut/src/Form/SelectDropdown/hooks/__tests__/useNoOptionsAnnouncement.test.tsx +++ b/packages/gamut/src/Form/SelectDropdown/hooks/__tests__/useNoOptionsAnnouncement.test.tsx @@ -1,5 +1,5 @@ import { act, render, renderHook } from '@testing-library/react'; -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { useNoOptionsAnnouncement } from '../useNoOptionsAnnouncement'; diff --git a/packages/gamut/src/Form/SelectDropdown/hooks/useNoOptionsAnnouncement.ts b/packages/gamut/src/Form/SelectDropdown/hooks/useNoOptionsAnnouncement.ts index cb64c86564..bdc77db03e 100644 --- a/packages/gamut/src/Form/SelectDropdown/hooks/useNoOptionsAnnouncement.ts +++ b/packages/gamut/src/Form/SelectDropdown/hooks/useNoOptionsAnnouncement.ts @@ -1,11 +1,5 @@ -import { - ComponentType, - ReactNode, - useCallback, - useEffect, - useMemo, - useState, -} from 'react'; +import type { ComponentType, ReactNode } from 'react'; +import { useCallback, useEffect, useMemo, useState } from 'react'; import { createNoOptionsMessage } from '../elements'; diff --git a/packages/gamut/src/Form/SelectDropdown/hooks/useSelectHandlers.ts b/packages/gamut/src/Form/SelectDropdown/hooks/useSelectHandlers.ts index ff779df7ce..11f558726b 100644 --- a/packages/gamut/src/Form/SelectDropdown/hooks/useSelectHandlers.ts +++ b/packages/gamut/src/Form/SelectDropdown/hooks/useSelectHandlers.ts @@ -1,8 +1,9 @@ -import { KeyboardEvent, useCallback, useEffect, useState } from 'react'; -import * as React from 'react'; -import { ActionMeta, Options as OptionsType } from 'react-select'; +import type { KeyboardEvent } from 'react'; +import type * as React from 'react'; +import { useCallback, useEffect, useState } from 'react'; +import type { ActionMeta, Options as OptionsType } from 'react-select'; -import { SelectOptionBase } from '../../utils'; +import type { SelectOptionBase } from '../../utils'; import { ON_CHANGE_ACTION } from '../core/constants'; import { filterValueFromOptions, @@ -12,7 +13,7 @@ import { isSingleSelectProps, removeValueFromSelectedOptions, } from '../core/utils'; -import { +import type { MultiSelectDropdownProps, OptionStrict, SelectDropdownGroup, diff --git a/packages/gamut/src/Form/SelectDropdown/hooks/useSelectOptions.ts b/packages/gamut/src/Form/SelectDropdown/hooks/useSelectOptions.ts index 200bcb4074..368283841e 100644 --- a/packages/gamut/src/Form/SelectDropdown/hooks/useSelectOptions.ts +++ b/packages/gamut/src/Form/SelectDropdown/hooks/useSelectOptions.ts @@ -1,8 +1,9 @@ import { useMemo } from 'react'; -import { parseOptions, SelectOptionBase } from '../../utils'; +import type { SelectOptionBase } from '../../utils'; +import { parseOptions } from '../../utils'; import { isOptionsGrouped } from '../core/utils'; -import { +import type { SelectDropdownGroup, SelectDropdownOptions, SelectDropdownSizes, diff --git a/packages/gamut/src/Form/SelectDropdown/types/component-props.ts b/packages/gamut/src/Form/SelectDropdown/types/component-props.ts index 0266aa8e73..c331b3ca78 100644 --- a/packages/gamut/src/Form/SelectDropdown/types/component-props.ts +++ b/packages/gamut/src/Form/SelectDropdown/types/component-props.ts @@ -1,17 +1,17 @@ -import { Ref, SelectHTMLAttributes } from 'react'; -import { Options as OptionsType, Props as NamedProps } from 'react-select'; +import type { Ref, SelectHTMLAttributes } from 'react'; +import type { Options as OptionsType, Props as NamedProps } from 'react-select'; -import { SelectComponentProps } from '../../inputs/Select'; -import { +import type { SelectComponentProps } from '../../inputs/Select'; +import type { SelectDropdownTranslations, ValidationMessage, } from '../core/translations'; -import { +import type { OptionStrict, SelectDropdownGroup, SelectDropdownOptions, } from './options'; -import { +import type { ReactSelectAdditionalProps, SelectDropdownSizes, SharedProps, diff --git a/packages/gamut/src/Form/SelectDropdown/types/internal.ts b/packages/gamut/src/Form/SelectDropdown/types/internal.ts index e6e9229ad1..8d3ef4bf9f 100644 --- a/packages/gamut/src/Form/SelectDropdown/types/internal.ts +++ b/packages/gamut/src/Form/SelectDropdown/types/internal.ts @@ -1,10 +1,10 @@ -import * as React from 'react'; -import { DropdownIndicatorProps, GroupBase } from 'react-select'; +import type * as React from 'react'; +import type { DropdownIndicatorProps, GroupBase } from 'react-select'; -import { SelectOptionBase } from '../../utils'; -import { SelectDropdownTranslations } from '../core/translations'; -import { OptionStrict } from './options'; -import { SelectDropdownSizes, SharedProps } from './styles'; +import type { SelectOptionBase } from '../../utils'; +import type { SelectDropdownTranslations } from '../core/translations'; +import type { OptionStrict } from './options'; +import type { SelectDropdownSizes, SharedProps } from './styles'; /** * Internal props passed to custom select components. diff --git a/packages/gamut/src/Form/SelectDropdown/types/options.ts b/packages/gamut/src/Form/SelectDropdown/types/options.ts index 2a2d4688f7..e8f1167f76 100644 --- a/packages/gamut/src/Form/SelectDropdown/types/options.ts +++ b/packages/gamut/src/Form/SelectDropdown/types/options.ts @@ -1,9 +1,9 @@ -import { GamutIconProps } from '@skillsoft/gamut-icons'; -import * as React from 'react'; -import { GroupBase } from 'react-select'; +import type { GamutIconProps } from '@skillsoft/gamut-icons'; +import type * as React from 'react'; +import type { GroupBase } from 'react-select'; -import { SelectOptions } from '../../inputs/Select'; -import { SelectDropdownSizes } from './styles'; +import type { SelectOptions } from '../../inputs/Select'; +import type { SelectDropdownSizes } from './styles'; /** * Basic option structure with required label and value properties. diff --git a/packages/gamut/src/Form/SelectDropdown/types/styles.ts b/packages/gamut/src/Form/SelectDropdown/types/styles.ts index c5b21c7bb8..d46fdeaea3 100644 --- a/packages/gamut/src/Form/SelectDropdown/types/styles.ts +++ b/packages/gamut/src/Form/SelectDropdown/types/styles.ts @@ -1,7 +1,7 @@ -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; -import { conditionalBorderStates } from '../core/styles'; -import { InternalInputsProps } from './component-props'; +import type { conditionalBorderStates } from '../core/styles'; +import type { InternalInputsProps } from './component-props'; /** * Size variants for the SelectDropdown component. diff --git a/packages/gamut/src/Form/__tests__/testUtils.ts b/packages/gamut/src/Form/__tests__/testUtils.ts index 4815f5a522..1cefd00096 100644 --- a/packages/gamut/src/Form/__tests__/testUtils.ts +++ b/packages/gamut/src/Form/__tests__/testUtils.ts @@ -1,4 +1,4 @@ -import { RenderResult } from '@testing-library/react'; +import type { RenderResult } from '@testing-library/react'; /** * Creates and appends an external label element to the test container. diff --git a/packages/gamut/src/Form/elements/Form.tsx b/packages/gamut/src/Form/elements/Form.tsx index 2248b677e0..119553f4ff 100644 --- a/packages/gamut/src/Form/elements/Form.tsx +++ b/packages/gamut/src/Form/elements/Form.tsx @@ -1,8 +1,9 @@ import styled from '@emotion/styled'; import { styledOptions, system } from '@skillsoft/gamut-styles'; import { variance } from '@skillsoft/variance'; -import { ComponentProps, forwardRef } from 'react'; -import * as React from 'react'; +import type { ComponentProps } from 'react'; +import type * as React from 'react'; +import { forwardRef } from 'react'; const formSystemProps = variance.compose( system.space, diff --git a/packages/gamut/src/Form/elements/FormError.tsx b/packages/gamut/src/Form/elements/FormError.tsx index c2611b1810..1e8037ba3f 100644 --- a/packages/gamut/src/Form/elements/FormError.tsx +++ b/packages/gamut/src/Form/elements/FormError.tsx @@ -1,8 +1,8 @@ import styled from '@emotion/styled'; import { theme, variant } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { HTMLAttributes } from 'react'; -import * as React from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import type { HTMLAttributes } from 'react'; +import type * as React from 'react'; const errorSpanVariants = variant({ base: { diff --git a/packages/gamut/src/Form/elements/FormGroup.tsx b/packages/gamut/src/Form/elements/FormGroup.tsx index 23150e3578..8be8af9f49 100644 --- a/packages/gamut/src/Form/elements/FormGroup.tsx +++ b/packages/gamut/src/Form/elements/FormGroup.tsx @@ -1,14 +1,15 @@ import styled from '@emotion/styled'; import { variant } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { ComponentProps } from 'react'; -import * as React from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import type { ComponentProps } from 'react'; +import type * as React from 'react'; import { Box } from '../../Box'; -import { BaseInputProps } from '../types'; +import type { BaseInputProps } from '../types'; import { FormError } from './FormError'; import { FormGroupDescription } from './FormGroupDescription'; -import { FormGroupLabel, FormGroupLabelProps } from './FormGroupLabel'; +import type { FormGroupLabelProps } from './FormGroupLabel'; +import { FormGroupLabel } from './FormGroupLabel'; export interface FormGroupProps extends ComponentProps, diff --git a/packages/gamut/src/Form/elements/FormGroupLabel.tsx b/packages/gamut/src/Form/elements/FormGroupLabel.tsx index 5888429ebf..cb40706d1f 100644 --- a/packages/gamut/src/Form/elements/FormGroupLabel.tsx +++ b/packages/gamut/src/Form/elements/FormGroupLabel.tsx @@ -1,18 +1,16 @@ import styled from '@emotion/styled'; import { states, variant } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { HTMLAttributes } from 'react'; -import * as React from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import type { HTMLAttributes } from 'react'; +import type * as React from 'react'; import { FlexBox } from '../../Box'; import { InfoTip } from '../../Tip/InfoTip'; -import { - InfoTipSubComponentProps, - useInfotipProps, -} from '../../Tip/InfoTip/type-utils'; +import type { InfoTipSubComponentProps } from '../../Tip/InfoTip/type-utils'; +import { useInfotipProps } from '../../Tip/InfoTip/type-utils'; import { Text } from '../../Typography/Text'; import { formBaseStyles, formFieldTextDisabledStyles } from '../styles'; -import { BaseInputProps } from '../types'; +import type { BaseInputProps } from '../types'; const labelSizeVariants = variant({ defaultVariant: 'small', diff --git a/packages/gamut/src/Form/elements/FormRequiredText.tsx b/packages/gamut/src/Form/elements/FormRequiredText.tsx index 71528ec3fd..b63b97ae14 100644 --- a/packages/gamut/src/Form/elements/FormRequiredText.tsx +++ b/packages/gamut/src/Form/elements/FormRequiredText.tsx @@ -1,4 +1,4 @@ -import { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; import { Text } from '../../Typography/Text'; diff --git a/packages/gamut/src/Form/inputs/Checkbox.tsx b/packages/gamut/src/Form/inputs/Checkbox.tsx index 9c28fd87a7..85def60b7e 100644 --- a/packages/gamut/src/Form/inputs/Checkbox.tsx +++ b/packages/gamut/src/Form/inputs/Checkbox.tsx @@ -5,15 +5,14 @@ import { styledOptions, timing, } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { forwardRef, InputHTMLAttributes, useEffect, useRef } from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import type { InputHTMLAttributes } from 'react'; +import { forwardRef, useEffect, useRef } from 'react'; import { FlexBox } from '../../Box'; import { InfoTip } from '../../Tip/InfoTip'; -import { - InfoTipSubComponentProps, - useInfotipProps, -} from '../../Tip/InfoTip/type-utils'; +import type { InfoTipSubComponentProps } from '../../Tip/InfoTip/type-utils'; +import { useInfotipProps } from '../../Tip/InfoTip/type-utils'; import { checkboxElement, checkboxElementStates, @@ -25,8 +24,8 @@ import { InputWrapper, polyline, } from '../styles'; -import { BaseInputProps } from '../types'; -import { CheckboxCheckedUnion, CheckboxLabelUnion } from './types'; +import type { BaseInputProps } from '../types'; +import type { CheckboxCheckedUnion, CheckboxLabelUnion } from './types'; export type CheckboxTextProps = StyleProps; export type CheckboxPaddingProps = StyleProps; diff --git a/packages/gamut/src/Form/inputs/Input.tsx b/packages/gamut/src/Form/inputs/Input.tsx index 4ed1676e15..e6d00a0796 100644 --- a/packages/gamut/src/Form/inputs/Input.tsx +++ b/packages/gamut/src/Form/inputs/Input.tsx @@ -1,17 +1,16 @@ -import styled, { StyledComponent } from '@emotion/styled'; -import { - AlertIcon, - CheckCircledIcon, - GamutIconProps, -} from '@skillsoft/gamut-icons'; +import type { StyledComponent } from '@emotion/styled'; +import styled from '@emotion/styled'; +import type { GamutIconProps } from '@skillsoft/gamut-icons'; +import { AlertIcon, CheckCircledIcon } from '@skillsoft/gamut-icons'; import { css } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { ChangeEvent, forwardRef, InputHTMLAttributes, useState } from 'react'; -import * as React from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import type { ChangeEvent, InputHTMLAttributes } from 'react'; +import type * as React from 'react'; +import { forwardRef, useState } from 'react'; import { Box, FlexBox } from '../../Box'; +import type { conditionalStyleProps } from '../styles'; import { - conditionalStyleProps, conditionalStyles, conditionalStyleState, formBaseFieldStyles, @@ -20,7 +19,7 @@ import { formFieldStyles, inputSizeStyles, } from '../styles'; -import { BaseInputProps } from '../types'; +import type { BaseInputProps } from '../types'; export type InputProps = Omit, 'size'> & BaseInputProps & { diff --git a/packages/gamut/src/Form/inputs/Radio.tsx b/packages/gamut/src/Form/inputs/Radio.tsx index 90db904e8f..7c72d75130 100644 --- a/packages/gamut/src/Form/inputs/Radio.tsx +++ b/packages/gamut/src/Form/inputs/Radio.tsx @@ -1,15 +1,14 @@ import styled from '@emotion/styled'; import { screenReaderOnly } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { forwardRef, InputHTMLAttributes, ReactNode } from 'react'; -import * as React from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import type { InputHTMLAttributes, ReactNode } from 'react'; +import type * as React from 'react'; +import { forwardRef } from 'react'; import { FlexBox } from '../../Box'; import { InfoTip } from '../../Tip/InfoTip'; -import { - InfoTipSubComponentProps, - useInfotipProps, -} from '../../Tip/InfoTip/type-utils'; +import type { InfoTipSubComponentProps } from '../../Tip/InfoTip/type-utils'; +import { useInfotipProps } from '../../Tip/InfoTip/type-utils'; import { conditionalRadioInputStyles, conditionalRadioLabelStyles, @@ -17,7 +16,7 @@ import { radioInput, radioLabel, } from '../styles'; -import { BaseInputProps } from '../types'; +import type { BaseInputProps } from '../types'; export type RadioProps = InputHTMLAttributes & Omit & { diff --git a/packages/gamut/src/Form/inputs/RadioGroup.tsx b/packages/gamut/src/Form/inputs/RadioGroup.tsx index ea0b706f9b..fc8c983466 100644 --- a/packages/gamut/src/Form/inputs/RadioGroup.tsx +++ b/packages/gamut/src/Form/inputs/RadioGroup.tsx @@ -1,7 +1,8 @@ -import { cloneElement, HTMLAttributes, InputHTMLAttributes } from 'react'; +import type { HTMLAttributes, InputHTMLAttributes } from 'react'; +import { cloneElement } from 'react'; import * as React from 'react'; -import { BaseInputProps } from '../types'; +import type { BaseInputProps } from '../types'; export type RadioGroupProps = Omit, 'onChange'> & Pick, 'onChange' | 'disabled'> & diff --git a/packages/gamut/src/Form/inputs/Select.tsx b/packages/gamut/src/Form/inputs/Select.tsx index 7fb5cb905b..bf0d159ef4 100644 --- a/packages/gamut/src/Form/inputs/Select.tsx +++ b/packages/gamut/src/Form/inputs/Select.tsx @@ -5,14 +5,9 @@ import { MiniChevronDownIcon, } from '@skillsoft/gamut-icons'; import { variant } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { - ChangeEvent, - forwardRef, - SelectHTMLAttributes, - useMemo, - useState, -} from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import type { ChangeEvent, SelectHTMLAttributes } from 'react'; +import { forwardRef, useMemo, useState } from 'react'; import { Box, FlexBox } from '../../Box'; import { @@ -20,7 +15,7 @@ import { conditionalStyleState, formFieldStyles, } from '../styles'; -import { BaseInputProps } from '../types'; +import type { BaseInputProps } from '../types'; import { parseSelectOptions } from '../utils'; export type SelectOptions = string[] | Record; diff --git a/packages/gamut/src/Form/inputs/TextArea.tsx b/packages/gamut/src/Form/inputs/TextArea.tsx index 91bec9d162..f5207ecec1 100644 --- a/packages/gamut/src/Form/inputs/TextArea.tsx +++ b/packages/gamut/src/Form/inputs/TextArea.tsx @@ -1,18 +1,14 @@ import styled from '@emotion/styled'; -import { StyleProps } from '@skillsoft/variance'; -import { - ChangeEvent, - forwardRef, - TextareaHTMLAttributes, - useState, -} from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import type { ChangeEvent, TextareaHTMLAttributes } from 'react'; +import { forwardRef, useState } from 'react'; import { conditionalStyles, conditionalStyleState, formFieldStyles, } from '../styles'; -import { BaseInputProps } from '../types'; +import type { BaseInputProps } from '../types'; export type TextWrapperProps = TextareaHTMLAttributes & Omit & { diff --git a/packages/gamut/src/Form/inputs/types.tsx b/packages/gamut/src/Form/inputs/types.tsx index 6da0a0b8d2..4ce8f4d99e 100644 --- a/packages/gamut/src/Form/inputs/types.tsx +++ b/packages/gamut/src/Form/inputs/types.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; export type CheckboxStringLabelProps = { label: string; diff --git a/packages/gamut/src/Form/utils.tsx b/packages/gamut/src/Form/utils.tsx index 77f1881374..683e2247c4 100644 --- a/packages/gamut/src/Form/utils.tsx +++ b/packages/gamut/src/Form/utils.tsx @@ -1,7 +1,7 @@ import each from 'lodash/each'; import isObject from 'lodash/isObject'; -import { +import type { ExtendedOption, IconOption, OptionStrict, diff --git a/packages/gamut/src/GridForm/GridForm.tsx b/packages/gamut/src/GridForm/GridForm.tsx index d1d74d6df1..bdcb61296f 100644 --- a/packages/gamut/src/GridForm/GridForm.tsx +++ b/packages/gamut/src/GridForm/GridForm.tsx @@ -1,25 +1,28 @@ +import type * as React from 'react'; import { Fragment, useMemo } from 'react'; -import * as React from 'react'; -import { +import type { DeepPartial, DefaultValues, Mode, SubmitHandler, } from 'react-hook-form'; -import { ButtonProps } from '../Button'; -import { ConnectedForm, FormContextProps } from '../ConnectedForm'; +import type { ButtonProps } from '../Button'; +import type { FormContextProps } from '../ConnectedForm'; +import { ConnectedForm } from '../ConnectedForm'; import { FormRequiredText } from '../Form/elements/FormRequiredText'; -import { FormValues } from '../Form/types'; -import { Column, LayoutGrid, LayoutGridProps } from '../Layout'; -import { GridFormButtons, GridFormSubmitProps } from './GridFormButtons'; +import type { FormValues } from '../Form/types'; +import type { LayoutGridProps } from '../Layout'; +import { Column, LayoutGrid } from '../Layout'; +import type { GridFormSubmitProps } from './GridFormButtons'; +import { GridFormButtons } from './GridFormButtons'; import { GridFormContent, GridFormSection, GridFormSectionBreak, GridFormSectionTitle, } from './GridFormSections'; -import { +import type { GridFormField, GridFormFieldsProps, GridFormRequiredTextProps, diff --git a/packages/gamut/src/GridForm/GridFormButtons/index.tsx b/packages/gamut/src/GridForm/GridFormButtons/index.tsx index 71933b25f9..0eb89ddba5 100644 --- a/packages/gamut/src/GridForm/GridFormButtons/index.tsx +++ b/packages/gamut/src/GridForm/GridFormButtons/index.tsx @@ -1,10 +1,12 @@ -import { ColorModes } from '@skillsoft/gamut-styles'; -import { ComponentProps } from 'react'; -import * as React from 'react'; +import type { ColorModes } from '@skillsoft/gamut-styles'; +import type { ComponentProps } from 'react'; +import type * as React from 'react'; import { GridBox } from '../../Box'; -import { ButtonProps, CTAButton, FillButton, TextButton } from '../../Button'; -import { SubmitButton, SubmitButtonProps } from '../../ConnectedForm'; +import type { ButtonProps } from '../../Button'; +import { CTAButton, FillButton, TextButton } from '../../Button'; +import type { SubmitButtonProps } from '../../ConnectedForm'; +import { SubmitButton } from '../../ConnectedForm'; import { Column } from '../../Layout'; export type GridFormButtonsPosition = keyof typeof positions; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormCheckboxInput/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormCheckboxInput/index.tsx index 769a1ac07c..bc09ff4584 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormCheckboxInput/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormCheckboxInput/index.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import type * as React from 'react'; import { Controller } from 'react-hook-form'; import { Checkbox } from '../../../Form'; -import { BaseFormInputProps, GridFormCheckboxField } from '../../types'; +import type { BaseFormInputProps, GridFormCheckboxField } from '../../types'; export interface GridFormCheckboxInputProps extends BaseFormInputProps { field: GridFormCheckboxField; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormCustomInput/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormCustomInput/index.tsx index e974824322..0448dec5f4 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormCustomInput/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormCustomInput/index.tsx @@ -1,7 +1,10 @@ -import * as React from 'react'; -import { UseFormReturn } from 'react-hook-form'; +import type * as React from 'react'; +import type { UseFormReturn } from 'react-hook-form'; -import { GridFormCustomField, GridFormCustomGroupField } from '../../types'; +import type { + GridFormCustomField, + GridFormCustomGroupField, +} from '../../types'; export type GridFormCustomInputProps = { className?: string; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormFileInput/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormFileInput/index.tsx index cf07ec4a1d..b9dc5225e3 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormFileInput/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormFileInput/index.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; -import { UseFormReturn } from 'react-hook-form'; +import type * as React from 'react'; +import type { UseFormReturn } from 'react-hook-form'; import { Input } from '../../../Form'; -import { BaseFormInputProps, GridFormFileField } from '../../types'; +import type { BaseFormInputProps, GridFormFileField } from '../../types'; export interface GridFormFileInputProps extends BaseFormInputProps { field: Omit; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormHiddenInput/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormHiddenInput/index.tsx index 7098330db7..b5b4f4b3eb 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormHiddenInput/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormHiddenInput/index.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; -import { UseFormReturn } from 'react-hook-form'; +import type * as React from 'react'; +import type { UseFormReturn } from 'react-hook-form'; import { Input } from '../../../Form'; -import { GridFormHiddenField } from '../../types'; +import type { GridFormHiddenField } from '../../types'; export type GridFormHiddenInputProps = { field: GridFormHiddenField; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormNestedCheckboxInput/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormNestedCheckboxInput/index.tsx index 954b6179ba..8a2310c706 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormNestedCheckboxInput/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormNestedCheckboxInput/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import type * as React from 'react'; import { useEffect, useMemo, useState } from 'react'; import { Controller } from 'react-hook-form'; @@ -10,8 +10,11 @@ import { handleCheckboxChange, renderCheckbox, } from '../../../ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/utils'; -import { BaseFormInputProps, GridFormNestedCheckboxField } from '../../types'; -import { GridFormInputGroupProps } from '..'; +import type { + BaseFormInputProps, + GridFormNestedCheckboxField, +} from '../../types'; +import type { GridFormInputGroupProps } from '..'; export interface GridFormNestedCheckboxInputProps extends BaseFormInputProps { field: GridFormNestedCheckboxField; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormRadioGroupInput/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormRadioGroupInput/index.tsx index 4a510a190b..d9789af3dc 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormRadioGroupInput/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormRadioGroupInput/index.tsx @@ -1,9 +1,9 @@ import isString from 'lodash/isString'; -import * as React from 'react'; -import { UseFormReturn } from 'react-hook-form'; +import type * as React from 'react'; +import type { UseFormReturn } from 'react-hook-form'; import { Radio, RadioGroup } from '../../../Form'; -import { BaseFormInputProps, GridFormRadioGroupField } from '../../types'; +import type { BaseFormInputProps, GridFormRadioGroupField } from '../../types'; export interface GridFormRadioGroupInputProps extends BaseFormInputProps { field: GridFormRadioGroupField; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormSelectInput/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormSelectInput/index.tsx index ff12fe2b37..1188405df5 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormSelectInput/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormSelectInput/index.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; -import { UseFormReturn } from 'react-hook-form'; +import type * as React from 'react'; +import type { UseFormReturn } from 'react-hook-form'; import { Select } from '../../../Form'; -import { BaseFormInputProps, GridFormSelectField } from '../../types'; +import type { BaseFormInputProps, GridFormSelectField } from '../../types'; export interface GridFormSelectInputProps extends BaseFormInputProps { field: Omit; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormSweetContainerInput/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormSweetContainerInput/index.tsx index 05afd55f29..f8755bbabd 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormSweetContainerInput/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormSweetContainerInput/index.tsx @@ -1,9 +1,9 @@ -import * as React from 'react'; -import { UseFormReturn } from 'react-hook-form'; +import type * as React from 'react'; +import type { UseFormReturn } from 'react-hook-form'; import { Box } from '../../..'; import { Input } from '../../../Form'; -import { GridFormSweetContainerField } from '../../types'; +import type { GridFormSweetContainerField } from '../../types'; export type GridFormSweetContainerInputProps = { field: GridFormSweetContainerField; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormTextArea/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormTextArea/index.tsx index 4bfd81c5d2..e0b226ec69 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormTextArea/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormTextArea/index.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; -import { UseFormReturn } from 'react-hook-form'; +import type * as React from 'react'; +import type { UseFormReturn } from 'react-hook-form'; import { TextArea } from '../../../Form'; -import { BaseFormInputProps, GridFormTextAreaField } from '../../types'; +import type { BaseFormInputProps, GridFormTextAreaField } from '../../types'; export interface GridFormTextAreaProps extends BaseFormInputProps { field: Omit; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormTextInput/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormTextInput/index.tsx index b9b2ceb11c..28aca7acc3 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/GridFormTextInput/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/GridFormTextInput/index.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; -import { UseFormReturn } from 'react-hook-form'; +import type * as React from 'react'; +import type { UseFormReturn } from 'react-hook-form'; import { Input } from '../../../Form'; -import { BaseFormInputProps, GridFormTextField } from '../../types'; +import type { BaseFormInputProps, GridFormTextField } from '../../types'; export interface GridFormTextInputProps extends BaseFormInputProps { field: Omit; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/__fixtures__/assertions.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/__fixtures__/assertions.tsx index 385abbc55a..ce61f13806 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/__fixtures__/assertions.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/__fixtures__/assertions.tsx @@ -1,11 +1,11 @@ import '@testing-library/jest-dom'; -import { setupRtl } from '@skillsoft/gamut-tests'; +import type { setupRtl } from '@skillsoft/gamut-tests'; import { queryByAttribute } from '@testing-library/dom'; import { act } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { getComponent } from './renderers'; +import type { getComponent } from './renderers'; const getById = queryByAttribute.bind(null, 'id'); diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/__fixtures__/renderers.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/__fixtures__/renderers.tsx index 709d737d75..c599779fc8 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/__fixtures__/renderers.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/__fixtures__/renderers.tsx @@ -1,5 +1,5 @@ import { setupRtl } from '@skillsoft/gamut-tests'; -import * as React from 'react'; +import type * as React from 'react'; import { FormContext } from '../../__fixtures__/helpers'; import { @@ -10,7 +10,8 @@ import { stubTextareaField, stubTextField, } from '../../__tests__/stubs'; -import { GridFormInputGroup, GridFormInputGroupProps } from '..'; +import type { GridFormInputGroupProps } from '..'; +import { GridFormInputGroup } from '..'; import { GridFormCheckboxInput } from '../GridFormCheckboxInput'; import { GridFormFileInput } from '../GridFormFileInput'; import { GridFormRadioGroupInput } from '../GridFormRadioGroupInput'; diff --git a/packages/gamut/src/GridForm/GridFormInputGroup/index.tsx b/packages/gamut/src/GridForm/GridFormInputGroup/index.tsx index 5d8214fe65..3db7062200 100644 --- a/packages/gamut/src/GridForm/GridFormInputGroup/index.tsx +++ b/packages/gamut/src/GridForm/GridFormInputGroup/index.tsx @@ -1,14 +1,14 @@ import styled from '@emotion/styled'; import { css } from '@skillsoft/gamut-styles'; -import * as React from 'react'; -import { UseFormReturn } from 'react-hook-form'; +import type * as React from 'react'; +import type { UseFormReturn } from 'react-hook-form'; import { Anchor } from '../../Anchor'; import { FormError, FormGroup, FormGroupLabel } from '../../Form'; import { Column } from '../../Layout'; import { Markdown } from '../../Markdown'; import { Text } from '../../Typography'; -import { +import type { GridFormField, GridFormHiddenField, GridFormSweetContainerField, diff --git a/packages/gamut/src/GridForm/GridFormSections/GridFormContent.tsx b/packages/gamut/src/GridForm/GridFormSections/GridFormContent.tsx index 12b55aa70d..14e597bb9f 100644 --- a/packages/gamut/src/GridForm/GridFormSections/GridFormContent.tsx +++ b/packages/gamut/src/GridForm/GridFormSections/GridFormContent.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import type * as React from 'react'; import { getErrorMessage, useField } from '../../ConnectedForm/utils'; import { GridFormInputGroup } from '../GridFormInputGroup'; -import { GridFormField } from '../types'; +import type { GridFormField } from '../types'; export type GridFormContentProps = { field: GridFormField; diff --git a/packages/gamut/src/GridForm/GridFormSections/GridFormSection.tsx b/packages/gamut/src/GridForm/GridFormSections/GridFormSection.tsx index 77952fa28b..fe0c2d948a 100644 --- a/packages/gamut/src/GridForm/GridFormSections/GridFormSection.tsx +++ b/packages/gamut/src/GridForm/GridFormSections/GridFormSection.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { GridFormField } from '../types'; +import type { GridFormField } from '../types'; import { GridFormContent } from './GridFormContent'; export type GridFormSectionProps = { diff --git a/packages/gamut/src/GridForm/GridFormSections/GridFormSectionBreak.tsx b/packages/gamut/src/GridForm/GridFormSections/GridFormSectionBreak.tsx index 76081fc0ba..1184258c67 100644 --- a/packages/gamut/src/GridForm/GridFormSections/GridFormSectionBreak.tsx +++ b/packages/gamut/src/GridForm/GridFormSections/GridFormSectionBreak.tsx @@ -1,7 +1,8 @@ import styled from '@emotion/styled'; import { system } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; -import * as React from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; +import type * as React from 'react'; import { Column } from '../../Layout/Column'; diff --git a/packages/gamut/src/GridForm/GridFormSections/GridFormSectionTitle.tsx b/packages/gamut/src/GridForm/GridFormSections/GridFormSectionTitle.tsx index a2278efe39..e36fe97555 100644 --- a/packages/gamut/src/GridForm/GridFormSections/GridFormSectionTitle.tsx +++ b/packages/gamut/src/GridForm/GridFormSections/GridFormSectionTitle.tsx @@ -1,10 +1,10 @@ -import * as React from 'react'; +import type * as React from 'react'; import { Box } from '../../Box'; import { FormRequiredText } from '../../Form'; import { Column } from '../../Layout/Column'; import { Text } from '../../Typography/Text'; -import { +import type { GridFormRequiredTextProps, GridFormSectionTitleBaseProps, } from '../types'; diff --git a/packages/gamut/src/GridForm/GridFormSections/__fixtures__/renderers.tsx b/packages/gamut/src/GridForm/GridFormSections/__fixtures__/renderers.tsx index 69b26f41f5..6e14ef471d 100644 --- a/packages/gamut/src/GridForm/GridFormSections/__fixtures__/renderers.tsx +++ b/packages/gamut/src/GridForm/GridFormSections/__fixtures__/renderers.tsx @@ -1,8 +1,10 @@ -import * as React from 'react'; +import type * as React from 'react'; import { FormContext } from '../../__fixtures__/helpers'; -import { GridFormContent, GridFormContentProps } from '../GridFormContent'; -import { GridFormSection, GridFormSectionProps } from '../GridFormSection'; +import type { GridFormContentProps } from '../GridFormContent'; +import { GridFormContent } from '../GridFormContent'; +import type { GridFormSectionProps } from '../GridFormSection'; +import { GridFormSection } from '../GridFormSection'; type GridFormContentTestComponentProps = GridFormContentProps & { mode?: 'onSubmit' | 'onChange'; diff --git a/packages/gamut/src/GridForm/GridFormSections/__tests__/GridFormSection.test.tsx b/packages/gamut/src/GridForm/GridFormSections/__tests__/GridFormSection.test.tsx index ac5f699e7b..00d9d9f498 100644 --- a/packages/gamut/src/GridForm/GridFormSections/__tests__/GridFormSection.test.tsx +++ b/packages/gamut/src/GridForm/GridFormSections/__tests__/GridFormSection.test.tsx @@ -7,7 +7,7 @@ import { stubSelectField, stubTextField, } from '../../__tests__/stubs'; -import { GridFormTextField } from '../../types'; +import type { GridFormTextField } from '../../types'; import { GridFormSectionTestComponent } from '../__fixtures__/renderers'; const fields = [stubTextField, stubSelectField, stubFileField]; diff --git a/packages/gamut/src/GridForm/__fixtures__/helpers.tsx b/packages/gamut/src/GridForm/__fixtures__/helpers.tsx index e644eecd34..3e731a6b7a 100644 --- a/packages/gamut/src/GridForm/__fixtures__/helpers.tsx +++ b/packages/gamut/src/GridForm/__fixtures__/helpers.tsx @@ -1,7 +1,7 @@ -import * as React from 'react'; +import type * as React from 'react'; import { ConnectedForm } from '../../ConnectedForm'; -import { WithChildrenProp } from '../../utils'; +import type { WithChildrenProp } from '../../utils'; interface FormContextProps extends WithChildrenProp { mode?: 'onChange' | 'onSubmit'; diff --git a/packages/gamut/src/GridForm/__tests__/GridForm.test.tsx b/packages/gamut/src/GridForm/__tests__/GridForm.test.tsx index e9dabd582d..899278d5f3 100644 --- a/packages/gamut/src/GridForm/__tests__/GridForm.test.tsx +++ b/packages/gamut/src/GridForm/__tests__/GridForm.test.tsx @@ -1,10 +1,12 @@ import { setupRtl } from '@skillsoft/gamut-tests'; -import { fireEvent, queries } from '@testing-library/dom'; -import { act, RenderResult, waitFor } from '@testing-library/react'; +import type { queries } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/dom'; +import type { RenderResult } from '@testing-library/react'; +import { act, waitFor } from '@testing-library/react'; import { createPromise } from '../../utils'; import { GridForm } from '../GridForm'; -import { GridFormField } from '../types'; +import type { GridFormField } from '../types'; import { stubCheckboxField, stubFieldCases, diff --git a/packages/gamut/src/GridForm/__tests__/stubs.ts b/packages/gamut/src/GridForm/__tests__/stubs.ts index 2bf63c713f..d1c4e5ef37 100644 --- a/packages/gamut/src/GridForm/__tests__/stubs.ts +++ b/packages/gamut/src/GridForm/__tests__/stubs.ts @@ -1,4 +1,4 @@ -import { +import type { GridFormCheckboxField, GridFormFileField, GridFormHiddenField, diff --git a/packages/gamut/src/GridForm/types.ts b/packages/gamut/src/GridForm/types.ts index e7b004edbc..c1af82feef 100644 --- a/packages/gamut/src/GridForm/types.ts +++ b/packages/gamut/src/GridForm/types.ts @@ -1,13 +1,13 @@ -import { ReactNode } from 'react'; -import { RegisterOptions, UseFormReturn } from 'react-hook-form'; - -import { BoxProps } from '../Box'; -import { MinimalCheckboxProps } from '../ConnectedForm'; -import { CheckboxLabelUnion, TextAreaProps } from '../Form'; -import { CheckboxPaddingProps } from '../Form/types'; -import { ColumnProps } from '../Layout'; -import { InfoTipSubComponentProps } from '../Tip/InfoTip/type-utils'; -import { Text, TextProps } from '../Typography/Text'; +import type { ReactNode } from 'react'; +import type { RegisterOptions, UseFormReturn } from 'react-hook-form'; + +import type { BoxProps } from '../Box'; +import type { MinimalCheckboxProps } from '../ConnectedForm'; +import type { CheckboxLabelUnion, TextAreaProps } from '../Form'; +import type { CheckboxPaddingProps } from '../Form/types'; +import type { ColumnProps } from '../Layout'; +import type { InfoTipSubComponentProps } from '../Tip/InfoTip/type-utils'; +import type { Text, TextProps } from '../Typography/Text'; export interface BaseFormInputProps { className?: string; diff --git a/packages/gamut/src/GridForm/utils.ts b/packages/gamut/src/GridForm/utils.ts index 3f30cb2f73..d0c06213cb 100644 --- a/packages/gamut/src/GridForm/utils.ts +++ b/packages/gamut/src/GridForm/utils.ts @@ -1,6 +1,6 @@ import isArray from 'lodash/isArray'; -import { GridFormField } from './types'; +import type { GridFormField } from './types'; export const assignDefaultValue = (field: GridFormField) => { switch (field.type) { diff --git a/packages/gamut/src/Layout/Column.tsx b/packages/gamut/src/Layout/Column.tsx index 6060286e6f..3918641e1b 100644 --- a/packages/gamut/src/Layout/Column.tsx +++ b/packages/gamut/src/Layout/Column.tsx @@ -1,7 +1,9 @@ import styled from '@emotion/styled'; import { styledOptions, system, variant } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; -import { ComponentProps, forwardRef } from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; const rows = { 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6 }; diff --git a/packages/gamut/src/Layout/LayoutGrid.tsx b/packages/gamut/src/Layout/LayoutGrid.tsx index 326464da4f..6f2e3ea621 100644 --- a/packages/gamut/src/Layout/LayoutGrid.tsx +++ b/packages/gamut/src/Layout/LayoutGrid.tsx @@ -1,6 +1,7 @@ import styled from '@emotion/styled'; import { pxRem, styledOptions, system, theme } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; import pick from 'lodash/pick'; const columns = 12; diff --git a/packages/gamut/src/List/Header/ListHeaderCol.tsx b/packages/gamut/src/List/Header/ListHeaderCol.tsx index 1b06be3550..e7c4dd29df 100644 --- a/packages/gamut/src/List/Header/ListHeaderCol.tsx +++ b/packages/gamut/src/List/Header/ListHeaderCol.tsx @@ -1,8 +1,9 @@ -import { ComponentProps, forwardRef } from 'react'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; import { ColEl } from '../elements'; import { useListContext } from '../ListProvider'; -import { PublicListProps } from '../types'; +import type { PublicListProps } from '../types'; export interface ListColProps extends PublicListProps> {} diff --git a/packages/gamut/src/List/List.tsx b/packages/gamut/src/List/List.tsx index 0fbd926f23..65d78d6103 100644 --- a/packages/gamut/src/List/List.tsx +++ b/packages/gamut/src/List/List.tsx @@ -1,10 +1,12 @@ import { DotLoose } from '@skillsoft/gamut-patterns'; import { timingValues } from '@skillsoft/gamut-styles'; import isArray from 'lodash/isArray'; -import { ComponentProps, forwardRef, useEffect } from 'react'; -import * as React from 'react'; +import type { ComponentProps } from 'react'; +import type * as React from 'react'; +import { forwardRef, useEffect } from 'react'; -import { Box, BoxProps, FlexBox } from '../Box'; +import type { BoxProps } from '../Box'; +import { Box, FlexBox } from '../Box'; import { AnimatedListWrapper, hiddenVariant, @@ -14,7 +16,7 @@ import { } from './elements'; import { useScrollabilityCheck } from './hooks'; import { ListProvider, useList } from './ListProvider'; -import { AllListProps } from './types'; +import type { AllListProps } from './types'; export interface ListProps extends AllListProps> { /** Whether List should be an ol, ul element, or table */ diff --git a/packages/gamut/src/List/ListCol.tsx b/packages/gamut/src/List/ListCol.tsx index 0aa54bcedc..59c069ce2a 100644 --- a/packages/gamut/src/List/ListCol.tsx +++ b/packages/gamut/src/List/ListCol.tsx @@ -1,8 +1,9 @@ -import { ComponentProps, forwardRef } from 'react'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; import { ColEl, StickyHeaderColWrapper } from './elements'; import { useListContext } from './ListProvider'; -import { PublicListProps } from './types'; +import type { PublicListProps } from './types'; export interface ListColProps extends PublicListProps> {} diff --git a/packages/gamut/src/List/ListProvider.tsx b/packages/gamut/src/List/ListProvider.tsx index 0d7c2d8fdd..de5cb3c5a3 100644 --- a/packages/gamut/src/List/ListProvider.tsx +++ b/packages/gamut/src/List/ListProvider.tsx @@ -1,6 +1,6 @@ import { createContext, useContext, useMemo } from 'react'; -import { PrivateListProps } from './types'; +import type { PrivateListProps } from './types'; export interface ListContextProps extends PrivateListProps { depth: number; diff --git a/packages/gamut/src/List/ListRow.tsx b/packages/gamut/src/List/ListRow.tsx index f64b2edd86..4d7ec923f2 100644 --- a/packages/gamut/src/List/ListRow.tsx +++ b/packages/gamut/src/List/ListRow.tsx @@ -1,14 +1,15 @@ import styled from '@emotion/styled'; import { css } from '@skillsoft/gamut-styles'; import { AnimatePresence, motion } from 'framer-motion'; -import { ComponentProps, forwardRef, MouseEvent } from 'react'; -import * as React from 'react'; +import type { ComponentProps, MouseEvent } from 'react'; +import type * as React from 'react'; +import { forwardRef } from 'react'; import { Box } from '../Box'; -import { WithChildrenProp } from '../utils'; +import type { WithChildrenProp } from '../utils'; import { RowEl } from './elements'; import { useListContext } from './ListProvider'; -import { PublicListProps } from './types'; +import type { PublicListProps } from './types'; export interface RowProps extends Partial>> { diff --git a/packages/gamut/src/List/TableHeader.tsx b/packages/gamut/src/List/TableHeader.tsx index 60810da9c9..fd4d45adad 100644 --- a/packages/gamut/src/List/TableHeader.tsx +++ b/packages/gamut/src/List/TableHeader.tsx @@ -1,9 +1,10 @@ -import { ComponentProps, forwardRef } from 'react'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; import { Box } from '../Box'; import { HeaderRowEl } from './elements'; import { useListContext } from './ListProvider'; -import { PublicListProps } from './types'; +import type { PublicListProps } from './types'; export interface TableHeaderProps extends Partial>> {} diff --git a/packages/gamut/src/List/__tests__/List.test.tsx b/packages/gamut/src/List/__tests__/List.test.tsx index 382edfed25..834c5f0cc3 100644 --- a/packages/gamut/src/List/__tests__/List.test.tsx +++ b/packages/gamut/src/List/__tests__/List.test.tsx @@ -3,7 +3,8 @@ import { theme } from '@skillsoft/gamut-styles'; import { MockGamutProvider, setupRtl } from '@skillsoft/gamut-tests'; import { render } from '@testing-library/react'; -import { List, ListProps } from '../List'; +import type { ListProps } from '../List'; +import { List } from '../List'; import { ListCol } from '../ListCol'; import { ListRow } from '../ListRow'; diff --git a/packages/gamut/src/List/elements.tsx b/packages/gamut/src/List/elements.tsx index c6351612e5..73ebbfdb6b 100644 --- a/packages/gamut/src/List/elements.tsx +++ b/packages/gamut/src/List/elements.tsx @@ -7,7 +7,8 @@ import { theme, variant, } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; import { motion } from 'framer-motion'; import { Box } from '../Box'; diff --git a/packages/gamut/src/List/types.ts b/packages/gamut/src/List/types.ts index 90a9ca3856..e36f3a31f2 100644 --- a/packages/gamut/src/List/types.ts +++ b/packages/gamut/src/List/types.ts @@ -1,4 +1,4 @@ -import { ListProps } from './List'; +import type { ListProps } from './List'; export interface PrivateListProps { listType?: ListProps['as']; diff --git a/packages/gamut/src/Loading/Shimmer.tsx b/packages/gamut/src/Loading/Shimmer.tsx index 9a5fb69098..09448d8274 100644 --- a/packages/gamut/src/Loading/Shimmer.tsx +++ b/packages/gamut/src/Loading/Shimmer.tsx @@ -1,9 +1,10 @@ import { keyframes } from '@emotion/react'; import styled from '@emotion/styled'; import { css, useCurrentMode } from '@skillsoft/gamut-styles'; -import * as React from 'react'; +import type * as React from 'react'; -import { Box, BoxProps } from '../Box'; +import type { BoxProps } from '../Box'; +import { Box } from '../Box'; const slide = keyframes({ from: { left: -500 }, diff --git a/packages/gamut/src/Loading/Spinner.tsx b/packages/gamut/src/Loading/Spinner.tsx index 1f6f1924ac..7f2571f3a1 100644 --- a/packages/gamut/src/Loading/Spinner.tsx +++ b/packages/gamut/src/Loading/Spinner.tsx @@ -1,4 +1,4 @@ -import { FunctionComponent, SVGProps } from 'react'; +import type { FunctionComponent, SVGProps } from 'react'; export type SpinnerProps = SVGProps & { size?: number | string; diff --git a/packages/gamut/src/Markdown/__tests__/Markdown.test.tsx b/packages/gamut/src/Markdown/__tests__/Markdown.test.tsx index 5b1b7b9074..a45da1ed70 100644 --- a/packages/gamut/src/Markdown/__tests__/Markdown.test.tsx +++ b/packages/gamut/src/Markdown/__tests__/Markdown.test.tsx @@ -3,7 +3,7 @@ import { setupRtl } from '@skillsoft/gamut-tests'; import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; +import type * as React from 'react'; import { Markdown } from '../index'; diff --git a/packages/gamut/src/Markdown/index.tsx b/packages/gamut/src/Markdown/index.tsx index bd17f489d4..8b04affd7a 100644 --- a/packages/gamut/src/Markdown/index.tsx +++ b/packages/gamut/src/Markdown/index.tsx @@ -2,26 +2,24 @@ import styled from '@emotion/styled'; import cx from 'classnames'; import HtmlToReact from 'html-to-react'; import { marked } from 'marked'; +import type * as React from 'react'; import { PureComponent } from 'react'; -import * as React from 'react'; import sanitizeMarkdown from 'sanitize-markdown'; import { omitProps } from '../utils/omitProps'; +import type { MarkdownOverrideSettings } from './libs/overrides'; import { createCodeBlockOverride, createInputOverride, createTagOverride, createVideoOverride, - MarkdownOverrideSettings, standardOverrides, } from './libs/overrides'; import { MarkdownCheckbox } from './libs/overrides/Checkbox'; import { Details } from './libs/overrides/Details'; import { Iframe } from './libs/overrides/Iframe'; -import { - MarkdownAnchor, - MarkdownAnchorProps, -} from './libs/overrides/MarkdownAnchor'; +import type { MarkdownAnchorProps } from './libs/overrides/MarkdownAnchor'; +import { MarkdownAnchor } from './libs/overrides/MarkdownAnchor'; import { Table } from './libs/overrides/Table'; import { MarkdownVideo } from './libs/overrides/Video'; import { createPreprocessingInstructions } from './libs/preprocessing'; diff --git a/packages/gamut/src/Markdown/libs/overrides/Checkbox/index.tsx b/packages/gamut/src/Markdown/libs/overrides/Checkbox/index.tsx index 93fae49581..cb81f9249a 100644 --- a/packages/gamut/src/Markdown/libs/overrides/Checkbox/index.tsx +++ b/packages/gamut/src/Markdown/libs/overrides/Checkbox/index.tsx @@ -1,7 +1,8 @@ +import type * as React from 'react'; import { useState } from 'react'; -import * as React from 'react'; -import { Checkbox, CheckboxProps } from '../../../../Form'; +import type { CheckboxProps } from '../../../../Form'; +import { Checkbox } from '../../../../Form'; export type MarkdownCheckboxProps = Pick & { label: string; diff --git a/packages/gamut/src/Markdown/libs/overrides/Details/index.tsx b/packages/gamut/src/Markdown/libs/overrides/Details/index.tsx index 8bfda8c3a8..8ea6475e84 100644 --- a/packages/gamut/src/Markdown/libs/overrides/Details/index.tsx +++ b/packages/gamut/src/Markdown/libs/overrides/Details/index.tsx @@ -1,8 +1,9 @@ -import { HTMLAttributes, useMemo } from 'react'; -import * as React from 'react'; +import type { HTMLAttributes } from 'react'; +import type * as React from 'react'; +import { useMemo } from 'react'; import { Box } from '../../../../Box'; -import { HTMLToReactNode } from '..'; +import type { HTMLToReactNode } from '..'; // import styles from '../../../styles/_' interface MarkdownHTMLDetailsAttributes diff --git a/packages/gamut/src/Markdown/libs/overrides/Iframe/index.tsx b/packages/gamut/src/Markdown/libs/overrides/Iframe/index.tsx index 6f472f5e88..0bf24dac45 100644 --- a/packages/gamut/src/Markdown/libs/overrides/Iframe/index.tsx +++ b/packages/gamut/src/Markdown/libs/overrides/Iframe/index.tsx @@ -1,5 +1,5 @@ /* eslint-disable jsx-a11y/iframe-has-title */ -import { FunctionComponent, HTMLAttributes } from 'react'; +import type { FunctionComponent, HTMLAttributes } from 'react'; import { Video } from '../../../../Video'; diff --git a/packages/gamut/src/Markdown/libs/overrides/MarkdownAnchor/index.tsx b/packages/gamut/src/Markdown/libs/overrides/MarkdownAnchor/index.tsx index 0a515dae4b..d9df69ec08 100644 --- a/packages/gamut/src/Markdown/libs/overrides/MarkdownAnchor/index.tsx +++ b/packages/gamut/src/Markdown/libs/overrides/MarkdownAnchor/index.tsx @@ -1,6 +1,6 @@ /* eslint-disable jsx-a11y/anchor-has-content */ -import { ComponentProps } from 'react'; -import * as React from 'react'; +import type { ComponentProps } from 'react'; +import type * as React from 'react'; import { AnchorBase } from '../../../../Anchor'; diff --git a/packages/gamut/src/Markdown/libs/overrides/Table/index.tsx b/packages/gamut/src/Markdown/libs/overrides/Table/index.tsx index ed41f2a89a..f3fdfe9943 100644 --- a/packages/gamut/src/Markdown/libs/overrides/Table/index.tsx +++ b/packages/gamut/src/Markdown/libs/overrides/Table/index.tsx @@ -1,7 +1,7 @@ import styled from '@emotion/styled'; import { pxRem } from '@skillsoft/gamut-styles'; -import { HTMLAttributes } from 'react'; -import * as React from 'react'; +import type { HTMLAttributes } from 'react'; +import type * as React from 'react'; const TableWrapper = styled.div` border: 1px solid ${({ theme }) => theme.colors['gray-300']}; diff --git a/packages/gamut/src/Markdown/libs/overrides/Video/index.tsx b/packages/gamut/src/Markdown/libs/overrides/Video/index.tsx index a9fefa8046..75cf568422 100644 --- a/packages/gamut/src/Markdown/libs/overrides/Video/index.tsx +++ b/packages/gamut/src/Markdown/libs/overrides/Video/index.tsx @@ -1,6 +1,6 @@ /* eslint-disable jsx-a11y/iframe-has-title */ -import { TrackProps } from '@vidstack/react'; -import { DetailedHTMLProps, VideoHTMLAttributes } from 'react'; +import type { TrackProps } from '@vidstack/react'; +import type { DetailedHTMLProps, VideoHTMLAttributes } from 'react'; import { Video } from '../../../../Video'; // eslint-disable-next-line @skillsoft/gamut/no-css-standalone diff --git a/packages/gamut/src/Markdown/libs/overrides/index.tsx b/packages/gamut/src/Markdown/libs/overrides/index.tsx index a4f85a5970..982fc59020 100644 --- a/packages/gamut/src/Markdown/libs/overrides/index.tsx +++ b/packages/gamut/src/Markdown/libs/overrides/index.tsx @@ -2,7 +2,7 @@ import styled from '@emotion/styled'; import HtmlToReact from 'html-to-react'; import camelCaseMap from 'html-to-react/lib/camel-case-attribute-names'; import get from 'lodash/get'; -import * as React from 'react'; +import type * as React from 'react'; import { getLabel, isCheckboxParent, isInput, isLabelText } from './utils'; diff --git a/packages/gamut/src/Markdown/libs/overrides/utils.tsx b/packages/gamut/src/Markdown/libs/overrides/utils.tsx index 4e359e2333..228279b2c9 100644 --- a/packages/gamut/src/Markdown/libs/overrides/utils.tsx +++ b/packages/gamut/src/Markdown/libs/overrides/utils.tsx @@ -1,6 +1,6 @@ import find from 'lodash/find'; -import { HTMLToReactNode } from '.'; +import type { HTMLToReactNode } from '.'; export const isCheckboxParent = (node: HTMLToReactNode, type: string) => Boolean( diff --git a/packages/gamut/src/Markdown/libs/preprocessing.ts b/packages/gamut/src/Markdown/libs/preprocessing.ts index 3a398de122..df1ff5aef2 100644 --- a/packages/gamut/src/Markdown/libs/preprocessing.ts +++ b/packages/gamut/src/Markdown/libs/preprocessing.ts @@ -1,6 +1,6 @@ import cx from 'classnames'; -import { HTMLToReactNode } from './overrides'; +import type { HTMLToReactNode } from './overrides'; /** * Preprocessing Instructions: diff --git a/packages/gamut/src/Markdown/styles.ts b/packages/gamut/src/Markdown/styles.ts index 72a592b938..0160958f5d 100644 --- a/packages/gamut/src/Markdown/styles.ts +++ b/packages/gamut/src/Markdown/styles.ts @@ -1,4 +1,5 @@ -import { css, Theme } from '@emotion/react'; +import type { Theme } from '@emotion/react'; +import { css } from '@emotion/react'; // Base markdown styles mixin equivalent const markdownStyle = ( diff --git a/packages/gamut/src/Menu/Menu.tsx b/packages/gamut/src/Menu/Menu.tsx index 279b4d1920..83b6bd328d 100644 --- a/packages/gamut/src/Menu/Menu.tsx +++ b/packages/gamut/src/Menu/Menu.tsx @@ -1,4 +1,5 @@ -import { ComponentProps, forwardRef } from 'react'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; import { List } from './elements'; import { MenuProvider, useMenu } from './MenuContext'; diff --git a/packages/gamut/src/Menu/MenuContext.tsx b/packages/gamut/src/Menu/MenuContext.tsx index c96c0c9ddf..175e50a1d8 100644 --- a/packages/gamut/src/Menu/MenuContext.tsx +++ b/packages/gamut/src/Menu/MenuContext.tsx @@ -1,6 +1,6 @@ import { createContext, useContext } from 'react'; -import { ListProps } from '../List'; +import type { ListProps } from '../List'; export interface MenuContextProps { spacing: 'normal' | 'condensed'; diff --git a/packages/gamut/src/Menu/MenuItem.tsx b/packages/gamut/src/Menu/MenuItem.tsx index 35c278168d..04ca7efb7c 100644 --- a/packages/gamut/src/Menu/MenuItem.tsx +++ b/packages/gamut/src/Menu/MenuItem.tsx @@ -1,24 +1,13 @@ -import { GamutIconProps } from '@skillsoft/gamut-icons'; +import type { GamutIconProps } from '@skillsoft/gamut-icons'; import isString from 'lodash/isString'; -import { - ComponentProps, - forwardRef, - MouseEventHandler, - Ref, - useId, -} from 'react'; +import type { ComponentProps, MouseEventHandler, Ref } from 'react'; +import { forwardRef, useId } from 'react'; import { FlexBox } from '../Box'; -import { ToolTipProps } from '../Tip/ToolTip'; +import type { ToolTipProps } from '../Tip/ToolTip'; import { Text } from '../Typography'; -import { - ListButton, - ListItem, - ListItemProps, - ListLink, - ListLinkProps, - MenuToolTipWrapper, -} from './elements'; +import type { ListItemProps, ListLinkProps } from './elements'; +import { ListButton, ListItem, ListLink, MenuToolTipWrapper } from './elements'; import { useMenuContext } from './MenuContext'; const getListItemType = (href: boolean, onClick: boolean) => diff --git a/packages/gamut/src/Menu/MenuSeparator.tsx b/packages/gamut/src/Menu/MenuSeparator.tsx index 01bbf7ab99..4e65f790ad 100644 --- a/packages/gamut/src/Menu/MenuSeparator.tsx +++ b/packages/gamut/src/Menu/MenuSeparator.tsx @@ -1,7 +1,7 @@ -import * as React from 'react'; +import type * as React from 'react'; import { Box, FlexBox } from '../Box'; -import { FlexBoxProps } from '../Box/props'; +import type { FlexBoxProps } from '../Box/props'; interface MenuSeperatorProps extends FlexBoxProps { children?: never; diff --git a/packages/gamut/src/Menu/elements.tsx b/packages/gamut/src/Menu/elements.tsx index 87ecba632f..d0f63d75cc 100644 --- a/packages/gamut/src/Menu/elements.tsx +++ b/packages/gamut/src/Menu/elements.tsx @@ -4,14 +4,17 @@ import { system, transitionConcat, } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; import isObject from 'lodash/isObject'; -import { ComponentProps, forwardRef } from 'react'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; import { sharedStates } from '../Box/props'; import { resetStyles, Selectors } from '../ButtonBase/ButtonBase'; -import { ToolTip, ToolTipProps } from '../Tip/ToolTip'; -import { MenuItem } from './MenuItem'; +import type { ToolTipProps } from '../Tip/ToolTip'; +import { ToolTip } from '../Tip/ToolTip'; +import type { MenuItem } from './MenuItem'; enum MenuItemSelectors { OUTLINE = '&:after', diff --git a/packages/gamut/src/Modals/Dialog.tsx b/packages/gamut/src/Modals/Dialog.tsx index e6167982a7..e0b21cb229 100644 --- a/packages/gamut/src/Modals/Dialog.tsx +++ b/packages/gamut/src/Modals/Dialog.tsx @@ -1,15 +1,17 @@ import { MiniDeleteIcon } from '@skillsoft/gamut-icons'; -import { ComponentProps, useId } from 'react'; -import * as React from 'react'; +import type { ComponentProps } from 'react'; +import type * as React from 'react'; +import { useId } from 'react'; import { Box } from '../Box'; import { FillButton, IconButton, TextButton } from '../Button'; import { Overlay } from '../Overlay'; import { Text } from '../Typography'; import { isNullish } from '../utils/nullish'; -import { ModalContainer, ModalContainerProps } from './elements'; +import type { ModalContainerProps } from './elements'; +import { ModalContainer } from './elements'; import { ImageContainer } from './ImageContainer'; -import { CloseButtonProps, ModalBaseProps } from './types'; +import type { CloseButtonProps, ModalBaseProps } from './types'; interface DialogButtonProps { children: React.ReactNode; diff --git a/packages/gamut/src/Modals/ImageContainer.tsx b/packages/gamut/src/Modals/ImageContainer.tsx index 2eba825ecf..c6bc3321ea 100644 --- a/packages/gamut/src/Modals/ImageContainer.tsx +++ b/packages/gamut/src/Modals/ImageContainer.tsx @@ -1,8 +1,8 @@ -import { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; import { Box } from '../Box'; -import { ModalContainer } from './elements'; -import { ModalBaseProps } from './types'; +import type { ModalContainer } from './elements'; +import type { ModalBaseProps } from './types'; interface ImageProps extends Pick { size: Exclude< diff --git a/packages/gamut/src/Modals/Modal.tsx b/packages/gamut/src/Modals/Modal.tsx index 8312dfdf45..e23be25aaa 100644 --- a/packages/gamut/src/Modals/Modal.tsx +++ b/packages/gamut/src/Modals/Modal.tsx @@ -1,14 +1,16 @@ import { MiniDeleteIcon } from '@skillsoft/gamut-icons'; -import { ComponentProps, useId, useState } from 'react'; -import * as React from 'react'; +import type { ComponentProps } from 'react'; +import type * as React from 'react'; +import { useId, useState } from 'react'; import { Box } from '../Box'; -import { ButtonProps, FillButton, IconButton, TextButton } from '../Button'; +import type { ButtonProps } from '../Button'; +import { FillButton, IconButton, TextButton } from '../Button'; import { Overlay } from '../Overlay'; import { Text } from '../Typography'; import { ModalContainer } from './elements'; import { ImageContainer } from './ImageContainer'; -import { CloseButtonProps, ModalBaseProps } from './types'; +import type { CloseButtonProps, ModalBaseProps } from './types'; interface DialogButtonProps { children: React.ReactNode; diff --git a/packages/gamut/src/Modals/elements.tsx b/packages/gamut/src/Modals/elements.tsx index 012dddf97e..eb04199cb8 100644 --- a/packages/gamut/src/Modals/elements.tsx +++ b/packages/gamut/src/Modals/elements.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { variant } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; import { PatternBackdrop } from '../PatternBackdrop/PatternBackdrop'; import { focusVisibleStyle } from '../utils'; diff --git a/packages/gamut/src/Modals/types.ts b/packages/gamut/src/Modals/types.ts index a7c5ed4b2f..c968924712 100644 --- a/packages/gamut/src/Modals/types.ts +++ b/packages/gamut/src/Modals/types.ts @@ -1,9 +1,9 @@ -import { ComponentProps, Ref } from 'react'; -import * as React from 'react'; +import type { ComponentProps, Ref } from 'react'; +import type * as React from 'react'; -import { OverlayProps } from '../Overlay'; -import { TipCenterAlignment } from '../Tip/shared/types'; -import { ModalContainer } from './elements'; +import type { OverlayProps } from '../Overlay'; +import type { TipCenterAlignment } from '../Tip/shared/types'; +import type { ModalContainer } from './elements'; export interface ModalOverlayProps extends Pick< diff --git a/packages/gamut/src/Overlay/__tests__/Overlay.test.tsx b/packages/gamut/src/Overlay/__tests__/Overlay.test.tsx index bcfc440206..95dcdab451 100644 --- a/packages/gamut/src/Overlay/__tests__/Overlay.test.tsx +++ b/packages/gamut/src/Overlay/__tests__/Overlay.test.tsx @@ -1,7 +1,8 @@ import { setupRtl } from '@skillsoft/gamut-tests'; import { fireEvent } from '@testing-library/react'; -import { Overlay, OverlayProps } from '..'; +import type { OverlayProps } from '..'; +import { Overlay } from '..'; const OverlayTest = (props?: Partial) => { return ( diff --git a/packages/gamut/src/Overlay/index.tsx b/packages/gamut/src/Overlay/index.tsx index 4c25d49d59..886d94a7d5 100644 --- a/packages/gamut/src/Overlay/index.tsx +++ b/packages/gamut/src/Overlay/index.tsx @@ -1,7 +1,7 @@ import styled from '@emotion/styled'; import { states } from '@skillsoft/gamut-styles'; +import type * as React from 'react'; import { useCallback } from 'react'; -import * as React from 'react'; import { BodyPortal } from '../BodyPortal'; import { FlexBox } from '../Box'; diff --git a/packages/gamut/src/Pagination/EllipsisButton.tsx b/packages/gamut/src/Pagination/EllipsisButton.tsx index bb3e4f3693..e2e75c9531 100644 --- a/packages/gamut/src/Pagination/EllipsisButton.tsx +++ b/packages/gamut/src/Pagination/EllipsisButton.tsx @@ -1,7 +1,8 @@ import { forwardRef, useState } from 'react'; -import { ButtonBaseElements } from '../ButtonBase/ButtonBase'; -import { PaginationButton, PaginationButtonProps } from './PaginationButton'; +import type { ButtonBaseElements } from '../ButtonBase/ButtonBase'; +import type { PaginationButtonProps } from './PaginationButton'; +import { PaginationButton } from './PaginationButton'; import { wrapWithSlideAnimation } from './utils'; export type EllipsisButtonProps = PaginationButtonProps & { diff --git a/packages/gamut/src/Pagination/PaginationButton.tsx b/packages/gamut/src/Pagination/PaginationButton.tsx index c71ec30930..ebe8fe05ee 100644 --- a/packages/gamut/src/Pagination/PaginationButton.tsx +++ b/packages/gamut/src/Pagination/PaginationButton.tsx @@ -1,9 +1,10 @@ -import { GamutIconProps } from '@skillsoft/gamut-icons'; -import { StyleProps } from '@skillsoft/variance'; -import { ComponentProps, ComponentType, forwardRef, useMemo } from 'react'; +import type { GamutIconProps } from '@skillsoft/gamut-icons'; +import type { StyleProps } from '@skillsoft/variance'; +import type { ComponentProps, ComponentType } from 'react'; +import { forwardRef, useMemo } from 'react'; import { createButtonComponent } from '../Button/shared'; -import { ButtonBaseElements } from '../ButtonBase/ButtonBase'; +import type { ButtonBaseElements } from '../ButtonBase/ButtonBase'; import { paginationStrokeButtonStates, paginationStrokeVariant, diff --git a/packages/gamut/src/Pagination/__tests__/Pagination.test.tsx b/packages/gamut/src/Pagination/__tests__/Pagination.test.tsx index 7b0c8d75f6..c951f3608c 100644 --- a/packages/gamut/src/Pagination/__tests__/Pagination.test.tsx +++ b/packages/gamut/src/Pagination/__tests__/Pagination.test.tsx @@ -1,5 +1,6 @@ import { setupRtl } from '@skillsoft/gamut-tests'; -import { fireEvent, queries, RenderResult } from '@testing-library/react'; +import type { queries, RenderResult } from '@testing-library/react'; +import { fireEvent } from '@testing-library/react'; import { Pagination } from '..'; diff --git a/packages/gamut/src/Pagination/index.tsx b/packages/gamut/src/Pagination/index.tsx index 64007dac44..2f1afbebc0 100644 --- a/packages/gamut/src/Pagination/index.tsx +++ b/packages/gamut/src/Pagination/index.tsx @@ -3,8 +3,8 @@ import { MiniChevronRightIcon, } from '@skillsoft/gamut-icons'; import { useElementDir } from '@skillsoft/gamut-styles'; +import type * as React from 'react'; import { useMemo, useRef, useState } from 'react'; -import * as React from 'react'; import { Text } from '..'; import { FlexBox } from '../Box'; diff --git a/packages/gamut/src/Pagination/utils.tsx b/packages/gamut/src/Pagination/utils.tsx index e70f9dfd45..d9d24f5083 100644 --- a/packages/gamut/src/Pagination/utils.tsx +++ b/packages/gamut/src/Pagination/utils.tsx @@ -1,10 +1,10 @@ import { timingValues } from '@skillsoft/gamut-styles'; import { AnimatePresence, motion } from 'framer-motion'; +import type * as React from 'react'; import { useEffect, useRef } from 'react'; -import * as React from 'react'; -import { BaseEllipsisButton } from './EllipsisButton'; -import { PaginationButton } from './PaginationButton'; +import type { BaseEllipsisButton } from './EllipsisButton'; +import type { PaginationButton } from './PaginationButton'; const FADE_DURATION_SECONDS = timingValues.base / 1000; diff --git a/packages/gamut/src/PatternBackdrop/PatternBackdrop.tsx b/packages/gamut/src/PatternBackdrop/PatternBackdrop.tsx index 799bf78153..962afda607 100644 --- a/packages/gamut/src/PatternBackdrop/PatternBackdrop.tsx +++ b/packages/gamut/src/PatternBackdrop/PatternBackdrop.tsx @@ -1,8 +1,10 @@ import styled from '@emotion/styled'; import { CheckerDense } from '@skillsoft/gamut-patterns'; import { styledOptions, system } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; -import { ComponentProps, forwardRef } from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; import { Box } from '../Box'; diff --git a/packages/gamut/src/Popover/Popover.tsx b/packages/gamut/src/Popover/Popover.tsx index 73b32c96b3..40aa6e48a5 100755 --- a/packages/gamut/src/Popover/Popover.tsx +++ b/packages/gamut/src/Popover/Popover.tsx @@ -17,7 +17,7 @@ import { RaisedDiv, } from './elements'; import { getBeakVariant } from './styles/beak'; -import { PopoverProps } from './types'; +import type { PopoverProps } from './types'; import { getDefaultOffset, resolveHorizontalSideForRtl } from './utils'; export const Popover: React.FC = ({ diff --git a/packages/gamut/src/Popover/__tests__/Popover.test.tsx b/packages/gamut/src/Popover/__tests__/Popover.test.tsx index d5245084a8..ad0eb72a7a 100644 --- a/packages/gamut/src/Popover/__tests__/Popover.test.tsx +++ b/packages/gamut/src/Popover/__tests__/Popover.test.tsx @@ -5,7 +5,8 @@ import { setupRtl } from '@skillsoft/gamut-tests'; import { fireEvent, render, screen, waitFor } from '@testing-library/react'; import React from 'react'; -import { Popover, PopoverProps } from '..'; +import type { PopoverProps } from '..'; +import { Popover } from '..'; const targetRefObj = { current: { diff --git a/packages/gamut/src/Popover/elements.tsx b/packages/gamut/src/Popover/elements.tsx index 73db70213b..983e67189c 100644 --- a/packages/gamut/src/Popover/elements.tsx +++ b/packages/gamut/src/Popover/elements.tsx @@ -1,17 +1,14 @@ import styled from '@emotion/styled'; import { timingValues, variant } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; import { AnimatePresence, motion } from 'framer-motion'; import { BodyPortal } from '../BodyPortal'; import { Box, FlexBox } from '../Box'; import { popoverToolTipBodyAlignments } from '../Tip/shared/styles/styles'; -import { WithChildrenProp } from '../utils'; -import { - popoverStates, - raisedDivVariants, - transformValues, -} from './styles/base'; +import type { WithChildrenProp } from '../utils'; +import type { popoverStates } from './styles/base'; +import { raisedDivVariants, transformValues } from './styles/base'; import { patternContainerBaseStyles } from './styles/pattern'; import { beakBoxVariants, @@ -20,7 +17,7 @@ import { patternVariantStyles, widthStates, } from './styles/variants'; -import { PopoverProps } from './types'; +import type { PopoverProps } from './types'; export type PopoverVariants = StyleProps & { widthRestricted?: boolean; diff --git a/packages/gamut/src/Popover/styles/beak.ts b/packages/gamut/src/Popover/styles/beak.ts index 4ed3d4df99..66a219419b 100644 --- a/packages/gamut/src/Popover/styles/beak.ts +++ b/packages/gamut/src/Popover/styles/beak.ts @@ -8,7 +8,7 @@ import { horizontalCenterBeakRtlPopover, tooltipBgColor, } from '../../Tip/shared/styles/styles'; -import { PopoverProps } from '../types'; +import type { PopoverProps } from '../types'; import { popoverPrimaryBgColor } from './base'; const rtlBeakBoxRight = horizontalCenterBeakRtlPopover('right'); diff --git a/packages/gamut/src/Popover/types.tsx b/packages/gamut/src/Popover/types.tsx index 9176cda9d6..333e2d60f8 100755 --- a/packages/gamut/src/Popover/types.tsx +++ b/packages/gamut/src/Popover/types.tsx @@ -1,7 +1,8 @@ -import { PatternProps } from '@skillsoft/gamut-patterns'; -import { HTMLAttributes, type RefObject } from 'react'; +import type { PatternProps } from '@skillsoft/gamut-patterns'; +import type { HTMLAttributes } from 'react'; +import { type RefObject } from 'react'; -import { PopoverVariants } from './elements'; +import type { PopoverVariants } from './elements'; export type FocusTrapPopoverProps = { /** diff --git a/packages/gamut/src/Popover/utils.ts b/packages/gamut/src/Popover/utils.ts index 1e9d45e408..9e0c593c3e 100644 --- a/packages/gamut/src/Popover/utils.ts +++ b/packages/gamut/src/Popover/utils.ts @@ -1,4 +1,4 @@ -import { PopoverProps } from './types'; +import type { PopoverProps } from './types'; /** * Mirrors horizontal `left` / `right` in RTL when `useLogicalProperties` is enabled diff --git a/packages/gamut/src/PopoverContainer/PopoverContainer.tsx b/packages/gamut/src/PopoverContainer/PopoverContainer.tsx index 7eb30aabd9..b19811c7e2 100644 --- a/packages/gamut/src/PopoverContainer/PopoverContainer.tsx +++ b/packages/gamut/src/PopoverContainer/PopoverContainer.tsx @@ -1,8 +1,8 @@ import styled from '@emotion/styled'; import { elementDir, system, useElementDir } from '@skillsoft/gamut-styles'; import { variance } from '@skillsoft/variance'; +import type * as React from 'react'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import * as React from 'react'; import { useWindowScroll, useWindowSize } from 'react-use'; import { BodyPortal } from '../BodyPortal'; @@ -14,7 +14,7 @@ import { useScrollingParents, useScrollingParentsEffect, } from './hooks'; -import { +import type { PopoverContainerProps, PopoverContainerState, TargetRef, diff --git a/packages/gamut/src/PopoverContainer/__tests__/PopoverContainer.test.tsx b/packages/gamut/src/PopoverContainer/__tests__/PopoverContainer.test.tsx index 9b20843083..3ef6dfb9b5 100644 --- a/packages/gamut/src/PopoverContainer/__tests__/PopoverContainer.test.tsx +++ b/packages/gamut/src/PopoverContainer/__tests__/PopoverContainer.test.tsx @@ -3,7 +3,7 @@ import { cleanup, fireEvent, render, screen } from '@testing-library/react'; import React from 'react'; import { PopoverContainer } from '..'; -import { PopoverContainerProps } from '../types'; +import type { PopoverContainerProps } from '../types'; import * as utils from '../utils'; import { createMockDOMRect, diff --git a/packages/gamut/src/PopoverContainer/types.ts b/packages/gamut/src/PopoverContainer/types.ts index d70994aca8..3d5db77685 100644 --- a/packages/gamut/src/PopoverContainer/types.ts +++ b/packages/gamut/src/PopoverContainer/types.ts @@ -1,7 +1,7 @@ -import { RefObject } from 'react'; +import type { RefObject } from 'react'; -import { FocusTrapProps } from '../FocusTrap'; -import { WithChildrenProp } from '../utils'; +import type { FocusTrapProps } from '../FocusTrap'; +import type { WithChildrenProp } from '../utils'; export type PopoverContainerAlignment = | 'top-left' diff --git a/packages/gamut/src/PopoverContainer/utils.ts b/packages/gamut/src/PopoverContainer/utils.ts index de12fbc155..8c97fa8ad0 100644 --- a/packages/gamut/src/PopoverContainer/utils.ts +++ b/packages/gamut/src/PopoverContainer/utils.ts @@ -1,9 +1,7 @@ -import { - CSSObject, - percentageOrAbsolute as percent, -} from '@skillsoft/variance'; +import type { CSSObject } from '@skillsoft/variance'; +import { percentageOrAbsolute as percent } from '@skillsoft/variance'; -import { PopoverContainerAlignment, PopoverPositionConfig } from './types'; +import type { PopoverContainerAlignment, PopoverPositionConfig } from './types'; export interface PopoverPositionResult { /** Edge insets pinning the popover to the container (`left` / `right` / `top` / `bottom`). */ diff --git a/packages/gamut/src/ProgressBar/__tests__/ProgressBar.test.tsx b/packages/gamut/src/ProgressBar/__tests__/ProgressBar.test.tsx index 95a58ec683..8f2ebce3b9 100644 --- a/packages/gamut/src/ProgressBar/__tests__/ProgressBar.test.tsx +++ b/packages/gamut/src/ProgressBar/__tests__/ProgressBar.test.tsx @@ -2,7 +2,8 @@ import { DiagonalADense } from '@skillsoft/gamut-patterns'; import { MockGamutProvider, setupRtl } from '@skillsoft/gamut-tests'; import { render, screen } from '@testing-library/react'; -import { ProgressBar, ProgressBarProps } from '..'; +import type { ProgressBarProps } from '..'; +import { ProgressBar } from '..'; const renderView = setupRtl(ProgressBar, { percent: 50, diff --git a/packages/gamut/src/ProgressBar/index.tsx b/packages/gamut/src/ProgressBar/index.tsx index 0158335333..05c0edb710 100644 --- a/packages/gamut/src/ProgressBar/index.tsx +++ b/packages/gamut/src/ProgressBar/index.tsx @@ -1,5 +1,5 @@ import styled from '@emotion/styled'; -import { PatternProps } from '@skillsoft/gamut-patterns'; +import type { PatternProps } from '@skillsoft/gamut-patterns'; import { theme, variant } from '@skillsoft/gamut-styles'; import * as React from 'react'; diff --git a/packages/gamut/src/RadialProgress/index.tsx b/packages/gamut/src/RadialProgress/index.tsx index 6a1b8d6405..8e41ea3374 100644 --- a/packages/gamut/src/RadialProgress/index.tsx +++ b/packages/gamut/src/RadialProgress/index.tsx @@ -1,7 +1,7 @@ import styled from '@emotion/styled'; import { css, theme } from '@skillsoft/gamut-styles'; -import { SVGProps } from 'react'; -import * as React from 'react'; +import type { SVGProps } from 'react'; +import type * as React from 'react'; import { FlexBox } from '../Box'; import { Text } from '../Typography'; diff --git a/packages/gamut/src/SkipToContent/index.tsx b/packages/gamut/src/SkipToContent/index.tsx index ec3a6682b1..27ac58ddb1 100644 --- a/packages/gamut/src/SkipToContent/index.tsx +++ b/packages/gamut/src/SkipToContent/index.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/react'; import styled from '@emotion/styled'; import { MiniArrowDownIcon } from '@skillsoft/gamut-icons'; import { themed, timing } from '@skillsoft/gamut-styles'; -import * as React from 'react'; +import type * as React from 'react'; import { Box } from '../Box'; diff --git a/packages/gamut/src/Tabs/Tab.tsx b/packages/gamut/src/Tabs/Tab.tsx index ae0baa30f6..dbd34a7a74 100644 --- a/packages/gamut/src/Tabs/Tab.tsx +++ b/packages/gamut/src/Tabs/Tab.tsx @@ -1,12 +1,11 @@ import styled from '@emotion/styled'; -import * as React from 'react'; -import { - Tab as ReactAriaTab, - TabProps as ReactAriaTabProps, -} from 'react-aria-components'; +import type * as React from 'react'; +import type { TabProps as ReactAriaTabProps } from 'react-aria-components'; +import { Tab as ReactAriaTab } from 'react-aria-components'; import { tabElementBaseProps } from './props'; -import { TabButtonProps, tabStates, tabVariants } from './TabButton'; +import type { TabButtonProps } from './TabButton'; +import { tabStates, tabVariants } from './TabButton'; import { useTab } from './TabProvider'; interface TabBaseProps extends TabButtonProps, ReactAriaTabProps {} diff --git a/packages/gamut/src/Tabs/TabButton.tsx b/packages/gamut/src/Tabs/TabButton.tsx index 96cc4ada8b..2d76d69bd8 100644 --- a/packages/gamut/src/Tabs/TabButton.tsx +++ b/packages/gamut/src/Tabs/TabButton.tsx @@ -1,13 +1,10 @@ import styled from '@emotion/styled'; import { states, variant } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; import { ButtonBase } from '../ButtonBase'; -import { - tabElementBaseProps, - TabElementStyleProps, - TabSelectors, -} from './props'; +import type { TabElementStyleProps } from './props'; +import { tabElementBaseProps, TabSelectors } from './props'; export interface TabButtonProps extends StyleProps, diff --git a/packages/gamut/src/Tabs/TabList.tsx b/packages/gamut/src/Tabs/TabList.tsx index c49226c644..d30783bbb2 100644 --- a/packages/gamut/src/Tabs/TabList.tsx +++ b/packages/gamut/src/Tabs/TabList.tsx @@ -1,13 +1,14 @@ import styled from '@emotion/styled'; -import { StyleProps } from '@skillsoft/variance'; -import * as React from 'react'; -import { - TabList as ReactAriaTabList, +import type { StyleProps } from '@skillsoft/variance'; +import type * as React from 'react'; +import type { TabListProps as ReactAriaTabListProps, TabProps, } from 'react-aria-components'; +import { TabList as ReactAriaTabList } from 'react-aria-components'; -import { tabElementBaseProps, TabElementStyleProps } from './props'; +import type { TabElementStyleProps } from './props'; +import { tabElementBaseProps } from './props'; import { tabContainerStates, tabContainerVariants } from './styles'; import { useTab } from './TabProvider'; diff --git a/packages/gamut/src/Tabs/TabNav.tsx b/packages/gamut/src/Tabs/TabNav.tsx index a4dfbeaf0e..9298b8d7ee 100644 --- a/packages/gamut/src/Tabs/TabNav.tsx +++ b/packages/gamut/src/Tabs/TabNav.tsx @@ -1,8 +1,9 @@ import styled from '@emotion/styled'; import { styledOptions } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; -import { tabElementBaseProps, TabElementStyleProps } from './props'; +import type { TabElementStyleProps } from './props'; +import { tabElementBaseProps } from './props'; import { tabContainerStates, tabContainerVariants } from './styles'; export interface TabNavProps diff --git a/packages/gamut/src/Tabs/TabNavLink.tsx b/packages/gamut/src/Tabs/TabNavLink.tsx index d0e401d902..f202efa31a 100644 --- a/packages/gamut/src/Tabs/TabNavLink.tsx +++ b/packages/gamut/src/Tabs/TabNavLink.tsx @@ -1,5 +1,5 @@ import styled from '@emotion/styled'; -import { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; import { TabButton } from './TabButton'; diff --git a/packages/gamut/src/Tabs/TabPanel.tsx b/packages/gamut/src/Tabs/TabPanel.tsx index 07f8d3909d..d7787d2b6e 100644 --- a/packages/gamut/src/Tabs/TabPanel.tsx +++ b/packages/gamut/src/Tabs/TabPanel.tsx @@ -1,12 +1,11 @@ import styled from '@emotion/styled'; import { system } from '@skillsoft/gamut-styles'; -import * as React from 'react'; -import { - TabPanel as ReactAriaTabPanel, - TabPanelProps as ReactAriaTabPanelProps, -} from 'react-aria-components'; +import type * as React from 'react'; +import type { TabPanelProps as ReactAriaTabPanelProps } from 'react-aria-components'; +import { TabPanel as ReactAriaTabPanel } from 'react-aria-components'; -import { tabElementBaseProps, TabElementStyleProps } from './props'; +import type { TabElementStyleProps } from './props'; +import { tabElementBaseProps } from './props'; interface TabPanelBaseProps extends TabElementStyleProps, diff --git a/packages/gamut/src/Tabs/TabPanels.tsx b/packages/gamut/src/Tabs/TabPanels.tsx index 3965270e3a..f25bafc98a 100644 --- a/packages/gamut/src/Tabs/TabPanels.tsx +++ b/packages/gamut/src/Tabs/TabPanels.tsx @@ -1,6 +1,7 @@ import styled from '@emotion/styled'; -import { tabElementBaseProps, TabElementStyleProps } from './props'; +import type { TabElementStyleProps } from './props'; +import { tabElementBaseProps } from './props'; export interface TabPanelsProps extends TabElementStyleProps {} diff --git a/packages/gamut/src/Tabs/Tabs.tsx b/packages/gamut/src/Tabs/Tabs.tsx index 57773654c3..ef5c3e1687 100644 --- a/packages/gamut/src/Tabs/Tabs.tsx +++ b/packages/gamut/src/Tabs/Tabs.tsx @@ -1,14 +1,13 @@ import styled from '@emotion/styled'; import { Background } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import * as React from 'react'; -import { - Tabs as ReactAriaTabs, - TabsProps as ReactAriaTabsProps, -} from 'react-aria-components'; +import type { StyleProps } from '@skillsoft/variance'; +import type * as React from 'react'; +import type { TabsProps as ReactAriaTabsProps } from 'react-aria-components'; +import { Tabs as ReactAriaTabs } from 'react-aria-components'; -import { tabElementBaseProps, TabElementStyleProps } from './props'; -import { tabContainerVariants } from './styles'; +import type { TabElementStyleProps } from './props'; +import { tabElementBaseProps } from './props'; +import type { tabContainerVariants } from './styles'; import { TabProvider } from './TabProvider'; export interface TabsBaseProps diff --git a/packages/gamut/src/Tabs/__tests__/Tabs.test.tsx b/packages/gamut/src/Tabs/__tests__/Tabs.test.tsx index 98bd0ee4b3..760059316b 100644 --- a/packages/gamut/src/Tabs/__tests__/Tabs.test.tsx +++ b/packages/gamut/src/Tabs/__tests__/Tabs.test.tsx @@ -2,7 +2,8 @@ import { setupRtl } from '@skillsoft/gamut-tests'; import userEvent from '@testing-library/user-event'; import { act, useState } from 'react'; -import { Tab, TabList, TabPanel, TabPanels, Tabs, TabsProps } from '../index'; +import type { TabsProps } from '../index'; +import { Tab, TabList, TabPanel, TabPanels, Tabs } from '../index'; const FullTabs = (props: TabsProps) => ( diff --git a/packages/gamut/src/Tabs/props.tsx b/packages/gamut/src/Tabs/props.tsx index fa1fa4d979..e565b67bee 100644 --- a/packages/gamut/src/Tabs/props.tsx +++ b/packages/gamut/src/Tabs/props.tsx @@ -1,5 +1,6 @@ import { system } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; export enum TabSelectors { SELECTED = '&[data-selected]', diff --git a/packages/gamut/src/Tag/elements.tsx b/packages/gamut/src/Tag/elements.tsx index 1a3a834d12..41ee2798f8 100644 --- a/packages/gamut/src/Tag/elements.tsx +++ b/packages/gamut/src/Tag/elements.tsx @@ -19,13 +19,13 @@ import { tagWrapperStates, textSizeVariants, } from './styles'; -import { +import type { BaseTagProps, DismissButtonProps, TagAnchorProps, - tagProps, TagTextProps, } from './types'; +import { tagProps } from './types'; export const Outline = styled(FlexBox)(outlineStyling, outlineStates); diff --git a/packages/gamut/src/Tag/index.tsx b/packages/gamut/src/Tag/index.tsx index f08e035963..220f17c6ac 100644 --- a/packages/gamut/src/Tag/index.tsx +++ b/packages/gamut/src/Tag/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import type * as React from 'react'; import { appendIconToContent } from '../helpers'; import { @@ -10,7 +10,7 @@ import { TagLabelWrapper, TagText, } from './elements'; -import { TagProps } from './types'; +import type { TagProps } from './types'; export const Tag: React.FC = ({ children, diff --git a/packages/gamut/src/Tag/types.tsx b/packages/gamut/src/Tag/types.tsx index def135855e..51a1a0c917 100644 --- a/packages/gamut/src/Tag/types.tsx +++ b/packages/gamut/src/Tag/types.tsx @@ -1,10 +1,11 @@ import { system } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; -import { ComponentProps, HTMLProps } from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; +import type { ComponentProps, HTMLProps } from 'react'; -import { IconComponentType, WithChildrenProp } from '../utils'; -import { DismissButton } from './elements'; -import { +import type { IconComponentType, WithChildrenProp } from '../utils'; +import type { DismissButton } from './elements'; +import type { anchorSizeVariants, anchorVariants, dismissButtonLargeStyling, diff --git a/packages/gamut/src/Tip/InfoTip/InfoTipButton.tsx b/packages/gamut/src/Tip/InfoTip/InfoTipButton.tsx index fc5e3ae4f0..bf87fdd988 100644 --- a/packages/gamut/src/Tip/InfoTip/InfoTipButton.tsx +++ b/packages/gamut/src/Tip/InfoTip/InfoTipButton.tsx @@ -2,16 +2,14 @@ import { MiniInfoCircleIcon, MiniInfoOutlineIcon, } from '@skillsoft/gamut-icons'; -import { ComponentProps, forwardRef } from 'react'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; import { createButtonComponent } from '../../Button/shared'; -import { ButtonBaseElements } from '../../ButtonBase/ButtonBase'; -import { InfoTipProps } from '.'; -import { - infoButtonStates, - InfoButtonStatesProps, - infoButtonStyles, -} from './styles'; +import type { ButtonBaseElements } from '../../ButtonBase/ButtonBase'; +import type { InfoTipProps } from '.'; +import type { InfoButtonStatesProps } from './styles'; +import { infoButtonStates, infoButtonStyles } from './styles'; const InfoTipButtonBase = createButtonComponent( infoButtonStyles, diff --git a/packages/gamut/src/Tip/InfoTip/index.tsx b/packages/gamut/src/Tip/InfoTip/index.tsx index 9762e31708..226ab0e52e 100644 --- a/packages/gamut/src/Tip/InfoTip/index.tsx +++ b/packages/gamut/src/Tip/InfoTip/index.tsx @@ -10,11 +10,8 @@ import { import { getFocusableElements as getFocusableElementsUtil } from '../../utils/focus'; import { FloatingTip } from '../shared/FloatingTip'; import { InlineTip } from '../shared/InlineTip'; -import { - TipBaseAlignment, - TipBaseProps, - tipDefaultProps, -} from '../shared/types'; +import type { TipBaseAlignment, TipBaseProps } from '../shared/types'; +import { tipDefaultProps } from '../shared/types'; import { isFloatingElementOpen } from '../shared/utils'; import { InfoTipButton } from './InfoTipButton'; diff --git a/packages/gamut/src/Tip/InfoTip/styles.tsx b/packages/gamut/src/Tip/InfoTip/styles.tsx index 6afe55bc00..e26bc66475 100644 --- a/packages/gamut/src/Tip/InfoTip/styles.tsx +++ b/packages/gamut/src/Tip/InfoTip/styles.tsx @@ -6,7 +6,7 @@ import { timing, variant, } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; import { Box } from '../../Box'; import { InteractiveSelectors } from '../../ButtonBase/ButtonBase'; @@ -15,7 +15,7 @@ import { tooltipBgColor, tooltipVariantStyles, } from '../shared/styles/styles'; -import { TipPlacementComponentProps } from '../shared/types'; +import type { TipPlacementComponentProps } from '../shared/types'; const textColor = 'secondary'; diff --git a/packages/gamut/src/Tip/PreviewTip/elements.tsx b/packages/gamut/src/Tip/PreviewTip/elements.tsx index c8adbb4a07..d79880b2c0 100644 --- a/packages/gamut/src/Tip/PreviewTip/elements.tsx +++ b/packages/gamut/src/Tip/PreviewTip/elements.tsx @@ -9,7 +9,10 @@ import { InteractiveSelectors } from '../../ButtonBase/ButtonBase'; import { Shimmer } from '../../Loading/Shimmer'; import { patternContainerBaseStyles } from '../../Popover/styles/pattern'; import { Text } from '../../Typography'; -import { PreviewTipContent, TipPlacementComponentProps } from '../shared/types'; +import type { + PreviewTipContent, + TipPlacementComponentProps, +} from '../shared/types'; import { avatarColumnTemplate, avatarGridTemplate, diff --git a/packages/gamut/src/Tip/PreviewTip/index.tsx b/packages/gamut/src/Tip/PreviewTip/index.tsx index 88421963e2..10e2ab87fb 100644 --- a/packages/gamut/src/Tip/PreviewTip/index.tsx +++ b/packages/gamut/src/Tip/PreviewTip/index.tsx @@ -1,22 +1,16 @@ -import { - ComponentProps, - FocusEvent, - useEffect, - useId, - useMemo, - useRef, - useState, -} from 'react'; +import type { ComponentProps, FocusEvent } from 'react'; +import { useEffect, useId, useMemo, useRef, useState } from 'react'; -import { Anchor, Text } from '../..'; +import type { Anchor } from '../..'; +import { Text } from '../..'; import { FloatingTip } from '../shared/FloatingTip'; import { InlineTip } from '../shared/InlineTip'; -import { +import type { PreviewTipContent, TipBaseAlignment, TipBaseProps, - tipDefaultProps, } from '../shared/types'; +import { tipDefaultProps } from '../shared/types'; import { PreviewTipAnchor } from './elements'; import { getPreviewDescription } from './utils'; diff --git a/packages/gamut/src/Tip/PreviewTip/utils.ts b/packages/gamut/src/Tip/PreviewTip/utils.ts index c02204ff29..6f3dacbfac 100644 --- a/packages/gamut/src/Tip/PreviewTip/utils.ts +++ b/packages/gamut/src/Tip/PreviewTip/utils.ts @@ -1,4 +1,4 @@ -import { PreviewTipProps } from '.'; +import type { PreviewTipProps } from '.'; export const getPreviewDescription = ({ linkDescription, diff --git a/packages/gamut/src/Tip/ToolTip/elements.tsx b/packages/gamut/src/Tip/ToolTip/elements.tsx index 260d88b208..664e9e78c1 100644 --- a/packages/gamut/src/Tip/ToolTip/elements.tsx +++ b/packages/gamut/src/Tip/ToolTip/elements.tsx @@ -1,5 +1,5 @@ import styled from '@emotion/styled'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; import { Box } from '../../Box'; import { toolTipAlignmentVariants } from '../shared/styles/styles'; diff --git a/packages/gamut/src/Tip/ToolTip/index.tsx b/packages/gamut/src/Tip/ToolTip/index.tsx index 9b5ef32213..1a18d9ef53 100644 --- a/packages/gamut/src/Tip/ToolTip/index.tsx +++ b/packages/gamut/src/Tip/ToolTip/index.tsx @@ -1,14 +1,11 @@ import { useEffect, useRef, useState } from 'react'; import { Text } from '../../Typography'; -import { WithChildrenProp } from '../../utils'; +import type { WithChildrenProp } from '../../utils'; import { FloatingTip } from '../shared/FloatingTip'; import { InlineTip } from '../shared/InlineTip'; -import { - TipBaseProps, - TipCenterAlignment, - tipDefaultProps, -} from '../shared/types'; +import type { TipBaseProps, TipCenterAlignment } from '../shared/types'; +import { tipDefaultProps } from '../shared/types'; export type ToolTipProps = TipBaseProps & WithChildrenProp & { diff --git a/packages/gamut/src/Tip/__tests__/helpers.tsx b/packages/gamut/src/Tip/__tests__/helpers.tsx index 441745adc5..d4e776f7b6 100644 --- a/packages/gamut/src/Tip/__tests__/helpers.tsx +++ b/packages/gamut/src/Tip/__tests__/helpers.tsx @@ -1,12 +1,13 @@ import { setupRtl } from '@skillsoft/gamut-tests'; import { act, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { createRef, RefObject } from 'react'; +import type { RefObject } from 'react'; +import { createRef } from 'react'; import { Anchor } from '../../Anchor'; import { Text } from '../../Typography'; -import { InfoTip } from '../InfoTip'; -import { TipPlacements } from '../shared/types'; +import type { InfoTip } from '../InfoTip'; +import type { TipPlacements } from '../shared/types'; type InfoTipView = ReturnType< ReturnType> diff --git a/packages/gamut/src/Tip/__tests__/mocks.tsx b/packages/gamut/src/Tip/__tests__/mocks.tsx index 9ccc2b2811..4ccbc8db4e 100644 --- a/packages/gamut/src/Tip/__tests__/mocks.tsx +++ b/packages/gamut/src/Tip/__tests__/mocks.tsx @@ -1,9 +1,12 @@ -import { ComponentProps, useState } from 'react'; +import type { ComponentProps } from 'react'; +import { useState } from 'react'; import { FillButton } from '../../Button'; import { Modal } from '../../Modals'; -import { InfoTip, InfoTipProps } from '../InfoTip'; -import { ToolTip, ToolTipProps } from '../ToolTip'; +import type { InfoTipProps } from '../InfoTip'; +import { InfoTip } from '../InfoTip'; +import type { ToolTipProps } from '../ToolTip'; +import { ToolTip } from '../ToolTip'; export const ToolTipMock: React.FC< ToolTipProps & ComponentProps diff --git a/packages/gamut/src/Tip/shared/FloatingTip.tsx b/packages/gamut/src/Tip/shared/FloatingTip.tsx index 3a02df77d8..9fcc92a215 100644 --- a/packages/gamut/src/Tip/shared/FloatingTip.tsx +++ b/packages/gamut/src/Tip/shared/FloatingTip.tsx @@ -1,5 +1,5 @@ +import type * as React from 'react'; import { useCallback, useLayoutEffect, useRef, useState } from 'react'; -import * as React from 'react'; import { useMeasure } from 'react-use'; import { Box } from '../../Box'; @@ -13,7 +13,7 @@ import { getAlignmentStyles, getPopoverAlignmentAndPattern, } from './styles/composeVariantsUtils'; -import { TipWrapperProps } from './types'; +import type { TipWrapperProps } from './types'; import { runWithDelay } from './utils'; type FocusOrMouseEvent = diff --git a/packages/gamut/src/Tip/shared/InlineTip.tsx b/packages/gamut/src/Tip/shared/InlineTip.tsx index 5b3ad0c648..35338001a8 100644 --- a/packages/gamut/src/Tip/shared/InlineTip.tsx +++ b/packages/gamut/src/Tip/shared/InlineTip.tsx @@ -11,7 +11,7 @@ import { } from './elements'; import { getAlignmentStyles } from './styles/composeVariantsUtils'; import { narrowWidth } from './styles/styles'; -import { TipWrapperProps } from './types'; +import type { TipWrapperProps } from './types'; export const InlineTip: React.FC = ({ alignment, diff --git a/packages/gamut/src/Tip/shared/elements.tsx b/packages/gamut/src/Tip/shared/elements.tsx index a45d076fe5..6e5493e92b 100644 --- a/packages/gamut/src/Tip/shared/elements.tsx +++ b/packages/gamut/src/Tip/shared/elements.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { css, states, timing } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; import { Box, FlexBox } from '../../Box'; import { Selectors } from '../../ButtonBase/ButtonBase'; diff --git a/packages/gamut/src/Tip/shared/popoverAlignmentUtils.ts b/packages/gamut/src/Tip/shared/popoverAlignmentUtils.ts index e0430fef97..3b982cf7b3 100644 --- a/packages/gamut/src/Tip/shared/popoverAlignmentUtils.ts +++ b/packages/gamut/src/Tip/shared/popoverAlignmentUtils.ts @@ -1,11 +1,11 @@ import { CheckerDense } from '@skillsoft/gamut-patterns'; -import { +import type { PopoverProps, PopoverXPositionType, PopoverYPositionType, } from '../../Popover'; -import { TipPlacementComponentProps, TipWrapperProps } from './types'; +import type { TipPlacementComponentProps, TipWrapperProps } from './types'; export const getAlignmentStyles = ({ alignment, diff --git a/packages/gamut/src/Tip/shared/styles/styles.tsx b/packages/gamut/src/Tip/shared/styles/styles.tsx index 7b0ef097c4..2d32e7391f 100644 --- a/packages/gamut/src/Tip/shared/styles/styles.tsx +++ b/packages/gamut/src/Tip/shared/styles/styles.tsx @@ -1,6 +1,6 @@ import { fontSmoothPixel, theme, variant } from '@skillsoft/gamut-styles'; -import { popoverPrimaryBgColor } from '../../../Popover/styles/base'; +import type { popoverPrimaryBgColor } from '../../../Popover/styles/base'; import { tipAlignmentArray } from '../types'; import { createToolTipVariantFromAlignment } from './composeVariantsUtils'; import { createVariantsFromAlignments } from './createVariantsUtils'; diff --git a/packages/gamut/src/Tip/shared/types.tsx b/packages/gamut/src/Tip/shared/types.tsx index 74a075f681..8bffa36b83 100644 --- a/packages/gamut/src/Tip/shared/types.tsx +++ b/packages/gamut/src/Tip/shared/types.tsx @@ -1,6 +1,6 @@ -import { ComponentProps, ReactNode } from 'react'; +import type { ComponentProps, ReactNode } from 'react'; -import { Text } from '../../Typography'; +import type { Text } from '../../Typography'; export const tipBaseAlignmentArray = [ 'bottom-left', diff --git a/packages/gamut/src/Toast/Toast.tsx b/packages/gamut/src/Toast/Toast.tsx index 76a0924655..fbac96d07c 100644 --- a/packages/gamut/src/Toast/Toast.tsx +++ b/packages/gamut/src/Toast/Toast.tsx @@ -1,15 +1,16 @@ import styled from '@emotion/styled'; import { MiniDeleteIcon } from '@skillsoft/gamut-icons'; import { system } from '@skillsoft/gamut-styles'; -import { StyleProps } from '@skillsoft/variance'; -import { ReactNode, useMemo } from 'react'; -import * as React from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import type { ReactNode } from 'react'; +import type * as React from 'react'; +import { useMemo } from 'react'; import { Box, FlexBox } from '../Box'; import { IconButton } from '../Button/IconButton'; import { PatternBackdrop } from '../PatternBackdrop/PatternBackdrop'; import { Text } from '../Typography'; -import { WithChildrenProp } from '../utils'; +import type { WithChildrenProp } from '../utils'; const layoutVariants = system.variant({ prop: 'layout', diff --git a/packages/gamut/src/Toaster/index.tsx b/packages/gamut/src/Toaster/index.tsx index 84d6090d1f..5d06477b24 100644 --- a/packages/gamut/src/Toaster/index.tsx +++ b/packages/gamut/src/Toaster/index.tsx @@ -1,9 +1,10 @@ -import { ColorMode, ColorModes } from '@skillsoft/gamut-styles'; +import type { ColorModes } from '@skillsoft/gamut-styles'; +import { ColorMode } from '@skillsoft/gamut-styles'; import { AnimatePresence } from 'framer-motion'; -import { ReactNode } from 'react'; -import * as React from 'react'; +import type { ReactNode } from 'react'; +import type * as React from 'react'; -import { ToastProps } from '..'; +import type { ToastProps } from '..'; import { FadeInSlideOut } from '../Animation/FadeInSlideOut'; import { BodyPortal } from '../BodyPortal'; import { Box } from '../Box'; diff --git a/packages/gamut/src/Toggle/elements.tsx b/packages/gamut/src/Toggle/elements.tsx index 2568efeb65..d53c132d26 100644 --- a/packages/gamut/src/Toggle/elements.tsx +++ b/packages/gamut/src/Toggle/elements.tsx @@ -7,7 +7,8 @@ import { theme, variant, } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; import { Box } from '../Box'; diff --git a/packages/gamut/src/Toggle/index.tsx b/packages/gamut/src/Toggle/index.tsx index c5e5272652..ed82fee81e 100644 --- a/packages/gamut/src/Toggle/index.tsx +++ b/packages/gamut/src/Toggle/index.tsx @@ -1,5 +1,5 @@ import { Circle, ToggleInput, ToggleLabel, ToggleTrack } from './elements'; -import { ToggleProps } from './types'; +import type { ToggleProps } from './types'; import { getToggleElementProps } from './utils'; export const Toggle = ({ diff --git a/packages/gamut/src/Toggle/types.tsx b/packages/gamut/src/Toggle/types.tsx index 204183fe23..286f63c4bc 100644 --- a/packages/gamut/src/Toggle/types.tsx +++ b/packages/gamut/src/Toggle/types.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; +import type * as React from 'react'; -import { sizes, ToggleInput, ToggleStyleProps } from './elements'; +import type { sizes, ToggleInput, ToggleStyleProps } from './elements'; export type ToggleSizes = keyof typeof sizes; diff --git a/packages/gamut/src/Toggle/utils.tsx b/packages/gamut/src/Toggle/utils.tsx index cd75f31eb2..0131f14381 100644 --- a/packages/gamut/src/Toggle/utils.tsx +++ b/packages/gamut/src/Toggle/utils.tsx @@ -1,4 +1,4 @@ -import { ToggleInputStyledProps, ToggleProps } from './types'; +import type { ToggleInputStyledProps, ToggleProps } from './types'; export const getToggleElementProps = ({ ariaLabel, diff --git a/packages/gamut/src/Typography/Text.tsx b/packages/gamut/src/Typography/Text.tsx index 793908d389..f9dae8a222 100644 --- a/packages/gamut/src/Typography/Text.tsx +++ b/packages/gamut/src/Typography/Text.tsx @@ -5,8 +5,10 @@ import { system, variant, } from '@skillsoft/gamut-styles'; -import { StyleProps, variance } from '@skillsoft/variance'; -import { ComponentProps, forwardRef } from 'react'; +import type { StyleProps } from '@skillsoft/variance'; +import { variance } from '@skillsoft/variance'; +import type { ComponentProps } from 'react'; +import { forwardRef } from 'react'; import { typographyElementVariants, typographyStyleVariants } from './variants'; diff --git a/packages/gamut/src/Video/__tests__/Video.test.tsx b/packages/gamut/src/Video/__tests__/Video.test.tsx index 5538671566..ea93f1ef44 100644 --- a/packages/gamut/src/Video/__tests__/Video.test.tsx +++ b/packages/gamut/src/Video/__tests__/Video.test.tsx @@ -1,5 +1,5 @@ import { setupRtl } from '@skillsoft/gamut-tests'; -import * as React from 'react'; +import type * as React from 'react'; import { Video } from '..'; diff --git a/packages/gamut/src/Video/index.tsx b/packages/gamut/src/Video/index.tsx index 718a9e83bd..aa3dffba5f 100644 --- a/packages/gamut/src/Video/index.tsx +++ b/packages/gamut/src/Video/index.tsx @@ -1,11 +1,11 @@ -import { PlayerSrc, TrackProps } from '@vidstack/react'; -import { +import type { PlayerSrc, TrackProps } from '@vidstack/react'; +import type { DefaultLayoutTranslations, ThumbnailSrc, } from '@vidstack/react/types/vidstack'; -import * as React from 'react'; +import type * as React from 'react'; import { useState } from 'react'; -import { BaseReactPlayerProps } from 'react-player/base'; +import type { BaseReactPlayerProps } from 'react-player/base'; import { Box } from '../Box'; import { useIsMounted } from '../utils'; diff --git a/packages/gamut/src/Video/lib/VideoLayout.tsx b/packages/gamut/src/Video/lib/VideoLayout.tsx index 684a81ea70..24fcf94989 100644 --- a/packages/gamut/src/Video/lib/VideoLayout.tsx +++ b/packages/gamut/src/Video/lib/VideoLayout.tsx @@ -1,6 +1,6 @@ import { useCurrentMode } from '@skillsoft/gamut-styles'; import { DefaultVideoLayout } from '@vidstack/react/player/layouts/default'; -import { +import type { DefaultLayoutTranslations, ThumbnailSrc, } from '@vidstack/react/types/vidstack'; diff --git a/packages/gamut/src/Video/lib/VidstackPlayer/index.tsx b/packages/gamut/src/Video/lib/VidstackPlayer/index.tsx index 82e465f7a3..9d01531bbd 100644 --- a/packages/gamut/src/Video/lib/VidstackPlayer/index.tsx +++ b/packages/gamut/src/Video/lib/VidstackPlayer/index.tsx @@ -2,23 +2,27 @@ /* eslint-disable @skillsoft/gamut/no-css-standalone */ import './vidstack-styles.css'; -import styled, { CSSObject } from '@emotion/styled'; +import type { CSSObject } from '@emotion/styled'; +import styled from '@emotion/styled'; import { styledOptions } from '@skillsoft/gamut-styles'; +import type { + MediaPlayerInstance, + MediaProviderAdapter, +} from '@vidstack/react'; import { isYouTubeProvider, MediaPlayer, - MediaPlayerInstance, MediaProvider, - MediaProviderAdapter, Poster, Track, useMediaRemote, useMediaState, } from '@vidstack/react'; -import React, { useRef } from 'react'; +import type React from 'react'; +import { useRef } from 'react'; import { Box } from '../../../Box'; -import { VideoProps } from '../..'; +import type { VideoProps } from '../..'; import { keyboardShortcuts } from '../utils/constants'; import { VideoLayout } from '../VideoLayout'; import { vdsVariables } from './variables'; diff --git a/packages/gamut/src/Video/lib/slotOverrides/index.tsx b/packages/gamut/src/Video/lib/slotOverrides/index.tsx index bab5620c53..5197147bf7 100644 --- a/packages/gamut/src/Video/lib/slotOverrides/index.tsx +++ b/packages/gamut/src/Video/lib/slotOverrides/index.tsx @@ -1,4 +1,4 @@ -import { +import type { DefaultVideoLayoutProps, DefaultVideoLayoutSlots, } from '@vidstack/react/player/layouts/default'; diff --git a/packages/gamut/src/Video/lib/utils/constants.ts b/packages/gamut/src/Video/lib/utils/constants.ts index 8023f3cbee..c4b9f7f0c8 100644 --- a/packages/gamut/src/Video/lib/utils/constants.ts +++ b/packages/gamut/src/Video/lib/utils/constants.ts @@ -1,5 +1,5 @@ -import { MediaKeyShortcuts } from '@vidstack/react'; -import { DefaultLayoutTranslations } from '@vidstack/react/types/vidstack'; +import type { MediaKeyShortcuts } from '@vidstack/react'; +import type { DefaultLayoutTranslations } from '@vidstack/react/types/vidstack'; export const keyboardShortcuts: MediaKeyShortcuts = { togglePaused: 'k Space', diff --git a/packages/gamut/src/Video/lib/utils/icons.tsx b/packages/gamut/src/Video/lib/utils/icons.tsx index f78216b8f2..caf998cc79 100644 --- a/packages/gamut/src/Video/lib/utils/icons.tsx +++ b/packages/gamut/src/Video/lib/utils/icons.tsx @@ -17,11 +17,11 @@ import { VolumeControlMediumIcon, VolumeControlMuteIcon, } from '@skillsoft/gamut-icons'; -import { +import type { DefaultLayoutIcon, DefaultLayoutIcons, - defaultLayoutIcons, } from '@vidstack/react/player/layouts/default'; +import { defaultLayoutIcons } from '@vidstack/react/player/layouts/default'; const IconWrapper = (Icon: DefaultLayoutIcon) => (props: any) => ; diff --git a/packages/gamut/src/helpers/appendIconToContent.tsx b/packages/gamut/src/helpers/appendIconToContent.tsx index 77d5be48e1..8f4bb32e4f 100644 --- a/packages/gamut/src/helpers/appendIconToContent.tsx +++ b/packages/gamut/src/helpers/appendIconToContent.tsx @@ -1,5 +1,5 @@ import { Box, FlexBox } from '../Box'; -import { IconComponentType, WithChildrenProp } from '../utils'; +import type { IconComponentType, WithChildrenProp } from '../utils'; import { pixelToEm } from './pixelToEmCalc'; export interface AppendedIconProps diff --git a/packages/gamut/src/utils/generateResponsiveClassnames.ts b/packages/gamut/src/utils/generateResponsiveClassnames.ts index 33049fe3ed..476dd52651 100644 --- a/packages/gamut/src/utils/generateResponsiveClassnames.ts +++ b/packages/gamut/src/utils/generateResponsiveClassnames.ts @@ -3,7 +3,7 @@ * to match the styleMaps classes returning a concatenated classname string */ -import { +import type { OptionalResponsiveProperty, ResponsiveProperty, } from '../typings/responsive-properties'; diff --git a/packages/gamut/src/utils/types.ts b/packages/gamut/src/utils/types.ts index 3942465d17..8d87a58b18 100644 --- a/packages/gamut/src/utils/types.ts +++ b/packages/gamut/src/utils/types.ts @@ -1,4 +1,4 @@ -import { GamutIconProps } from '@skillsoft/gamut-icons'; +import type { GamutIconProps } from '@skillsoft/gamut-icons'; export interface WithChildrenProp { children?: React.ReactNode | React.ReactNode[]; diff --git a/packages/styleguide/.storybook/main.ts b/packages/styleguide/.storybook/main.ts index 5a8ff65259..640ff48b3e 100644 --- a/packages/styleguide/.storybook/main.ts +++ b/packages/styleguide/.storybook/main.ts @@ -2,7 +2,17 @@ import { createRequire } from 'node:module'; import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; -import react from '@vitejs/plugin-react'; +/* + * `@vitejs/plugin-react-swc`, `@swc/plugin-emotion`, and the `@swc/core` + * resolution below are pinned to versions from the same release window + * (June-July 2026) on purpose, not left behind by accident. Newer + * `@swc/plugin-emotion`/`@swc/core` pairs (as of Sept 2026) crash with an + * opaque WASM panic on real story/mdx files due to an undocumented ABI + * mismatch between the plugin and swc_core - see the "storybook swc emotion + * spike" notes for the repro. Bump these three together, not individually. + */ + +import react from '@vitejs/plugin-react-swc'; import type { StorybookConfig } from '@storybook/react-vite'; import type { Alias, AliasOptions } from 'vite'; @@ -52,28 +62,45 @@ const config: StorybookConfig = { viteFinal(config, { configType }) { /* * Storybook's react-vite framework transpiles JSX with esbuild and does not - * add @vitejs/plugin-react. We add it ourselves so Emotion's Babel plugin - * runs, reproducing the webpack setup's `.babelrc.json` transform (autoLabel - * + source maps for stable, readable Emotion class names). + * add a react plugin. We add @vitejs/plugin-react-swc ourselves so + * Emotion's swc plugin runs, reproducing the webpack setup's `.babelrc.json` + * transform (autoLabel + source maps for stable, readable Emotion class + * names). */ config.plugins = [ ...(config.plugins ?? []), react({ - babel: { - plugins: [ - [ - '@emotion/babel-plugin', - { - sourceMap: true, - autoLabel: 'always', - labelFormat: '[local]', - }, - ], + plugins: [ + [ + '@swc/plugin-emotion', + { + sourceMap: true, + autoLabel: 'always', + labelFormat: '[local]', + }, ], - }, + ], }), ]; + /* + * `@emotion/babel-plugin` skips stamping `target` when the source already + * passes one (see BarChart/BarRow/elements.tsx); `@swc/plugin-emotion` + * stamps it unconditionally, so the transformed output has the key twice + * and esbuild flags it. Duplicate keys written by hand are still caught + * upstream by TypeScript and eslint's `no-dupe-keys`, so the only ones + * reaching esbuild here are the plugin's. + */ + if (config.esbuild !== false) { + config.esbuild = { + ...config.esbuild, + logOverride: { + ...config.esbuild?.logOverride, + 'duplicate-object-key': 'silent', + }, + }; + } + /* * Reproduce the webpack `resolve.alias` map. The `$`-suffixed webpack * aliases matched the bare package specifier only, so we use anchored diff --git a/packages/styleguide/src/lib/Atoms/Animations/ExpandInCollapseOut/ExpandInCollapseOut.stories.tsx b/packages/styleguide/src/lib/Atoms/Animations/ExpandInCollapseOut/ExpandInCollapseOut.stories.tsx index bd8a911cc2..2ec1ca7f6d 100644 --- a/packages/styleguide/src/lib/Atoms/Animations/ExpandInCollapseOut/ExpandInCollapseOut.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/Animations/ExpandInCollapseOut/ExpandInCollapseOut.stories.tsx @@ -6,7 +6,8 @@ import { } from '@skillsoft/gamut'; import type { Meta } from '@storybook/react'; import { AnimatePresence } from 'framer-motion'; -import { PropsWithChildren, useState } from 'react'; +import type { PropsWithChildren } from 'react'; +import { useState } from 'react'; const meta: Meta = { component: ExpandInCollapseOut, diff --git a/packages/styleguide/src/lib/Atoms/Animations/Rotation/Rotation.stories.tsx b/packages/styleguide/src/lib/Atoms/Animations/Rotation/Rotation.stories.tsx index 11aa89d009..a9590a3a02 100644 --- a/packages/styleguide/src/lib/Atoms/Animations/Rotation/Rotation.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/Animations/Rotation/Rotation.stories.tsx @@ -1,7 +1,8 @@ import { Rotation, StrokeButton } from '@skillsoft/gamut'; import { MiniChevronDownIcon } from '@skillsoft/gamut-icons'; import type { Meta } from '@storybook/react'; -import { ComponentProps, useEffect, useState } from 'react'; +import type { ComponentProps } from 'react'; +import { useEffect, useState } from 'react'; const meta: Meta = { component: Rotation, diff --git a/packages/styleguide/src/lib/Atoms/Badge/examples.tsx b/packages/styleguide/src/lib/Atoms/Badge/examples.tsx index 3c2c13f269..a18e6f65b8 100644 --- a/packages/styleguide/src/lib/Atoms/Badge/examples.tsx +++ b/packages/styleguide/src/lib/Atoms/Badge/examples.tsx @@ -1,5 +1,6 @@ import styled from '@emotion/styled'; -import { Badge, BadgeProps, Box } from '@skillsoft/gamut'; +import type { BadgeProps } from '@skillsoft/gamut'; +import { Badge, Box } from '@skillsoft/gamut'; import { MiniStarIcon } from '@skillsoft/gamut-icons'; import { css } from '@skillsoft/gamut-styles'; diff --git a/packages/styleguide/src/lib/Atoms/Drawer/Drawer.stories.tsx b/packages/styleguide/src/lib/Atoms/Drawer/Drawer.stories.tsx index 752c96adf7..de2d8d1acf 100644 --- a/packages/styleguide/src/lib/Atoms/Drawer/Drawer.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/Drawer/Drawer.stories.tsx @@ -1,6 +1,7 @@ import { Drawer, FlexBox, StrokeButton } from '@skillsoft/gamut'; import type { Meta } from '@storybook/react'; -import { ComponentProps, useEffect, useState } from 'react'; +import type { ComponentProps } from 'react'; +import { useEffect, useState } from 'react'; const meta: Meta = { component: Drawer, diff --git a/packages/styleguide/src/lib/Atoms/FormInputs/Checkbox/Checkbox.stories.tsx b/packages/styleguide/src/lib/Atoms/FormInputs/Checkbox/Checkbox.stories.tsx index 239c05a3b1..5f864b9073 100644 --- a/packages/styleguide/src/lib/Atoms/FormInputs/Checkbox/Checkbox.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/FormInputs/Checkbox/Checkbox.stories.tsx @@ -1,8 +1,8 @@ +import type { CheckboxProps } from '@skillsoft/gamut'; import { Anchor, Box, Checkbox, - CheckboxProps, Column, FlexBox, LayoutGrid, diff --git a/packages/styleguide/src/lib/Atoms/FormInputs/Radio/Radio.stories.tsx b/packages/styleguide/src/lib/Atoms/FormInputs/Radio/Radio.stories.tsx index 8cfb3c712d..a2de49aec6 100644 --- a/packages/styleguide/src/lib/Atoms/FormInputs/Radio/Radio.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/FormInputs/Radio/Radio.stories.tsx @@ -1,6 +1,8 @@ import { FormGroup, Radio, RadioGroup } from '@skillsoft/gamut'; import type { Meta, StoryObj } from '@storybook/react'; -import React, { ChangeEvent, useState } from 'react'; +import type { ChangeEvent } from 'react'; +import type React from 'react'; +import { useState } from 'react'; import type { TypeWithDeepControls } from 'storybook-addon-deep-controls'; import { infotipNestedArgTypes } from '~styleguide/argTypes'; diff --git a/packages/styleguide/src/lib/Atoms/Icons/Mini/Mini.stories.tsx b/packages/styleguide/src/lib/Atoms/Icons/Mini/Mini.stories.tsx index 478d023c4e..dee3f3318a 100644 --- a/packages/styleguide/src/lib/Atoms/Icons/Mini/Mini.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/Icons/Mini/Mini.stories.tsx @@ -1,8 +1,8 @@ -import { GamutIconProps } from '@skillsoft/gamut-icons'; +import type { GamutIconProps } from '@skillsoft/gamut-icons'; // eslint-disable-next-line @skillsoft/gamut/import-paths import * as miniIcons from '@skillsoft/gamut-icons/src/icons/mini'; import type { Meta, StoryObj } from '@storybook/react'; -import React from 'react'; +import type React from 'react'; import { ImageGallery } from '~styleguide/blocks'; diff --git a/packages/styleguide/src/lib/Atoms/Icons/Regular/Regular.stories.tsx b/packages/styleguide/src/lib/Atoms/Icons/Regular/Regular.stories.tsx index e9c0fce632..560081fb4c 100644 --- a/packages/styleguide/src/lib/Atoms/Icons/Regular/Regular.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/Icons/Regular/Regular.stories.tsx @@ -1,4 +1,4 @@ -import { GamutIconProps } from '@skillsoft/gamut-icons'; +import type { GamutIconProps } from '@skillsoft/gamut-icons'; // eslint-disable-next-line @skillsoft/gamut/import-paths import * as icons from '@skillsoft/gamut-icons/src/icons/regular'; import type { Meta, StoryObj } from '@storybook/react'; diff --git a/packages/styleguide/src/lib/Atoms/PopoverContainer/PopoverContainer.stories.tsx b/packages/styleguide/src/lib/Atoms/PopoverContainer/PopoverContainer.stories.tsx index 09158a8e3c..091badbea2 100644 --- a/packages/styleguide/src/lib/Atoms/PopoverContainer/PopoverContainer.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/PopoverContainer/PopoverContainer.stories.tsx @@ -1,7 +1,8 @@ import { FlexBox, PopoverContainer, Text } from '@skillsoft/gamut'; import { Background } from '@skillsoft/gamut-styles'; import type { Meta } from '@storybook/react'; -import { ComponentProps, useRef } from 'react'; +import type { ComponentProps } from 'react'; +import { useRef } from 'react'; const meta: Meta = { component: PopoverContainer, diff --git a/packages/styleguide/src/lib/Atoms/UtilityComponents/DelayedRenderWrapper/DelayedRenderWrapper.stories.tsx b/packages/styleguide/src/lib/Atoms/UtilityComponents/DelayedRenderWrapper/DelayedRenderWrapper.stories.tsx index 6f2990040b..d8f82a522b 100644 --- a/packages/styleguide/src/lib/Atoms/UtilityComponents/DelayedRenderWrapper/DelayedRenderWrapper.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/UtilityComponents/DelayedRenderWrapper/DelayedRenderWrapper.stories.tsx @@ -6,7 +6,8 @@ import { Text, } from '@skillsoft/gamut'; import type { Meta } from '@storybook/react'; -import { ComponentProps, useState } from 'react'; +import type { ComponentProps } from 'react'; +import { useState } from 'react'; const meta: Meta = { component: DelayedRenderWrapper, diff --git a/packages/styleguide/src/lib/Atoms/UtilityComponents/FocusTrap/FocusTrap.stories.tsx b/packages/styleguide/src/lib/Atoms/UtilityComponents/FocusTrap/FocusTrap.stories.tsx index 0d7fccf331..8ca0219442 100644 --- a/packages/styleguide/src/lib/Atoms/UtilityComponents/FocusTrap/FocusTrap.stories.tsx +++ b/packages/styleguide/src/lib/Atoms/UtilityComponents/FocusTrap/FocusTrap.stories.tsx @@ -1,6 +1,7 @@ import { Box, FillButton, FocusTrap, GridForm } from '@skillsoft/gamut'; import type { Meta } from '@storybook/react'; -import { ComponentProps, useEffect, useState } from 'react'; +import type { ComponentProps } from 'react'; +import { useEffect, useState } from 'react'; const meta: Meta = { component: FocusTrap, diff --git a/packages/styleguide/src/lib/Foundations/ColorMode/examples.tsx b/packages/styleguide/src/lib/Foundations/ColorMode/examples.tsx index af7df6c32b..2d404d2f95 100644 --- a/packages/styleguide/src/lib/Foundations/ColorMode/examples.tsx +++ b/packages/styleguide/src/lib/Foundations/ColorMode/examples.tsx @@ -1,7 +1,7 @@ +import type { ButtonProps } from '@skillsoft/gamut'; import { Anchor, Box, - ButtonProps, Checkbox, CTAButton, FillButton, @@ -28,8 +28,9 @@ import { ColorMode, usePrefersDarkMode, } from '@skillsoft/gamut-styles'; -import { ComponentProps, useState } from 'react'; -import * as React from 'react'; +import type { ComponentProps } from 'react'; +import type * as React from 'react'; +import { useState } from 'react'; const renderText = () => ( diff --git a/packages/styleguide/src/lib/Foundations/Utilities/boxShadow.tsx b/packages/styleguide/src/lib/Foundations/Utilities/boxShadow.tsx index ecbec1c725..45f7e44f43 100644 --- a/packages/styleguide/src/lib/Foundations/Utilities/boxShadow.tsx +++ b/packages/styleguide/src/lib/Foundations/Utilities/boxShadow.tsx @@ -1,4 +1,4 @@ -import { SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/react'; import styled from '@emotion/styled'; import { GridBox } from '@skillsoft/gamut'; import { boxShadow } from '@skillsoft/gamut-styles'; diff --git a/packages/styleguide/src/lib/Foundations/shared/elements.tsx b/packages/styleguide/src/lib/Foundations/shared/elements.tsx index 1aea47762d..2927b90602 100644 --- a/packages/styleguide/src/lib/Foundations/shared/elements.tsx +++ b/packages/styleguide/src/lib/Foundations/shared/elements.tsx @@ -1,11 +1,12 @@ -import { Theme, useTheme } from '@emotion/react'; +import type { Theme } from '@emotion/react'; +import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { Anchor, Box } from '@skillsoft/gamut'; +import type { ElevationState } from '@skillsoft/gamut-styles'; import { Background, coreSwatches, css, - ElevationState, lxStudioColors, theme, trueColors, diff --git a/packages/styleguide/src/lib/Layouts/LayoutGrid/examples.tsx b/packages/styleguide/src/lib/Layouts/LayoutGrid/examples.tsx index 71eb0adb32..1a54ad5c77 100644 --- a/packages/styleguide/src/lib/Layouts/LayoutGrid/examples.tsx +++ b/packages/styleguide/src/lib/Layouts/LayoutGrid/examples.tsx @@ -1,5 +1,6 @@ import styled from '@emotion/styled'; -import { Column, ColumnProps } from '@skillsoft/gamut'; +import type { ColumnProps } from '@skillsoft/gamut'; +import { Column } from '@skillsoft/gamut'; import { css } from '@skillsoft/gamut-styles'; export const columns = [ diff --git a/packages/styleguide/src/lib/Molecules/Coachmark/Coachmark.stories.tsx b/packages/styleguide/src/lib/Molecules/Coachmark/Coachmark.stories.tsx index 7c60d6e959..3d3de3eb99 100644 --- a/packages/styleguide/src/lib/Molecules/Coachmark/Coachmark.stories.tsx +++ b/packages/styleguide/src/lib/Molecules/Coachmark/Coachmark.stories.tsx @@ -1,7 +1,8 @@ import { Coachmark, FillButton, FlexBox, Text } from '@skillsoft/gamut'; import * as patterns from '@skillsoft/gamut-patterns'; import type { Meta, StoryObj } from '@storybook/react'; -import { ComponentProps, useEffect, useState } from 'react'; +import type { ComponentProps } from 'react'; +import { useEffect, useState } from 'react'; import type { TypeWithDeepControls } from 'storybook-addon-deep-controls'; const meta: TypeWithDeepControls> = { diff --git a/packages/styleguide/src/lib/Molecules/Disclosure/Disclosure.stories.tsx b/packages/styleguide/src/lib/Molecules/Disclosure/Disclosure.stories.tsx index cbac8d4008..0ddc44a32c 100644 --- a/packages/styleguide/src/lib/Molecules/Disclosure/Disclosure.stories.tsx +++ b/packages/styleguide/src/lib/Molecules/Disclosure/Disclosure.stories.tsx @@ -1,5 +1,7 @@ -import { Disclosure, FlexBox, Text, WithChildrenProp } from '@skillsoft/gamut'; -import { Background, BackgroundProps } from '@skillsoft/gamut-styles'; +import type { WithChildrenProp } from '@skillsoft/gamut'; +import { Disclosure, FlexBox, Text } from '@skillsoft/gamut'; +import type { BackgroundProps } from '@skillsoft/gamut-styles'; +import { Background } from '@skillsoft/gamut-styles'; import type { Meta, StoryObj } from '@storybook/react'; const meta: Meta = { diff --git a/packages/styleguide/src/lib/Molecules/Flyout/Flyout.stories.tsx b/packages/styleguide/src/lib/Molecules/Flyout/Flyout.stories.tsx index 58a3c30040..52ae8ca75c 100644 --- a/packages/styleguide/src/lib/Molecules/Flyout/Flyout.stories.tsx +++ b/packages/styleguide/src/lib/Molecules/Flyout/Flyout.stories.tsx @@ -1,6 +1,7 @@ import { Box, FlexBox, Flyout, StrokeButton } from '@skillsoft/gamut'; import type { Meta } from '@storybook/react'; -import { ComponentProps, useEffect, useState } from 'react'; +import type { ComponentProps } from 'react'; +import { useEffect, useState } from 'react'; const meta: Meta = { component: Flyout, diff --git a/packages/styleguide/src/lib/Molecules/Modals/Dialog/Dialog.stories.tsx b/packages/styleguide/src/lib/Molecules/Modals/Dialog/Dialog.stories.tsx index d8df8de910..37f841a0f1 100644 --- a/packages/styleguide/src/lib/Molecules/Modals/Dialog/Dialog.stories.tsx +++ b/packages/styleguide/src/lib/Molecules/Modals/Dialog/Dialog.stories.tsx @@ -8,7 +8,8 @@ import { } from '@skillsoft/gamut'; import { ColorMode } from '@skillsoft/gamut-styles'; import type { Meta } from '@storybook/react'; -import { ComponentProps, useEffect, useRef, useState } from 'react'; +import type { ComponentProps } from 'react'; +import { useEffect, useRef, useState } from 'react'; import type { TypeWithDeepControls } from 'storybook-addon-deep-controls'; import { closeButtonPropsArgTypes } from '~styleguide/argTypes'; diff --git a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx index ee64a538c1..ac1e86aad5 100644 --- a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx +++ b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx @@ -9,7 +9,9 @@ import { } from '@skillsoft/gamut'; import { CodeCelebration } from '@skillsoft/gamut-illustrations'; import type { Meta } from '@storybook/react'; -import React, { ComponentProps, useEffect, useRef, useState } from 'react'; +import type { ComponentProps } from 'react'; +import type React from 'react'; +import { useEffect, useRef, useState } from 'react'; import type { TypeWithDeepControls } from 'storybook-addon-deep-controls'; import { closeButtonPropsArgTypes } from '~styleguide/argTypes'; diff --git a/packages/styleguide/src/lib/Molecules/Pagination/Pagination.stories.tsx b/packages/styleguide/src/lib/Molecules/Pagination/Pagination.stories.tsx index d9530c5c7e..ba7515ebf9 100644 --- a/packages/styleguide/src/lib/Molecules/Pagination/Pagination.stories.tsx +++ b/packages/styleguide/src/lib/Molecules/Pagination/Pagination.stories.tsx @@ -1,10 +1,5 @@ -import { - FlexBox, - FormGroup, - Input, - Pagination, - PaginationProps, -} from '@skillsoft/gamut'; +import type { PaginationProps } from '@skillsoft/gamut'; +import { FlexBox, FormGroup, Input, Pagination } from '@skillsoft/gamut'; import type { Meta, StoryObj } from '@storybook/react'; import { useCallback, useState } from 'react'; diff --git a/packages/styleguide/src/lib/Molecules/Popover/Popover.stories.tsx b/packages/styleguide/src/lib/Molecules/Popover/Popover.stories.tsx index 3b57ee9abc..bc501e88a1 100644 --- a/packages/styleguide/src/lib/Molecules/Popover/Popover.stories.tsx +++ b/packages/styleguide/src/lib/Molecules/Popover/Popover.stories.tsx @@ -1,11 +1,5 @@ -import { - Box, - FillButton, - FlexBox, - FlexBoxProps, - Popover, - PopoverProps, -} from '@skillsoft/gamut'; +import type { FlexBoxProps, PopoverProps } from '@skillsoft/gamut'; +import { Box, FillButton, FlexBox, Popover } from '@skillsoft/gamut'; import * as patterns from '@skillsoft/gamut-patterns'; import type { Meta, StoryObj } from '@storybook/react'; import { useRef, useState } from 'react'; diff --git a/packages/styleguide/src/lib/Organisms/BarChart/BarChart.stories.tsx b/packages/styleguide/src/lib/Organisms/BarChart/BarChart.stories.tsx index 8bfb81ab20..c3a5af5e39 100644 --- a/packages/styleguide/src/lib/Organisms/BarChart/BarChart.stories.tsx +++ b/packages/styleguide/src/lib/Organisms/BarChart/BarChart.stories.tsx @@ -1,9 +1,5 @@ -import { - BarChart, - BarProps, - Box, - PartialBarChartTranslations, -} from '@skillsoft/gamut'; +import type { BarProps, PartialBarChartTranslations } from '@skillsoft/gamut'; +import { BarChart, Box } from '@skillsoft/gamut'; import { BookFlipPageIcon, DataScienceIcon, diff --git a/packages/styleguide/src/lib/Organisms/ConnectedForm/ConnectedFormGroup/ConnectedFormGroup.stories.tsx b/packages/styleguide/src/lib/Organisms/ConnectedForm/ConnectedFormGroup/ConnectedFormGroup.stories.tsx index eb3e661f61..1f2a7d4296 100644 --- a/packages/styleguide/src/lib/Organisms/ConnectedForm/ConnectedFormGroup/ConnectedFormGroup.stories.tsx +++ b/packages/styleguide/src/lib/Organisms/ConnectedForm/ConnectedFormGroup/ConnectedFormGroup.stories.tsx @@ -1,7 +1,7 @@ +import type { ConnectedFormGroupProps } from '@skillsoft/gamut'; import { ConnectedForm, ConnectedFormGroup, - ConnectedFormGroupProps, ConnectedInput, ConnectedRadioGroupInput, Text, diff --git a/packages/styleguide/src/lib/Organisms/ConnectedForm/ConnectedFormInputs/ConnectedFormInputsTable.tsx b/packages/styleguide/src/lib/Organisms/ConnectedForm/ConnectedFormInputs/ConnectedFormInputsTable.tsx index 5047686c33..3ec8138adb 100644 --- a/packages/styleguide/src/lib/Organisms/ConnectedForm/ConnectedFormInputs/ConnectedFormInputsTable.tsx +++ b/packages/styleguide/src/lib/Organisms/ConnectedForm/ConnectedFormInputs/ConnectedFormInputsTable.tsx @@ -1,5 +1,5 @@ import { Box, List, ListCol, ListRow, Text } from '@skillsoft/gamut'; -import * as React from 'react'; +import type * as React from 'react'; import { LinkTo } from '~styleguide/blocks'; diff --git a/packages/styleguide/src/lib/Organisms/ListsAndTables/DataTable/DataTable.stories.tsx b/packages/styleguide/src/lib/Organisms/ListsAndTables/DataTable/DataTable.stories.tsx index 16e7da8fac..b66735c094 100644 --- a/packages/styleguide/src/lib/Organisms/ListsAndTables/DataTable/DataTable.stories.tsx +++ b/packages/styleguide/src/lib/Organisms/ListsAndTables/DataTable/DataTable.stories.tsx @@ -167,6 +167,7 @@ export const EmptyStateCustom: Story = { export const LoadingRows: Story = { args: { loading: true, shadow: true }, + tags: ['skip'], }; export const Scrollable: Story = { diff --git a/packages/styleguide/src/lib/Organisms/ListsAndTables/examples.tsx b/packages/styleguide/src/lib/Organisms/ListsAndTables/examples.tsx index 54e2f6d8eb..c96e5a0e8e 100644 --- a/packages/styleguide/src/lib/Organisms/ListsAndTables/examples.tsx +++ b/packages/styleguide/src/lib/Organisms/ListsAndTables/examples.tsx @@ -1,6 +1,6 @@ +import type { ColumnConfig } from '@skillsoft/gamut'; import { Box, - ColumnConfig, DataList, DataTable, FillButton, @@ -20,7 +20,8 @@ import { } from '@skillsoft/gamut-icons'; import { BlueprintWhite } from '@skillsoft/gamut-illustrations'; import uniq from 'lodash/uniq'; -import React, { useCallback, useMemo, useRef, useState } from 'react'; +import type React from 'react'; +import { useCallback, useMemo, useRef, useState } from 'react'; interface MenuItemConfig { action: string; diff --git a/packages/styleguide/src/lib/Organisms/Markdown/Markdown.stories.tsx b/packages/styleguide/src/lib/Organisms/Markdown/Markdown.stories.tsx index be82158090..a766753eba 100644 --- a/packages/styleguide/src/lib/Organisms/Markdown/Markdown.stories.tsx +++ b/packages/styleguide/src/lib/Organisms/Markdown/Markdown.stories.tsx @@ -1,4 +1,5 @@ -import { Markdown, Text, TextProps } from '@skillsoft/gamut'; +import type { TextProps } from '@skillsoft/gamut'; +import { Markdown, Text } from '@skillsoft/gamut'; import type { Meta, StoryObj } from '@storybook/react'; // `?raw` (Vite built-in) imports the file's contents as a string to feed the diff --git a/packages/styleguide/src/lib/Typography/Anchor/Anchor.examples.tsx b/packages/styleguide/src/lib/Typography/Anchor/Anchor.examples.tsx index e403556e14..db38de7df3 100644 --- a/packages/styleguide/src/lib/Typography/Anchor/Anchor.examples.tsx +++ b/packages/styleguide/src/lib/Typography/Anchor/Anchor.examples.tsx @@ -1,6 +1,6 @@ +import type { AnchorProps } from '@skillsoft/gamut'; import { Anchor, - AnchorProps, Box, Column, FlexBox, diff --git a/packages/variance/integration/__tests__/component.test.tsx b/packages/variance/integration/__tests__/component.test.tsx index e335548462..ba8d0f77c3 100644 --- a/packages/variance/integration/__tests__/component.test.tsx +++ b/packages/variance/integration/__tests__/component.test.tsx @@ -2,8 +2,8 @@ import { matchers } from '@emotion/jest'; import { ThemeProvider } from '@emotion/react'; import styled from '@emotion/styled'; import { render } from '@testing-library/react'; -import { ComponentProps } from 'react'; -import * as React from 'react'; +import type { ComponentProps } from 'react'; +import type * as React from 'react'; import { variance } from '../../src/core'; import { theme } from '../__fixtures__/theme'; diff --git a/packages/variance/integration/__tests__/variance.test.ts b/packages/variance/integration/__tests__/variance.test.ts index e7cfbed6cb..8b14c488cd 100644 --- a/packages/variance/integration/__tests__/variance.test.ts +++ b/packages/variance/integration/__tests__/variance.test.ts @@ -1,4 +1,4 @@ -import { Theme } from '@emotion/react'; +import type { Theme } from '@emotion/react'; import { variance } from '../../src/core'; import { createScale } from '../../src/scales/createScale'; diff --git a/packages/variance/integration/index.ts b/packages/variance/integration/index.ts index 7f5d5ed440..21924cd7c7 100644 --- a/packages/variance/integration/index.ts +++ b/packages/variance/integration/index.ts @@ -1,4 +1,4 @@ -import { theme } from './__fixtures__/theme'; +import type { theme } from './__fixtures__/theme'; type LocalTheme = typeof theme; diff --git a/packages/variance/src/core.ts b/packages/variance/src/core.ts index db6debbffa..82aa32a2fd 100644 --- a/packages/variance/src/core.ts +++ b/packages/variance/src/core.ts @@ -6,7 +6,7 @@ import isUndefined from 'lodash/isUndefined'; import merge from 'lodash/merge'; import { createScaleLookup } from './scales/createScaleLookup'; -import { +import type { AbstractParser, AbstractPropTransformer, Compose, @@ -18,8 +18,8 @@ import { TransformerMap, Variant, } from './types/config'; -import { DirectionalProperties } from './types/properties'; -import { BreakpointCache, CSSObject, ThemeProps } from './types/props'; +import type { DirectionalProperties } from './types/properties'; +import type { BreakpointCache, CSSObject, ThemeProps } from './types/props'; import { getStaticCss } from './utils/getStaticProperties'; import { orderPropNames } from './utils/propNames'; import { diff --git a/packages/variance/src/createTheme/createTheme.ts b/packages/variance/src/createTheme/createTheme.ts index d588d06b3e..d162ace627 100644 --- a/packages/variance/src/createTheme/createTheme.ts +++ b/packages/variance/src/createTheme/createTheme.ts @@ -1,11 +1,18 @@ import mapValues from 'lodash/mapValues'; import merge from 'lodash/merge'; -import { CSSObject } from '../types/props'; -import { AbstractTheme } from '../types/theme'; -import { flattenScale, LiteralPaths } from '../utils/flattenScale'; -import { KeyAsVariable, serializeTokens } from '../utils/serializeTokens'; -import { ColorModeConfig, Merge, MergeTheme, PrivateThemeKeys } from './types'; +import type { CSSObject } from '../types/props'; +import type { AbstractTheme } from '../types/theme'; +import type { LiteralPaths } from '../utils/flattenScale'; +import { flattenScale } from '../utils/flattenScale'; +import type { KeyAsVariable } from '../utils/serializeTokens'; +import { serializeTokens } from '../utils/serializeTokens'; +import type { + ColorModeConfig, + Merge, + MergeTheme, + PrivateThemeKeys, +} from './types'; class ThemeBuilder { #theme = {} as T; diff --git a/packages/variance/src/createTheme/types.ts b/packages/variance/src/createTheme/types.ts index 9a8c2c5fa4..b71a46727c 100644 --- a/packages/variance/src/createTheme/types.ts +++ b/packages/variance/src/createTheme/types.ts @@ -1,5 +1,5 @@ -import { CSSObject } from '../types/props'; -import { AbstractTheme } from '../types/theme'; +import type { CSSObject } from '../types/props'; +import type { AbstractTheme } from '../types/theme'; /** * This is a custom generic that ensures the safety of adding additional values to a theme object without accidentally wiping out diff --git a/packages/variance/src/getPropertyMode/getPropertyMode.ts b/packages/variance/src/getPropertyMode/getPropertyMode.ts index 6b2507fc99..473ee6146a 100644 --- a/packages/variance/src/getPropertyMode/getPropertyMode.ts +++ b/packages/variance/src/getPropertyMode/getPropertyMode.ts @@ -1,4 +1,4 @@ -import { PropertyMode } from '../types/properties'; +import type { PropertyMode } from '../types/properties'; export const getPropertyMode = ( useLogicalProperties: boolean diff --git a/packages/variance/src/scales/createScaleLookup.ts b/packages/variance/src/scales/createScaleLookup.ts index f551d51002..4467de3041 100644 --- a/packages/variance/src/scales/createScaleLookup.ts +++ b/packages/variance/src/scales/createScaleLookup.ts @@ -3,8 +3,8 @@ import isArray from 'lodash/isArray'; import isObject from 'lodash/isObject'; import isString from 'lodash/isString'; -import { Prop } from '../types/config'; -import { ThemeProps } from '../types/props'; +import type { Prop } from '../types/config'; +import type { ThemeProps } from '../types/props'; type GetScaleValue = ( val: string | number, diff --git a/packages/variance/src/types/config.ts b/packages/variance/src/types/config.ts index a6193bc9ec..4bb972a75b 100644 --- a/packages/variance/src/types/config.ts +++ b/packages/variance/src/types/config.ts @@ -1,13 +1,13 @@ -import { Theme } from '@emotion/react'; +import type { Theme } from '@emotion/react'; -import { +import type { DefaultCSSPropertyValue, DirectionalProperties, DirectionalProperty, PropertyMode, PropertyTypes, } from './properties'; -import { +import type { AbstractProps, CSSObject, CSSPropMap, @@ -15,7 +15,7 @@ import { ResponsiveProp, ThemeProps, } from './props'; -import { AllUnionKeys, Key, KeyFromUnion } from './utils'; +import type { AllUnionKeys, Key, KeyFromUnion } from './utils'; export type MapScale = Record; export type ArrayScale = readonly (string | number)[] & { length: 0 }; diff --git a/packages/variance/src/types/properties.ts b/packages/variance/src/types/properties.ts index 61131257ff..bf15e8497b 100644 --- a/packages/variance/src/types/properties.ts +++ b/packages/variance/src/types/properties.ts @@ -1,4 +1,4 @@ -import { Globals, StandardProperties, VendorProperties } from 'csstype'; +import type { Globals, StandardProperties, VendorProperties } from 'csstype'; type ColorProperties = 'color' | `${string}Color`; diff --git a/packages/variance/src/types/props.ts b/packages/variance/src/types/props.ts index 8bf0ed6799..914536ef0e 100644 --- a/packages/variance/src/types/props.ts +++ b/packages/variance/src/types/props.ts @@ -1,7 +1,7 @@ -import { Theme } from '@emotion/react'; +import type { Theme } from '@emotion/react'; -import { AbstractParser, Scale } from './config'; -import { CSSPropertyTypes } from './properties'; +import type { AbstractParser, Scale } from './config'; +import type { CSSPropertyTypes } from './properties'; export type AbstractProps = ThemeProps>; diff --git a/packages/variance/src/utils/propNames.ts b/packages/variance/src/utils/propNames.ts index 3450bdb4f1..96c7b213e8 100644 --- a/packages/variance/src/utils/propNames.ts +++ b/packages/variance/src/utils/propNames.ts @@ -1,5 +1,5 @@ -import { BaseProperty, PropertyValue } from '../types/config'; -import { DirectionalProperties } from '../types/properties'; +import type { BaseProperty, PropertyValue } from '../types/config'; +import type { DirectionalProperties } from '../types/properties'; const SHORTHAND_PROPERTIES = [ 'border', diff --git a/packages/variance/src/utils/responsive.ts b/packages/variance/src/utils/responsive.ts index 69cdbb518f..1525abccc5 100644 --- a/packages/variance/src/utils/responsive.ts +++ b/packages/variance/src/utils/responsive.ts @@ -1,14 +1,14 @@ import intersection from 'lodash/intersection'; import omit from 'lodash/omit'; -import { AbstractPropTransformer } from '../types/config'; -import { +import type { AbstractPropTransformer } from '../types/config'; +import type { BreakpointCache, BreakpointMap, CSSObject, ThemeProps, } from '../types/props'; -import { Breakpoints } from '../types/theme'; +import type { Breakpoints } from '../types/theme'; const BREAKPOINT_KEYS = [ '_', diff --git a/packages/variance/src/utils/serializeTokens.ts b/packages/variance/src/utils/serializeTokens.ts index beb9cb557b..76e1f0b4c3 100644 --- a/packages/variance/src/utils/serializeTokens.ts +++ b/packages/variance/src/utils/serializeTokens.ts @@ -1,8 +1,8 @@ -import { Theme } from '@emotion/react'; +import type { Theme } from '@emotion/react'; import isObject from 'lodash/isObject'; import merge from 'lodash/merge'; -import { CSSObject } from '../types/props'; +import type { CSSObject } from '../types/props'; /** * Returns an type of any object with { key: 'var(--key) } diff --git a/yarn.lock b/yarn.lock index 391cec4f96..cb150b23ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -75,85 +75,95 @@ __metadata: languageName: node linkType: hard -"@astrojs/compiler-binding-darwin-arm64@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding-darwin-arm64@npm:0.4.0" +"@astrojs/compiler-binding-android-arm64@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-android-arm64@npm:0.4.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@astrojs/compiler-binding-darwin-arm64@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-darwin-arm64@npm:0.4.1" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@astrojs/compiler-binding-darwin-x64@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding-darwin-x64@npm:0.4.0" +"@astrojs/compiler-binding-darwin-x64@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-darwin-x64@npm:0.4.1" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@astrojs/compiler-binding-linux-arm64-gnu@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding-linux-arm64-gnu@npm:0.4.0" +"@astrojs/compiler-binding-linux-arm64-gnu@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-linux-arm64-gnu@npm:0.4.1" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@astrojs/compiler-binding-linux-arm64-musl@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding-linux-arm64-musl@npm:0.4.0" +"@astrojs/compiler-binding-linux-arm64-musl@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-linux-arm64-musl@npm:0.4.1" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@astrojs/compiler-binding-linux-x64-gnu@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding-linux-x64-gnu@npm:0.4.0" +"@astrojs/compiler-binding-linux-x64-gnu@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-linux-x64-gnu@npm:0.4.1" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@astrojs/compiler-binding-linux-x64-musl@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding-linux-x64-musl@npm:0.4.0" +"@astrojs/compiler-binding-linux-x64-musl@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-linux-x64-musl@npm:0.4.1" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@astrojs/compiler-binding-wasm32-wasi@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding-wasm32-wasi@npm:0.4.0" +"@astrojs/compiler-binding-wasm32-wasi@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-wasm32-wasi@npm:0.4.1" dependencies: - "@napi-rs/wasm-runtime": "npm:^1.2.2" + "@napi-rs/wasm-runtime": "npm:^1.2.4" conditions: cpu=wasm32 languageName: node linkType: hard -"@astrojs/compiler-binding-win32-arm64-msvc@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding-win32-arm64-msvc@npm:0.4.0" +"@astrojs/compiler-binding-win32-arm64-msvc@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-win32-arm64-msvc@npm:0.4.1" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@astrojs/compiler-binding-win32-x64-msvc@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding-win32-x64-msvc@npm:0.4.0" +"@astrojs/compiler-binding-win32-x64-msvc@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding-win32-x64-msvc@npm:0.4.1" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@astrojs/compiler-binding@npm:0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-binding@npm:0.4.0" - dependencies: - "@astrojs/compiler-binding-darwin-arm64": "npm:0.4.0" - "@astrojs/compiler-binding-darwin-x64": "npm:0.4.0" - "@astrojs/compiler-binding-linux-arm64-gnu": "npm:0.4.0" - "@astrojs/compiler-binding-linux-arm64-musl": "npm:0.4.0" - "@astrojs/compiler-binding-linux-x64-gnu": "npm:0.4.0" - "@astrojs/compiler-binding-linux-x64-musl": "npm:0.4.0" - "@astrojs/compiler-binding-wasm32-wasi": "npm:0.4.0" - "@astrojs/compiler-binding-win32-arm64-msvc": "npm:0.4.0" - "@astrojs/compiler-binding-win32-x64-msvc": "npm:0.4.0" +"@astrojs/compiler-binding@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/compiler-binding@npm:0.4.1" + dependencies: + "@astrojs/compiler-binding-android-arm64": "npm:0.4.1" + "@astrojs/compiler-binding-darwin-arm64": "npm:0.4.1" + "@astrojs/compiler-binding-darwin-x64": "npm:0.4.1" + "@astrojs/compiler-binding-linux-arm64-gnu": "npm:0.4.1" + "@astrojs/compiler-binding-linux-arm64-musl": "npm:0.4.1" + "@astrojs/compiler-binding-linux-x64-gnu": "npm:0.4.1" + "@astrojs/compiler-binding-linux-x64-musl": "npm:0.4.1" + "@astrojs/compiler-binding-wasm32-wasi": "npm:0.4.1" + "@astrojs/compiler-binding-win32-arm64-msvc": "npm:0.4.1" + "@astrojs/compiler-binding-win32-x64-msvc": "npm:0.4.1" dependenciesMeta: + "@astrojs/compiler-binding-android-arm64": + optional: true "@astrojs/compiler-binding-darwin-arm64": optional: true "@astrojs/compiler-binding-darwin-x64": @@ -172,16 +182,16 @@ __metadata: optional: true "@astrojs/compiler-binding-win32-x64-msvc": optional: true - checksum: 10c0/bed8bd622549a3b60a867938a715bb826493c93ac24425c6ca19ecf9cd8b97abd8b6ce6a3f13d8a96538fffe4b019be010202a83120abb47f3c1322903e842c1 + checksum: 10c0/75ab9b1806f2941165a17ca8e5228037fd23f30e75861a3c1d5fb9c563ce38fd46aa20e1bc72868bcdf804eeecbdff2a85a5a98f4dddc71d155ef650e8496267 languageName: node linkType: hard "@astrojs/compiler-rs@npm:^0.4.0": - version: 0.4.0 - resolution: "@astrojs/compiler-rs@npm:0.4.0" + version: 0.4.1 + resolution: "@astrojs/compiler-rs@npm:0.4.1" dependencies: - "@astrojs/compiler-binding": "npm:0.4.0" - checksum: 10c0/663810868196c5af67ed6d737e47fc1b626bee88e95d3e4ecf3997d90aa71afd4c63f0d7d0d32b1f3dda5d9ae8a791c1c9e7be08fd851d0dab5dddf43650f5a6 + "@astrojs/compiler-binding": "npm:0.4.1" + checksum: 10c0/3c6859b40baffabc257544ce3ea1e5120432676a0ff207ed316df1a3024e1f20445716d742133c7c89f2c675156af72d2bc0e82d670066d855b4eb9c8fc02173 languageName: node linkType: hard @@ -201,6 +211,22 @@ __metadata: languageName: node linkType: hard +"@astrojs/internal-helpers@npm:0.11.0": + version: 0.11.0 + resolution: "@astrojs/internal-helpers@npm:0.11.0" + dependencies: + "@types/hast": "npm:^3.0.4" + "@types/mdast": "npm:^4.0.4" + js-yaml: "npm:^4.3.0" + picomatch: "npm:^4.0.4" + retext-smartypants: "npm:^6.2.0" + shiki: "npm:^4.0.2" + smol-toml: "npm:^1.6.0" + unified: "npm:^11.0.5" + checksum: 10c0/ec7bf3dcd81ee1c6b1baa4d599a92c3aa97da21c875c1527576812f5bfa84db3d459726443467933a7e243efb8ff6ac32265f5971f314a8b5ff7a73eef451289 + languageName: node + linkType: hard + "@astrojs/markdown-remark@npm:7.2.4": version: 7.2.4 resolution: "@astrojs/markdown-remark@npm:7.2.4" @@ -226,7 +252,19 @@ __metadata: languageName: node linkType: hard -"@astrojs/markdown-satteri@npm:0.3.8, @astrojs/markdown-satteri@npm:^0.3.5": +"@astrojs/markdown-satteri@npm:0.4.1": + version: 0.4.1 + resolution: "@astrojs/markdown-satteri@npm:0.4.1" + dependencies: + "@astrojs/internal-helpers": "npm:0.11.0" + "@astrojs/prism": "npm:4.0.2" + github-slugger: "npm:^2.0.0" + satteri: "npm:^0.10.3" + checksum: 10c0/04b8ec777ee6e19c212887f022b151f3348a4150c1f66ab33d4927e986722820b9b1c2b6b10c3a45721b11eef429ab33cfca1b342b11b5d040e0a90e79a8f83e + languageName: node + linkType: hard + +"@astrojs/markdown-satteri@npm:^0.3.5": version: 0.3.8 resolution: "@astrojs/markdown-satteri@npm:0.3.8" dependencies: @@ -276,10 +314,10 @@ __metadata: linkType: hard "@astrojs/react@npm:^6.0.4": - version: 6.0.4 - resolution: "@astrojs/react@npm:6.0.4" + version: 6.0.5 + resolution: "@astrojs/react@npm:6.0.5" dependencies: - "@astrojs/internal-helpers": "npm:0.10.4" + "@astrojs/internal-helpers": "npm:0.11.0" "@vitejs/plugin-react": "npm:^5.2.0" devalue: "npm:^5.8.1" ultrahtml: "npm:^1.6.0" @@ -289,24 +327,23 @@ __metadata: "@types/react-dom": ^17.0.17 || ^18.0.6 || ^19.0.0 react: ^17.0.2 || ^18.0.0 || ^19.0.0 react-dom: ^17.0.2 || ^18.0.0 || ^19.0.0 - checksum: 10c0/b619955c586de3395e786cf42e2bf52ad1275237b0b386837f202190352da3bd33e42a7d9a780f5bb579f65a3ce011ecce91adffac8547b2502ae01b3b3cdfac + checksum: 10c0/d5c68b8212cafbeacd5153d1260dc5279930f3718f10aa48fa331af6676316bd3204e99526aa6b4db5ec8e0272ac8b0b757a80f7d98b4e85eddf45b9d1d425bf languageName: node linkType: hard "@astrojs/sitemap@npm:^3.7.3": - version: 3.7.3 - resolution: "@astrojs/sitemap@npm:3.7.3" + version: 3.7.4 + resolution: "@astrojs/sitemap@npm:3.7.4" dependencies: sitemap: "npm:^9.0.0" - stream-replace-string: "npm:^2.0.0" zod: "npm:^4.3.6" - checksum: 10c0/99c0240586ea2ab1868903341a302ff4bd909b53c49c1c8be476921593fbee838623207c4fa88522264d79291f074ea536aef614d6b1fb286f29a1a5d244ec21 + checksum: 10c0/6aff00b6963f00a44e14db1cf26c4682702b43417c145d8d7a6871508ecbf80ba8db689b92acb9ab3b3ca9a14f1a1576b57c54d5c70e9e0e7acf477851329d29 languageName: node linkType: hard "@astrojs/starlight@npm:^0.41.9": - version: 0.41.9 - resolution: "@astrojs/starlight@npm:0.41.9" + version: 0.41.11 + resolution: "@astrojs/starlight@npm:0.41.11" dependencies: "@astrojs/markdown-satteri": "npm:^0.3.5" "@astrojs/mdx": "npm:^7.0.5" @@ -343,7 +380,7 @@ __metadata: peerDependenciesMeta: "@astrojs/markdown-remark": optional: true - checksum: 10c0/ce8e2aa28a3de4e1d8b9142e952376d9df1a34a17186079c4b5dd1f28eb8c1fb73d99e3e79f6c07f15b596528d522191603247a861c26dc2404f34c9ed5786e8 + checksum: 10c0/fbb9ad828dfd910059305d691d3acc4391e6244e584ddba77d3c68ebc315609eb87a18fcbf56506fd490b56aef2606853eef41d8ae694eeb52cd75dcb07a54ee languageName: node linkType: hard @@ -2344,9 +2381,9 @@ __metadata: linkType: hard "@ctrl/tinycolor@npm:^4.0.4": - version: 4.2.0 - resolution: "@ctrl/tinycolor@npm:4.2.0" - checksum: 10c0/374034581953f6debd950e4b07da833d1d8f7af5aead5117c91545fbe1583c91b2407bc285e1625529839135d6465c2e7549e7a8ad70979cab4c207486798064 + version: 4.2.1 + resolution: "@ctrl/tinycolor@npm:4.2.1" + checksum: 10c0/67405f51134fbb7cdb254cc324a237c99d33577bff6df9335645a6a2ec7f7f754d8f749c0dcf32937ee74d176153d6ffa543c02bd0ee9ea993647c105d2cfc24 languageName: node linkType: hard @@ -2413,7 +2450,7 @@ __metadata: languageName: node linkType: hard -"@emnapi/runtime@npm:^1.1.0, @emnapi/runtime@npm:^1.11.1, @emnapi/runtime@npm:^1.4.3, @emnapi/runtime@npm:^1.5.0": +"@emnapi/runtime@npm:^1.1.0, @emnapi/runtime@npm:^1.11.3, @emnapi/runtime@npm:^1.4.3, @emnapi/runtime@npm:^1.5.0": version: 1.11.3 resolution: "@emnapi/runtime@npm:1.11.3" dependencies: @@ -3014,9 +3051,9 @@ __metadata: languageName: node linkType: hard -"@expressive-code/core@npm:^0.44.1": - version: 0.44.1 - resolution: "@expressive-code/core@npm:0.44.1" +"@expressive-code/core@npm:^0.44.2": + version: 0.44.2 + resolution: "@expressive-code/core@npm:0.44.2" dependencies: "@ctrl/tinycolor": "npm:^4.0.4" hast-util-select: "npm:^6.0.2" @@ -3027,35 +3064,35 @@ __metadata: postcss-nested: "npm:^6.0.1" unist-util-visit: "npm:^5.0.0" unist-util-visit-parents: "npm:^6.0.1" - checksum: 10c0/0e2bc031ce475b290e107ae61b4f915daebf2c7672d293d5f3c12dcc0c88f8c9b82d8649a0a9f5da7fdb8bc2a620c8f08d84f536a59c8ea0fc1777758db735a1 + checksum: 10c0/3038bb593001a5117174154ca2d2e9cd23e975e63f5df5cbd9766564bd35ed1b6f5ddd98482f22d1db8a685658e88580254ffe6d37b7c984d7986ac1d2cdace6 languageName: node linkType: hard -"@expressive-code/plugin-frames@npm:^0.44.1": - version: 0.44.1 - resolution: "@expressive-code/plugin-frames@npm:0.44.1" +"@expressive-code/plugin-frames@npm:^0.44.2": + version: 0.44.2 + resolution: "@expressive-code/plugin-frames@npm:0.44.2" dependencies: - "@expressive-code/core": "npm:^0.44.1" - checksum: 10c0/d32c6c4ae72439b4a5ac25688180d037df27ce3bc1a361e89732f487109afe8960b1b2a573c3d704bda2feb2e2a1e72828385abc6971d4c823ba3b06153bcd28 + "@expressive-code/core": "npm:^0.44.2" + checksum: 10c0/8cd1deebbef93c920e79a4aa9554df51d505fddb70b86308465649bc771b260dd19945c8500eb272d80d00ddb466cf2cc33de94c26cd6ffc8ac217cd7956d435 languageName: node linkType: hard -"@expressive-code/plugin-shiki@npm:^0.44.1": - version: 0.44.1 - resolution: "@expressive-code/plugin-shiki@npm:0.44.1" +"@expressive-code/plugin-shiki@npm:^0.44.2": + version: 0.44.2 + resolution: "@expressive-code/plugin-shiki@npm:0.44.2" dependencies: - "@expressive-code/core": "npm:^0.44.1" + "@expressive-code/core": "npm:^0.44.2" shiki: "npm:^4.0.2" - checksum: 10c0/3e9fac7ddc3ebf8cf24579bae9a6767b92f5c87d8de3eb47c0dac1ed138070ef2a4148732b3cd63d178c8fe9bc25f46933228a5b2b44615e5ab453eb7e064afb + checksum: 10c0/06c091d706bb68ef43710164154f498d8110716e25c94803f486ccf4023e6d773c96c5bd9f3286888a3b2e227d68d31f07bbcae3489c61a48a642814d291d016 languageName: node linkType: hard -"@expressive-code/plugin-text-markers@npm:^0.44.1": - version: 0.44.1 - resolution: "@expressive-code/plugin-text-markers@npm:0.44.1" +"@expressive-code/plugin-text-markers@npm:^0.44.2": + version: 0.44.2 + resolution: "@expressive-code/plugin-text-markers@npm:0.44.2" dependencies: - "@expressive-code/core": "npm:^0.44.1" - checksum: 10c0/78b8d2a98b931d78156830d3deeadbfd16fa1e221fe08a7ed8aca00c20663623f20496d1079529d70cea2660bf27c77783c4626797d77b8ce6932d02729096bd + "@expressive-code/core": "npm:^0.44.2" + checksum: 10c0/9fb0faab5ba7bb86957427d15b831180aca6999f405b0de321bb64294b49c33fbf672e489632d0a61e53259622d51c53f1d318c8d47eeeb1751058672805aab9 languageName: node linkType: hard @@ -3249,11 +3286,11 @@ __metadata: languageName: node linkType: hard -"@img/sharp-darwin-arm64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-darwin-arm64@npm:0.35.3" +"@img/sharp-darwin-arm64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-darwin-arm64@npm:0.35.4" dependencies: - "@img/sharp-libvips-darwin-arm64": "npm:1.3.2" + "@img/sharp-libvips-darwin-arm64": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-darwin-arm64": optional: true @@ -3261,11 +3298,11 @@ __metadata: languageName: node linkType: hard -"@img/sharp-darwin-x64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-darwin-x64@npm:0.35.3" +"@img/sharp-darwin-x64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-darwin-x64@npm:0.35.4" dependencies: - "@img/sharp-libvips-darwin-x64": "npm:1.3.2" + "@img/sharp-libvips-darwin-x64": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-darwin-x64": optional: true @@ -3273,90 +3310,90 @@ __metadata: languageName: node linkType: hard -"@img/sharp-freebsd-wasm32@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-freebsd-wasm32@npm:0.35.3" +"@img/sharp-freebsd-wasm32@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-freebsd-wasm32@npm:0.35.4" dependencies: - "@img/sharp-wasm32": "npm:0.35.3" + "@img/sharp-wasm32": "npm:0.35.4" conditions: os=freebsd languageName: node linkType: hard -"@img/sharp-libvips-darwin-arm64@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-darwin-arm64@npm:1.3.2" +"@img/sharp-libvips-darwin-arm64@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-darwin-arm64@npm:1.3.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@img/sharp-libvips-darwin-x64@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-darwin-x64@npm:1.3.2" +"@img/sharp-libvips-darwin-x64@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-darwin-x64@npm:1.3.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@img/sharp-libvips-linux-arm64@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-linux-arm64@npm:1.3.2" +"@img/sharp-libvips-linux-arm64@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-linux-arm64@npm:1.3.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@img/sharp-libvips-linux-arm@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-linux-arm@npm:1.3.2" +"@img/sharp-libvips-linux-arm@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-linux-arm@npm:1.3.3" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@img/sharp-libvips-linux-ppc64@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-linux-ppc64@npm:1.3.2" +"@img/sharp-libvips-linux-ppc64@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-linux-ppc64@npm:1.3.3" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@img/sharp-libvips-linux-riscv64@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-linux-riscv64@npm:1.3.2" +"@img/sharp-libvips-linux-riscv64@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-linux-riscv64@npm:1.3.3" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@img/sharp-libvips-linux-s390x@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-linux-s390x@npm:1.3.2" +"@img/sharp-libvips-linux-s390x@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-linux-s390x@npm:1.3.3" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@img/sharp-libvips-linux-x64@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-linux-x64@npm:1.3.2" +"@img/sharp-libvips-linux-x64@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-linux-x64@npm:1.3.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@img/sharp-libvips-linuxmusl-arm64@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.3.2" +"@img/sharp-libvips-linuxmusl-arm64@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.3.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@img/sharp-libvips-linuxmusl-x64@npm:1.3.2": - version: 1.3.2 - resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.3.2" +"@img/sharp-libvips-linuxmusl-x64@npm:1.3.3": + version: 1.3.3 + resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.3.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@img/sharp-linux-arm64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-linux-arm64@npm:0.35.3" +"@img/sharp-linux-arm64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-linux-arm64@npm:0.35.4" dependencies: - "@img/sharp-libvips-linux-arm64": "npm:1.3.2" + "@img/sharp-libvips-linux-arm64": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-linux-arm64": optional: true @@ -3364,11 +3401,11 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-arm@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-linux-arm@npm:0.35.3" +"@img/sharp-linux-arm@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-linux-arm@npm:0.35.4" dependencies: - "@img/sharp-libvips-linux-arm": "npm:1.3.2" + "@img/sharp-libvips-linux-arm": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-linux-arm": optional: true @@ -3376,11 +3413,11 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-ppc64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-linux-ppc64@npm:0.35.3" +"@img/sharp-linux-ppc64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-linux-ppc64@npm:0.35.4" dependencies: - "@img/sharp-libvips-linux-ppc64": "npm:1.3.2" + "@img/sharp-libvips-linux-ppc64": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-linux-ppc64": optional: true @@ -3388,11 +3425,11 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-riscv64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-linux-riscv64@npm:0.35.3" +"@img/sharp-linux-riscv64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-linux-riscv64@npm:0.35.4" dependencies: - "@img/sharp-libvips-linux-riscv64": "npm:1.3.2" + "@img/sharp-libvips-linux-riscv64": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-linux-riscv64": optional: true @@ -3400,11 +3437,11 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-s390x@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-linux-s390x@npm:0.35.3" +"@img/sharp-linux-s390x@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-linux-s390x@npm:0.35.4" dependencies: - "@img/sharp-libvips-linux-s390x": "npm:1.3.2" + "@img/sharp-libvips-linux-s390x": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-linux-s390x": optional: true @@ -3412,11 +3449,11 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-x64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-linux-x64@npm:0.35.3" +"@img/sharp-linux-x64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-linux-x64@npm:0.35.4" dependencies: - "@img/sharp-libvips-linux-x64": "npm:1.3.2" + "@img/sharp-libvips-linux-x64": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-linux-x64": optional: true @@ -3424,11 +3461,11 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linuxmusl-arm64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-linuxmusl-arm64@npm:0.35.3" +"@img/sharp-linuxmusl-arm64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-linuxmusl-arm64@npm:0.35.4" dependencies: - "@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.2" + "@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-linuxmusl-arm64": optional: true @@ -3436,11 +3473,11 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linuxmusl-x64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-linuxmusl-x64@npm:0.35.3" +"@img/sharp-linuxmusl-x64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-linuxmusl-x64@npm:0.35.4" dependencies: - "@img/sharp-libvips-linuxmusl-x64": "npm:1.3.2" + "@img/sharp-libvips-linuxmusl-x64": "npm:1.3.3" dependenciesMeta: "@img/sharp-libvips-linuxmusl-x64": optional: true @@ -3448,41 +3485,41 @@ __metadata: languageName: node linkType: hard -"@img/sharp-wasm32@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-wasm32@npm:0.35.3" +"@img/sharp-wasm32@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-wasm32@npm:0.35.4" dependencies: - "@emnapi/runtime": "npm:^1.11.1" - checksum: 10c0/627125c330ab96e324c888d3c43fa72eb7c975e653277755121df14447373b7b47b011a1eae9c8c360a9535a7072bd6205b6498974006124b513c033a07e0e32 + "@emnapi/runtime": "npm:^1.11.3" + checksum: 10c0/7f5e394f168eb2f038b8ae4949fb5434085d1db931ede2ae1389479d7a1dbe11e2fc9d58e8e9830bff744ba996256c9e411be1d466dfcbf6e1f4d153b84f25ff languageName: node linkType: hard -"@img/sharp-webcontainers-wasm32@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-webcontainers-wasm32@npm:0.35.3" +"@img/sharp-webcontainers-wasm32@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-webcontainers-wasm32@npm:0.35.4" dependencies: - "@img/sharp-wasm32": "npm:0.35.3" + "@img/sharp-wasm32": "npm:0.35.4" conditions: cpu=wasm32 languageName: node linkType: hard -"@img/sharp-win32-arm64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-win32-arm64@npm:0.35.3" +"@img/sharp-win32-arm64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-win32-arm64@npm:0.35.4" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@img/sharp-win32-ia32@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-win32-ia32@npm:0.35.3" +"@img/sharp-win32-ia32@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-win32-ia32@npm:0.35.4" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@img/sharp-win32-x64@npm:0.35.3": - version: 0.35.3 - resolution: "@img/sharp-win32-x64@npm:0.35.3" +"@img/sharp-win32-x64@npm:0.35.4": + version: 0.35.4 + resolution: "@img/sharp-win32-x64@npm:0.35.4" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3906,7 +3943,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15, @jridgewell/sourcemap-codec@npm:^1.5.0, @jridgewell/sourcemap-codec@npm:^1.5.5": +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15, @jridgewell/sourcemap-codec@npm:^1.5.0, @jridgewell/sourcemap-codec@npm:^1.5.5, @jridgewell/sourcemap-codec@npm:^1.6.0": version: 1.6.0 resolution: "@jridgewell/sourcemap-codec@npm:1.6.0" checksum: 10c0/b5be700e45a775f218589c3466c4ffea630582b4988657652da464e5ab8a7d18bf928ee4fd2363fb346ede4bea9c6ff0bae05a538358c4565ece6199531b5f72 @@ -4397,15 +4434,15 @@ __metadata: languageName: node linkType: hard -"@napi-rs/wasm-runtime@npm:^1.1.1, @napi-rs/wasm-runtime@npm:^1.1.6, @napi-rs/wasm-runtime@npm:^1.2.2, @napi-rs/wasm-runtime@npm:^1.2.3": - version: 1.2.3 - resolution: "@napi-rs/wasm-runtime@npm:1.2.3" +"@napi-rs/wasm-runtime@npm:^1.1.1, @napi-rs/wasm-runtime@npm:^1.1.6, @napi-rs/wasm-runtime@npm:^1.2.3, @napi-rs/wasm-runtime@npm:^1.2.4": + version: 1.2.4 + resolution: "@napi-rs/wasm-runtime@npm:1.2.4" dependencies: "@tybys/wasm-util": "npm:^0.10.3" peerDependencies: "@emnapi/core": ^1.7.1 || ^2.0.0-alpha.4 "@emnapi/runtime": ^1.7.1 || ^2.0.0-alpha.4 - checksum: 10c0/6da0a4bf9df79e9abfb3e3d462f6a5d42889be39426040038c9dd5925865585d7dbd06dd439c2ffc20f49ef2751412da5bd748cfb3c5b049142d72c0550f6f79 + checksum: 10c0/4bd7be975f7c806bf7c33255b53257cdcd603c573e453b2f6878550bcfd59722d0d34c97627ee6a0353d91274b738d29b32ba1f0fe552a5fca1c2da80aa17bdc languageName: node linkType: hard @@ -4900,10 +4937,10 @@ __metadata: languageName: node linkType: hard -"@oxc-project/types@npm:=0.149.0": - version: 0.149.0 - resolution: "@oxc-project/types@npm:0.149.0" - checksum: 10c0/f91ff8101300ce5a29fbfc57bdaafd9c1c9d3d9b46c63093f437c479d047042eb615cb6c3ddac91a0d289701ce60c365632866a85d0f1e0d159b20180115187e +"@oxc-project/types@npm:=0.150.0": + version: 0.150.0 + resolution: "@oxc-project/types@npm:0.150.0" + checksum: 10c0/e8b72ce72f5cd56b6c1da67dd65677c54850354acb0d2493016c791088f5cad991ba14ea79948ed766f62f6b6048e5de8ace163e154c8f21c550753052ccfe42 languageName: node linkType: hard @@ -6866,107 +6903,107 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-android-arm-eabi@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-android-arm-eabi@npm:1.2.8" +"@rolldown/binding-android-arm-eabi@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-android-arm-eabi@npm:1.2.9" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rolldown/binding-android-arm64@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-android-arm64@npm:1.2.8" +"@rolldown/binding-android-arm64@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-android-arm64@npm:1.2.9" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rolldown/binding-darwin-arm64@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-darwin-arm64@npm:1.2.8" +"@rolldown/binding-darwin-arm64@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-darwin-arm64@npm:1.2.9" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rolldown/binding-darwin-x64@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-darwin-x64@npm:1.2.8" +"@rolldown/binding-darwin-x64@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-darwin-x64@npm:1.2.9" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rolldown/binding-freebsd-x64@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-freebsd-x64@npm:1.2.8" +"@rolldown/binding-freebsd-x64@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-freebsd-x64@npm:1.2.9" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@rolldown/binding-linux-arm-gnueabihf@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-linux-arm-gnueabihf@npm:1.2.8" +"@rolldown/binding-linux-arm-gnueabihf@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-linux-arm-gnueabihf@npm:1.2.9" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@rolldown/binding-linux-arm64-gnu@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-linux-arm64-gnu@npm:1.2.8" +"@rolldown/binding-linux-arm64-gnu@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-linux-arm64-gnu@npm:1.2.9" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rolldown/binding-linux-arm64-musl@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-linux-arm64-musl@npm:1.2.8" +"@rolldown/binding-linux-arm64-musl@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-linux-arm64-musl@npm:1.2.9" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rolldown/binding-linux-ppc64-gnu@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-linux-ppc64-gnu@npm:1.2.8" +"@rolldown/binding-linux-ppc64-gnu@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-linux-ppc64-gnu@npm:1.2.9" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rolldown/binding-linux-s390x-gnu@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-linux-s390x-gnu@npm:1.2.8" +"@rolldown/binding-linux-s390x-gnu@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-linux-s390x-gnu@npm:1.2.9" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rolldown/binding-linux-x64-gnu@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-linux-x64-gnu@npm:1.2.8" +"@rolldown/binding-linux-x64-gnu@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-linux-x64-gnu@npm:1.2.9" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rolldown/binding-linux-x64-musl@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-linux-x64-musl@npm:1.2.8" +"@rolldown/binding-linux-x64-musl@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-linux-x64-musl@npm:1.2.9" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rolldown/binding-openharmony-arm64@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-openharmony-arm64@npm:1.2.8" +"@rolldown/binding-openharmony-arm64@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-openharmony-arm64@npm:1.2.9" conditions: os=openharmony & cpu=arm64 languageName: node linkType: hard -"@rolldown/binding-win32-arm64-msvc@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-win32-arm64-msvc@npm:1.2.8" +"@rolldown/binding-win32-arm64-msvc@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-win32-arm64-msvc@npm:1.2.9" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rolldown/binding-win32-x64-msvc@npm:1.2.8": - version: 1.2.8 - resolution: "@rolldown/binding-win32-x64-msvc@npm:1.2.8" +"@rolldown/binding-win32-x64-msvc@npm:1.2.9": + version: 1.2.9 + resolution: "@rolldown/binding-win32-x64-msvc@npm:1.2.9" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -6978,6 +7015,13 @@ __metadata: languageName: node linkType: hard +"@rolldown/pluginutils@npm:1.0.0-rc.7": + version: 1.0.0-rc.7 + resolution: "@rolldown/pluginutils@npm:1.0.0-rc.7" + checksum: 10c0/9d5490b5805b25bcd1720ca01c4c032b55a0ef953dab36a8dd42c568e82214576baa464f3027cd5dff3fabcfbe3bf3db2251d12b60220f5d1cd2ffde5ee37082 + languageName: node + linkType: hard + "@rolldown/pluginutils@npm:^1.0.0": version: 1.0.1 resolution: "@rolldown/pluginutils@npm:1.0.1" @@ -8268,108 +8312,108 @@ __metadata: languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-darwin-arm64@npm:1.15.21" +"@swc/core-darwin-arm64@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-darwin-arm64@npm:1.15.43" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-darwin-x64@npm:1.15.21" +"@swc/core-darwin-x64@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-darwin-x64@npm:1.15.43" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.15.21" +"@swc/core-linux-arm-gnueabihf@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.15.43" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-linux-arm64-gnu@npm:1.15.21" +"@swc/core-linux-arm64-gnu@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-linux-arm64-gnu@npm:1.15.43" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-linux-arm64-musl@npm:1.15.21" +"@swc/core-linux-arm64-musl@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-linux-arm64-musl@npm:1.15.43" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@swc/core-linux-ppc64-gnu@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-linux-ppc64-gnu@npm:1.15.21" +"@swc/core-linux-ppc64-gnu@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-linux-ppc64-gnu@npm:1.15.43" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-s390x-gnu@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-linux-s390x-gnu@npm:1.15.21" +"@swc/core-linux-s390x-gnu@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-linux-s390x-gnu@npm:1.15.43" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-linux-x64-gnu@npm:1.15.21" +"@swc/core-linux-x64-gnu@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-linux-x64-gnu@npm:1.15.43" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-linux-x64-musl@npm:1.15.21" +"@swc/core-linux-x64-musl@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-linux-x64-musl@npm:1.15.43" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-win32-arm64-msvc@npm:1.15.21" +"@swc/core-win32-arm64-msvc@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-win32-arm64-msvc@npm:1.15.43" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-win32-ia32-msvc@npm:1.15.21" +"@swc/core-win32-ia32-msvc@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-win32-ia32-msvc@npm:1.15.43" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.15.21": - version: 1.15.21 - resolution: "@swc/core-win32-x64-msvc@npm:1.15.21" +"@swc/core-win32-x64-msvc@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core-win32-x64-msvc@npm:1.15.43" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@swc/core@npm:^1.15.18": - version: 1.15.21 - resolution: "@swc/core@npm:1.15.21" +"@swc/core@npm:1.15.43": + version: 1.15.43 + resolution: "@swc/core@npm:1.15.43" dependencies: - "@swc/core-darwin-arm64": "npm:1.15.21" - "@swc/core-darwin-x64": "npm:1.15.21" - "@swc/core-linux-arm-gnueabihf": "npm:1.15.21" - "@swc/core-linux-arm64-gnu": "npm:1.15.21" - "@swc/core-linux-arm64-musl": "npm:1.15.21" - "@swc/core-linux-ppc64-gnu": "npm:1.15.21" - "@swc/core-linux-s390x-gnu": "npm:1.15.21" - "@swc/core-linux-x64-gnu": "npm:1.15.21" - "@swc/core-linux-x64-musl": "npm:1.15.21" - "@swc/core-win32-arm64-msvc": "npm:1.15.21" - "@swc/core-win32-ia32-msvc": "npm:1.15.21" - "@swc/core-win32-x64-msvc": "npm:1.15.21" + "@swc/core-darwin-arm64": "npm:1.15.43" + "@swc/core-darwin-x64": "npm:1.15.43" + "@swc/core-linux-arm-gnueabihf": "npm:1.15.43" + "@swc/core-linux-arm64-gnu": "npm:1.15.43" + "@swc/core-linux-arm64-musl": "npm:1.15.43" + "@swc/core-linux-ppc64-gnu": "npm:1.15.43" + "@swc/core-linux-s390x-gnu": "npm:1.15.43" + "@swc/core-linux-x64-gnu": "npm:1.15.43" + "@swc/core-linux-x64-musl": "npm:1.15.43" + "@swc/core-win32-arm64-msvc": "npm:1.15.43" + "@swc/core-win32-ia32-msvc": "npm:1.15.43" + "@swc/core-win32-x64-msvc": "npm:1.15.43" "@swc/counter": "npm:^0.1.3" - "@swc/types": "npm:^0.1.25" + "@swc/types": "npm:^0.1.27" peerDependencies: "@swc/helpers": ">=0.5.17" dependenciesMeta: @@ -8400,7 +8444,7 @@ __metadata: peerDependenciesMeta: "@swc/helpers": optional: true - checksum: 10c0/ee33b7f776e632140505f0b5364bb7cb7bd0ddb405dc6795ded3daa8337acd845284520294a3d90cdd817e9cb108c270ab22e7ae969e17f41910f45ec9946cae + checksum: 10c0/ed586746b5a3ce104bf8137a01dace430c9ed7a4f8741cbc1e6b69e6bd15db94d2b90fc35270e95f6eb73c0fd18e0bbd6a6b08987edef27d88da6105998a8c34 languageName: node linkType: hard @@ -8420,12 +8464,21 @@ __metadata: languageName: node linkType: hard -"@swc/types@npm:^0.1.25": - version: 0.1.25 - resolution: "@swc/types@npm:0.1.25" +"@swc/plugin-emotion@npm:14.15.0": + version: 14.15.0 + resolution: "@swc/plugin-emotion@npm:14.15.0" dependencies: "@swc/counter": "npm:^0.1.3" - checksum: 10c0/847a5b20b131281f89d640a7ed4887fb65724807d53d334b230e84b98c21097aa10cd28a074f9ed287a6ce109e443dd4bafbe7dcfb62333d7806c4ea3e7f8aca + checksum: 10c0/df88c872a2ef6c38548b0ce44493294fd1e677fcb02e59203cb4ea59639a8bd83c1d8c6118717f6510860de89fdf0f06e8104c0063c7965defc6b426dc20aa05 + languageName: node + linkType: hard + +"@swc/types@npm:^0.1.27": + version: 0.1.28 + resolution: "@swc/types@npm:0.1.28" + dependencies: + "@swc/counter": "npm:^0.1.3" + checksum: 10c0/7f2e959a7ee000ec4216acc6b7634e2d2fbe404b6ad3adf72bb91970a67359d7d429f60556342784dbe66912c7c987426683159e749332581a87e04de0524357 languageName: node linkType: hard @@ -8566,11 +8619,11 @@ __metadata: linkType: hard "@tybys/wasm-util@npm:^0.10.0, @tybys/wasm-util@npm:^0.10.1, @tybys/wasm-util@npm:^0.10.3": - version: 0.10.3 - resolution: "@tybys/wasm-util@npm:0.10.3" + version: 0.10.4 + resolution: "@tybys/wasm-util@npm:0.10.4" dependencies: tslib: "npm:^2.4.0" - checksum: 10c0/fd2bd2a79c6cd8c79ed1cf7a0fa375c64589264c88a27acaf9756d556b453ea222b62a4f68dd2fbb8b3a78b6bab3b1f4fb2431b6afc6aeda8344b53a521a1cd3 + checksum: 10c0/27947f254efa3f2bc41f47040f57f41c246200c6439a9fd54c69f50940e320022c320275f138e30b543ee81ce69593905dfa7ba0831577ab636f829aafa70701 languageName: node linkType: hard @@ -8892,11 +8945,11 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:^24.9.2": - version: 24.13.3 - resolution: "@types/node@npm:24.13.3" + version: 24.13.5 + resolution: "@types/node@npm:24.13.5" dependencies: undici-types: "npm:~7.18.0" - checksum: 10c0/a5bc08f49b9581dcdca90e02cd77197a3c799840807664942e5cd5161a553d4d2ae8064f7e3294410d748d7d098b5c1848be7fa50c06f29c4193ab16be4e59eb + checksum: 10c0/f6c7f564e7b16670bc72ce119f2aaba0f6d6ebb886c13d8cd3656a96e4825d91d826be3d0995fc776df4e19eceb4d3074e5e18d54ce1aebd3f6e0ba12b9108cb languageName: node linkType: hard @@ -9198,9 +9251,9 @@ __metadata: linkType: hard "@ungap/structured-clone@npm:^1.0.0, @ungap/structured-clone@npm:^1.2.0, @ungap/structured-clone@npm:^1.3.0": - version: 1.3.3 - resolution: "@ungap/structured-clone@npm:1.3.3" - checksum: 10c0/b199e280ee06e9c447e0ccd38df60a65c2b2c13d3c77af50b1e6d77230aee1ea7da309d7b80c5a4850c8e22e4eee9e4b2813c6a33f8c360560d7f2e99a9f6e8f + version: 1.4.0 + resolution: "@ungap/structured-clone@npm:1.4.0" + checksum: 10c0/be74a389850d02901c836c07f10c1070d7604dab4070ba3c4b77c91665b90b4175d9f186189a02a399cf054fc051d3251418238564a4491d0164969e05c802a2 languageName: node linkType: hard @@ -9352,6 +9405,18 @@ __metadata: languageName: node linkType: hard +"@vitejs/plugin-react-swc@npm:4.3.0": + version: 4.3.0 + resolution: "@vitejs/plugin-react-swc@npm:4.3.0" + dependencies: + "@rolldown/pluginutils": "npm:1.0.0-rc.7" + "@swc/core": "npm:^1.15.11" + peerDependencies: + vite: ^4 || ^5 || ^6 || ^7 || ^8 + checksum: 10c0/36228152f549e0db226ad59a41fcd4fc3df636575637c9190d5927081162f2c0f592756aa11d4fd4a7e34c734b911b319b0e87570f73b1cd67d7a38d8cbff80d + languageName: node + linkType: hard + "@vitejs/plugin-react@npm:^5.0.0, @vitejs/plugin-react@npm:^5.2.0": version: 5.2.0 resolution: "@vitejs/plugin-react@npm:5.2.0" @@ -10399,14 +10464,14 @@ __metadata: linkType: hard "astro-expressive-code@npm:^0.44.0": - version: 0.44.1 - resolution: "astro-expressive-code@npm:0.44.1" + version: 0.44.2 + resolution: "astro-expressive-code@npm:0.44.2" dependencies: - rehype-expressive-code: "npm:^0.44.1" + rehype-expressive-code: "npm:^0.44.2" url-extras: "npm:^0.1.0" peerDependencies: astro: ^4.0.0-beta || ^5.0.0-beta || ^3.3.0 || ^6.0.0-beta || ^7.0.0 - checksum: 10c0/52d57b7d0b8b0001a51e55f37eb82ade6dea93c53ca1455930c21b89f6e245a3e2660da75fbe924ea019f403cc2648675772ac0352f3a92f5486564e79a54a41 + checksum: 10c0/b91abdd27f6954c9a91006a65f949bb4d4376a3691acd1048400e0ac1e8bfe8d6d8be481f2fe386f1dc4120bf8d43f2267e7d93699956bb1a87a45bbf84cb5a6 languageName: node linkType: hard @@ -10422,12 +10487,12 @@ __metadata: linkType: hard "astro@npm:^7.2.6": - version: 7.2.6 - resolution: "astro@npm:7.2.6" + version: 7.3.2 + resolution: "astro@npm:7.3.2" dependencies: "@astrojs/compiler-rs": "npm:^0.4.0" - "@astrojs/internal-helpers": "npm:0.10.4" - "@astrojs/markdown-satteri": "npm:0.3.8" + "@astrojs/internal-helpers": "npm:0.11.0" + "@astrojs/markdown-satteri": "npm:0.4.1" "@astrojs/telemetry": "npm:3.3.3" "@capsizecss/unpack": "npm:^4.0.0" "@clack/prompts": "npm:^1.1.0" @@ -10444,7 +10509,7 @@ __metadata: dset: "npm:^3.1.4" es-module-lexer: "npm:^2.0.0" esbuild: "npm:^0.28.0" - find-process: "npm:^2.1.1" + find-proc: "npm:0.1.0" flattie: "npm:^1.1.1" fontace: "npm:~0.4.1" get-tsconfig: "npm:5.0.0-beta.4" @@ -10464,7 +10529,7 @@ __metadata: piccolore: "npm:^0.1.3" picomatch: "npm:^4.0.4" semver: "npm:^7.7.4" - sharp: "npm:^0.34.0 || ^0.35.0" + sharp: "npm:^0.35.4" shiki: "npm:^4.0.2" smol-toml: "npm:^1.6.0" svgo: "npm:^4.0.1" @@ -10478,9 +10543,9 @@ __metadata: vitefu: "npm:^1.1.2" xxhash-wasm: "npm:^1.1.0" yargs-parser: "npm:^22.0.0" - zod: "npm:^4.3.6" + zod: "npm:^4.5.4" peerDependencies: - "@astrojs/markdown-remark": 7.2.4 + "@astrojs/markdown-remark": ^7.3.0 dependenciesMeta: sharp: optional: true @@ -10489,7 +10554,7 @@ __metadata: optional: true bin: astro: ./bin/astro.mjs - checksum: 10c0/eaa42c42693ecca4eb4f377b9f037ff1f42cebfc218ef4922aec1b550f7031d7d2fb05ff83dc2717e01618799204ffc6a905da269c9e6c834f70042b169acd31 + checksum: 10c0/5f0d36d7f9aba7c7f7cec7147fb8a2ed39de0b9fe2695c1ade0b892272c8c6a36238fa2fc02203e955033a0ec8513adfc55f2f3fba67a0d9c0697a8b3a8ef407 languageName: node linkType: hard @@ -11090,7 +11155,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:4.1.2, chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.2, chalk@npm:~4.1.2": +"chalk@npm:4.1.2, chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -11811,6 +11876,19 @@ __metadata: languageName: node linkType: hard +"css-select@npm:^6.0.0": + version: 6.0.0 + resolution: "css-select@npm:6.0.0" + dependencies: + boolbase: "npm:^1.0.0" + css-what: "npm:^7.0.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.2.2" + nth-check: "npm:^2.1.1" + checksum: 10c0/2f63e954b8a9475f25ea3ff23d20c556a99e464113e7dff53711bc63e5b579f17ebc82fe49d6443aa65f656e25f97e2b32b9e8143181fe22758536730b6999ca + languageName: node + linkType: hard + "css-selector-parser@npm:^3.0.0": version: 3.3.0 resolution: "css-selector-parser@npm:3.3.0" @@ -11882,6 +11960,13 @@ __metadata: languageName: node linkType: hard +"css-what@npm:^7.0.0": + version: 7.0.0 + resolution: "css-what@npm:7.0.0" + checksum: 10c0/590329e773d8103dcc4f2aefa48d824d5b934b53baae7d8bcc3b61f0a917a0d6b6a1154d7319c6416421e7eb3b1c94704ec21924c485f4b174f0218416211fd9 + languageName: node + linkType: hard + "css.escape@npm:^1.5.1": version: 1.5.1 resolution: "css.escape@npm:1.5.1" @@ -12246,9 +12331,9 @@ __metadata: linkType: hard "devalue@npm:^5.8.1": - version: 5.9.1 - resolution: "devalue@npm:5.9.1" - checksum: 10c0/051254fbd21cd3ee90de325e038a76ea84d2102d27344043a0f861c7d5c8212dbda63979f053ac2d627d83cf33c42b62d301b0b82b4e6a4c6ea539d8feba87e7 + version: 5.9.2 + resolution: "devalue@npm:5.9.2" + checksum: 10c0/06ee48d3a69a2f77dee7867be4885b965d10592cd7082a19e885a81bc552548780564ea244ecc77e70a91c41bea7086a473b85120d73bfa1737c801a3797e6b5 languageName: node linkType: hard @@ -12389,14 +12474,14 @@ __metadata: languageName: node linkType: hard -"domutils@npm:^3.0.1, domutils@npm:^3.1.0": - version: 3.1.0 - resolution: "domutils@npm:3.1.0" +"domutils@npm:^3.0.1, domutils@npm:^3.1.0, domutils@npm:^3.2.2": + version: 3.2.2 + resolution: "domutils@npm:3.2.2" dependencies: dom-serializer: "npm:^2.0.0" domelementtype: "npm:^2.3.0" domhandler: "npm:^5.0.3" - checksum: 10c0/342d64cf4d07b8a0573fb51e0a6312a88fb520c7fefd751870bf72fa5fc0f2e0cb9a3958a573610b1d608c6e2a69b8e9b4b40f0bfb8f87a71bce4f180cca1887 + checksum: 10c0/47938f473b987ea71cd59e59626eb8666d3aa8feba5266e45527f3b636c7883cca7e582d901531961f742c519d7514636b7973353b648762b2e3bedbf235fada languageName: node linkType: hard @@ -13470,12 +13555,12 @@ __metadata: linkType: hard "estree-util-scope@npm:^1.0.0": - version: 1.0.0 - resolution: "estree-util-scope@npm:1.0.0" + version: 1.0.1 + resolution: "estree-util-scope@npm:1.0.1" dependencies: "@types/estree": "npm:^1.0.0" devlop: "npm:^1.0.0" - checksum: 10c0/ef8a573cc899277c613623a1722f630e2163abbc6e9e2f49e758c59b81b484e248b585df6df09a38c00fbfb6390117997cc80c1347b7a86bc1525d9e462b60d5 + checksum: 10c0/7b70bc4cc0f29a765c3e7d97bdc9e7fa69aa29676113e491556204186884e131123567880f5f3c4f6a09ae84bb5d9928dd2b5b57bb907189113f3a36a594f8b8 languageName: node linkType: hard @@ -13651,15 +13736,15 @@ __metadata: languageName: node linkType: hard -"expressive-code@npm:^0.44.1": - version: 0.44.1 - resolution: "expressive-code@npm:0.44.1" +"expressive-code@npm:^0.44.2": + version: 0.44.2 + resolution: "expressive-code@npm:0.44.2" dependencies: - "@expressive-code/core": "npm:^0.44.1" - "@expressive-code/plugin-frames": "npm:^0.44.1" - "@expressive-code/plugin-shiki": "npm:^0.44.1" - "@expressive-code/plugin-text-markers": "npm:^0.44.1" - checksum: 10c0/ca09029718c687bfa494f095a0cc78b5981adc1e19d89a2740b2b7e07b326b205371018d894bfe8abe477cf842b015ef78367ecd575cbb8f2defd6d4910a7967 + "@expressive-code/core": "npm:^0.44.2" + "@expressive-code/plugin-frames": "npm:^0.44.2" + "@expressive-code/plugin-shiki": "npm:^0.44.2" + "@expressive-code/plugin-text-markers": "npm:^0.44.2" + checksum: 10c0/9b902bd056bff8738899c1660c66936f11409532a59890fa2f8ba4e80942e6f3b78aa8c817efcf734c5713da73037b854019effd4d56e29837e3c743f8a024a7 languageName: node linkType: hard @@ -13894,16 +13979,10 @@ __metadata: languageName: node linkType: hard -"find-process@npm:^2.1.1": - version: 2.1.1 - resolution: "find-process@npm:2.1.1" - dependencies: - chalk: "npm:~4.1.2" - commander: "npm:^14.0.3" - loglevel: "npm:^1.9.2" - bin: - find-process: dist/cjs/bin/find-process.js - checksum: 10c0/9ae76be1140c6ad676a43e6bbdb7133a0c79a5844393dec2db8e0b55f65edf1ff689a8f59c3532a5810b7517510a41ed31e186ebd23776ad6a24f82737817a30 +"find-proc@npm:0.1.0": + version: 0.1.0 + resolution: "find-proc@npm:0.1.0" + checksum: 10c0/5fde77ff99037cc7a06eecf7b2e586062239d0b101ea89e694123b319ef891ecba50af2a53093ea9e6cf6689164135b9379f3566daaac17ae4265b2f31f0998b languageName: node linkType: hard @@ -15234,14 +15313,14 @@ __metadata: linkType: hard "i18next@npm:^26.0.7": - version: 26.4.0 - resolution: "i18next@npm:26.4.0" + version: 26.4.2 + resolution: "i18next@npm:26.4.2" peerDependencies: typescript: ^5 || ^6 || ^7 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/3edc8b329e61f627278b83668fae9c68d9d5d187fac9d96403b3e69f7afa42cfb7bce8d5bec345dde082483cb57528a837bb2ea3f2a9d377ff23c2b86d6afdcd + checksum: 10c0/f2c9613e03e09e56a84aee939d8fbe3442a58622915e11f97e47f9ab358dfa65be783230b37a21483152711f786fccfe697d7f5ea9269c54f16179dc59960e4b languageName: node linkType: hard @@ -16553,13 +16632,13 @@ __metadata: linkType: hard "js-yaml@npm:^4.0.0, js-yaml@npm:^4.1.0, js-yaml@npm:^4.1.1, js-yaml@npm:^4.3.0": - version: 4.3.1 - resolution: "js-yaml@npm:4.3.1" + version: 4.3.2 + resolution: "js-yaml@npm:4.3.2" dependencies: argparse: "npm:^2.0.1" bin: js-yaml: bin/js-yaml.js - checksum: 10c0/13c500ca322e0c3f8c81686e6ecda96d2ea37b45247a420c17c7db36932d6965cc27391abc2d1a104501600e7f0d947a5f8b7be6db619c4fefa87901b3512807 + checksum: 10c0/dedd34c2e8fef1d504687f1bc94ed0ee1311a1f78770fa2800352c6d59c635ccf555009d74e9afe529ae62199da2b1ccef30e53dc84dcd8d2d8187c22574bc97 languageName: node linkType: hard @@ -17105,13 +17184,6 @@ __metadata: languageName: node linkType: hard -"loglevel@npm:^1.9.2": - version: 1.9.2 - resolution: "loglevel@npm:1.9.2" - checksum: 10c0/1e317fa4648fe0b4a4cffef6de037340592cee8547b07d4ce97a487abe9153e704b98451100c799b032c72bb89c9366d71c9fb8192ada8703269263ae77acdc7 - languageName: node - linkType: hard - "long-timeout@npm:0.1.1": version: 0.1.1 resolution: "long-timeout@npm:0.1.1" @@ -17218,22 +17290,22 @@ __metadata: linkType: hard "magic-string@npm:^1.0.0": - version: 1.2.2 - resolution: "magic-string@npm:1.2.2" + version: 1.4.1 + resolution: "magic-string@npm:1.4.1" dependencies: - "@jridgewell/sourcemap-codec": "npm:^1.5.5" - checksum: 10c0/79eddeaf22fa15a227145105c36dc507e67b9fa147750b7abfe35e533ee133085ce40a05c09dd0a49cccd3e8813dc01f1367589fe35e012295e5ffe94122389c + "@jridgewell/sourcemap-codec": "npm:^1.6.0" + checksum: 10c0/d5162ed2cef7ffa4ee5bcf44fbaba3a814f65b9919f0f3eba43076fda4223161b1064779da32901c3d1f157e7bbc0b6dd973e06c7856e550424f5e73e9217f0a languageName: node linkType: hard "magicast@npm:^0.5.2": - version: 0.5.4 - resolution: "magicast@npm:0.5.4" + version: 0.5.5 + resolution: "magicast@npm:0.5.5" dependencies: "@babel/parser": "npm:^7.29.7" "@babel/types": "npm:^7.29.7" source-map-js: "npm:^1.2.1" - checksum: 10c0/f6a3b33d1c994cace3999fc96876a9fd06429deff8266563ccdc1d731c9edc4e1fb59d724128d7d4f3382eb457cd5a39ae1ec7b1e1864e068297ee2a30c12a3d + checksum: 10c0/d27e94cd1e85f1736f97ab0c6e542170a818c7e573261722d056b3ec4a520e16d836ce4c6b0cd3dd215b1171d83592d48a3736f3da5997a55629a0de05f66e7d languageName: node linkType: hard @@ -17804,15 +17876,15 @@ __metadata: linkType: hard "micromark-extension-gfm-table@npm:^2.0.0": - version: 2.1.1 - resolution: "micromark-extension-gfm-table@npm:2.1.1" + version: 2.1.2 + resolution: "micromark-extension-gfm-table@npm:2.1.2" dependencies: devlop: "npm:^1.0.0" micromark-factory-space: "npm:^2.0.0" micromark-util-character: "npm:^2.0.0" micromark-util-symbol: "npm:^2.0.0" micromark-util-types: "npm:^2.0.0" - checksum: 10c0/04bc00e19b435fa0add62cd029d8b7eb6137522f77832186b1d5ef34544a9bd030c9cf85e92ddfcc5c31f6f0a58a43d4b96dba4fc21316037c734630ee12c912 + checksum: 10c0/cb373e2a1df6700a884b3fc85bdf47fee1dd06664e72cf866dd1e5828f017517cbc3e3a58b9256d6b5c5a21b067151806afbf780188c47d2fc027004ea3ab07c languageName: node linkType: hard @@ -18798,7 +18870,7 @@ __metadata: languageName: node linkType: hard -"nth-check@npm:^2.0.0, nth-check@npm:^2.0.1": +"nth-check@npm:^2.0.0, nth-check@npm:^2.0.1, nth-check@npm:^2.1.1": version: 2.1.1 resolution: "nth-check@npm:2.1.1" dependencies: @@ -19317,11 +19389,11 @@ __metadata: linkType: hard "p-limit@npm:^7.3.0": - version: 7.3.1 - resolution: "p-limit@npm:7.3.1" + version: 7.3.2 + resolution: "p-limit@npm:7.3.2" dependencies: yocto-queue: "npm:^1.2.1" - checksum: 10c0/49b7d7fcc244d4659fa3b260c7b4e632bc72333c60e76e4cd24c7befdeb9b8e22da644e5064e83df9e2ded75245e3e3b9df0e9cf8500b08db8ebf58ac18c6764 + checksum: 10c0/55c1c69a528e97a4713cd68b900c100931d1e23d6fd4f46ac7aba17f6a999819393b3121e1000ec8b8fb30b89a94aa3b2295a5b4c104c371d3a81b4e4198ffab languageName: node linkType: hard @@ -19379,9 +19451,9 @@ __metadata: linkType: hard "p-timeout@npm:^7.0.0": - version: 7.0.1 - resolution: "p-timeout@npm:7.0.1" - checksum: 10c0/87d96529d1096d506607218dba6f9ec077c6dbedd0c2e2788c748e33bcd05faae8a81009fd9d22ec0b3c95fc83f4717306baba223f6e464737d8b99294c3e863 + version: 7.0.2 + resolution: "p-timeout@npm:7.0.2" + checksum: 10c0/26595bbda27361a15231a82d8d3ef4f277bb3e9647aaa4a554b90012d03d22aaf28165b60afffe9425fb1326bd40b93f145d76eb23adb6b76d07d5f5d4c7964a languageName: node linkType: hard @@ -19651,7 +19723,7 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^4.0.2, picomatch@npm:^4.0.3, picomatch@npm:^4.0.4, picomatch@npm:^4.0.5, picomatch@npm:^4.0.7": +"picomatch@npm:^4.0.2, picomatch@npm:^4.0.3, picomatch@npm:^4.0.4, picomatch@npm:^4.0.7": version: 4.0.7 resolution: "picomatch@npm:4.0.7" checksum: 10c0/beb6ae02c43ae44e84883b90830196d9046b1726ead292adcf7f57945e0bb0d992d68563d87e03b484b6f3c9a5c6defda7523477f047d7f0e663f126cc01787f @@ -19857,7 +19929,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.38, postcss@npm:^8.5.26, postcss@npm:^8.5.6": +"postcss@npm:^8.4.38, postcss@npm:^8.5.28, postcss@npm:^8.5.6": version: 8.5.28 resolution: "postcss@npm:8.5.28" dependencies: @@ -20840,12 +20912,12 @@ __metadata: languageName: node linkType: hard -"rehype-expressive-code@npm:^0.44.1": - version: 0.44.1 - resolution: "rehype-expressive-code@npm:0.44.1" +"rehype-expressive-code@npm:^0.44.2": + version: 0.44.2 + resolution: "rehype-expressive-code@npm:0.44.2" dependencies: - expressive-code: "npm:^0.44.1" - checksum: 10c0/7139dcb93dfc479225612ac51d1d7ad9b16e295eadbae4fecd697ab5f6f497dfb2d03317dd7b52a4a71691a8a88b7f23a7d0e216195ca6065b761a4958ae33c9 + expressive-code: "npm:^0.44.2" + checksum: 10c0/19b9b613e7738a1655b030a10c452bc01b6782e5f92b7d3fbae677abd08a2dbb4d7c5e77ae577a17fdf7a1ff68b5593476e9637d1ff34ce26f0efa92855ab2ee languageName: node linkType: hard @@ -21278,26 +21350,26 @@ __metadata: languageName: node linkType: hard -"rolldown@npm:~1.2.4, rolldown@npm:~1.2.7": - version: 1.2.8 - resolution: "rolldown@npm:1.2.8" - dependencies: - "@oxc-project/types": "npm:=0.149.0" - "@rolldown/binding-android-arm-eabi": "npm:1.2.8" - "@rolldown/binding-android-arm64": "npm:1.2.8" - "@rolldown/binding-darwin-arm64": "npm:1.2.8" - "@rolldown/binding-darwin-x64": "npm:1.2.8" - "@rolldown/binding-freebsd-x64": "npm:1.2.8" - "@rolldown/binding-linux-arm-gnueabihf": "npm:1.2.8" - "@rolldown/binding-linux-arm64-gnu": "npm:1.2.8" - "@rolldown/binding-linux-arm64-musl": "npm:1.2.8" - "@rolldown/binding-linux-ppc64-gnu": "npm:1.2.8" - "@rolldown/binding-linux-s390x-gnu": "npm:1.2.8" - "@rolldown/binding-linux-x64-gnu": "npm:1.2.8" - "@rolldown/binding-linux-x64-musl": "npm:1.2.8" - "@rolldown/binding-openharmony-arm64": "npm:1.2.8" - "@rolldown/binding-win32-arm64-msvc": "npm:1.2.8" - "@rolldown/binding-win32-x64-msvc": "npm:1.2.8" +"rolldown@npm:~1.2.6, rolldown@npm:~1.2.7": + version: 1.2.9 + resolution: "rolldown@npm:1.2.9" + dependencies: + "@oxc-project/types": "npm:=0.150.0" + "@rolldown/binding-android-arm-eabi": "npm:1.2.9" + "@rolldown/binding-android-arm64": "npm:1.2.9" + "@rolldown/binding-darwin-arm64": "npm:1.2.9" + "@rolldown/binding-darwin-x64": "npm:1.2.9" + "@rolldown/binding-freebsd-x64": "npm:1.2.9" + "@rolldown/binding-linux-arm-gnueabihf": "npm:1.2.9" + "@rolldown/binding-linux-arm64-gnu": "npm:1.2.9" + "@rolldown/binding-linux-arm64-musl": "npm:1.2.9" + "@rolldown/binding-linux-ppc64-gnu": "npm:1.2.9" + "@rolldown/binding-linux-s390x-gnu": "npm:1.2.9" + "@rolldown/binding-linux-x64-gnu": "npm:1.2.9" + "@rolldown/binding-linux-x64-musl": "npm:1.2.9" + "@rolldown/binding-openharmony-arm64": "npm:1.2.9" + "@rolldown/binding-win32-arm64-msvc": "npm:1.2.9" + "@rolldown/binding-win32-x64-msvc": "npm:1.2.9" "@rolldown/pluginutils": "npm:^1.0.0" dependenciesMeta: "@rolldown/binding-android-arm-eabi": @@ -21332,7 +21404,7 @@ __metadata: optional: true bin: rolldown: ./bin/cli.mjs - checksum: 10c0/5a9c6b30a7ef0af257a963e6b0b95d5a60b23512b7dbcca617273bd63fb0892b88be6b33dc9a6cb66350f47d260eff6456af0b7afef34898767f3527ce0d967d + checksum: 10c0/701019ab29fab27e5465b11ec482eb3f7e87766f9ecbbd618d3d26821437eb84fa9e852d1cdef41c4e2e525904e6a9d3974ede9fbbdc887c9da9a3981bf8946c languageName: node linkType: hard @@ -21630,7 +21702,7 @@ __metadata: languageName: node linkType: hard -"sax@npm:^1.4.1, sax@npm:^1.5.0": +"sax@npm:1.6.1, sax@npm:^1.4.1": version: 1.6.1 resolution: "sax@npm:1.6.1" checksum: 10c0/c91a71043d60da50fdf1e2cee936fc7ad4c9376afb8d1022aef5655f279433640859ec06b3b49abfcbe578fc7da2828cc1661e45aaedf835f5393496193437fa @@ -21815,36 +21887,36 @@ __metadata: languageName: node linkType: hard -"sharp@npm:^0.34.0 || ^0.35.0": - version: 0.35.3 - resolution: "sharp@npm:0.35.3" +"sharp@npm:^0.35.4": + version: 0.35.4 + resolution: "sharp@npm:0.35.4" dependencies: "@img/colour": "npm:^1.1.0" - "@img/sharp-darwin-arm64": "npm:0.35.3" - "@img/sharp-darwin-x64": "npm:0.35.3" - "@img/sharp-freebsd-wasm32": "npm:0.35.3" - "@img/sharp-libvips-darwin-arm64": "npm:1.3.2" - "@img/sharp-libvips-darwin-x64": "npm:1.3.2" - "@img/sharp-libvips-linux-arm": "npm:1.3.2" - "@img/sharp-libvips-linux-arm64": "npm:1.3.2" - "@img/sharp-libvips-linux-ppc64": "npm:1.3.2" - "@img/sharp-libvips-linux-riscv64": "npm:1.3.2" - "@img/sharp-libvips-linux-s390x": "npm:1.3.2" - "@img/sharp-libvips-linux-x64": "npm:1.3.2" - "@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.2" - "@img/sharp-libvips-linuxmusl-x64": "npm:1.3.2" - "@img/sharp-linux-arm": "npm:0.35.3" - "@img/sharp-linux-arm64": "npm:0.35.3" - "@img/sharp-linux-ppc64": "npm:0.35.3" - "@img/sharp-linux-riscv64": "npm:0.35.3" - "@img/sharp-linux-s390x": "npm:0.35.3" - "@img/sharp-linux-x64": "npm:0.35.3" - "@img/sharp-linuxmusl-arm64": "npm:0.35.3" - "@img/sharp-linuxmusl-x64": "npm:0.35.3" - "@img/sharp-webcontainers-wasm32": "npm:0.35.3" - "@img/sharp-win32-arm64": "npm:0.35.3" - "@img/sharp-win32-ia32": "npm:0.35.3" - "@img/sharp-win32-x64": "npm:0.35.3" + "@img/sharp-darwin-arm64": "npm:0.35.4" + "@img/sharp-darwin-x64": "npm:0.35.4" + "@img/sharp-freebsd-wasm32": "npm:0.35.4" + "@img/sharp-libvips-darwin-arm64": "npm:1.3.3" + "@img/sharp-libvips-darwin-x64": "npm:1.3.3" + "@img/sharp-libvips-linux-arm": "npm:1.3.3" + "@img/sharp-libvips-linux-arm64": "npm:1.3.3" + "@img/sharp-libvips-linux-ppc64": "npm:1.3.3" + "@img/sharp-libvips-linux-riscv64": "npm:1.3.3" + "@img/sharp-libvips-linux-s390x": "npm:1.3.3" + "@img/sharp-libvips-linux-x64": "npm:1.3.3" + "@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.3" + "@img/sharp-libvips-linuxmusl-x64": "npm:1.3.3" + "@img/sharp-linux-arm": "npm:0.35.4" + "@img/sharp-linux-arm64": "npm:0.35.4" + "@img/sharp-linux-ppc64": "npm:0.35.4" + "@img/sharp-linux-riscv64": "npm:0.35.4" + "@img/sharp-linux-s390x": "npm:0.35.4" + "@img/sharp-linux-x64": "npm:0.35.4" + "@img/sharp-linuxmusl-arm64": "npm:0.35.4" + "@img/sharp-linuxmusl-x64": "npm:0.35.4" + "@img/sharp-webcontainers-wasm32": "npm:0.35.4" + "@img/sharp-win32-arm64": "npm:0.35.4" + "@img/sharp-win32-ia32": "npm:0.35.4" + "@img/sharp-win32-x64": "npm:0.35.4" detect-libc: "npm:^2.1.2" semver: "npm:^7.8.5" dependenciesMeta: @@ -21901,7 +21973,7 @@ __metadata: peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/d99d60fc716aacbf42fcb0eb6d129142e0912eb23310adf48bc94e6989e27c838c5b5f507b928c723c72d265f9ceea3d4b1207e8fd5929797b23005663ce1d07 + checksum: 10c0/dbcc0909200cbff98e82805c86085b94afbd45f373897a04b21e52e9bbc1671dc64970350dd3cb6b2d0970f3444be7100d728005dc6620e39b599269ed7e15eb languageName: node linkType: hard @@ -22080,7 +22152,8 @@ __metadata: "@storybook/react-vite": "npm:10.3.3" "@svgr/cli": "npm:5.5.0" "@swc-node/register": "npm:^1.11.1" - "@swc/core": "npm:^1.15.18" + "@swc/core": "npm:1.15.43" + "@swc/plugin-emotion": "npm:14.15.0" "@testing-library/dom": "npm:^10.4.1" "@testing-library/jest-dom": "npm:^7.0.1" "@testing-library/react": "npm:^16.0.0" @@ -22099,6 +22172,7 @@ __metadata: "@typescript-eslint/parser": "npm:^8.57.0" "@vidstack/react": "npm:^1.12.12" "@vitejs/plugin-react": "npm:^5.0.0" + "@vitejs/plugin-react-swc": "npm:4.3.0" "@vitest/browser": "npm:^3.2.4" babel-jest: "npm:30.4.1" babel-plugin-macros: "npm:^3.0.1" @@ -22499,13 +22573,6 @@ __metadata: languageName: node linkType: hard -"stream-replace-string@npm:^2.0.0": - version: 2.0.0 - resolution: "stream-replace-string@npm:2.0.0" - checksum: 10c0/6cdf6108c57a869c1282dece0728bd7a8e314855bee71992436460192cdf46b3c976451e1e114716af209b2bfefa0e7e4581ca0eebc330d9dfcde341a72d50af - languageName: node - linkType: hard - "streamroller@npm:^3.1.5": version: 3.1.5 resolution: "streamroller@npm:3.1.5" @@ -22907,19 +22974,19 @@ __metadata: linkType: hard "svgo@npm:^4.0.1": - version: 4.0.2 - resolution: "svgo@npm:4.0.2" + version: 4.1.0 + resolution: "svgo@npm:4.1.0" dependencies: commander: "npm:^11.1.0" - css-select: "npm:^5.1.0" + css-select: "npm:^6.0.0" css-tree: "npm:^3.0.1" - css-what: "npm:^6.1.0" + css-what: "npm:^7.0.0" csso: "npm:^5.0.5" picocolors: "npm:^1.1.1" - sax: "npm:^1.5.0" + sax: "npm:1.6.1" bin: - svgo: ./bin/svgo.js - checksum: 10c0/d58c9446d2701dd57ef62a29b4299b157cfc32e2282f82fc68dd7cdca2e1efdf0d8bb0fb30ba0499f322d20b6304be277ffbc60a6b6a75489fa30c5300694b9a + svgo: bin/svgo.js + checksum: 10c0/2c6dc6975d98ead8fd1982f9abd6d9bc9a0b9d1a00ef9781c1c9f900af2f64f4d5d7c9af4051504bdf0e111eadc3be9b31984c5c49320df74704d995e37fac4b languageName: node linkType: hard @@ -23733,9 +23800,9 @@ __metadata: linkType: hard "undici@npm:^8.0.0": - version: 8.10.0 - resolution: "undici@npm:8.10.0" - checksum: 10c0/37ae2b1db8f65c3a003504e2040e96887b99f9db16ba07dcf49c37ed8b7f8c72f4452f2d46f52f7c9e49518fe8325e3b5e7e02ac3a2424886bd67d4b62a0ecab + version: 8.10.2 + resolution: "undici@npm:8.10.2" + checksum: 10c0/66d7fc69149207cab570d6abbc9e965b6afe1ae889a7d46945b431165c973d6a56f3dd8b70a856e7ae1e550b6366a1cde6f06e68640587f0dadca38de72995ee languageName: node linkType: hard @@ -24463,18 +24530,18 @@ __metadata: linkType: hard "vite@npm:^8.0.13": - version: 8.2.2 - resolution: "vite@npm:8.2.2" + version: 8.3.0 + resolution: "vite@npm:8.3.0" dependencies: fsevents: "npm:~2.3.3" lightningcss: "npm:^1.33.0" - picomatch: "npm:^4.0.5" - postcss: "npm:^8.5.26" - rolldown: "npm:~1.2.4" + picomatch: "npm:^4.0.7" + postcss: "npm:^8.5.28" + rolldown: "npm:~1.2.6" tinyglobby: "npm:^0.2.17" peerDependencies: "@types/node": ^20.19.0 || >=22.12.0 - "@vitejs/devtools": ^0.4.0 || ^0.5.0 + "@vitejs/devtools": ^0.7.1 esbuild: ^0.27.0 || ^0.28.0 jiti: ">=1.21.0" less: ^4.0.0 @@ -24515,7 +24582,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10c0/94cbbbdc38ad500dcb86b6202ddd14aa41d05c80739766cada9bbe250b410d1a27be433c9c491ed39744019471ac1e27a59908616a88c42f9787bdb6bdca49d2 + checksum: 10c0/28d9a1c8b5018a865b8d8b2330859b11b035c3c578349d6ef0fc4a69b7a99460fc65aff75926d2ac18a7b217cd9a847901e2f7bcb32875f37319ccd81cd9064a languageName: node linkType: hard @@ -25215,10 +25282,10 @@ __metadata: languageName: node linkType: hard -"zod@npm:^4.3.6": - version: 4.4.3 - resolution: "zod@npm:4.4.3" - checksum: 10c0/7ea31b558e88f9faf44f31dd185e2e1cbf51fed3081787fb96cc2534749b50c0acfc6da7f0922a7353ed092dd358c7d50c28ea96c94d04af64191bd33152eca3 +"zod@npm:^4.3.6, zod@npm:^4.5.4": + version: 4.6.5 + resolution: "zod@npm:4.6.5" + checksum: 10c0/32eb6c5e98becbe045675b2141c3611451c16ba567f9779231d79af41c4d651ca1c22f154aef7e6c6e77b929f23e43f1154ca05b82e119e922353725d6776af5 languageName: node linkType: hard