@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.
@@ -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;
@@ -0,0 +1,2 @@
1
+ export { LanguageProvider, type LanguageProviderProps } from './LanguageProvider';
2
+ export { useLanguage, type Language, type LanguageContextValue } from './LanguageContext';
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nation-a/ui",
3
- "version": "0.16.27",
3
+ "version": "0.16.28",
4
4
  "type": "module",
5
5
  "types": "./dist/types/index.d.ts",
6
6
  "main": "./dist/index.cjs",