@zimyo/ui 1.6.4 → 1.7.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/Card/index.js +1 -1
- package/dist/DatePicker/index.esm.js +2 -2
- package/dist/DatePicker/index.js +2 -2
- package/dist/DateRangePicker/index.esm.js +1 -1
- package/dist/DateRangePicker/index.js +2 -2
- package/dist/Form/index.esm.js +1 -1
- package/dist/Form/index.js +4 -4
- package/dist/Input/index.d.ts +2 -1
- package/dist/Input/index.esm.js +1 -1
- package/dist/Input/index.js +1 -1
- package/dist/Modal/index.d.ts +1 -0
- package/dist/Modal/index.esm.js +1 -1
- package/dist/Modal/index.js +1 -1
- package/dist/Notice/index.esm.js +1 -1
- package/dist/Notice/index.js +1 -1
- package/dist/PopupConfirm/index.d.ts +36 -0
- package/dist/PopupConfirm/index.esm.js +27 -0
- package/dist/PopupConfirm/index.js +27 -0
- package/dist/Radio/index.js +1 -1
- package/dist/Select/index.esm.js +2 -2
- package/dist/Select/index.js +2 -2
- package/dist/index.d.ts +25 -363
- package/dist/index.esm.js +1 -27
- package/dist/index.js +1 -27
- package/package.json +8 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,372 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export * from '../dist/Button/index.js';
|
|
2
|
+
export * from '../dist/PopupConfirm/index.js';
|
|
3
|
+
export * from '../dist/Modal/index.js';
|
|
4
|
+
export * from '../dist/Typography/index.js';
|
|
5
|
+
export * from '../dist/Accordion/index.js';
|
|
6
|
+
export * from '../dist/Card/index.js';
|
|
7
|
+
export * from '../dist/RadioGroup/index.js';
|
|
8
|
+
export * from '../dist/Select/index.js';
|
|
9
|
+
export * from '../dist/Switch/index.js';
|
|
10
|
+
export * from '../dist/Tabs/index.js';
|
|
11
|
+
export * from '../dist/Input/index.js';
|
|
12
|
+
export * from '../dist/Notice/index.js';
|
|
13
|
+
export * from '../dist/Badge/index.js';
|
|
14
|
+
export * from '../dist/DateRangePicker/index.js';
|
|
15
|
+
export * from '../dist/DatePicker/index.js';
|
|
16
|
+
export * from '../dist/Form/index.js';
|
|
17
|
+
export * from '../dist/Checkbox/index.js';
|
|
18
|
+
export * from '../dist/CheckboxGroup/index.js';
|
|
19
|
+
export * from '../dist/Radio/index.js';
|
|
20
|
+
export * from '../dist/Popover/index.js';
|
|
21
|
+
import React from 'react';
|
|
10
22
|
import { Theme } from '@mui/material/styles';
|
|
11
23
|
import { ClassValue } from 'clsx';
|
|
12
24
|
|
|
13
|
-
interface ButtonProps extends Omit<ButtonProps$1, 'sx'> {
|
|
14
|
-
loading?: boolean;
|
|
15
|
-
loadingText?: string;
|
|
16
|
-
sx?: SxProps;
|
|
17
|
-
loaderSize?: number;
|
|
18
|
-
loaderPosition?: 'start' | 'end' | 'center';
|
|
19
|
-
}
|
|
20
|
-
declare const Button: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
21
|
-
|
|
22
|
-
interface Option {
|
|
23
|
-
label?: string;
|
|
24
|
-
value?: string | number;
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}
|
|
27
|
-
type SelectSize = "xs" | "sm" | "md" | "lg";
|
|
28
|
-
interface SelectProps<OptionType extends Option> extends Props<OptionType, boolean, GroupBase<OptionType>> {
|
|
29
|
-
label?: string;
|
|
30
|
-
error?: string;
|
|
31
|
-
isClearable?: boolean;
|
|
32
|
-
isSearchable?: boolean;
|
|
33
|
-
className?: string;
|
|
34
|
-
size?: SelectSize;
|
|
35
|
-
required?: boolean;
|
|
36
|
-
valueKey?: string;
|
|
37
|
-
labelKey?: string;
|
|
38
|
-
searchByID?: boolean;
|
|
39
|
-
value?: any;
|
|
40
|
-
floatingLabel?: boolean;
|
|
41
|
-
maxChipVisible?: number;
|
|
42
|
-
}
|
|
43
|
-
declare function Select<OptionType extends Option>({ label, error, className, size, required, valueKey, labelKey, isMulti, value, options, onChange, searchByID, floatingLabel, maxChipVisible, ...props }: SelectProps<OptionType>): react_jsx_runtime.JSX.Element;
|
|
44
|
-
|
|
45
|
-
interface AccordionProps extends Omit<AccordionProps$1, 'sx' | 'onChange' | 'expanded'> {
|
|
46
|
-
type?: 'single' | 'multiple';
|
|
47
|
-
collapsible?: boolean;
|
|
48
|
-
value?: string | string[];
|
|
49
|
-
defaultValue?: string | string[];
|
|
50
|
-
onValueChange?: (value: string | string[]) => void;
|
|
51
|
-
children: React__default.ReactNode;
|
|
52
|
-
sx?: SxProps;
|
|
53
|
-
}
|
|
54
|
-
interface AccordionItemProps extends Omit<AccordionProps$1, 'sx'> {
|
|
55
|
-
value: string;
|
|
56
|
-
children: React__default.ReactNode;
|
|
57
|
-
sx?: SxProps;
|
|
58
|
-
}
|
|
59
|
-
interface AccordionTriggerProps extends Omit<AccordionSummaryProps, 'sx'> {
|
|
60
|
-
children: React__default.ReactNode;
|
|
61
|
-
sx?: SxProps;
|
|
62
|
-
expandIcon?: React__default.ReactNode;
|
|
63
|
-
}
|
|
64
|
-
interface AccordionContentProps extends Omit<AccordionDetailsProps, 'sx'> {
|
|
65
|
-
children: React__default.ReactNode;
|
|
66
|
-
sx?: SxProps;
|
|
67
|
-
}
|
|
68
|
-
declare const Accordion: React__default.ForwardRefExoticComponent<Omit<AccordionProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
69
|
-
declare const AccordionItem: React__default.ForwardRefExoticComponent<Omit<AccordionItemProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
70
|
-
declare const AccordionTrigger: React__default.ForwardRefExoticComponent<Omit<AccordionTriggerProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
71
|
-
declare const AccordionContent: React__default.ForwardRefExoticComponent<Omit<AccordionContentProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
72
|
-
|
|
73
|
-
interface SwitchProps extends Omit<SwitchProps$1, 'onChange'> {
|
|
74
|
-
label?: string;
|
|
75
|
-
helperText?: string;
|
|
76
|
-
error?: boolean;
|
|
77
|
-
required?: boolean | number;
|
|
78
|
-
labelPlacement?: 'end' | 'start' | 'bottom' | 'top';
|
|
79
|
-
onChange?: (event: React__default.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
80
|
-
}
|
|
81
|
-
declare const Switch: React__default.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
82
|
-
|
|
83
|
-
interface RadioOption {
|
|
84
|
-
value: string;
|
|
85
|
-
label: string;
|
|
86
|
-
disabled?: boolean;
|
|
87
|
-
description?: string;
|
|
88
|
-
}
|
|
89
|
-
interface RadioGroupProps {
|
|
90
|
-
label?: string;
|
|
91
|
-
options: RadioOption[];
|
|
92
|
-
value?: string;
|
|
93
|
-
defaultValue?: string;
|
|
94
|
-
onChange?: (value: string) => void;
|
|
95
|
-
name?: string;
|
|
96
|
-
disabled?: boolean;
|
|
97
|
-
required?: boolean;
|
|
98
|
-
error?: boolean;
|
|
99
|
-
helperText?: string;
|
|
100
|
-
row?: boolean;
|
|
101
|
-
size?: 'small' | 'medium';
|
|
102
|
-
color?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
103
|
-
sx?: SxProps;
|
|
104
|
-
radioSx?: SxProps;
|
|
105
|
-
labelSx?: SxProps;
|
|
106
|
-
}
|
|
107
|
-
declare const RadioGroup: React__default.ForwardRefExoticComponent<RadioGroupProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
108
|
-
|
|
109
|
-
interface HeadingProps extends TypographyProps {
|
|
110
|
-
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
111
|
-
}
|
|
112
|
-
declare const Heading: ({ level, ...props }: HeadingProps) => react_jsx_runtime.JSX.Element;
|
|
113
|
-
|
|
114
|
-
interface TextProps extends TypographyProps {
|
|
115
|
-
size?: 'sm' | 'md' | 'lg';
|
|
116
|
-
}
|
|
117
|
-
declare const Text: ({ size, ...props }: TextProps) => react_jsx_runtime.JSX.Element;
|
|
118
|
-
|
|
119
|
-
declare const Lead: (props: TypographyProps) => react_jsx_runtime.JSX.Element;
|
|
120
|
-
|
|
121
|
-
declare const Muted: (props: TypographyProps) => react_jsx_runtime.JSX.Element;
|
|
122
|
-
|
|
123
|
-
declare const Strong: (props: TypographyProps) => react_jsx_runtime.JSX.Element;
|
|
124
|
-
|
|
125
|
-
declare const Caption: (props: TypographyProps) => react_jsx_runtime.JSX.Element;
|
|
126
|
-
|
|
127
|
-
declare const Blockquote: (props: TypographyProps) => react_jsx_runtime.JSX.Element;
|
|
128
|
-
|
|
129
|
-
interface CodeProps {
|
|
130
|
-
children: React.ReactNode;
|
|
131
|
-
sx?: SxProps$1;
|
|
132
|
-
}
|
|
133
|
-
declare const Code: ({ children, sx }: CodeProps) => react_jsx_runtime.JSX.Element;
|
|
134
|
-
|
|
135
|
-
interface ModalProps {
|
|
136
|
-
open: boolean;
|
|
137
|
-
onClose: () => void;
|
|
138
|
-
title?: string | any;
|
|
139
|
-
description?: string;
|
|
140
|
-
children?: React$1.ReactNode;
|
|
141
|
-
actions?: React$1.ReactNode;
|
|
142
|
-
showCloseIcon?: boolean;
|
|
143
|
-
maxWidth?: false | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
144
|
-
fullWidth?: boolean;
|
|
145
|
-
fullScreen?: boolean;
|
|
146
|
-
className?: string;
|
|
147
|
-
}
|
|
148
|
-
declare const Modal: React$1.FC<ModalProps>;
|
|
149
|
-
|
|
150
|
-
interface DrawerProps {
|
|
151
|
-
open: boolean;
|
|
152
|
-
onClose: () => void;
|
|
153
|
-
title?: string;
|
|
154
|
-
children: React$1.ReactNode;
|
|
155
|
-
footer?: React$1.ReactNode;
|
|
156
|
-
side?: "left" | "right" | "top" | "bottom";
|
|
157
|
-
className?: string;
|
|
158
|
-
showCloseIcon?: boolean;
|
|
159
|
-
withOverlay?: boolean;
|
|
160
|
-
stickyFooter?: boolean;
|
|
161
|
-
width?: number | string;
|
|
162
|
-
height?: number | string;
|
|
163
|
-
}
|
|
164
|
-
declare const Drawer: React$1.FC<DrawerProps>;
|
|
165
|
-
|
|
166
|
-
type Position = "start" | "end";
|
|
167
|
-
interface CustomColor {
|
|
168
|
-
bg?: string;
|
|
169
|
-
text?: string;
|
|
170
|
-
border?: string;
|
|
171
|
-
}
|
|
172
|
-
interface BadgeProps extends VariantProps<typeof badgeVariants> {
|
|
173
|
-
label: string;
|
|
174
|
-
icon?: React__default.ReactNode;
|
|
175
|
-
iconPosition?: Position;
|
|
176
|
-
dot?: boolean;
|
|
177
|
-
dotPosition?: Position;
|
|
178
|
-
color?: CustomColor;
|
|
179
|
-
className?: string;
|
|
180
|
-
}
|
|
181
|
-
declare const badgeVariants: (props?: ({
|
|
182
|
-
variant?: "text" | "contained" | "outlined" | null | undefined;
|
|
183
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
184
|
-
type?: "default" | "error" | "info" | "success" | "warning" | null | undefined;
|
|
185
|
-
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
186
|
-
declare const Badge: ({ label, icon, iconPosition, dot, dotPosition, variant, size, type, color, className, }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
187
|
-
|
|
188
|
-
type InputSize$2 = "xs" | "sm" | "md" | "lg";
|
|
189
|
-
type InputVariant = "outlined" | "contained";
|
|
190
|
-
interface InputProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
|
|
191
|
-
label?: string;
|
|
192
|
-
floatingLabel?: boolean;
|
|
193
|
-
description?: string;
|
|
194
|
-
error?: string;
|
|
195
|
-
leftIcon?: React$1.ReactNode;
|
|
196
|
-
rightIcon?: React$1.ReactNode;
|
|
197
|
-
size?: InputSize$2;
|
|
198
|
-
variant?: InputVariant;
|
|
199
|
-
allowedPattern?: "number" | "alpha" | RegExp;
|
|
200
|
-
onLeftIconClick?: () => void;
|
|
201
|
-
onRightIconClick?: () => void;
|
|
202
|
-
debounceDelay?: number;
|
|
203
|
-
onDebouncedChange?: (value: string) => void;
|
|
204
|
-
}
|
|
205
|
-
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
206
|
-
|
|
207
|
-
type NoticeVariant = 'success' | 'error' | 'warning' | 'info';
|
|
208
|
-
type NoticeSize = 'sm' | 'md' | 'lg';
|
|
209
|
-
type NoticeStyleType = 'contained' | 'outlined';
|
|
210
|
-
interface NoticeProps {
|
|
211
|
-
title?: string;
|
|
212
|
-
message: string;
|
|
213
|
-
variant?: NoticeVariant;
|
|
214
|
-
size?: NoticeSize;
|
|
215
|
-
styleType?: NoticeStyleType;
|
|
216
|
-
onClose?: () => void;
|
|
217
|
-
className?: string;
|
|
218
|
-
showCloseIcon?: boolean;
|
|
219
|
-
}
|
|
220
|
-
declare const Notice: React$1.FC<NoticeProps>;
|
|
221
|
-
|
|
222
|
-
type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
223
|
-
type DateRange = {
|
|
224
|
-
from: Date;
|
|
225
|
-
to: Date;
|
|
226
|
-
};
|
|
227
|
-
type DisabledDateObject = {
|
|
228
|
-
dayOfWeek: DayOfWeek[];
|
|
229
|
-
} | {
|
|
230
|
-
before: Date;
|
|
231
|
-
} | {
|
|
232
|
-
after: Date;
|
|
233
|
-
} | {
|
|
234
|
-
before: Date;
|
|
235
|
-
after: Date;
|
|
236
|
-
} | DateRange;
|
|
237
|
-
type DisabledProp = boolean | Date | Date[] | DisabledDateObject;
|
|
238
|
-
type InputSize$1 = "xs" | "sm" | "md" | "lg";
|
|
239
|
-
type DatePickerVariant$1 = "outlined" | "contained";
|
|
240
|
-
interface DatePickerProps {
|
|
241
|
-
label?: string;
|
|
242
|
-
value?: Date;
|
|
243
|
-
onChange?: (date: Date | undefined) => void;
|
|
244
|
-
placeholder?: string;
|
|
245
|
-
required?: boolean;
|
|
246
|
-
description?: string;
|
|
247
|
-
error?: string;
|
|
248
|
-
disabled?: boolean;
|
|
249
|
-
variant?: DatePickerVariant$1;
|
|
250
|
-
size?: InputSize$1;
|
|
251
|
-
className?: string;
|
|
252
|
-
disableRange?: DisabledProp;
|
|
253
|
-
floatingLabel?: boolean;
|
|
254
|
-
}
|
|
255
|
-
declare const DatePicker: React$1.FC<DatePickerProps>;
|
|
256
|
-
|
|
257
|
-
type InputSize = "xs" | "sm" | "md" | "lg";
|
|
258
|
-
type DatePickerVariant = "outlined" | "contained";
|
|
259
|
-
interface DateRangePickerProps {
|
|
260
|
-
label?: string;
|
|
261
|
-
value?: {
|
|
262
|
-
from: Date;
|
|
263
|
-
to: Date;
|
|
264
|
-
};
|
|
265
|
-
onChange?: (range: {
|
|
266
|
-
from: Date;
|
|
267
|
-
to: Date;
|
|
268
|
-
} | undefined) => void;
|
|
269
|
-
placeholder?: string;
|
|
270
|
-
required?: boolean;
|
|
271
|
-
description?: string;
|
|
272
|
-
error?: string;
|
|
273
|
-
disabled?: boolean;
|
|
274
|
-
variant?: DatePickerVariant;
|
|
275
|
-
size?: InputSize;
|
|
276
|
-
className?: string;
|
|
277
|
-
floatingLabel?: boolean;
|
|
278
|
-
}
|
|
279
|
-
declare const DateRangePicker: React$1.FC<DateRangePickerProps>;
|
|
280
|
-
|
|
281
|
-
type FieldType = "text" | "number" | "textarea" | "select" | "radio" | "switch" | "checkbox" | "date" | "daterange" | "custom";
|
|
282
|
-
type FormField = {
|
|
283
|
-
name: string;
|
|
284
|
-
label: string;
|
|
285
|
-
type: FieldType;
|
|
286
|
-
placeholder?: string;
|
|
287
|
-
required?: boolean;
|
|
288
|
-
defaultValue?: any;
|
|
289
|
-
options?: {
|
|
290
|
-
label: string;
|
|
291
|
-
value: any;
|
|
292
|
-
}[];
|
|
293
|
-
validation?: any;
|
|
294
|
-
visibleIf?: (values: any) => boolean;
|
|
295
|
-
component?: React__default.ReactNode;
|
|
296
|
-
colSpan?: number;
|
|
297
|
-
};
|
|
298
|
-
type FormProps = {
|
|
299
|
-
schema: FormField[];
|
|
300
|
-
form: UseFormReturn;
|
|
301
|
-
layout?: "vertical" | "grid";
|
|
302
|
-
columns?: number;
|
|
303
|
-
className?: string;
|
|
304
|
-
showSubmitButton?: boolean;
|
|
305
|
-
onSubmit?: (data: any) => void;
|
|
306
|
-
};
|
|
307
|
-
declare const Form: React__default.FC<FormProps>;
|
|
308
|
-
|
|
309
|
-
type CheckboxSize = "sm" | "md" | "lg";
|
|
310
|
-
interface CheckboxProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
|
|
311
|
-
label?: React$1.ReactNode;
|
|
312
|
-
description?: React$1.ReactNode;
|
|
313
|
-
size?: CheckboxSize;
|
|
314
|
-
indeterminate?: boolean;
|
|
315
|
-
error?: boolean;
|
|
316
|
-
}
|
|
317
|
-
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
318
|
-
|
|
319
|
-
interface CheckboxGroupOption {
|
|
320
|
-
label: string;
|
|
321
|
-
value: string;
|
|
322
|
-
description?: string;
|
|
323
|
-
disabled?: boolean;
|
|
324
|
-
}
|
|
325
|
-
type Layout = "box" | "list";
|
|
326
|
-
type Direction = "vertical" | "horizontal";
|
|
327
|
-
interface CheckboxGroupProps {
|
|
328
|
-
name: string;
|
|
329
|
-
label?: string;
|
|
330
|
-
description?: string;
|
|
331
|
-
error?: boolean;
|
|
332
|
-
options: CheckboxGroupOption[];
|
|
333
|
-
value?: string[];
|
|
334
|
-
defaultValue?: string[];
|
|
335
|
-
onChange?: (selected: string[]) => void;
|
|
336
|
-
direction?: Direction;
|
|
337
|
-
layout?: Layout;
|
|
338
|
-
disabled?: boolean;
|
|
339
|
-
size?: CheckboxProps["size"];
|
|
340
|
-
className?: string;
|
|
341
|
-
columns?: number;
|
|
342
|
-
}
|
|
343
|
-
declare const CheckboxGroup: React$1.FC<CheckboxGroupProps>;
|
|
344
|
-
|
|
345
|
-
interface RadioProps {
|
|
346
|
-
label?: string;
|
|
347
|
-
description?: string;
|
|
348
|
-
name?: string;
|
|
349
|
-
checked?: boolean;
|
|
350
|
-
defaultChecked?: boolean;
|
|
351
|
-
onChange?: (event: React__default.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
352
|
-
disabled?: boolean;
|
|
353
|
-
required?: boolean;
|
|
354
|
-
error?: boolean;
|
|
355
|
-
helperText?: string;
|
|
356
|
-
size?: 'small' | 'medium';
|
|
357
|
-
color?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
358
|
-
sx?: SxProps;
|
|
359
|
-
radioSx?: SxProps;
|
|
360
|
-
labelSx?: SxProps;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
25
|
interface UILibraryThemeProviderProps {
|
|
364
|
-
children:
|
|
26
|
+
children: React.ReactNode;
|
|
365
27
|
primaryColor?: string;
|
|
366
28
|
secondaryColor?: string;
|
|
367
29
|
enableCssBaseline?: boolean;
|
|
368
30
|
}
|
|
369
|
-
declare const UILibraryThemeProvider:
|
|
31
|
+
declare const UILibraryThemeProvider: React.FC<UILibraryThemeProviderProps>;
|
|
370
32
|
|
|
371
33
|
declare module '@mui/material/styles' {
|
|
372
34
|
interface Theme {
|
|
@@ -454,5 +116,5 @@ declare const designTokens: {
|
|
|
454
116
|
declare function cn(...inputs: ClassValue[]): string;
|
|
455
117
|
declare function useStableId(prefix?: string): string;
|
|
456
118
|
|
|
457
|
-
export {
|
|
458
|
-
export type {
|
|
119
|
+
export { UILibraryThemeProvider, cn, createCustomTheme, designTokens, theme, useStableId };
|
|
120
|
+
export type { ThemeConfig, UILibraryThemeProviderProps };
|