@webdevarif/dashui 1.2.6 → 1.2.7
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.js +95 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +84 -0
- package/dist/index.mjs.map +1 -1
- package/dist/setup.js +130 -0
- package/dist/setup.js.map +1 -0
- package/dist/setup.mjs +86 -0
- package/dist/setup.mjs.map +1 -0
- package/dist/styles/animations.css +13 -0
- package/dist/styles/globals.css +437 -0
- package/dist/tokens/index.css +11 -0
- package/dist/tokens/primitives.css +92 -0
- package/dist/tokens/semantic-dark.css +87 -0
- package/dist/tokens/semantic-light.css +116 -0
- package/dist/tokens/storefront-schemes.css +96 -0
- package/package.json +8 -3
- package/dist/index.d.mts +0 -836
- package/dist/index.d.ts +0 -836
package/dist/index.mjs
CHANGED
|
@@ -4397,6 +4397,82 @@ function AuthFootnote({ text, linkText, linkHref }) {
|
|
|
4397
4397
|
|
|
4398
4398
|
// src/index.ts
|
|
4399
4399
|
import { ThemeProvider, useTheme as useTheme2 } from "next-themes";
|
|
4400
|
+
|
|
4401
|
+
// src/setup/providers/auth-provider.tsx
|
|
4402
|
+
import { SessionProvider } from "next-auth/react";
|
|
4403
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
4404
|
+
function AuthProvider({ children, session }) {
|
|
4405
|
+
return /* @__PURE__ */ jsx67(SessionProvider, { session, children });
|
|
4406
|
+
}
|
|
4407
|
+
|
|
4408
|
+
// src/setup/providers/i18n-provider.tsx
|
|
4409
|
+
import { IntlProvider } from "next-intl";
|
|
4410
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
4411
|
+
function I18nProvider({
|
|
4412
|
+
children,
|
|
4413
|
+
locale,
|
|
4414
|
+
messages,
|
|
4415
|
+
timeZone = "UTC"
|
|
4416
|
+
}) {
|
|
4417
|
+
return /* @__PURE__ */ jsx68(IntlProvider, { locale, messages, timeZone, children });
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4420
|
+
// src/setup/providers/swr-provider.tsx
|
|
4421
|
+
import { SWRConfig } from "swr";
|
|
4422
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4423
|
+
var DEFAULT_SWR_CONFIG = {
|
|
4424
|
+
revalidateOnFocus: false,
|
|
4425
|
+
revalidateOnReconnect: true,
|
|
4426
|
+
dedupingInterval: 6e4,
|
|
4427
|
+
focusThrottleInterval: 3e5
|
|
4428
|
+
};
|
|
4429
|
+
function SWRProvider({ children }) {
|
|
4430
|
+
return /* @__PURE__ */ jsx69(SWRConfig, { value: { fetcher: (url) => fetch(url).then((r) => r.json()), ...DEFAULT_SWR_CONFIG }, children });
|
|
4431
|
+
}
|
|
4432
|
+
|
|
4433
|
+
// src/setup/providers/root-provider.tsx
|
|
4434
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
4435
|
+
function RootProvider({
|
|
4436
|
+
children,
|
|
4437
|
+
session,
|
|
4438
|
+
locale,
|
|
4439
|
+
messages,
|
|
4440
|
+
timeZone
|
|
4441
|
+
}) {
|
|
4442
|
+
return /* @__PURE__ */ jsx70(AuthProvider, { session, children: /* @__PURE__ */ jsx70(I18nProvider, { locale, messages, timeZone, children: /* @__PURE__ */ jsx70(SWRProvider, { children }) }) });
|
|
4443
|
+
}
|
|
4444
|
+
|
|
4445
|
+
// src/setup/hooks/use-auth.ts
|
|
4446
|
+
import { useSession } from "next-auth/react";
|
|
4447
|
+
function useAuth() {
|
|
4448
|
+
return useSession();
|
|
4449
|
+
}
|
|
4450
|
+
|
|
4451
|
+
// src/setup/hooks/use-i18n.ts
|
|
4452
|
+
import { useIntl } from "next-intl";
|
|
4453
|
+
function useI18n() {
|
|
4454
|
+
return useIntl();
|
|
4455
|
+
}
|
|
4456
|
+
|
|
4457
|
+
// src/setup/hooks/use-fetch.ts
|
|
4458
|
+
import useSWR from "swr";
|
|
4459
|
+
function useFetch(url, options) {
|
|
4460
|
+
const { data, error, isLoading } = useSWR(url, options);
|
|
4461
|
+
return {
|
|
4462
|
+
data,
|
|
4463
|
+
isLoading,
|
|
4464
|
+
error,
|
|
4465
|
+
isError: !!error
|
|
4466
|
+
};
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4469
|
+
// src/setup/lib/prisma.ts
|
|
4470
|
+
import { PrismaClient } from "@prisma/client";
|
|
4471
|
+
var globalForPrisma = global;
|
|
4472
|
+
var prisma = globalForPrisma.prisma || new PrismaClient({
|
|
4473
|
+
log: process.env.NODE_ENV === "development" ? ["query"] : []
|
|
4474
|
+
});
|
|
4475
|
+
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
|
|
4400
4476
|
export {
|
|
4401
4477
|
Alert,
|
|
4402
4478
|
AppShell,
|
|
@@ -4407,6 +4483,7 @@ export {
|
|
|
4407
4483
|
AuthFootnote,
|
|
4408
4484
|
AuthHeader,
|
|
4409
4485
|
AuthLogo,
|
|
4486
|
+
AuthProvider,
|
|
4410
4487
|
AuthShell,
|
|
4411
4488
|
Badge,
|
|
4412
4489
|
Button,
|
|
@@ -4461,6 +4538,7 @@ export {
|
|
|
4461
4538
|
FormLayout,
|
|
4462
4539
|
FormSection,
|
|
4463
4540
|
HslColorInput,
|
|
4541
|
+
I18nProvider,
|
|
4464
4542
|
ImagePickerField,
|
|
4465
4543
|
Input,
|
|
4466
4544
|
Label2 as Label,
|
|
@@ -4482,6 +4560,8 @@ export {
|
|
|
4482
4560
|
PostStatusBadge,
|
|
4483
4561
|
ResponsiveSizeDeviceIcon,
|
|
4484
4562
|
ResponsiveSizeField,
|
|
4563
|
+
RootProvider,
|
|
4564
|
+
SWRProvider,
|
|
4485
4565
|
SearchBar,
|
|
4486
4566
|
Select,
|
|
4487
4567
|
SelectContent,
|
|
@@ -4520,8 +4600,12 @@ export {
|
|
|
4520
4600
|
badgeVariants,
|
|
4521
4601
|
buttonVariants,
|
|
4522
4602
|
cn,
|
|
4603
|
+
prisma,
|
|
4604
|
+
useAuth,
|
|
4523
4605
|
useColorPicker,
|
|
4524
4606
|
useDisclosure,
|
|
4607
|
+
useFetch,
|
|
4608
|
+
useI18n,
|
|
4525
4609
|
usePagination,
|
|
4526
4610
|
useTheme2 as useTheme
|
|
4527
4611
|
};
|