@nation-a/ui 0.16.27 → 0.16.28
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/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1555 -1528
- package/dist/index.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types/components/LanguageProvider/LanguageContext.d.ts +10 -0
- package/dist/types/components/LanguageProvider/LanguageProvider.d.ts +8 -0
- package/dist/types/components/LanguageProvider/index.d.ts +2 -0
- package/dist/types/components/Text/Text.stories.d.ts +3 -0
- package/dist/types/components/Toast/toast.recipe.d.ts +18 -0
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type Language = 'en' | 'ko';
|
|
2
|
+
export interface LanguageContextValue {
|
|
3
|
+
language: Language;
|
|
4
|
+
setLanguage: (language: Language) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const LanguageContext: import('react').Context<LanguageContextValue | undefined>;
|
|
7
|
+
export declare const useLanguage: () => {
|
|
8
|
+
language: Language;
|
|
9
|
+
setLanguage: ((language: Language) => void) | undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Language } from './LanguageContext';
|
|
3
|
+
export interface LanguageProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
defaultLanguage?: Language;
|
|
6
|
+
language?: Language;
|
|
7
|
+
}
|
|
8
|
+
export declare const LanguageProvider: ({ children, defaultLanguage, language }: LanguageProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,3 +4,6 @@ declare const meta: Meta<typeof Text>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Typography: Story;
|
|
7
|
+
export declare const WithLanguageProvider: Story;
|
|
8
|
+
export declare const KoreanLanguage: Story;
|
|
9
|
+
export declare const EnglishLanguage: Story;
|
|
@@ -13,6 +13,24 @@ export declare const toastRecipe: import('../../../styled-system/types').SlotRec
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
language: {
|
|
17
|
+
en: {
|
|
18
|
+
description: {
|
|
19
|
+
textStyle: "en.text.body.14.bold";
|
|
20
|
+
};
|
|
21
|
+
actionTrigger: {
|
|
22
|
+
textStyle: "en.text.body.14.bold";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
ko: {
|
|
26
|
+
description: {
|
|
27
|
+
textStyle: "ko.text.body.14.bold";
|
|
28
|
+
};
|
|
29
|
+
actionTrigger: {
|
|
30
|
+
textStyle: "ko.text.body.14.bold";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
16
34
|
asLink: {
|
|
17
35
|
true: {
|
|
18
36
|
actionTrigger: {
|
|
@@ -18,3 +18,4 @@ export { default as Switch, type SwitchProps } from './Switch';
|
|
|
18
18
|
export { default as Fab, type FabProps } from './Fab';
|
|
19
19
|
export { default as List, type ListProps, type ListItemProps } from './List';
|
|
20
20
|
export * from './Layout';
|
|
21
|
+
export { LanguageProvider, useLanguage, type Language, type LanguageContextValue } from './LanguageProvider';
|