@ndla/ui 50.5.0 → 50.5.2

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 (50) hide show
  1. package/es/Aside/Aside.js +55 -17
  2. package/es/ContentTypeBadge/ContentTypeBadge.js +162 -83
  3. package/es/FramedContent/FramedContent.js +7 -11
  4. package/es/ResourceGroup/ResourceItem.js +9 -9
  5. package/es/SearchTypeResult/components/ItemResourceHeader.js +6 -6
  6. package/es/SearchTypeResult/components/ItemTopicHeader.js +4 -4
  7. package/es/all.css +1 -1
  8. package/es/locale/messages-en.js +8 -4
  9. package/es/locale/messages-nb.js +8 -4
  10. package/es/locale/messages-nn.js +8 -4
  11. package/es/locale/messages-se.js +8 -4
  12. package/es/locale/messages-sma.js +8 -4
  13. package/lib/Aside/Aside.d.ts +3 -7
  14. package/lib/Aside/Aside.js +55 -19
  15. package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +3 -2
  16. package/lib/ContentTypeBadge/ContentTypeBadge.js +162 -85
  17. package/lib/FramedContent/FramedContent.d.ts +1 -1
  18. package/lib/FramedContent/FramedContent.js +8 -11
  19. package/lib/ResourceGroup/ResourceItem.js +9 -9
  20. package/lib/SearchTypeResult/components/ItemResourceHeader.js +6 -6
  21. package/lib/SearchTypeResult/components/ItemTopicHeader.js +4 -4
  22. package/lib/all.css +1 -1
  23. package/lib/locale/messages-en.d.ts +4 -0
  24. package/lib/locale/messages-en.js +8 -4
  25. package/lib/locale/messages-nb.d.ts +4 -0
  26. package/lib/locale/messages-nb.js +8 -4
  27. package/lib/locale/messages-nn.d.ts +4 -0
  28. package/lib/locale/messages-nn.js +8 -4
  29. package/lib/locale/messages-se.d.ts +4 -0
  30. package/lib/locale/messages-se.js +8 -4
  31. package/lib/locale/messages-sma.d.ts +4 -0
  32. package/lib/locale/messages-sma.js +8 -4
  33. package/package.json +2 -2
  34. package/src/Article/component.article.scss +1 -1
  35. package/src/Aside/Aside.tsx +95 -30
  36. package/src/ContentTypeBadge/ContentTypeBadge.stories.tsx +81 -0
  37. package/src/ContentTypeBadge/ContentTypeBadge.tsx +169 -71
  38. package/src/FramedContent/FramedContent.tsx +37 -14
  39. package/src/ResourceGroup/ResourceItem.tsx +5 -5
  40. package/src/SearchTypeResult/components/ItemResourceHeader.tsx +1 -1
  41. package/src/SearchTypeResult/components/ItemTopicHeader.tsx +1 -1
  42. package/src/locale/messages-en.ts +7 -4
  43. package/src/locale/messages-nb.ts +7 -4
  44. package/src/locale/messages-nn.ts +7 -4
  45. package/src/locale/messages-se.ts +7 -4
  46. package/src/locale/messages-sma.ts +7 -4
  47. package/src/main.scss +0 -3
  48. package/src/Aside/component.aside.scss +0 -91
  49. package/src/ContentTypeBadge/component.content-type-badge.scss +0 -223
  50. package/src/global/components/component.bodybox.scss +0 -60
