@ndla/ui 33.4.4 → 33.4.5

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/lib/index.d.ts CHANGED
@@ -5,8 +5,6 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- /** @ts-ignore */
9
- export * from './index-javascript';
10
8
  export { default as SectionHeading } from './SectionHeading';
11
9
  export { ArticleByline, ArticleContent, ArticleFootNotes, ArticleIntroduction, ArticleTitle, ArticleWrapper, ArticleHeaderWrapper, ArticleSideBar, default as Article, } from './Article';
12
10
  export { CompetenceGoalsDialog } from './CompetenceGoals';
package/lib/index.js CHANGED
@@ -4,196 +4,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- var _exportNames = {
8
- SectionHeading: true,
9
- ArticleByline: true,
10
- ArticleContent: true,
11
- ArticleFootNotes: true,
12
- ArticleIntroduction: true,
13
- ArticleTitle: true,
14
- ArticleWrapper: true,
15
- ArticleHeaderWrapper: true,
16
- ArticleSideBar: true,
17
- Article: true,
18
- CompetenceGoalsDialog: true,
19
- Table: true,
20
- ResourcesWrapper: true,
21
- ResourcesTopicTitle: true,
22
- createUniversalPortal: true,
23
- NoContentBox: true,
24
- Masthead: true,
25
- MastheadItem: true,
26
- getMastheadHeight: true,
27
- useMastheadHeight: true,
28
- SkipToMainContent: true,
29
- Portrait: true,
30
- ContentLoader: true,
31
- RelatedArticleList: true,
32
- RelatedArticle: true,
33
- ErrorResourceAccessDenied: true,
34
- ErrorMessage: true,
35
- FileList: true,
36
- File: true,
37
- BlogPost: true,
38
- BlogPostWrapper: true,
39
- Logo: true,
40
- InfoBox: true,
41
- InfoWidget: true,
42
- FrontpageInfo: true,
43
- FrontpageFilm: true,
44
- FrontpageToolbox: true,
45
- FrontpageMultidisciplinarySubject: true,
46
- FrontpageHeader: true,
47
- FrontpageSubjectIllustration: true,
48
- FrontpageSearch: true,
49
- FrontpageProgramMenu: true,
50
- FactBox: true,
51
- Image: true,
52
- ImageLink: true,
53
- makeSrcQueryString: true,
54
- SubjectMaterialHero: true,
55
- TasksAndActivitiesHero: true,
56
- AssessmentResourcesHero: true,
57
- SubjectHero: true,
58
- ExternalLearningResourcesHero: true,
59
- SourceMaterialHero: true,
60
- Hero: true,
61
- NdlaFilmHero: true,
62
- FilterList: true,
63
- FilterListPhone: true,
64
- FilterButtons: true,
65
- ToggleItem: true,
66
- Footer: true,
67
- EditorName: true,
68
- FooterText: true,
69
- FooterAuth: true,
70
- Figure: true,
71
- FigureCaption: true,
72
- FigureLicenseDialog: true,
73
- FigureExpandButton: true,
74
- FigureOpenDialogButton: true,
75
- FigureBylineExpandButton: true,
76
- LanguageSelector: true,
77
- LearningPathWrapper: true,
78
- LearningPathContent: true,
79
- LearningPathMenu: true,
80
- LearningPathSticky: true,
81
- LearningPathInformation: true,
82
- LearningPathStickySibling: true,
83
- LearningPathStickyPlaceholder: true,
84
- LearningPathLastStepNavigation: true,
85
- LearningPathMobileStepInfo: true,
86
- LearningPathMobileHeader: true,
87
- Translation: true,
88
- TranslationLine: true,
89
- TranslationBox: true,
90
- SearchResultSleeve: true,
91
- ContentTypeResult: true,
92
- SearchFieldForm: true,
93
- MastheadSearchModal: true,
94
- MastheadAuthModal: true,
95
- UserInfo: true,
96
- AuthModal: true,
97
- resourceTypeColor: true,
98
- CreatedBy: true,
99
- Breadcrumblist: true,
100
- MessageBox: true,
101
- MessageBoxTag: true,
102
- MessageBanner: true,
103
- ResourceBox: true,
104
- AudioPlayer: true,
105
- initAudioPlayers: true,
106
- NavigationHeading: true,
107
- NavigationBox: true,
108
- NavigationTopicAbout: true,
109
- Programme: true,
110
- CompetenceGoalTab: true,
111
- MultidisciplinarySubject: true,
112
- MultidisciplinarySubjectHeader: true,
113
- SearchTypeResult: true,
114
- SearchHeader: true,
115
- SearchFieldHeader: true,
116
- SearchNotionsResult: true,
117
- SearchSubjectResult: true,
118
- SearchFilterContent: true,
119
- constants: true,
120
- messagesNB: true,
121
- messagesNN: true,
122
- messagesEN: true,
123
- messagesSE: true,
124
- RadioButtonGroup: true,
125
- ToolboxInfo: true,
126
- Topic: true,
127
- Aside: true,
128
- AuthorInfo: true,
129
- Breadcrumb: true,
130
- HeaderBreadcrumb: true,
131
- HomeBreadcrumb: true,
132
- ActionBreadcrumb: true,
133
- i18nInstance: true,
134
- formatNestedMessages: true,
135
- ResourceGroup: true,
136
- LayoutItem: true,
137
- OneColumn: true,
138
- PageContainer: true,
139
- Content: true,
140
- FilmSlideshow: true,
141
- MovieGrid: true,
142
- AboutNdlaFilm: true,
143
- FilmMovieSearch: true,
144
- FilmMovieList: true,
145
- AllMoviesAlphabetically: true,
146
- DisplayOnPageYOffset: true,
147
- MediaList: true,
148
- MediaListItem: true,
149
- MediaListItemBody: true,
150
- MediaListItemActions: true,
151
- MediaListItemImage: true,
152
- MediaListItemMeta: true,
153
- ContentTypeBadge: true,
154
- SubjectMaterialBadge: true,
155
- TasksAndActivitiesBadge: true,
156
- AssessmentResourcesBadge: true,
157
- LearningPathBadge: true,
158
- SubjectBadge: true,
159
- ExternalLearningResourcesBadge: true,
160
- SourceMaterialBadge: true,
161
- SubjectChildContent: true,
162
- SubjectContent: true,
163
- SubjectFlexWrapper: true,
164
- SubjectHeader: true,
165
- SubjectNewContent: true,
166
- SubjectSecondaryContent: true,
167
- SubjectSectionTitle: true,
168
- SubjectSidebarWrapper: true,
169
- SubjectSocialContent: true,
170
- SubjectSocialSection: true,
171
- SubjectTopics: true,
172
- SubjectBanner: true,
173
- ContentCard: true,
174
- CopyParagraphButton: true,
175
- ContentPlaceholder: true,
176
- Notion: true,
177
- ConceptNotion: true,
178
- BannerCard: true,
179
- Folder: true,
180
- FolderInput: true,
181
- ListResource: true,
182
- BlockResource: true,
183
- TagSelector: true,
184
- SnackbarProvider: true,
185
- useSnack: true,
186
- BaseSnack: true,
187
- DefaultSnackbar: true,
188
- InfoBlock: true,
189
- TreeStructure: true,
190
- SearchField: true,
191
- SearchResultList: true,
192
- SearchResultItem: true,
193
- ActiveFilters: true,
194
- ToggleSearchButton: true,
195
- LetterFilter: true
196
- };
197
7
  Object.defineProperty(exports, "AboutNdlaFilm", {
198
8
  enumerable: true,
199
9
  get: function get() {
@@ -1322,18 +1132,6 @@ Object.defineProperty(exports, "useSnack", {
1322
1132
  return _SnackBar.useSnack;
1323
1133
  }
1324
1134
  });
1325
- var _indexJavascript = require("./index-javascript");
1326
- Object.keys(_indexJavascript).forEach(function (key) {
1327
- if (key === "default" || key === "__esModule") return;
1328
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
1329
- if (key in exports && exports[key] === _indexJavascript[key]) return;
1330
- Object.defineProperty(exports, key, {
1331
- enumerable: true,
1332
- get: function get() {
1333
- return _indexJavascript[key];
1334
- }
1335
- });
1336
- });
1337
1135
  var _SectionHeading = _interopRequireDefault(require("./SectionHeading"));
1338
1136
  var _Article = _interopRequireWildcard(require("./Article"));
1339
1137
  var _CompetenceGoals = require("./CompetenceGoals");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "33.4.4",
3
+ "version": "33.4.5",
4
4
  "description": "UI component library for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -32,16 +32,16 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@ndla/article-scripts": "^3.0.14",
35
- "@ndla/button": "^8.0.0",
35
+ "@ndla/button": "^9.0.0",
36
36
  "@ndla/carousel": "^2.1.1",
37
37
  "@ndla/core": "^3.0.3",
38
- "@ndla/forms": "^4.1.10",
38
+ "@ndla/forms": "^4.1.11",
39
39
  "@ndla/hooks": "^1.2.0",
40
40
  "@ndla/icons": "^2.1.1",
41
41
  "@ndla/licenses": "^6.1.6",
42
42
  "@ndla/modal": "^2.2.2",
43
- "@ndla/notion": "^4.1.12",
44
- "@ndla/safelink": "^4.0.1",
43
+ "@ndla/notion": "^4.1.13",
44
+ "@ndla/safelink": "^4.0.2",
45
45
  "@ndla/switch": "^1.0.3",
46
46
  "@ndla/tabs": "^2.1.1",
47
47
  "@ndla/tooltip": "^4.0.4",
@@ -82,5 +82,5 @@
82
82
  "publishConfig": {
83
83
  "access": "public"
84
84
  },
85
- "gitHead": "60e4b5add01f0f5d25386915e2f5d99ca9176e98"
85
+ "gitHead": "004d28705729afeda9fb1a5e10b5d08342adc672"
86
86
  }
@@ -131,7 +131,7 @@
131
131
  @include mq($until: mobileWide) {
132
132
  width: 100% !important;
133
133
  margin: $spacing 0 0 0 !important;
134
- padding: $spacing--small / 2 $left-margin-narrow-screen;
134
+ padding: $spacing--small / 2 20px;
135
135
  background: $brand-grey--lighter;
136
136
  flex-direction: row;
137
137
  .c-filter__item label {
@@ -267,7 +267,8 @@
267
267
  display: none !important;
268
268
  }
269
269
 
270
- &--no-results, &--disabled {
270
+ &--no-results,
271
+ &--disabled {
271
272
  cursor: not-allowed;
272
273
  pointer-events: none;
273
274
  color: $brand-color--tertiary;
@@ -335,7 +336,6 @@
335
336
  .c-filter__text {
336
337
  flex-grow: 1;
337
338
  }
338
-
339
339
  }
340
340
  }
341
341
  }
@@ -496,7 +496,7 @@
496
496
  display: flex;
497
497
  align-items: baseline;
498
498
  h1 {
499
- margin-right:$spacing;
499
+ margin-right: $spacing;
500
500
  }
501
501
  }
