@apolitical/component-library 8.3.29 → 8.3.30

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.
@@ -1,23 +1,23 @@
1
- import { LanguageType } from '../../context';
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: LanguageType;
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 LanguageType]?: null | {
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?: LanguageType, url?: string) => void;
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 { LanguageType } from '../../context';
1
+ import { TLocale } from '@apolitical/contracts';
2
2
  import { UrlPartsType } from './language-switcher';
3
- export declare const getUrl: (lang: LanguageType, slug?: string, urlParts?: UrlPartsType) => string | {
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
- let currentLanguage: string;
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
- let translations: {
10
- en: null;
11
- es: {
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.29",
3
+ "version": "8.3.30",
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.9.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",
@@ -54,6 +54,10 @@ $font-size-md: 1rem;
54
54
  color: get-map($default-colors, 'error600');
55
55
  }
56
56
 
57
+ .u-primary-text {
58
+ color: get-map($default-colors, 'b700');
59
+ }
60
+
57
61
  // Background
58
62
  .u-bg-n50 {
59
63
  background-color: get-map($default-colors, 'n50');
@@ -391,6 +395,14 @@ $font-size-md: 1rem;
391
395
  margin-left: 2.5rem; /* 40px */
392
396
  }
393
397
 
398
+ .u-ml-minus-1 {
399
+ margin-left: -0.25rem; /* 4px */
400
+ }
401
+
402
+ .u-ml-minus-2 {
403
+ margin-left: -0.5rem; /* 8px */
404
+ }
405
+
394
406
  // padding
395
407
  .u-py-0 {
396
408
  padding-top: 0;
@@ -1537,6 +1549,10 @@ $font-size-md: 1rem;
1537
1549
  font-weight: 700;
1538
1550
  }
1539
1551
 
1552
+ .u-font-black {
1553
+ font-weight: 900;
1554
+ }
1555
+
1540
1556
  // border-radius
1541
1557
  .u-rounded-none {
1542
1558
  border-radius: 0;