@levo-so/react 0.1.111 → 0.2.1

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.
Files changed (47) hide show
  1. package/dist/audience/components/block.d.ts +18 -2
  2. package/dist/audience/components/block.js +1 -1
  3. package/dist/audience/components/page.d.ts +18 -2
  4. package/dist/audience/index.d.ts +2 -3
  5. package/dist/components/Sonner.d.ts +3 -0
  6. package/dist/components/index.d.ts +0 -6
  7. package/dist/index.d.ts +0 -1
  8. package/dist/index.js +7 -22
  9. package/dist/membership/components/Button.js +15 -16
  10. package/dist/providers/LevoProvider.d.ts +7 -0
  11. package/dist/providers/LevoProvider.js +2 -2
  12. package/dist/styles/index.css +1 -1
  13. package/dist/utils/index.d.ts +0 -6
  14. package/package.json +8 -19
  15. package/dist/audience/components/component.d.ts +0 -8
  16. package/dist/audience/components/component.js +0 -19
  17. package/dist/components/Dialog.d.ts +0 -24
  18. package/dist/components/Dialog.js +0 -57
  19. package/dist/components/DialogWrapper.d.ts +0 -12
  20. package/dist/components/DialogWrapper.js +0 -20
  21. package/dist/components/Spinner.d.ts +0 -5
  22. package/dist/components/Spinner.js +0 -7
  23. package/dist/components/Table.d.ts +0 -11
  24. package/dist/components/Tabs.d.ts +0 -8
  25. package/dist/components/Tabs.js +0 -27
  26. package/dist/components/Tooltip.d.ts +0 -17
  27. package/dist/components/Tooltip.js +0 -24
  28. package/dist/components/button/Button.d.ts +0 -12
  29. package/dist/components/button/Button.js +0 -24
  30. package/dist/components/button/buttonVariants.d.ts +0 -6
  31. package/dist/components/button/buttonVariants.js +0 -38
  32. package/dist/components/button/index.d.ts +0 -3
  33. package/dist/constants/fileUploadPresets.d.ts +0 -42
  34. package/dist/constants/fileUploadPresets.js +0 -80
  35. package/dist/constants/index.d.ts +0 -2
  36. package/dist/utils/byteToSize.d.ts +0 -3
  37. package/dist/utils/byteToSize.js +0 -18
  38. package/dist/utils/cn.d.ts +0 -4
  39. package/dist/utils/cn.js +0 -6
  40. package/dist/utils/isDateObject.d.ts +0 -2
  41. package/dist/utils/isDateObject.js +0 -4
  42. package/dist/utils/isEmptyObject.d.ts +0 -5
  43. package/dist/utils/isEmptyObject.js +0 -5
  44. package/dist/utils/isNullOrUndefined.d.ts +0 -2
  45. package/dist/utils/isNullOrUndefined.js +0 -4
  46. package/dist/utils/isObject.d.ts +0 -3
  47. package/dist/utils/isObject.js +0 -6
@@ -1,8 +1,2 @@
1
- export * from './byteToSize';
2
- export * from './cn';
3
1
  export * from './errorHandler';