502
502
  }
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import styled from '@emotion/styled';
10
- import { IconButton, IconButtonV2 } from '@ndla/button';
10
+ import { IconButtonV2 } from '@ndla/button';
11
11
  import { Cross } from '@ndla/icons/action';
12
12
  import React, { ComponentProps, forwardRef, useEffect } from 'react';
13
13
  import { isMobile } from 'react-device-detect';
@@ -95,9 +95,9 @@ const FolderInput = forwardRef<HTMLInputElement, Props>(({ loading, error, onClo
95
95
  <Done />
96
96
  </IconButtonV2>
97
97
  )}
98
- <IconButton aria-label={t('close')} title={t('close')} size="small" ghostPill onClick={onClose}>
98
+ <IconButtonV2 aria-label={t('close')} title={t('close')} size="small" variant="ghost" onClick={onClose}>
99
99
  <Cross />
100
- </IconButton>
100
+ </IconButtonV2>
101
101
  </>
102
102
  )}
103
103
  <div aria-live="assertive">
@@ -9,7 +9,7 @@
9
9
  import React from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import styled from '@emotion/styled';
12
- import { IconButton } from '@ndla/button';
12
+ import { IconButtonV2 } from '@ndla/button';
13
13
  import { breakpoints, colors, fonts, misc, mq, shadows, spacing } from '@ndla/core';
