meticulous-ui 3.4.3 → 3.5.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.
package/README.md CHANGED
@@ -58,28 +58,29 @@ import blue from 'meticulous-ui/colors/blue';
58
58
 
59
59
  ## 📦 Components
60
60
 
61
- | Component | Description |
62
- | --------------- | ---------------------------------------------------------------- |
63
- | `Pagination` | Fully responsive pagination component |
64
- | `Toast` | Push 4 types of notifications on screen |
65
- | `Timer` | Renders analog / digital clock with alarm |
66
- | `OtpInput` | Gives inputs to enter and edit OTP |
67
- | `VideoPlayer` | Renders video with keyboard shortcuts |
68
- | `Image` | Renders image with shimmer, lower resolution |
69
- | `Input` | Renders input box to let user enter input |
70
- | `Checkbox` | Renders checkbox to let user give boolean value |
71
- | `RadioGroup` | Renders radio options in a group to let user select |
72
- | `FileUploader` | Renders a button type input from where user can upload |
73
- | `Textarea` | Renders textarea box to let user enter description |
74
- | `Dropdown` | Renders dropdown to select from options |
75
- | `SelectBox` | Renders selectbox to select multiple values from options |
76
- | `Spinner` | Renders a spinner to show the loading state |
77
- | `Loader` | Renders a loader with dots to show the loading state |
78
- | `PageLoader` | Renders a loader with line at the top of page |
79
- | `Button` | Renders a button to click & take an action |
80
- | `Shimmer` | Animated skeleton loading placeholder |
81
- | `Carousel` | Carousel providing slider between components displaying slides |
82
- | `RootComponent` | This is the required wrapper for any app that uses meticulous-ui |
61
+ | Component | Description |
62
+ | --------------- | -------------------------------------------------------------------------------------- |
63
+ | `Pagination` | Fully responsive pagination component |
64
+ | `Toast` | Push 4 types of notifications on screen |
65
+ | `Timer` | Renders analog / digital clock with alarm |
66
+ | `OtpInput` | Gives inputs to enter and edit OTP |
67
+ | `VideoPlayer` | Renders video with keyboard shortcuts |
68
+ | `Image` | Renders image with shimmer, lower resolution |
69
+ | `Input` | Renders input box to let user enter input |
70
+ | `Checkbox` | Renders checkbox to let user give boolean value |
71
+ | `RadioGroup` | Renders radio options in a group to let user select |
72
+ | `FileUploader` | Renders a button type input from where user can upload |
73
+ | `Textarea` | Renders textarea box to let user enter description |
74
+ | `Dropdown` | Renders dropdown to select from options |
75
+ | `SelectBox` | Renders selectbox to select multiple values from options |
76
+ | `Spinner` | Renders a spinner to show the loading state |
77
+ | `Loader` | Renders a loader with dots to show the loading state |
78
+ | `PageLoader` | Renders a loader with line at the top of page |
79
+ | `Button` | Renders a button to click & take an action |
80
+ | `Shimmer` | Animated skeleton loading placeholder |
81
+ | `Carousel` | Carousel providing slider between components displaying slides |
82
+ | `Modal` | Accessible dialog overlay with title, body, footer, and Escape/overlay-click dismissal |
83
+ | `RootComponent` | This is the required wrapper for any app that uses meticulous-ui |
83
84
 
84
85
  ## 📦 Icon Components
85
86
 
