ikoncomponents 1.0.2 → 1.0.8

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.
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ export interface ISVGProps extends React.SVGProps<SVGSVGElement> {
3
+ size?: number;
4
+ className?: string;
5
+ }
6
+ export interface LoadingSpinnerProps extends ISVGProps {
7
+ visible?: boolean;
8
+ }
9
+ export declare const LoadingSpinner: ({ size, className, visible, ...props }: LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoadingSpinner = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const cn_1 = require("../../utils/cn");
6
+ const LoadingSpinner = ({ size = 48, className, visible = true, ...props }) => {
7
+ if (!visible)
8
+ return null;
9
+ return ((0, jsx_runtime_1.jsx)("div", { className: "h-full w-full", children: (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 flex justify-center items-center z-50", children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, ...props, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: (0, cn_1.cn)("animate-spin", className), children: (0, jsx_runtime_1.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }) }) }));
10
+ };
11
+ exports.LoadingSpinner = LoadingSpinner;
package/dist/index.d.ts CHANGED
@@ -1,165 +1,4 @@
1
- import * as React$1 from 'react';
2
- import React__default from 'react';
3
- import * as class_variance_authority_types from 'class-variance-authority/types';
4
- import { VariantProps } from 'class-variance-authority';
5
- import { Control } from 'react-hook-form';
6
- import { LucideIcon } from 'lucide-react';
7
-
8
- interface BreadcrumbItemProps {
9
- title: string;
10
- href?: string;
11
- level: number;
12
- }
13
-
14
- declare function RenderAppBreadcrumb({ breadcrumb, }: {
15
- breadcrumb: BreadcrumbItemProps;
16
- }): React$1.JSX.Element;
17
-
18
- declare const buttonVariants: (props?: {
19
- variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "dashed";
20
- size?: "default" | "sm" | "lg" | "icon" | "smIcon" | "circular" | "lgIcon";
21
- } & class_variance_authority_types.ClassProp) => string;
22
-
23
- interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
24
- children: React__default.ReactNode;
25
- asChild?: boolean;
26
- }
27
- interface ButtonWithTooltipProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
28
- children: React__default.ReactNode;
29
- asChild?: boolean;
30
- tooltipContent: string | React__default.ReactNode;
31
- }
32
- declare function TextButton({ children, variant, asChild, size, ...props }: ButtonProps): React__default.JSX.Element;
33
- declare function TextButtonWithTooltip({ children, variant, asChild, size, tooltipContent, ...props }: ButtonWithTooltipProps): React__default.JSX.Element;
34
- declare function IconTextButton({ children, variant, asChild, size, ...props }: ButtonProps): React__default.JSX.Element;
35
- declare function IconTextButtonWithTooltip({ children, variant, size, asChild, tooltipContent, ...props }: ButtonWithTooltipProps): React__default.JSX.Element;
36
- declare function IconButton({ children, variant, size, asChild, ...props }: ButtonProps): React__default.JSX.Element;
37
- declare function IconButtonWithTooltip({ children, tooltipContent, asChild, variant, size, ...props }: ButtonWithTooltipProps): React__default.JSX.Element;
38
-
39
- interface FormComboboxInputProps {
40
- formControl: Control<any>;
41
- name: string;
42
- label?: string;
43
- placeholder?: string;
44
- formDescription?: string;
45
- items: {
46
- value: string;
47
- label: string;
48
- disabled?: boolean | ((item: any) => boolean);
49
- }[];
50
- disabled?: boolean | ((...args: any[]) => boolean);
51
- onSelect?: (value: any) => void;
52
- value?: string;
53
- onChange?: (value: any) => void;
54
- }
55
-
56
- interface GlowingEffectProps {
57
- blur?: number;
58
- inactiveZone?: number;
59
- proximity?: number;
60
- spread?: number;
61
- variant?: "default" | "white";
62
- glow?: boolean;
63
- className?: string;
64
- disabled?: boolean;
65
- movementDuration?: number;
66
- borderWidth?: number;
67
- }
68
- declare const GlowingEffect: React$1.MemoExoticComponent<({ blur, inactiveZone, proximity, spread, variant, glow, className, movementDuration, borderWidth, disabled, }: GlowingEffectProps) => React$1.JSX.Element>;
69
-
70
- interface ISVGProps extends React.SVGProps<SVGSVGElement> {
71
- size?: number;
72
- className?: string;
73
- }
74
- interface LoadingSpinnerProps extends ISVGProps {
75
- visible?: boolean;
76
- }
77
- declare const LoadingSpinner: ({ size, className, visible, ...props }: LoadingSpinnerProps) => React$1.JSX.Element;
78
-
79
- declare function SheetComponent({ buttonText, buttonIcon, buttonStyle, sheetContent, sheetDescription, sheetTitle, closeButton }: {
80
- buttonText?: React.ReactNode;
81
- buttonIcon?: React.ReactNode;
82
- buttonStyle?: string;
83
- sheetTitle?: React.ReactNode;
84
- sheetDescription?: React.ReactNode;
85
- sheetContent?: React.ReactNode;
86
- closeButton?: boolean;
87
- }): React$1.JSX.Element;
88
-
89
- declare function SkeletonWidget({ count }: {
90
- count: number;
91
- }): React$1.JSX.Element;
92
-
93
- interface Props {
94
- title: string;
95
- value: number;
96
- valueText?: string;
97
- isPercent?: boolean;
98
- className?: string;
99
- titleClassName?: string;
100
- valueClassName?: string;
101
- progressClassName?: string;
102
- }
103
- declare function TitleProgress({ title, value, valueText, isPercent, className, titleClassName, valueClassName, progressClassName }: Props): React$1.JSX.Element;
104
-
105
- declare function Tooltip({ tooltipContent, children }: {
106
- tooltipContent: string | React.ReactNode;
107
- children: React.ReactNode;
108
- }): React$1.JSX.Element;
109
-
110
- interface FrameworkEntry {
111
- id: string;
112
- index: string;
113
- title: string;
114
- description: string;
115
- parentId: string | null;
116
- treatAsParent: boolean;
117
- }
118
- interface TreeNode extends FrameworkEntry {
119
- level: number;
120
- }
121
- interface ParentEntry extends FrameworkEntry {
122
- childrenArray: string[];
123
- }
124
- interface ProcessedFrameworkData {
125
- flatTree: TreeNode[];
126
- itemMap: Record<string, {
127
- parentId: string | null;
128
- childrenIds: string[];
129
- }>;
130
- }
131
- interface FrameworkItemDropdownProps {
132
- processedData: ProcessedFrameworkData;
133
- value: string[];
134
- onChange: (newSelection: string[]) => void;
135
- placeholder?: string;
136
- searchPlaceholder?: string;
137
- className?: string;
138
- }
139
- declare function FrameworkItemDropdown({ processedData, value, onChange, placeholder, searchPlaceholder, className, }: FrameworkItemDropdownProps): React$1.JSX.Element;
140
-
141
- declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React$1.ComponentProps<"div"> & {
142
- side?: "left" | "right";
143
- variant?: "sidebar" | "floating" | "inset";
144
- collapsible?: "offcanvas" | "icon" | "none";
145
- }): React$1.JSX.Element;
146
-
147
- declare function AppSidebar({ ...props }: React$1.ComponentProps<typeof Sidebar>): React$1.JSX.Element;
148
-
149
- declare function NavMain({ items, }: {
150
- items: {
151
- title: string;
152
- url: string;
153
- icon?: LucideIcon;
154
- isActive?: boolean;
155
- default?: boolean;
156
- items?: {
157
- title: string;
158
- url: string;
159
- }[];
160
- }[];
161
- }): React$1.JSX.Element;
162
-
163
- declare function ThemeSwitcher(): React$1.JSX.Element;
164
-
165
- export { AppSidebar, type ButtonProps, type ButtonWithTooltipProps, type FormComboboxInputProps, type FrameworkEntry, FrameworkItemDropdown, GlowingEffect, type ISVGProps, IconButton, IconButtonWithTooltip, IconTextButton, IconTextButtonWithTooltip, LoadingSpinner, type LoadingSpinnerProps, NavMain, type ParentEntry, type ProcessedFrameworkData, RenderAppBreadcrumb, SheetComponent, SkeletonWidget, TextButton, TextButtonWithTooltip, ThemeSwitcher, TitleProgress, Tooltip, type TreeNode };
1
+ import "./styles.css";
2
+ export * from "./ikoncomponents/loading-spinner";
3
+ export * from "./utils/cn";
4
+ export * from "./utils/theme-provider";