Releases: equinor/fusion-react-components
@equinor/[email protected]
Major Changes
-
15eacdf: Remove
@material-ui/stylesdependency and replace with custom JSS-based implementation for React 19 compatibility.ref: equinor/fusion-framework#3698
Breaking Changes
- Removed
@material-ui/stylesdependency - replaced with direct JSS integration - All Material-UI v4 styling APIs are now implemented internally
- No API changes - existing code should work without modifications
Added
- Custom
makeStylesimplementation using JSS directly - Custom
StylesProviderwith enhanced scope isolation via seed prefixes - Custom
ThemeProviderwith React 19 compatibility - Comprehensive test suite with Vitest (52 tests, 100% statement coverage)
- Utility modules in
src/utils/:jss-setup.ts- JSS instance configurationclass-name-generator.ts- Class name generation logicsheet-manager.ts- Stylesheet caching and managementcontexts.ts- React context definitions
- TSDoc documentation for all exported APIs
- Updated README with comprehensive documentation
Changed
- Package now uses JSS directly instead of Material-UI wrapper
- Improved TypeScript types with better inference
- Enhanced class name isolation for micro-frontend scenarios
Technical Details
- React 19 compatible (tested with React ^18 || ^19)
- Uses JSS v10 with all necessary plugins
- Maintains backward compatibility with existing API surface
- Full test coverage with Vitest and React Testing Library
- Removed
Minor Changes
-
15eacdf: Enhanced theme system with support for extending
FusionThemewith custom properties, improved nested theme composition, and comprehensive documentation.Added
- Theme Extension Support:
FusionThemenow supports extending with custom properties using generics:type MyTheme = FusionTheme<{ colors: { primary: ColorStyleProperty } }>;
- Custom Base Theme Merging:
createThemenow accepts an optionalbaseThemeparameter for merging with custom base themes:const extendedTheme = createTheme( { colors: { ui: { background__danger: newColor } } }, outerTheme, );
- Deep Merging Improvements: Enhanced
deepMergefunction properly handles nested theme properties,Recordtypes, andStylePropertyinstances - Type Exports: Explicitly exported
ThemeProviderProps,StylesProviderProps,FusionTheme,StyleDefinition, andcreateThemefor better TypeScript support - Complete TSDoc Documentation: All exported functions, types, and interfaces now have comprehensive TSDoc comments with examples, parameter descriptions, and usage patterns
- Theme Extension Storybook Story: New
ThemeExtensionstory demonstrating how to extend themes with custom properties, including step-by-step examples for type definition, theme creation, and usage withuseThemeandmakeStyles
Changed
createThemesignature now accepts optionalbaseThemeparameter (backward compatible)- Improved type inference for extended themes in
ThemeProvider,useTheme, andmakeStyles - Better handling of nested theme composition when using theme functions in nested
ThemeProvidercomponents - Storybook Stories Updated: All stories now consistently use the
.getVariable()method for accessing theme CSS values (e.g.,theme.colors.*.getVariable('color'),theme.spacing.*.getVariable('padding')). Direct usage of the.cssproperty has been replaced to ensure proper integration with Fusion design system tokens and to match the documented API usage. - README Updated: Updated all documentation examples to use correct
getVariable()API for theme properties
Technical Details
- Deep merging now correctly handles
StylePropertyinstances (replaces instead of merging) - Theme composition works correctly with nested
ThemeProvidercomponents - All types are properly exported and documented with complete TSDoc comments
- Typography properties accessed via
.style.fontSize,.style.fontWeight, etc. for proper CSS value extraction - Color properties accessed via
.getVariable('color')method to get CSS variable strings - Spacing properties accessed via
.getVariable('padding')method to get CSS variable strings makeStylesnow returnsRecord<ClassKey, string>whereClassKeyis inferred from style rules, providing type-safe access to class names when usingcreateStyles
- Theme Extension Support:
@equinor/[email protected]
Patch Changes
- Updated dependencies [15eacdf]
- Updated dependencies [15eacdf]
- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [15eacdf]
- Updated dependencies [15eacdf]
- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [15eacdf]
- Updated dependencies [15eacdf]
- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [15eacdf]
- Updated dependencies [15eacdf]
- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
-
63af0ef: fix: remove unnecessary dependencies from useEffect in Step component
This fixes potential infinite re-renders by removing handleChange, stepKey, stepKeys, and isCurrent from the useEffect dependency array, keeping only the essential 'done' dependency.
@equinor/[email protected]
Major Changes
-
fbc8188: React 19 compatibility fixes
- Fixed TypeScript errors related to React 19 type changes
- Updated
useRefcalls to provide initial values when type is explicitly specified - Fixed
HTMLDivElementtype usage to usePartial<HTMLAttributes<HTMLDivElement>> - Fixed
useFilterSelectionobservable type handling forSet<T>return type - Added proper type annotations for web components
- Updated component prop types to be compatible with React 19's stricter type checking
Reference equinor/fusion#696
Devops: AB#65644
Thanks to @AndreasPresthammer for reporting this issue!
@equinor/[email protected]
Major Changes
-
fbc8188: React 19 compatibility fixes
- Fixed TypeScript errors related to React 19 type changes
- Updated
useRefcalls to provide initial values when type is explicitly specified - Fixed
HTMLDivElementtype usage to usePartial<HTMLAttributes<HTMLDivElement>> - Fixed
useFilterSelectionobservable type handling forSet<T>return type - Added proper type annotations for web components
- Updated component prop types to be compatible with React 19's stricter type checking
Reference equinor/fusion#696
Devops: AB#65644
Thanks to @AndreasPresthammer for reporting this issue!
Patch Changes
- Updated dependencies [fbc8188]
- @equinor/[email protected]
@equinor/[email protected]
Major Changes
-
fbc8188: React 19 compatibility fixes
- Fixed TypeScript errors related to React 19 type changes
- Updated
useRefcalls to provide initial values when type is explicitly specified - Fixed
HTMLDivElementtype usage to usePartial<HTMLAttributes<HTMLDivElement>> - Fixed
useFilterSelectionobservable type handling forSet<T>return type - Added proper type annotations for web components
- Updated component prop types to be compatible with React 19's stricter type checking
Reference equinor/fusion#696
Devops: AB#65644
Thanks to @AndreasPresthammer for reporting this issue!
@equinor/[email protected]
Major Changes
-
fbc8188: React 19 compatibility fixes
- Fixed TypeScript errors related to React 19 type changes
- Updated
useRefcalls to provide initial values when type is explicitly specified - Fixed
HTMLDivElementtype usage to usePartial<HTMLAttributes<HTMLDivElement>> - Fixed
useFilterSelectionobservable type handling forSet<T>return type - Added proper type annotations for web components
- Updated component prop types to be compatible with React 19's stricter type checking
Reference equinor/fusion#696
Devops: AB#65644
Thanks to @AndreasPresthammer for reporting this issue!