Skip to content

v11.2.0

Choose a tag to compare

@benjamindehli benjamindehli released this 08 Jun 16:17
· 12 commits to master since this release

Refactors Dialog close button, enhances Table sorting, and streamlines theme handling.

This update overhauls the Dialog component's close button for improved styling flexibility and adjusts its content overflow. It also introduces a themeId prop for more explicit custom theme color application and adds default sort configuration to the Table component. The DiBK Nireg theme and its associated logo asset have been removed from the Storybook and codebase.

Changes

  • Dialog Component: Replaced the generic Button component with a custom-styled <button/> for the close functionality, introducing a closeButton prop (default true). Modified DialogContent to use overflow: hidden instead of auto. Added new SCSS for close button styling and positioning, including responsive adjustments and isSidebar variations.
  • Table Component: Added a defaultSort prop to TableProps allowing initial sorting configuration (column key and direction). The component now applies this default sort on mount if provided and valid.
  • Theme Management: Introduced a themeId prop to Theme and ThemeProvider components, enabling direct specification of custom theme colors by ID. Added a getCustomThemeForThemeId helper to retrieve theme data by ID. Modified getCssVariablesFromTheme to accept and prioritize customThemeColors for color variable generation.
  • Asset and Storybook Removal: Removed the DiBK Nireg theme option from Storybook's global argTypes and items. Deleted the dibk-logo-with-nireg-title.svg asset and removed its references (React component and URL imports) from src/icons/index.ts and src/stories/Icons.stories.tsx.

Impact

  • Behavioral Changes:
    • Dialog: The visual appearance and interactive behavior of the close button have changed. Content within the DialogContent will now be clipped (overflow: hidden) rather than showing scrollbars by default.
    • Table: Tables can now be initialized with a specific sorted column and direction, affecting the initial display of data.
    • Theme application: Theme color variables can now be applied more granularly using the new themeId prop, which takes precedence over appName for custom theme resolution if both are provided.
  • Dependencies Affected: The Dialog component no longer implicitly depends on the Button component for its close action. New internal helper functions were added for theme resolution.
  • Breaking Changes: Consumers directly importing or using the DiBK Nireg theme or the DibkLogoWithNiregTitle asset will encounter build errors or runtime issues as these have been removed.
  • Performance Implications: No apparent performance implications.

What's Changed

  • Added option to set default sort direction in Table by @sonbit in #72

New Contributors

Full Changelog: v11.1.0...v11.2.0