@fairys/valtio-form-basic 0.0.12 → 0.0.13
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/esm/{form → common}/hooks/index.d.ts +1 -0
- package/esm/{form → common}/hooks/index.js +9 -1
- package/esm/common/index.d.ts +4 -0
- package/esm/common/index.js +4 -0
- package/esm/{form → common}/instance/index.d.ts +9 -2
- package/esm/{form → common}/instance/index.js +19 -5
- package/esm/{form → common}/utils/index.d.ts +1 -0
- package/esm/{form → common}/utils/index.js +2 -1
- package/esm/form/form.d.ts +7 -7
- package/esm/form/form.item.d.ts +10 -3
- package/esm/form/form.item.js +50 -32
- package/esm/form/form.js +5 -3
- package/esm/form/layout.d.ts +4 -2591
- package/esm/form/layout.js +7 -4
- package/esm/index.d.ts +1 -2
- package/esm/index.js +1 -2
- package/esm/styles/index.css +20 -4
- package/lib/common/hooks/index.d.ts +35 -0
- package/lib/common/hooks/index.js +117 -0
- package/lib/common/index.d.ts +4 -0
- package/lib/common/index.js +87 -0
- package/lib/common/instance/index.d.ts +88 -0
- package/lib/common/instance/index.js +243 -0
- package/lib/common/interface.d.ts +4 -0
- package/lib/common/interface.js +18 -0
- package/lib/common/utils/index.d.ts +25 -0
- package/lib/common/utils/index.js +107 -0
- package/lib/form/form.d.ts +76 -0
- package/lib/form/form.item.d.ts +224 -0
- package/lib/form/form.item.js +321 -0
- package/lib/form/form.js +53 -0
- package/lib/form/layout.d.ts +153 -0
- package/lib/form/layout.js +196 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +18 -27
- package/lib/styles/index.css +308 -0
- package/package.json +5 -5
- package/src/{form → common}/hooks/index.tsx +9 -1
- package/src/common/index.ts +4 -0
- package/src/{form → common}/instance/index.ts +51 -13
- package/src/{form → common}/utils/index.ts +2 -0
- package/src/form/form.item.tsx +59 -36
- package/src/form/form.tsx +12 -7
- package/src/form/layout.tsx +9 -3
- package/src/index.tsx +4 -5
- /package/esm/{interface.d.ts → common/interface.d.ts} +0 -0
- /package/esm/{interface.js → common/interface.js} +0 -0
- /package/src/{interface.ts → common/interface.ts} +0 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
export interface FairysValtioFormLayoutContextOptions {
|
|
2
|
+
/**平台*/
|
|
3
|
+
platform?: 'pc' | 'rn' | 'taro';
|
|
4
|
+
/**列数据*/
|
|
5
|
+
colCount?: number;
|
|
6
|
+
/**规则校验失败错误提示位置*/
|
|
7
|
+
errorLayout?: 'bottom-left' | 'bottom-right' | 'top-right' | 'top-left' | 'left-border-top' | 'right-border-top';
|
|
8
|
+
/**
|
|
9
|
+
* label显示模式
|
|
10
|
+
* @platform taro 支持 between
|
|
11
|
+
*/
|
|
12
|
+
labelMode?: 'left' | 'top' | 'between';
|
|
13
|
+
/**表单项 className*/
|
|
14
|
+
formItemClassName?: string;
|
|
15
|
+
/**表单项 style*/
|
|
16
|
+
formItemStyle?: React.CSSProperties;
|
|
17
|
+
/**表单项 label className*/
|
|
18
|
+
formItemLabelClassName?: string;
|
|
19
|
+
/**表单项 label style*/
|
|
20
|
+
formItemLabelStyle?: React.CSSProperties;
|
|
21
|
+
/**表单项 body className*/
|
|
22
|
+
formItemBodyClassName?: string;
|
|
23
|
+
/**表单项 body style*/
|
|
24
|
+
formItemBodyStyle?: React.CSSProperties;
|
|
25
|
+
/**
|
|
26
|
+
* 底部边框类型
|
|
27
|
+
*/
|
|
28
|
+
itemBorderType?: 'bottom' | 'body' | 'none';
|
|
29
|
+
/**边框颜色*/
|
|
30
|
+
itemBorderColor?: React.CSSProperties['borderColor'];
|
|
31
|
+
/**是否校验失败时显示红色边框*/
|
|
32
|
+
isInvalidBorderRed?: boolean;
|
|
33
|
+
/**是否校验失败时显示红色文本*/
|
|
34
|
+
isInvalidTextRed?: boolean;
|
|
35
|
+
/**是否显示冒号*/
|
|
36
|
+
showColon?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface FairysValtioFormLayoutAttrsProps extends FairysValtioFormLayoutContextOptions {
|
|
39
|
+
/**
|
|
40
|
+
* @description gap 属性是用来设置网格行与列之间的间隙,该属性是row-gap and column-gap的简写形式。
|
|
41
|
+
*/
|
|
42
|
+
gap?: string | number;
|
|
43
|
+
/**标题*/
|
|
44
|
+
title?: React.ReactNode;
|
|
45
|
+
/**额外内容*/
|
|
46
|
+
extra?: React.ReactNode;
|
|
47
|
+
/**内容*/
|
|
48
|
+
children?: React.ReactNode;
|
|
49
|
+
/**是否占据整行*/
|
|
50
|
+
isAllColSpan?: boolean;
|
|
51
|
+
className?: string;
|
|
52
|
+
style?: React.CSSProperties;
|
|
53
|
+
/**头部ClassName*/
|
|
54
|
+
headerClassName?: string;
|
|
55
|
+
/**头部样式*/
|
|
56
|
+
headerStyle?: React.CSSProperties;
|
|
57
|
+
/**内容ClassName*/
|
|
58
|
+
bodyClassName?: string;
|
|
59
|
+
/**内容样式*/
|
|
60
|
+
bodyStyle?: React.CSSProperties;
|
|
61
|
+
/**是否边框*/
|
|
62
|
+
bordered?: boolean;
|
|
63
|
+
/**显示阴影*/
|
|
64
|
+
boxShadow?: boolean;
|
|
65
|
+
/**最后一个是否显示底部边框*/
|
|
66
|
+
lastItemBordered?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export declare class FairysValtioFormLayoutInstance {
|
|
69
|
+
state: FairysValtioFormLayoutContextOptions;
|
|
70
|
+
updated: (options?: FairysValtioFormLayoutContextOptions) => void;
|
|
71
|
+
}
|
|
72
|
+
export declare const useFairysValtioFormLayoutInstance: (instance?: FairysValtioFormLayoutInstance) => FairysValtioFormLayoutInstance;
|
|
73
|
+
export declare const FairysValtioFormLayoutContext: import("react").Context<FairysValtioFormLayoutInstance>;
|
|
74
|
+
export declare const useFairysValtioFormLayoutContext: () => [FairysValtioFormLayoutContextOptions, FairysValtioFormLayoutInstance];
|
|
75
|
+
/**
|
|
76
|
+
* 布局属性处理
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
*
|
|
80
|
+
* ```tsx
|
|
81
|
+
import { Fragment } from 'react'
|
|
82
|
+
import { useFairysValtioFormLayoutAttrs, FairysValtioFormLayoutContext } from "@fairys/valtio-form"
|
|
83
|
+
import type { FairysValtioFormLayoutAttrsProps } from "@fairys/valtio-form"
|
|
84
|
+
|
|
85
|
+
export interface LayoutProps extends FairysValtioFormLayoutAttrsProps {}
|
|
86
|
+
|
|
87
|
+
export const Layout = (props: LayoutProps) => {
|
|
88
|
+
const { children, title, extra } = props
|
|
89
|
+
const {
|
|
90
|
+
formLayoutInstance,
|
|
91
|
+
layoutName, layoutStyle,
|
|
92
|
+
headerName, headerStyle,
|
|
93
|
+
headerTitleName, headerExtraName,
|
|
94
|
+
bodyName, bodyStyle
|
|
95
|
+
} = useFairysValtioFormLayoutAttrs(props)
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<FairysValtioFormLayoutContext.Provider value={formLayoutInstance}>
|
|
99
|
+
<div className={layoutName} style={layoutStyle}>
|
|
100
|
+
<div>
|
|
101
|
+
{title || extra ? (
|
|
102
|
+
<div style={headerStyle} className={headerName}>
|
|
103
|
+
<div className={headerTitleName}>{title}</div>
|
|
104
|
+
<div className={headerExtraName}>{extra}</div>
|
|
105
|
+
</div>
|
|
106
|
+
) : (
|
|
107
|
+
<Fragment />
|
|
108
|
+
)}
|
|
109
|
+
</div>
|
|
110
|
+
<div className={bodyName} style={bodyStyle}>
|
|
111
|
+
{children}
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</FairysValtioFormLayoutContext.Provider>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
export declare function useFairysValtioFormLayoutAttrs(props: FairysValtioFormLayoutAttrsProps): FairysValtioFormLayoutAttrsReturn;
|
|
121
|
+
export interface FairysValtioFormLayoutAttrsReturn {
|
|
122
|
+
/**列数*/
|
|
123
|
+
colCount: number;
|
|
124
|
+
/**规则校验失败错误提示位置*/
|
|
125
|
+
errorLayout: string;
|
|
126
|
+
/**
|
|
127
|
+
* label显示模式
|
|
128
|
+
* @platform taro 支持 between
|
|
129
|
+
*/
|
|
130
|
+
labelMode: string;
|
|
131
|
+
/**
|
|
132
|
+
* 底部边框类型
|
|
133
|
+
*/
|
|
134
|
+
itemBorderType: string;
|
|
135
|
+
/**表单布局实例*/
|
|
136
|
+
formLayoutInstance: FairysValtioFormLayoutInstance;
|
|
137
|
+
/**布局ClassName*/
|
|
138
|
+
layoutName: string;
|
|
139
|
+
/**布局样式*/
|
|
140
|
+
layoutStyle: React.CSSProperties;
|
|
141
|
+
/**头部ClassName*/
|
|
142
|
+
headerName: string;
|
|
143
|
+
/**头部样式*/
|
|
144
|
+
headerStyle: React.CSSProperties;
|
|
145
|
+
/**头部标题ClassName*/
|
|
146
|
+
headerTitleName: string;
|
|
147
|
+
/**头部额外内容ClassName*/
|
|
148
|
+
headerExtraName: string;
|
|
149
|
+
/**内容ClassName*/
|
|
150
|
+
bodyName: string;
|
|
151
|
+
/**内容样式*/
|
|
152
|
+
bodyStyle: React.CSSProperties;
|
|
153
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
FairysValtioFormLayoutInstance: ()=>FairysValtioFormLayoutInstance,
|
|
37
|
+
useFairysValtioFormLayoutContext: ()=>useFairysValtioFormLayoutContext,
|
|
38
|
+
useFairysValtioFormLayoutInstance: ()=>useFairysValtioFormLayoutInstance,
|
|
39
|
+
FairysValtioFormLayoutContext: ()=>FairysValtioFormLayoutContext,
|
|
40
|
+
useFairysValtioFormLayoutAttrs: ()=>useFairysValtioFormLayoutAttrs
|
|
41
|
+
});
|
|
42
|
+
const external_react_namespaceObject = require("react");
|
|
43
|
+
const external_clsx_namespaceObject = require("clsx");
|
|
44
|
+
var external_clsx_default = /*#__PURE__*/ __webpack_require__.n(external_clsx_namespaceObject);
|
|
45
|
+
const external_valtio_namespaceObject = require("valtio");
|
|
46
|
+
class FairysValtioFormLayoutInstance {
|
|
47
|
+
state = (0, external_valtio_namespaceObject.proxy)({
|
|
48
|
+
colCount: 1,
|
|
49
|
+
errorLayout: 'bottom-right',
|
|
50
|
+
labelMode: 'between',
|
|
51
|
+
itemBorderType: 'bottom'
|
|
52
|
+
});
|
|
53
|
+
updated = (options = {})=>{
|
|
54
|
+
const keys = Object.keys(options);
|
|
55
|
+
for(let index = 0; index < keys.length; index++){
|
|
56
|
+
const key = keys[index];
|
|
57
|
+
this.state[key] = options[key];
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const useFairysValtioFormLayoutInstance = (instance)=>{
|
|
62
|
+
const ref = (0, external_react_namespaceObject.useRef)();
|
|
63
|
+
if (!ref.current) if (instance) ref.current = instance;
|
|
64
|
+
else ref.current = new FairysValtioFormLayoutInstance();
|
|
65
|
+
return ref.current;
|
|
66
|
+
};
|
|
67
|
+
const FairysValtioFormLayoutContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(new FairysValtioFormLayoutInstance());
|
|
68
|
+
const useFairysValtioFormLayoutContext = ()=>{
|
|
69
|
+
const instance = (0, external_react_namespaceObject.useContext)(FairysValtioFormLayoutContext);
|
|
70
|
+
const state = (0, external_valtio_namespaceObject.useSnapshot)(instance.state);
|
|
71
|
+
return [
|
|
72
|
+
state,
|
|
73
|
+
instance
|
|
74
|
+
];
|
|
75
|
+
};
|
|
76
|
+
function useFairysValtioFormLayoutAttrs(props) {
|
|
77
|
+
const formLayoutInstance = useFairysValtioFormLayoutInstance();
|
|
78
|
+
const [state] = useFairysValtioFormLayoutContext();
|
|
79
|
+
const parent_colCount = state.colCount || 1;
|
|
80
|
+
const parent_errorLayout = state.errorLayout || 'bottom-right';
|
|
81
|
+
const parent_labelMode = state.labelMode || 'between';
|
|
82
|
+
const parent_formItemClassName = state.formItemClassName;
|
|
83
|
+
const parent_formItemStyle = state.formItemStyle;
|
|
84
|
+
const parent_formItemLabelClassName = state.formItemLabelClassName;
|
|
85
|
+
const parent_formItemLabelStyle = state.formItemLabelStyle;
|
|
86
|
+
const parent_formItemBodyClassName = state.formItemBodyClassName;
|
|
87
|
+
const parent_formItemBodyStyle = state.formItemBodyStyle;
|
|
88
|
+
const parent_borderedType = state.itemBorderType || 'bottom';
|
|
89
|
+
const parent_itemBorderColor = state.itemBorderColor;
|
|
90
|
+
const parent_isInvalidBorderRed = state.isInvalidBorderRed;
|
|
91
|
+
const parent_isInvalidTextRed = state.isInvalidTextRed;
|
|
92
|
+
const parent_showColon = state.showColon;
|
|
93
|
+
const parent_platform = state.platform;
|
|
94
|
+
const { colCount = parent_colCount, errorLayout = parent_errorLayout, labelMode = parent_labelMode, formItemClassName = parent_formItemClassName, formItemStyle = parent_formItemStyle, formItemLabelClassName = parent_formItemLabelClassName, formItemLabelStyle = parent_formItemLabelStyle, formItemBodyClassName = parent_formItemBodyClassName, formItemBodyStyle = parent_formItemBodyStyle, itemBorderType = parent_borderedType, itemBorderColor = parent_itemBorderColor, lastItemBordered = true, isInvalidBorderRed = parent_isInvalidBorderRed, isInvalidTextRed = parent_isInvalidTextRed, showColon = parent_showColon, platform = parent_platform, gap, isAllColSpan = false, className, style, headerClassName, headerStyle, bodyClassName, bodyStyle, bordered, boxShadow } = props;
|
|
95
|
+
(0, external_react_namespaceObject.useMemo)(()=>formLayoutInstance.updated({
|
|
96
|
+
colCount,
|
|
97
|
+
errorLayout,
|
|
98
|
+
labelMode,
|
|
99
|
+
formItemClassName,
|
|
100
|
+
formItemStyle,
|
|
101
|
+
formItemLabelClassName,
|
|
102
|
+
formItemLabelStyle,
|
|
103
|
+
formItemBodyClassName,
|
|
104
|
+
formItemBodyStyle,
|
|
105
|
+
itemBorderType,
|
|
106
|
+
itemBorderColor,
|
|
107
|
+
isInvalidBorderRed,
|
|
108
|
+
isInvalidTextRed,
|
|
109
|
+
showColon,
|
|
110
|
+
platform
|
|
111
|
+
}), [
|
|
112
|
+
colCount,
|
|
113
|
+
errorLayout,
|
|
114
|
+
labelMode,
|
|
115
|
+
formItemClassName,
|
|
116
|
+
formItemStyle,
|
|
117
|
+
formItemLabelClassName,
|
|
118
|
+
formItemLabelStyle,
|
|
119
|
+
formItemBodyClassName,
|
|
120
|
+
formItemBodyStyle,
|
|
121
|
+
itemBorderType,
|
|
122
|
+
itemBorderColor,
|
|
123
|
+
isInvalidBorderRed,
|
|
124
|
+
isInvalidTextRed,
|
|
125
|
+
showColon,
|
|
126
|
+
platform
|
|
127
|
+
]);
|
|
128
|
+
const layoutCls = (0, external_react_namespaceObject.useMemo)(()=>external_clsx_default()("fairys-valtio-form-layout fairystaroform__transition-all fairystaroform__duration-300 fairystaroform__text-_zkh1_12px_zhk2_ fairystaroform__w-full fairystaroform__box-border fairystaroform__rounded-_zkh1_8px_zhk2_", {
|
|
129
|
+
'fairys-valtio-form-layout-all-col-span': isAllColSpan,
|
|
130
|
+
'fairys-valtio-form-layout-box-shadow': boxShadow,
|
|
131
|
+
'fairystaroform__border fairystaroform__border-solid fairystaroform__border-gray-200': bordered,
|
|
132
|
+
'fairys-valtio-form-layout-last-item-no-border': !lastItemBordered
|
|
133
|
+
}, className), [
|
|
134
|
+
className,
|
|
135
|
+
isAllColSpan,
|
|
136
|
+
bordered,
|
|
137
|
+
boxShadow,
|
|
138
|
+
lastItemBordered
|
|
139
|
+
]);
|
|
140
|
+
const headerCls = (0, external_react_namespaceObject.useMemo)(()=>external_clsx_default()("fairys-valtio-form-layout-header fairystaroform__transition-all fairystaroform__duration-300 fairystaroform__flex fairystaroform__justify-between fairystaroform__items-center fairystaroform__flex-row fairystaroform__py-_zkh1_10px_zhk2_ fairystaroform__border-b fairystaroform__border-b-solid fairystaroform__border-b-gray-200 fairystaroform__box-border", {
|
|
141
|
+
'fairystaroform__px-_zkh1_8px_zhk2_': bordered || boxShadow,
|
|
142
|
+
'fairystaroform__px-_zkh1_4px_zhk2_': !bordered && !boxShadow
|
|
143
|
+
}, headerClassName), [
|
|
144
|
+
headerClassName,
|
|
145
|
+
bordered,
|
|
146
|
+
boxShadow
|
|
147
|
+
]);
|
|
148
|
+
const headerTitleCls = (0, external_react_namespaceObject.useMemo)(()=>external_clsx_default()("fairys-valtio-form-layout-header-title fairystaroform__transition-all fairystaroform__duration-300 fairystaroform__text-_zkh1_14px_zhk2_ fairystaroform__font-bold fairystaroform__box-border"), []);
|
|
149
|
+
const headerExtraCls = (0, external_react_namespaceObject.useMemo)(()=>external_clsx_default()("fairys-valtio-form-layout-header-extra fairystaroform__transition-all fairystaroform__duration-300 fairystaroform__box-border"), []);
|
|
150
|
+
const body_base = (0, external_react_namespaceObject.useMemo)(()=>external_clsx_default()('fairys-valtio-form-layout-body fairystaroform__transition-all fairystaroform__duration-300 fairystaroform__px-_zkh1_8px_zhk2_ fairystaroform__w-full fairystaroform__grid fairystaroform__box-border fairystaroform__pt-_zkh1_8px_zhk2_ fairystaroform__pb-_zkh1_12px_zhk2_ fairystaroform__gap-_zkh1_6px_zhk2_', bodyClassName), [
|
|
151
|
+
bodyClassName
|
|
152
|
+
]);
|
|
153
|
+
const styleBase = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
154
|
+
const css = {};
|
|
155
|
+
if ('string' == typeof gap) css.gap = gap;
|
|
156
|
+
if ('number' == typeof gap) css.gap = `${gap}px`;
|
|
157
|
+
if (colCount) css.gridTemplateColumns = `repeat(${colCount}, auto)`;
|
|
158
|
+
return css;
|
|
159
|
+
}, [
|
|
160
|
+
colCount,
|
|
161
|
+
gap
|
|
162
|
+
]);
|
|
163
|
+
return {
|
|
164
|
+
colCount,
|
|
165
|
+
errorLayout,
|
|
166
|
+
labelMode,
|
|
167
|
+
itemBorderType,
|
|
168
|
+
formLayoutInstance,
|
|
169
|
+
layoutName: layoutCls,
|
|
170
|
+
layoutStyle: style,
|
|
171
|
+
headerName: headerCls,
|
|
172
|
+
headerStyle: headerStyle,
|
|
173
|
+
headerTitleName: headerTitleCls,
|
|
174
|
+
headerExtraName: headerExtraCls,
|
|
175
|
+
bodyName: body_base,
|
|
176
|
+
bodyStyle: {
|
|
177
|
+
...styleBase,
|
|
178
|
+
...bodyStyle
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
exports.FairysValtioFormLayoutContext = __webpack_exports__.FairysValtioFormLayoutContext;
|
|
183
|
+
exports.FairysValtioFormLayoutInstance = __webpack_exports__.FairysValtioFormLayoutInstance;
|
|
184
|
+
exports.useFairysValtioFormLayoutAttrs = __webpack_exports__.useFairysValtioFormLayoutAttrs;
|
|
185
|
+
exports.useFairysValtioFormLayoutContext = __webpack_exports__.useFairysValtioFormLayoutContext;
|
|
186
|
+
exports.useFairysValtioFormLayoutInstance = __webpack_exports__.useFairysValtioFormLayoutInstance;
|
|
187
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
188
|
+
"FairysValtioFormLayoutContext",
|
|
189
|
+
"FairysValtioFormLayoutInstance",
|
|
190
|
+
"useFairysValtioFormLayoutAttrs",
|
|
191
|
+
"useFairysValtioFormLayoutContext",
|
|
192
|
+
"useFairysValtioFormLayoutInstance"
|
|
193
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
194
|
+
Object.defineProperty(exports, '__esModule', {
|
|
195
|
+
value: true
|
|
196
|
+
});
|
package/lib/index.d.ts
ADDED
package/lib/index.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
common: function(module) {
|
|
4
|
+
module.exports = require("./common/index.js");
|
|
5
|
+
},
|
|
6
|
+
"form/form.item": function(module) {
|
|
4
7
|
module.exports = require("./form/form.item.js");
|
|
5
8
|
},
|
|
6
|
-
"
|
|
9
|
+
"form/form": function(module) {
|
|
7
10
|
module.exports = require("./form/form.js");
|
|
8
11
|
},
|
|
9
|
-
"
|
|
10
|
-
module.exports = require("./form/hooks/index.js");
|
|
11
|
-
},
|
|
12
|
-
"./form/instance": function(module) {
|
|
13
|
-
module.exports = require("./form/instance/index.js");
|
|
14
|
-
},
|
|
15
|
-
"./form/layout": function(module) {
|
|
12
|
+
"form/layout": function(module) {
|
|
16
13
|
module.exports = require("./form/layout.js");
|
|
17
14
|
}
|
|
18
15
|
};
|
|
@@ -59,34 +56,28 @@ function __webpack_require__(moduleId) {
|
|
|
59
56
|
var __webpack_exports__ = {};
|
|
60
57
|
(()=>{
|
|
61
58
|
__webpack_require__.r(__webpack_exports__);
|
|
62
|
-
var
|
|
63
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
64
|
-
for(var __WEBPACK_IMPORT_KEY__ in _form_hooks__WEBPACK_IMPORTED_MODULE_0__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
65
|
-
return _form_hooks__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
66
|
-
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
67
|
-
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
68
|
-
var _form_instance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./form/instance");
|
|
59
|
+
var common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("common");
|
|
69
60
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
70
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
71
|
-
return
|
|
61
|
+
for(var __WEBPACK_IMPORT_KEY__ in common__WEBPACK_IMPORTED_MODULE_0__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
62
|
+
return common__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
72
63
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
73
64
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
74
|
-
var
|
|
65
|
+
var form_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("form/layout");
|
|
75
66
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
76
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
77
|
-
return
|
|
67
|
+
for(var __WEBPACK_IMPORT_KEY__ in form_layout__WEBPACK_IMPORTED_MODULE_1__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
68
|
+
return form_layout__WEBPACK_IMPORTED_MODULE_1__[key];
|
|
78
69
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
79
70
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
80
|
-
var
|
|
71
|
+
var form_form__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("form/form");
|
|
81
72
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
82
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
83
|
-
return
|
|
73
|
+
for(var __WEBPACK_IMPORT_KEY__ in form_form__WEBPACK_IMPORTED_MODULE_2__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
74
|
+
return form_form__WEBPACK_IMPORTED_MODULE_2__[key];
|
|
84
75
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
85
76
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
86
|
-
var
|
|
77
|
+
var form_form_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("form/form.item");
|
|
87
78
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
88
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
89
|
-
return
|
|
79
|
+
for(var __WEBPACK_IMPORT_KEY__ in form_form_item__WEBPACK_IMPORTED_MODULE_3__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
80
|
+
return form_form_item__WEBPACK_IMPORTED_MODULE_3__[key];
|
|
90
81
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
91
82
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
92
83
|
})();
|