@aarhus-university/au-lib-react-components 11.3.3 → 11.4.1

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 (97) hide show
  1. package/.eslintrc.js +34 -34
  2. package/.storybook/main.js +20 -20
  3. package/.storybook/preview.js +17 -17
  4. package/README.md +19 -19
  5. package/__tests__/jest/AUButtonComponent.test.tsx +165 -165
  6. package/__tests__/jest/AUErrorComponent.test.tsx +142 -142
  7. package/__tests__/jest/AUModalComponent.test.tsx +186 -186
  8. package/__tests__/jest/AUNotificationComponent.test.tsx +115 -115
  9. package/__tests__/jest/AUSpinnerComponent.test.tsx +57 -57
  10. package/__tests__/jest/AUToolbarComponent.test.tsx +46 -46
  11. package/__tests__/jest/context.test.ts +25 -25
  12. package/__tests__/jest/helpers.test.ts +15 -15
  13. package/__tests__/jest/setupTests.ts +2 -2
  14. package/babel.config.js +8 -8
  15. package/build/umd/all.css +2 -2
  16. package/build/umd/all.js +1 -1
  17. package/build/umd/alphabox.js +1 -1
  18. package/build/umd/databox.js +1 -1
  19. package/build/umd/diagramme.js +1 -1
  20. package/build/umd/flowbox.js +1 -1
  21. package/build/umd/universe.js +1 -1
  22. package/build-storybook.log +367 -367
  23. package/package.json +114 -114
  24. package/src/components/AUAlertComponent.tsx +70 -70
  25. package/src/components/AUAutoSuggestComponent.js +158 -158
  26. package/src/components/AUButtonComponent.tsx +84 -84
  27. package/src/components/AUCalendarComponent.tsx +493 -493
  28. package/src/components/AUContentToggleComponent.tsx +47 -47
  29. package/src/components/AUDatepickerComponent.tsx +121 -121
  30. package/src/components/AUErrorComponent.tsx +78 -78
  31. package/src/components/AUMobilePrefixComponent.tsx +15 -15
  32. package/src/components/AUModalComponent.tsx +68 -68
  33. package/src/components/AUNotificationComponent.tsx +43 -43
  34. package/src/components/AUReceiptComponent.tsx +33 -33
  35. package/src/components/AUSpinnerComponent.tsx +36 -36
  36. package/src/components/AUStepComponent.tsx +47 -47
  37. package/src/components/AUSubNavComponent.tsx +48 -48
  38. package/src/components/AUSubmitButtonContainerComponent.tsx +29 -29
  39. package/src/components/AUTabbedContentComponent.tsx +145 -145
  40. package/src/components/AUTableComponent.tsx +24 -24
  41. package/src/components/AUToastComponent.tsx +104 -104
  42. package/src/components/AUToolbarComponent.tsx +101 -101
  43. package/src/components/AUTruncatorComponent.tsx +124 -129
  44. package/src/components/wrapping/AUEmbedComponent.js +47 -47
  45. package/src/layout-2016/components/alphabox/AlphaBoxComponent.js +143 -143
  46. package/src/layout-2016/components/alphabox/AlphaBoxContentComponent.js +136 -136
  47. package/src/layout-2016/components/common/AUCollapsibleComponent.js +152 -152
  48. package/src/layout-2016/components/common/AUSpinnerComponent.js +103 -103
  49. package/src/layout-2016/components/databox/DataBoxAlphabetComponent.js +144 -144
  50. package/src/layout-2016/components/databox/DataBoxAssociationComponent.js +122 -122
  51. package/src/layout-2016/components/databox/DataBoxButtonComponent.js +157 -157
  52. package/src/layout-2016/components/databox/DataBoxComponent.js +297 -297
  53. package/src/layout-2016/components/databox/DataBoxGroupingComponent.js +64 -64
  54. package/src/layout-2016/components/databox/DataBoxSearchResultComponent.js +36 -36
  55. package/src/layout-2016/components/databox/DataBoxStackedAssociationComponent.js +54 -54
  56. package/src/layout-2016/components/databox/DataBoxSuggestionComponent.js +39 -39
  57. package/src/layout-2016/components/diagramme/AUDiagrammeComponent.js +309 -309
  58. package/src/layout-2016/components/flowbox/FlowBoxComponent.js +126 -126
  59. package/src/layout-2016/components/flowbox/FlowBoxPhoneComponent.js +104 -104
  60. package/src/layout-2016/components/profile/AUProfileAvatar2016Component.js +103 -103
  61. package/src/layout-2016/components/universe/StaffTopComponent.js +363 -363
  62. package/src/layout-2016/components/universe/StudentTopComponent.js +137 -137
  63. package/src/layout-2016/components/universe/UniverseContainerComponent.js +65 -65
  64. package/src/layout-2016/lib/all.js +3 -3
  65. package/src/layout-2016/lib/au-alphabox.js +100 -100
  66. package/src/layout-2016/lib/au-databox.js +400 -400
  67. package/src/layout-2016/lib/au-diagramme.js +85 -85
  68. package/src/layout-2016/lib/au-flowbox.js +93 -93
  69. package/src/layout-2016/lib/universe.js +9 -9
  70. package/src/lib/context.tsx +51 -51
  71. package/src/lib/dates.ts +50 -50
  72. package/src/lib/helpers.ts +208 -208
  73. package/src/lib/hooks.ts +75 -75
  74. package/src/lib/i18n.ts +600 -600
  75. package/src/lib/portals.tsx +119 -119
  76. package/src/lib/tracking.ts +69 -69
  77. package/src/lib/wrapping.ts +21 -21
  78. package/src/styles/_settings.scss +10 -10
  79. package/src/styles/alphabox.scss +222 -222
  80. package/src/styles/app.scss +7 -7
  81. package/src/styles/autosuggest.scss +57 -57
  82. package/src/styles/databox.scss +563 -563
  83. package/src/styles/diagramme.scss +119 -119
  84. package/src/styles/flowbox.scss +72 -72
  85. package/src/styles/maps.scss +395 -395
  86. package/stories/AUButtonComponent.stories.tsx +127 -127
  87. package/stories/AUContentToggleComponent.stories.tsx +63 -63
  88. package/stories/AUErrorComponent.stories.tsx +98 -98
  89. package/stories/AUModalComponent.stories.tsx +83 -83
  90. package/stories/AUNotificationComponent.stories.tsx +116 -116
  91. package/stories/AUSpinnerComponent.stories.tsx +41 -41
  92. package/stories/AUStepComponent.stories.tsx +40 -40
  93. package/stories/AUToolbarComponent.stories.tsx +326 -326
  94. package/stories/AUTruncatorComponent.stories.tsx +102 -0
  95. package/stories/lib/helpers.tsx +128 -128
  96. package/tsconfig.json +46 -46
  97. package/webpack.config.js +89 -89
