@apolitical/component-library 3.1.0-beta.2 → 3.2.0-beta.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/cards/card/components/links/links.d.ts +1 -1
- package/context/flags/flags.provider.d.ts +1 -1
- package/context/intl/intl.provider.d.ts +13 -1
- package/general/link/link.d.ts +1 -1
- package/index.js +18 -18
- package/index.mjs +1833 -1803
- package/navigation/language-switcher/language-switcher.d.ts +2 -8
- package/navigation/language-switcher/language-switcher.helpers.d.ts +6 -2
- package/package.json +1 -1
- package/text/markdown-text/components/div/div.d.ts +1 -1
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
en: string;
|
|
3
|
-
es: string;
|
|
4
|
-
fr: string;
|
|
5
|
-
pt: string;
|
|
6
|
-
};
|
|
7
|
-
export type LanguageType = keyof typeof supportedLanguages;
|
|
1
|
+
import { LanguageType } from '../../context';
|
|
8
2
|
export type UrlPartsType = {
|
|
9
3
|
url: string;
|
|
10
4
|
position: 'before-lang' | 'after-lang';
|
|
@@ -23,7 +17,7 @@ interface Props {
|
|
|
23
17
|
};
|
|
24
18
|
};
|
|
25
19
|
/** The function to call when the language is changed */
|
|
26
|
-
onChange?: (language?: LanguageType) => void;
|
|
20
|
+
onChange?: (language?: LanguageType, url?: string) => void;
|
|
27
21
|
/** Additional parts of the URL */
|
|
28
22
|
urlParts?: UrlPartsType;
|
|
29
23
|
/** The version of the language switcher to use */
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { LanguageType
|
|
2
|
-
|
|
1
|
+
import { LanguageType } from '../../context';
|
|
2
|
+
import { UrlPartsType } from './language-switcher';
|
|
3
|
+
export declare const getUrl: (lang: LanguageType, slug?: string, urlParts?: UrlPartsType) => string | {
|
|
4
|
+
url: string;
|
|
5
|
+
urlForRouter: string;
|
|
6
|
+
};
|
package/package.json
CHANGED
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
declare const _default: ({ children, ...props }: {
|
|
3
3
|
children: React.ReactNode | string;
|
|
4
4
|
class?: string | undefined;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}) => string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
6
6
|
export default _default;
|