@sunggang/ui-lib 0.3.57 → 0.3.59
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/BaseCkeditor.esm.js +5 -5
- package/index.esm.css +29 -0
- package/index.esm.js +5 -5
- package/index.esm2.js +13961 -11274
- package/index.esm3.js +5 -5
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/lib/DropImage/index.stories.d.ts +3 -0
- package/src/lib/Form/FlatpickrField/index.d.ts +8 -0
- package/src/lib/Form/demo.d.ts +39 -1
- package/src/lib/Form/index.d.ts +3 -0
- package/src/lib/Form/types.d.ts +32 -0
package/index.esm3.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { _ as __spreadArray,
|
|
1
|
+
import { _ as __spreadArray, b as __read, d as __extends, e as __assign, f as __makeTemplateObject, h as __awaiter, i as __generator, c as commonjsGlobal, j as __values } from './index.esm2.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@iconify/react';
|
|
5
5
|
import 'react-dom';
|
|
6
|
+
import '@emotion/react';
|
|
7
|
+
import '@mui/material';
|
|
6
8
|
import '@radix-ui/react-switch';
|
|
7
9
|
import 'clsx';
|
|
8
10
|
import 'tailwind-merge';
|
|
11
|
+
import '@radix-ui/react-select';
|
|
12
|
+
import '@radix-ui/react-icons';
|
|
9
13
|
import 'date-fns/format';
|
|
10
14
|
import 'lucide-react';
|
|
11
15
|
import '@radix-ui/react-slot';
|
|
@@ -16,10 +20,6 @@ import '@radix-ui/react-popover';
|
|
|
16
20
|
import 'react-date-range';
|
|
17
21
|
import 'react-date-range/dist/locale/index.js';
|
|
18
22
|
import 'date-fns/addDays';
|
|
19
|
-
import '@emotion/react';
|
|
20
|
-
import '@mui/material';
|
|
21
|
-
import '@radix-ui/react-select';
|
|
22
|
-
import '@radix-ui/react-icons';
|
|
23
23
|
import 'input-otp';
|
|
24
24
|
import '@tanstack/react-table';
|
|
25
25
|
import '@radix-ui/react-dropdown-menu';
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './lib/DropImage';
|
|
|
5
5
|
export { CSRDropImage } from './lib/DropImage/CSRDropImage';
|
|
6
6
|
export * from './lib/Dropdown';
|
|
7
7
|
export * from './lib/UploadImage/CustomUpload';
|
|
8
|
+
export * from './lib/Form';
|
|
8
9
|
export * from './components/ui/switch';
|
|
9
10
|
export * from './components/ui/dateRangePicker';
|
|
10
11
|
export * from './components/ui/singlePicker';
|
|
@@ -8,6 +8,8 @@ export interface ImageItem {
|
|
|
8
8
|
export interface DropImageProps {
|
|
9
9
|
preview: boolean;
|
|
10
10
|
limitSize?: number;
|
|
11
|
+
maxFiles?: number;
|
|
12
|
+
maxTotalImages?: number;
|
|
11
13
|
imageUrls?: ImageItem[] | undefined;
|
|
12
14
|
setImageUrls?: any;
|
|
13
15
|
setFiles: React.Dispatch<React.SetStateAction<File[]>>;
|
|
@@ -18,3 +20,4 @@ export default _default;
|
|
|
18
20
|
export declare const Base: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-bf5e6555").R, DropImageProps>;
|
|
19
21
|
export declare const Custom: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-bf5e6555").R, DropImageProps>;
|
|
20
22
|
export declare const Primary: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-bf5e6555").R, DropImageProps>;
|
|
23
|
+
export declare const SingleImageOnly: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-bf5e6555").R, DropImageProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'flatpickr/dist/flatpickr.min.css';
|
|
3
|
+
import { FormItem, FormType } from '../types';
|
|
4
|
+
interface FlatpickrProps extends FormType {
|
|
5
|
+
item: FormItem;
|
|
6
|
+
}
|
|
7
|
+
declare const FlatpickrField: React.FC<FlatpickrProps>;
|
|
8
|
+
export default FlatpickrField;
|
package/src/lib/Form/demo.d.ts
CHANGED
|
@@ -9,7 +9,45 @@ export declare const ticketBundleOptions: {
|
|
|
9
9
|
name: string;
|
|
10
10
|
value: number;
|
|
11
11
|
}[];
|
|
12
|
-
export declare const config: (getValues:
|
|
12
|
+
export declare const config: (getValues: (name: string) => unknown) => (FormItem[] | ({
|
|
13
|
+
type: string;
|
|
14
|
+
name: string;
|
|
15
|
+
label: string;
|
|
16
|
+
validateOption: {
|
|
17
|
+
required: string;
|
|
18
|
+
};
|
|
19
|
+
icon: string;
|
|
20
|
+
flatpickrOptions: {
|
|
21
|
+
mode: string;
|
|
22
|
+
time_24hr: boolean;
|
|
23
|
+
enableTime: boolean;
|
|
24
|
+
dateFormat: string;
|
|
25
|
+
};
|
|
26
|
+
option?: undefined;
|
|
27
|
+
placeholder?: undefined;
|
|
28
|
+
noDataText?: undefined;
|
|
29
|
+
dropStyle?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
type: string;
|
|
32
|
+
name: string;
|
|
33
|
+
label: string;
|
|
34
|
+
option: {
|
|
35
|
+
name: string;
|
|
36
|
+
value: string;
|
|
37
|
+
}[];
|
|
38
|
+
validateOption: {
|
|
39
|
+
required: string;
|
|
40
|
+
};
|
|
41
|
+
placeholder: string;
|
|
42
|
+
noDataText: string;
|
|
43
|
+
dropStyle: {
|
|
44
|
+
bgClass: string;
|
|
45
|
+
hoverClass: string;
|
|
46
|
+
selectedClass: string;
|
|
47
|
+
};
|
|
48
|
+
icon?: undefined;
|
|
49
|
+
flatpickrOptions?: undefined;
|
|
50
|
+
})[] | {
|
|
13
51
|
type: string;
|
|
14
52
|
name: string;
|
|
15
53
|
label: string;
|
package/src/lib/Form/index.d.ts
CHANGED
package/src/lib/Form/types.d.ts
CHANGED
|
@@ -30,6 +30,37 @@ interface Checkbox {
|
|
|
30
30
|
color?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'default';
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
+
interface FlatpickrOptions {
|
|
34
|
+
mode?: 'single' | 'multiple' | 'range';
|
|
35
|
+
enableTime?: boolean;
|
|
36
|
+
time_24hr?: boolean;
|
|
37
|
+
dateFormat?: string;
|
|
38
|
+
defaultDate?: Date | Date[] | string;
|
|
39
|
+
inline?: boolean;
|
|
40
|
+
noCalendar?: boolean;
|
|
41
|
+
allowInput?: boolean;
|
|
42
|
+
clickOpens?: boolean;
|
|
43
|
+
weekNumbers?: boolean;
|
|
44
|
+
minDate?: Date | string;
|
|
45
|
+
maxDate?: Date | string;
|
|
46
|
+
disable?: Array<Date | string | {
|
|
47
|
+
from: Date | string;
|
|
48
|
+
to: Date | string;
|
|
49
|
+
}>;
|
|
50
|
+
enable?: Array<Date | string | {
|
|
51
|
+
from: Date | string;
|
|
52
|
+
to: Date | string;
|
|
53
|
+
}>;
|
|
54
|
+
locale?: string;
|
|
55
|
+
position?: 'auto' | 'above' | 'below';
|
|
56
|
+
static?: boolean;
|
|
57
|
+
monthSelectorType?: 'dropdown' | 'static';
|
|
58
|
+
onChange?: (selectedDates: Date[], dateStr: string, instance: any) => void;
|
|
59
|
+
onClose?: (selectedDates: Date[], dateStr: string, instance: any) => void;
|
|
60
|
+
onOpen?: (selectedDates: Date[], dateStr: string, instance: any) => void;
|
|
61
|
+
onReady?: (selectedDates: Date[], dateStr: string, instance: any) => void;
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
}
|
|
33
64
|
export interface FormItem {
|
|
34
65
|
type: string;
|
|
35
66
|
name: string;
|
|
@@ -91,6 +122,7 @@ export interface FormItem {
|
|
|
91
122
|
hoverClass?: string;
|
|
92
123
|
selectedClass?: string;
|
|
93
124
|
};
|
|
125
|
+
flatpickrOptions?: FlatpickrOptions;
|
|
94
126
|
}
|
|
95
127
|
export interface FormType {
|
|
96
128
|
item: FormItem;
|