@ndla/ui 23.0.0 → 24.0.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 (95) hide show
  1. package/es/Article/ArticleAuthorContent.js +2 -4
  2. package/es/AuthorInfo/AuthorInfo.js +29 -16
  3. package/es/ContentCard/ContentCard.js +66 -25
  4. package/es/FileList/File.js +34 -8
  5. package/es/FileList/FileList.js +29 -3
  6. package/es/InfoBox/InfoBox.js +10 -3
  7. package/es/InfoWidget/InfoWidget.js +67 -22
  8. package/es/Portrait/Portrait.js +19 -13
  9. package/es/Search/ActiveFilterContent.js +4 -14
  10. package/es/Search/ActiveFilters.js +8 -19
  11. package/es/Search/SearchField.js +31 -52
  12. package/es/Search/SearchResult.js +113 -136
  13. package/es/Search/ToggleSearchButton.js +34 -43
  14. package/es/Search/index.js +2 -8
  15. package/es/all.css +1 -1
  16. package/es/index-javascript.js +0 -1
  17. package/es/index.js +2 -1
  18. package/lib/Article/ArticleAuthorContent.js +9 -4
  19. package/lib/AuthorInfo/AuthorInfo.d.ts +1 -11
  20. package/lib/AuthorInfo/AuthorInfo.js +36 -20
  21. package/lib/ContentCard/ContentCard.d.ts +1 -15
  22. package/lib/ContentCard/ContentCard.js +60 -28
  23. package/lib/FileList/File.js +36 -12
  24. package/lib/FileList/FileList.js +28 -5
  25. package/lib/InfoBox/InfoBox.js +11 -4
  26. package/lib/InfoWidget/InfoWidget.js +61 -25
  27. package/lib/Portrait/Portrait.js +19 -14
  28. package/lib/Search/ActiveFilterContent.d.ts +13 -0
  29. package/lib/Search/ActiveFilterContent.js +4 -15
  30. package/lib/Search/ActiveFilters.d.ts +13 -0
  31. package/lib/Search/ActiveFilters.js +8 -20
  32. package/lib/Search/SearchField.d.ts +19 -0
  33. package/lib/Search/SearchField.js +32 -56
  34. package/lib/Search/SearchResult.d.ts +36 -0
  35. package/lib/Search/SearchResult.js +116 -159
  36. package/lib/Search/ToggleSearchButton.d.ts +16 -0
  37. package/lib/Search/ToggleSearchButton.js +36 -46
  38. package/lib/Search/index.d.ts +12 -0
  39. package/lib/Search/index.js +0 -54
  40. package/lib/SearchTypeResult/SearchTypeHeader.d.ts +1 -1
  41. package/lib/all.css +1 -1
  42. package/lib/index-javascript.js +0 -74
  43. package/lib/index.d.ts +1 -0
  44. package/lib/index.js +38 -1
  45. package/package.json +5 -5
  46. package/src/Article/ArticleAuthorContent.tsx +1 -1
  47. package/src/AuthorInfo/AuthorInfo.tsx +53 -19
  48. package/src/ContentCard/ContentCard.tsx +127 -35
  49. package/src/FileList/File.tsx +47 -17
  50. package/src/FileList/FileList.tsx +37 -8
  51. package/src/InfoBox/InfoBox.tsx +24 -4
  52. package/src/InfoWidget/InfoWidget.tsx +83 -34
  53. package/src/Portrait/Portrait.tsx +25 -10
  54. package/src/Search/{ActiveFilterContent.jsx → ActiveFilterContent.tsx} +11 -12
  55. package/src/Search/{ActiveFilters.jsx → ActiveFilters.tsx} +20 -17
  56. package/src/Search/{SearchField.jsx → SearchField.tsx} +58 -68
  57. package/src/Search/SearchResult.tsx +360 -0
  58. package/src/Search/ToggleSearchButton.tsx +73 -0
  59. package/src/Search/component.search.scss +0 -4
  60. package/src/Search/index.ts +16 -0
  61. package/src/all.scss +0 -1
  62. package/src/index-javascript.js +0 -15
  63. package/src/index.ts +2 -0
  64. package/src/main.scss +0 -6
  65. package/es/Search/SearchFilter.js +0 -72
  66. package/es/Search/SearchFilterList.js +0 -115
  67. package/es/Search/SearchOverlay.js +0 -39
  68. package/es/Search/SearchPage.js +0 -178
  69. package/es/Search/SearchPopoverFilter.js +0 -152
  70. package/es/Search/SearchResultAuthor.js +0 -51
  71. package/lib/Search/SearchFilter.js +0 -88
  72. package/lib/Search/SearchFilterList.js +0 -137
  73. package/lib/Search/SearchOverlay.js +0 -62
  74. package/lib/Search/SearchPage.js +0 -207
  75. package/lib/Search/SearchPopoverFilter.js +0 -172
  76. package/lib/Search/SearchResultAuthor.js +0 -60
  77. package/src/AuthorInfo/component.author-info.scss +0 -54
  78. package/src/ContentCard/component.content-card.scss +0 -109
  79. package/src/FileList/component.file-list.scss +0 -102
  80. package/src/InfoBox/component.info-box.scss +0 -21
  81. package/src/InfoWidget/component.info-widget.scss +0 -52
  82. package/src/Portrait/component.portrait.scss +0 -29
  83. package/src/Search/SearchFilter.jsx +0 -82
  84. package/src/Search/SearchFilterList.jsx +0 -110
  85. package/src/Search/SearchOverlay.jsx +0 -38
  86. package/src/Search/SearchPage.jsx +0 -178
  87. package/src/Search/SearchPopoverFilter.jsx +0 -109
  88. package/src/Search/SearchResult.jsx +0 -239
  89. package/src/Search/SearchResultAuthor.jsx +0 -54
  90. package/src/Search/ToggleSearchButton.jsx +0 -64
  91. package/src/Search/component.search-filter.scss +0 -67
  92. package/src/Search/component.search-overlay.scss +0 -103
  93. package/src/Search/component.search-page.scss +0 -125
  94. package/src/Search/component.search-result-author.scss +0 -65
  95. package/src/Search/index.js +0 -34
