@leabankab/component-library 7.1.0 → 7.2.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 (37) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/component-library.es.js +972 -878
  3. package/dist/component-library.es.js.map +1 -1
  4. package/dist/component-library.umd.js +12 -12
  5. package/dist/component-library.umd.js.map +1 -1
  6. package/dist/components/feedback/dialog.d.ts +7 -0
  7. package/dist/components/index.d.ts +1 -0
  8. package/dist/components/layout/container.d.ts +23 -0
  9. package/dist/components/layout/grid.d.ts +51 -0
  10. package/dist/components/layout/index.d.ts +4 -0
  11. package/dist/components/layout/responsive.d.ts +19 -0
  12. package/dist/components/layout/stack.d.ts +56 -0
  13. package/dist/cookie-consent/consent-dialog.d.ts +15 -0
  14. package/dist/cookie-consent/constants.d.ts +11 -0
  15. package/dist/cookie-consent/copy.d.ts +19 -0
  16. package/dist/cookie-consent/core.d.ts +36 -0
  17. package/dist/cookie-consent/domain.d.ts +15 -0
  18. package/dist/cookie-consent/index.d.ts +4 -0
  19. package/dist/cookie-consent/react.d.ts +23 -0
  20. package/dist/cookie-consent/strapi-blocks.d.ts +65 -0
  21. package/dist/cookie-consent-core-C4MP7GlV.cjs +2 -0
  22. package/dist/cookie-consent-core-C4MP7GlV.cjs.map +1 -0
  23. package/dist/cookie-consent-core-mwVmy5nZ.mjs +124 -0
  24. package/dist/cookie-consent-core-mwVmy5nZ.mjs.map +1 -0
  25. package/dist/cookie-consent-react.cjs +2 -0
  26. package/dist/cookie-consent-react.cjs.map +1 -0
  27. package/dist/cookie-consent-react.mjs +433 -0
  28. package/dist/cookie-consent-react.mjs.map +1 -0
  29. package/dist/cookie-consent.cjs +1 -0
  30. package/dist/cookie-consent.css +1 -0
  31. package/dist/cookie-consent.mjs +2 -0
  32. package/dist/index.css +1 -1
  33. package/dist/tailwind.css +193 -0
  34. package/dist/theme/index.d.ts +1 -0
  35. package/dist/theme/tokens/breakpoints.d.ts +16 -0
  36. package/dist/theme/tokens/index.d.ts +1 -0
  37. package/package.json +22 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5c6fb1a: Add a shared cookie consent module, so one consent covers every Lea Bank app on `leabank.se`, `leabank.fi`, `leabank.no` and `leabank.es`.
8
+
9
+ - **React:** `@leabankab/component-library/cookie-consent/react` exports `CookieConsentProvider` and `useCookieConsent`. The provider renders the consent settings dialog, built from the library's `Dialog`, `Accordion`, `Switch` and `Button`. It can't be dismissed until the visitor has chosen, and `openSettings` reopens it. It needs neither MUI nor `LeaProvider`.
10
+ - **Headless:** `@leabankab/component-library/cookie-consent` exports `initCookieConsent`, `getConsentState`, `setConsent`, `openCookieSettings`, `COOKIE_CONSENT_REVISION` and `COOKIE_CONSENT_CATEGORIES`, with no React and no UI.
11
+ - **Peer dependency:** `vanilla-cookieconsent` `3.1.0`, optional. It stores the choice; its own modals and stylesheet are never shown. Apps that don't import the subpaths don't need it.
12
+ - **Cookie:** `cc_cookie`, revision 3, in vanilla-cookieconsent's format. `domain` is set to the market's domain on its hosts and left unset (host-only) elsewhere, such as localhost and `*.azurewebsites.net`.
13
+ - **Copy:** Strapi Blocks rich text is rendered as React elements with a small set of tags, and links are limited to `https:`, `mailto:` and relative URLs.
14
+
15
+ Migrating an app: remove its own vanilla-cookieconsent setup and wrap it in `CookieConsentProvider`. Rename any `statistics` category to `analytics`. Visitors are asked once more after the release, because their old host-only cookie is replaced by the shared one. See Docs/Cookie Consent in Storybook.
16
+
17
+ - 5c6fb1a: Add `Dialog.Footer`: an action row placed after `Dialog.Content` that stays pinned to the bottom of the popup while the body scrolls.
18
+ - e37ed0e: Add breakpoint tokens, layout components and a Tailwind theme.
19
+
20
+ - **Breakpoints:** `breakpoints` (`sm` 600, `md` 900, `lg` 1200, `xl` 1536px) and the `Breakpoint` type are exported, and the stylesheet defines `--lea-breakpoint-*`. The values equal MUI's defaults and are now passed to `createTheme` explicitly, so nothing switches at a different width.
21
+ - **Layout:** `Stack`, `HStack`, `Grid`, `GridItem` and `Container`. They are styled by CSS Modules, render without `LeaProvider`, and take `render` to change the element. `direction`, `gap`, `columns` and `span` accept a value per breakpoint, mobile-first: `gap={{ base: 1, md: 3 }}`.
22
+ - **Tailwind:** `@leabankab/component-library/tailwind.css` is a Tailwind v4 theme that replaces Tailwind's default colours, spacing, breakpoints, radii, shadows, font sizes, font weights and easings with the Lea tokens. Import it after `tailwindcss`. The library does not depend on Tailwind. One spacing step is `0.5rem`, so `p-2` equals `spacing(2)`.
23
+
24
+ ## 7.1.1
25
+
26
+ ### Patch Changes
27
+
28
+ - ee234ec: Revert border radius on buttons
29
+
3
30
  ## 7.1.0
4
31
 
5
32
  ### Minor Changes