@yamada-ui/react 2.2.7-dev-20260817041155 → 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/components/icon/icons/angle-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/angle-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/audio-lines-x-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/audio-lines-x-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/broom-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/broom-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/broom-sparkles-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/broom-sparkles-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/eject-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/eject-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/face-angry-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/face-angry-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/face-expressionless-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/face-expressionless-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/face-grinning-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/face-grinning-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/face-neutral-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/face-neutral-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/face-slightly-frowning-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/face-slightly-frowning-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/face-slightly-smiling-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/face-slightly-smiling-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/face-slightly-smiling-plus-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/face-slightly-smiling-plus-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/index.cjs +54 -21
- package/dist/cjs/components/icon/icons/index.cjs.map +1 -1
- package/dist/cjs/components/icon/icons/layer-arrow-down-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/layer-arrow-down-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/layer-arrow-up-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/layer-arrow-up-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/layers-arrow-down-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/layers-arrow-down-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/layers-arrow-up-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/layers-arrow-up-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/mail-badge-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/mail-badge-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/shield-lock-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/shield-lock-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/index.cjs +36 -14
- package/dist/cjs/index.cjs +54 -23
- 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/components/icon/icons/angle-icon.js +14 -0
- package/dist/esm/components/icon/icons/angle-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/audio-lines-x-icon.js +14 -0
- package/dist/esm/components/icon/icons/audio-lines-x-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/broom-icon.js +14 -0
- package/dist/esm/components/icon/icons/broom-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/broom-sparkles-icon.js +14 -0
- package/dist/esm/components/icon/icons/broom-sparkles-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/eject-icon.js +14 -0
- package/dist/esm/components/icon/icons/eject-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/face-angry-icon.js +14 -0
- package/dist/esm/components/icon/icons/face-angry-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/face-expressionless-icon.js +14 -0
- package/dist/esm/components/icon/icons/face-expressionless-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/face-grinning-icon.js +14 -0
- package/dist/esm/components/icon/icons/face-grinning-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/face-neutral-icon.js +14 -0
- package/dist/esm/components/icon/icons/face-neutral-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/face-slightly-frowning-icon.js +14 -0
- package/dist/esm/components/icon/icons/face-slightly-frowning-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/face-slightly-smiling-icon.js +14 -0
- package/dist/esm/components/icon/icons/face-slightly-smiling-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/face-slightly-smiling-plus-icon.js +14 -0
- package/dist/esm/components/icon/icons/face-slightly-smiling-plus-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/index.js +37 -15
- package/dist/esm/components/icon/icons/index.js.map +1 -1
- package/dist/esm/components/icon/icons/layer-arrow-down-icon.js +14 -0
- package/dist/esm/components/icon/icons/layer-arrow-down-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/layer-arrow-up-icon.js +14 -0
- package/dist/esm/components/icon/icons/layer-arrow-up-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/layers-arrow-down-icon.js +14 -0
- package/dist/esm/components/icon/icons/layers-arrow-down-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/layers-arrow-up-icon.js +14 -0
- package/dist/esm/components/icon/icons/layers-arrow-up-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/mail-badge-icon.js +14 -0
- package/dist/esm/components/icon/icons/mail-badge-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/shield-lock-icon.js +14 -0
- package/dist/esm/components/icon/icons/shield-lock-icon.js.map +1 -0
- package/dist/esm/components/icon/index.js +19 -8
- package/dist/esm/index.js +38 -17
- 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/components/icon/icons/angle-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/audio-lines-x-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/broom-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/broom-sparkles-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/eject-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/face-angry-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/face-expressionless-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/face-grinning-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/face-neutral-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/face-slightly-frowning-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/face-slightly-smiling-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/face-slightly-smiling-plus-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/index.d.ts +20 -9
- package/dist/types/components/icon/icons/index.types.d.ts +1 -1
- package/dist/types/components/icon/icons/layer-arrow-down-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/layer-arrow-up-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/layers-arrow-down-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/layers-arrow-up-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/mail-badge-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/shield-lock-icon.d.ts +13 -0
- package/dist/types/components/icon/index.d.ts +19 -8
- package/dist/types/index.d.ts +21 -10
- 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 +12 -12
- package/dist/cjs/components/icon/icons/angry-icon.cjs +0 -14
- package/dist/cjs/components/icon/icons/angry-icon.cjs.map +0 -1
- package/dist/cjs/components/icon/icons/annoyed-icon.cjs +0 -14
- package/dist/cjs/components/icon/icons/annoyed-icon.cjs.map +0 -1
- package/dist/cjs/components/icon/icons/frown-icon.cjs +0 -14
- package/dist/cjs/components/icon/icons/frown-icon.cjs.map +0 -1
- package/dist/cjs/components/icon/icons/laugh-icon.cjs +0 -14
- package/dist/cjs/components/icon/icons/laugh-icon.cjs.map +0 -1
- package/dist/cjs/components/icon/icons/meh-icon.cjs +0 -14
- package/dist/cjs/components/icon/icons/meh-icon.cjs.map +0 -1
- package/dist/cjs/components/icon/icons/smile-icon.cjs +0 -14
- package/dist/cjs/components/icon/icons/smile-icon.cjs.map +0 -1
- package/dist/cjs/components/icon/icons/smile-plus-icon.cjs +0 -14
- package/dist/cjs/components/icon/icons/smile-plus-icon.cjs.map +0 -1
- package/dist/esm/components/icon/icons/angry-icon.js +0 -14
- package/dist/esm/components/icon/icons/angry-icon.js.map +0 -1
- package/dist/esm/components/icon/icons/annoyed-icon.js +0 -14
- package/dist/esm/components/icon/icons/annoyed-icon.js.map +0 -1
- package/dist/esm/components/icon/icons/frown-icon.js +0 -14
- package/dist/esm/components/icon/icons/frown-icon.js.map +0 -1
- package/dist/esm/components/icon/icons/laugh-icon.js +0 -14
- package/dist/esm/components/icon/icons/laugh-icon.js.map +0 -1
- package/dist/esm/components/icon/icons/meh-icon.js +0 -14
- package/dist/esm/components/icon/icons/meh-icon.js.map +0 -1
- package/dist/esm/components/icon/icons/smile-icon.js +0 -14
- package/dist/esm/components/icon/icons/smile-icon.js.map +0 -1
- package/dist/esm/components/icon/icons/smile-plus-icon.js +0 -14
- package/dist/esm/components/icon/icons/smile-plus-icon.js.map +0 -1
- package/dist/types/components/icon/icons/angry-icon.d.ts +0 -13
- package/dist/types/components/icon/icons/annoyed-icon.d.ts +0 -13
- package/dist/types/components/icon/icons/frown-icon.d.ts +0 -13
- package/dist/types/components/icon/icons/laugh-icon.d.ts +0 -13
- package/dist/types/components/icon/icons/meh-icon.d.ts +0 -13
- package/dist/types/components/icon/icons/smile-icon.d.ts +0 -13
- package/dist/types/components/icon/icons/smile-plus-icon.d.ts +0 -13
|
@@ -14,36 +14,72 @@ const DEFAULT_LANGUAGE = {
|
|
|
14
14
|
locale: require_constant.DEFAULT_LOCALE
|
|
15
15
|
};
|
|
16
16
|
const LOCALES = Object.keys(require_providers_i18n_provider_intl_index);
|
|
17
|
-
function getLanguage(locale, dir) {
|
|
18
|
-
locale ??= (0, require_utils_index.utils_exports.createdDom)() ? navigator.language : require_constant.DEFAULT_LOCALE;
|
|
19
|
-
try {
|
|
20
|
-
Intl.DateTimeFormat.supportedLocalesOf([locale]);
|
|
21
|
-
} catch (_err) {
|
|
22
|
-
locale = require_constant.DEFAULT_LOCALE;
|
|
23
|
-
}
|
|
24
|
-
dir ??= (0, require_utils_index.utils_exports.isRtl)(locale) ? "rtl" : "ltr";
|
|
25
|
-
return {
|
|
26
|
-
dir,
|
|
27
|
-
locale
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
17
|
const I18nContext = (0, react.createContext)({
|
|
31
18
|
...DEFAULT_LANGUAGE,
|
|
32
19
|
changeLanguage: require_utils_index.utils_exports.noop,
|
|
33
20
|
getTranslation: () => () => "",
|
|
34
21
|
t: () => ""
|
|
35
22
|
});
|
|
36
|
-
const I18nProvider = ({ children, dir: forcedDir, formats, intl
|
|
37
|
-
const
|
|
23
|
+
const I18nProvider = ({ children, dir: forcedDir, fallbackLocale = require_constant.DEFAULT_LOCALE, formats, intl: forcedIntl, intlMessageFormatOptions, locale: forcedLocale }) => {
|
|
24
|
+
const intl = (0, react.useMemo)(() => {
|
|
25
|
+
if (!forcedIntl) return require_providers_i18n_provider_intl_index;
|
|
26
|
+
if ((0, require_utils_index.utils_exports.isEmptyObject)(forcedIntl)) return require_providers_i18n_provider_intl_index;
|
|
27
|
+
return forcedIntl;
|
|
28
|
+
}, [forcedIntl]);
|
|
29
|
+
const locales = (0, react.useMemo)(() => Object.keys(intl), [intl]);
|
|
30
|
+
const getFallbackLocale = (0, react.useCallback)((language) => {
|
|
31
|
+
if (language) {
|
|
32
|
+
for (const key of locales) if (key.startsWith(language)) return key;
|
|
33
|
+
}
|
|
34
|
+
if (locales.includes(fallbackLocale)) return fallbackLocale;
|
|
35
|
+
if ((0, require_utils_index.utils_exports.createdDom)()) try {
|
|
36
|
+
const { language } = new Intl.Locale(fallbackLocale);
|
|
37
|
+
for (const key of locales) if (key.startsWith(language)) return key;
|
|
38
|
+
} catch {
|
|
39
|
+
return locales[0];
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const language = fallbackLocale.split("-")[0];
|
|
43
|
+
for (const key of locales) if (key.startsWith(language)) return key;
|
|
44
|
+
}
|
|
45
|
+
return locales[0];
|
|
46
|
+
}, [locales, fallbackLocale]);
|
|
47
|
+
const getLocale = (0, react.useCallback)((forcedLocale) => {
|
|
48
|
+
if (forcedLocale) {
|
|
49
|
+
if (locales.includes(forcedLocale)) return forcedLocale;
|
|
50
|
+
const language = forcedLocale.split("-")[0];
|
|
51
|
+
return getFallbackLocale(language);
|
|
52
|
+
} else if ((0, require_utils_index.utils_exports.createdDom)()) try {
|
|
53
|
+
const { language, region } = new Intl.Locale(navigator.language);
|
|
54
|
+
const locale = `${language}-${region}`;
|
|
55
|
+
return locales.includes(locale) ? locale : getFallbackLocale(language);
|
|
56
|
+
} catch {
|
|
57
|
+
return getFallbackLocale();
|
|
58
|
+
}
|
|
59
|
+
else return getFallbackLocale();
|
|
60
|
+
}, [locales, getFallbackLocale]);
|
|
61
|
+
const getLanguage = (0, react.useCallback)((locale, dir) => {
|
|
62
|
+
locale = getLocale(locale);
|
|
63
|
+
try {
|
|
64
|
+
Intl.DateTimeFormat.supportedLocalesOf([locale]);
|
|
65
|
+
} catch {
|
|
66
|
+
locale = getFallbackLocale();
|
|
67
|
+
}
|
|
68
|
+
dir ??= (0, require_utils_index.utils_exports.isRtl)(locale) ? "rtl" : "ltr";
|
|
69
|
+
return {
|
|
70
|
+
dir,
|
|
71
|
+
locale
|
|
72
|
+
};
|
|
73
|
+
}, [getLocale, getFallbackLocale]);
|
|
74
|
+
const [{ dir, locale }, setLanguage] = (0, react.useState)(getLanguage(forcedLocale, forcedDir));
|
|
38
75
|
const controlled = !(0, require_utils_index.utils_exports.isUndefined)(forcedLocale);
|
|
39
|
-
const { locale } = language;
|
|
40
76
|
const messages = (0, react.useMemo)(() => intl[locale], [intl, locale]);
|
|
41
77
|
const changeSystemLanguage = (0, react.useCallback)(() => {
|
|
42
78
|
setLanguage(getLanguage());
|
|
43
|
-
}, []);
|
|
79
|
+
}, [getLanguage]);
|
|
44
80
|
const changeLanguage = (0, react.useCallback)((locale, dir) => {
|
|
45
81
|
setLanguage(getLanguage(locale, dir));
|
|
46
|
-
}, []);
|
|
82
|
+
}, [getLanguage]);
|
|
47
83
|
const getValue = (0, react.useCallback)((path) => {
|
|
48
84
|
const value = (0, require_utils_index.utils_exports.getMemoizedObject)(messages, path);
|
|
49
85
|
if (!(0, require_utils_index.utils_exports.isUndefined)(value)) return value;
|
|
@@ -74,20 +110,17 @@ const I18nProvider = ({ children, dir: forcedDir, formats, intl = require_provid
|
|
|
74
110
|
formats,
|
|
75
111
|
intlMessageFormatOptions
|
|
76
112
|
]);
|
|
77
|
-
const value = (0, react.useMemo)(() => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
...language,
|
|
85
|
-
...rest
|
|
86
|
-
};
|
|
87
|
-
}, [
|
|
113
|
+
const value = (0, react.useMemo)(() => ({
|
|
114
|
+
changeLanguage,
|
|
115
|
+
dir,
|
|
116
|
+
getTranslation,
|
|
117
|
+
locale,
|
|
118
|
+
t: getTranslation()
|
|
119
|
+
}), [
|
|
88
120
|
changeLanguage,
|
|
121
|
+
dir,
|
|
89
122
|
getTranslation,
|
|
90
|
-
|
|
123
|
+
locale
|
|
91
124
|
]);
|
|
92
125
|
(0, react.useEffect)(() => {
|
|
93
126
|
if (controlled) return;
|
|
@@ -98,7 +131,11 @@ const I18nProvider = ({ children, dir: forcedDir, formats, intl = require_provid
|
|
|
98
131
|
}, [controlled, changeSystemLanguage]);
|
|
99
132
|
require_effect.useUpdateEffect(() => {
|
|
100
133
|
setLanguage(getLanguage(forcedLocale, forcedDir));
|
|
101
|
-
}, [
|
|
134
|
+
}, [
|
|
135
|
+
forcedLocale,
|
|
136
|
+
forcedDir,
|
|
137
|
+
getLanguage
|
|
138
|
+
]);
|
|
102
139
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(I18nContext, {
|
|
103
140
|
value,
|
|
104
141
|
children
|
|
@@ -122,7 +159,6 @@ function useI18n(key) {
|
|
|
122
159
|
exports.I18nContext = I18nContext;
|
|
123
160
|
exports.I18nProvider = I18nProvider;
|
|
124
161
|
exports.LOCALES = LOCALES;
|
|
125
|
-
exports.getLanguage = getLanguage;
|
|
126
162
|
exports.useI18n = useI18n;
|
|
127
163
|
|
|
128
164
|
//# sourceMappingURL=i18n-provider.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-provider.cjs","names":["DEFAULT_LOCALE","INTL","createContext","useState","useMemo","useCallback","get","IntlMessageFormat","useContext"],"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,QAAQA,iBAAAA;AACV;AAEA,MAAa,UAAU,OAAO,KAAKC,0CAAI;AAEvC,SAAgB,YAAY,QAAiB,KAA+B;CAC1E,YAAA,GAAA,oBAAA,cAAW,WAAA,CAAW,IAAI,UAAU,WAAWD,iBAAAA;CAE/C,IAAI;EACF,KAAK,eAAe,mBAAmB,CAAC,MAAM,CAAC;CACjD,SAAS,MAAM;EACb,SAASA,iBAAAA;CACX;CAEA,SAAA,GAAA,oBAAA,cAAQ,MAAA,CAAM,MAAM,IAAI,QAAQ;CAEhC,OAAO;EAAE;EAAK;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,eAAe,GAAG,CAAC,CAAC,MAAa,aAAoB,GAClE,CAAC,KAAK,OAAO,CACf;CAEA,KAAA,GAAA,oBAAA,cAAI,cAAA,CAAc,OAAO,GACvB,OAAO;EACL,GAAG;EACH,gBAAA,oBAAA,cAAgB;EAChB,SAAS;CACX;CAEF,IAAI,KAAK,OAAO;EAAE,GAAG;EAAS,GAAG;CAAY;MACxC,OAAO;AACd"}
|
|
1
|
+
{"version":3,"file":"i18n-provider.cjs","names":["DEFAULT_LOCALE","INTL","createContext","useMemo","useCallback","useState","get","IntlMessageFormat","useContext"],"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,QAAQA,iBAAAA;AACV;AAEA,MAAa,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,aAAa;GACX,OAAO,oBAAoB,kBAAkB,oBAAoB;EACnE;CACF,GAAG,CAAC,YAAY,oBAAoB,CAAC;CAErC,eAAA,sBAAsB;EACpB,YAAY,YAAY,cAAc,SAAS,CAAC;CAClD,GAAG;EAAC;EAAc;EAAW;CAAW,CAAC;CAEzC,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD;EAAoB;EAAQ;CAAsB,CAAA;AAC3D;AAQA,SAAgB,QAA2B,KAAS;CAClD,MAAM,WAAA,GAAUK,MAAAA,WAAAA,CAAW,WAAW;CAEtC,MAAM,eAAA,GAAcJ,MAAAA,YAAAA,EAEhB,MACA,kBAIG,QAAQ,eAAe,GAAG,CAAC,CAAC,MAAa,aAAoB,GAClE,CAAC,KAAK,OAAO,CACf;CAEA,KAAA,GAAA,oBAAA,cAAI,cAAA,CAAc,OAAO,GACvB,OAAO;EACL,GAAG;EACH,gBAAA,oBAAA,cAAgB;EAChB,SAAS;CACX;CAEF,IAAI,KAAK,OAAO;EAAE,GAAG;EAAS,GAAG;CAAY;MACxC,OAAO;AACd"}
|
|
@@ -4,6 +4,5 @@ const require_i18n_provider = require("./i18n-provider.cjs");
|
|
|
4
4
|
exports.I18nContext = require_i18n_provider.I18nContext;
|
|
5
5
|
exports.I18nProvider = require_i18n_provider.I18nProvider;
|
|
6
6
|
exports.LOCALES = require_i18n_provider.LOCALES;
|
|
7
|
-
exports.getLanguage = require_i18n_provider.getLanguage;
|
|
8
7
|
exports.i18nCache = require_i18n_cache.i18nCache;
|
|
9
8
|
exports.useI18n = require_i18n_provider.useI18n;
|
|
@@ -13,12 +13,15 @@ let react_jsx_runtime = require("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 = require_config.config, cookie, dir, intl, locale, rootNode, storage, theme: theme$1 = require_theme_index.theme, themeSchemeStorageKey }) => {
|
|
16
|
+
const UIProvider = ({ children, colorMode, colorModeStorageKey, config: config$1 = require_config.config, cookie, dir, fallbackLocale, formats, intl, intlMessageFormatOptions, locale, rootNode, storage, theme: theme$1 = require_theme_index.theme, themeSchemeStorageKey }) => {
|
|
17
17
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_environment_provider.EnvironmentProvider, {
|
|
18
18
|
value: rootNode,
|
|
19
19
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_i18n_provider.I18nProvider, {
|
|
20
20
|
dir,
|
|
21
|
+
fallbackLocale,
|
|
22
|
+
formats,
|
|
21
23
|
intl,
|
|
24
|
+
intlMessageFormatOptions,
|
|
22
25
|
locale,
|
|
23
26
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_system_provider.SystemProvider, {
|
|
24
27
|
config: config$1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-provider.cjs","names":["defaultConfig","defaultTheme","EnvironmentProvider","I18nProvider","SystemProvider","config","theme","ThemeProvider","ColorModeProvider","LoadingProvider","NoticeProvider"],"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.cjs","names":["defaultConfig","defaultTheme","EnvironmentProvider","I18nProvider","SystemProvider","config","theme","ThemeProvider","ColorModeProvider","LoadingProvider","NoticeProvider"],"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,eAAAA,QACT,QACA,KACA,gBACA,SACA,MACA,0BACA,QACA,UACA,SACA,OAAA,UAAQC,oBAAAA,OACR,4BACI;CACJ,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,qBAAD;EAAqB,OAAO;EAC1B,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,cAAD;GACO;GACW;GACP;GACH;GACoB;GAClB;GAER,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,gBAAD;IAAgB,QAAQC;IAAQ,OAAOC;IACrC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,eAAD;KACE,QAAQF;KACA;KACC;KACT,YAAY;KACZ,OAAOC;KAEP,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACE,4BAAAA,mBAAD;MACa;MACX,QAAQH;MACA;MACC;MACT,YAAY;MAEZ,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACI,yBAAAA,iBAAD;OAAiB,GAAIJ,SAAO;OAC1B,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACK,wBAAAA,gBAAD;QAAgB,GAAIL,SAAO;QAAS;OAAyB,CAAA;MAC9C,CAAA;KACA,CAAA;IACN,CAAA;GACD,CAAA;EACJ,CAAA;CACK,CAAA;AAEzB;AAIA,MAAa,eAAqC,YAAa;CAC7D,QAAA,GAAA,oBAAA,cAAO,MAAA,CAAkCJ,oBAAAA,OAAcK,OAAK;AAC9D;AAEA,MAAa,gBAAgB,aAAwB;CACnD,QAAA,GAAA,oBAAA,cAAO,MAAA,CAAMN,eAAAA,QAAeK,QAAM;AACpC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { Angle } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/angle-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `AngleIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const AngleIcon = component(Icon$1)({ as: Angle });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { AngleIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=angle-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angle-icon.js","names":["Icon","OriginalAngleIcon"],"sources":["../../../../../src/components/icon/icons/angle-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { Angle as OriginalAngleIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `AngleIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const AngleIcon = component(Icon)({\n as: OriginalAngleIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,YAAY,UAAUA,MAAI,CAAC,CAAC,EACvC,IAAIC,MACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { AudioLinesX } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/audio-lines-x-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `AudioLinesXIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const AudioLinesXIcon = component(Icon$1)({ as: AudioLinesX });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { AudioLinesXIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=audio-lines-x-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio-lines-x-icon.js","names":["Icon","OriginalAudioLinesXIcon"],"sources":["../../../../../src/components/icon/icons/audio-lines-x-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { AudioLinesX as OriginalAudioLinesXIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `AudioLinesXIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const AudioLinesXIcon = component(Icon)({\n as: OriginalAudioLinesXIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,kBAAkB,UAAUA,MAAI,CAAC,CAAC,EAC7C,IAAIC,YACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { Broom } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/broom-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `BroomIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const BroomIcon = component(Icon$1)({ as: Broom });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { BroomIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=broom-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"broom-icon.js","names":["Icon","OriginalBroomIcon"],"sources":["../../../../../src/components/icon/icons/broom-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { Broom as OriginalBroomIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `BroomIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const BroomIcon = component(Icon)({\n as: OriginalBroomIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,YAAY,UAAUA,MAAI,CAAC,CAAC,EACvC,IAAIC,MACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { BroomSparkles } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/broom-sparkles-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `BroomSparklesIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const BroomSparklesIcon = component(Icon$1)({ as: BroomSparkles });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { BroomSparklesIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=broom-sparkles-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"broom-sparkles-icon.js","names":["Icon","OriginalBroomSparklesIcon"],"sources":["../../../../../src/components/icon/icons/broom-sparkles-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { BroomSparkles as OriginalBroomSparklesIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `BroomSparklesIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const BroomSparklesIcon = component(Icon)({\n as: OriginalBroomSparklesIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,oBAAoB,UAAUA,MAAI,CAAC,CAAC,EAC/C,IAAIC,cACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { Eject } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/eject-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `EjectIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const EjectIcon = component(Icon$1)({ as: Eject });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { EjectIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=eject-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eject-icon.js","names":["Icon","OriginalEjectIcon"],"sources":["../../../../../src/components/icon/icons/eject-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { Eject as OriginalEjectIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `EjectIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const EjectIcon = component(Icon)({\n as: OriginalEjectIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,YAAY,UAAUA,MAAI,CAAC,CAAC,EACvC,IAAIC,MACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { FaceAngry } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/face-angry-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `FaceAngryIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const FaceAngryIcon = component(Icon$1)({ as: FaceAngry });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { FaceAngryIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=face-angry-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"face-angry-icon.js","names":["Icon","OriginalFaceAngryIcon"],"sources":["../../../../../src/components/icon/icons/face-angry-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { FaceAngry as OriginalFaceAngryIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `FaceAngryIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const FaceAngryIcon = component(Icon)({\n as: OriginalFaceAngryIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,gBAAgB,UAAUA,MAAI,CAAC,CAAC,EAC3C,IAAIC,UACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { FaceExpressionless } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/face-expressionless-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `FaceExpressionlessIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const FaceExpressionlessIcon = component(Icon$1)({ as: FaceExpressionless });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { FaceExpressionlessIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=face-expressionless-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"face-expressionless-icon.js","names":["Icon","OriginalFaceExpressionlessIcon"],"sources":["../../../../../src/components/icon/icons/face-expressionless-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { FaceExpressionless as OriginalFaceExpressionlessIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `FaceExpressionlessIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const FaceExpressionlessIcon = component(Icon)({\n as: OriginalFaceExpressionlessIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,yBAAyB,UAAUA,MAAI,CAAC,CAAC,EACpD,IAAIC,mBACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { FaceGrinning } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/face-grinning-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `FaceGrinningIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const FaceGrinningIcon = component(Icon$1)({ as: FaceGrinning });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { FaceGrinningIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=face-grinning-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"face-grinning-icon.js","names":["Icon","OriginalFaceGrinningIcon"],"sources":["../../../../../src/components/icon/icons/face-grinning-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { FaceGrinning as OriginalFaceGrinningIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `FaceGrinningIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const FaceGrinningIcon = component(Icon)({\n as: OriginalFaceGrinningIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,mBAAmB,UAAUA,MAAI,CAAC,CAAC,EAC9C,IAAIC,aACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { FaceNeutral } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/face-neutral-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `FaceNeutralIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const FaceNeutralIcon = component(Icon$1)({ as: FaceNeutral });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { FaceNeutralIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=face-neutral-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"face-neutral-icon.js","names":["Icon","OriginalFaceNeutralIcon"],"sources":["../../../../../src/components/icon/icons/face-neutral-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { FaceNeutral as OriginalFaceNeutralIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `FaceNeutralIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const FaceNeutralIcon = component(Icon)({\n as: OriginalFaceNeutralIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,kBAAkB,UAAUA,MAAI,CAAC,CAAC,EAC7C,IAAIC,YACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { FaceSlightlyFrowning } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/face-slightly-frowning-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `FaceSlightlyFrowningIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const FaceSlightlyFrowningIcon = component(Icon$1)({ as: FaceSlightlyFrowning });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { FaceSlightlyFrowningIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=face-slightly-frowning-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"face-slightly-frowning-icon.js","names":["Icon","OriginalFaceSlightlyFrowningIcon"],"sources":["../../../../../src/components/icon/icons/face-slightly-frowning-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { FaceSlightlyFrowning as OriginalFaceSlightlyFrowningIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `FaceSlightlyFrowningIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const FaceSlightlyFrowningIcon = component(Icon)({\n as: OriginalFaceSlightlyFrowningIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,2BAA2B,UAAUA,MAAI,CAAC,CAAC,EACtD,IAAIC,qBACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { FaceSlightlySmiling } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/face-slightly-smiling-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `FaceSlightlySmilingIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const FaceSlightlySmilingIcon = component(Icon$1)({ as: FaceSlightlySmiling });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { FaceSlightlySmilingIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=face-slightly-smiling-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"face-slightly-smiling-icon.js","names":["Icon","OriginalFaceSlightlySmilingIcon"],"sources":["../../../../../src/components/icon/icons/face-slightly-smiling-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { FaceSlightlySmiling as OriginalFaceSlightlySmilingIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `FaceSlightlySmilingIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const FaceSlightlySmilingIcon = component(Icon)({\n as: OriginalFaceSlightlySmilingIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,0BAA0B,UAAUA,MAAI,CAAC,CAAC,EACrD,IAAIC,oBACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon as Icon$1, component } from "../icon.js";
|
|
3
|
+
import { FaceSlightlySmilingPlus } from "lucide-react";
|
|
4
|
+
//#region src/components/icon/icons/face-slightly-smiling-plus-icon.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `FaceSlightlySmilingPlusIcon` is [Lucide](https://lucide.dev) SVG icon component.
|
|
7
|
+
*
|
|
8
|
+
* @see https://yamada-ui.com/docs/components/icon
|
|
9
|
+
*/
|
|
10
|
+
const FaceSlightlySmilingPlusIcon = component(Icon$1)({ as: FaceSlightlySmilingPlus });
|
|
11
|
+
//#endregion
|
|
12
|
+
export { FaceSlightlySmilingPlusIcon };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=face-slightly-smiling-plus-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"face-slightly-smiling-plus-icon.js","names":["Icon","OriginalFaceSlightlySmilingPlusIcon"],"sources":["../../../../../src/components/icon/icons/face-slightly-smiling-plus-icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Component } from \"../../../core\"\nimport type { IconProps } from \"../icon\"\nimport { FaceSlightlySmilingPlus as OriginalFaceSlightlySmilingPlusIcon } from \"lucide-react\"\nimport { component, Icon } from \"../icon\"\n\n/**\n * `FaceSlightlySmilingPlusIcon` is [Lucide](https://lucide.dev) SVG icon component.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const FaceSlightlySmilingPlusIcon = component(Icon)({\n as: OriginalFaceSlightlySmilingPlusIcon,\n}) as Component<\"svg\", IconProps>\n"],"mappings":";;;;;;;;;AAYA,MAAa,8BAA8B,UAAUA,MAAI,CAAC,CAAC,EACzD,IAAIC,wBACN,CAAC"}
|