4
- export * from './isDateObject';
5
- export * from './isEmptyObject';
6
- export * from './isNullOrUndefined';
7
- export * from './isObject';
8
2
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,35 +1,24 @@
1
1
  {
2
2
  "name": "@levo-so/react",
3
3
  "description": "Levo suite for React based applications",
4
- "version": "0.1.111",
4
+ "version": "0.2.1",
5
5
  "author": "Levo Engineering <devs@theinternetfolks.com>",
6
6
  "dependencies": {
7
- "class-variance-authority": "0.7.0",
8
- "clsx": "2.1.1",
9
- "lodash-es": "4.18.1",
10
- "lucide-react": "0.575.0",
11
- "radix-ui": "1.4.3",
12
- "react-icons": "5.2.1",
13
- "sonner": "2.0.7",
14
- "tailwind-merge": "2.4.0",
15
- "use-page-lifecycle": "1.1.2"
7
+ "sonner": "2.0.7"
16
8
  },
17
9
  "devDependencies": {
18
10
  "@tailwindcss/typography": "0.5.16",
19
- "@types/lodash-es": "4.17.12",
20
11
  "@types/react": "19.2.14",
21
12
  "@types/react-dom": "19.2.3",
22
13
  "@vitejs/plugin-react": "6.0.1",
23
- "clsx": "2.1.1",
24
14
  "rollup-preserve-directives": "1.1.3",
25
- "tailwind-merge": "2.4.0",
26
15
  "typescript": "5.9.3",
27
16
  "vite": "8.0.8",
28
17
  "vite-plugin-dts": "4.5.4",
29
- "@levo-so/core": "0.1.111",
30
- "@levo-so/insights": "0.1.111",
31
- "@levo/ts-config": "0.0.0",
32
- "@levo/tw-config": "0.0.0"
18
+ "@levo-so/insights": "0.2.1",
19
+ "@levo/tw-config": "0.0.0",
20
+ "@levo-so/core": "0.2.1",
21
+ "@levo/ts-config": "0.0.0"
33
22
  },
34
23
  "exports": {
35
24
  "./index.css": "./dist/index.css",
@@ -49,8 +38,8 @@
49
38
  "peerDependencies": {
50
39
  "react": ">=18",
51
40
  "react-dom": ">=18",
52
- "@levo-so/core": "0.1.111",
53
- "@levo-so/insights": "0.1.111"
41
+ "@levo-so/core": "0.2.1",
42
+ "@levo-so/insights": "0.2.1"
54
43
  },
55
44
  "publishConfig": {
56
45
  "access": "public"
@@ -1,8 +0,0 @@
1
- import { AnalyticsEventType, ILevoAudience } from '@levo-so/insights';
2
- import { FC } from 'react';
3
- export declare const LevoAudienceComponent: FC<{
4
- event: AnalyticsEventType;
5
- properties: ILevoAudience.Properties;
6
- }>;
7
- export default LevoAudienceComponent;
8
- //# sourceMappingURL=component.d.ts.map
@@ -1,19 +0,0 @@
1
- "use client";
2
- import { useLevo as e, useLevoInsights as t } from "../../providers/LevoProvider.js";
3
- import { getLevoError as n } from "@levo-so/core";
4
- import { useEffect as r, useRef as i } from "react";
5
- //#region src/audience/components/component.tsx
6
- var a = ({ event: a, properties: o }) => {
7
- let { logger: s } = e(), c = t(), l = i(!1), u = i(a);
8
- u.current = a;
9
- let d = i(o);
10
- return d.current = o, r(() => {
11
- if (!(l.current || !c)) try {
12
- c.track(u.current, d.current), l.current = !0;
13
- } catch (e) {
14
- s?.error("[LevoAudienceComponent] track failed", { exception: n(e) });
15
- }
16
- }, [c, s]), null;
17
- };
18
- //#endregion
19
- export { a as default };
@@ -1,24 +0,0 @@
1
- import { Dialog as DialogPrimitive } from 'radix-ui';
2
- import * as React from "react";
3
- declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
- declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
- declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
- declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
9
- hideCloseButton?: boolean;
10
- overlayStyles?: string;
11
- container?: DialogPrimitive.DialogPortalProps["container"];
12
- } & React.RefAttributes<HTMLDivElement>>;
13
- declare const DialogHeader: {
14
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
- displayName: string;
16
- };
17
- declare const DialogFooter: {
18
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
19
- displayName: string;
20
- };
21
- declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
22
- declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
23
- export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogClose, };
24
- //# sourceMappingURL=Dialog.d.ts.map
@@ -1,57 +0,0 @@
1
- "use client";
2
- import e from "../utils/cn.js";
3
- import * as t from "react";
4
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
- import { Dialog as i } from "radix-ui";
6
- import { X as a } from "lucide-react";
7
- //#region src/components/Dialog.tsx
8
- var o = i.Root, s = i.Trigger, c = i.Portal, l = i.Close, u = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Overlay, {
9
- ref: a,
10
- className: e("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 grid max-h-screen place-items-center overflow-y-auto bg-background/80 py-10 backdrop-blur-sm data-[state=closed]:animate-out data-[state=open]:animate-in", t),
11
- ...r
12
- }));
13
- u.displayName = i.Overlay.displayName;
14
- var d = t.forwardRef(({ className: t, children: o, container: s, hideCloseButton: l, overlayStyles: d, ...f }, p) => /* @__PURE__ */ n(c, {
15
- container: s,
16
- children: /* @__PURE__ */ n(u, {
17
- className: d,
18
- children: /* @__PURE__ */ r(i.Content, {
19
- ref: p,
20
- className: e("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 relative z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:rounded-lg", t),
21
- ...f,
22
- children: [o, !l && /* @__PURE__ */ r(i.Close, {
23
- type: "button",
24
- className: "absolute top-4 right-4 rounded-sm p-1 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
25
- children: [/* @__PURE__ */ n(a, { className: "h-4 w-4" }), /* @__PURE__ */ n("span", {
26
- className: "sr-only",
27
- children: "Close"
28
- })]
29
- })]
30
- })
31
- })
32
- }));
33
- d.displayName = i.Content.displayName;
34
- var f = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
35
- className: e("flex flex-col space-y-1.5 text-center sm:text-left", t),
36
- ...r
37
- });
38
- f.displayName = "DialogHeader";
39
- var p = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
40
- className: e("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t),
41
- ...r
42
- });
43
- p.displayName = "DialogFooter";
44
- var m = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Title, {
45
- ref: a,
46
- className: e("font-semibold text-lg leading-none tracking-tight", t),
47
- ...r
48
- }));
49
- m.displayName = i.Title.displayName;
50
- var h = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Description, {
51
- ref: a,
52
- className: e("text-muted-foreground text-sm", t),
53
- ...r
54
- }));
55
- h.displayName = i.Description.displayName;
56
- //#endregion
57
- export { o as Dialog, l as DialogClose, d as DialogContent, h as DialogDescription, p as DialogFooter, f as DialogHeader, u as DialogOverlay, c as DialogPortal, m as DialogTitle, s as DialogTrigger };
@@ -1,12 +0,0 @@
1
- interface IDialogueWrapper {
2
- isOpen: boolean;
3
- onClose: (v: boolean) => void;
4
- children: React.ReactNode;
5
- title?: string;
6
- contentClassName?: string;
7
- modal?: boolean;
8
- description?: string;
9
- }
10
- export declare const DialogWrapper: React.FC<IDialogueWrapper>;
11
- export {};
12
- //# sourceMappingURL=DialogWrapper.d.ts.map
@@ -1,20 +0,0 @@
1
- import { Dialog as e, DialogContent as t, DialogDescription as n, DialogHeader as r, DialogTitle as i } from "./Dialog.js";
2
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
- //#region src/components/DialogWrapper.tsx
4
- var s = ({ isOpen: s, onClose: c, children: l, title: u, description: d = "", contentClassName: f, modal: p = !0 }) => /* @__PURE__ */ a(e, {
5
- open: s,
6
- onOpenChange: c,
7
- modal: p,
8
- children: /* @__PURE__ */ o(t, {
9
- className: f,
10
- children: [u && /* @__PURE__ */ o(r, {
11
- className: "flex-1 font-medium",
12
- children: [/* @__PURE__ */ a(i, { children: u }), /* @__PURE__ */ a(n, { children: d })]
13
- }), /* @__PURE__ */ a("div", {
14
- className: "w-full",
15
- children: l
16
- })]
17
- })
18
- });
19
- //#endregion
20
- export { s as DialogWrapper };
@@ -1,5 +0,0 @@
1
- export declare const Spinner: ({ className }: {
2
- className?: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export default Spinner;
5
- //# sourceMappingURL=Spinner.d.ts.map
@@ -1,7 +0,0 @@
1
- import e from "../utils/cn.js";
2
- import { jsx as t } from "react/jsx-runtime";
3
- import { BiLoaderAlt as n } from "react-icons/bi";
4
- //#region src/components/Spinner.tsx
5
- var r = ({ className: r }) => /* @__PURE__ */ t(n, { className: e("h-8 w-8 animate-spin font-light", r) });
6
- //#endregion
7
- export { r as default };
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
3
- declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
4
- declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
5
- declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
6
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
7
- declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
8
- declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
9
- declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
10
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
11
- //# sourceMappingURL=Table.d.ts.map
@@ -1,8 +0,0 @@
1
- import { Tabs as TabsPrimitive } from 'radix-ui';
2
- import * as React from "react";
3
- declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
4
- declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
- declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
- declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
- export { Tabs, TabsList, TabsTrigger, TabsContent };
8
- //# sourceMappingURL=Tabs.d.ts.map
@@ -1,27 +0,0 @@
1
- "use client";
2
- import e from "../utils/cn.js";
3
- import * as t from "react";
4
- import { jsx as n } from "react/jsx-runtime";
5
- import { Tabs as r } from "radix-ui";
6
- //#region src/components/Tabs.tsx
7
- var i = r.Root, a = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.List, {
8
- ref: a,
9
- className: e("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", t),
10
- ...i
11
- }));
12
- a.displayName = r.List.displayName;
13
- var o = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Trigger, {
14
- ref: a,
15
- className: e("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 font-medium text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", t),
16
- "data-levo-studio-interactive": "true",
17
- ...i
18
- }));
19
- o.displayName = r.Trigger.displayName;
20
- var s = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Content, {
21
- ref: a,
22
- className: e("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", t),
23
- ...i
24
- }));
25
- s.displayName = r.Content.displayName;
26
- //#endregion
27
- export { i as Tabs, s as TabsContent, a as TabsList, o as TabsTrigger };
@@ -1,17 +0,0 @@
1
- import { Tooltip as TooltipPrimitive } from 'radix-ui';
2
- import * as React from "react";
3
- declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
4
- declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
5
- declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
- declare const TooltipPortal: React.FC<TooltipPrimitive.TooltipPortalProps>;
7
- declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const SimpleTooltipWrapper: React.FC<{
9
- children: React.ReactNode;
10
- label?: string | React.ReactElement;
11
- labelClassName?: string;
12
- asChild?: boolean;
13
- contentProps?: React.ComponentProps<typeof TooltipContent>;
14
- side?: "top" | "bottom" | "left" | "right";
15
- }>;
16
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, SimpleTooltipWrapper, TooltipPortal, };
17
- //# sourceMappingURL=Tooltip.d.ts.map
@@ -1,24 +0,0 @@
1
- "use client";
2
- import e from "../utils/cn.js";
3
- import * as t from "react";
4
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
- import { Tooltip as i } from "radix-ui";
6
- //#region src/components/Tooltip.tsx
7
- var a = i.Provider, o = i.Root, s = i.Trigger, c = i.Portal, l = t.forwardRef(({ className: t, sideOffset: r = 4, ...a }, o) => /* @__PURE__ */ n(i.Content, {
8
- ref: o,
9
- sideOffset: r,
10
- className: e("fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 animate-in overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-popover-foreground text-xs shadow-md data-[state=closed]:animate-out", t),
11
- ...a
12
- }));
13
- l.displayName = i.Content.displayName;
14
- var u = ({ children: e, label: t, labelClassName: i, asChild: a = !0, contentProps: u = {}, side: d }) => /* @__PURE__ */ r(o, { children: [t && /* @__PURE__ */ n(c, { children: /* @__PURE__ */ n(l, {
15
- side: d,
16
- className: i,
17
- ...u,
18
- children: t
19
- }) }), /* @__PURE__ */ n(s, {
20
- asChild: a,
21
- children: e
22
- })] });
23
- //#endregion
24
- export { u as SimpleTooltipWrapper, o as Tooltip, l as TooltipContent, c as TooltipPortal, a as TooltipProvider, s as TooltipTrigger };
@@ -1,12 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import { buttonVariants } from './buttonVariants';
3
- import * as React from "react";
4
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
5
- asChild?: boolean;
6
- isLoading?: boolean;
7
- rounded?: "default" | "small" | "large" | "full";
8
- loadingText?: string;
9
- }
10
- export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
- export default Button;
12
- //# sourceMappingURL=Button.d.ts.map
@@ -1,24 +0,0 @@
1
- import e from "../../utils/cn.js";
2
- import { buttonVariants as t } from "./buttonVariants.js";
3
- import * as n from "react";
4
- import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
5
- import { Slot as o } from "radix-ui";
6
- import { BiLoaderAlt as s } from "react-icons/bi";
7
- import { twMerge as c } from "tailwind-merge";
8
- //#region src/components/button/Button.tsx
9
- var l = n.forwardRef(({ className: n, variant: l, size: u, rounded: d, asChild: f = !1, isLoading: p = !1, loadingText: m, disabled: h, ...g }, _) => /* @__PURE__ */ i(f ? o.Root : "button", {
10
- className: e(t({
11
- variant: l,
12
- size: u,
13
- rounded: d,
14
- className: n
15
- })),
16
- ref: _,
17
- disabled: h || p,
18
- type: "button",
19
- ...g,
20
- children: p ? /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(s, { className: c("h-4 w-4 animate-spin", m ? "mr-2" : "") }), m] }) : g.children
21
- }));
22
- l.displayName = "Button";
23
- //#endregion
24
- export { l as default };
@@ -1,6 +0,0 @@
1
- export declare const buttonVariants: (props?: ({
2
- variant?: "link" | "default" | "destructive" | "destructiveGhost" | "destructiveOutline" | "outline" | "secondary" | "secondaryOutline" | "ghost" | null | undefined;
3
- size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-small" | null | undefined;
4
- rounded?: "small" | "default" | "large" | "full" | null | undefined;
5
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
- //# sourceMappingURL=buttonVariants.d.ts.map
@@ -1,38 +0,0 @@
1
- import { cva as e } from "class-variance-authority";
2
- //#region src/components/button/buttonVariants.tsx
3
- var t = e("inline-flex items-center justify-center font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", {
4
- variants: {
5
- variant: {
6
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
7
- destructive: "bg-destructive text-white hover:bg-destructive/90",
8
- destructiveGhost: "text-destructive hover:bg-destructive/10",
9
- destructiveOutline: "border border-red-500 bg-transparent text-destructive shadow-sm hover:bg-destructive hover:text-white",
10
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
11
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
12
- secondaryOutline: "border border-white border-solid bg-transparent hover:border-input hover:bg-white",
13
- ghost: "hover:bg-accent hover:text-accent-foreground",
14
- link: "text-primary underline-offset-4 hover:underline"
15
- },
16
- size: {
17
- default: "h-10 px-4 py-2",
18
- xs: "h-8 px-3 text-xs",
19
- sm: "h-9 px-3",
20
- lg: "h-11 px-8",
21
- icon: "h-10 w-10",
22
- "icon-small": "h-8 w-8"
23
- },
24
- rounded: {
25
- small: "rounded",
26
- default: "rounded-md",
27
- large: "rounded-lg",
28
- full: "rounded-full"
29
- }
30
- },
31
- defaultVariants: {
32
- variant: "default",
33
- size: "default",
34
- rounded: "default"
35
- }
36
- });
37
- //#endregion
38
- export { t as buttonVariants };
@@ -1,3 +0,0 @@
1
- export * from './Button';
2
- export * from './buttonVariants';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,42 +0,0 @@
1
- import { MediaKindList } from '@levo-so/core';
2
- export declare const documentFileExtensions: string[];
3
- export declare const imageFileExtensions: string[];
4
- export declare const videoFileExtensions: string[];
5
- export declare const audioFileExtensions: string[];
6
- export declare const documentMimetype: {
7
- "application/xml": string[];
8
- "text/plain": string[];
9
- "application/pdf": string[];
10
- "application/msword": string[];
11
- "application/vnd.ms-excel": string[];
12
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": string[];
13
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document": string[];
14
- "text/csv": string[];
15
- };
16
- export declare const imageMimetype: {
17
- "image/jpeg": string[];
18
- "image/jpg": string[];
19
- "image/png": string[];
20
- "image/gif": string[];
21
- "image/svg": string[];
22
- "image/svg+xml": string[];
23
- "image/webp": string[];
24
- "image/avif": string[];
25
- };
26
- export declare const videoMimetype: {
27
- "video/mp4": string[];
28
- "video/mpeg": string[];
29
- "video/webm": string[];
30
- };
31
- export declare const audioMimetype: {
32
- "audio/mpeg": string[];
33
- "audio/ogg": string[];
34
- "audio/opus": string[];
35
- };
36
- export declare const mediaMimetypeByKind: Record<(typeof MediaKindList)[number], Record<string, string[]>>;
37
- export declare const mediaExtensionsByKind: Record<(typeof MediaKindList)[number], string[]>;
38
- export declare const allMediaFileExtensions: string[];
39
- export declare const allMediaMimetypes: {
40
- [x: string]: string[];
41
- };
42
- //# sourceMappingURL=fileUploadPresets.d.ts.map
@@ -1,80 +0,0 @@
1
- //#region src/constants/fileUploadPresets.ts
2
- var e = [
3
- "pdf",
4
- "txt",
5
- "xml",
6
- "xls",
7
- "xlsx",
8
- "ods",
9
- "odt",
10
- "doc",
11
- "docx",
12
- "csv",
13
- "odp",
14
- "ppt",
15
- "pptx"
16
- ], t = [
17
- "svg",
18
- "png",
19
- "jpg",
20
- "jpeg",
21
- "gif",
22
- "webp",
23
- "avif"
24
- ], n = [
25
- "mp4",
26
- "ogv",
27
- "webm"
28
- ], r = [
29
- "mp3",
30
- "ogg",
31
- "opus"
32
- ], i = {
33
- "application/xml": [".xml"],
34
- "text/plain": [".txt"],
35
- "application/pdf": [".pdf"],
36
- "application/msword": [".doc"],
37
- "application/vnd.ms-excel": [".xls"],
38
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
39
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document": [".docx"],
40
- "text/csv": [".csv"]
41
- }, a = {
42
- "image/jpeg": [".jpeg", ".jpg"],
43
- "image/jpg": [".jpg"],
44
- "image/png": [".png"],
45
- "image/gif": [".gif"],
46
- "image/svg": [".svg"],
47
- "image/svg+xml": [".svg"],
48
- "image/webp": [".webp"],
49
- "image/avif": [".avif"]
50
- }, o = {
51
- "video/mp4": [".mp4"],
52
- "video/mpeg": [".mpeg"],
53
- "video/webm": [".webm"]
54
- }, s = {
55
- "audio/mpeg": [".mp3"],
56
- "audio/ogg": [".oga"],
57
- "audio/opus": [".opus"]
58
- }, c = {
59
- audio: s,
60
- document: i,
61
- image: a,
62
- video: o
63
- }, l = {
64
- audio: r,
65
- document: e,
66
- image: t,
67
- video: n
68
- }, u = [
69
- ...l.audio,
70
- ...l.document,
71
- ...l.image,
72
- ...l.video
73
- ], d = {
74
- ...c.audio,
75
- ...c.document,
76
- ...c.image,
77
- ...c.video
78
- };
79
- //#endregion
80
- export { u as allMediaFileExtensions, d as allMediaMimetypes, r as audioFileExtensions, s as audioMimetype, e as documentFileExtensions, i as documentMimetype, t as imageFileExtensions, a as imageMimetype, l as mediaExtensionsByKind, c as mediaMimetypeByKind, n as videoFileExtensions, o as videoMimetype };
@@ -1,2 +0,0 @@
1
- export * from './fileUploadPresets';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +0,0 @@
1
- export declare const byteToSize: (bytes: number, decimals?: number) => string;
2
- export default byteToSize;
3
- //# sourceMappingURL=byteToSize.d.ts.map
@@ -1,18 +0,0 @@
1
- //#region src/utils/byteToSize.ts
2
- var e = (e, t = 2) => {
3
- if (e === 0) return "0 B";
4
- let n = 1024, r = t < 0 ? 0 : t, i = [
5
- "Bytes",
6
- "KB",
7
- "MB",
8
- "GB",
9
- "TB",
10
- "PB",
11
- "EB",
12
- "ZB",
13
- "YB"
14
- ], a = Math.floor(Math.log(e) / Math.log(n));
15
- return `${Number.parseFloat((e / n ** a).toFixed(r))} ${i[a]}`;
16
- };
17
- //#endregion
18
- export { e as default };
@@ -1,4 +0,0 @@
1
- import { ClassValue } from 'clsx';
2
- export declare const cn: (...inputs: ClassValue[]) => string;
3
- export default cn;
4
- //# sourceMappingURL=cn.d.ts.map
package/dist/utils/cn.js DELETED
@@ -1,6 +0,0 @@
1
- import { twMerge as e } from "tailwind-merge";
2
- import { clsx as t } from "clsx";
3
- //#region src/utils/cn.ts
4
- var n = (...n) => e(t(n));
5
- //#endregion
6
- export { n as default };
@@ -1,2 +0,0 @@
1
- export declare const isDateObject: (value: unknown) => value is Date;
2
- //# sourceMappingURL=isDateObject.d.ts.map
@@ -1,4 +0,0 @@
1
- //#region src/utils/isDateObject.ts
2
- var e = (e) => e instanceof Date;
3
- //#endregion
4
- export { e as isDateObject };
@@ -1,5 +0,0 @@
1
- export type EmptyObject = {
2
- [K in string | number]: never;
3
- };
4
- export declare const isEmptyObject: (value: unknown) => value is EmptyObject;
5
- //# sourceMappingURL=isEmptyObject.d.ts.map
@@ -1,5 +0,0 @@
1
- import { isObject as e } from "./isObject.js";
2
- //#region src/utils/isEmptyObject.ts
3
- var t = (t) => e(t) && !Object.keys(t).length;
4
- //#endregion
5
- export { t as isEmptyObject };
@@ -1,2 +0,0 @@
1
- export declare const isNullOrUndefined: (value: unknown) => value is null | undefined;
2
- //# sourceMappingURL=isNullOrUndefined.d.ts.map
@@ -1,4 +0,0 @@
1
- //#region src/utils/isNullOrUndefined.ts
2
- var e = (e) => e == null;
3
- //#endregion
4
- export { e as isNullOrUndefined };
@@ -1,3 +0,0 @@
1
- export declare const isObjectType: (value: unknown) => value is object;
2
- export declare const isObject: <T extends object>(value: unknown) => value is T;
3
- //# sourceMappingURL=isObject.d.ts.map
@@ -1,6 +0,0 @@
1
- import { isDateObject as e } from "./isDateObject.js";
2
- import { isNullOrUndefined as t } from "./isNullOrUndefined.js";
3
- //#region src/utils/isObject.ts
4
- var n = (e) => typeof e == "object", r = (r) => !t(r) && !Array.isArray(r) && n(r) && !e(r);
5
- //#endregion
6
- export { r as isObject, n as isObjectType };