@yamada-ui/react 2.2.7-dev-20260817094722 → 2.2.7-dev-20260817110843
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/cjs/index.cjs +0 -2
- package/dist/cjs/providers/i18n-provider/i18n-provider.cjs +68 -32
- package/dist/cjs/providers/i18n-provider/i18n-provider.cjs.map +1 -1
- package/dist/cjs/providers/i18n-provider/index.cjs +0 -1
- package/dist/cjs/providers/ui-provider/ui-provider.cjs +4 -1
- package/dist/cjs/providers/ui-provider/ui-provider.cjs.map +1 -1
- package/dist/esm/index.js +2 -3
- package/dist/esm/providers/i18n-provider/i18n-provider.js +69 -32
- package/dist/esm/providers/i18n-provider/i18n-provider.js.map +1 -1
- package/dist/esm/providers/i18n-provider/index.js +2 -2
- package/dist/esm/providers/ui-provider/ui-provider.js +4 -1
- package/dist/esm/providers/ui-provider/ui-provider.js.map +1 -1
- package/dist/types/components/chart/polar-chart.style.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/providers/i18n-provider/i18n-provider.d.ts +5 -2
- package/dist/types/providers/i18n-provider/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -12,36 +12,72 @@ const DEFAULT_LANGUAGE = {
|
|
|
12
12
|
locale: DEFAULT_LOCALE
|
|
13
13
|
};
|
|
14
14
|
const LOCALES = Object.keys(intl_default);
|
|
15
|
-
function getLanguage(locale, dir) {
|
|
16
|
-
locale ??= (0, utils_exports.createdDom)() ? navigator.language : DEFAULT_LOCALE;
|
|
17
|
-
try {
|
|
18
|
-
Intl.DateTimeFormat.supportedLocalesOf([locale]);
|
|
19
|
-
} catch (_err) {
|
|
20
|
-
locale = DEFAULT_LOCALE;
|
|
21
|
-
}
|
|
22
|
-
dir ??= (0, utils_exports.isRtl)(locale) ? "rtl" : "ltr";
|
|
23
|
-
return {
|
|
24
|
-
dir,
|
|
25
|
-
locale
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
15
|
const I18nContext = createContext({
|
|
29
16
|
...DEFAULT_LANGUAGE,
|
|
30
17
|
changeLanguage: utils_exports.noop,
|
|
31
18
|
getTranslation: () => () => "",
|
|
32
19
|
t: () => ""
|
|
33
20
|
});
|
|
34
|
-
const I18nProvider = ({ children, dir: forcedDir, formats, intl
|
|
35
|
-
const
|
|
21
|
+
const I18nProvider = ({ children, dir: forcedDir, fallbackLocale = DEFAULT_LOCALE, formats, intl: forcedIntl, intlMessageFormatOptions, locale: forcedLocale }) => {
|
|
22
|
+
const intl = useMemo(() => {
|
|
23
|
+
if (!forcedIntl) return intl_default;
|
|
24
|
+
if ((0, utils_exports.isEmptyObject)(forcedIntl)) return intl_default;
|
|
25
|
+
return forcedIntl;
|
|
26
|
+
}, [forcedIntl]);
|
|
27
|
+
const locales = useMemo(() => Object.keys(intl), [intl]);
|
|
28
|
+
const getFallbackLocale = useCallback((language) => {
|
|
29
|
+
if (language) {
|
|
30
|
+
for (const key of locales) if (key.startsWith(language)) return key;
|
|
31
|
+
}
|
|
32
|
+
if (locales.includes(fallbackLocale)) return fallbackLocale;
|
|
33
|
+
if ((0, utils_exports.createdDom)()) try {
|
|
34
|
+
const { language } = new Intl.Locale(fallbackLocale);
|
|
35
|
+
for (const key of locales) if (key.startsWith(language)) return key;
|
|
36
|
+
} catch {
|
|
37
|
+
return locales[0];
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
const language = fallbackLocale.split("-")[0];
|
|
41
|
+
for (const key of locales) if (key.startsWith(language)) return key;
|
|
42
|
+
}
|
|
43
|
+
return locales[0];
|
|
44
|
+
}, [locales, fallbackLocale]);
|
|
45
|
+
const getLocale = useCallback((forcedLocale) => {
|
|
46
|
+
if (forcedLocale) {
|
|
47
|
+
if (locales.includes(forcedLocale)) return forcedLocale;
|
|
48
|
+
const language = forcedLocale.split("-")[0];
|
|
49
|
+
return getFallbackLocale(language);
|
|
50
|
+
} else if ((0, utils_exports.createdDom)()) try {
|
|
51
|
+
const { language, region } = new Intl.Locale(navigator.language);
|
|
52
|
+
const locale = `${language}-${region}`;
|
|
53
|
+
return locales.includes(locale) ? locale : getFallbackLocale(language);
|
|
54
|
+
} catch {
|
|
55
|
+
return getFallbackLocale();
|
|
56
|
+
}
|
|
57
|
+
else return getFallbackLocale();
|
|
58
|
+
}, [locales, getFallbackLocale]);
|
|
59
|
+
const getLanguage = useCallback((locale, dir) => {
|
|
60
|
+
locale = getLocale(locale);
|
|
61
|
+
try {
|
|
62
|
+
Intl.DateTimeFormat.supportedLocalesOf([locale]);
|
|
63
|
+
} catch {
|
|
64
|
+
locale = getFallbackLocale();
|
|
65
|
+
}
|
|
66
|
+
dir ??= (0, utils_exports.isRtl)(locale) ? "rtl" : "ltr";
|
|
67
|
+
return {
|
|
68
|
+
dir,
|
|
69
|
+
locale
|
|
70
|
+
};
|
|
71
|
+
}, [getLocale, getFallbackLocale]);
|
|
72
|
+
const [{ dir, locale }, setLanguage] = useState(getLanguage(forcedLocale, forcedDir));
|
|
36
73
|
const controlled = !(0, utils_exports.isUndefined)(forcedLocale);
|
|
37
|
-
const { locale } = language;
|
|
38
74
|
const messages = useMemo(() => intl[locale], [intl, locale]);
|
|
39
75
|
const changeSystemLanguage = useCallback(() => {
|
|
40
76
|
setLanguage(getLanguage());
|
|
41
|
-
}, []);
|
|
77
|
+
}, [getLanguage]);
|
|
42
78
|
const changeLanguage = useCallback((locale, dir) => {
|
|
43
79
|
setLanguage(getLanguage(locale, dir));
|
|
44
|
-
}, []);
|
|
80
|
+
}, [getLanguage]);
|
|
45
81
|
const getValue = useCallback((path) => {
|
|
46
82
|
const value = (0, utils_exports.getMemoizedObject)(messages, path);
|
|
47
83
|
if (!(0, utils_exports.isUndefined)(value)) return value;
|
|
@@ -72,20 +108,17 @@ const I18nProvider = ({ children, dir: forcedDir, formats, intl = intl_default,
|
|
|
72
108
|
formats,
|
|
73
109
|
intlMessageFormatOptions
|
|
74
110
|
]);
|
|
75
|
-
const value = useMemo(() => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
...language,
|
|
83
|
-
...rest
|
|
84
|
-
};
|
|
85
|
-
}, [
|
|
111
|
+
const value = useMemo(() => ({
|
|
112
|
+
changeLanguage,
|
|
113
|
+
dir,
|
|
114
|
+
getTranslation,
|
|
115
|
+
locale,
|
|
116
|
+
t: getTranslation()
|
|
117
|
+
}), [
|
|
86
118
|
changeLanguage,
|
|
119
|
+
dir,
|
|
87
120
|
getTranslation,
|
|
88
|
-
|
|
121
|
+
locale
|
|
89
122
|
]);
|
|
90
123
|
useEffect(() => {
|
|
91
124
|
if (controlled) return;
|
|
@@ -96,7 +129,11 @@ const I18nProvider = ({ children, dir: forcedDir, formats, intl = intl_default,
|
|
|
96
129
|
}, [controlled, changeSystemLanguage]);
|
|
97
130
|
useUpdateEffect(() => {
|
|
98
131
|
setLanguage(getLanguage(forcedLocale, forcedDir));
|
|
99
|
-
}, [
|
|
132
|
+
}, [
|
|
133
|
+
forcedLocale,
|
|
134
|
+
forcedDir,
|
|
135
|
+
getLanguage
|
|
136
|
+
]);
|
|
100
137
|
return /* @__PURE__ */ jsx(I18nContext, {
|
|
101
138
|
value,
|
|
102
139
|
children
|
|
@@ -117,6 +154,6 @@ function useI18n(key) {
|
|
|
117
154
|
else return context;
|
|
118
155
|
}
|
|
119
156
|
//#endregion
|
|
120
|
-
export { I18nContext, I18nProvider, LOCALES,
|
|
157
|
+
export { I18nContext, I18nProvider, LOCALES, useI18n };
|
|
121
158
|
|
|
122
159
|
//# sourceMappingURL=i18n-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-provider.js","names":["INTL","createdDom","isRtl","noop","isUndefined","get","isString","isEmptyObject"],"sources":["../../../../src/providers/i18n-provider/i18n-provider.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Formats, Options } from \"intl-messageformat\"\nimport type { FC, ReactNode } from \"react\"\nimport type { TextDirection } from \"../../core\"\nimport type { AnyString, Dict, Path, Value } from \"../../utils\"\nimport type { IcuArgs } from \"./icu.types\"\nimport type { DefaultIntlData } from \"./intl\"\nimport IntlMessageFormat from \"intl-messageformat\"\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from \"react\"\nimport { DEFAULT_DIRECTION, DEFAULT_LOCALE } from \"../../core\"\nimport {\n createdDom,\n getMemoizedObject as get,\n isEmptyObject,\n isRtl,\n isString,\n isUndefined,\n noop,\n useUpdateEffect,\n} from \"../../utils\"\nimport INTL from \"./intl\"\n\nexport interface Language {\n dir: TextDirection\n locale: string\n}\n\nconst DEFAULT_LANGUAGE: Language = {\n dir: DEFAULT_DIRECTION,\n locale: DEFAULT_LOCALE,\n}\n\nexport const LOCALES = Object.keys(INTL) as readonly Locale[]\n\nexport function getLanguage(locale?: string, dir?: TextDirection): Language {\n locale ??= createdDom() ? navigator.language : DEFAULT_LOCALE\n\n try {\n Intl.DateTimeFormat.supportedLocalesOf([locale])\n } catch (_err) {\n locale = DEFAULT_LOCALE\n }\n\n dir ??= isRtl(locale) ? \"rtl\" : \"ltr\"\n\n return { dir, locale }\n}\n\ntype IntlData = DefaultIntlData\ntype IntlKey = keyof IntlData\ntype IntlPath = Path<IntlData>\n\nexport type Locale = keyof typeof INTL\n\ntype Translation<Y extends object = IntlData, M extends string = IntlPath> = <\n D extends M,\n>(\n path: D,\n ...args: IcuArgs<Value<Y, D>> extends never\n ? [replaceValues?: IcuArgs<Value<Y, D>, IntlPath | M>]\n : [replaceValues: IcuArgs<Value<Y, D>, IntlPath | M>]\n) => string\n\ninterface I18nContext<\n Y extends object = IntlData,\n M extends string = IntlPath,\n> extends Language {\n t: Translation<Y, M>\n changeLanguage: (locale?: string, dir?: TextDirection) => void\n getTranslation: (key?: IntlKey) => Translation<Y, M>\n}\n\nexport const I18nContext = createContext<I18nContext>({\n ...DEFAULT_LANGUAGE,\n changeLanguage: noop,\n getTranslation: () => () => \"\",\n t: () => \"\",\n})\n\nexport interface I18nProviderProps {\n children?: ReactNode\n /**\n * The text direction to apply to the application.\n *\n * If not provided, the direction will be determined by the locale.\n */\n dir?: TextDirection\n /**\n * The formats to pass to the `intlMessageFormat` instance.\n */\n formats?: Formats\n /**\n * The internationalization messages to apply to the application.\n *\n * This prop expects a dictionary object where the keys are locale strings (e.g., \"en-US\").\n */\n intl?: Dict\n /**\n * The options to pass to the `intlMessageFormat` instance.\n */\n intlMessageFormatOptions?: Options\n /**\n * The locale to apply to the application.\n *\n * If not provided, the locale will be determined by the browser.\n */\n locale?: AnyString | Locale\n}\n\nexport const I18nProvider: FC<I18nProviderProps> = ({\n children,\n dir: forcedDir,\n formats,\n intl = INTL as Dict,\n intlMessageFormatOptions,\n locale: forcedLocale,\n}) => {\n const [language, setLanguage] = useState(getLanguage(forcedLocale, forcedDir))\n const controlled = !isUndefined(forcedLocale)\n const { locale } = language\n\n const messages = useMemo(() => intl[locale], [intl, locale])\n\n const changeSystemLanguage = useCallback(() => {\n setLanguage(getLanguage())\n }, [])\n\n const changeLanguage = useCallback((locale?: string, dir?: TextDirection) => {\n setLanguage(getLanguage(locale, dir))\n }, [])\n\n const getValue = useCallback(\n (path: number | string) => {\n const value = get<string | undefined>(messages, path)\n\n if (!isUndefined(value)) {\n return value\n } else {\n path = path.toString().replace(/^[^.]+\\./g, \"\")\n\n return get<string | undefined>(messages, path)\n }\n },\n [messages],\n )\n\n const getTranslation = useCallback(\n (key?: IntlKey) =>\n <Y extends IntlPath>(\n path: Y,\n replaceValues?: IcuArgs<Value<IntlData, Y>, IntlPath>,\n ) => {\n const value = getValue(key ? `${key}.${path}` : path) ?? path\n\n if (isUndefined(replaceValues)) return value\n\n try {\n const resolvedReplaceValues = Object.entries(replaceValues).reduce<{\n [key: string]: any\n }>((prev, [key, pathOrValue]) => {\n if (isString(pathOrValue)) {\n const resolvedPathOrValue = String(pathOrValue)\n const value =\n getValue(\n key ? `${key}.${resolvedPathOrValue}` : resolvedPathOrValue,\n ) ?? resolvedPathOrValue\n\n prev[key] = value\n } else {\n prev[key] = pathOrValue\n }\n\n return prev\n }, {})\n\n const message = new IntlMessageFormat(\n value,\n locale,\n formats,\n intlMessageFormatOptions,\n )\n\n return message.format(resolvedReplaceValues) as string\n } catch (e) {\n if (e instanceof Error) console.warn(e.message)\n\n return value\n }\n },\n [getValue, locale, formats, intlMessageFormatOptions],\n )\n\n const value = useMemo(() => {\n const rest = { changeLanguage, getTranslation, t: getTranslation() }\n\n return { ...language, ...rest }\n }, [changeLanguage, getTranslation, language])\n\n useEffect(() => {\n if (controlled) return\n\n window.addEventListener(\"languagechange\", changeSystemLanguage)\n\n return () => {\n window.removeEventListener(\"languagechange\", changeSystemLanguage)\n }\n }, [controlled, changeSystemLanguage])\n\n useUpdateEffect(() => {\n setLanguage(getLanguage(forcedLocale, forcedDir))\n }, [forcedLocale, forcedDir])\n\n return <I18nContext value={value}>{children}</I18nContext>\n}\n\nexport function useI18n(): I18nContext\n\nexport function useI18n<Y extends IntlKey>(\n key: Y,\n): I18nContext<IntlData[Y], Path<IntlData[Y]>>\n\nexport function useI18n<Y extends IntlKey>(key?: Y) {\n const context = useContext(I18nContext)\n\n const translation = useCallback(\n <M extends Path<IntlData[Y]>>(\n path: M,\n replaceValues?: IcuArgs<\n Value<IntlData[Y], M>,\n IntlPath | Path<IntlData[Y]>\n >,\n ) => context.getTranslation(key)(path as any, replaceValues as any),\n [key, context],\n )\n\n if (isEmptyObject(context))\n return {\n ...DEFAULT_LANGUAGE,\n changeLanguage: noop,\n t: () => \"\",\n }\n\n if (key) return { ...context, t: translation }\n else return context\n}\n"],"mappings":";;;;;;;;;AAmCA,MAAM,mBAA6B;CACjC,KAAA;CACA,QAAQ;AACV;AAEA,MAAa,UAAU,OAAO,KAAKA,YAAI;AAEvC,SAAgB,YAAY,QAAiB,KAA+B;CAC1E,YAAA,GAAWC,cAAAA,WAAAA,CAAW,IAAI,UAAU,WAAW;CAE/C,IAAI;EACF,KAAK,eAAe,m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;CACX;CAEF,IAAI,KAAK,OAAO;EAAE,GAAG;EAAS,GAAG;CAAY;MACxC,OAAO;AACd"}
|
|
1
|
+
{"version":3,"file":"i18n-provider.js","names":["INTL","noop","isEmptyObject","createdDom","isRtl","isUndefined","get","isString"],"sources":["../../../../src/providers/i18n-provider/i18n-provider.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Formats, Options } from \"intl-messageformat\"\nimport type { FC, ReactNode } from \"react\"\nimport type { TextDirection } from \"../../core\"\nimport type { AnyString, Dict, Path, Value } from \"../../utils\"\nimport type { IcuArgs } from \"./icu.types\"\nimport type { DefaultIntlData } from \"./intl\"\nimport IntlMessageFormat from \"intl-messageformat\"\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from \"react\"\nimport { DEFAULT_DIRECTION, DEFAULT_LOCALE } from \"../../core\"\nimport {\n createdDom,\n getMemoizedObject as get,\n isEmptyObject,\n isRtl,\n isString,\n isUndefined,\n noop,\n useUpdateEffect,\n} from \"../../utils\"\nimport INTL from \"./intl\"\n\nexport interface Language {\n dir: TextDirection\n locale: string\n}\n\nconst DEFAULT_LANGUAGE: Language = {\n dir: DEFAULT_DIRECTION,\n locale: DEFAULT_LOCALE,\n}\n\nexport const LOCALES = Object.keys(INTL) as readonly Locale[]\n\ntype IntlData = DefaultIntlData\ntype IntlKey = keyof IntlData\ntype IntlPath = Path<IntlData>\n\nexport type Locale = keyof typeof INTL\n\ntype Translation<Y extends object = IntlData, M extends string = IntlPath> = <\n D extends M,\n>(\n path: D,\n ...args: IcuArgs<Value<Y, D>> extends never\n ? [replaceValues?: IcuArgs<Value<Y, D>, IntlPath | M>]\n : [replaceValues: IcuArgs<Value<Y, D>, IntlPath | M>]\n) => string\n\ninterface I18nContext<\n Y extends object = IntlData,\n M extends string = IntlPath,\n> extends Language {\n t: Translation<Y, M>\n changeLanguage: (locale?: string, dir?: TextDirection) => void\n getTranslation: (key?: IntlKey) => Translation<Y, M>\n}\n\nexport const I18nContext = createContext<I18nContext>({\n ...DEFAULT_LANGUAGE,\n changeLanguage: noop,\n getTranslation: () => () => \"\",\n t: () => \"\",\n})\n\nexport interface I18nProviderProps {\n children?: ReactNode\n /**\n * The text direction to apply to the application.\n *\n * If not provided, the direction will be determined by the locale.\n */\n dir?: TextDirection\n /**\n * The fallback locale to use if no matching locale is available.\n */\n fallbackLocale?: AnyString | Locale\n /**\n * The formats to pass to the `intlMessageFormat` instance.\n */\n formats?: Formats\n /**\n * The internationalization messages to apply to the application.\n *\n * This prop expects a dictionary object where the keys are locale strings (e.g., \"en-US\").\n */\n intl?: Dict\n /**\n * The options to pass to the `intlMessageFormat` instance.\n */\n intlMessageFormatOptions?: Options\n /**\n * The locale to apply to the application.\n *\n * If not provided, the locale will be determined by the browser.\n */\n locale?: AnyString | Locale\n}\n\nexport const I18nProvider: FC<I18nProviderProps> = ({\n children,\n dir: forcedDir,\n fallbackLocale = DEFAULT_LOCALE,\n formats,\n intl: forcedIntl,\n intlMessageFormatOptions,\n locale: forcedLocale,\n}) => {\n const intl = useMemo<Dict>(() => {\n if (!forcedIntl) return INTL\n\n if (isEmptyObject(forcedIntl)) return INTL\n\n return forcedIntl\n }, [forcedIntl])\n const locales = useMemo(() => Object.keys(intl), [intl])\n\n const getFallbackLocale = useCallback(\n (language?: string) => {\n if (language)\n for (const key of locales) if (key.startsWith(language)) return key\n\n if (locales.includes(fallbackLocale)) return fallbackLocale\n\n if (createdDom()) {\n try {\n const { language } = new Intl.Locale(fallbackLocale)\n\n for (const key of locales) if (key.startsWith(language)) return key\n } catch {\n return locales[0]!\n }\n } else {\n const language = fallbackLocale.split(\"-\")[0]!\n\n for (const key of locales) if (key.startsWith(language)) return key\n }\n\n return locales[0]!\n },\n [locales, fallbackLocale],\n )\n\n const getLocale = useCallback(\n (forcedLocale?: string) => {\n if (forcedLocale) {\n if (locales.includes(forcedLocale)) return forcedLocale\n\n const language = forcedLocale.split(\"-\")[0]!\n\n return getFallbackLocale(language)\n } else if (createdDom()) {\n try {\n const { language, region } = new Intl.Locale(navigator.language)\n const locale = `${language}-${region}`\n\n return locales.includes(locale) ? locale : getFallbackLocale(language)\n } catch {\n return getFallbackLocale()\n }\n } else {\n return getFallbackLocale()\n }\n },\n [locales, getFallbackLocale],\n )\n\n const getLanguage = useCallback(\n (locale?: string, dir?: TextDirection): Language => {\n locale = getLocale(locale)\n\n try {\n Intl.DateTimeFormat.supportedLocalesOf([locale])\n } catch {\n locale = getFallbackLocale()\n }\n\n dir ??= isRtl(locale) ? \"rtl\" : \"ltr\"\n\n return { dir, locale }\n },\n [getLocale, getFallbackLocale],\n )\n\n const [{ dir, locale }, setLanguage] = useState(\n getLanguage(forcedLocale, forcedDir),\n )\n const controlled = !isUndefined(forcedLocale)\n\n const messages = useMemo(() => intl[locale], [intl, locale])\n\n const changeSystemLanguage = useCallback(() => {\n setLanguage(getLanguage())\n }, [getLanguage])\n\n const changeLanguage = useCallback(\n (locale?: string, dir?: TextDirection) => {\n setLanguage(getLanguage(locale, dir))\n },\n [getLanguage],\n )\n\n const getValue = useCallback(\n (path: number | string) => {\n const value = get<string | undefined>(messages, path)\n\n if (!isUndefined(value)) {\n return value\n } else {\n path = path.toString().replace(/^[^.]+\\./g, \"\")\n\n return get<string | undefined>(messages, path)\n }\n },\n [messages],\n )\n\n const getTranslation = useCallback(\n (key?: IntlKey) =>\n <Y extends IntlPath>(\n path: Y,\n replaceValues?: IcuArgs<Value<IntlData, Y>, IntlPath>,\n ) => {\n const value = getValue(key ? `${key}.${path}` : path) ?? path\n\n if (isUndefined(replaceValues)) return value\n\n try {\n const resolvedReplaceValues = Object.entries(replaceValues).reduce<{\n [key: string]: any\n }>((prev, [key, pathOrValue]) => {\n if (isString(pathOrValue)) {\n const resolvedPathOrValue = String(pathOrValue)\n const value =\n getValue(\n key ? `${key}.${resolvedPathOrValue}` : resolvedPathOrValue,\n ) ?? resolvedPathOrValue\n\n prev[key] = value\n } else {\n prev[key] = pathOrValue\n }\n\n return prev\n }, {})\n\n const message = new IntlMessageFormat(\n value,\n locale,\n formats,\n intlMessageFormatOptions,\n )\n\n return message.format(resolvedReplaceValues) as string\n } catch (e) {\n if (e instanceof Error) console.warn(e.message)\n\n return value\n }\n },\n [getValue, locale, formats, intlMessageFormatOptions],\n )\n\n const value = useMemo(\n () => ({\n changeLanguage,\n dir,\n getTranslation,\n locale,\n t: getTranslation(),\n }),\n [changeLanguage, dir, getTranslation, locale],\n )\n\n useEffect(() => {\n if (controlled) return\n\n window.addEventListener(\"languagechange\", changeSystemLanguage)\n\n return () => {\n window.removeEventListener(\"languagechange\", changeSystemLanguage)\n }\n }, [controlled, changeSystemLanguage])\n\n useUpdateEffect(() => {\n setLanguage(getLanguage(forcedLocale, forcedDir))\n }, [forcedLocale, forcedDir, getLanguage])\n\n return <I18nContext value={value}>{children}</I18nContext>\n}\n\nexport function useI18n(): I18nContext\n\nexport function useI18n<Y extends IntlKey>(\n key: Y,\n): I18nContext<IntlData[Y], Path<IntlData[Y]>>\n\nexport function useI18n<Y extends IntlKey>(key?: Y) {\n const context = useContext(I18nContext)\n\n const translation = useCallback(\n <M extends Path<IntlData[Y]>>(\n path: M,\n replaceValues?: IcuArgs<\n Value<IntlData[Y], M>,\n IntlPath | Path<IntlData[Y]>\n >,\n ) => context.getTranslation(key)(path as any, replaceValues as any),\n [key, context],\n )\n\n if (isEmptyObject(context))\n return {\n ...DEFAULT_LANGUAGE,\n changeLanguage: noop,\n t: () => \"\",\n }\n\n if (key) return { ...context, t: translation }\n else return context\n}\n"],"mappings":";;;;;;;;;AAmCA,MAAM,mBAA6B;CACjC,KAAA;CACA,QAAQ;AACV;AAEA,MAAa,UAAU,OAAO,KAAKA,YAAI;AA0BvC,MAAa,cAAc,cAA2B;CACpD,GAAG;CACH,gBAAgBC,cAAAA;CAChB,4BAA4B;CAC5B,SAAS;AACX,CAAC;AAoCD,MAAa,gBAAuC,EAClD,UACA,KAAK,WACL,iBAAiB,gBACjB,SACA,MAAM,YACN,0BACA,QA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AACd"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i18nCache } from "./i18n-cache.js";
|
|
2
|
-
import { I18nContext, I18nProvider, LOCALES,
|
|
3
|
-
export { I18nContext, I18nProvider, LOCALES,
|
|
2
|
+
import { I18nContext, I18nProvider, LOCALES, useI18n } from "./i18n-provider.js";
|
|
3
|
+
export { I18nContext, I18nProvider, LOCALES, i18nCache, useI18n };
|
|
@@ -13,12 +13,15 @@ import { jsx } from "react/jsx-runtime";
|
|
|
13
13
|
/**
|
|
14
14
|
* The global provider that must be added to make all Yamada UI components work correctly.
|
|
15
15
|
*/
|
|
16
|
-
const UIProvider = ({ children, colorMode, colorModeStorageKey, config: config$1 = config, cookie, dir, intl, locale, rootNode, storage, theme: theme$1 = theme, themeSchemeStorageKey }) => {
|
|
16
|
+
const UIProvider = ({ children, colorMode, colorModeStorageKey, config: config$1 = config, cookie, dir, fallbackLocale, formats, intl, intlMessageFormatOptions, locale, rootNode, storage, theme: theme$1 = theme, themeSchemeStorageKey }) => {
|
|
17
17
|
return /* @__PURE__ */ jsx(EnvironmentProvider, {
|
|
18
18
|
value: rootNode,
|
|
19
19
|
children: /* @__PURE__ */ jsx(I18nProvider, {
|
|
20
20
|
dir,
|
|
21
|
+
fallbackLocale,
|
|
22
|
+
formats,
|
|
21
23
|
intl,
|
|
24
|
+
intlMessageFormatOptions,
|
|
22
25
|
locale,
|
|
23
26
|
children: /* @__PURE__ */ jsx(SystemProvider, {
|
|
24
27
|
config: config$1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-provider.js","names":["defaultConfig","defaultTheme","config","theme","merge"],"sources":["../../../../src/providers/ui-provider/ui-provider.tsx"],"sourcesContent":["import type { FC } from \"react\"\nimport type {\n ColorModeProviderProps,\n EnvironmentProviderProps,\n ThemeConfig,\n ThemeProviderProps,\n UsageTheme,\n} from \"../../core\"\nimport type { DeepMerge } from \"../../utils\"\nimport type { I18nProviderProps } from \"../i18n-provider\"\nimport { LoadingProvider } from \"../../components/loading\"\nimport { NoticeProvider } from \"../../components/notice\"\nimport {\n ColorModeProvider,\n EnvironmentProvider,\n SystemProvider,\n ThemeProvider,\n} from \"../../core\"\nimport { config as defaultConfig, theme as defaultTheme } from \"../../theme\"\nimport { merge } from \"../../utils\"\nimport { I18nProvider } from \"../i18n-provider\"\n\nexport interface UIProviderProps\n extends\n Omit<ThemeProviderProps, \"storageKey\">,\n Pick<ColorModeProviderProps, \"colorMode\">,\n I18nProviderProps {\n /**\n * Key of value saved in storage.\n * By default, it is saved to `local storage`.\n */\n colorModeStorageKey?: string\n /**\n * The root node to use.\n */\n rootNode?: EnvironmentProviderProps[\"value\"]\n /**\n * Key of value saved in storage.\n * By default, it is saved to `local storage`.\n */\n themeSchemeStorageKey?: string\n}\n\n/**\n * The global provider that must be added to make all Yamada UI components work correctly.\n */\nexport const UIProvider: FC<UIProviderProps> = ({\n children,\n colorMode,\n colorModeStorageKey,\n config = defaultConfig,\n cookie,\n dir,\n intl,\n locale,\n rootNode,\n storage,\n theme = defaultTheme,\n themeSchemeStorageKey,\n}) => {\n return (\n <EnvironmentProvider value={rootNode}>\n <I18nProvider
|
|
1
|
+
{"version":3,"file":"ui-provider.js","names":["defaultConfig","defaultTheme","config","theme","merge"],"sources":["../../../../src/providers/ui-provider/ui-provider.tsx"],"sourcesContent":["import type { FC } from \"react\"\nimport type {\n ColorModeProviderProps,\n EnvironmentProviderProps,\n ThemeConfig,\n ThemeProviderProps,\n UsageTheme,\n} from \"../../core\"\nimport type { DeepMerge } from \"../../utils\"\nimport type { I18nProviderProps } from \"../i18n-provider\"\nimport { LoadingProvider } from \"../../components/loading\"\nimport { NoticeProvider } from \"../../components/notice\"\nimport {\n ColorModeProvider,\n EnvironmentProvider,\n SystemProvider,\n ThemeProvider,\n} from \"../../core\"\nimport { config as defaultConfig, theme as defaultTheme } from \"../../theme\"\nimport { merge } from \"../../utils\"\nimport { I18nProvider } from \"../i18n-provider\"\n\nexport interface UIProviderProps\n extends\n Omit<ThemeProviderProps, \"storageKey\">,\n Pick<ColorModeProviderProps, \"colorMode\">,\n I18nProviderProps {\n /**\n * Key of value saved in storage.\n * By default, it is saved to `local storage`.\n */\n colorModeStorageKey?: string\n /**\n * The root node to use.\n */\n rootNode?: EnvironmentProviderProps[\"value\"]\n /**\n * Key of value saved in storage.\n * By default, it is saved to `local storage`.\n */\n themeSchemeStorageKey?: string\n}\n\n/**\n * The global provider that must be added to make all Yamada UI components work correctly.\n */\nexport const UIProvider: FC<UIProviderProps> = ({\n children,\n colorMode,\n colorModeStorageKey,\n config = defaultConfig,\n cookie,\n dir,\n fallbackLocale,\n formats,\n intl,\n intlMessageFormatOptions,\n locale,\n rootNode,\n storage,\n theme = defaultTheme,\n themeSchemeStorageKey,\n}) => {\n return (\n <EnvironmentProvider value={rootNode}>\n <I18nProvider\n dir={dir}\n fallbackLocale={fallbackLocale}\n formats={formats}\n intl={intl}\n intlMessageFormatOptions={intlMessageFormatOptions}\n locale={locale}\n >\n <SystemProvider config={config} theme={theme}>\n <ThemeProvider\n config={config}\n cookie={cookie}\n storage={storage}\n storageKey={themeSchemeStorageKey}\n theme={theme}\n >\n <ColorModeProvider\n colorMode={colorMode}\n config={config}\n cookie={cookie}\n storage={storage}\n storageKey={colorModeStorageKey}\n >\n <LoadingProvider {...config.loading}>\n <NoticeProvider {...config.notice}>{children}</NoticeProvider>\n </LoadingProvider>\n </ColorModeProvider>\n </ThemeProvider>\n </SystemProvider>\n </I18nProvider>\n </EnvironmentProvider>\n )\n}\n\ntype DefaultTheme = typeof defaultTheme\n\nexport const extendTheme = <Y extends UsageTheme>(theme: Y) => {\n return merge<DeepMerge<DefaultTheme, Y>>(defaultTheme, theme)\n}\n\nexport const extendConfig = (config: ThemeConfig) => {\n return merge(defaultConfig, config)\n}\n"],"mappings":";;;;;;;;;;;;;;;AA8CA,MAAa,cAAmC,EAC9C,UACA,WACA,qBACA,QAAA,WAASA,QACT,QACA,KACA,gBACA,SACA,MACA,0BACA,QACA,UACA,SACA,OAAA,UAAQC,OACR,4BACI;CACJ,OACE,oBAAC,qBAAD;EAAqB,OAAO;EAC1B,UAAA,oBAAC,cAAD;GACO;GACW;GACP;GACH;GACoB;GAClB;GAER,UAAA,oBAAC,gBAAD;IAAgB,QAAQC;IAAQ,OAAOC;IACrC,UAAA,oBAAC,eAAD;KACE,QAAQD;KACA;KACC;KACT,YAAY;KACZ,OAAOC;KAEP,UAAA,oBAAC,mBAAD;MACa;MACX,QAAQD;MACA;MACC;MACT,YAAY;MAEZ,UAAA,oBAAC,iBAAD;OAAiB,GAAIA,SAAO;OAC1B,UAAA,oBAAC,gBAAD;QAAgB,GAAIA,SAAO;QAAS;OAAyB,CAAA;MAC9C,CAAA;KACA,CAAA;IACN,CAAA;GACD,CAAA;EACJ,CAAA;CACK,CAAA;AAEzB;AAIA,MAAa,eAAqC,YAAa;CAC7D,QAAA,GAAOE,cAAAA,MAAAA,CAAkCH,OAAcE,OAAK;AAC9D;AAEA,MAAa,gBAAgB,aAAwB;CACnD,QAAA,GAAOC,cAAAA,MAAAA,CAAMJ,QAAeE,QAAM;AACpC"}
|
|
@@ -2,7 +2,7 @@ import { ComponentSlotStyle } from "../../core/system/index.types.js";
|
|
|
2
2
|
import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
|
|
3
3
|
import "../../index.js";
|
|
4
4
|
//#region src/components/chart/polar-chart.style.d.ts
|
|
5
|
-
declare const polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "
|
|
5
|
+
declare const polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelList" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector", CSSPropObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelList" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelList" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelList" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>>;
|
|
6
6
|
type PolarChartStyle = typeof polarChartStyle;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { PolarChartStyle, polarChartStyle };
|