@leabankab/component-library 8.7.0 → 8.8.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 (39) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/component-library.es.js +27 -26
  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/form/slider.d.ts +15 -2
  7. package/dist/index.css +1 -1
  8. package/dist/website/brand-letters.d.ts +40 -0
  9. package/dist/website/calculator.d.ts +58 -0
  10. package/dist/website/carousel.d.ts +55 -0
  11. package/dist/website/cta-banner.d.ts +42 -0
  12. package/dist/website/expanding-cards-context.d.ts +8 -0
  13. package/dist/website/expanding-cards-item.d.ts +69 -0
  14. package/dist/website/expanding-cards.d.ts +48 -0
  15. package/dist/website/hero-service-grid.d.ts +52 -0
  16. package/dist/website/hero.d.ts +57 -0
  17. package/dist/website/index.d.ts +33 -0
  18. package/dist/website/navigation-grid.d.ts +39 -0
  19. package/dist/website/paragraphs.d.ts +11 -0
  20. package/dist/website/partner-list.d.ts +79 -0
  21. package/dist/website/payment-feature.d.ts +85 -0
  22. package/dist/website/promo-grid.d.ts +71 -0
  23. package/dist/website/section-header.d.ts +53 -0
  24. package/dist/website/section.d.ts +53 -0
  25. package/dist/website/service-card-grid.d.ts +33 -0
  26. package/dist/website/split-content.d.ts +69 -0
  27. package/dist/website/stats.d.ts +52 -0
  28. package/dist/website/testimonials.d.ts +100 -0
  29. package/dist/website/use-brand-letters-labels.d.ts +2 -0
  30. package/dist/website/use-carousel-labels.d.ts +6 -0
  31. package/dist/website/use-carousel.d.ts +50 -0
  32. package/dist/website/use-partner-list-labels.d.ts +6 -0
  33. package/dist/website/use-testimonials-labels.d.ts +6 -0
  34. package/dist/website.cjs +2 -0
  35. package/dist/website.cjs.map +1 -0
  36. package/dist/website.css +1 -0
  37. package/dist/website.mjs +1226 -0
  38. package/dist/website.mjs.map +1 -0
  39. package/package.json +7 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ece5674: Five more sections in `@leabankab/component-library/website`, the website's grids and lists. The main entry is unchanged.
