pelatform-ui 1.1.4 → 1.1.6

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.
@@ -3,4 +3,4 @@ import '@pelatform/ui.aria';
3
3
  import '@pelatform/ui.base';
4
4
  import '@pelatform/ui.default';
5
5
  import '@pelatform/ui.general';
6
- import '@pelatform/ui.general/server';
6
+ import '@pelatform/utils';
@@ -1,7 +1,7 @@
1
1
  // src/hooks/use-meta-color.ts
2
2
  import * as React from "react";
3
3
  import { useTheme } from "next-themes";
4
- import { META_THEME_COLORS, THEME_MODES } from "@pelatform/ui.general";
4
+ import { META_THEME_COLORS, THEME_MODES } from "@pelatform/utils";
5
5
  function useMetaColor(defaultColors) {
6
6
  const { resolvedTheme } = useTheme();
7
7
  const isSystemDarkMode = React.useCallback(() => {
@@ -1,11 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { ReactNode, HTMLAttributes, ComponentProps, FC, DragEvent, RefObject } from 'react';
4
- import { BaseComponentProps, LinkComponent, ImageComponent, VariantProps, ThemeMode } from '@pelatform/ui.general';
4
+ import { BaseComponentProps, LinkComponent, ImageComponent, VariantProps } from '@pelatform/ui.general';
5
5
  import { DialogProps } from '@radix-ui/react-dialog';
6
6
  import { QueryClient } from '@tanstack/react-query';
7
7
  import { ThemeProvider as ThemeProvider$1 } from 'next-themes';
8
8
  import { badgeVariants } from '@pelatform/ui.default';
9
+ import { ThemeMode } from '@pelatform/utils';
9
10
 
10
11
  /**
11
12
  * Alert Toast Component
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useMetaColor
4
- } from "./chunk-2MIG2DIO.js";
4
+ } from "./chunk-M2YFAZ2T.js";
5
5
 
6
6
  // src/components/feedback/alert.tsx
7
7
  import {
@@ -126,7 +126,7 @@ var ConfirmDismissDialog = ({
126
126
 
127
127
  // src/components/feedback/screen-loader.tsx
128
128
  import { LoaderIcon } from "lucide-react";
129
- import { cn } from "@pelatform/ui.general";
129
+ import { cn } from "@pelatform/utils";
130
130
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
131
131
  function ScreenLoader({
132
132
  loadingText = "Loading...",
@@ -161,7 +161,7 @@ function ScreenLoader({
161
161
 
162
162
  // src/components/layout/auth.tsx
163
163
  import { Card, CardContent } from "@pelatform/ui.default";
164
- import { cn as cn2 } from "@pelatform/ui.general";
164
+ import { cn as cn2 } from "@pelatform/utils";
165
165
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
166
166
  function LayoutAuth({
167
167
  children,
@@ -181,11 +181,11 @@ function LayoutAuth({
181
181
  }
182
182
 
183
183
  // src/components/layout/blank.tsx
184
- import { cn as cn4 } from "@pelatform/ui.general";
184
+ import { cn as cn4 } from "@pelatform/utils";
185
185
 
186
186
  // src/components/layout/grid.tsx
187
187
  import { useId } from "react";
188
- import { cn as cn3 } from "@pelatform/ui.general";
188
+ import { cn as cn3 } from "@pelatform/utils";
189
189
  import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
190
190
  function Grid({
191
191
  cellSize = 12,
@@ -259,7 +259,7 @@ function LayoutBlank({ children, footer, className, logo, logoHref }) {
259
259
  }
260
260
 
261
261
  // src/components/layout/body.tsx
262
- import { cn as cn5 } from "@pelatform/ui.general";
262
+ import { cn as cn5 } from "@pelatform/utils";
263
263
  import { jsx as jsx7 } from "react/jsx-runtime";
264
264
  function useMode(slug) {
265
265
  return Array.isArray(slug) && slug.length > 0 ? slug[0] : void 0;
@@ -271,7 +271,7 @@ function Body({ slug, children, className }) {
271
271
 
272
272
  // src/components/layout/comingsoon.tsx
273
273
  import { HoverBackground } from "@pelatform/ui.animation";
274
- import { cn as cn6 } from "@pelatform/ui.general";
274
+ import { cn as cn6 } from "@pelatform/utils";
275
275
  import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
276
276
  function ComingSoon({ className, title, description }) {
277
277
  return /* @__PURE__ */ jsx8("div", { className: cn6("h-[calc(100vh-54px)] w-full overflow-hidden", className), children: /* @__PURE__ */ jsx8(
@@ -300,7 +300,7 @@ function ComingSoon({ className, title, description }) {
300
300
 
301
301
  // src/components/layout/error.tsx
302
302
  import { Badge } from "@pelatform/ui.default";
303
- import { assetsUrl, cn as cn7 } from "@pelatform/ui.general";
303
+ import { assetsUrl, cn as cn7 } from "@pelatform/utils";
304
304
  import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
305
305
  function ErrorComponents({
306
306
  className,
@@ -386,10 +386,10 @@ function ErrorComponents({
386
386
 
387
387
  // src/components/layout/section.tsx
388
388
  import { PlusIcon } from "lucide-react";
389
- import { cn as cn9 } from "@pelatform/ui.general";
389
+ import { cn as cn9 } from "@pelatform/utils";
390
390
 
391
391
  // src/components/ui/grid-background.tsx
392
- import { cn as cn8 } from "@pelatform/ui.general";
392
+ import { cn as cn8 } from "@pelatform/utils";
393
393
  import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
394
394
  var GridBackground = ({
395
395
  columns = 4,
@@ -441,14 +441,14 @@ var Section = ({ children, sectionClassName, className, ...props }) => /* @__PUR
441
441
  ] }) });
442
442
 
443
443
  // src/components/layout/site-footer.tsx
444
- import { cn as cn10 } from "@pelatform/ui.general";
444
+ import { cn as cn10 } from "@pelatform/utils";
445
445
  import { jsx as jsx12 } from "react/jsx-runtime";
446
446
  function SiteFooter({ children, className }) {
447
447
  return /* @__PURE__ */ jsx12("footer", { className: cn10("border-border border-t py-5 md:py-0", className), children: /* @__PURE__ */ jsx12("div", { className: "container flex flex-col items-center justify-between gap-4 py-4 md:h-16 md:flex-row", children }) });
448
448
  }
449
449
 
450
450
  // src/components/layout/site-header.tsx
451
- import { cn as cn11 } from "@pelatform/ui.general";
451
+ import { cn as cn11 } from "@pelatform/utils";
452
452
  import { jsx as jsx13 } from "react/jsx-runtime";
453
453
  function SiteHeader({ className, children }) {
454
454
  return /* @__PURE__ */ jsx13(
@@ -464,7 +464,7 @@ function SiteHeader({ className, children }) {
464
464
  }
465
465
 
466
466
  // src/components/layout/wrapper.tsx
467
- import { cn as cn12 } from "@pelatform/ui.general";
467
+ import { cn as cn12 } from "@pelatform/utils";
468
468
  import { jsx as jsx14 } from "react/jsx-runtime";
469
469
  function MaxWidthWrapper({ className, children }) {
470
470
  return /* @__PURE__ */ jsx14("div", { className: cn12("mx-auto w-full max-w-7xl p-3 lg:px-10", className), children });
@@ -485,7 +485,7 @@ function CodeDisplay({
485
485
  // src/components/mdx/download.tsx
486
486
  import { DownloadIcon } from "lucide-react";
487
487
  import { Button } from "@pelatform/ui.default";
488
- import { cn as cn13 } from "@pelatform/ui.general";
488
+ import { cn as cn13 } from "@pelatform/utils";
489
489
  import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
490
490
  function DownloadFile({ children, className, href }) {
491
491
  return /* @__PURE__ */ jsx16("div", { className: "inline-flex pb-4", children: /* @__PURE__ */ jsx16(Button, { size: "lg", className: cn13("rounded-full", className), children: /* @__PURE__ */ jsxs12("a", { href, target: "_blank", rel: "noopener noreferrer", children: [
@@ -495,7 +495,7 @@ function DownloadFile({ children, className, href }) {
495
495
  }
496
496
 
497
497
  // src/components/mdx/link.tsx
498
- import { cn as cn14 } from "@pelatform/ui.general";
498
+ import { cn as cn14 } from "@pelatform/utils";
499
499
 
500
500
  // src/components/utils/shared.tsx
501
501
  import { jsx as jsx17 } from "react/jsx-runtime";
@@ -526,14 +526,14 @@ function ExtraLink({
526
526
  }
527
527
 
528
528
  // src/components/mdx/video.tsx
529
- import { cn as cn15 } from "@pelatform/ui.general";
529
+ import { cn as cn15 } from "@pelatform/utils";
530
530
  import { jsx as jsx19 } from "react/jsx-runtime";
531
531
  function Video({ className, ...props }) {
532
532
  return /* @__PURE__ */ jsx19("video", { className: cn15("w-full rounded-lg border", className), controls: true, loop: true, ...props });
533
533
  }
534
534
 
535
535
  // src/components/mdx/wrapper.tsx
536
- import { cn as cn16 } from "@pelatform/ui.general";
536
+ import { cn as cn16 } from "@pelatform/utils";
537
537
  import { jsx as jsx20 } from "react/jsx-runtime";
538
538
  function Wrapper({ children, className }) {
539
539
  return /* @__PURE__ */ jsx20(
@@ -572,7 +572,7 @@ function Youtube({ id }) {
572
572
  // src/components/navigation/back-link.tsx
573
573
  import { ChevronLeftIcon } from "lucide-react";
574
574
  import { Button as Button2 } from "@pelatform/ui.default";
575
- import { cn as cn17 } from "@pelatform/ui.general";
575
+ import { cn as cn17 } from "@pelatform/utils";
576
576
  import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
577
577
  function BackLink({ Link = DefaultLink, children, href, className }) {
578
578
  return /* @__PURE__ */ jsxs13(
@@ -603,7 +603,7 @@ function BackLink({ Link = DefaultLink, children, href, className }) {
603
603
  import * as React from "react";
604
604
  import { SearchIcon } from "lucide-react";
605
605
  import { Button as Button3, CommandDialog, CommandInput, CommandList } from "@pelatform/ui.default";
606
- import { cn as cn18, googleTrackEvent } from "@pelatform/ui.general";
606
+ import { cn as cn18, googleTrackEvent } from "@pelatform/utils";
607
607
  import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
608
608
  function CommandMenu({
609
609
  children,
@@ -713,7 +713,7 @@ import {
713
713
  DropdownMenuSubTrigger,
714
714
  DropdownMenuTrigger
715
715
  } from "@pelatform/ui.default";
716
- import { cn as cn19, googleTrackEvent as googleTrackEvent2 } from "@pelatform/ui.general";
716
+ import { cn as cn19, googleTrackEvent as googleTrackEvent2 } from "@pelatform/utils";
717
717
  import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
718
718
  function MainNav({ Link = DefaultLink, pathname, items, className }) {
719
719
  return /* @__PURE__ */ jsx24("div", { className: cn19("mr-4 hidden items-center justify-center md:flex", className), children: /* @__PURE__ */ jsx24("nav", { className: "flex items-center gap-4 font-medium text-sm xl:gap-6", children: items.map((item) => /* @__PURE__ */ jsx24(NavItemRenderer, { Link, item, pathname, level: 1 }, item.title)) }) });
@@ -856,7 +856,7 @@ import {
856
856
  DrawerTitle,
857
857
  DrawerTrigger
858
858
  } from "@pelatform/ui.default";
859
- import { cn as cn20 } from "@pelatform/ui.general";
859
+ import { cn as cn20 } from "@pelatform/utils";
860
860
  import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
861
861
  function MobileNav({ children, className }) {
862
862
  const { setMetaColor, metaColor } = useMetaColor();
@@ -1034,7 +1034,7 @@ var QueryProvider = ({
1034
1034
  // src/components/providers/theme-provider.tsx
1035
1035
  import { ThemeProvider as NextThemesProvider } from "next-themes";
1036
1036
  import { TooltipProvider } from "@pelatform/ui.default";
1037
- import { DEFAULT_THEME_MODE, THEME_MODES } from "@pelatform/ui.general";
1037
+ import { DEFAULT_THEME_MODE, THEME_MODES } from "@pelatform/utils";
1038
1038
  import { jsx as jsx27 } from "react/jsx-runtime";
1039
1039
  function ThemeProvider({ children, ...props }) {
1040
1040
  return /* @__PURE__ */ jsx27(
@@ -1055,7 +1055,7 @@ function ThemeProvider({ children, ...props }) {
1055
1055
 
1056
1056
  // src/components/ui/announcement.tsx
1057
1057
  import { Badge as Badge2 } from "@pelatform/ui.default";
1058
- import { cn as cn21 } from "@pelatform/ui.general";
1058
+ import { cn as cn21 } from "@pelatform/utils";
1059
1059
  import { jsx as jsx28 } from "react/jsx-runtime";
1060
1060
  var Announcement = ({
1061
1061
  variant = "outline",
@@ -1090,7 +1090,7 @@ var AnnouncementTitle = ({ className, ...props }) => /* @__PURE__ */ jsx28("div"
1090
1090
 
1091
1091
  // src/components/ui/background-paths.tsx
1092
1092
  import { motion } from "motion/react";
1093
- import { cn as cn22 } from "@pelatform/ui.general";
1093
+ import { cn as cn22 } from "@pelatform/utils";
1094
1094
  import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
1095
1095
  function FloatingPaths({
1096
1096
  position,
@@ -1132,7 +1132,7 @@ function BackgroundPaths({ color = "text-slate-950 dark:text-white" }) {
1132
1132
  }
1133
1133
 
1134
1134
  // src/components/ui/book.tsx
1135
- import { cn as cn23 } from "@pelatform/ui.general";
1135
+ import { cn as cn23 } from "@pelatform/utils";
1136
1136
  import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
1137
1137
  function Book(props) {
1138
1138
  const {
@@ -1253,7 +1253,7 @@ function Stack(props) {
1253
1253
 
1254
1254
  // src/components/ui/dots-pattern.tsx
1255
1255
  import { useId as useId2 } from "react";
1256
- import { cn as cn24 } from "@pelatform/ui.general";
1256
+ import { cn as cn24 } from "@pelatform/utils";
1257
1257
  import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
1258
1258
  function DotsPattern({
1259
1259
  dotSize = 2,
@@ -1288,7 +1288,7 @@ function DotsPattern({
1288
1288
  }
1289
1289
 
1290
1290
  // src/components/ui/hexagon-badge.tsx
1291
- import { cn as cn25 } from "@pelatform/ui.general";
1291
+ import { cn as cn25 } from "@pelatform/utils";
1292
1292
  import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
1293
1293
  var HexagonBadge = ({ children, classNames }) => {
1294
1294
  return /* @__PURE__ */ jsxs21("div", { className: cn25("relative shrink-0", classNames?.base), children: [
@@ -1523,7 +1523,7 @@ import {
1523
1523
  DropdownMenuSubTrigger as DropdownMenuSubTrigger2,
1524
1524
  DropdownMenuTrigger as DropdownMenuTrigger2
1525
1525
  } from "@pelatform/ui.default";
1526
- import { cn as cn26, getFlagUrl } from "@pelatform/ui.general";
1526
+ import { cn as cn26, getFlagUrl } from "@pelatform/utils";
1527
1527
  import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
1528
1528
  function LanguageSwitcher({
1529
1529
  className,
@@ -1665,7 +1665,7 @@ function LanguageSwitcher({
1665
1665
  }
1666
1666
 
1667
1667
  // src/components/ui/logo.tsx
1668
- import { cn as cn27 } from "@pelatform/ui.general";
1668
+ import { cn as cn27 } from "@pelatform/utils";
1669
1669
  import { jsx as jsx35 } from "react/jsx-runtime";
1670
1670
  function Logo({ className }) {
1671
1671
  return /* @__PURE__ */ jsx35(
@@ -1696,7 +1696,7 @@ import {
1696
1696
  DropdownMenuItem as DropdownMenuItem3,
1697
1697
  DropdownMenuTrigger as DropdownMenuTrigger3
1698
1698
  } from "@pelatform/ui.default";
1699
- import { cn as cn28, THEME_MODES as THEME_MODES2 } from "@pelatform/ui.general";
1699
+ import { cn as cn28, THEME_MODES as THEME_MODES2 } from "@pelatform/utils";
1700
1700
  import { Fragment as Fragment4, jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
1701
1701
  function ModeSwitcher({
1702
1702
  className,
@@ -1831,7 +1831,7 @@ import {
1831
1831
  useMotionValue,
1832
1832
  useTransform
1833
1833
  } from "motion/react";
1834
- import { cn as cn29 } from "@pelatform/ui.general";
1834
+ import { cn as cn29 } from "@pelatform/utils";
1835
1835
  import { Fragment as Fragment5, jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
1836
1836
  function MovingLabel({
1837
1837
  borderRadius = "1.75rem",
@@ -1930,7 +1930,7 @@ import { useState as useState5 } from "react";
1930
1930
  import { CircleAlertIcon as CircleAlertIcon4, CircleCheckIcon as CircleCheckIcon2 } from "lucide-react";
1931
1931
  import { toast as toast4 } from "sonner";
1932
1932
  import { Alert as Alert4, AlertIcon as AlertIcon4, AlertTitle as AlertTitle4, Button as Button8, Input } from "@pelatform/ui.default";
1933
- import { googleTrackEvent as googleTrackEvent3 } from "@pelatform/ui.general";
1933
+ import { googleTrackEvent as googleTrackEvent3 } from "@pelatform/utils";
1934
1934
 
1935
1935
  // src/components/utils/recaptcha-popover.tsx
1936
1936
  import { CircleAlertIcon as CircleAlertIcon3 } from "lucide-react";
@@ -2190,7 +2190,7 @@ function Subscribe({
2190
2190
  }
2191
2191
 
2192
2192
  // src/components/ui/toolbar.tsx
2193
- import { cn as cn30 } from "@pelatform/ui.general";
2193
+ import { cn as cn30 } from "@pelatform/utils";
2194
2194
  import { jsx as jsx40 } from "react/jsx-runtime";
2195
2195
  var Toolbar = ({ children }) => {
2196
2196
  return /* @__PURE__ */ jsx40("div", { className: "flex grow items-center justify-between gap-2.5 pb-5", children });
package/dist/hooks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from '@pelatform/ui.hook';
2
- import { META_THEME_COLORS } from '@pelatform/ui.general';
2
+ import { META_THEME_COLORS } from '@pelatform/utils';
3
3
 
4
4
  /**
5
5
  * Meta theme color management hook for React components
package/dist/hooks.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useMetaColor
3
- } from "./chunk-2MIG2DIO.js";
3
+ } from "./chunk-M2YFAZ2T.js";
4
4
 
5
5
  // src/hooks.ts
6
6
  export * from "@pelatform/ui.hook";
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from '@pelatform/ui.general';
2
+ export * from '@pelatform/utils';
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  // src/index.ts
2
2
  export * from "@pelatform/ui.general";
3
+ export * from "@pelatform/utils";
package/dist/server.d.ts CHANGED
@@ -1 +1 @@
1
- export * from '@pelatform/ui.general/server';
1
+ export * from '@pelatform/utils';
package/dist/server.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // src/server.ts
2
- export * from "@pelatform/ui.general/server";
2
+ export * from "@pelatform/utils";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pelatform-ui",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "A Modern and Minimal React UI Library built with TailwindCSS.",
5
5
  "author": "Pelatform",
6
6
  "license": "MIT",
@@ -71,12 +71,13 @@
71
71
  "animation"
72
72
  ],
73
73
  "dependencies": {
74
- "@pelatform/ui.animation": "0.1.3",
75
- "@pelatform/ui.aria": "0.1.3",
76
- "@pelatform/ui.base": "0.1.4",
77
- "@pelatform/ui.default": "0.1.3",
78
- "@pelatform/ui.general": "0.1.4",
74
+ "@pelatform/ui.animation": "0.1.4",
75
+ "@pelatform/ui.aria": "0.1.4",
76
+ "@pelatform/ui.base": "0.1.5",
77
+ "@pelatform/ui.default": "0.1.5",
78
+ "@pelatform/ui.general": "0.1.5",
79
79
  "@pelatform/ui.hook": "0.1.2",
80
+ "@pelatform/utils": ">=1.0.6",
80
81
  "@radix-ui/react-dialog": "^1.1.15",
81
82
  "radix-ui": "^1.4.3",
82
83
  "tw-animate-css": "^1.4.0"