@@ -1,396 +1,396 @@
1
- @font-face {
2
- font-family: 'font-awesome';
3
- src: url('https://fonts.au.dk/fonts/fa-pro-regular-400.otf');
4
- font-weight: 400;
5
- font-style: normal;
6
- }
7
-
8
- $padding-default: 1.363636364rem;
9
-
10
- .layout13,
11
- .layout14,
12
- .layout15,
13
- .layout16,
14
- .layout17 {
15
- .au-map {
16
- margin-bottom: $padding-default;
17
-
18
- .react-autosuggest__container {
19
- margin-bottom: 1rem;
20
- position: relative;
21
- }
22
-
23
- .react-autosuggest__suggestions-container {
24
- max-height: none;
25
- overflow: visible;
26
-
27
- li:nth-child(n+21) {
28
- display: none;
29
- }
30
- }
31
-
32
- .gm-style-iw {
33
-
34
- .au_collapsible,
35
- hr {
36
- display: none;
37
- }
38
- }
39
-
40
- &__search {
41
- display: flex;
42
-
43
- >div {
44
- flex-basis: 85%;
45
-
46
- @media (max-width: 640px) {
47
- flex-basis: 76%;
48
- }
49
- }
50
-
51
- button {
52
- flex-basis: 15%;
53
- font-family: 'AUPassataRegular';
54
- border-top: 1px solid #ccc;
55
- border-right: 1px solid #ccc;
56
- border-bottom: 1px solid #ccc;
57
- height: 2.6 * $padding-default;
58
- cursor: pointer;
59
- background: none;
60
- color: black;
61
- padding: 0;
62
-
63
- &:hover {
64
- background: none;
65
- color: inherit;
66
- }
67
-
68
- span::before {
69
- font-family: 'font-awesome';
70
- content: '\f5a0';
71
- display: inline-block;
72
- margin-right: 1rem;
73
- }
74
-
75
- @media (max-width: 640px) {
76
- flex-basis: 24%;
77
- }
78
- }
79
- }
80
-
81
- &__overlay-buttons {
82
- display: flex;
83
- flex-wrap: wrap;
84
-
85
- button {
86
- margin-right: 1rem;
87
- }
88
- }
89
-
90
- &__person-suggestion {
91
- >div {
92
- &:first-child {
93
- padding-left: $padding-default;
94
- width: 15%;
95
- }
96
-
97
- &:last-child {
98
- padding-left: $padding-default;
99
- width: 85%;
100
- }
101
- }
102
-
103
- h4,
104
- p {
105
- margin: 0;
106
- }
107
-
108
- img {
109
- max-width: 100px;
110
- }
111
- }
112
-
113
- .vcard,
114
- .bld-card,
115
- .overlay-card,
116
- .top-search {
117
- >h2 {
118
- margin-top: 0;
119
- }
120
-
121
- button {
122
- cursor: pointer;
123
- text-decoration: underline;
124
- font-family: inherit;
125
- text-align: left;
126
- }
127
-
128
- strong button {
129
- font-weight: bold;
130
- }
131
-
132
- @media (max-width: 640px) {
133
- padding: $padding-default 0;
134
- }
135
- }
136
-
137
- .vcard {
138
- img {
139
- float: right;
140
- margin-left: $padding-default;
141
- margin-bottom: $padding-default;
142
- max-width: 120px;
143
- }
144
-
145
- &::after {
146
- display: block;
147
- content: '';
148
- clear: both;
149
- }
150
- }
151
-
152
- &__route {
153
- margin-bottom: $padding-default;
154
- }
155
-
156
- .show-on-map {
157
- display: none;
158
- }
159
-
160
- .au_collapsible {
161
- .csc-header+* {
162
- position: relative;
163
- max-height: 350px;
164
- overflow-y: auto;
165
- }
166
- }
167
-
168
- &__directions-panel {
169
- display: flex;
170
- flex-wrap: wrap;
171
- padding: 1rem 0 1rem 1rem;
172
- margin-bottom: 1rem;
173
- border: 1px solid #cacaca;
174
-
175
- &__modes-of-transportation {
176
- flex-basis: 100%;
177
- display: flex;
178
- }
179
-
180
- &__from-to {
181
- flex-basis: 85%;
182
- }
183
-
184
- &__swap {
185
- flex-basis: 15%;
186
- display: flex;
187
- align-items: center;
188
- justify-content: center;
189
- }
190
-
191
- .button-route {
192
- background-color: transparent;
193
- color: #878787;
194
- height: 3rem;
195
- overflow: hidden;
196
- padding: 0;
197
- margin-right: 1rem;
198
- display: inline-flex;
199
- border: none;
200
-
201
- &--selected {
202
- border-bottom: 2px solid black;
203
- }
204
-
205
- &::before {
206
- font-family: 'font-awesome';
207
- font-size: 2rem;
208
- display: inline-block;
209
- }
210
-
211
- &--car {
212
- width: 22px;
213
-
214
- &::before {
215
- content: '\f1b9';
216
- }
217
- }
218
-
219
- &--walk {
220
- width: 13px;
221
-
222
- &::before {
223
- content: '\f554';
224
- }
225
- }
226
-
227
- &--bicycle {
228
- width: 27px;
229
-
230
- &::before {
231
- content: '\f206';
232
- }
233
- }
234
-
235
- &--public {
236
- width: 22px;
237
- padding-top: 4px;
238
-
239
- &::before {
240
- content: '\f207';
241
- }
242
- }
243
-
244
- &--close {
245
- margin-left: auto;
246
- width: 14px;
247
-
248
- &::before {
249
- content: '\f00d';
250
- }
251
- }
252
-
253
- &--swap {
254
- margin: 0 0 1.45455rem 0;
255
- width: 24px;
256
-
257
- &::before {
258
- font-size: 3rem;
259
- content: '\f883';
260
- }
261
- }
262
- }
263
- }
264
-
265
- &__suggestion {
266
- display: inline-block;
267
-
268
- &::before {
269
- font-family: 'font-awesome';
270
- display: inline-block;
271
- margin-right: .5rem;
272
- }
273
-
274
- &__building {
275
- &::before {
276
- content: '\f1ad';
277
- }
278
- }
279
-
280
- &__department {
281
- &::before {
282
- content: '\f19c';
283
- }
284
- }
285
-
286
- &__denmark {
287
- &::before {
288
- content: '\f1ad';
289
- }
290
- }
291
-
292
- &__denmark {
293
- &::before {
294
- content: '\f276';
295
- }
296
- }
297
-
298
- &__lecture-hall {
299
- &::before {
300
- content: '\f63d';
301
- }
302
- }
303
-
304
- &__library {
305
- &::before {
306
- content: '\f02d';
307
- }
308
- }
309
-
310
- &__friday-bar {
311
- &::before {
312
- content: '\f0fc';
313
- }
314
- }
315
-
316
- &__study-place {
317
- &::before {
318
- content: '\f63d';
319
- }
320
- }
321
-
322
- &__canteen {
323
- &::before {
324
- content: '\f2e7';
325
- }
326
- }
327
-
328
- &__counselling {
329
- &::before {
330
- content: '\f128';
331
- }
332
- }
333
-
334
- &__it-support {
335
- &::before {
336
- content: '\f82d';
337
- }
338
- }
339
-
340
- &__myprint {
341
- &::before {
342
- content: '\f02f';
343
- }
344
- }
345
- }
346
-
347
- }
348
-
349
- .au-map.find-container,
350
- .dropdown-pane .find-container {
351
-
352
- >.row>.column {
353
- position: relative;
354
- }
355
-
356
- h3 {
357
- margin-top: 0;
358
- }
359
-
360
- .au-map__person-suggestion {
361
- img {
362
- max-width: 30px;
363
- }
364
- }
365
-
366
- .react-autosuggest__suggestions-container li {
367
- margin-bottom: 0;
368
- }
369
-
370
- .vcard,
371
- .bld-card {
372
- margin-top: $padding-default;
373
- padding: 1rem;
374
- background: #fff;
375
- color: #333;
376
- font-size: 1.25rem;
377
- font-family: Georgia, "Times New Roman", Times, serif;
378
-
379
- hr {
380
- display: none;
381
- }
382
-
383
- img {
384
- width: 70px;
385
- float: right;
386
- margin-left: 1rem;
387
- }
388
-
389
- a {
390
- color: #000 !important;
391
- text-decoration: underline;
392
- }
393
- }
394
- }
395
-
1
+ @font-face {
2
+ font-family: 'font-awesome';
3
+ src: url('https://fonts.au.dk/fonts/fa-pro-regular-400.otf');
4
+ font-weight: 400;
5
+ font-style: normal;
6
+ }
7
+
8
+ $padding-default: 1.363636364rem;
9
+
10
+ .layout13,
11
+ .layout14,
12
+ .layout15,
13
+ .layout16,
14
+ .layout17 {
15
+ .au-map {
16
+ margin-bottom: $padding-default;
17
+
18
+ .react-autosuggest__container {
19
+ margin-bottom: 1rem;
20
+ position: relative;
21
+ }
22
+
23
+ .react-autosuggest__suggestions-container {
24
+ max-height: none;
25
+ overflow: visible;
26
+
27
+ li:nth-child(n+21) {
28
+ display: none;
29
+ }
30
+ }
31
+
32
+ .gm-style-iw {
33
+
34
+ .au_collapsible,
35
+ hr {
36
+ display: none;
37
+ }
38
+ }
39
+
40
+ &__search {
41
+ display: flex;
42
+
43
+ >div {
44
+ flex-basis: 85%;
45
+
46
+ @media (max-width: 640px) {
47
+ flex-basis: 76%;
48
+ }
49
+ }
50
+
51
+ button {
52
+ flex-basis: 15%;
53
+ font-family: 'AUPassataRegular';
54
+ border-top: 1px solid #ccc;
55
+ border-right: 1px solid #ccc;
56
+ border-bottom: 1px solid #ccc;
57
+ height: 2.6 * $padding-default;
58
+ cursor: pointer;
59
+ background: none;
60
+ color: black;
61
+ padding: 0;
62
+
63
+ &:hover {
64
+ background: none;
65
+ color: inherit;
66
+ }
67
+
68
+ span::before {
69
+ font-family: 'font-awesome';
70
+ content: '\f5a0';
71
+ display: inline-block;
72
+ margin-right: 1rem;
73
+ }
74
+
75
+ @media (max-width: 640px) {
76
+ flex-basis: 24%;
77
+ }
78
+ }
79
+ }
80
+
81
+ &__overlay-buttons {
82
+ display: flex;
83
+ flex-wrap: wrap;
84
+
85
+ button {
86
+ margin-right: 1rem;
87
+ }
88
+ }
89
+
90
+ &__person-suggestion {
91
+ >div {
92
+ &:first-child {
93
+ padding-left: $padding-default;
94
+ width: 15%;
95
+ }
96
+
97
+ &:last-child {
98
+ padding-left: $padding-default;
99
+ width: 85%;
100
+ }
101
+ }
102
+
103
+ h4,
104
+ p {
105
+ margin: 0;
106
+ }
107
+
108
+ img {
109
+ max-width: 100px;
110
+ }
111
+ }
112
+
113
+ .vcard,
114
+ .bld-card,
115
+ .overlay-card,
116
+ .top-search {
117
+ >h2 {
118
+ margin-top: 0;
119
+ }
120
+
121
+ button {
122
+ cursor: pointer;
123
+ text-decoration: underline;
124
+ font-family: inherit;
125
+ text-align: left;
126
+ }
127
+
128
+ strong button {
129
+ font-weight: bold;
130
+ }
131
+
132
+ @media (max-width: 640px) {
133
+ padding: $padding-default 0;
134
+ }
135
+ }
136
+
137
+ .vcard {
138
+ img {
139
+ float: right;
140
+ margin-left: $padding-default;
141
+ margin-bottom: $padding-default;
142
+ max-width: 120px;
143
+ }
144
+
145
+ &::after {
146
+ display: block;
147
+ content: '';
148
+ clear: both;
149
+ }
150
+ }
151
+
152
+ &__route {
153
+ margin-bottom: $padding-default;
154
+ }
155
+
156
+ .show-on-map {
157
+ display: none;
158
+ }
159
+
160
+ .au_collapsible {
161
+ .csc-header+* {
162
+ position: relative;
163
+ max-height: 350px;
164
+ overflow-y: auto;
165
+ }
166
+ }
167
+
168
+ &__directions-panel {
169
+ display: flex;
170
+ flex-wrap: wrap;
171
+ padding: 1rem 0 1rem 1rem;
172
+ margin-bottom: 1rem;
173
+ border: 1px solid #cacaca;
174
+
175
+ &__modes-of-transportation {
176
+ flex-basis: 100%;
177
+ display: flex;
178
+ }
179
+
180
+ &__from-to {
181
+ flex-basis: 85%;
182
+ }
183
+
184
+ &__swap {
185
+ flex-basis: 15%;
186
+ display: flex;
187
+ align-items: center;
188
+ justify-content: center;
189
+ }
190
+
191
+ .button-route {
192
+ background-color: transparent;
193
+ color: #878787;
194
+ height: 3rem;
195
+ overflow: hidden;
196
+ padding: 0;
197
+ margin-right: 1rem;
198
+ display: inline-flex;
199
+ border: none;
200
+
201
+ &--selected {
202
+ border-bottom: 2px solid black;
203
+ }
204
+
205
+ &::before {
206
+ font-family: 'font-awesome';
207
+ font-size: 2rem;
208
+ display: inline-block;
209
+ }
210
+
211
+ &--car {
212
+ width: 22px;
213
+
214
+ &::before {
215
+ content: '\f1b9';
216
+ }
217
+ }
218
+
219
+ &--walk {
220
+ width: 13px;
221
+
222
+ &::before {
223
+ content: '\f554';
224
+ }
225
+ }
226
+
227
+ &--bicycle {
228
+ width: 27px;
229
+
230
+ &::before {
231
+ content: '\f206';
232
+ }
233
+ }
234
+
235
+ &--public {
236
+ width: 22px;
237
+ padding-top: 4px;
238
+
239
+ &::before {
240
+ content: '\f207';
241
+ }
242
+ }
243
+
244
+ &--close {
245
+ margin-left: auto;
246
+ width: 14px;
247
+
248
+ &::before {
249
+ content: '\f00d';
250
+ }
251
+ }
252
+
253
+ &--swap {
254
+ margin: 0 0 1.45455rem 0;
255
+ width: 24px;
256
+
257
+ &::before {
258
+ font-size: 3rem;
259
+ content: '\f883';
260
+ }
261
+ }
262
+ }
263
+ }
264
+
265
+ &__suggestion {
266
+ display: inline-block;
267
+
268
+ &::before {
269
+ font-family: 'font-awesome';
270
+ display: inline-block;
271
+ margin-right: .5rem;
272
+ }
273
+
274
+ &__building {
275
+ &::before {
276
+ content: '\f1ad';
277
+ }
278
+ }
279
+
280
+ &__department {
281
+ &::before {
282
+ content: '\f19c';
283
+ }
284
+ }
285
+
286
+ &__denmark {
287
+ &::before {
288
+ content: '\f1ad';
289
+ }
290
+ }
291
+
292
+ &__denmark {
293
+ &::before {
294
+ content: '\f276';
295
+ }
296
+ }
297
+
298
+ &__lecture-hall {
299
+ &::before {
300
+ content: '\f63d';
301
+ }
302
+ }
303
+
304
+ &__library {
305
+ &::before {
306
+ content: '\f02d';
307
+ }
308
+ }
309
+
310
+ &__friday-bar {
311
+ &::before {
312
+ content: '\f0fc';
313
+ }
314
+ }
315
+
316
+ &__study-place {
317
+ &::before {
318
+ content: '\f63d';
319
+ }
320
+ }
321
+
322
+ &__canteen {
323
+ &::before {
324
+ content: '\f2e7';
325
+ }
326
+ }
327
+
328
+ &__counselling {
329
+ &::before {
330
+ content: '\f128';
331
+ }
332
+ }
333
+
334
+ &__it-support {
335
+ &::before {
336
+ content: '\f82d';
337
+ }
338
+ }
339
+
340
+ &__myprint {
341
+ &::before {
342
+ content: '\f02f';
343
+ }
344
+ }
345
+ }
346
+
347
+ }
348
+
349
+ .au-map.find-container,
350
+ .dropdown-pane .find-container {
351
+
352
+ >.row>.column {
353
+ position: relative;
354
+ }
355
+
356
+ h3 {
357
+ margin-top: 0;
358
+ }
359
+
360
+ .au-map__person-suggestion {
361
+ img {
362
+ max-width: 30px;
363
+ }
364
+ }
365
+
366
+ .react-autosuggest__suggestions-container li {
367
+ margin-bottom: 0;
368
+ }
369
+
370
+ .vcard,
371
+ .bld-card {
372
+ margin-top: $padding-default;
373
+ padding: 1rem;
374
+ background: #fff;
375
+ color: #333;
376
+ font-size: 1.25rem;
377
+ font-family: Georgia, "Times New Roman", Times, serif;
378
+
379
+ hr {
380
+ display: none;
381
+ }
382
+
383
+ img {
384
+ width: 70px;
385
+ float: right;
386
+ margin-left: 1rem;
387
+ }
388
+
389
+ a {
390
+ color: #000 !important;
391
+ text-decoration: underline;
392
+ }
393
+ }
394
+ }
395
+
396
396
  }