v11.2.0
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
Buttoncomponent with a custom-styled<button/>for the close functionality, introducing acloseButtonprop (defaulttrue). ModifiedDialogContentto useoverflow: hiddeninstead ofauto. Added new SCSS for close button styling and positioning, including responsive adjustments andisSidebarvariations. - Table Component: Added a
defaultSortprop toTablePropsallowing initial sorting configuration (column key and direction). The component now applies this default sort on mount if provided and valid. - Theme Management: Introduced a
themeIdprop toThemeandThemeProvidercomponents, enabling direct specification of custom theme colors by ID. Added agetCustomThemeForThemeIdhelper to retrieve theme data by ID. ModifiedgetCssVariablesFromThemeto accept and prioritize customThemeColors for color variable generation. - Asset and Storybook Removal: Removed the
DiBK Niregtheme option from Storybook's globalargTypesanditems. Deleted thedibk-logo-with-nireg-title.svgasset and removed its references (React component and URL imports) fromsrc/icons/index.tsandsrc/stories/Icons.stories.tsx.
Impact
- Behavioral Changes:
Dialog: The visual appearance and interactive behavior of the close button have changed. Content within theDialogContentwill 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
themeIdprop, which takes precedence overappNamefor custom theme resolution if both are provided.
- Dependencies Affected: The
Dialogcomponent no longer implicitly depends on theButtoncomponent for its close action. New internal helper functions were added for theme resolution. - Breaking Changes: Consumers directly importing or using the
DiBK Niregtheme or theDibkLogoWithNiregTitleasset will encounter build errors or runtime issues as these have been removed. - Performance Implications: No apparent performance implications.
What's Changed
New Contributors
Full Changelog: v11.1.0...v11.2.0