8
+
9
+ - `NavigationGrid`: `LinkCard`s under an optional title, four columns from 1024px with the website's spans (1 + 1 + 2 for an odd number of cards, then 2 + 2), two columns from 768px, one below. Without a title there is no heading and no gap for one.
10
+ - `HeroServiceGrid`: a `FeaturedImage` with a call to action beside up to four `LinkCard`s two by two, at least 600px tall; `imagePosition` `start` / `end`.
11
+ - `ServiceCardGrid`: one to four `ServiceCard`s in the website's grid (a large and a narrow card, then a wide row or a third and two thirds); one column below 1024px.
12
+ - `PartnerList`: `PartnerRow`s sorted by name in the `LeaProvider` language, nine to a page (`pageSize`), with previous and next buttons and `PaginationDots`; `value`, `defaultValue` and `onValueChange` for the page. The new page is announced to screen readers.
13
+ - `BrandLetters`: three silent looping videos in the letters L, E and A, with a button that pauses and plays them (the website's block has none). They wait for the button under reduced motion.
14
+
15
+ The cards of the grids are the children, each put in an item of a list. New strings: "Forrige side" / "Neste side" / "Side 2 av 3" and "Spill av videoene" / "Sett videoene på pause", in Norwegian, Swedish, Finnish and Spanish.
16
+
17
+ - ced15c5: Five more components in `@leabankab/component-library/website`, the website's interactive sections, and a light-on-dark look for `Slider` in the main entry.
18
+
19
+ - `Carousel`: slides in a row that scrolls sideways, on CSS scroll snap (react-slick is not needed): 2.2 in view from 1024px, 1.15 below, as tall as the tallest. Swipe, scroll or use the arrow keys; elevated previous and next buttons and `PaginationDots` move it a place at a time, and the place it comes to rest at is announced. The edges fade into the `Section`'s colour where there is more to scroll. A region that needs a name (`aria-label` or `aria-labelledby`).
20
+ - `Testimonials`: a title and subtitle, a featured customer with a quote and a video that opens in a dialog (with controls and captions, `videoCaptions`), and the reviews (`TestimonialCard`s) in a `Carousel` named by the title. `videoPosition` `start` / `end`.
21
+ - `ExpandingCards` and `ExpandingCardsItem`: a row of photo cards in which one is open, twice as wide, with its title, text and `ActionButton`; the card the pointer or the keyboard focus moves into opens, and the last one stays open (`defaultOpen` `"first"` / `"last"`). Every card is open below 1312px. The item takes `surface` (all five), with white text on the dark ones only.
22
+ - `Calculator`: the layout of the website's savings and refinancing calculator: a `header`, a panel for the sliders (the children), the `results`, worked out by the page and announced when they change, an `action` and a `priceExample`. For the dark surfaces.
23
+ - `Slider`: `color="contrast"` for a dark surface: white text, fill and thumb, a near-black ring round the thumb and a rail that shows on black. `color="primary"` is the default and looks as before.
24
+
25
+ New strings: the carousel ("karusell", "Forrige" / "Neste", "Side 2 av 3") and the video ("Spill av video", "Video fra kunde", "Lukk video"), in Norwegian, Swedish, Finnish and Spanish.
26
+
27
+ - 3fd37e1: A new import path, `@leabankab/component-library/website`, with the sections leabank.no is built from. It is an entry of its own with its own stylesheet (`dist/website.css`, imported by the entry), so apps that don't import it load nothing more. The main entry is unchanged.
28
+
29
+ - `Section`: a band of a page in one of the five surfaces (`surface`), with `spacingTop` and `spacingBottom` (`lg` 112px, `sm` 64px, `none`; less on a phone) and the content in a column of at most 1312px, or 75 % / 60 % of it (`width`). It sets the text colour for what is inside it.
30
+ - `SectionHeader`: a centred eyebrow, title (`titleSize`), subtitle, a row of actions (only when given) and a price example.
31
+ - `Hero`: a photo band with the page title, text, action and price example on a white `Panel`.
32
+ - `CtaBanner`: a big title beside a text, a button and a price example.
33
+ - `SplitContent`: text beside a photo, with the action centred under both.
34
+ - `PromoGrid`: a `FeaturedImage` beside one or two photos and a beige block with the title in capitals.
35
+ - `Stats`: big numbers between rounded bars, each with a title and a text, as a list.
36
+ - `PaymentFeature`: payment brand logos, a title, a text and actions on a `Panel`, beside a photo.
37
+
38
+ Photos take `imageRender` for `next/image`, titles take `titleRender` for the heading level, and calls to action are elements you pass, so router links drop in.
39
+
3
40
  ## 8.7.0
4
41
 
5
42
  ### Minor Changes
@@ -2033,12 +2033,12 @@ var xr = {
2033
2033
  Input: "_Input_1ccju_31",
2034
2034
  Slider: "_Slider_1ccju_83"
2035
2035
  }, Sr = {
2036
- Control: "_Control_qg3r1_7",
2037
- Track: "_Track_qg3r1_51",
2038
- Indicator: "_Indicator_qg3r1_71",
2039
- Thumb: "_Thumb_qg3r1_87",
2040
- Range: "_Range_qg3r1_119",
2041
- HelperText: "_HelperText_qg3r1_131"
2036
+ Control: "_Control_1zreo_12",
2037
+ Track: "_Track_1zreo_56",
2038
+ Indicator: "_Indicator_1zreo_76",
2039
+ Thumb: "_Thumb_1zreo_92",
2040
+ Range: "_Range_1zreo_124",
2041
+ HelperText: "_HelperText_1zreo_136"
2042
2042
  }, Cr = (e) => /* @__PURE__ */ A(k, { children: e.children });
2043
2043
  function wr({ "aria-label": e, "aria-describedby": t }) {
2044
2044
  return /* @__PURE__ */ A(B.Control, {
@@ -4006,47 +4006,48 @@ function uo({ options: e, value: t, defaultValue: n = "", onValueChange: r, ...i
4006
4006
  });
4007
4007
  }
4008
4008
  var fo = {
4009
- Slider: "_Slider_tm1hu_10",
4010
- Header: "_Header_tm1hu_21",
4011
- Label: "_Label_tm1hu_28",
4012
- Value: "_Value_tm1hu_33"
4009
+ Slider: "_Slider_1qpll_10",
4010
+ Header: "_Header_1qpll_21",
4011
+ Label: "_Label_1qpll_28",
4012
+ Value: "_Value_1qpll_33"
4013
4013
  };
4014
4014
  //#endregion
4015
4015
  //#region src/components/form/slider.tsx
4016
- function po({ label: e, "aria-label": t, helperText: n, error: r = !1, min: i = 0, max: a = 100, format: o, locale: s, className: c, ...l }) {
4017
- let u = f(), d = f();
4016
+ function po({ label: e, "aria-label": t, helperText: n, error: r = !1, color: i = "primary", min: a = 0, max: o = 100, format: s, locale: c, className: l, ...u }) {
4017
+ let d = f(), p = f();
4018
4018
  return /* @__PURE__ */ A(oe.Root, {
4019
4019
  invalid: r,
4020
4020
  render: Cr,
4021
4021
  children: /* @__PURE__ */ j(B.Root, {
4022
- ...l,
4023
- min: i,
4024
- max: a,
4025
- format: o,
4026
- locale: s,
4027
- "aria-labelledby": e == null ? void 0 : u,
4028
- className: G(fo.Slider, c),
4022
+ ...u,
4023
+ min: a,
4024
+ max: o,
4025
+ format: s,
4026
+ locale: c,
4027
+ "aria-labelledby": e == null ? void 0 : d,
4028
+ "data-color": i,
4029
+ className: G(fo.Slider, l),
4029
4030
  children: [
4030
4031
  /* @__PURE__ */ j("div", {
4031
4032
  className: fo.Header,
4032
4033
  children: [e != null && /* @__PURE__ */ A("div", {
4033
- id: u,
4034
+ id: d,
4034
4035
  className: fo.Label,
4035
4036
  children: e
4036
4037
  }), /* @__PURE__ */ A(B.Value, { className: fo.Value })]
4037
4038
  }),
4038
4039
  /* @__PURE__ */ A(wr, {
4039
4040
  "aria-label": t,
4040
- "aria-describedby": n == null ? void 0 : d
4041
+ "aria-describedby": n == null ? void 0 : p
4041
4042
  }),
4042
4043
  /* @__PURE__ */ A(Tr, {
4043
- min: i,
4044
- max: a,
4045
- format: o,
4046
- locale: s
4044
+ min: a,
4045
+ max: o,
4046
+ format: s,
4047
+ locale: c
4047
4048
  }),
4048
4049
  n != null && /* @__PURE__ */ A(Er, {
4049
- id: d,
4050
+ id: p,
4050
4051
  error: r,
4051
4052
  children: n
4052
4053
  })