dhanasekar-ui 1.2.0 → 1.4.0
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/chunk-2CO3UUBT.js +170 -0
- package/dist/chunk-2CO3UUBT.js.map +1 -0
- package/dist/chunk-3HGMPMXD.js +61 -0
- package/dist/chunk-3HGMPMXD.js.map +1 -0
- package/dist/chunk-46U234GX.mjs +42 -0
- package/dist/chunk-46U234GX.mjs.map +1 -0
- package/dist/chunk-5FU43BWK.mjs +121 -0
- package/dist/chunk-5FU43BWK.mjs.map +1 -0
- package/dist/chunk-7XVF6WPJ.js +108 -0
- package/dist/chunk-7XVF6WPJ.js.map +1 -0
- package/dist/{chunk-GNMGJBBO.mjs → chunk-AK3NQBYU.mjs} +3 -3
- package/dist/chunk-AK3NQBYU.mjs.map +1 -0
- package/dist/chunk-ALCHPZY6.js +149 -0
- package/dist/chunk-ALCHPZY6.js.map +1 -0
- package/dist/chunk-BNBEIMM2.mjs +61 -0
- package/dist/chunk-BNBEIMM2.mjs.map +1 -0
- package/dist/chunk-BQVXQWPS.mjs +129 -0
- package/dist/chunk-BQVXQWPS.mjs.map +1 -0
- package/dist/chunk-DBSBLGGH.js +40 -0
- package/dist/chunk-DBSBLGGH.js.map +1 -0
- package/dist/chunk-DVDVLGDJ.js +121 -0
- package/dist/chunk-DVDVLGDJ.js.map +1 -0
- package/dist/chunk-EN76JE3Y.js +64 -0
- package/dist/chunk-EN76JE3Y.js.map +1 -0
- package/dist/chunk-FLTDFXE3.mjs +170 -0
- package/dist/chunk-FLTDFXE3.mjs.map +1 -0
- package/dist/chunk-GSRVWW2G.mjs +177 -0
- package/dist/chunk-GSRVWW2G.mjs.map +1 -0
- package/dist/chunk-GZGTDLFV.js +72 -0
- package/dist/chunk-GZGTDLFV.js.map +1 -0
- package/dist/chunk-HGGQFNUJ.mjs +2 -0
- package/dist/chunk-HGGQFNUJ.mjs.map +1 -0
- package/dist/chunk-HWD2HCCH.js +129 -0
- package/dist/chunk-HWD2HCCH.js.map +1 -0
- package/dist/chunk-I6OJHQZX.mjs +2 -0
- package/dist/chunk-I6OJHQZX.mjs.map +1 -0
- package/dist/chunk-ISHUTZ36.js +42 -0
- package/dist/chunk-ISHUTZ36.js.map +1 -0
- package/dist/chunk-JC4TJWCY.mjs +97 -0
- package/dist/chunk-JC4TJWCY.mjs.map +1 -0
- package/dist/chunk-JM6DZDO3.js +87 -0
- package/dist/chunk-JM6DZDO3.js.map +1 -0
- package/dist/chunk-KUXDQANJ.mjs +72 -0
- package/dist/chunk-KUXDQANJ.mjs.map +1 -0
- package/dist/chunk-LIBHUJ27.js +2 -0
- package/dist/chunk-LIBHUJ27.js.map +1 -0
- package/dist/chunk-MALTBURB.mjs +64 -0
- package/dist/chunk-MALTBURB.mjs.map +1 -0
- package/dist/chunk-MLURKSJZ.js +2 -0
- package/dist/chunk-MLURKSJZ.js.map +1 -0
- package/dist/chunk-MOC6N23X.mjs +151 -0
- package/dist/chunk-MOC6N23X.mjs.map +1 -0
- package/dist/chunk-P5HHRCE5.js +198 -0
- package/dist/chunk-P5HHRCE5.js.map +1 -0
- package/dist/chunk-PL2R3LYL.mjs +198 -0
- package/dist/chunk-PL2R3LYL.mjs.map +1 -0
- package/dist/chunk-PPQ7NSV3.js +97 -0
- package/dist/chunk-PPQ7NSV3.js.map +1 -0
- package/dist/chunk-T3YOHFUU.js +177 -0
- package/dist/chunk-T3YOHFUU.js.map +1 -0
- package/dist/chunk-UCFS7EH2.mjs +40 -0
- package/dist/chunk-UCFS7EH2.mjs.map +1 -0
- package/dist/chunk-ULMQZANW.mjs +87 -0
- package/dist/chunk-ULMQZANW.mjs.map +1 -0
- package/dist/chunk-UYHBKE7G.mjs +108 -0
- package/dist/chunk-UYHBKE7G.mjs.map +1 -0
- package/dist/chunk-W5B5N6BW.mjs +149 -0
- package/dist/chunk-W5B5N6BW.mjs.map +1 -0
- package/dist/{chunk-6SVKDKK7.mjs → chunk-XWEEWNZK.mjs} +4 -4
- package/dist/chunk-XWEEWNZK.mjs.map +1 -0
- package/dist/{chunk-3RAQQWLW.js → chunk-YPMUFP2I.js} +4 -4
- package/dist/chunk-YPMUFP2I.js.map +1 -0
- package/dist/chunk-ZMB4U5RP.js +151 -0
- package/dist/chunk-ZMB4U5RP.js.map +1 -0
- package/dist/{chunk-2TXYJ7YE.js → chunk-ZPJSBORX.js} +3 -3
- package/dist/chunk-ZPJSBORX.js.map +1 -0
- package/dist/components/AppBar/index.d.mts +89 -0
- package/dist/components/AppBar/index.d.ts +89 -0
- package/dist/components/AppBar/index.js +2 -0
- package/dist/components/AppBar/index.js.map +1 -0
- package/dist/components/AppBar/index.mjs +2 -0
- package/dist/components/AppBar/index.mjs.map +1 -0
- package/dist/components/Box/index.d.mts +28 -0
- package/dist/components/Box/index.d.ts +28 -0
- package/dist/components/Box/index.js +2 -0
- package/dist/components/Box/index.js.map +1 -0
- package/dist/components/Box/index.mjs +2 -0
- package/dist/components/Box/index.mjs.map +1 -0
- package/dist/components/Container/index.d.mts +71 -0
- package/dist/components/Container/index.d.ts +71 -0
- package/dist/components/Container/index.js +2 -0
- package/dist/components/Container/index.js.map +1 -0
- package/dist/components/Container/index.mjs +2 -0
- package/dist/components/Container/index.mjs.map +1 -0
- package/dist/components/DateFilter/index.d.mts +8 -1
- package/dist/components/DateFilter/index.d.ts +8 -1
- package/dist/components/DateFilter/index.js +1 -1
- package/dist/components/DateFilter/index.mjs +1 -1
- package/dist/components/FileUploadField/index.d.mts +4 -2
- package/dist/components/FileUploadField/index.d.ts +4 -2
- package/dist/components/FileUploadField/index.js +1 -1
- package/dist/components/FileUploadField/index.mjs +1 -1
- package/dist/components/FormLayout/index.d.mts +8 -2
- package/dist/components/FormLayout/index.d.ts +8 -2
- package/dist/components/FormLayout/index.js +1 -1
- package/dist/components/FormLayout/index.mjs +1 -1
- package/dist/components/Grid/index.d.mts +48 -0
- package/dist/components/Grid/index.d.ts +48 -0
- package/dist/components/Grid/index.js +2 -0
- package/dist/components/Grid/index.js.map +1 -0
- package/dist/components/Grid/index.mjs +2 -0
- package/dist/components/Grid/index.mjs.map +1 -0
- package/dist/components/List/index.d.mts +98 -0
- package/dist/components/List/index.d.ts +98 -0
- package/dist/components/List/index.js +2 -0
- package/dist/components/List/index.js.map +1 -0
- package/dist/components/List/index.mjs +2 -0
- package/dist/components/List/index.mjs.map +1 -0
- package/dist/components/Navigator/index.d.mts +87 -0
- package/dist/components/Navigator/index.d.ts +87 -0
- package/dist/components/Navigator/index.js +2 -0
- package/dist/components/Navigator/index.js.map +1 -0
- package/dist/components/Navigator/index.mjs +2 -0
- package/dist/components/Navigator/index.mjs.map +1 -0
- package/dist/components/Pagination/index.d.mts +89 -0
- package/dist/components/Pagination/index.d.ts +89 -0
- package/dist/components/Pagination/index.js +2 -0
- package/dist/components/Pagination/index.js.map +1 -0
- package/dist/components/Pagination/index.mjs +2 -0
- package/dist/components/Pagination/index.mjs.map +1 -0
- package/dist/components/PdfImageUpload/index.d.mts +30 -0
- package/dist/components/PdfImageUpload/index.d.ts +30 -0
- package/dist/components/PdfImageUpload/index.js +2 -0
- package/dist/components/PdfImageUpload/index.js.map +1 -0
- package/dist/components/PdfImageUpload/index.mjs +2 -0
- package/dist/components/PdfImageUpload/index.mjs.map +1 -0
- package/dist/components/Progress/index.d.mts +52 -0
- package/dist/components/Progress/index.d.ts +52 -0
- package/dist/components/Progress/index.js +2 -0
- package/dist/components/Progress/index.js.map +1 -0
- package/dist/components/Progress/index.mjs +2 -0
- package/dist/components/Progress/index.mjs.map +1 -0
- package/dist/components/RadioGroup/index.d.mts +99 -0
- package/dist/components/RadioGroup/index.d.ts +99 -0
- package/dist/components/RadioGroup/index.js +2 -0
- package/dist/components/RadioGroup/index.js.map +1 -0
- package/dist/components/RadioGroup/index.mjs +2 -0
- package/dist/components/RadioGroup/index.mjs.map +1 -0
- package/dist/components/Skeleton/index.d.mts +45 -0
- package/dist/components/Skeleton/index.d.ts +45 -0
- package/dist/components/Skeleton/index.js +2 -0
- package/dist/components/Skeleton/index.js.map +1 -0
- package/dist/components/Skeleton/index.mjs +2 -0
- package/dist/components/Skeleton/index.mjs.map +1 -0
- package/dist/components/Slider/index.d.mts +181 -0
- package/dist/components/Slider/index.d.ts +181 -0
- package/dist/components/Slider/index.js +2 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Slider/index.mjs +2 -0
- package/dist/components/Slider/index.mjs.map +1 -0
- package/dist/components/Snackbar/index.d.mts +80 -0
- package/dist/components/Snackbar/index.d.ts +80 -0
- package/dist/components/Snackbar/index.js +2 -0
- package/dist/components/Snackbar/index.js.map +1 -0
- package/dist/components/Snackbar/index.mjs +2 -0
- package/dist/components/Snackbar/index.mjs.map +1 -0
- package/dist/components/Text/index.d.mts +2 -1
- package/dist/components/Text/index.d.ts +2 -1
- package/dist/components/ToolBar/index.d.mts +60 -0
- package/dist/components/ToolBar/index.d.ts +60 -0
- package/dist/components/ToolBar/index.js +2 -0
- package/dist/components/ToolBar/index.js.map +1 -0
- package/dist/components/ToolBar/index.mjs +2 -0
- package/dist/components/ToolBar/index.mjs.map +1 -0
- package/dist/components/Tray/index.d.mts +140 -0
- package/dist/components/Tray/index.d.ts +140 -0
- package/dist/components/Tray/index.js +2 -0
- package/dist/components/Tray/index.js.map +1 -0
- package/dist/components/Tray/index.mjs +2 -0
- package/dist/components/Tray/index.mjs.map +1 -0
- package/dist/index.d.mts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types-BJWJOB_w.d.mts +5 -0
- package/dist/types-BJWJOB_w.d.ts +5 -0
- package/package.json +84 -2
- package/dist/chunk-2TXYJ7YE.js.map +0 -1
- package/dist/chunk-3RAQQWLW.js.map +0 -1
- package/dist/chunk-6SVKDKK7.mjs.map +0 -1
- package/dist/chunk-GNMGJBBO.mjs.map +0 -1
- package/dist/chunk-ZEMR63S4.js +0 -198
- package/dist/chunk-ZEMR63S4.js.map +0 -1
- package/dist/chunk-ZY5AHZYZ.mjs +0 -198
- package/dist/chunk-ZY5AHZYZ.mjs.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ElementType, ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { S as SxProp } from '../../types-BJWJOB_w.js';
|
|
4
|
+
|
|
5
|
+
interface ToolBarClasses {
|
|
6
|
+
/** Styles applied to the root element. */
|
|
7
|
+
root?: string;
|
|
8
|
+
/** Styles applied to the root element if `disableGutters={false}`. */
|
|
9
|
+
gutters?: string;
|
|
10
|
+
/** Styles applied to the root element if `variant="regular"`. */
|
|
11
|
+
regular?: string;
|
|
12
|
+
/** Styles applied to the root element if `variant="dense"`. */
|
|
13
|
+
dense?: string;
|
|
14
|
+
}
|
|
15
|
+
interface ToolBarBaseProps {
|
|
16
|
+
/**
|
|
17
|
+
* The Toolbar children, usually a mixture of IconButton, Button and Typography.
|
|
18
|
+
* The Toolbar is a flex container, allowing flex item properties to be used to lay out the children.
|
|
19
|
+
*/
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Override or extend the styles applied to the component.
|
|
23
|
+
*/
|
|
24
|
+
classes?: ToolBarClasses;
|
|
25
|
+
/**
|
|
26
|
+
* If true, disables gutter padding.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
disableGutters?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
32
|
+
*/
|
|
33
|
+
sx?: SxProp;
|
|
34
|
+
/**
|
|
35
|
+
* The variant to use.
|
|
36
|
+
* @default 'regular'
|
|
37
|
+
*/
|
|
38
|
+
variant?: 'dense' | 'regular' | string;
|
|
39
|
+
/**
|
|
40
|
+
* Additional CSS class names.
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The ToolBar component is a flex container for laying out children in a header or other containers.
|
|
46
|
+
*/
|
|
47
|
+
type ToolBarProps<T extends ElementType = 'div'> = ToolBarBaseProps & Omit<ComponentPropsWithoutRef<T>, keyof ToolBarBaseProps | 'component'> & {
|
|
48
|
+
/**
|
|
49
|
+
* The component used for the root node. Either a string to use a HTML element or a component.
|
|
50
|
+
* @default 'div'
|
|
51
|
+
*/
|
|
52
|
+
component?: T;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The ToolBar component is a flexible container for actions and branding.
|
|
57
|
+
*/
|
|
58
|
+
declare const ToolBar: react.ForwardRefExoticComponent<Omit<ToolBarProps<ElementType>, "ref"> & react.RefAttributes<unknown>>;
|
|
59
|
+
|
|
60
|
+
export { SxProp, ToolBar, type ToolBarBaseProps, type ToolBarClasses, type ToolBarProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, SyntheticEvent, ElementType, CSSProperties, ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
|
|
4
|
+
type TrayAnchor = 'bottom' | 'left' | 'right' | 'top';
|
|
5
|
+
type TrayVariant = 'permanent' | 'persistent' | 'temporary';
|
|
6
|
+
type TrayCloseReason = 'escapeKeyDown' | 'backdropClick';
|
|
7
|
+
interface TraySlots {
|
|
8
|
+
/**
|
|
9
|
+
* The component used for the backdrop.
|
|
10
|
+
*/
|
|
11
|
+
backdrop?: ElementType;
|
|
12
|
+
/**
|
|
13
|
+
* The component used when the drawer is docked (permanent/persistent variants).
|
|
14
|
+
*/
|
|
15
|
+
docked?: ElementType;
|
|
16
|
+
/**
|
|
17
|
+
* The component used for the paper surface of the drawer.
|
|
18
|
+
*/
|
|
19
|
+
paper?: ElementType;
|
|
20
|
+
/**
|
|
21
|
+
* The component used for the root node.
|
|
22
|
+
*/
|
|
23
|
+
root?: ElementType;
|
|
24
|
+
/**
|
|
25
|
+
* The component used for the slide transition.
|
|
26
|
+
*/
|
|
27
|
+
transition?: ElementType;
|
|
28
|
+
}
|
|
29
|
+
interface TraySlotProps {
|
|
30
|
+
/**
|
|
31
|
+
* Props for the backdrop slot.
|
|
32
|
+
*/
|
|
33
|
+
backdrop?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
34
|
+
/**
|
|
35
|
+
* Props for the docked slot.
|
|
36
|
+
*/
|
|
37
|
+
docked?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
38
|
+
/**
|
|
39
|
+
* Props for the paper slot.
|
|
40
|
+
*/
|
|
41
|
+
paper?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
42
|
+
/**
|
|
43
|
+
* Props for the root slot.
|
|
44
|
+
*/
|
|
45
|
+
root?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
46
|
+
/**
|
|
47
|
+
* Props for the transition slot.
|
|
48
|
+
*/
|
|
49
|
+
transition?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
50
|
+
}
|
|
51
|
+
interface TrayTransitionDuration {
|
|
52
|
+
appear?: number;
|
|
53
|
+
enter?: number;
|
|
54
|
+
exit?: number;
|
|
55
|
+
}
|
|
56
|
+
interface TrayBaseProps {
|
|
57
|
+
/**
|
|
58
|
+
* Side from which the drawer will appear.
|
|
59
|
+
* @default 'left'
|
|
60
|
+
*/
|
|
61
|
+
anchor?: TrayAnchor;
|
|
62
|
+
/**
|
|
63
|
+
* The content of the component.
|
|
64
|
+
*/
|
|
65
|
+
children?: ReactNode;
|
|
66
|
+
/**
|
|
67
|
+
* Override or extend the styles applied to the component.
|
|
68
|
+
* See CSS classes API below for more details.
|
|
69
|
+
*/
|
|
70
|
+
classes?: {
|
|
71
|
+
root?: string;
|
|
72
|
+
docked?: string;
|
|
73
|
+
paper?: string;
|
|
74
|
+
modal?: string;
|
|
75
|
+
backdrop?: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The elevation of the drawer.
|
|
79
|
+
* @default 16
|
|
80
|
+
*/
|
|
81
|
+
elevation?: number;
|
|
82
|
+
/**
|
|
83
|
+
* If true, the backdrop is not rendered.
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
hideBackdrop?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Props applied to the Modal element.
|
|
89
|
+
* @default {}
|
|
90
|
+
*/
|
|
91
|
+
ModalProps?: Record<string, any>;
|
|
92
|
+
/**
|
|
93
|
+
* Callback fired when the component requests to be closed.
|
|
94
|
+
* The reason parameter can optionally be used to control the response to onClose.
|
|
95
|
+
*
|
|
96
|
+
* @param event The event source of the callback.
|
|
97
|
+
* @param reason Can be: "escapeKeyDown", "backdropClick".
|
|
98
|
+
*/
|
|
99
|
+
onClose?: (event: SyntheticEvent | KeyboardEvent, reason: TrayCloseReason) => void;
|
|
100
|
+
/**
|
|
101
|
+
* If true, the component is shown.
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
104
|
+
open?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* The props used for each slot inside.
|
|
107
|
+
* @default {}
|
|
108
|
+
*/
|
|
109
|
+
slotProps?: TraySlotProps;
|
|
110
|
+
/**
|
|
111
|
+
* The components used for each slot inside.
|
|
112
|
+
* @default {}
|
|
113
|
+
*/
|
|
114
|
+
slots?: TraySlots;
|
|
115
|
+
/**
|
|
116
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
117
|
+
* See the `sx` page for more details.
|
|
118
|
+
*/
|
|
119
|
+
sx?: CSSProperties | Array<CSSProperties | boolean> | ((theme: any) => CSSProperties);
|
|
120
|
+
/**
|
|
121
|
+
* The duration for the transition, in milliseconds.
|
|
122
|
+
* You may specify a single timeout for all transitions, or individually with an object.
|
|
123
|
+
* @default { enter: 225, exit: 195 }
|
|
124
|
+
*/
|
|
125
|
+
transitionDuration?: number | TrayTransitionDuration;
|
|
126
|
+
/**
|
|
127
|
+
* The variant to use.
|
|
128
|
+
* @default 'temporary'
|
|
129
|
+
*/
|
|
130
|
+
variant?: TrayVariant;
|
|
131
|
+
/**
|
|
132
|
+
* Custom className for the root element.
|
|
133
|
+
*/
|
|
134
|
+
className?: string;
|
|
135
|
+
}
|
|
136
|
+
type TrayProps = TrayBaseProps & Omit<ComponentPropsWithoutRef<'div'>, keyof TrayBaseProps>;
|
|
137
|
+
|
|
138
|
+
declare const Tray: react.ForwardRefExoticComponent<TrayBaseProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof TrayBaseProps> & react.RefAttributes<HTMLDivElement>>;
|
|
139
|
+
|
|
140
|
+
export { Tray, type TrayAnchor, type TrayBaseProps, type TrayCloseReason, type TrayProps, type TraySlotProps, type TraySlots, type TrayTransitionDuration, type TrayVariant };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, SyntheticEvent, ElementType, CSSProperties, ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
|
|
4
|
+
type TrayAnchor = 'bottom' | 'left' | 'right' | 'top';
|
|
5
|
+
type TrayVariant = 'permanent' | 'persistent' | 'temporary';
|
|
6
|
+
type TrayCloseReason = 'escapeKeyDown' | 'backdropClick';
|
|
7
|
+
interface TraySlots {
|
|
8
|
+
/**
|
|
9
|
+
* The component used for the backdrop.
|
|
10
|
+
*/
|
|
11
|
+
backdrop?: ElementType;
|
|
12
|
+
/**
|
|
13
|
+
* The component used when the drawer is docked (permanent/persistent variants).
|
|
14
|
+
*/
|
|
15
|
+
docked?: ElementType;
|
|
16
|
+
/**
|
|
17
|
+
* The component used for the paper surface of the drawer.
|
|
18
|
+
*/
|
|
19
|
+
paper?: ElementType;
|
|
20
|
+
/**
|
|
21
|
+
* The component used for the root node.
|
|
22
|
+
*/
|
|
23
|
+
root?: ElementType;
|
|
24
|
+
/**
|
|
25
|
+
* The component used for the slide transition.
|
|
26
|
+
*/
|
|
27
|
+
transition?: ElementType;
|
|
28
|
+
}
|
|
29
|
+
interface TraySlotProps {
|
|
30
|
+
/**
|
|
31
|
+
* Props for the backdrop slot.
|
|
32
|
+
*/
|
|
33
|
+
backdrop?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
34
|
+
/**
|
|
35
|
+
* Props for the docked slot.
|
|
36
|
+
*/
|
|
37
|
+
docked?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
38
|
+
/**
|
|
39
|
+
* Props for the paper slot.
|
|
40
|
+
*/
|
|
41
|
+
paper?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
42
|
+
/**
|
|
43
|
+
* Props for the root slot.
|
|
44
|
+
*/
|
|
45
|
+
root?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
46
|
+
/**
|
|
47
|
+
* Props for the transition slot.
|
|
48
|
+
*/
|
|
49
|
+
transition?: Record<string, any> | ((ownerState: any) => Record<string, any>);
|
|
50
|
+
}
|
|
51
|
+
interface TrayTransitionDuration {
|
|
52
|
+
appear?: number;
|
|
53
|
+
enter?: number;
|
|
54
|
+
exit?: number;
|
|
55
|
+
}
|
|
56
|
+
interface TrayBaseProps {
|
|
57
|
+
/**
|
|
58
|
+
* Side from which the drawer will appear.
|
|
59
|
+
* @default 'left'
|
|
60
|
+
*/
|
|
61
|
+
anchor?: TrayAnchor;
|
|
62
|
+
/**
|
|
63
|
+
* The content of the component.
|
|
64
|
+
*/
|
|
65
|
+
children?: ReactNode;
|
|
66
|
+
/**
|
|
67
|
+
* Override or extend the styles applied to the component.
|
|
68
|
+
* See CSS classes API below for more details.
|
|
69
|
+
*/
|
|
70
|
+
classes?: {
|
|
71
|
+
root?: string;
|
|
72
|
+
docked?: string;
|
|
73
|
+
paper?: string;
|
|
74
|
+
modal?: string;
|
|
75
|
+
backdrop?: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The elevation of the drawer.
|
|
79
|
+
* @default 16
|
|
80
|
+
*/
|
|
81
|
+
elevation?: number;
|
|
82
|
+
/**
|
|
83
|
+
* If true, the backdrop is not rendered.
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
hideBackdrop?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Props applied to the Modal element.
|
|
89
|
+
* @default {}
|
|
90
|
+
*/
|
|
91
|
+
ModalProps?: Record<string, any>;
|
|
92
|
+
/**
|
|
93
|
+
* Callback fired when the component requests to be closed.
|
|
94
|
+
* The reason parameter can optionally be used to control the response to onClose.
|
|
95
|
+
*
|
|
96
|
+
* @param event The event source of the callback.
|
|
97
|
+
* @param reason Can be: "escapeKeyDown", "backdropClick".
|
|
98
|
+
*/
|
|
99
|
+
onClose?: (event: SyntheticEvent | KeyboardEvent, reason: TrayCloseReason) => void;
|
|
100
|
+
/**
|
|
101
|
+
* If true, the component is shown.
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
104
|
+
open?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* The props used for each slot inside.
|
|
107
|
+
* @default {}
|
|
108
|
+
*/
|
|
109
|
+
slotProps?: TraySlotProps;
|
|
110
|
+
/**
|
|
111
|
+
* The components used for each slot inside.
|
|
112
|
+
* @default {}
|
|
113
|
+
*/
|
|
114
|
+
slots?: TraySlots;
|
|
115
|
+
/**
|
|
116
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
117
|
+
* See the `sx` page for more details.
|
|
118
|
+
*/
|
|
119
|
+
sx?: CSSProperties | Array<CSSProperties | boolean> | ((theme: any) => CSSProperties);
|
|
120
|
+
/**
|
|
121
|
+
* The duration for the transition, in milliseconds.
|
|
122
|
+
* You may specify a single timeout for all transitions, or individually with an object.
|
|
123
|
+
* @default { enter: 225, exit: 195 }
|
|
124
|
+
*/
|
|
125
|
+
transitionDuration?: number | TrayTransitionDuration;
|
|
126
|
+
/**
|
|
127
|
+
* The variant to use.
|
|
128
|
+
* @default 'temporary'
|
|
129
|
+
*/
|
|
130
|
+
variant?: TrayVariant;
|
|
131
|
+
/**
|
|
132
|
+
* Custom className for the root element.
|
|
133
|
+
*/
|
|
134
|
+
className?: string;
|
|
135
|
+
}
|
|
136
|
+
type TrayProps = TrayBaseProps & Omit<ComponentPropsWithoutRef<'div'>, keyof TrayBaseProps>;
|
|
137
|
+
|
|
138
|
+
declare const Tray: react.ForwardRefExoticComponent<TrayBaseProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof TrayBaseProps> & react.RefAttributes<HTMLDivElement>>;
|
|
139
|
+
|
|
140
|
+
export { Tray, type TrayAnchor, type TrayBaseProps, type TrayCloseReason, type TrayProps, type TraySlotProps, type TraySlots, type TrayTransitionDuration, type TrayVariant };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { S as SxProp } from './types-BJWJOB_w.mjs';
|
|
1
2
|
import { ClassValue } from 'clsx';
|
|
2
3
|
export { IdleTimer, IdleTimerComponentProps, IdleTimerProps } from './components/IdleTimer/index.mjs';
|
|
3
4
|
export { Button, ButtonBaseProps, ButtonProps, buttonVariants } from './components/Button/index.mjs';
|
|
@@ -11,11 +12,26 @@ export { Card, CardActionArea, CardActionAreaBaseProps, CardActionAreaProps, Car
|
|
|
11
12
|
export { Tooltip, TooltipProps } from './components/Tooltip/index.mjs';
|
|
12
13
|
export { Loader, LoaderBaseProps, LoaderProps } from './components/Loader/index.mjs';
|
|
13
14
|
export { FileMultipleProps, FileSingleProps, FileUploadField, FileUploadFieldBaseProps, FileUploadFieldProps, FileUploadType } from './components/FileUploadField/index.mjs';
|
|
15
|
+
export { PdfImageUpload, PdfImageUploadProps } from './components/PdfImageUpload/index.mjs';
|
|
14
16
|
export { Text, TextAlign, TextColor, TextProps, TextVariant } from './components/Text/index.mjs';
|
|
15
17
|
export { MenuItem, MenuItemProps, Select, SelectBaseProps, SelectChangeEvent, SelectProps } from './components/Select/index.mjs';
|
|
18
|
+
export { Navigator, NavigatorBaseProps, NavigatorProps } from './components/Navigator/index.mjs';
|
|
19
|
+
export { Tray, TrayAnchor, TrayBaseProps, TrayCloseReason, TrayProps, TraySlotProps, TraySlots, TrayTransitionDuration, TrayVariant } from './components/Tray/index.mjs';
|
|
20
|
+
export { Box, BoxBaseProps, BoxProps } from './components/Box/index.mjs';
|
|
21
|
+
export { Container, ContainerBaseProps, ContainerClasses, ContainerProps } from './components/Container/index.mjs';
|
|
22
|
+
export { Radio, RadioGroup, RadioGroupContext, RadioGroupContextValue, RadioGroupProps, RadioIcon, RadioProps, RadioUncheckedIcon } from './components/RadioGroup/index.mjs';
|
|
23
|
+
export { AppBar, AppBarBaseProps, AppBarClasses, AppBarProps } from './components/AppBar/index.mjs';
|
|
24
|
+
export { ToolBar, ToolBarBaseProps, ToolBarClasses, ToolBarProps } from './components/ToolBar/index.mjs';
|
|
25
|
+
export { Slider, SliderProps } from './components/Slider/index.mjs';
|
|
16
26
|
export { FormLayout, FormLayoutProps, StepItem } from './components/FormLayout/index.mjs';
|
|
17
27
|
export { DateFilter, DateFilterOption, DateFilterProps, DateFilterValue } from './components/DateFilter/index.mjs';
|
|
18
28
|
export { ConfirmationDialog, ConfirmationDialogProps } from './components/ConfirmationDialog/index.mjs';
|
|
29
|
+
export { Grid, GridDirection, GridProps, GridSize, GridSizeObj, GridWrap } from './components/Grid/index.mjs';
|
|
30
|
+
export { Collapse, CollapseProps, List, ListItemButton, ListItemButtonProps, ListItemIcon, ListItemIconProps, ListItemText, ListItemTextProps, ListProps, ListSubheader, ListSubheaderProps } from './components/List/index.mjs';
|
|
31
|
+
export { Skeleton, SkeletonAnimation, SkeletonProps, SkeletonVariant } from './components/Skeleton/index.mjs';
|
|
32
|
+
export { Snackbar, SnackbarOrigin, SnackbarProps } from './components/Snackbar/index.mjs';
|
|
33
|
+
export { CircularProgress, CircularProgressProps, LinearProgress, LinearProgressProps, ProgressBaseProps } from './components/Progress/index.mjs';
|
|
34
|
+
export { Pagination, PaginationProps } from './components/Pagination/index.mjs';
|
|
19
35
|
import 'react';
|
|
20
36
|
import 'class-variance-authority/types';
|
|
21
37
|
import 'class-variance-authority';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { S as SxProp } from './types-BJWJOB_w.js';
|
|
1
2
|
import { ClassValue } from 'clsx';
|
|
2
3
|
export { IdleTimer, IdleTimerComponentProps, IdleTimerProps } from './components/IdleTimer/index.js';
|
|
3
4
|
export { Button, ButtonBaseProps, ButtonProps, buttonVariants } from './components/Button/index.js';
|
|
@@ -11,11 +12,26 @@ export { Card, CardActionArea, CardActionAreaBaseProps, CardActionAreaProps, Car
|
|
|
11
12
|
export { Tooltip, TooltipProps } from './components/Tooltip/index.js';
|
|
12
13
|
export { Loader, LoaderBaseProps, LoaderProps } from './components/Loader/index.js';
|
|
13
14
|
export { FileMultipleProps, FileSingleProps, FileUploadField, FileUploadFieldBaseProps, FileUploadFieldProps, FileUploadType } from './components/FileUploadField/index.js';
|
|
15
|
+
export { PdfImageUpload, PdfImageUploadProps } from './components/PdfImageUpload/index.js';
|
|
14
16
|
export { Text, TextAlign, TextColor, TextProps, TextVariant } from './components/Text/index.js';
|
|
15
17
|
export { MenuItem, MenuItemProps, Select, SelectBaseProps, SelectChangeEvent, SelectProps } from './components/Select/index.js';
|
|
18
|
+
export { Navigator, NavigatorBaseProps, NavigatorProps } from './components/Navigator/index.js';
|
|
19
|
+
export { Tray, TrayAnchor, TrayBaseProps, TrayCloseReason, TrayProps, TraySlotProps, TraySlots, TrayTransitionDuration, TrayVariant } from './components/Tray/index.js';
|
|
20
|
+
export { Box, BoxBaseProps, BoxProps } from './components/Box/index.js';
|
|
21
|
+
export { Container, ContainerBaseProps, ContainerClasses, ContainerProps } from './components/Container/index.js';
|
|
22
|
+
export { Radio, RadioGroup, RadioGroupContext, RadioGroupContextValue, RadioGroupProps, RadioIcon, RadioProps, RadioUncheckedIcon } from './components/RadioGroup/index.js';
|
|
23
|
+
export { AppBar, AppBarBaseProps, AppBarClasses, AppBarProps } from './components/AppBar/index.js';
|
|
24
|
+
export { ToolBar, ToolBarBaseProps, ToolBarClasses, ToolBarProps } from './components/ToolBar/index.js';
|
|
25
|
+
export { Slider, SliderProps } from './components/Slider/index.js';
|
|
16
26
|
export { FormLayout, FormLayoutProps, StepItem } from './components/FormLayout/index.js';
|
|
17
27
|
export { DateFilter, DateFilterOption, DateFilterProps, DateFilterValue } from './components/DateFilter/index.js';
|
|
18
28
|
export { ConfirmationDialog, ConfirmationDialogProps } from './components/ConfirmationDialog/index.js';
|
|
29
|
+
export { Grid, GridDirection, GridProps, GridSize, GridSizeObj, GridWrap } from './components/Grid/index.js';
|
|
30
|
+
export { Collapse, CollapseProps, List, ListItemButton, ListItemButtonProps, ListItemIcon, ListItemIconProps, ListItemText, ListItemTextProps, ListProps, ListSubheader, ListSubheaderProps } from './components/List/index.js';
|
|
31
|
+
export { Skeleton, SkeletonAnimation, SkeletonProps, SkeletonVariant } from './components/Skeleton/index.js';
|
|
32
|
+
export { Snackbar, SnackbarOrigin, SnackbarProps } from './components/Snackbar/index.js';
|
|
33
|
+
export { CircularProgress, CircularProgressProps, LinearProgress, LinearProgressProps, ProgressBaseProps } from './components/Progress/index.js';
|
|
34
|
+
export { Pagination, PaginationProps } from './components/Pagination/index.js';
|
|
19
35
|
import 'react';
|
|
20
36
|
import 'class-variance-authority/types';
|
|
21
37
|
import 'class-variance-authority';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkT3YOHFUU_js=require('./chunk-T3YOHFUU.js'),chunkCDALMRVJ_js=require('./chunk-CDALMRVJ.js'),chunkJM6DZDO3_js=require('./chunk-JM6DZDO3.js'),chunk2CO3UUBT_js=require('./chunk-2CO3UUBT.js'),chunkZMB4U5RP_js=require('./chunk-ZMB4U5RP.js'),chunk5BAYROPS_js=require('./chunk-5BAYROPS.js'),chunkISHUTZ36_js=require('./chunk-ISHUTZ36.js'),chunkBM36E6BY_js=require('./chunk-BM36E6BY.js'),chunkALCHPZY6_js=require('./chunk-ALCHPZY6.js'),chunkL3Y3AD6X_js=require('./chunk-L3Y3AD6X.js'),chunkYRYAP2N7_js=require('./chunk-YRYAP2N7.js'),chunkEN76JE3Y_js=require('./chunk-EN76JE3Y.js'),chunkDVDVLGDJ_js=require('./chunk-DVDVLGDJ.js'),chunkGZGTDLFV_js=require('./chunk-GZGTDLFV.js'),chunkHWD2HCCH_js=require('./chunk-HWD2HCCH.js'),chunkPPQ7NSV3_js=require('./chunk-PPQ7NSV3.js'),chunk3HGMPMXD_js=require('./chunk-3HGMPMXD.js'),chunkCJ2DPBHE_js=require('./chunk-CJ2DPBHE.js'),chunkZPJSBORX_js=require('./chunk-ZPJSBORX.js'),chunkP5HHRCE5_js=require('./chunk-P5HHRCE5.js'),chunkDBSBLGGH_js=require('./chunk-DBSBLGGH.js'),chunkGT5QTRLR_js=require('./chunk-GT5QTRLR.js'),chunkYPMUFP2I_js=require('./chunk-YPMUFP2I.js');require('./chunk-MLURKSJZ.js');var chunkV3WVMXXX_js=require('./chunk-V3WVMXXX.js'),chunk7XVF6WPJ_js=require('./chunk-7XVF6WPJ.js'),chunkBQFCZZDK_js=require('./chunk-BQFCZZDK.js'),chunkH2LTPKLL_js=require('./chunk-H2LTPKLL.js'),chunkLIBHUJ27_js=require('./chunk-LIBHUJ27.js'),chunk6C7E4Q7J_js=require('./chunk-6C7E4Q7J.js'),chunkUBWTBUO2_js=require('./chunk-UBWTBUO2.js'),chunkCN4G4LGR_js=require('./chunk-CN4G4LGR.js'),chunk2BM7TRDS_js=require('./chunk-2BM7TRDS.js'),chunkDDGBDWFC_js=require('./chunk-DDGBDWFC.js');Object.defineProperty(exports,"Tray",{enumerable:true,get:function(){return chunkT3YOHFUU_js.a}});Object.defineProperty(exports,"MenuItem",{enumerable:true,get:function(){return chunkCDALMRVJ_js.b}});Object.defineProperty(exports,"Select",{enumerable:true,get:function(){return chunkCDALMRVJ_js.a}});Object.defineProperty(exports,"Skeleton",{enumerable:true,get:function(){return chunkJM6DZDO3_js.a}});Object.defineProperty(exports,"Slider",{enumerable:true,get:function(){return chunk2CO3UUBT_js.a}});Object.defineProperty(exports,"Snackbar",{enumerable:true,get:function(){return chunkZMB4U5RP_js.a}});Object.defineProperty(exports,"Switch",{enumerable:true,get:function(){return chunk5BAYROPS_js.a}});Object.defineProperty(exports,"ToolBar",{enumerable:true,get:function(){return chunkISHUTZ36_js.a}});Object.defineProperty(exports,"Tooltip",{enumerable:true,get:function(){return chunkBM36E6BY_js.a}});Object.defineProperty(exports,"Collapse",{enumerable:true,get:function(){return chunkALCHPZY6_js.f}});Object.defineProperty(exports,"List",{enumerable:true,get:function(){return chunkALCHPZY6_js.a}});Object.defineProperty(exports,"ListItemButton",{enumerable:true,get:function(){return chunkALCHPZY6_js.c}});Object.defineProperty(exports,"ListItemIcon",{enumerable:true,get:function(){return chunkALCHPZY6_js.d}});Object.defineProperty(exports,"ListItemText",{enumerable:true,get:function(){return chunkALCHPZY6_js.e}});Object.defineProperty(exports,"ListSubheader",{enumerable:true,get:function(){return chunkALCHPZY6_js.b}});Object.defineProperty(exports,"Loader",{enumerable:true,get:function(){return chunkL3Y3AD6X_js.a}});Object.defineProperty(exports,"Modal",{enumerable:true,get:function(){return chunkYRYAP2N7_js.a}});Object.defineProperty(exports,"Navigator",{enumerable:true,get:function(){return chunkEN76JE3Y_js.a}});Object.defineProperty(exports,"PdfImageUpload",{enumerable:true,get:function(){return chunkDVDVLGDJ_js.a}});Object.defineProperty(exports,"Pagination",{enumerable:true,get:function(){return chunkGZGTDLFV_js.a}});Object.defineProperty(exports,"CircularProgress",{enumerable:true,get:function(){return chunkHWD2HCCH_js.a}});Object.defineProperty(exports,"LinearProgress",{enumerable:true,get:function(){return chunkHWD2HCCH_js.b}});Object.defineProperty(exports,"Radio",{enumerable:true,get:function(){return chunkPPQ7NSV3_js.e}});Object.defineProperty(exports,"RadioGroup",{enumerable:true,get:function(){return chunkPPQ7NSV3_js.b}});Object.defineProperty(exports,"RadioGroupContext",{enumerable:true,get:function(){return chunkPPQ7NSV3_js.a}});Object.defineProperty(exports,"RadioIcon",{enumerable:true,get:function(){return chunkPPQ7NSV3_js.c}});Object.defineProperty(exports,"RadioUncheckedIcon",{enumerable:true,get:function(){return chunkPPQ7NSV3_js.d}});Object.defineProperty(exports,"Container",{enumerable:true,get:function(){return chunk3HGMPMXD_js.a}});Object.defineProperty(exports,"CheckBoxIcon",{enumerable:true,get:function(){return chunkCJ2DPBHE_js.a}});Object.defineProperty(exports,"CheckBoxOutlineBlankIcon",{enumerable:true,get:function(){return chunkCJ2DPBHE_js.b}});Object.defineProperty(exports,"Checkbox",{enumerable:true,get:function(){return chunkCJ2DPBHE_js.d}});Object.defineProperty(exports,"IndeterminateCheckBoxIcon",{enumerable:true,get:function(){return chunkCJ2DPBHE_js.c}});Object.defineProperty(exports,"DateFilter",{enumerable:true,get:function(){return chunkZPJSBORX_js.a}});Object.defineProperty(exports,"FileUploadField",{enumerable:true,get:function(){return chunkP5HHRCE5_js.a}});Object.defineProperty(exports,"Grid",{enumerable:true,get:function(){return chunkDBSBLGGH_js.a}});Object.defineProperty(exports,"IdleTimer",{enumerable:true,get:function(){return chunkGT5QTRLR_js.a}});Object.defineProperty(exports,"FormLayout",{enumerable:true,get:function(){return chunkYPMUFP2I_js.a}});Object.defineProperty(exports,"Input",{enumerable:true,get:function(){return chunkV3WVMXXX_js.a}});Object.defineProperty(exports,"AppBar",{enumerable:true,get:function(){return chunk7XVF6WPJ_js.a}});Object.defineProperty(exports,"Avatar",{enumerable:true,get:function(){return chunkBQFCZZDK_js.a}});Object.defineProperty(exports,"Badge",{enumerable:true,get:function(){return chunkH2LTPKLL_js.a}});Object.defineProperty(exports,"Box",{enumerable:true,get:function(){return chunkLIBHUJ27_js.a}});Object.defineProperty(exports,"Button",{enumerable:true,get:function(){return chunk6C7E4Q7J_js.b}});Object.defineProperty(exports,"buttonVariants",{enumerable:true,get:function(){return chunk6C7E4Q7J_js.a}});Object.defineProperty(exports,"Card",{enumerable:true,get:function(){return chunkUBWTBUO2_js.a}});Object.defineProperty(exports,"CardActionArea",{enumerable:true,get:function(){return chunkUBWTBUO2_js.f}});Object.defineProperty(exports,"CardActions",{enumerable:true,get:function(){return chunkUBWTBUO2_js.e}});Object.defineProperty(exports,"CardContent",{enumerable:true,get:function(){return chunkUBWTBUO2_js.d}});Object.defineProperty(exports,"CardHeader",{enumerable:true,get:function(){return chunkUBWTBUO2_js.b}});Object.defineProperty(exports,"CardMedia",{enumerable:true,get:function(){return chunkUBWTBUO2_js.c}});Object.defineProperty(exports,"Text",{enumerable:true,get:function(){return chunkCN4G4LGR_js.a}});Object.defineProperty(exports,"ConfirmationDialog",{enumerable:true,get:function(){return chunk2BM7TRDS_js.a}});Object.defineProperty(exports,"cn",{enumerable:true,get:function(){return chunkDDGBDWFC_js.a}});//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as
|
|
1
|
+
export{a as Tray}from'./chunk-GSRVWW2G.mjs';export{b as MenuItem,a as Select}from'./chunk-2K6E3M6X.mjs';export{a as Skeleton}from'./chunk-ULMQZANW.mjs';export{a as Slider}from'./chunk-FLTDFXE3.mjs';export{a as Snackbar}from'./chunk-MOC6N23X.mjs';export{a as Switch}from'./chunk-33P6OQSB.mjs';export{a as ToolBar}from'./chunk-46U234GX.mjs';export{a as Tooltip}from'./chunk-YM6W6FK6.mjs';export{f as Collapse,a as List,c as ListItemButton,d as ListItemIcon,e as ListItemText,b as ListSubheader}from'./chunk-W5B5N6BW.mjs';export{a as Loader}from'./chunk-4VCCLGED.mjs';export{a as Modal}from'./chunk-SHZ3M7US.mjs';export{a as Navigator}from'./chunk-MALTBURB.mjs';export{a as PdfImageUpload}from'./chunk-5FU43BWK.mjs';export{a as Pagination}from'./chunk-KUXDQANJ.mjs';export{a as CircularProgress,b as LinearProgress}from'./chunk-BQVXQWPS.mjs';export{e as Radio,b as RadioGroup,a as RadioGroupContext,c as RadioIcon,d as RadioUncheckedIcon}from'./chunk-JC4TJWCY.mjs';export{a as Container}from'./chunk-BNBEIMM2.mjs';export{a as CheckBoxIcon,b as CheckBoxOutlineBlankIcon,d as Checkbox,c as IndeterminateCheckBoxIcon}from'./chunk-ZUAS66IF.mjs';export{a as DateFilter}from'./chunk-AK3NQBYU.mjs';export{a as FileUploadField}from'./chunk-PL2R3LYL.mjs';export{a as Grid}from'./chunk-UCFS7EH2.mjs';export{a as IdleTimer}from'./chunk-4HRAPJIS.mjs';export{a as FormLayout}from'./chunk-XWEEWNZK.mjs';import'./chunk-HGGQFNUJ.mjs';export{a as Input}from'./chunk-VFGXUH56.mjs';export{a as AppBar}from'./chunk-UYHBKE7G.mjs';export{a as Avatar}from'./chunk-EHI64N43.mjs';export{a as Badge}from'./chunk-RW2NNPXC.mjs';export{a as Box}from'./chunk-I6OJHQZX.mjs';export{b as Button,a as buttonVariants}from'./chunk-BYYOIYEH.mjs';export{a as Card,f as CardActionArea,e as CardActions,d as CardContent,b as CardHeader,c as CardMedia}from'./chunk-RB4QTTZ3.mjs';export{a as Text}from'./chunk-N6F5P3SO.mjs';export{a as ConfirmationDialog}from'./chunk-ICWNP5NA.mjs';export{a as cn}from'./chunk-547MQ4FI.mjs';//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dhanasekar-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A production-ready UI library built with React, TypeScript, and Tailwind CSS.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -86,6 +86,31 @@
|
|
|
86
86
|
"import": "./dist/components/Text/index.mjs",
|
|
87
87
|
"require": "./dist/components/Text/index.js"
|
|
88
88
|
},
|
|
89
|
+
"./Select": {
|
|
90
|
+
"types": "./dist/components/Select/index.d.ts",
|
|
91
|
+
"import": "./dist/components/Select/index.mjs",
|
|
92
|
+
"require": "./dist/components/Select/index.js"
|
|
93
|
+
},
|
|
94
|
+
"./Navigator": {
|
|
95
|
+
"types": "./dist/components/Navigator/index.d.ts",
|
|
96
|
+
"import": "./dist/components/Navigator/index.mjs",
|
|
97
|
+
"require": "./dist/components/Navigator/index.js"
|
|
98
|
+
},
|
|
99
|
+
"./Tray": {
|
|
100
|
+
"types": "./dist/components/Tray/index.d.ts",
|
|
101
|
+
"import": "./dist/components/Tray/index.mjs",
|
|
102
|
+
"require": "./dist/components/Tray/index.js"
|
|
103
|
+
},
|
|
104
|
+
"./Box": {
|
|
105
|
+
"types": "./dist/components/Box/index.d.ts",
|
|
106
|
+
"import": "./dist/components/Box/index.mjs",
|
|
107
|
+
"require": "./dist/components/Box/index.js"
|
|
108
|
+
},
|
|
109
|
+
"./Container": {
|
|
110
|
+
"types": "./dist/components/Container/index.d.ts",
|
|
111
|
+
"import": "./dist/components/Container/index.mjs",
|
|
112
|
+
"require": "./dist/components/Container/index.js"
|
|
113
|
+
},
|
|
89
114
|
"./FormLayout": {
|
|
90
115
|
"types": "./dist/components/FormLayout/index.d.ts",
|
|
91
116
|
"import": "./dist/components/FormLayout/index.mjs",
|
|
@@ -95,6 +120,61 @@
|
|
|
95
120
|
"types": "./dist/components/DateFilter/index.d.ts",
|
|
96
121
|
"import": "./dist/components/DateFilter/index.mjs",
|
|
97
122
|
"require": "./dist/components/DateFilter/index.js"
|
|
123
|
+
},
|
|
124
|
+
"./Model": {
|
|
125
|
+
"types": "./dist/components/Model/index.d.ts",
|
|
126
|
+
"import": "./dist/components/Model/index.mjs",
|
|
127
|
+
"require": "./dist/components/Model/index.js"
|
|
128
|
+
},
|
|
129
|
+
"./ConfirmationDialog": {
|
|
130
|
+
"types": "./dist/components/ConfirmationDialog/index.d.ts",
|
|
131
|
+
"import": "./dist/components/ConfirmationDialog/index.mjs",
|
|
132
|
+
"require": "./dist/components/ConfirmationDialog/index.js"
|
|
133
|
+
},
|
|
134
|
+
"./Grid": {
|
|
135
|
+
"types": "./dist/components/Grid/index.d.ts",
|
|
136
|
+
"import": "./dist/components/Grid/index.mjs",
|
|
137
|
+
"require": "./dist/components/Grid/index.js"
|
|
138
|
+
},
|
|
139
|
+
"./List": {
|
|
140
|
+
"types": "./dist/components/List/index.d.ts",
|
|
141
|
+
"import": "./dist/components/List/index.mjs",
|
|
142
|
+
"require": "./dist/components/List/index.js"
|
|
143
|
+
},
|
|
144
|
+
"./Skeleton": {
|
|
145
|
+
"types": "./dist/components/Skeleton/index.d.ts",
|
|
146
|
+
"import": "./dist/components/Skeleton/index.mjs",
|
|
147
|
+
"require": "./dist/components/Skeleton/index.js"
|
|
148
|
+
},
|
|
149
|
+
"./Snackbar": {
|
|
150
|
+
"types": "./dist/components/Snackbar/index.d.ts",
|
|
151
|
+
"import": "./dist/components/Snackbar/index.mjs",
|
|
152
|
+
"require": "./dist/components/Snackbar/index.js"
|
|
153
|
+
},
|
|
154
|
+
"./Progress": {
|
|
155
|
+
"types": "./dist/components/Progress/index.d.ts",
|
|
156
|
+
"import": "./dist/components/Progress/index.mjs",
|
|
157
|
+
"require": "./dist/components/Progress/index.js"
|
|
158
|
+
},
|
|
159
|
+
"./Pagination": {
|
|
160
|
+
"types": "./dist/components/Pagination/index.d.ts",
|
|
161
|
+
"import": "./dist/components/Pagination/index.mjs",
|
|
162
|
+
"require": "./dist/components/Pagination/index.js"
|
|
163
|
+
},
|
|
164
|
+
"./RadioGroup": {
|
|
165
|
+
"types": "./dist/components/RadioGroup/index.d.ts",
|
|
166
|
+
"import": "./dist/components/RadioGroup/index.mjs",
|
|
167
|
+
"require": "./dist/components/RadioGroup/index.js"
|
|
168
|
+
},
|
|
169
|
+
"./AppBar": {
|
|
170
|
+
"types": "./dist/components/AppBar/index.d.ts",
|
|
171
|
+
"import": "./dist/components/AppBar/index.mjs",
|
|
172
|
+
"require": "./dist/components/AppBar/index.js"
|
|
173
|
+
},
|
|
174
|
+
"./PdfImageUpload": {
|
|
175
|
+
"types": "./dist/components/PdfImageUpload/index.d.ts",
|
|
176
|
+
"import": "./dist/components/PdfImageUpload/index.mjs",
|
|
177
|
+
"require": "./dist/components/PdfImageUpload/index.js"
|
|
98
178
|
}
|
|
99
179
|
},
|
|
100
180
|
"scripts": {
|
|
@@ -103,7 +183,9 @@
|
|
|
103
183
|
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
|
104
184
|
"test": "vitest run",
|
|
105
185
|
"test:watch": "vitest",
|
|
106
|
-
"typecheck": "tsc --noEmit"
|
|
186
|
+
"typecheck": "tsc --noEmit",
|
|
187
|
+
"storybook": "storybook dev -p 6006",
|
|
188
|
+
"build-storybook": "storybook build"
|
|
107
189
|
},
|
|
108
190
|
"peerDependencies": {
|
|
109
191
|
"react": ">=18",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DateFilter/DateFilter.tsx"],"names":["STYLES","DEFAULT_OPTIONS","DateFilter","open","title","options","initialValue","onClose","onApply","option","setOption","useState","from","setFrom","to","setTo","backdropRef","useRef","useEffect","handleBackdropClick","handleKeyDown","e","handleApply","todayStr","jsxs","Fragment","jsx","opt"],"mappings":"oFAKMA,CAAAA,CAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;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k-2TXYJ7YE.js","sourcesContent":["'use client';\n\nimport React, { useState, useEffect, useRef } from 'react';\nimport { DateFilterProps, DateFilterValue } from './DateFilter.types';\n\nconst STYLES = `\n :root {\n --df-primary: #3b82f6;\n --df-primary-hover: #2563eb;\n --df-text-main: #1e293b;\n --df-text-secondary: #64748b;\n --df-bg-main: #ffffff;\n --df-bg-glass: rgba(255, 255, 255, 0.85);\n --df-border: #e2e8f0;\n --df-border-focus: #3b82f6;\n --df-radius-lg: 12px;\n --df-radius-md: 8px;\n --df-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n }\n\n .df-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(15, 23, 42, 0.4);\n backdrop-filter: blur(4px);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n }\n\n .df-backdrop.df-open {\n opacity: 1;\n visibility: visible;\n }\n\n .df-dialog {\n background: var(--df-bg-glass);\n backdrop-filter: blur(16px);\n width: 100%;\n max-width: 400px;\n border-radius: var(--df-radius-lg);\n box-shadow: var(--df-shadow);\n display: flex;\n flex-direction: column;\n transform: scale(0.95) translateY(10px);\n opacity: 0;\n transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;\n font-family: 'Inter', system-ui, -apple-system, sans-serif;\n border: 1px solid rgba(255, 255, 255, 0.5);\n margin: 16px;\n }\n\n .df-backdrop.df-open .df-dialog {\n transform: scale(1) translateY(0);\n opacity: 1;\n }\n\n .df-header {\n padding: 20px 24px 16px;\n border-bottom: 1px solid var(--df-border);\n }\n\n .df-title {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--df-primary);\n }\n\n .df-content {\n padding: 24px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n\n .df-form-group {\n display: flex;\n flex-direction: column;\n gap: 8px;\n position: relative;\n }\n\n .df-label {\n font-size: 13px;\n font-weight: 500;\n color: var(--df-text-secondary);\n }\n\n .df-input {\n width: 100%;\n padding: 10px 14px;\n font-size: 14px;\n color: var(--df-text-main);\n background: var(--df-bg-main);\n border: 1px solid var(--df-border);\n border-radius: var(--df-radius-md);\n outline: none;\n transition: all 0.2s ease;\n box-sizing: border-box;\n appearance: none;\n font-family: inherit;\n }\n\n .df-input:focus {\n border-color: var(--df-border-focus);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);\n }\n\n /* Custom Select Wrapper for arrow */\n .df-select-wrapper {\n position: relative;\n width: 100%;\n }\n\n .df-select-wrapper::after {\n content: '';\n position: absolute;\n right: 14px;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n height: 0;\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n border-top: 5px solid var(--df-text-secondary);\n pointer-events: none;\n }\n\n .df-select {\n padding-right: 32px;\n cursor: pointer;\n }\n\n .df-custom-range {\n display: flex;\n gap: 16px;\n animation: dfSlideDown 0.3s ease-out;\n }\n\n .df-custom-range .df-form-group {\n flex: 1;\n }\n\n @keyframes dfSlideDown {\n from { opacity: 0; transform: translateY(-10px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n .df-footer {\n padding: 16px 24px 24px;\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n }\n\n .df-btn {\n padding: 8px 16px;\n font-size: 14px;\n font-weight: 600;\n border-radius: var(--df-radius-md);\n cursor: pointer;\n transition: all 0.2s ease;\n border: 1px solid transparent;\n font-family: inherit;\n }\n\n .df-btn-cancel {\n background: transparent;\n color: var(--df-text-secondary);\n }\n\n .df-btn-cancel:hover {\n background: rgba(0, 0, 0, 0.04);\n color: var(--df-text-main);\n }\n\n .df-btn-apply {\n background: var(--df-primary);\n color: white;\n box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);\n }\n\n .df-btn-apply:hover {\n background: var(--df-primary-hover);\n transform: translateY(-1px);\n box-shadow: 0 4px 6px rgba(59, 130, 246, 0.4);\n }\n\n .df-btn-apply:active {\n transform: translateY(0);\n }\n \n /* Prevent background scrolling when modal is open */\n body.df-modal-open {\n overflow: hidden;\n }\n`;\n\nconst DEFAULT_OPTIONS = [\n 'Today',\n 'Yesterday',\n 'Last 7 Days',\n 'Last 30 Days',\n 'This Month',\n 'Last Month',\n 'Custom'\n];\n\nexport const DateFilter = ({\n open,\n title = 'Date Filter',\n options = DEFAULT_OPTIONS,\n initialValue,\n onClose,\n onApply\n}: DateFilterProps) => {\n const [option, setOption] = useState<string>(initialValue?.option || 'Today');\n const [from, setFrom] = useState<string>(initialValue?.from || '');\n const [to, setTo] = useState<string>(initialValue?.to || '');\n \n const backdropRef = useRef<HTMLDivElement>(null);\n\n // Sync state with prop if it changes\n useEffect(() => {\n if (open && initialValue) {\n setOption(initialValue.option);\n setFrom(initialValue.from || '');\n setTo(initialValue.to || '');\n }\n }, [open, initialValue]);\n\n // Handle body scroll locking\n useEffect(() => {\n if (open) {\n document.body.classList.add('df-modal-open');\n } else {\n document.body.classList.remove('df-modal-open');\n }\n return () => document.body.classList.remove('df-modal-open');\n }, [open]);\n\n // Handle click outside\n const handleBackdropClick = (e: React.MouseEvent) => {\n if (e.target === backdropRef.current) {\n onClose();\n }\n };\n\n // Handle Escape key\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && open) {\n onClose();\n }\n };\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [open, onClose]);\n\n const handleApply = () => {\n onApply({\n option,\n ...(option === 'Custom' ? { from, to } : {})\n });\n };\n\n const todayStr = new Date().toISOString().split('T')[0];\n\n return (\n <>\n <style dangerouslySetInnerHTML={{ __html: STYLES }} />\n <div \n ref={backdropRef}\n className={`df-backdrop ${open ? 'df-open' : ''}`}\n onClick={handleBackdropClick}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"df-dialog-title\"\n >\n <div className=\"df-dialog\">\n <div className=\"df-header\">\n <h2 id=\"df-dialog-title\" className=\"df-title\">{title}</h2>\n </div>\n \n <div className=\"df-content\">\n <div className=\"df-form-group\">\n <label className=\"df-label\">Select Range</label>\n <div className=\"df-select-wrapper\">\n <select \n className=\"df-input df-select\"\n value={option}\n onChange={(e) => setOption(e.target.value)}\n >\n {options.map((opt) => (\n <option key={opt} value={opt}>{opt}</option>\n ))}\n </select>\n </div>\n </div>\n\n {option === 'Custom' && (\n <div className=\"df-custom-range\">\n <div className=\"df-form-group\">\n <label className=\"df-label\">From Date</label>\n <input \n type=\"date\"\n className=\"df-input\"\n value={from}\n onChange={(e) => setFrom(e.target.value)}\n max={todayStr}\n />\n </div>\n <div className=\"df-form-group\">\n <label className=\"df-label\">To Date</label>\n <input \n type=\"date\"\n className=\"df-input\"\n value={to}\n onChange={(e) => setTo(e.target.value)}\n min={from || undefined}\n />\n </div>\n </div>\n )}\n </div>\n\n <div className=\"df-footer\">\n <button className=\"df-btn df-btn-cancel\" onClick={onClose}>\n Cancel\n </button>\n <button className=\"df-btn df-btn-apply\" onClick={handleApply}>\n Apply\n </button>\n </div>\n </div>\n </div>\n </>\n );\n};\n"]}
|