@@ -0,0 +1,61 @@
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { useCallback as m, useEffect as h } from "react";
3
+ import { createPortal as f } from "react-dom";
4
+ import { Overlay as k, ModalContainer as v, ModalHeader as w, ModalTitle as x, CloseButton as b, ModalBody as g, ModalFooter as p } from "./styles.js";
5
+ const C = () => /* @__PURE__ */ d(
6
+ "svg",
7
+ {
8
+ width: "18",
9
+ height: "18",
10
+ viewBox: "0 0 24 24",
11
+ fill: "none",
12
+ stroke: "currentColor",
13
+ strokeWidth: "2.5",
14
+ strokeLinecap: "round",
15
+ strokeLinejoin: "round",
16
+ children: [
17
+ /* @__PURE__ */ e("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
18
+ /* @__PURE__ */ e("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
19
+ ]
20
+ }
21
+ ), T = ({
22
+ isOpen: n,
23
+ onClose: o,
24
+ title: l,
25
+ children: c,
26
+ footer: a,
27
+ footerAlign: u = "right",
28
+ width: y,
29
+ closeOnOverlayClick: s = !0,
30
+ showCloseButton: i = !0
31
+ }) => {
32
+ const t = m(
33
+ (r) => {
34
+ r.key === "Escape" && o?.();
35
+ },
36
+ [o]
37
+ );
38
+ return h(() => {
39
+ if (!n) return;
40
+ document.addEventListener("keydown", t);
41
+ const r = document.body.style.overflow;
42
+ return document.body.style.overflow = "hidden", () => {
43
+ document.removeEventListener("keydown", t), document.body.style.overflow = r;
44
+ };
45
+ }, [n, t]), n ? f(
46
+ /* @__PURE__ */ e(k, { role: "dialog", "aria-modal": "true", "aria-label": l, onClick: (r) => {
47
+ s && r.target === r.currentTarget && o?.();
48
+ }, children: /* @__PURE__ */ d(v, { $width: y, children: [
49
+ (l || i) && /* @__PURE__ */ d(w, { children: [
50
+ l && /* @__PURE__ */ e(x, { children: l }),
51
+ i && /* @__PURE__ */ e(b, { onClick: o, "aria-label": "Close modal", children: /* @__PURE__ */ e(C, {}) })
52
+ ] }),
53
+ /* @__PURE__ */ e(g, { children: c }),
54
+ a && /* @__PURE__ */ e(p, { $align: u, children: a })
55
+ ] }) }),
56
+ document.body
57
+ ) : null;
58
+ };
59
+ export {
60
+ T as default
61
+ };
@@ -0,0 +1,4 @@
1
+ import a from "./Modal.js";
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,99 @@
1
+ import o, { css as r, keyframes as n } from "styled-components";
2
+ import e from "../../colors/grey.js";
3
+ import i from "../../colors/white.js";
4
+ const s = n`
5
+ from { opacity: 0; }
6
+ to { opacity: 1; }
7
+ `, a = n`
8
+ from { opacity: 0; transform: translateY(1.5rem); }
9
+ to { opacity: 1; transform: translateY(0); }
10
+ `, m = o.div`
11
+ position: fixed;
12
+ inset: 0;
13
+ background-color: rgba(0, 0, 0, 0.5);
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ z-index: 1000;
18
+ animation: ${s} 0.2s ease;
19
+ padding: 1rem;
20
+ `, f = o.div`
21
+ background-color: ${i};
22
+ border-radius: 1rem;
23
+ box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.2);
24
+ display: flex;
25
+ flex-direction: column;
26
+ max-height: 90vh;
27
+ width: ${({ $width: t }) => t || "32rem"};
28
+ max-width: 100%;
29
+ animation: ${a} 0.25s ease;
30
+ `, p = o.div`
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: space-between;
34
+ padding: 1.25rem 1.5rem;
35
+ border-bottom: 1px solid ${e.m200};
36
+ flex-shrink: 0;
37
+ `, g = o.h2`
38
+ margin: 0;
39
+ font-size: 2.4rem;
40
+ font-weight: 600;
41
+ color: ${e.m900};
42
+ line-height: 1.4;
43
+ `, x = o.button`
44
+ background: none;
45
+ border: none;
46
+ cursor: pointer;
47
+ padding: 0.25rem;
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: center;
51
+ color: ${e.m500};
52
+ border-radius: 0.5rem;
53
+ transition:
54
+ background-color 0.15s,
55
+ color 0.15s;
56
+ flex-shrink: 0;
57
+
58
+ &:hover {
59
+ background-color: ${e.m100};
60
+ color: ${e.m800};
61
+ }
62
+
63
+ &:focus-visible {
64
+ outline: 2px solid ${e.m400};
65
+ outline-offset: 2px;
66
+ }
67
+ `, u = o.div`
68
+ padding: 1.5rem;
69
+ overflow-y: auto;
70
+ flex: 1;
71
+ color: ${e.m700};
72
+ font-size: 0.95rem;
73
+ line-height: 1.6;
74
+ `, y = o.div`
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: flex-end;
78
+ gap: 0.75rem;
79
+ padding: 1rem 1.5rem;
80
+ border-top: 1px solid ${e.m200};
81
+ flex-shrink: 0;
82
+
83
+ ${({ $align: t }) => t === "left" && r`
84
+ justify-content: flex-start;
85
+ `}
86
+
87
+ ${({ $align: t }) => t === "center" && r`
88
+ justify-content: center;
89
+ `}
90
+ `;
91
+ export {
92
+ x as CloseButton,
93
+ u as ModalBody,
94
+ f as ModalContainer,
95
+ y as ModalFooter,
96
+ p as ModalHeader,
97
+ g as ModalTitle,
98
+ m as Overlay
99
+ };
package/index.d.ts ADDED
@@ -0,0 +1,495 @@
1
+ import * as React from 'react';
2
+
3
+ // ---------------------------------------------------------------------------
4
+ // Color palette type
5
+ // ---------------------------------------------------------------------------
6
+
7
+ export interface ColorShades {
8
+ m50?: string;
9
+ m100?: string;
10
+ m200?: string;
11
+ m300?: string;
12
+ m400?: string;
13
+ m500?: string;
14
+ m600?: string;
15
+ m700?: string;
16
+ m800?: string;
17
+ m900?: string;
18
+ a100?: string;
19
+ a200?: string;
20
+ a400?: string;
21
+ a700?: string;
22
+ [key: string]: string | undefined;
23
+ }
24
+
25
+ export type ThemeColor =
26
+ | 'amber'
27
+ | 'black'
28
+ | 'blue'
29
+ | 'blueGray'
30
+ | 'brown'
31
+ | 'cider'
32
+ | 'cyan'
33
+ | 'deepOrange'
34
+ | 'deepPurple'
35
+ | 'green'
36
+ | 'grey'
37
+ | 'indigo'
38
+ | 'lightBlue'
39
+ | 'lightGreen'
40
+ | 'lime'
41
+ | 'orange'
42
+ | 'pink'
43
+ | 'purple'
44
+ | 'red'
45
+ | 'teal'
46
+ | 'violet'
47
+ | 'white'
48
+ | 'yellow';
49
+
50
+ export type ComponentSize = 'small' | 'medium' | 'large';
51
+
52
+ // ---------------------------------------------------------------------------
53
+ // Button
54
+ // ---------------------------------------------------------------------------
55
+
56
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
57
+ theme?: ThemeColor | ColorShades;
58
+ size?: ComponentSize;
59
+ width?: string | number;
60
+ leftIcon?: React.ReactNode;
61
+ rightIcon?: React.ReactNode;
62
+ isLoading?: boolean;
63
+ textColor?: string;
64
+ children?: React.ReactNode;
65
+ }
66
+
67
+ export declare const Button: React.FC<ButtonProps>;
68
+
69
+ // ---------------------------------------------------------------------------
70
+ // Pagination
71
+ // ---------------------------------------------------------------------------
72
+
73
+ export interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
74
+ pageNumber: number;
75
+ setPageNumber: (page: number) => void;
76
+ totalPages: number;
77
+ theme?: ThemeColor;
78
+ size?: ComponentSize;
79
+ isDisabled?: boolean;
80
+ }
81
+
82
+ export declare const Pagination: React.FC<PaginationProps>;
83
+
84
+ // ---------------------------------------------------------------------------
85
+ // Toast
86
+ // ---------------------------------------------------------------------------
87
+
88
+ export type ToastType = 'info' | 'success' | 'warning' | 'error';
89
+
90
+ export interface ToastProps extends React.HTMLAttributes<HTMLDivElement> {
91
+ type?: ToastType;
92
+ visible?: boolean;
93
+ duration?: number;
94
+ onExpire?: () => void;
95
+ title?: string;
96
+ subtitle?: string;
97
+ }
98
+
99
+ export interface ToastItem {
100
+ id: string;
101
+ type?: ToastType;
102
+ title?: string;
103
+ subtitle?: string;
104
+ duration?: number;
105
+ onExpire?: () => void;
106
+ }
107
+
108
+ export interface ToastContainerProps extends React.HTMLAttributes<HTMLDivElement> {
109
+ toasts: ToastItem[];
110
+ }
111
+
112
+ export declare const Toast: React.FC<ToastProps>;
113
+ export declare const ToastContainer: React.FC<ToastContainerProps>;
114
+
115
+ // ---------------------------------------------------------------------------
116
+ // Modal
117
+ // ---------------------------------------------------------------------------
118
+
119
+ export interface ModalProps {
120
+ isOpen: boolean;
121
+ onClose: () => void;
122
+ title?: string;
123
+ children?: React.ReactNode;
124
+ footer?: React.ReactNode;
125
+ footerAlign?: 'left' | 'center' | 'right';
126
+ width?: string | number;
127
+ closeOnOverlayClick?: boolean;
128
+ showCloseButton?: boolean;
129
+ }
130
+
131
+ export declare const Modal: React.FC<ModalProps>;
132
+
133
+ // ---------------------------------------------------------------------------
134
+ // Input
135
+ // ---------------------------------------------------------------------------
136
+
137
+ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
138
+ label?: string;
139
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
140
+ value?: string;
141
+ hasError?: boolean;
142
+ name?: string;
143
+ color?: ThemeColor;
144
+ size?: string;
145
+ disableAutoComplete?: boolean;
146
+ helperText?: string;
147
+ background?: string;
148
+ outerBackground?: string;
149
+ leftIcon?: string;
150
+ rightIcon?: string;
151
+ placeholder?: string;
152
+ }
153
+
154
+ export declare const Input: React.FC<InputProps>;
155
+
156
+ // ---------------------------------------------------------------------------
157
+ // Textarea
158
+ // ---------------------------------------------------------------------------
159
+
160
+ export interface TextareaProps extends Omit<
161
+ React.TextareaHTMLAttributes<HTMLTextAreaElement>,
162
+ 'cols' | 'rows'
163
+ > {
164
+ label?: string;
165
+ onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
166
+ value?: string;
167
+ hasError?: boolean;
168
+ name?: string;
169
+ color?: ThemeColor;
170
+ helperText?: string;
171
+ background?: string;
172
+ outerBackground?: string;
173
+ isDynamic?: boolean;
174
+ isResizeNone?: boolean;
175
+ rows?: string | number;
176
+ cols?: string | number;
177
+ leftIcon?: string;
178
+ rightIcon?: string;
179
+ placeholder?: string;
180
+ }
181
+
182
+ export declare const Textarea: React.FC<TextareaProps>;
183
+
184
+ // ---------------------------------------------------------------------------
185
+ // Checkbox
186
+ // ---------------------------------------------------------------------------
187
+
188
+ export interface CheckboxProps extends Omit<React.HTMLAttributes<HTMLLabelElement>, 'onChange'> {
189
+ label?: string;
190
+ value?: boolean;
191
+ color?: ThemeColor;
192
+ textColor?: string;
193
+ disabled?: boolean;
194
+ onChange: (checked: boolean) => void;
195
+ tabIndex?: number;
196
+ innerShade?: string;
197
+ outerShade?: string;
198
+ }
199
+
200
+ export declare const Checkbox: React.FC<CheckboxProps>;
201
+
202
+ // ---------------------------------------------------------------------------
203
+ // RadioGroup
204
+ // ---------------------------------------------------------------------------
205
+
206
+ export interface RadioOption {
207
+ label: string;
208
+ value: string | number;
209
+ }
210
+
211
+ export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
212
+ options: RadioOption[];
213
+ value: string | number;
214
+ onChange: (value: string | number) => void;
215
+ color?: ThemeColor;
216
+ isHorizonatal?: boolean;
217
+ label?: string;
218
+ ariaLabel?: string;
219
+ name?: string;
220
+ }
221
+
222
+ export declare const RadioGroup: React.FC<RadioGroupProps>;
223
+
224
+ // ---------------------------------------------------------------------------
225
+ // FileUploader
226
+ // ---------------------------------------------------------------------------
227
+
228
+ export interface FileUploaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
229
+ label?: string;
230
+ labelColor?: string;
231
+ theme?: ThemeColor | ColorShades;
232
+ size?: ComponentSize;
233
+ width?: string | number;
234
+ isLoading?: boolean;
235
+ disabled?: boolean;
236
+ prefixIcon?: React.ComponentType;
237
+ suffixIcon?: React.ComponentType;
238
+ type?: string;
239
+ accept?: string;
240
+ isMultiple?: boolean;
241
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
242
+ }
243
+
244
+ export declare const FileUploader: React.FC<FileUploaderProps>;
245
+
246
+ // ---------------------------------------------------------------------------
247
+ // Dropdown
248
+ // ---------------------------------------------------------------------------
249
+
250
+ export interface DropdownOption {
251
+ label: string;
252
+ value: string | number;
253
+ }
254
+
255
+ export interface DropdownProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
256
+ options: DropdownOption[];
257
+ onChange: (value: string | number) => void;
258
+ value?: string | number;
259
+ width?: string;
260
+ menuHeight?: string;
261
+ placeholder?: string;
262
+ theme?: ThemeColor;
263
+ isLoading?: boolean;
264
+ isDisabled?: boolean;
265
+ loaderColor?: string;
266
+ searchable?: boolean;
267
+ onLoadMore?: () => void;
268
+ hasMore?: boolean;
269
+ isLoadingMore?: boolean;
270
+ searchPh?: string;
271
+ }
272
+
273
+ export declare const Dropdown: React.FC<DropdownProps>;
274
+
275
+ // ---------------------------------------------------------------------------
276
+ // Selectbox
277
+ // ---------------------------------------------------------------------------
278
+
279
+ export interface SelectboxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
280
+ options: DropdownOption[];
281
+ onChange: (value: Array<string | number>) => void;
282
+ value?: Array<string | number>;
283
+ width?: string;
284
+ menuHeight?: string;
285
+ placeholder?: string;
286
+ theme?: ThemeColor;
287
+ isDisabled?: boolean;
288
+ isLoading?: boolean;
289
+ searchable?: boolean;
290
+ searchPh?: string;
291
+ onLoadMore?: () => void;
292
+ hasMore?: boolean;
293
+ isLoadingMore?: boolean;
294
+ loaderColor?: string;
295
+ }
296
+
297
+ export declare const Selectbox: React.FC<SelectboxProps>;
298
+
299
+ // ---------------------------------------------------------------------------
300
+ // Shimmer
301
+ // ---------------------------------------------------------------------------
302
+
303
+ export interface ShimmerProps extends React.HTMLAttributes<HTMLDivElement> {
304
+ width?: string | number;
305
+ height?: string | number;
306
+ borderRadius?: string | number;
307
+ label?: string;
308
+ }
309
+
310
+ export declare const Shimmer: React.FC<ShimmerProps>;
311
+
312
+ // ---------------------------------------------------------------------------
313
+ // Spinner
314
+ // ---------------------------------------------------------------------------
315
+
316
+ export interface SpinnerProps extends React.SVGAttributes<SVGElement> {
317
+ color?: ThemeColor | string;
318
+ size?: 'small' | 'medium' | 'large';
319
+ }
320
+
321
+ export declare const Spinner: React.FC<SpinnerProps>;
322
+
323
+ // ---------------------------------------------------------------------------
324
+ // Loader
325
+ // ---------------------------------------------------------------------------
326
+
327
+ export type LoaderTheme =
328
+ | 'blue'
329
+ | 'green'
330
+ | 'red'
331
+ | 'yellow'
332
+ | 'orange'
333
+ | 'black'
334
+ | 'grey'
335
+ | 'violet'
336
+ | 'teal'
337
+ | 'purple'
338
+ | 'pink';
339
+
340
+ export interface LoaderProps extends React.HTMLAttributes<HTMLDivElement> {
341
+ size?: ComponentSize;
342
+ theme?: LoaderTheme;
343
+ isBounce?: boolean;
344
+ isMini?: boolean;
345
+ isMiniDark?: boolean;
346
+ }
347
+
348
+ export declare const Loader: React.FC<LoaderProps>;
349
+
350
+ // ---------------------------------------------------------------------------
351
+ // PageLoader
352
+ // ---------------------------------------------------------------------------
353
+
354
+ export interface PageLoaderProps extends React.HTMLAttributes<HTMLDivElement> {
355
+ theme?: ThemeColor;
356
+ color?: string;
357
+ }
358
+
359
+ export declare const PageLoader: React.FC<PageLoaderProps>;
360
+
361
+ // ---------------------------------------------------------------------------
362
+ // OtpInput
363
+ // ---------------------------------------------------------------------------
364
+
365
+ export interface OtpInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
366
+ length?: number;
367
+ value?: string;
368
+ onChange?: (value: string) => void;
369
+ onComplete?: (value: string) => void;
370
+ }
371
+
372
+ export declare const OtpInput: React.FC<OtpInputProps>;
373
+
374
+ // ---------------------------------------------------------------------------
375
+ // Image
376
+ // ---------------------------------------------------------------------------
377
+
378
+ export interface ImageProps extends React.HTMLAttributes<HTMLDivElement> {
379
+ src: string;
380
+ alt?: string;
381
+ width?: string | number;
382
+ height?: string | number;
383
+ borderRadius?: string | number;
384
+ loadLow?: boolean;
385
+ lowSrc?: string;
386
+ }
387
+
388
+ export declare const Image: React.FC<ImageProps>;
389
+
390
+ // ---------------------------------------------------------------------------
391
+ // VideoPlayer
392
+ // ---------------------------------------------------------------------------
393
+
394
+ export interface VideoPlayerProps extends React.HTMLAttributes<HTMLDivElement> {
395
+ link: string;
396
+ thumbnail?: string;
397
+ width?: string | number;
398
+ height?: string | number;
399
+ borderRadius?: number;
400
+ hasShimmer?: boolean;
401
+ }
402
+
403
+ export declare const VideoPlayer: React.FC<VideoPlayerProps>;
404
+
405
+ // ---------------------------------------------------------------------------
406
+ // Timer
407
+ // ---------------------------------------------------------------------------
408
+
409
+ export interface TimerProps extends React.HTMLAttributes<HTMLDivElement> {
410
+ color?: ThemeColor;
411
+ showTime?: boolean;
412
+ showTimeWithSec?: boolean;
413
+ timeZone?: string;
414
+ isDigital?: boolean;
415
+ timerSeconds?: number;
416
+ onTimerAdd?: () => void;
417
+ onTimerComplete?: () => void;
418
+ onTimerRemove?: () => void;
419
+ onTimerPause?: () => void;
420
+ onTimerPlay?: () => void;
421
+ size?: number;
422
+ }
423
+
424
+ export declare const Timer: React.FC<TimerProps>;
425
+
426
+ // ---------------------------------------------------------------------------
427
+ // Carousel
428
+ // ---------------------------------------------------------------------------
429
+
430
+ export interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
431
+ data: unknown[];
432
+ renderCarousel: (item: unknown, index: number) => React.ReactNode;
433
+ visibleSlides?: number;
434
+ hasArrow?: boolean;
435
+ overlayArrows?: boolean;
436
+ arrowTop?: string | number;
437
+ areDotsHidden?: boolean;
438
+ autoSlide?: boolean;
439
+ autoSlideSec?: number;
440
+ loop?: boolean;
441
+ dragToSlide?: boolean;
442
+ liveDrag?: boolean;
443
+ liveDragMobile?: boolean;
444
+ showProgress?: boolean;
445
+ defaultIndex?: number;
446
+ onSlideChange?: (index: number) => void;
447
+ }
448
+
449
+ export declare const Carousel: React.FC<CarouselProps>;
450
+
451
+ // ---------------------------------------------------------------------------
452
+ // RootComponent
453
+ // ---------------------------------------------------------------------------
454
+
455
+ export interface RootComponentProps extends React.HTMLAttributes<HTMLDivElement> {
456
+ children: React.ReactNode;
457
+ }
458
+
459
+ export declare const RootComponent: React.FC<RootComponentProps>;
460
+
461
+ // ---------------------------------------------------------------------------
462
+ // Hooks
463
+ // ---------------------------------------------------------------------------
464
+
465
+ export declare function usePrevious<T>(value: T): T | undefined;
466
+ export declare function useDebounce<T>(value: T, delay: number): T;
467
+ export declare function useThrottle<T>(value: T, delay: number): T;
468
+ export declare function useToggle(initial?: boolean): [boolean, (next?: boolean) => void];
469
+ export declare function useIsMounted(): React.MutableRefObject<boolean>;
470
+ export declare function useUnmount(callback: () => void): void;
471
+ export declare function useFirstRender(): boolean;
472
+ export declare function useTimeout(callback: () => void, delay: number | null): void;
473
+ export declare function useInterval(callback: () => void, delay: number | null): void;
474
+ export declare function useEventListener(
475
+ event: string,
476
+ handler: (e: Event) => void,
477
+ target?: EventTarget
478
+ ): void;
479
+ export declare function useIntersectionObserver(
480
+ ref: React.RefObject<Element>,
481
+ options?: IntersectionObserverInit
482
+ ): IntersectionObserverEntry | null;
483
+ export declare function useMediaQuery(query: string): boolean;
484
+ export declare function useOutsideClick(
485
+ ref: React.RefObject<Element>,
486
+ callback: (e: MouseEvent | TouchEvent) => void
487
+ ): void;
488
+ export declare function useWindowSize(): { width: number; height: number };
489
+ export declare function useOnlineStatus(): boolean;
490
+ export declare function useLocalStorage<T>(key: string, initialValue: T): [T, (value: T) => void];
491
+ export declare function useSessionStorage<T>(key: string, initialValue: T): [T, (value: T) => void];
492
+ export declare function useCopyToClipboard(): {
493
+ copied: boolean;
494
+ copy: (text: string) => Promise<void>;
495
+ };
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { default as a } from "./components/Pagination/Pagination.js";
2
2
  import { default as r, ToastContainer as f } from "./components/Toast/Toast.js";
