@leabankab/component-library 8.11.0 → 8.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fe73cf6: - New import path `@leabankab/component-library/next-intl`, for apps that use next-intl (`^4`, an optional peer). `LeaIntlProvider` sets the library's language and country from next-intl's locale, so an app no longer maps its locale to a `Language` or renders `LeaProvider` and `CountryProvider` itself. `useTexts` reads the app's own texts, kept beside the component and checked with `satisfies Texts`: each text must have every language of the locales the app declares to next-intl, so a text with only Norwegian in an app that also has Swedish and Finnish doesn't compile. See Docs → Translations.
8
+ - New import path `@leabankab/component-library/next-intl/server` with `getTexts`, the same for server components.
9
+ - New `toLanguage(locale)` in the main entry: the library language for a locale code (`nb` and `nb-NO` are `"no"`, `sv` is `"se"`, `fi-FI` is `"fi"`).
10
+
3
11
  ## 8.11.0
4
12
 
5
13
  ### Minor Changes