@leabankab/component-library 8.10.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/component-library.es.js +1247 -1225
  3. package/dist/component-library.es.js.map +1 -1
  4. package/dist/component-library.umd.js +2 -2
  5. package/dist/component-library.umd.js.map +1 -1
  6. package/dist/components/animations/index.d.ts +5 -2
  7. package/dist/components/animations/loader/loader.d.ts +43 -0
  8. package/dist/components/animations/pulse-animation/pulse-animation.d.ts +21 -0
  9. package/dist/components/animations/{illustrations → status-animation}/status-animation.d.ts +7 -6
  10. package/dist/components/feedback/alert-parts.d.ts +1 -1
  11. package/dist/i18n/languages.d.ts +34 -0
  12. package/dist/index.css +1 -1
  13. package/dist/next-intl/index.d.ts +21 -0
  14. package/dist/next-intl/lea-intl-provider.d.ts +35 -0
  15. package/dist/next-intl/server.d.ts +24 -0
  16. package/dist/next-intl/texts.d.ts +77 -0
  17. package/dist/next-intl/use-texts.d.ts +28 -0
  18. package/dist/next-intl-server.mjs +11 -0
  19. package/dist/next-intl-server.mjs.map +1 -0
  20. package/dist/next-intl-texts-De3tiuSm.mjs +25 -0
  21. package/dist/next-intl-texts-De3tiuSm.mjs.map +1 -0
  22. package/dist/next-intl.mjs +37 -0
  23. package/dist/next-intl.mjs.map +1 -0
  24. package/dist/theme/tokens/text-styles.d.ts +1 -1
  25. package/package.json +15 -2
  26. package/dist/components/animations/icons/index.d.ts +0 -1
  27. package/dist/components/animations/illustrations/index.d.ts +0 -3
  28. package/dist/components/animations/illustrations/pulse-animation.d.ts +0 -16
  29. /package/dist/components/animations/{illustrations → check-animation}/check-animation.d.ts +0 -0
  30. /package/dist/components/animations/{icons → status-icon}/status-icon.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
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
+
11
+ ## 8.11.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 1bea934: - New `Loader`, the library's default loading indicator. It shows the pulse, and with `status="done"` it cross-fades into the check with its confetti. It takes `size`, `color`, `minLoadingMs`, `loadingLabel` and `doneLabel`, and announces each state to screen readers.
16
+ - `PulseAnimation` takes a `color` (`"primary"` or `"tertiary"`, default `"primary"`).
17
+ - `StatusAnimation` is deprecated: use `<Loader status={loading ? "loading" : "done"} />`, which renders the same thing. It keeps working, and its pulse now follows `color` too, so `color="tertiary"` shows a teal pulse where it used to be purple.
18
+ - In `tertiary`, the check of `CheckAnimation` and `StatusIcon` and the spinner of the pulse are dark instead of white, so they meet contrast on teal.
19
+
3
20
  ## 8.10.0
4
21
 
5
22
  ### Minor Changes