@sunggang/ui-lib 0.3.6 → 0.3.8

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/index.esm3.js CHANGED
@@ -17,12 +17,12 @@ import 'react-date-range';
17
17
  import 'react-date-range/dist/locale/index.js';
18
18
  import 'date-fns/addDays/index.js';
19
19
  import 'date-fns/format/index.js';
20
- import '@emotion/react';
21
- import '@mui/material';
22
20
  import 'input-otp';
23
21
  import '@tanstack/react-table';
24
22
  import '@radix-ui/react-dropdown-menu';
25
23
  import '@radix-ui/react-icons';
24
+ import '@emotion/react';
25
+ import '@mui/material';
26
26
 
27
27
  /* eslint-disable no-prototype-builtins */ function _instanceof$4(left, right) {
28
28
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "dependencies": {
5
5
  "@emotion/react": "^11.14.0",
6
6
  "@emotion/styled": "^11.14.0",
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ interface BaseTemplateProps {
3
+ file?: File | null;
4
+ item?: any;
5
+ imageUrl?: string | null;
6
+ }
7
+ declare const BaseTemplate: FC<BaseTemplateProps>;
8
+ export default BaseTemplate;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface CustomUploadProps {
3
+ className?: string;
4
+ item: any;
5
+ field: any;
6
+ }
7
+ export declare const CustomUpload: React.FC<CustomUploadProps>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare function CustomUploadChild(): import("react/jsx-runtime").JSX.Element;
@@ -9,76 +9,7 @@ export declare const ticketBundleOptions: {
9
9
  name: string;
10
10
  value: number;
11
11
  }[];
12
- export declare const config: (getValues: any) => (FormItem[] | ({
13
- type: string;
14
- name: string;
15
- label: string;
16
- id: string;
17
- placeholder: string;
18
- errorText: string;
19
- option: ({
20
- value: string;
21
- name: string;
22
- label?: undefined;
23
- options?: undefined;
24
- } | {
25
- label: string;
26
- options: {
27
- value: string;
28
- name: string;
29
- }[];
30
- value?: undefined;
31
- name?: undefined;
32
- })[];
33
- validateOption: {
34
- required: boolean;
35
- };
36
- cityName?: undefined;
37
- districtName?: undefined;
38
- color?: undefined;
39
- size?: undefined;
40
- } | {
41
- type: string;
42
- name: string;
43
- label: string;
44
- id: string;
45
- placeholder?: undefined;
46
- errorText?: undefined;
47
- option?: undefined;
48
- validateOption?: undefined;
49
- cityName?: undefined;
50
- districtName?: undefined;
51
- color?: undefined;
52
- size?: undefined;
53
- } | {
54
- type: string;
55
- name: string;
56
- cityName: string;
57
- districtName: string;
58
- label: string;
59
- id: string;
60
- validateOption: {
61
- required: boolean;
62
- };
63
- errorText: string;
64
- placeholder?: undefined;
65
- option?: undefined;
66
- color?: undefined;
67
- size?: undefined;
68
- } | {
69
- type: string;
70
- name: string;
71
- label: string;
72
- id: string;
73
- color: string;
74
- size: string;
75
- placeholder?: undefined;
76
- errorText?: undefined;
77
- option?: undefined;
78
- validateOption?: undefined;
79
- cityName?: undefined;
80
- districtName?: undefined;
81
- })[] | {
12
+ export declare const config: (getValues: any) => (FormItem[] | {
82
13
  type: string;
83
14
  name: string;
84
15
  label: string;
@@ -1,5 +1,47 @@
1
- /// <reference types="react" />
2
- import { FormType } from './types';
1
+ import type { FC } from 'react';
2
+ import { FormItem, FormType } from './types';
3
+ export interface FormModule {
4
+ Fields: FC<{
5
+ formConfig: FormItem[][];
6
+ }>;
7
+ Row: FC<{
8
+ rowItems: FormItem[];
9
+ }>;
10
+ TextField: FC<{
11
+ item: FormItem;
12
+ }>;
13
+ SingleSelect: FC<{
14
+ item: FormItem;
15
+ }>;
16
+ MultipleSelect: FC<{
17
+ item: FormItem;
18
+ }>;
19
+ FieldLabel: FC<{
20
+ item: FormItem;
21
+ }>;
22
+ RadioField: FC<{
23
+ item: FormItem;
24
+ }>;
25
+ Time: FC<{
26
+ item: FormItem;
27
+ }>;
28
+ Textarea: FC<{
29
+ item: FormItem;
30
+ }>;
31
+ City: FC<{
32
+ item: FormItem;
33
+ }>;
34
+ CityDistrict: FC<{
35
+ item: FormItem;
36
+ }>;
37
+ CheckboxField: FC<{
38
+ item: FormItem;
39
+ }>;
40
+ BaseCkeditor: FC<{
41
+ item: FormItem;
42
+ config: any;
43
+ }>;
44
+ }
3
45
  export declare const City: React.FC<FormType>;
4
46
  export declare const Textarea: React.FC<FormType>;
5
47
  export declare const FieldLabel: ({ item }: {
@@ -8,34 +50,10 @@ export declare const FieldLabel: ({ item }: {
8
50
  export declare const Fields: ({ formConfig }: {
9
51
  formConfig: any;
10
52
  }) => any;
53
+ export declare const CustomUploadField: ({ item }: {
54
+ item: any;
55
+ }) => import("react/jsx-runtime").JSX.Element;
11
56
  export declare const Row: ({ rowItems }: {
12
57
  rowItems: any;
13
58
  }) => any;
14
- export declare const Form: {
15
- Fields: ({ formConfig }: {
16
- formConfig: any;
17
- }) => any;
18
- Row: ({ rowItems }: {
19
- rowItems: any;
20
- }) => any;
21
- TextField: import("react").FC<FormType>;
22
- SingleSelect: import("react").FC<FormType>;
23
- MultipleSelect: ({ className, item }: {
24
- className?: string | undefined;
25
- item: any;
26
- }) => import("react/jsx-runtime").JSX.Element;
27
- FieldLabel: ({ item }: {
28
- item: any;
29
- }) => import("react/jsx-runtime").JSX.Element;
30
- RadioField: ({ item }: {
31
- item: any;
32
- }) => import("react/jsx-runtime").JSX.Element;
33
- Time: import("react").FC<FormType>;
34
- Textarea: import("react").FC<FormType>;
35
- City: import("react").FC<FormType>;
36
- CityDistrict: ({ item }: {
37
- item: any;
38
- }) => import("react/jsx-runtime").JSX.Element;
39
- CheckboxField: import("react").FC<FormType>;
40
- BaseCkeditor: any;
41
- };
59
+ export declare const Form: FormModule;
@@ -19,7 +19,7 @@ interface Checkbox {
19
19
  checkboxLabelClass?: string;
20
20
  errorText?: string;
21
21
  validateOption?: {
22
- required?: boolean;
22
+ required?: boolean | string;
23
23
  };
24
24
  disabled?: boolean;
25
25
  muiProps?: {
@@ -42,7 +42,7 @@ export interface FormItem {
42
42
  validateOption?: {
43
43
  pattern?: RegExp;
44
44
  validateMsg?: string;
45
- required?: boolean;
45
+ required?: boolean | string;
46
46
  validate?: any;
47
47
  };
48
48
  defaultValue?: string;
@@ -55,8 +55,8 @@ export interface FormItem {
55
55
  cityName?: string;
56
56
  districtName?: string;
57
57
  onlyHour?: boolean;
58
- color?: 'blue' | 'red' | 'green' | 'yellow';
59
- size?: 'small' | 'medium' | 'large';
58
+ color?: string;
59
+ size?: 'small' | 'medium' | 'large' | string;
60
60
  checkboxLabel?: string;
61
61
  checkboxLabelClass?: string;
62
62
  muiProps?: {