@sunggang/ui-lib 0.4.7 → 0.4.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.cjs.css CHANGED
@@ -1831,6 +1831,9 @@ video {
1831
1831
  .w-\[70px\] {
1832
1832
  width: 70px;
1833
1833
  }
1834
+ .w-\[800px\] {
1835
+ width: 800px;
1836
+ }
1834
1837
  .w-auto {
1835
1838
  width: auto;
1836
1839
  }
package/index.cjs.js CHANGED
@@ -25,7 +25,6 @@ var CustomSelect = require('./CustomSelect.cjs.js');
25
25
  require('@radix-ui/react-slot');
26
26
  require('class-variance-authority');
27
27
  require('tailwind-merge');
28
- require('next/dynamic');
29
28
  require('./setPrototypeOf.cjs.js');
30
29
  require('./memoize-one.esm.cjs.js');
31
30
  require('@emotion/react');
package/index.esm.css CHANGED
@@ -1831,6 +1831,9 @@ video {
1831
1831
  .w-\[70px\] {
1832
1832
  width: 70px;
1833
1833
  }
1834
+ .w-\[800px\] {
1835
+ width: 800px;
1836
+ }
1834
1837
  .w-auto {
1835
1838
  width: auto;
1836
1839
  }
package/index.esm.js CHANGED
@@ -23,7 +23,6 @@ export { C as CustomSelect } from './CustomSelect.esm.js';
23
23
  import '@radix-ui/react-slot';
24
24
  import 'class-variance-authority';
25
25
  import 'tailwind-merge';
26
- import 'next/dynamic';
27
26
  import './setPrototypeOf.esm.js';
28
27
  import './memoize-one.esm.esm.js';
29
28
  import '@emotion/react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "main": "./index.cjs.js",
5
5
  "module": "./index.esm.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { FormItem } from './types';
3
+ type ComponentType = React.ComponentType<any>;
4
+ export declare function analyzeUsedTypes(formConfig: FormItem[][]): Set<string>;
5
+ export declare function useDynamicComponents(formConfig: FormItem[][]): {
6
+ loadedComponents: Record<string, ComponentType>;
7
+ isLoading: boolean;
8
+ };
9
+ export declare function createDynamicComponent(type: string, loadedComponents: Record<string, ComponentType>): ComponentType | null;
10
+ export {};
@@ -0,0 +1,66 @@
1
+ import { FormItem } from './types';
2
+ export declare const Regex: {
3
+ phone: RegExp;
4
+ };
5
+ export declare const checkboxConfig: FormItem;
6
+ export declare const checkboxGroupConfig: FormItem;
7
+ export declare const radioConfig: FormItem;
8
+ export declare const configWithoutCkEditor: (getValues: (name: string) => unknown) => FormItem[][];
9
+ export declare const config: (getValues: (name: string) => unknown) => (FormItem[] | ({
10
+ type: string;
11
+ name: string;
12
+ label: string;
13
+ validateOption: {
14
+ required: string;
15
+ };
16
+ icon: string;
17
+ flatpickrOptions: {
18
+ mode: string;
19
+ time_24hr: boolean;
20
+ enableTime: boolean;
21
+ dateFormat: string;
22
+ };
23
+ option?: undefined;
24
+ placeholder?: undefined;
25
+ noDataText?: undefined;
26
+ hiddenText?: undefined;
27
+ hiddenSearch?: undefined;
28
+ dropStyle?: undefined;
29
+ className?: 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
+ hiddenText: boolean;
44
+ hiddenSearch: boolean;
45
+ dropStyle: {
46
+ bgClass: string;
47
+ hoverClass: string;
48
+ selectedClass: string;
49
+ borderColor: string;
50
+ textColor: string;
51
+ };
52
+ className: string;
53
+ icon?: undefined;
54
+ flatpickrOptions?: undefined;
55
+ })[] | {
56
+ type: string;
57
+ name: string;
58
+ label: string;
59
+ imageStyleType: string;
60
+ noticeLabel: string;
61
+ errorText: string;
62
+ validateOption: {
63
+ required: boolean;
64
+ };
65
+ limitSize: number;
66
+ }[])[];
@@ -1,4 +1,5 @@
1
1
  import type { FC } from 'react';
2
+ import React from 'react';
2
3
  import { FormItem, FormType } from './types';
3
4
  export interface FormModule {
4
5
  Fields: FC<{
@@ -6,6 +7,7 @@ export interface FormModule {
6
7
  }>;
7
8
  Row: FC<{
8
9
  rowItems: FormItem[];
10
+ loadedComponents?: Record<string, React.ComponentType<any>>;
9
11
  }>;
10
12
  TextField: FC<{
11
13
  item: FormItem;
@@ -39,7 +41,7 @@ export interface FormModule {
39
41
  }>;
40
42
  BaseCkeditor: FC<{
41
43
  item: FormItem;
42
- config: any;
44
+ config?: any;
43
45
  }>;
44
46
  BaseSelect: FC<{
45
47
  item: FormItem;
@@ -64,7 +66,8 @@ export declare const Fields: ({ formConfig, fieldsClass }: {
64
66
  export declare const CustomUploadField: ({ item }: {
65
67
  item: any;
66
68
  }) => import("react/jsx-runtime").JSX.Element;
67
- export declare const Row: ({ rowItems }: {
69
+ export declare const Row: ({ rowItems, loadedComponents }: {
68
70
  rowItems: any;
71
+ loadedComponents?: {} | undefined;
69
72
  }) => any;
70
73
  export declare const Form: FormModule;