@ndla/ui 24.2.0 → 25.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 (116) hide show
  1. package/es/CompetenceGoals/CompetenceGoalsDialog.js +15 -24
  2. package/es/CompetenceGoals/index.js +1 -4
  3. package/es/Filter/FilterButtons.js +10 -11
  4. package/es/Filter/FilterList.js +82 -152
  5. package/es/Filter/FilterListPhone.js +180 -272
  6. package/es/Filter/ToggleItem.js +6 -25
  7. package/es/Frontpage/FrontpageAllSubjects.js +8 -9
  8. package/es/Frontpage/FrontpageSearch.js +3 -4
  9. package/es/LearningPaths/LearningPathMenuModalWrapper.js +1 -2
  10. package/es/Masthead/Masthead.js +65 -41
  11. package/es/Masthead/MastheadSearchModal.js +4 -5
  12. package/es/Masthead/SkipToMainContent.js +24 -0
  13. package/es/Masthead/index.js +2 -1
  14. package/es/SearchTypeResult/PopupFilter.js +8 -9
  15. package/es/SearchTypeResult/SearchFilterContent.js +3 -4
  16. package/es/SectionHeading/SectionHeading.js +24 -17
  17. package/es/Subject/index.js +0 -1
  18. package/es/User/UserInfo.js +11 -3
  19. package/es/all.css +1 -1
  20. package/es/index-javascript.js +1 -4
  21. package/es/index.js +5 -2
  22. package/es/locale/messages-en.js +1 -0
  23. package/es/locale/messages-nb.js +1 -0
  24. package/es/locale/messages-nn.js +1 -0
  25. package/es/locale/messages-se.js +1 -0
  26. package/es/locale/messages-sma.js +1 -0
  27. package/lib/CompetenceGoals/CompetenceGoalsDialog.d.ts +19 -0
  28. package/lib/CompetenceGoals/CompetenceGoalsDialog.js +13 -25
  29. package/lib/CompetenceGoals/index.d.ts +1 -0
  30. package/lib/CompetenceGoals/index.js +1 -33
  31. package/lib/Filter/FilterButtons.js +9 -9
  32. package/lib/Filter/FilterList.d.ts +25 -0
  33. package/lib/Filter/FilterList.js +85 -155
  34. package/lib/Filter/FilterListPhone.d.ts +32 -0
  35. package/lib/Filter/FilterListPhone.js +176 -270
  36. package/lib/Filter/ToggleItem.d.ts +15 -0
  37. package/lib/Filter/ToggleItem.js +6 -32
  38. package/lib/Filter/filterClasses.d.ts +2 -0
  39. package/lib/Filter/index.d.ts +12 -0
  40. package/lib/Frontpage/FrontpageAllSubjects.js +7 -7
  41. package/lib/Frontpage/FrontpageSearch.js +2 -3
  42. package/lib/LearningPaths/LearningPathMenuModalWrapper.js +1 -2
  43. package/lib/Masthead/Masthead.d.ts +4 -8
  44. package/lib/Masthead/Masthead.js +65 -49
  45. package/lib/Masthead/MastheadSearchModal.js +3 -4
  46. package/lib/Masthead/SkipToMainContent.d.ts +6 -0
  47. package/lib/Masthead/SkipToMainContent.js +38 -0
  48. package/lib/Masthead/index.d.ts +2 -1
  49. package/lib/Masthead/index.js +10 -0
  50. package/lib/SearchTypeResult/PopupFilter.js +7 -7
  51. package/lib/SearchTypeResult/SearchFilterContent.js +2 -2
  52. package/lib/SectionHeading/SectionHeading.d.ts +1 -13
  53. package/lib/SectionHeading/SectionHeading.js +23 -19
  54. package/lib/Subject/index.d.ts +0 -1
  55. package/lib/Subject/index.js +0 -8
  56. package/lib/User/UserInfo.js +11 -3
  57. package/lib/all.css +1 -1
  58. package/lib/index-javascript.js +1 -63
  59. package/lib/index.d.ts +5 -2
  60. package/lib/index.js +48 -7
  61. package/lib/locale/messages-en.d.ts +1 -0
  62. package/lib/locale/messages-en.js +1 -0
  63. package/lib/locale/messages-nb.d.ts +1 -0
  64. package/lib/locale/messages-nb.js +1 -0
  65. package/lib/locale/messages-nn.d.ts +1 -0
  66. package/lib/locale/messages-nn.js +1 -0
  67. package/lib/locale/messages-se.d.ts +1 -0
  68. package/lib/locale/messages-se.js +1 -0
  69. package/lib/locale/messages-sma.d.ts +1 -0
  70. package/lib/locale/messages-sma.js +1 -0
  71. package/package.json +12 -12
  72. package/src/CompetenceGoals/{CompetenceGoalsDialog.jsx → CompetenceGoalsDialog.tsx} +34 -27
  73. package/src/CompetenceGoals/index.ts +1 -0
  74. package/src/Filter/FilterButtons.tsx +0 -1
  75. package/src/Filter/FilterList.tsx +135 -0
  76. package/src/Filter/FilterListPhone.tsx +275 -0
  77. package/src/Filter/ToggleItem.tsx +58 -0
  78. package/src/Filter/{filterClasses.js → filterClasses.ts} +0 -0
  79. package/src/Filter/{index.js → index.ts} +0 -0
  80. package/src/Frontpage/FrontpageAllSubjects.tsx +0 -1
  81. package/src/Frontpage/FrontpageSearch.tsx +0 -1
  82. package/src/LearningPaths/LearningPathMenuModalWrapper.tsx +0 -1
  83. package/src/Masthead/Masthead.tsx +85 -45
  84. package/src/Masthead/MastheadSearchModal.tsx +0 -1
  85. package/src/Masthead/SkipToMainContent.tsx +48 -0
  86. package/src/Masthead/index.ts +2 -1
  87. package/src/SearchTypeResult/PopupFilter.tsx +0 -1
  88. package/src/SearchTypeResult/SearchFilterContent.tsx +0 -1
  89. package/src/SectionHeading/SectionHeading.tsx +29 -16
  90. package/src/Subject/index.ts +0 -1
  91. package/src/User/UserInfo.tsx +4 -4
  92. package/src/index-javascript.js +0 -10
  93. package/src/index.ts +7 -2
  94. package/src/locale/messages-en.ts +1 -0
  95. package/src/locale/messages-nb.ts +1 -0
  96. package/src/locale/messages-nn.ts +1 -0
  97. package/src/locale/messages-se.ts +1 -0
  98. package/src/locale/messages-sma.ts +1 -0
  99. package/src/main.scss +0 -3
  100. package/es/CompetenceGoals/CompetenceGoalList.js +0 -58
  101. package/es/CompetenceGoals/CompetenceGoals.js +0 -159
  102. package/es/Subject/SubjectFilter.js +0 -42
  103. package/lib/CompetenceGoals/CompetenceGoalList.js +0 -78
  104. package/lib/CompetenceGoals/CompetenceGoals.js +0 -184
  105. package/lib/Subject/SubjectFilter.d.ts +0 -27
  106. package/lib/Subject/SubjectFilter.js +0 -58
  107. package/src/CompetenceGoals/CompetenceGoalList.jsx +0 -51
  108. package/src/CompetenceGoals/CompetenceGoals.jsx +0 -152
  109. package/src/CompetenceGoals/component.competence-goals.scss +0 -161
  110. package/src/CompetenceGoals/index.js +0 -6
  111. package/src/Filter/FilterList.jsx +0 -167
  112. package/src/Filter/FilterListPhone.jsx +0 -329
  113. package/src/Filter/ToggleItem.jsx +0 -71
  114. package/src/Masthead/component.masthead.scss +0 -146
  115. package/src/SectionHeading/component.section-heading.scss +0 -17
  116. package/src/Subject/SubjectFilter.tsx +0 -48