3
- import { default as d } from "./components/Spinner/Spinner.js";
3
+ import { default as p } from "./components/Spinner/Spinner.js";
4
4
  import { default as m } from "./components/Loader/Loader.js";
5
5
  import { default as s } from "./components/PageLoader/PageLoader.js";
6
6
  import { default as n } from "./components/OtpInput/OtpInput.js";
@@ -8,40 +8,42 @@ import { default as g } from "./components/Dropdown/Dropdown.js";
8
8
  import { default as P } from "./components/RootComponent/RootComponent.js";
9
9
  import { default as I } from "./components/Selectbox/Selectbox.js";
10
10
  import { default as b } from "./components/Button/Button.js";
11
- import { default as h } from "./components/Timer/Timer.js";
12
- import { default as R } from "./components/Shimmer/Shimmer.js";
13
- import { default as w } from "./components/VideoPlayer/VideoPlayer.js";
14
- import { default as B } from "./components/Image/Image.js";
15
- import { default as F } from "./components/Carousel/Carousel.js";
16
- import { default as H } from "./components/Typography/Headings/index.js";
17
- import { default as U } from "./components/Typography/P/P.js";
18
- import { default as j } from "./components/Input/Input/Input.js";
19
- import { default as v } from "./components/Input/Textarea/Textarea.js";
20
- import { default as A } from "./components/Input/Checkbox/Checkbox.js";
21
- import { default as J } from "./components/Input/RadioGroup/RadioGroup.js";
22
- import { default as M } from "./components/Input/FileUploader/FileUploader.js";
11
+ import { default as h } from "./components/Modal/Modal.js";
12
+ import { default as R } from "./components/Timer/Timer.js";
13
+ import { default as w } from "./components/Shimmer/Shimmer.js";
14
+ import { default as B } from "./components/VideoPlayer/VideoPlayer.js";
15
+ import { default as F } from "./components/Image/Image.js";
16
+ import { default as H } from "./components/Carousel/Carousel.js";
17
+ import { default as O } from "./components/Typography/Headings/index.js";
18
+ import { default as V } from "./components/Typography/P/P.js";
19
+ import { default as q } from "./components/Input/Input/Input.js";
20
+ import { default as z } from "./components/Input/Textarea/Textarea.js";
21
+ import { default as E } from "./components/Input/Checkbox/Checkbox.js";
22
+ import { default as K } from "./components/Input/RadioGroup/RadioGroup.js";
23
+ import { default as Q } from "./components/Input/FileUploader/FileUploader.js";
23
24
  export {
24
25
  b as Button,
25
- F as Carousel,
26
- A as Checkbox,
26
+ H as Carousel,
27
+ E as Checkbox,
27
28
  g as Dropdown,
28
- M as FileUploader,
29
- H as Headings,
30
- B as Image,
31
- j as Input,
29
+ Q as FileUploader,
30
+ O as Headings,
31
+ F as Image,
32
+ q as Input,
32
33
  m as Loader,
34
+ h as Modal,
33
35
  n as OtpInput,
34
- U as P,
36
+ V as P,
35
37
  s as PageLoader,
36
38
  a as Pagination,
37
- J as RadioGroup,
39
+ K as RadioGroup,
38
40
  P as RootComponent,
39
41
  I as Selectbox,
40
- R as Shimmer,
41
- d as Spinner,
42
- v as Textarea,
43
- h as Timer,
42
+ w as Shimmer,
43
+ p as Spinner,
44
+ z as Textarea,
45
+ R as Timer,
44
46
  r as Toast,
45
47
  f as ToastContainer,
46
- w as VideoPlayer
48
+ B as VideoPlayer
47
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meticulous-ui",
3
- "version": "3.4.3",
3
+ "version": "3.5.1",
4
4
  "license": "ISC",
5
5
  "description": "A comprehensive React UI component library with a wide range of customizable components, icons, colors, and utilities for building modern web applications.",
6
6
  "types": "./index.d.ts",