@leabankab/component-library 8.9.1 → 8.11.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 +24 -0
- package/dist/component-library.es.js +1572 -1565
- package/dist/component-library.es.js.map +1 -1
- package/dist/component-library.umd.js +2 -2
- package/dist/component-library.umd.js.map +1 -1
- package/dist/components/animations/index.d.ts +5 -2
- package/dist/components/animations/loader/loader.d.ts +43 -0
- package/dist/components/animations/pulse-animation/pulse-animation.d.ts +21 -0
- package/dist/components/animations/{illustrations → status-animation}/status-animation.d.ts +7 -6
- package/dist/components/feedback/alert-parts.d.ts +1 -1
- package/dist/cookie-consent/copy.d.ts +8 -2
- package/dist/cookie-consent/core.d.ts +18 -3
- package/dist/cookie-consent/react.d.ts +35 -2
- package/dist/cookie-consent-core-BYak3SKZ.cjs +2 -0
- package/dist/cookie-consent-core-BYak3SKZ.cjs.map +1 -0
- package/dist/{cookie-consent-core-lX0QAEAo.mjs → cookie-consent-core-DMnn4IZW.mjs} +25 -15
- package/dist/cookie-consent-core-DMnn4IZW.mjs.map +1 -0
- package/dist/cookie-consent-react.cjs +1 -1
- package/dist/cookie-consent-react.cjs.map +1 -1
- package/dist/cookie-consent-react.mjs +168 -151
- package/dist/cookie-consent-react.mjs.map +1 -1
- package/dist/cookie-consent.cjs +1 -1
- package/dist/cookie-consent.mjs +2 -2
- package/dist/index.css +1 -1
- package/dist/theme/tokens/text-styles.d.ts +1 -1
- package/dist/website/alert-banner/alert-banner.d.ts +21 -4
- package/dist/website.cjs +1 -1
- package/dist/website.cjs.map +1 -1
- package/dist/website.css +1 -1
- package/dist/website.mjs +12 -11
- package/dist/website.mjs.map +1 -1
- package/package.json +2 -1
- package/dist/components/animations/icons/index.d.ts +0 -1
- package/dist/components/animations/illustrations/index.d.ts +0 -3
- package/dist/components/animations/illustrations/pulse-animation.d.ts +0 -16
- package/dist/cookie-consent-core-fntGUdFt.cjs +0 -2
- package/dist/cookie-consent-core-fntGUdFt.cjs.map +0 -1
- package/dist/cookie-consent-core-lX0QAEAo.mjs.map +0 -1
- /package/dist/components/animations/{illustrations → check-animation}/check-animation.d.ts +0 -0
- /package/dist/components/animations/{icons → status-icon}/status-icon.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 8.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
- `PulseAnimation` takes a `color` (`"primary"` or `"tertiary"`, default `"primary"`).
|
|
9
|
+
- `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.
|
|
10
|
+
- 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.
|
|
11
|
+
|
|
12
|
+
## 8.10.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- 0953963: `AlertBanner` in `@leabankab/component-library/website`: the icon is now red by default, where it was the section's text colour, and the new `color` prop sets it to another status (`"warning"`, `"info"`, `"success"`) or back to the section's text colour (`"inherit"`). On a dark section (`surface` `contrast` or `contrast-accent`) the icon takes a lighter step of its colour by itself, so it stays 3:1 or more against the band. The title and the text keep the section's colour. An image passed as `icon` keeps its own colours.
|
|
17
|
+
- 6c907da: `CookieConsentProvider` in `@leabankab/component-library/cookie-consent/react` takes `onConsentChange` and `autoOpen`, and no longer opens the dialog by itself for crawlers. An app that passes neither behaves as before, the cookie and `COOKIE_CONSENT_REVISION` are unchanged, and visitors keep their consent.
|
|
18
|
+
|
|
19
|
+
- `onConsentChange?: (state: ConsentState) => void`: called once after load when there is a valid stored consent, then whenever the choice changes (the first choice, a change, or a step back to necessary only). Never with `null`, and not when the same choice is saved again. Called once per change, also under React StrictMode and when `initCookieConsent` was called elsewhere first. The latest function is the one called, so an inline arrow function is fine. An error thrown in it is reported with `reportError`, and the choice is still saved. Use it for Google Consent Mode, the dataLayer or starting analytics; render the provider through a client component of your own to pass it from a server layout.
|
|
20
|
+
- `autoOpen?: boolean`, default `true`: `false` keeps the dialog from opening by itself while the visitor has yet to choose, for example on the cookie policy page, which the intro's link opens in a new tab. Until then only necessary cookies are used. `openSettings` and `openCookieSettings` still open it, and it still can't be dismissed without a choice. When it turns `true` with no consent yet, the dialog opens.
|
|
21
|
+
- Crawlers and audit tools (a user agent with `bot`, `crawl`, `spider`, `slurp`, `teoma` or `lighthouse`) get the page without the dialog, as they did before 8.1.1. The stored consent is still read for them, and browser automation such as Playwright still gets the dialog.
|
|
22
|
+
- `useCookieConsent().consent` keeps the same object when a save doesn't change the choice, so its consumers don't re-render.
|
|
23
|
+
- `CookieConsentCopy`: `policyLinkLabel` and `policyLinkUrl` are optional and marked unused. The dialog never rendered them; the link to the cookie policy belongs in `intro`. Passing them still compiles.
|
|
24
|
+
|
|
25
|
+
See Docs/Cookie Consent.
|
|
26
|
+
|
|
3
27
|
## 8.9.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|