@ndla/ui 5.0.0 → 6.1.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 (57) hide show
  1. package/es/Breadcrumblist/Breadcrumblist.js +16 -9
  2. package/es/ContentPlaceholder/ContentPlaceholder.js +51 -0
  3. package/es/ContentPlaceholder/index.js +9 -0
  4. package/es/FactBox/FactBox.js +14 -31
  5. package/es/Frontpage/FrontpageSearch.js +10 -3
  6. package/es/Masthead/Masthead.js +9 -8
  7. package/es/Masthead/index.js +2 -1
  8. package/es/Masthead/utils.js +46 -0
  9. package/es/MessageBox/MessageBox.js +13 -7
  10. package/es/Notion/FigureNotion.js +3 -1
  11. package/es/Search/ContentTypeResult.js +4 -2
  12. package/es/Search/SearchField.js +5 -4
  13. package/es/Search/SearchResultSleeve.js +12 -10
  14. package/es/SearchTypeResult/SearchItem.js +8 -8
  15. package/es/all.css +1 -1
  16. package/es/index.js +2 -1
  17. package/lib/Breadcrumblist/Breadcrumblist.js +17 -9
  18. package/lib/ContentPlaceholder/ContentPlaceholder.d.ts +9 -0
  19. package/lib/ContentPlaceholder/ContentPlaceholder.js +54 -0
  20. package/lib/ContentPlaceholder/index.d.ts +9 -0
  21. package/lib/ContentPlaceholder/index.js +20 -0
  22. package/lib/FactBox/FactBox.js +14 -37
  23. package/lib/Frontpage/FrontpageSearch.js +10 -3
  24. package/lib/Masthead/Masthead.d.ts +3 -3
  25. package/lib/Masthead/Masthead.js +10 -8
  26. package/lib/Masthead/index.d.ts +2 -1
  27. package/lib/Masthead/index.js +14 -0
  28. package/lib/Masthead/utils.d.ts +11 -0
  29. package/lib/Masthead/utils.js +53 -0
  30. package/lib/MessageBox/MessageBox.d.ts +2 -1
  31. package/lib/MessageBox/MessageBox.js +13 -7
  32. package/lib/Notion/FigureNotion.js +3 -1
  33. package/lib/Search/ContentTypeResult.js +4 -2
  34. package/lib/Search/SearchField.js +5 -4
  35. package/lib/Search/SearchResultSleeve.js +12 -10
  36. package/lib/SearchTypeResult/SearchItem.js +8 -8
  37. package/lib/all.css +1 -1
  38. package/lib/index.d.ts +2 -1
  39. package/lib/index.js +23 -0
  40. package/package.json +13 -13
  41. package/src/Breadcrumblist/Breadcrumblist.tsx +12 -3
  42. package/src/ContentPlaceholder/ContentPlaceholder.tsx +68 -0
  43. package/src/ContentPlaceholder/index.ts +11 -0
  44. package/src/FactBox/FactBox.tsx +8 -10
  45. package/src/FactBox/component.factbox.scss +12 -0
  46. package/src/Frontpage/FrontpageSearch.tsx +7 -0
  47. package/src/Masthead/Masthead.tsx +7 -6
  48. package/src/Masthead/component.masthead.scss +3 -62
  49. package/src/Masthead/index.ts +3 -1
  50. package/src/Masthead/utils.ts +33 -0
  51. package/src/MessageBox/MessageBox.tsx +5 -1
  52. package/src/Notion/FigureNotion.tsx +25 -23
  53. package/src/Search/ContentTypeResult.tsx +3 -1
  54. package/src/Search/SearchField.jsx +2 -1
  55. package/src/Search/SearchResultSleeve.tsx +8 -2
  56. package/src/SearchTypeResult/SearchItem.tsx +0 -1
  57. package/src/index.ts +2 -1
@@ -315,13 +315,19 @@ const SearchResultSleeve = ({
315
315
  )}
316
316
  <div>
317
317
  <SearchLinkContainer>
318
- <StyledSearchLink css={keyboardPathNavigation === GO_TO_SEARCHPAGE && highlightStyle} to={allResultUrl}>
318
+ <StyledSearchLink
319
+ css={keyboardPathNavigation === GO_TO_SEARCHPAGE && highlightStyle}
320
+ to={allResultUrl}
321
+ tabIndex={-1}>
319
322
  <SearchIcon className="c-icon--22" />
320
323
  <strong ref={searchAllRef}>{searchString}</strong>
321
324
  <small>{t('welcomePage.searchAllInfo')}</small>
322
325
  </StyledSearchLink>
323
326
  {suggestion && suggestionUrl && (
324
- <StyledSearchLink css={keyboardPathNavigation === GO_TO_SUGGESTION && highlightStyle} to={suggestionUrl}>
327
+ <StyledSearchLink
328
+ css={keyboardPathNavigation === GO_TO_SUGGESTION && highlightStyle}
329
+ to={suggestionUrl}
330
+ tabIndex={-1}>
325
331
  <SearchIcon className="c-icon--22" />
326
332
  <small>{t('searchPage.resultType.searchPhraseSuggestion')}</small>
327
333
  <strong ref={searchSuggestionRef}>{suggestion}</strong>
@@ -56,7 +56,6 @@ const Container = styled.div`
56
56
 
57
57
  const ItemWrapper = styled.div`
58
58
  flex-direction: column;
59
- overflow: hidden;
60
59
  display: flex;
61
60
  width: 100%;
62
61
  height: 100%;
package/src/index.ts CHANGED
@@ -32,7 +32,7 @@ export { createUniversalPortal } from './utils/createUniversalPortal';
32
32
 
33
33
  export { default as NoContentBox } from './NoContentBox';
34
34
 
35
- export { default as Masthead, MastheadItem } from './Masthead';
35
+ export { default as Masthead, MastheadItem, getMastheadHeight, useMastheadHeight } from './Masthead';
36
36
 
37
37
  export { default as Portrait } from './Portrait';
38
38
 
@@ -216,4 +216,5 @@ export { default as ContentCard } from './ContentCard';
216
216
 
217
217
  export { default as CopyParagraphButton } from './CopyParagraphButton';
218
218
 
219
+ export { default as ContentPlaceholder } from './ContentPlaceholder';
219
220
  export { Notion, ConceptNotion } from './Notion';