@apolitical/component-library 8.3.26 → 8.3.28-ST.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.
- package/banners/marketing-block/index.d.ts +1 -0
- package/banners/marketing-block/marketing-block.d.ts +2 -2
- package/context/intl/intl.provider.d.ts +4 -12
- package/discussion/feeds/activities-feed/index.d.ts +1 -0
- package/discussion/sections/activity-section/mocks/course-discussion-activity-section.mock.d.ts +1 -6
- package/index.js +144 -143
- package/index.mjs +22706 -15756
- package/navigation/language-switcher/language-switcher.d.ts +4 -4
- package/navigation/language-switcher/language-switcher.helpers.d.ts +2 -2
- package/navigation/language-switcher/language-switcher.mock.d.ts +8 -27
- package/package.json +2 -1
- package/styles/uclasses/uclasses.scss +383 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TLocale } from '@apolitical/contracts';
|
|
2
2
|
export type UrlPartsType = {
|
|
3
3
|
url: string;
|
|
4
4
|
position: 'before-lang' | 'after-lang';
|
|
5
5
|
}[];
|
|
6
6
|
interface Props {
|
|
7
7
|
/** The language the content is in */
|
|
8
|
-
currentLanguage:
|
|
8
|
+
currentLanguage: TLocale;
|
|
9
9
|
/** Whether article is the original language or not */
|
|
10
10
|
isOriginalLanguage?: boolean;
|
|
11
11
|
/** Whether article has been translated by a real person or not */
|
|
12
12
|
isHumanTranslation?: boolean;
|
|
13
13
|
/** Which translations are available */
|
|
14
14
|
translations: {
|
|
15
|
-
[key in
|
|
15
|
+
[key in TLocale]?: null | {
|
|
16
16
|
post_name?: string;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
/** The function to call when the language is changed */
|
|
20
|
-
onChange?: (language?:
|
|
20
|
+
onChange?: (language?: TLocale, url?: string) => void;
|
|
21
21
|
/** Additional parts of the URL */
|
|
22
22
|
urlParts?: UrlPartsType;
|
|
23
23
|
/** The version of the language switcher to use */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TLocale } from '@apolitical/contracts';
|
|
2
2
|
import { UrlPartsType } from './language-switcher';
|
|
3
|
-
export declare const getUrl: (lang:
|
|
3
|
+
export declare const getUrl: (lang: TLocale, slug?: string, urlParts?: UrlPartsType) => string | {
|
|
4
4
|
url: string;
|
|
5
5
|
urlForRouter: string;
|
|
6
6
|
};
|
|
@@ -1,33 +1,14 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
|
|
3
|
-
let isOriginalLanguage: boolean;
|
|
4
|
-
let isHumanTranslation: boolean;
|
|
5
|
-
let urlParts: {
|
|
2
|
+
export { DEFAULT_LOCALE as currentLanguage };
|
|
3
|
+
export let isOriginalLanguage: boolean;
|
|
4
|
+
export let isHumanTranslation: boolean;
|
|
5
|
+
export let urlParts: {
|
|
6
6
|
url: string;
|
|
7
7
|
position: string;
|
|
8
8
|
}[];
|
|
9
|
-
|
|
10
|
-
en: null;
|
|
11
|
-
|
|
12
|
-
canonical_url: string;
|
|
13
|
-
post_name: string;
|
|
14
|
-
};
|
|
15
|
-
fr: {
|
|
16
|
-
canonical_url: string;
|
|
17
|
-
post_name: string;
|
|
18
|
-
};
|
|
19
|
-
pt: {
|
|
20
|
-
canonical_url: string;
|
|
21
|
-
post_name: string;
|
|
22
|
-
};
|
|
23
|
-
id: {
|
|
24
|
-
canonical_url: string;
|
|
25
|
-
post_name: string;
|
|
26
|
-
};
|
|
27
|
-
'pt-BR': {
|
|
28
|
-
canonical_url: string;
|
|
29
|
-
post_name: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
9
|
+
export namespace translations {
|
|
10
|
+
let en: null;
|
|
11
|
+
}
|
|
32
12
|
}
|
|
33
13
|
export default _default;
|
|
14
|
+
import { DEFAULT_LOCALE } from '@apolitical/contracts';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apolitical/component-library",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.28-ST.0",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"getstream": "8.4.1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@apolitical/contracts": "3.8.0-ST.0",
|
|
17
18
|
"@suprsend/react-inbox": "3.6.1",
|
|
18
19
|
"@tanstack/query-core": "5.8.3",
|
|
19
20
|
"@tanstack/react-query": "5.8.3",
|
|
@@ -239,6 +239,34 @@ $font-size-md: 1rem;
|
|
|
239
239
|
margin-top: 0;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
.u-mt-1 {
|
|
243
|
+
margin-top: 0.25rem; /* 4px */
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.u-mt-2 {
|
|
247
|
+
margin-top: 0.5rem; /* 8px */
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.u-mt-3 {
|
|
251
|
+
margin-top: 0.75rem; /* 12px */
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.u-mt-4 {
|
|
255
|
+
margin-top: 1rem; /* 16px */
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.u-mt-5 {
|
|
259
|
+
margin-top: 1.25rem; /* 20px */
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.u-mt-6 {
|
|
263
|
+
margin-top: 1.5rem; /* 24px */
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.u-mt-8 {
|
|
267
|
+
margin-top: 2rem; /* 32px */
|
|
268
|
+
}
|
|
269
|
+
|
|
242
270
|
.u-mt-10 {
|
|
243
271
|
margin-top: 2.5rem; /* 40px */
|
|
244
272
|
}
|
|
@@ -251,6 +279,38 @@ $font-size-md: 1rem;
|
|
|
251
279
|
margin-right: 0;
|
|
252
280
|
}
|
|
253
281
|
|
|
282
|
+
.u-mr-1 {
|
|
283
|
+
margin-right: 0.25rem; /* 4px */
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.u-mr-2 {
|
|
287
|
+
margin-right: 0.5rem; /* 8px */
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.u-mr-3 {
|
|
291
|
+
margin-right: 0.75rem; /* 12px */
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.u-mr-4 {
|
|
295
|
+
margin-right: 1rem; /* 16px */
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.u-mr-5 {
|
|
299
|
+
margin-right: 1.25rem; /* 20px */
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.u-mr-6 {
|
|
303
|
+
margin-right: 1.5rem; /* 24px */
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.u-mr-8 {
|
|
307
|
+
margin-right: 2rem; /* 32px */
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.u-mr-10 {
|
|
311
|
+
margin-right: 2.5rem; /* 40px */
|
|
312
|
+
}
|
|
313
|
+
|
|
254
314
|
.u-mb-auto {
|
|
255
315
|
margin-bottom: auto;
|
|
256
316
|
}
|
|
@@ -259,6 +319,38 @@ $font-size-md: 1rem;
|
|
|
259
319
|
margin-bottom: 0;
|
|
260
320
|
}
|
|
261
321
|
|
|
322
|
+
.u-mb-1 {
|
|
323
|
+
margin-bottom: 0.25rem; /* 4px */
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.u-mb-2 {
|
|
327
|
+
margin-bottom: 0.5rem; /* 8px */
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.u-mb-3 {
|
|
331
|
+
margin-bottom: 0.75rem; /* 12px */
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.u-mb-4 {
|
|
335
|
+
margin-bottom: 1rem; /* 16px */
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.u-mb-5 {
|
|
339
|
+
margin-bottom: 1.25rem; /* 20px */
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.u-mb-6 {
|
|
343
|
+
margin-bottom: 1.5rem; /* 24px */
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.u-mb-8 {
|
|
347
|
+
margin-bottom: 2rem; /* 32px */
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.u-mb-10 {
|
|
351
|
+
margin-bottom: 2.5rem; /* 40px */
|
|
352
|
+
}
|
|
353
|
+
|
|
262
354
|
.u-ml-auto {
|
|
263
355
|
margin-left: auto;
|
|
264
356
|
}
|
|
@@ -267,6 +359,38 @@ $font-size-md: 1rem;
|
|
|
267
359
|
margin-left: 0;
|
|
268
360
|
}
|
|
269
361
|
|
|
362
|
+
.u-ml-1 {
|
|
363
|
+
margin-left: 0.25rem; /* 4px */
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.u-ml-2 {
|
|
367
|
+
margin-left: 0.5rem; /* 8px */
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.u-ml-3 {
|
|
371
|
+
margin-left: 0.75rem; /* 12px */
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.u-ml-4 {
|
|
375
|
+
margin-left: 1rem; /* 16px */
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.u-ml-5 {
|
|
379
|
+
margin-left: 1.25rem; /* 20px */
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.u-ml-6 {
|
|
383
|
+
margin-left: 1.5rem; /* 24px */
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.u-ml-8 {
|
|
387
|
+
margin-left: 2rem; /* 32px */
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.u-ml-10 {
|
|
391
|
+
margin-left: 2.5rem; /* 40px */
|
|
392
|
+
}
|
|
393
|
+
|
|
270
394
|
// padding
|
|
271
395
|
.u-py-0 {
|
|
272
396
|
padding-top: 0;
|
|
@@ -618,10 +742,159 @@ $font-size-md: 1rem;
|
|
|
618
742
|
}
|
|
619
743
|
|
|
620
744
|
// width
|
|
745
|
+
.u-w-0 {
|
|
746
|
+
width: 0;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.u-w-px {
|
|
750
|
+
width: 1px;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
.u-w-1 {
|
|
754
|
+
width: 0.25rem; /* 4px */
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.u-w-2 {
|
|
758
|
+
width: 0.5rem; /* 8px */
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.u-w-3 {
|
|
762
|
+
width: 0.75rem; /* 12px */
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.u-w-4 {
|
|
766
|
+
width: 1rem; /* 16px */
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.u-w-5 {
|
|
770
|
+
width: 1.25rem; /* 20px */
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.u-w-6 {
|
|
774
|
+
width: 1.5rem; /* 24px */
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.u-w-8 {
|
|
778
|
+
width: 2rem; /* 32px */
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
.u-w-10 {
|
|
782
|
+
width: 2.5rem; /* 40px */
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.u-w-12 {
|
|
786
|
+
width: 3rem; /* 48px */
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.u-w-16 {
|
|
790
|
+
width: 4rem; /* 64px */
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.u-w-20 {
|
|
794
|
+
width: 5rem; /* 80px */
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.u-w-24 {
|
|
798
|
+
width: 6rem; /* 96px */
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
.u-w-32 {
|
|
802
|
+
width: 8rem; /* 128px */
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.u-w-40 {
|
|
806
|
+
width: 10rem; /* 160px */
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.u-w-48 {
|
|
810
|
+
width: 12rem; /* 192px */
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.u-w-auto {
|
|
814
|
+
width: auto;
|
|
815
|
+
}
|
|
816
|
+
|
|
621
817
|
.u-w-full {
|
|
622
818
|
width: 100%;
|
|
623
819
|
}
|
|
624
820
|
|
|
821
|
+
// height
|
|
822
|
+
.u-h-0 {
|
|
823
|
+
height: 0;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.u-h-px {
|
|
827
|
+
height: 1px;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.u-h-1 {
|
|
831
|
+
height: 0.25rem; /* 4px */
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.u-h-2 {
|
|
835
|
+
height: 0.5rem; /* 8px */
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.u-h-3 {
|
|
839
|
+
height: 0.75rem; /* 12px */
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
.u-h-4 {
|
|
843
|
+
height: 1rem; /* 16px */
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.u-h-5 {
|
|
847
|
+
height: 1.25rem; /* 20px */
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
.u-h-6 {
|
|
851
|
+
height: 1.5rem; /* 24px */
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.u-h-8 {
|
|
855
|
+
height: 2rem; /* 32px */
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.u-h-10 {
|
|
859
|
+
height: 2.5rem; /* 40px */
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.u-h-12 {
|
|
863
|
+
height: 3rem; /* 48px */
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
.u-h-16 {
|
|
867
|
+
height: 4rem; /* 64px */
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.u-h-20 {
|
|
871
|
+
height: 5rem; /* 80px */
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.u-h-24 {
|
|
875
|
+
height: 6rem; /* 96px */
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.u-h-32 {
|
|
879
|
+
height: 8rem; /* 128px */
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
.u-h-40 {
|
|
883
|
+
height: 10rem; /* 160px */
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.u-h-48 {
|
|
887
|
+
height: 12rem; /* 192px */
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
.u-h-auto {
|
|
891
|
+
height: auto;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
.u-h-full {
|
|
895
|
+
height: 100%;
|
|
896
|
+
}
|
|
897
|
+
|
|
625
898
|
// max-width
|
|
626
899
|
.u-max-w-0 {
|
|
627
900
|
max-width: 0;
|
|
@@ -1250,3 +1523,113 @@ $font-size-md: 1rem;
|
|
|
1250
1523
|
.u-gap-y-72 {
|
|
1251
1524
|
row-gap: 18rem; /* 288px */
|
|
1252
1525
|
}
|
|
1526
|
+
|
|
1527
|
+
// font-weight
|
|
1528
|
+
.u-font-medium {
|
|
1529
|
+
font-weight: 500;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
.u-font-semibold {
|
|
1533
|
+
font-weight: 600;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
.u-font-bold {
|
|
1537
|
+
font-weight: 700;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
// border-radius
|
|
1541
|
+
.u-rounded-none {
|
|
1542
|
+
border-radius: 0;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.u-rounded {
|
|
1546
|
+
border-radius: 0.25rem; /* 4px */
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
.u-rounded-md {
|
|
1550
|
+
border-radius: 0.375rem; /* 6px */
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
.u-rounded-lg {
|
|
1554
|
+
border-radius: 0.5rem; /* 8px */
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
.u-rounded-xl {
|
|
1558
|
+
border-radius: 0.75rem; /* 12px */
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
.u-rounded-2xl {
|
|
1562
|
+
border-radius: 1rem; /* 16px */
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
.u-rounded-3xl {
|
|
1566
|
+
border-radius: 1.5rem; /* 24px */
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
.u-rounded-full {
|
|
1570
|
+
border-radius: 9999px; /* 50% */
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
// flex-basis
|
|
1574
|
+
.u-basis-0 {
|
|
1575
|
+
flex-basis: 0;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
.u-basis-1 {
|
|
1579
|
+
flex-basis: 0.25rem; /* 4px */
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
.u-basis-2 {
|
|
1583
|
+
flex-basis: 0.5rem; /* 8px */
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
.u-basis-3 {
|
|
1587
|
+
flex-basis: 0.75rem; /* 12px */
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
.u-basis-4 {
|
|
1591
|
+
flex-basis: 1rem; /* 16px */
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
.u-basis-5 {
|
|
1595
|
+
flex-basis: 1.25rem; /* 20px */
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.u-basis-6 {
|
|
1599
|
+
flex-basis: 1.5rem; /* 24px */
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
.u-basis-auto {
|
|
1603
|
+
flex-basis: auto;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
.u-basis-full {
|
|
1607
|
+
flex-basis: 100%;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
.u-line-clamp-2 {
|
|
1611
|
+
display: -webkit-box;
|
|
1612
|
+
-webkit-box-orient: vertical;
|
|
1613
|
+
-webkit-line-clamp: 2;
|
|
1614
|
+
line-clamp: 2;
|
|
1615
|
+
overflow: hidden;
|
|
1616
|
+
text-overflow: ellipsis;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.u-line-clamp-3 {
|
|
1620
|
+
display: -webkit-box;
|
|
1621
|
+
-webkit-box-orient: vertical;
|
|
1622
|
+
-webkit-line-clamp: 3;
|
|
1623
|
+
line-clamp: 3;
|
|
1624
|
+
overflow: hidden;
|
|
1625
|
+
text-overflow: ellipsis;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
.u-line-clamp-4 {
|
|
1629
|
+
display: -webkit-box;
|
|
1630
|
+
-webkit-box-orient: vertical;
|
|
1631
|
+
-webkit-line-clamp: 4;
|
|
1632
|
+
line-clamp: 4;
|
|
1633
|
+
overflow: hidden;
|
|
1634
|
+
text-overflow: ellipsis;
|
|
1635
|
+
}
|