@@ -1,17 +0,0 @@
1
- .c-section-heading {
2
- font-weight: $font-weight-bold;
3
- text-transform: uppercase;
4
- letter-spacing: 0.05em;
5
- @include font-size(18px, 24px);
6
- @include mq(tablet) {
7
- @include font-size(20px, 26px);
8
- }
9
- &--large {
10
- margin: 0 0 $spacing--small 0;
11
- @include font-size(16px, 32px);
12
-
13
- @include mq(tablet) {
14
- @include font-size(22px);
15
- }
16
- }
17
- }
@@ -1,48 +0,0 @@
1
- import React, { ChangeEvent } from 'react';
2
- import BEMHelper from 'react-bem-helper';
3
- import PropTypes from 'prop-types';
4
-
5
- // @ts-ignore
6
- import FilterList from '../Filter/FilterList';
7
-
8
- const searchFilterClasses = BEMHelper({
9
- prefix: 'c-',
10
- name: 'filter',
11
- outputIsString: true,
12
- });
13
-
14
- const valueShape = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
15
-
16
- interface Props {
17
- label: string;
18
- onChange: (evt: ChangeEvent<HTMLInputElement>) => void;
19
- options: {
20
- value: string | number;
21
- title: string;
22
- }[];
23
- values: (string | number)[];
24
- }
25
-
26
- const SubjectFilter = ({ label, options, values, onChange }: Props) => (
27
- <div className={searchFilterClasses('', ['subject', 'background'])}>
28
- <FilterList onChange={onChange} labelNotVisible options={options} label={label} values={values} />
29
- </div>
30
- );
31
-
32
- SubjectFilter.propTypes = {
33
- label: PropTypes.string.isRequired,
34
- onChange: PropTypes.func.isRequired,
35
- options: PropTypes.arrayOf(
36
- PropTypes.shape({
37
- value: valueShape.isRequired,
38
- title: PropTypes.string.isRequired,
39
- }),
40
- ).isRequired,
41
- values: PropTypes.arrayOf(valueShape),
42
- };
43
-
44
- SubjectFilter.defaultProps = {
45
- values: [],
46
- };
47
-
48
- export default SubjectFilter;