@ethnolib/language-chooser-react-mui 0.0.20 → 0.0.22

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,11 +1,14 @@
1
1
  import { ILanguage } from '@ethnolib/find-language';
2
2
  import { IOrthography } from '@ethnolib/language-chooser-react-hook';
3
3
  import { FuseResult } from 'fuse.js';
4
- export declare const LanguageChooser: React.FunctionComponent<{
4
+ export declare const languageChooserMuiTheme: import('@mui/material').Theme;
5
+ export interface ILanguageChooserProps {
5
6
  searchResultModifier: (results: FuseResult<ILanguage>[], searchString: string) => ILanguage[];
6
7
  initialSearchString?: string;
7
8
  initialSelectionLanguageTag?: string;
8
9
  initialCustomDisplayName?: string;
9
- onClose: (languageSelection: IOrthography | undefined, languageTag: string | undefined) => void;
10
+ onSelectionChange?: (orthographyInfo: IOrthography | undefined, languageTag: string | undefined) => void;
10
11
  rightPanelComponent?: React.ReactNode;
11
- }>;
12
+ actionButtons?: React.ReactNode;
13
+ }
14
+ export declare const LanguageChooser: React.FunctionComponent<ILanguageChooserProps>;
@@ -0,0 +1,10 @@
1
+ import { ILanguageChooserProps } from '../LanguageChooser';
2
+ import { IOrthography } from '@ethnolib/language-chooser-react-hook';
3
+ import { default as React } from 'react';
4
+ export declare const LanguageChooserDialog: React.FunctionComponent<{
5
+ open: boolean;
6
+ onOk: (selection: IOrthography, languageTag: string) => void;
7
+ onCancel: () => void;
8
+ dialogWidth?: string;
9
+ dialogHeight?: string;
10
+ } & ILanguageChooserProps>;
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './LanguageChooser';
2
2
  export { defaultSearchResultModifier, createTag, } from '@ethnolib/find-language';
3
3
  export type { ILanguage, IScript, IRegion } from '@ethnolib/find-language';
4
- export { isUnlistedLanguage, createTagFromOrthography, } from '@ethnolib/language-chooser-react-hook';
4
+ export { isUnlistedLanguage, createTagFromOrthography, parseLangtagFromLangChooser, defaultDisplayName, defaultRegionForLangTag, } from '@ethnolib/language-chooser-react-hook';
5
5
  export type { IOrthography, ICustomizableLanguageDetails, } from '@ethnolib/language-chooser-react-hook';