@leabankab/component-library 8.6.1 → 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 (93) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/dist/component-library.es.js +1930 -1091
  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/buttons/action-button.d.ts +34 -4
  7. package/dist/components/buttons/button-base.d.ts +5 -2
  8. package/dist/components/buttons/icon-button.d.ts +16 -2
  9. package/dist/components/color-roles.d.ts +7 -1
  10. package/dist/components/data-display/arrow-circle.d.ts +21 -0
  11. package/dist/components/data-display/article-card.d.ts +88 -0
  12. package/dist/components/data-display/avatar.d.ts +33 -0
  13. package/dist/components/data-display/chip.d.ts +8 -3
  14. package/dist/components/data-display/featured-image.d.ts +42 -0
  15. package/dist/components/data-display/index.d.ts +12 -0
  16. package/dist/components/data-display/link-card.d.ts +52 -0
  17. package/dist/components/data-display/media-card.d.ts +102 -0
  18. package/dist/components/data-display/partner-row.d.ts +46 -0
  19. package/dist/components/data-display/rich-text.d.ts +27 -0
  20. package/dist/components/data-display/service-card.d.ts +80 -0
  21. package/dist/components/data-display/star-rating.d.ts +26 -0
  22. package/dist/components/data-display/table.d.ts +93 -0
  23. package/dist/components/data-display/testimonial-card.d.ts +43 -0
  24. package/dist/components/data-display/use-star-rating-labels.d.ts +5 -0
  25. package/dist/components/data-display/use-video-player-labels.d.ts +2 -0
  26. package/dist/components/data-display/video-player.d.ts +22 -0
  27. package/dist/components/data-display/website-card.d.ts +10 -0
  28. package/dist/components/feedback/index.d.ts +1 -0
  29. package/dist/components/feedback/skeleton.d.ts +22 -0
  30. package/dist/components/form/slider.d.ts +15 -2
  31. package/dist/components/navigation/breadcrumbs.d.ts +38 -0
  32. package/dist/components/navigation/index.d.ts +3 -0
  33. package/dist/components/navigation/pagination-dots.d.ts +34 -0
  34. package/dist/components/navigation/pagination.d.ts +37 -0
  35. package/dist/components/navigation/use-breadcrumbs-labels.d.ts +2 -0
  36. package/dist/components/navigation/use-pagination-labels.d.ts +7 -0
  37. package/dist/components/surfaces/accordion.d.ts +5 -1
  38. package/dist/components/surfaces/index.d.ts +1 -0
  39. package/dist/components/surfaces/panel.d.ts +30 -0
  40. package/dist/components/typography/link.d.ts +14 -1
  41. package/dist/cookie-consent-react.cjs +1 -1
  42. package/dist/cookie-consent-react.cjs.map +1 -1
  43. package/dist/cookie-consent-react.mjs +13 -13
  44. package/dist/cookie-consent-react.mjs.map +1 -1
  45. package/dist/cookie-consent.css +1 -1
  46. package/dist/date-picker.cjs +1 -1
  47. package/dist/date-picker.cjs.map +1 -1
  48. package/dist/date-picker.mjs +216 -203
  49. package/dist/date-picker.mjs.map +1 -1
  50. package/dist/index.css +1 -1
  51. package/dist/index.d.ts +1 -1
  52. package/dist/tailwind.css +16 -0
  53. package/dist/theme/index.d.ts +1 -1
  54. package/dist/theme/token-types.d.ts +13 -3
  55. package/dist/theme/tokens/breakpoints.d.ts +20 -0
  56. package/dist/theme/tokens/font-family.d.ts +6 -0
  57. package/dist/theme/tokens/index.d.ts +1 -0
  58. package/dist/theme/tokens/shadows.d.ts +6 -0
  59. package/dist/theme/tokens/text-styles.d.ts +8 -0
  60. package/dist/theme/tokens/widths.d.ts +10 -0
  61. package/dist/theme/types.d.ts +9 -1
  62. package/dist/website/brand-letters.d.ts +40 -0
  63. package/dist/website/calculator.d.ts +58 -0
  64. package/dist/website/carousel.d.ts +55 -0
  65. package/dist/website/cta-banner.d.ts +42 -0
  66. package/dist/website/expanding-cards-context.d.ts +8 -0
  67. package/dist/website/expanding-cards-item.d.ts +69 -0
  68. package/dist/website/expanding-cards.d.ts +48 -0
  69. package/dist/website/hero-service-grid.d.ts +52 -0
  70. package/dist/website/hero.d.ts +57 -0
  71. package/dist/website/index.d.ts +33 -0
  72. package/dist/website/navigation-grid.d.ts +39 -0
  73. package/dist/website/paragraphs.d.ts +11 -0
  74. package/dist/website/partner-list.d.ts +79 -0
  75. package/dist/website/payment-feature.d.ts +85 -0
  76. package/dist/website/promo-grid.d.ts +71 -0
  77. package/dist/website/section-header.d.ts +53 -0
  78. package/dist/website/section.d.ts +53 -0
  79. package/dist/website/service-card-grid.d.ts +33 -0
  80. package/dist/website/split-content.d.ts +69 -0
  81. package/dist/website/stats.d.ts +52 -0
  82. package/dist/website/testimonials.d.ts +100 -0
  83. package/dist/website/use-brand-letters-labels.d.ts +2 -0
  84. package/dist/website/use-carousel-labels.d.ts +6 -0
  85. package/dist/website/use-carousel.d.ts +50 -0
  86. package/dist/website/use-partner-list-labels.d.ts +6 -0
  87. package/dist/website/use-testimonials-labels.d.ts +6 -0
  88. package/dist/website.cjs +2 -0
  89. package/dist/website.cjs.map +1 -0
  90. package/dist/website.css +1 -0
  91. package/dist/website.mjs +1226 -0
  92. package/dist/website.mjs.map +1 -0
  93. package/package.json +7 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,99 @@
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
+
40
+ ## 8.7.0
41
+
42
+ ### Minor Changes
43
+
44
+ - c721111: New cards for the website:
45
+
46
+ - `LinkCard`: the navigation card, a title and a round arrow, and the whole card is one link (`href`, or a router link in `render`). In five colours through `surface`; on hover it takes the website's purple tint and the arrow slides.
47
+ - `MediaCard`: a photo and text. Horizontal, a coloured card with the text in one half and the photo in the other from 1024px (`imagePosition`, `imageAsBackground`); vertical, a photo over centred text, for a row of cards. `action` takes an `ActionButton` or a `Link`, `priceExample` the small print.
48
+ - `ServiceCard`: a card of the website's service grid, with a photo that fills the room the text leaves (`layout="stacked"`) or a square photo before the text (`layout="row"`), an optional icon, in five colours.
49
+ - `TestimonialCard`: a customer review as a `figure`, with `StarRating`, the quote in quotation marks and the person with an `Avatar`.
50
+ - `ArticleCard`: an article or a job opening in a list, one link with the title, a two-line excerpt and the facts as beige pills (`variant="post"` or `"job"`); the title is underlined on hover.
51
+ - `PartnerRow`: text about a partner beside its logo on a white tile, over a line.
52
+
53
+ `MediaCard` and `ServiceCard` become one link when `render` is a link (`render={<NextLink href="/lan" />}`). A card that is a link is named by its title and described by its text, and its focus ring shows on light and dark sections. On the dark surfaces the text, the arrow and the price example are white.
54
+
55
+ - ac44e29: Existing components extended for the website:
56
+
57
+ - `ActionButton` takes the website's look: an 18px semibold label (16px on a phone), 32px from the edge and from the arrow, and on hover the label slides towards the arrow while the arrow turns purple and points up. New `size` (`"lg"`, the default, or `"sm"`, 40px tall) and `iconOnly`, which shows only the arrow and keeps the label as the accessible name.
58
+ - `IconButton` takes `variant="elevated"`: a white disc with a small shadow, for controls over a picture or a coloured section.
59
+ - `Link` takes `arrow`: a chevron after the text that slides on hover, while the text turns purple, or light purple with `color="contrast"`. Links without `arrow` keep their hover.
60
+ - `Chip` takes `color="muted"`, the website's beige pill, and `muted` joins `ColorRole`.
61
+ - `Accordion.Root` and `SimpleAccordion` take `variant="card"`: white cards with 16px corners, for a grey section.
62
+ - New `SurfaceRole` type (`base`, `subtle`, `muted`, `contrast`, `contrast-accent`), the values of the `surface` prop the website cards and sections will take.
63
+ - New `websiteBreakpoints` (640, 768, 1024, 1312, 1440), the website's own widths, for the website components.
64
+
65
+ - a6b0816: New components for the website's content:
66
+
67
+ - `Table`, with `TableHead`, `TableBody`, `TableRow`, `TableHeaderCell` and `TableCell`: the website's price table, a 1px line under every row, the first column at the start, the last at the end and the rest centred (`align` on a cell overrides it). 16px text, 14px below 640px; `size` fixes either. The header row is optional, and a header cell at the start of a body row heads that row. A table wider than its column scrolls sideways, and its box can then be reached with the keyboard.
68
+ - `RichText`: styles text from the CMS (headings, paragraphs, bold, italic, underline, strikethrough, lists, links, quotes, code and images) on the library's text styles, with the website's spacing. It styles only bare elements, so a library component inside keeps its look, and it does not sanitise: an HTML string has to be cleaned before it goes in through `dangerouslySetInnerHTML`.
69
+ - `Panel`: the website's white box, 64px corners and 64px inside, 32px and 32px below 768px; `size` fixes either.
70
+ - `FeaturedImage`: a large photo with 64px corners and an optional call to action 32px in from the bottom right; it fills its row from 1024px and is 1 : 0.7 below. `imageRender` takes `next/image`.
71
+ - `VideoPlayer`: a silent, looping 16 : 9 video with a play / pause button under it (the elevated `IconButton`). It starts by itself once the page has loaded, except under reduced motion, where it waits for the button.
72
+ - New token `--lea-font-family-mono` (`fontFamilyMono`): the website's Courier New stack, for the code in `RichText`.
73
+
74
+ The button names of `VideoPlayer` are translated (no, se, fi, es).
75
+
76
+ - 41539df: New components for the website, and three website components moved to the website's sizes:
77
+
78
+ - `Breadcrumbs`: the way to the current page, in a named `nav`; links through `href` or a router link in `render`.
79
+ - `Pagination`: numbered pages with previous and next, as buttons or, with `renderLink`, as links. From eight pages it shows the first, the last and the current page with its neighbours.
80
+ - `PaginationDots`: one dot per page for a carousel or a paged list; each dot is a named button.
81
+ - `StarRating`: a read-only rating in stars, one image named "4 av 5 stjerner" to a screen reader.
82
+ - `Avatar`: a round 48px photo on Base UI's `Avatar`, a grey disc until it loads; `imageRender` for `next/image`.
83
+ - `Skeleton`: a grey block that pulses while content loads, hidden from screen readers.
84
+ - New shadow token `soft` (`--lea-shadow-soft`, `shadow-soft`): the website's even 6px halo.
85
+ - `IconButton` `variant="elevated"` is 40px at `md` and takes the `soft` shadow, as on leabank.no. Its `sm` and `lg` sizes are unchanged.
86
+ - `Chip` takes `size="lg"`, the website's pill (16px semibold, 28px tall), in every colour and variant.
87
+ - `Accordion` and `SimpleAccordion` `variant="card"` take the website's FAQ spacing: 16px between the cards and inside the header, titles in 18px semibold (16px below 768px), 32px above and below the answer.
88
+
89
+ The texts of the new components are translated (no, se, fi, es).
90
+
91
+ - 54ee507: New design tokens for the website components:
92
+
93
+ - Palette roles `bg.hover`, `bg.contrast-hover`, `bg.contrast-accent` and `text.contrast-hover` (`--lea-palette-bg-hover` and so on, `bg-bg-hover` in Tailwind), and in `BgColorToken` and `TextColorToken`, so `<Text color="text.contrast-hover">` works.
94
+ - `--lea-width-section` (1312px), the content width of a website section; `max-w-section` in Tailwind.
95
+ - Text styles `title-md` and `title-xl`, headings in the regular weight: `<Text textStyle="title-md">`, `--lea-text-title-md-*` and `text-title-md` in Tailwind.
96
+
3
97
  ## 8.6.1
4
98
 
5
99
  ### Patch Changes