@melv1c/ui-kit 1.5.3 → 1.6.0
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 +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +34 -34
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ export { cn } from './chunk-WZ2GOU2J.js';
|
|
|
7
7
|
import { locales_exports } from './chunk-PWXJ2ONW.js';
|
|
8
8
|
import './chunk-PZ5AY32C.js';
|
|
9
9
|
import * as React9 from 'react';
|
|
10
|
-
import { useState, useEffect,
|
|
10
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
11
11
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
12
12
|
import { ChevronDownIcon, ChevronRight, MoreHorizontal, ChevronLeftIcon, ChevronRightIcon, ArrowLeft, ArrowRight, CheckIcon, XIcon, SearchIcon, CircleIcon, MoreHorizontalIcon, ChevronUpIcon, PanelLeftIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon, CircleAlert, EyeOff, Eye, ArrowRightIcon, ArrowLeftIcon, CalendarIcon } from 'lucide-react';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -4482,9 +4482,13 @@ function UIKitProvider({
|
|
|
4482
4482
|
i18nConfig = { locale: "en" },
|
|
4483
4483
|
loadingComponent = null
|
|
4484
4484
|
}) {
|
|
4485
|
-
const [
|
|
4486
|
-
|
|
4487
|
-
|
|
4485
|
+
const [localInstance] = useState(
|
|
4486
|
+
() => !i18nConfig.instance ? i18n.createInstance() : null
|
|
4487
|
+
);
|
|
4488
|
+
const instance = i18nConfig.instance || localInstance;
|
|
4489
|
+
const [isReady, setIsReady] = useState(
|
|
4490
|
+
() => !(i18nConfig.locale && !instance.isInitialized)
|
|
4491
|
+
);
|
|
4488
4492
|
useEffect(() => {
|
|
4489
4493
|
if (i18nConfig.locale && !instance.isInitialized) {
|
|
4490
4494
|
instance.use(initReactI18next).init({
|
|
@@ -4498,8 +4502,6 @@ function UIKitProvider({
|
|
|
4498
4502
|
}).then(() => {
|
|
4499
4503
|
setIsReady(true);
|
|
4500
4504
|
});
|
|
4501
|
-
} else {
|
|
4502
|
-
setIsReady(true);
|
|
4503
4505
|
}
|
|
4504
4506
|
}, [i18nConfig, instance]);
|
|
4505
4507
|
useEffect(() => {
|