react-frontend-common-components 0.0.2 → 0.0.4
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/index.d.ts +127 -2
- package/dist/index.js +52 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -2
- package/src/index.ts +15 -0
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import React$1, { ChangeEventHandler, MouseEventHandler, KeyboardEventHandler } from 'react';
|
3
|
-
import { TabsProps, BadgeProps } from 'antd';
|
3
|
+
import { TabsProps, BadgeProps, AvatarProps } from 'antd';
|
4
|
+
import { ChartData, ChartOptions } from 'chart.js';
|
5
|
+
import { CollapseProps, CollapsePanelProps } from 'antd/lib/collapse';
|
6
|
+
import { PaginationProps } from 'antd/lib/pagination';
|
4
7
|
|
5
8
|
interface AppInputProps {
|
6
9
|
className?: string;
|
@@ -109,4 +112,126 @@ interface OverViewCardProps {
|
|
109
112
|
}
|
110
113
|
declare const OverViewCard: ({ className, text, number }: OverViewCardProps) => react_jsx_runtime.JSX.Element;
|
111
114
|
|
112
|
-
|
115
|
+
type ChartType = "bar" | "line" | "pie" | "doughnut";
|
116
|
+
interface AppChartProps {
|
117
|
+
type: ChartType;
|
118
|
+
data: ChartData<"bar" | "line" | "pie" | "doughnut">;
|
119
|
+
options?: ChartOptions<"bar" | "line" | "pie" | "doughnut">;
|
120
|
+
className?: string;
|
121
|
+
height?: number;
|
122
|
+
width?: number;
|
123
|
+
}
|
124
|
+
declare const AppChart: ({ type, data, options, className, height, width, }: AppChartProps) => react_jsx_runtime.JSX.Element;
|
125
|
+
|
126
|
+
interface ImageType {
|
127
|
+
src: string;
|
128
|
+
}
|
129
|
+
interface AppImageBoxProps {
|
130
|
+
width?: number;
|
131
|
+
height?: number;
|
132
|
+
text?: string;
|
133
|
+
image: ImageType;
|
134
|
+
className?: string;
|
135
|
+
}
|
136
|
+
declare const AppImageBox: ({ width, height, text, image, className, }: AppImageBoxProps) => react_jsx_runtime.JSX.Element;
|
137
|
+
|
138
|
+
interface AppAvatarProps extends AvatarProps {
|
139
|
+
fallbackIcon?: React$1.ReactNode;
|
140
|
+
className?: string;
|
141
|
+
}
|
142
|
+
declare const AppAvatar: ({ src, fallbackIcon, className, ...props }: AppAvatarProps) => react_jsx_runtime.JSX.Element;
|
143
|
+
|
144
|
+
interface Type {
|
145
|
+
text: string;
|
146
|
+
className?: string;
|
147
|
+
}
|
148
|
+
declare const AppCheckboxText: ({ text, className }: Type) => react_jsx_runtime.JSX.Element;
|
149
|
+
|
150
|
+
interface AppCollapseProps extends CollapseProps {
|
151
|
+
panels?: {
|
152
|
+
key: string;
|
153
|
+
header: React$1.ReactNode;
|
154
|
+
content: React$1.ReactNode;
|
155
|
+
collapsible?: CollapsePanelProps["collapsible"];
|
156
|
+
}[];
|
157
|
+
className?: string;
|
158
|
+
}
|
159
|
+
declare const AppCollapse: ({ panels, defaultActiveKey, onChange, expandIconPosition, ghost, accordion, expandIcon, size, bordered, activeKey, className, ...restProps }: AppCollapseProps) => react_jsx_runtime.JSX.Element;
|
160
|
+
|
161
|
+
interface AppCustomLoaderProps {
|
162
|
+
className?: string;
|
163
|
+
}
|
164
|
+
declare const AppCustomLoader: ({ className }: AppCustomLoaderProps) => react_jsx_runtime.JSX.Element;
|
165
|
+
|
166
|
+
interface LatLng {
|
167
|
+
lat: number;
|
168
|
+
lng: number;
|
169
|
+
}
|
170
|
+
interface LocationMapProps {
|
171
|
+
cityId?: LatLng;
|
172
|
+
className?: string;
|
173
|
+
containerStyle?: React$1.CSSProperties;
|
174
|
+
clickableIcons?: boolean;
|
175
|
+
zoom?: number;
|
176
|
+
mapKey: string;
|
177
|
+
}
|
178
|
+
declare const AppLocationMap: ({ cityId, className, containerStyle, clickableIcons, zoom, mapKey, }: LocationMapProps) => react_jsx_runtime.JSX.Element;
|
179
|
+
|
180
|
+
interface AppModalProps {
|
181
|
+
visible: boolean;
|
182
|
+
onClose: () => void;
|
183
|
+
title?: string;
|
184
|
+
description?: string;
|
185
|
+
children: React$1.ReactNode;
|
186
|
+
footerButtons?: React$1.ReactNode;
|
187
|
+
alignTitleLeft?: boolean;
|
188
|
+
className?: string;
|
189
|
+
closeIcon?: React$1.ReactNode;
|
190
|
+
}
|
191
|
+
declare const AppModal: ({ visible, onClose, title, description, children, footerButtons, alignTitleLeft, className, closeIcon, }: AppModalProps) => react_jsx_runtime.JSX.Element;
|
192
|
+
|
193
|
+
interface AppOtpFieldProps {
|
194
|
+
otp: string;
|
195
|
+
onChange: (otp: string) => void;
|
196
|
+
numInputs?: number;
|
197
|
+
otpError?: string;
|
198
|
+
resendTimeout?: number;
|
199
|
+
onResendOtp?: () => void;
|
200
|
+
setResendTimeout: (timeout: number) => void;
|
201
|
+
className?: string;
|
202
|
+
resendTxt?: string;
|
203
|
+
resendTime: string;
|
204
|
+
}
|
205
|
+
declare const AppOtpField: ({ otp, onChange, numInputs, otpError, resendTimeout, onResendOtp, setResendTimeout, className, resendTxt, resendTime, }: AppOtpFieldProps) => react_jsx_runtime.JSX.Element;
|
206
|
+
|
207
|
+
interface AppPaginationProps extends PaginationProps {
|
208
|
+
total: number;
|
209
|
+
currentPage: number;
|
210
|
+
pageSize?: number;
|
211
|
+
onPageChange: (page: number, pageSize: number) => void;
|
212
|
+
showGotoBox: boolean;
|
213
|
+
sizeChanger: boolean;
|
214
|
+
className?: string;
|
215
|
+
}
|
216
|
+
declare const AppPagination: ({ total, currentPage, pageSize, onPageChange, showGotoBox, sizeChanger, className, ...rest }: AppPaginationProps) => react_jsx_runtime.JSX.Element;
|
217
|
+
|
218
|
+
interface AppPasswordInputProps {
|
219
|
+
className?: string;
|
220
|
+
label?: string;
|
221
|
+
name?: string;
|
222
|
+
value?: string;
|
223
|
+
dataTestId?: string;
|
224
|
+
id?: string;
|
225
|
+
disabled?: boolean;
|
226
|
+
handleChange?: ChangeEventHandler<HTMLInputElement>;
|
227
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
228
|
+
onPressEnter?: KeyboardEventHandler<HTMLInputElement>;
|
229
|
+
defaultValue?: string;
|
230
|
+
isAutoFocus?: boolean;
|
231
|
+
triggerFocus?: boolean;
|
232
|
+
errorMessage?: string;
|
233
|
+
autoComplete?: string;
|
234
|
+
}
|
235
|
+
declare const AppPasswordInput: ({ label, name, value, dataTestId, id, disabled, handleChange, onClick, defaultValue, onPressEnter, className, errorMessage, isAutoFocus, autoComplete, }: AppPasswordInputProps) => react_jsx_runtime.JSX.Element;
|
236
|
+
|
237
|
+
export { AppAvatar, AppBackArrow, AppBadge, AppButton, AppChart, AppCheckboxText, AppCollapse, AppCustomLoader, AppImageBox, AppInput, AppLocationMap, AppModal, AppOtpField, AppPagination, AppPasswordInput, Sidebar as AppSidebar, AppTab, AppTextarea, OverViewCard };
|