@@ -1,223 +0,0 @@
1
- .c-content-type-badge {
2
- width: 34px;
3
- height: 34px;
4
- display: inline-flex;
5
- align-items: center;
6
- justify-content: center;
7
- border-radius: 100%;
8
- &--border {
9
- border: 2px solid $black;
10
- }
11
-
12
- &--embed-resource {
13
- border-color: $brand-grey;
14
- &.c-content-type-badge--background {
15
- background: $brand-grey--light;
16
- }
17
- }
18
-
19
- &--subject-material {
20
- border-color: $subject-material-dark;
21
-
22
- svg {
23
- color: $subject-material-dark !important;
24
- }
25
- &.c-content-type-badge--small {
26
- svg {
27
- width: 22px;
28
- height: 22px;
29
- }
30
- }
31
-
32
- &.c-content-type-badge--background {
33
- background: $subject-material-light;
34
- }
35
- }
36
-
37
- &--tasks-and-activities {
38
- border-color: $tasks-and-activities-dark;
39
-
40
- svg {
41
- color: $tasks-and-activities-dark !important;
42
- }
43
-
44
- &.c-content-type-badge--background {
45
- background: $tasks-and-activities-light;
46
- }
47
- }
48
-
49
- &--assessment-resources {
50
- border-color: $assessment-resource-dark;
51
-
52
- svg {
53
- margin-top: 4px;
54
- color: $assessment-resource-dark !important;
55
- }
56
-
57
- &.c-content-type-badge--background {
58
- background: $assessment-resource-light;
59
- }
60
- }
61
-
62
- &--topic {
63
- border-color: $subject-dark;
64
-
65
- svg {
66
- margin-top: 2px;
67
- color: $subject-dark !important;
68
- }
69
-
70
- &.c-content-type-badge--background {
71
- background: $subject-light;
72
- }
73
- }
74
-
75
- &--external-learning-resources {
76
- border-color: $external-learning-resource-dark;
77
-
78
- &.c-content-type-badge--large {
79
- svg {
80
- margin-top: 1px;
81
- width: 32px;
82
- height: 32px;
83
- }
84
- }
85
-
86
- &.c-content-type-badge--small {
87
- svg {
88
- margin-top: 1px;
89
- width: 24px;
90
- height: 24px;
91
- }
92
- }
93
-
94
- svg {
95
- color: $external-learning-resource-dark !important;
96
- }
97
-
98
- &.c-content-type-badge--background {
99
- background: $external-learning-resource-light;
100
- }
101
- }
102
-
103
- &--source-material {
104
- border-color: $source-material-dark;
105
-
106
- &.c-content-type-badge--large {
107
- svg {
108
- margin-top: 1px;
109
- width: 32px;
110
- height: 32px;
111
- }
112
- }
113
-
114
- &.c-content-type-badge--small {
115
- svg {
116
- margin-top: 1px;
117
- width: 24px;
118
- height: 24px;
119
- }
120
- }
121
-
122
- svg {
123
- color: $source-material-dark !important;
124
- }
125
-
126
- &.c-content-type-badge--background {
127
- background: $source-material-light;
128
- }
129
- }
130
-
131
- &--learning-path {
132
- border-color: $learning-path-dark;
133
-
134
- &.c-content-type-badge--large {
135
- svg {
136
- width: 34px;
137
- height: 34px;
138
- }
139
- }
140
-
141
- &.c-content-type-badge--small {
142
- svg {
143
- width: 24px;
144
- height: 24px;
145
- }
146
- }
147
-
148
- &.c-content-type-badge--x-small {
149
- svg {
150
- width: 16px;
151
- height: 16px;
152
- }
153
- }
154
-
155
- svg {
156
- color: $learning-path-dark !important;
157
- }
158
-
159
- &.c-content-type-badge--background {
160
- background: $learning-path-light;
161
- }
162
- }
163
-
164
- &--subject {
165
- border-color: $subjecttype-dark;
166
- svg {
167
- color: $subjecttype-light !important;
168
- }
169
-
170
- &.c-content-type-badge--background {
171
- background: $subjecttype-background;
172
- }
173
- }
174
- &--multidisciplinary-topic {
175
- &.c-content-type-badge--background {
176
- background: #b9b37b;
177
- }
178
- }
179
-
180
- &--large {
181
- width: 50px;
182
- height: 50px;
183
-
184
- svg {
185
- width: 25px;
186
- height: 25px;
187
- }
188
- }
189
-
190
- &--x-small {
191
- width: 20px;
192
- height: 20px;
193
- border-width: 1px;
194
- border-style: solid;
195
-
196
- @include mq(tablet) {
197
- width: 26px;
198
- height: 26px;
199
- }
200
-
201
- svg {
202
- width: 10px;
203
- height: 10px;
204
-
205
- @include mq(tablet) {
206
- width: 12px;
207
- height: 12px;
208
- }
209
- }
210
- }
211
-
212
- &--xx-small {
213
- width: 20px;
214
- height: 20px;
215
- border-width: 1px;
216
- border-style: solid;
217
-
218
- svg {
219
- width: 10px;
220
- height: 10px;
221
- }
222
- }
223
- }
@@ -1,60 +0,0 @@
1
- /**
2
- ** BODYBOX
3
- ** Used on any div.
4
- **
5
- ** EXAMPLE:
6
- ** <LayoutItem layout="left">
7
- ** <div className="c-bodybox">En tekstboks som flyter til venstre.</div>
8
- ** </LayoutItem>
9
- **
10
- ** Attribute modifier used to display info on author etc. in license view
11
- **/
12
-
13
- .c-bodybox {
14
- padding: $spacing * 1.5;
15
- margin-top: $spacing--large;
16
- margin-bottom: $spacing--large;
17
- border-style: solid;
18
- border-color: $brand-color--tertiary;
19
- border-width: 1px;
20
- overflow: hidden;
21
-
22
- &--attribute {
23
- padding: $spacing--small $spacing;
24
- display: inline-block;
25
- clear: both;
26
- font-style: italic;
27
- }
28
-
29
- &--translation {
30
- padding: 0 $spacing--large $spacing--small $spacing;
31
- }
32
- }
33
-
34
- .c-bodybox {
35
- .c-figure {
36
- width: 100% !important;
37
- left: auto !important;
38
- padding: 0;
39
-
40
- &.u-float-right,
41
- &.u-float-small-right {
42
- width: 50% !important;
43
- margin-right: 0;
44
- }
45
-
46
- &.u-float-left,
47
- &.u-float-small-left {
48
- width: 50% !important;
49
- margin-left: 0;
50
- }
51
- }
52
- }
53
-
54
- .c-bodybox > *:first-child {
55
- margin-top: 0;
56
- }
57
-
58
- .c-bodybox > *:last-child {
59
- margin-bottom: 0;
60
- }