@@ -1,125 +0,0 @@
1
- $filter-width: 250px;
2
- $search-field-wrapper-margin: $filter-width;
3
- .c-search-page {
4
- &__close-button {
5
- display: inline-flex;
6
- align-items: center;
7
- box-shadow: none;
8
- position: absolute;
9
- right: $spacing--small;
10
- top: $spacing--small;
11
- @include font-size(16px, 20px);
12
- cursor: pointer;
13
-
14
- @include mq(desktop) {
15
- display: none;
16
- }
17
-
18
- span {
19
- box-shadow: $link;
20
- color: $brand-color;
21
- margin-right: $spacing--small;
22
- }
23
-
24
- .c-icon {
25
- color: $brand-color--dark;
26
- width: 24px;
27
- height: 24px;
28
- }
29
- }
30
-
31
- &__toggle-filter {
32
- @include mq(desktop) {
33
- display: none;
34
- }
35
- margin-bottom: $spacing;
36
- }
37
-
38
- &__filter-result-wrapper {
39
- @include mq(desktop) {
40
- display: flex;
41
- }
42
- }
43
-
44
- &__search-field-wrapper {
45
- padding: $spacing 0 $spacing 0;
46
- @include mq(desktop) {
47
- padding: $spacing--large 0 $spacing--large $spacing--small;
48
- margin-left: $search-field-wrapper-margin;
49
- }
50
- .c-search-field__input-wrapper {
51
- padding: 0;
52
- margin: 0;
53
- }
54
- @include mq($until: desktop) {
55
- .c-active-filters {
56
- display: none;
57
- }
58
- }
59
- }
60
-
61
- &__active-filters {
62
- margin-bottom: $spacing;
63
-
64
- @include mq(desktop) {
65
- display: none;
66
- }
67
- }
68
-
69
- &__filter-wrapper {
70
- display: none;
71
-
72
- @include mq($until: desktop) {
73
- position: fixed;
74
- top: 0;
75
- left: 0;
76
- bottom: 0;
77
- right: 0;
78
- overflow: auto;
79
- background: $white;
80
- margin-right: 0;
81
- z-index: 100;
82
- padding-top: $spacing * 3;
83
- }
84
-
85
- flex-basis: $filter-width;
86
- flex-shrink: 0;
87
- margin-right: $spacing--small;
88
- text-align: center;
89
-
90
- &--expanded {
91
- display: block;
92
- position: fixed;
93
- padding-bottom: $spacing--large;
94
- animation: slideIn 0.5s;
95
- }
96
-
97
- @include mq(desktop) {
98
- display: block;
99
- width: $filter-width;
100
- }
101
- }
102
-
103
- &__filter-heading {
104
- text-align: left;
105
- text-transform: uppercase;
106
- display: none;
107
- margin: 0;
108
- font-weight: 600;
109
- @include font-size(18px, 32px);
110
-
111
- @include mq(desktop) {
112
- display: block;
113
- }
114
- }
115
-
116
- &__filters {
117
- & > button {
118
- margin-top: $spacing;
119
- }
120
- }
121
-
122
- &__result-wrapper {
123
- flex-grow: 1;
124
- }
125
- }
@@ -1,65 +0,0 @@
1
- .c-search-result-author {
2
- background: $brand-grey--lighter;
3
- padding: $spacing;
4
- display: flex;
5
- align-items: flex-start;
6
- justify-content: space-between;
7
- margin-bottom: $spacing;
8
- &--desktop {
9
- @include mq($until: desktop) {
10
- display: none;
11
- }
12
- }
13
- &--tablet {
14
- @include mq(desktop) {
15
- display: none;
16
- }
17
- }
18
- @include mq($until: desktop) {
19
- flex-direction: row-reverse;
20
- background: none;
21
- padding: 0 0 $spacing 0;
22
- justify-content: flex-end;
23
- align-items: center;
24
- &__portrait-image {
25
- margin-right: $spacing--medium;
26
- }
27
- &__url {
28
- display: none;
29
- }
30
- }
31
- &__heading {
32
- margin: 0 0 $spacing--small;
33
- @include font-size(24px, 32px);
34
- font-weight: $font-weight-bold;
35
- @include mq($until: desktop) {
36
- display: none;
37
- }
38
- }
39
- p {
40
- margin: 0;
41
- }
42
- &__links {
43
- display: flex;
44
- &:empty {
45
- display: none;
46
- }
47
- a:not(:last-child) {
48
- margin-right: $spacing--large;
49
- }
50
- }
51
- @include mq($until: tablet) {
52
- p, a {
53
- @include font-size(16px, 24px);
54
- }
55
- &__portrait-image {
56
- margin-right: $spacing;
57
- width: 4rem;
58
- height: 4rem;
59
- span {
60
- width: 4rem;
61
- height: 4rem;
62
- }
63
- }
64
- }
65
- }
@@ -1,34 +0,0 @@
1
- /**
2
- * Copyright (c) 2017-present, NDLA.
3
- *
4
- * This source code is licensed under the GPLv3 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- import SearchField from './SearchField';
10
- import SearchOverlay from './SearchOverlay';
11
- import SearchPage from './SearchPage';
12
-
13
- import { SearchResult, SearchResultList, SearchResultItem } from './SearchResult';
14
-
15
- import SearchFilter from './SearchFilter';
16
- import SearchFilterList from './SearchFilterList';
17
- import SearchPopoverFilter from './SearchPopoverFilter';
18
- import SearchResultAuthor from './SearchResultAuthor';
19
- import ActiveFilters from './ActiveFilters';
20
- export { default as ToggleSearchButton } from './ToggleSearchButton';
21
-
22
- export {
23
- SearchField,
24
- SearchOverlay,
25
- SearchPage,
26
- SearchResult,
27
- SearchResultItem,
28
- SearchResultList,
29
- SearchFilter,
30
- SearchFilterList,
31
- SearchPopoverFilter,
32
- SearchResultAuthor,
33
- ActiveFilters,
34
- };