@sunggang/ui-lib 0.2.48 → 0.2.49

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/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.2.48",
3
+ "version": "0.2.49",
4
4
  "dependencies": {
5
5
  "@iconify/react": "^4.1.1",
6
+ "@material-ui/core": "^4.12.4",
6
7
  "@mdx-js/react": "^3.0.1",
8
+ "@mui/icons-material": "^6.4.1",
9
+ "@mui/material": "^6.4.1",
10
+ "@mui/x-date-pickers": "^7.24.0",
7
11
  "@radix-ui/react-checkbox": "^1.0.4",
8
12
  "@radix-ui/react-dropdown-menu": "^2.0.6",
9
13
  "@radix-ui/react-icons": "^1.3.0",
@@ -1,4 +1,4 @@
1
- type RequestMethod = "GET" | "POST" | "PUT" | "DELETE";
1
+ type RequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
2
2
  interface FetchAPIOptions {
3
3
  method?: RequestMethod;
4
4
  body?: Record<string, any>;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ interface CityDistrictProps {
3
+ className?: string;
4
+ item?: {
5
+ id?: string;
6
+ label?: string;
7
+ name?: string;
8
+ placeholder?: string;
9
+ type?: string;
10
+ errorText?: string;
11
+ option?: Array<{
12
+ length: string;
13
+ map: (callback: any) => void;
14
+ }>;
15
+ validateOption?: {
16
+ required?: boolean;
17
+ pattern?: RegExp;
18
+ };
19
+ disable?: boolean;
20
+ defaultValue?: string;
21
+ icon?: string;
22
+ subIcon?: string;
23
+ style?: React.CSSProperties;
24
+ textColor?: string;
25
+ cityName?: string;
26
+ districtName?: string;
27
+ };
28
+ getValues: (field: string) => string | undefined;
29
+ setValue: (field: string, value: string) => void;
30
+ register: (field: string, options?: object) => object;
31
+ errors?: Record<string, any>;
32
+ }
33
+ declare const CityDistrict: React.FC<CityDistrictProps>;
34
+ export default CityDistrict;
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import { UseFormRegister } from 'react-hook-form';
3
+ import 'react-date-range/dist/styles.css';
4
+ import 'react-date-range/dist/theme/default.css';
5
+ interface DatePickerProps {
6
+ className?: string;
7
+ item: {
8
+ name: string;
9
+ label?: string;
10
+ type: string;
11
+ placeholder?: string;
12
+ style?: React.CSSProperties;
13
+ errorText?: string;
14
+ validateOption?: {
15
+ required?: boolean;
16
+ validateMsg?: string;
17
+ };
18
+ disable?: boolean;
19
+ dateDisplayFormat?: string;
20
+ };
21
+ errors: Record<string, any>;
22
+ register: UseFormRegister<any>;
23
+ setValue: (name: string, value: any) => void;
24
+ getValues: () => Record<string, any>;
25
+ }
26
+ declare const DatePicker: React.FC<DatePickerProps>;
27
+ export default DatePicker;
@@ -0,0 +1,59 @@
1
+ export declare const Textarea: ({ className, item, methods }: {
2
+ className?: string | undefined;
3
+ item: any;
4
+ methods: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const FieldLabel: ({ item }: {
7
+ item: any;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Fields: ({ methods, formConfig, className }: {
10
+ methods: any;
11
+ formConfig: any;
12
+ className: any;
13
+ }) => any;
14
+ export declare const Row: ({ rowItems, methods }: {
15
+ rowItems: any;
16
+ methods: any;
17
+ }) => any;
18
+ declare const Form: {
19
+ Fields: ({ methods, formConfig, className }: {
20
+ methods: any;
21
+ formConfig: any;
22
+ className: any;
23
+ }) => any;
24
+ Row: ({ rowItems, methods }: {
25
+ rowItems: any;
26
+ methods: any;
27
+ }) => any;
28
+ TextField: ({ className, item, methods }: {
29
+ className?: string | undefined;
30
+ item: any;
31
+ methods: any;
32
+ }) => import("react/jsx-runtime").JSX.Element;
33
+ SingleSelect: ({ className, item, methods, disable }: {
34
+ className?: string | undefined;
35
+ item: any;
36
+ methods: any;
37
+ disable: any;
38
+ }) => import("react/jsx-runtime").JSX.Element;
39
+ MultipleSelect: ({ className, item, methods }: {
40
+ className?: string | undefined;
41
+ item: any;
42
+ methods: any;
43
+ }) => import("react/jsx-runtime").JSX.Element;
44
+ FieldLabel: ({ item }: {
45
+ item: any;
46
+ }) => import("react/jsx-runtime").JSX.Element;
47
+ RadioField: ({ className, direction, item, methods }: {
48
+ className: any;
49
+ direction?: string | undefined;
50
+ item: any;
51
+ methods: any;
52
+ }) => import("react/jsx-runtime").JSX.Element;
53
+ Time: ({ className, item, methods }: {
54
+ className?: string | undefined;
55
+ item: any;
56
+ methods: any;
57
+ }) => import("react/jsx-runtime").JSX.Element;
58
+ };
59
+ export default Form;
@@ -0,0 +1 @@
1
+ export declare const validateMsg: (errors: any, item: any) => string;
@@ -1,3 +1,4 @@
1
1
  import Regex from './Regex';
2
2
  export { Regex };
3
- export { verifyTaxId, verifyId } from './verify';
3
+ export * from './common';
4
+ export * from './verify';