14
14
  import { Cross } from '@ndla/icons/action';
15
15
  import { Snack, useSnack } from './SnackbarProvider';
@@ -29,19 +29,6 @@ const DefaultSnackContainer = styled.div`
29
29
  align-items: center;
30
30
  `;
31
31
 
32
- const StyledCloseButton = styled(IconButton)`
33
- svg {
34
- color: ${colors.brand.greyMedium};
35
- }
36
- &:hover,
37
- &:focus {
38
- background: ${colors.brand.greyDark};
39
- svg {
40
- color: ${colors.brand.greyLightest};
41
- }
42
- }
43
- `;
44
-
45
32
  const ButtonWrapper = styled.div`
46
33
  ${mq.range({ from: breakpoints.tablet })} {
47
34
  gap: ${spacing.xxsmall};
@@ -58,9 +45,14 @@ const DefaultSnack = (snack: Snack) => {
58
45
  {snack.content}
59
46
  <ButtonWrapper>
60
47
  {closable && (
61
- <StyledCloseButton size="xsmall" outline onClick={() => closeSnack(snack)} aria-label={t('snackbar.close')}>
48
+ <IconButtonV2
49
+ size="xsmall"
50
+ variant="outline"
51
+ colorTheme="greyLighter"
52
+ onClick={() => closeSnack(snack)}
53
+ aria-label={t('snackbar.close')}>
62
54
  <Cross />
63
- </StyledCloseButton>
55
+ </IconButtonV2>
64
56
  )}
65
57
  </ButtonWrapper>
66
58
  </DefaultSnackContainer>
package/src/index.ts CHANGED
@@ -9,9 +9,6 @@
9
9
  // Ignore typescript implicit any warning and export all javascript components
10
10
  // Move components to this file when they are migrated to typescript
11
11
 
12
- /** @ts-ignore */
13
- export * from './index-javascript';
14
-
15
12
  export { default as SectionHeading } from './SectionHeading';
16
13
 
17
14
  export {
package/src/main.scss CHANGED
@@ -18,7 +18,6 @@
18
18
  @import 'RelatedArticleList/component.related-articles';
19
19
  @import 'ContentTypeBadge/component.content-type-badge';
20
20
  @import 'Table/component.tables';
21
- @import 'TopicMenu/component.topic-menu';
22
21
  @import 'Filter/component.filter';
23
22
  @import 'Translation/component.translation';
24
23
  @import 'Translation/component.translation-box';