lkd-web-kit 0.5.0 → 0.5.1
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/dist/form/base/FormCheckbox.cjs +2 -2
- package/dist/form/base/FormCheckbox.js +1 -1
- package/dist/form/base/FormDateInput.cjs +2 -2
- package/dist/form/base/FormDateInput.js +1 -1
- package/dist/form/base/FormDatePickerInput.cjs +2 -2
- package/dist/form/base/FormDatePickerInput.js +1 -1
- package/dist/form/base/FormDateTimePicker.cjs +2 -2
- package/dist/form/base/FormDateTimePicker.js +1 -1
- package/dist/form/base/FormMonthPickerInput.cjs +2 -2
- package/dist/form/base/FormMonthPickerInput.js +1 -1
- package/dist/form/base/FormMultiSelect.cjs +2 -2
- package/dist/form/base/FormMultiSelect.js +1 -1
- package/dist/form/base/FormNumberInput.cjs +2 -2
- package/dist/form/base/FormNumberInput.js +1 -1
- package/dist/form/base/FormRadioGroup.cjs +2 -2
- package/dist/form/base/FormRadioGroup.js +1 -1
- package/dist/form/base/FormSelect.cjs +2 -2
- package/dist/form/base/FormSelect.js +1 -1
- package/dist/form/base/FormSelectInfinity.cjs +2 -2
- package/dist/form/base/FormSelectInfinity.js +1 -1
- package/dist/form/base/FormTextInput.cjs +2 -2
- package/dist/form/base/FormTextInput.js +1 -1
- package/dist/form/base/FormTextarea.cjs +2 -2
- package/dist/form/base/FormTextarea.js +1 -1
- package/dist/form/base/FormTimeInput.cjs +2 -2
- package/dist/form/base/FormTimeInput.js +1 -1
- package/dist/hocs/withModalManager.cjs +1 -4
- package/dist/hocs/withModalManager.js +1 -4
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +32 -32
- package/dist/index.js +1 -1
- package/package.json +1 -1
- /package/dist/hocs/{withForm.cjs → withController.cjs} +0 -0
- /package/dist/hocs/{withForm.js → withController.js} +0 -0
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const core = require('@mantine/core');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormCheckbox =
|
|
9
|
+
const FormCheckbox = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
core.Checkbox,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Checkbox } from '@mantine/core';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormCheckbox = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
Checkbox,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MyDateInput/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormDateInput =
|
|
9
|
+
const FormDateInput = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MyDateInput,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MyDateInput } from '../../components/MyDateInput/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormDateInput = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MyDateInput,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MyDatePickerInput/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormDatePickerInput =
|
|
9
|
+
const FormDatePickerInput = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MyDatePickerInput,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MyDatePickerInput } from '../../components/MyDatePickerInput/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormDatePickerInput = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MyDatePickerInput,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MyDateTimePicker/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormDateTimePicker =
|
|
9
|
+
const FormDateTimePicker = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MyDateTimePicker,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MyDateTimePicker } from '../../components/MyDateTimePicker/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormDateTimePicker = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MyDateTimePicker,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MyMonthPickerInput/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormMonthPickerInput =
|
|
9
|
+
const FormMonthPickerInput = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MyMonthPickerInput,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MyMonthPickerInput } from '../../components/MyMonthPickerInput/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormMonthPickerInput = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MyMonthPickerInput,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MyMultiSelect/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormMultiSelect =
|
|
9
|
+
const FormMultiSelect = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MyMultiSelect,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MyMultiSelect } from '../../components/MyMultiSelect/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormMultiSelect = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MyMultiSelect,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MyNumberInput/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormNumberInput =
|
|
9
|
+
const FormNumberInput = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MyNumberInput,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MyNumberInput } from '../../components/MyNumberInput/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormNumberInput = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MyNumberInput,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const core = require('@mantine/core');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormRadioGroup =
|
|
9
|
+
const FormRadioGroup = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
core.Radio.Group,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Radio } from '@mantine/core';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormRadioGroup = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
Radio.Group,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MySelect/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormSelect =
|
|
9
|
+
const FormSelect = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MySelect,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MySelect } from '../../components/MySelect/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormSelect = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MySelect,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/SelectInfinity/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormInfinitySelect =
|
|
9
|
+
const FormInfinitySelect = withController.withController(({ field, props }) => {
|
|
10
10
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
11
|
index.InfinitySelect,
|
|
12
12
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { InfinitySelect } from '../../components/SelectInfinity/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormInfinitySelect = withController(({ field, props }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MyTextInput/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormTextInput =
|
|
9
|
+
const FormTextInput = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MyTextInput,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MyTextInput } from '../../components/MyTextInput/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormTextInput = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MyTextInput,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MyTextarea/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormTextarea =
|
|
9
|
+
const FormTextarea = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MyTextarea,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MyTextarea } from '../../components/MyTextarea/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormTextarea = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MyTextarea,
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const index = require('../../components/MyTimeInput/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
|
-
const FormTimeInput =
|
|
9
|
+
const FormTimeInput = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
10
|
index.MyTimeInput,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MyTimeInput } from '../../components/MyTimeInput/index.js';
|
|
3
|
-
import { withController } from '../../hocs/
|
|
3
|
+
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormTimeInput = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
6
|
MyTimeInput,
|
|
@@ -7,10 +7,7 @@ const jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
const React = require('react');
|
|
8
8
|
|
|
9
9
|
const withModalManager = (WrappedComponent) => {
|
|
10
|
-
const Component = ({
|
|
11
|
-
removeModal,
|
|
12
|
-
...props
|
|
13
|
-
}) => {
|
|
10
|
+
const Component = ({ removeModal, ...props }) => {
|
|
14
11
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
15
12
|
const onClose = () => {
|
|
16
13
|
setIsOpen(false);
|
|
@@ -3,10 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
|
|
5
5
|
const withModalManager = (WrappedComponent) => {
|
|
6
|
-
const Component = ({
|
|
7
|
-
removeModal,
|
|
8
|
-
...props
|
|
9
|
-
}) => {
|
|
6
|
+
const Component = ({ removeModal, ...props }) => {
|
|
10
7
|
const [isOpen, setIsOpen] = useState(false);
|
|
11
8
|
const onClose = () => {
|
|
12
9
|
setIsOpen(false);
|
package/dist/index.cjs
CHANGED
|
@@ -40,7 +40,7 @@ const FormTimeInput = require('./form/base/FormTimeInput.cjs');
|
|
|
40
40
|
const FormMultiSelect = require('./form/base/FormMultiSelect.cjs');
|
|
41
41
|
const FormMonthPickerInput = require('./form/base/FormMonthPickerInput.cjs');
|
|
42
42
|
const FormDateInput = require('./form/base/FormDateInput.cjs');
|
|
43
|
-
const
|
|
43
|
+
const withController = require('./hocs/withController.cjs');
|
|
44
44
|
const withModalManager = require('./hocs/withModalManager.cjs');
|
|
45
45
|
const useBreakpoint = require('./hooks/useBreakpoint.cjs');
|
|
46
46
|
const useFetchNextPageOnScroll = require('./hooks/useFetchNextPageOnScroll.cjs');
|
|
@@ -105,7 +105,7 @@ exports.timeInputToNumber = FormTimeInput.timeInputToNumber;
|
|
|
105
105
|
exports.FormMultiSelect = FormMultiSelect.FormMultiSelect;
|
|
106
106
|
exports.FormMonthPickerInput = FormMonthPickerInput.FormMonthPickerInput;
|
|
107
107
|
exports.FormDateInput = FormDateInput.FormDateInput;
|
|
108
|
-
exports.withController =
|
|
108
|
+
exports.withController = withController.withController;
|
|
109
109
|
exports.withModalManager = withModalManager.withModalManager;
|
|
110
110
|
exports.useBreakpoint = useBreakpoint.useBreakpoint;
|
|
111
111
|
exports.useFetchNextPageOnScroll = useFetchNextPageOnScroll.useFetchNextPageOnScroll;
|
package/dist/index.d.ts
CHANGED
|
@@ -113,21 +113,21 @@ export declare interface FormButtonSubmitProps extends ButtonProps, ElementProps
|
|
|
113
113
|
disabledWhenSuccess?: boolean;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
export declare const FormCheckbox: FC<CheckboxProps &
|
|
116
|
+
export declare const FormCheckbox: FC<CheckboxProps & WithControllerProps>;
|
|
117
117
|
|
|
118
|
-
export declare type FormCheckboxProps = CheckboxProps &
|
|
118
|
+
export declare type FormCheckboxProps = CheckboxProps & WithControllerProps;
|
|
119
119
|
|
|
120
|
-
export declare const FormDateInput: FC<
|
|
120
|
+
export declare const FormDateInput: FC<WithControllerProps & MyDateInputProps>;
|
|
121
121
|
|
|
122
|
-
export declare type FormDateInputProps =
|
|
122
|
+
export declare type FormDateInputProps = WithControllerProps & MyDateInputProps;
|
|
123
123
|
|
|
124
|
-
export declare const FormDatePickerInput: FC<
|
|
124
|
+
export declare const FormDatePickerInput: FC<WithControllerProps & MyDatePickerInputProps>;
|
|
125
125
|
|
|
126
|
-
export declare type FormDatePickerInputProps =
|
|
126
|
+
export declare type FormDatePickerInputProps = WithControllerProps & MyDatePickerInputProps;
|
|
127
127
|
|
|
128
|
-
export declare const FormDateTimePicker: FC<DateTimePickerProps &
|
|
128
|
+
export declare const FormDateTimePicker: FC<DateTimePickerProps & WithControllerProps>;
|
|
129
129
|
|
|
130
|
-
export declare type FormDateTimePickerProps =
|
|
130
|
+
export declare type FormDateTimePickerProps = WithControllerProps & MyDateTimePickerProps;
|
|
131
131
|
|
|
132
132
|
export declare type FormFieldProps<T = unknown> = Parameters<ControllerProps['render']>[0] & {
|
|
133
133
|
props: T;
|
|
@@ -141,19 +141,19 @@ export declare type FormFieldProps<T = unknown> = Parameters<ControllerProps['re
|
|
|
141
141
|
|
|
142
142
|
export declare const FormInfinitySelect: <T>(props: FormInfinitySelectProps<T>) => ReactNode;
|
|
143
143
|
|
|
144
|
-
export declare type FormInfinitySelectProps<T = unknown> = InfinitySelectProps<T> &
|
|
144
|
+
export declare type FormInfinitySelectProps<T = unknown> = InfinitySelectProps<T> & WithControllerProps;
|
|
145
145
|
|
|
146
|
-
export declare const FormMonthPickerInput: FC<MyMonthPickerInputProps &
|
|
146
|
+
export declare const FormMonthPickerInput: FC<MyMonthPickerInputProps & WithControllerProps>;
|
|
147
147
|
|
|
148
|
-
export declare type FormMonthPickerInputProps =
|
|
148
|
+
export declare type FormMonthPickerInputProps = WithControllerProps & MyMonthPickerInputProps;
|
|
149
149
|
|
|
150
|
-
export declare const FormMultiSelect: FC<MyMultiSelectProps &
|
|
150
|
+
export declare const FormMultiSelect: FC<MyMultiSelectProps & WithControllerProps>;
|
|
151
151
|
|
|
152
|
-
export declare type FormMultiSelectProps = MyMultiSelectProps &
|
|
152
|
+
export declare type FormMultiSelectProps = MyMultiSelectProps & WithControllerProps;
|
|
153
153
|
|
|
154
|
-
export declare const FormNumberInput: FC<MyNumberInputProps &
|
|
154
|
+
export declare const FormNumberInput: FC<MyNumberInputProps & WithControllerProps>;
|
|
155
155
|
|
|
156
|
-
export declare type FormNumberInputProps = MyNumberInputProps &
|
|
156
|
+
export declare type FormNumberInputProps = MyNumberInputProps & WithControllerProps;
|
|
157
157
|
|
|
158
158
|
declare interface FormProps<T extends FieldValues, TContext = any, TT extends T = T> extends BoxProps, ElementProps<'form', 'onSubmit'> {
|
|
159
159
|
methods: UseFormReturn<T, TContext, TT>;
|
|
@@ -161,25 +161,25 @@ declare interface FormProps<T extends FieldValues, TContext = any, TT extends T
|
|
|
161
161
|
onSubmitError?: SubmitErrorHandler<T>;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
export declare const FormRadioGroup: FC<RadioGroupProps &
|
|
164
|
+
export declare const FormRadioGroup: FC<RadioGroupProps & WithControllerProps>;
|
|
165
165
|
|
|
166
|
-
export declare type FormRadioGroupProps = RadioGroupProps &
|
|
166
|
+
export declare type FormRadioGroupProps = RadioGroupProps & WithControllerProps;
|
|
167
167
|
|
|
168
|
-
export declare const FormSelect: FC<MySelectProps &
|
|
168
|
+
export declare const FormSelect: FC<MySelectProps & WithControllerProps>;
|
|
169
169
|
|
|
170
|
-
export declare type FormSelectProps = MySelectProps &
|
|
170
|
+
export declare type FormSelectProps = MySelectProps & WithControllerProps;
|
|
171
171
|
|
|
172
|
-
export declare const FormTextarea: FC<TextareaProps &
|
|
172
|
+
export declare const FormTextarea: FC<TextareaProps & WithControllerProps>;
|
|
173
173
|
|
|
174
|
-
export declare type FormTextareaProps = MyTextareaProps &
|
|
174
|
+
export declare type FormTextareaProps = MyTextareaProps & WithControllerProps;
|
|
175
175
|
|
|
176
|
-
export declare const FormTextInput: FC<
|
|
176
|
+
export declare const FormTextInput: FC<WithControllerProps & MyTextInputProps>;
|
|
177
177
|
|
|
178
|
-
export declare type FormTextInputProps =
|
|
178
|
+
export declare type FormTextInputProps = WithControllerProps & MyTextInputProps;
|
|
179
179
|
|
|
180
|
-
export declare type FormTimeInput = MyTimeInputProps &
|
|
180
|
+
export declare type FormTimeInput = MyTimeInputProps & WithControllerProps;
|
|
181
181
|
|
|
182
|
-
export declare const FormTimeInput: FC<TimeInputProps &
|
|
182
|
+
export declare const FormTimeInput: FC<TimeInputProps & WithControllerProps>;
|
|
183
183
|
|
|
184
184
|
export declare const getVirtualContainerProps: (virtualizer: {
|
|
185
185
|
getTotalSize: () => number;
|
|
@@ -339,6 +339,10 @@ export declare interface LayoutProps {
|
|
|
339
339
|
params: Promise<PageParams>;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
export declare type ModalManagerWrappedComponentProps<T = any> = T & {
|
|
343
|
+
modalProps: ModalProps;
|
|
344
|
+
};
|
|
345
|
+
|
|
342
346
|
export declare const MyDateInput: (props: MyDateInputProps) => JSX.Element;
|
|
343
347
|
|
|
344
348
|
export declare interface MyDateInputProps extends DateInputProps {
|
|
@@ -556,9 +560,9 @@ export declare const useUpdateSearchParams: () => {
|
|
|
556
560
|
|
|
557
561
|
export declare const useZodConfig: () => void;
|
|
558
562
|
|
|
559
|
-
export declare const withController: <P extends unknown>(WrappedComponent: React.ComponentType<FormFieldProps<P>>, getControllerProps?: (fieldProps: P) => Omit<Partial<ControllerProps>, "render">) => FC<P &
|
|
563
|
+
export declare const withController: <P extends unknown>(WrappedComponent: React.ComponentType<FormFieldProps<P>>, getControllerProps?: (fieldProps: P) => Omit<Partial<ControllerProps>, "render">) => FC<P & WithControllerProps>;
|
|
560
564
|
|
|
561
|
-
export declare interface
|
|
565
|
+
export declare interface WithControllerProps {
|
|
562
566
|
name?: string;
|
|
563
567
|
label?: ReactNode;
|
|
564
568
|
placeholder?: string;
|
|
@@ -567,7 +571,7 @@ export declare interface WithFormProps {
|
|
|
567
571
|
disabled?: boolean;
|
|
568
572
|
}
|
|
569
573
|
|
|
570
|
-
export declare const withModalManager: <CustomProps extends Object>(WrappedComponent: React.ComponentType<
|
|
574
|
+
export declare const withModalManager: <CustomProps extends Object>(WrappedComponent: React.ComponentType<ModalManagerWrappedComponentProps<CustomProps>>) => FC<CustomProps & {
|
|
571
575
|
modalProps: ModalProps;
|
|
572
576
|
} & WithModalManagerProps>;
|
|
573
577
|
|
|
@@ -575,10 +579,6 @@ declare interface WithModalManagerProps {
|
|
|
575
579
|
removeModal: () => void;
|
|
576
580
|
}
|
|
577
581
|
|
|
578
|
-
export declare type WrappedComponentProps<T = any> = T & {
|
|
579
|
-
modalProps: ModalProps;
|
|
580
|
-
};
|
|
581
|
-
|
|
582
582
|
export declare const zodValidator: (schema: ZodType) => (values: any) => string | undefined;
|
|
583
583
|
|
|
584
584
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export { FormTimeInput, numberToTimeInput, timeInputToNumber } from './form/base
|
|
|
36
36
|
export { FormMultiSelect } from './form/base/FormMultiSelect.js';
|
|
37
37
|
export { FormMonthPickerInput } from './form/base/FormMonthPickerInput.js';
|
|
38
38
|
export { FormDateInput } from './form/base/FormDateInput.js';
|
|
39
|
-
export { withController } from './hocs/
|
|
39
|
+
export { withController } from './hocs/withController.js';
|
|
40
40
|
export { withModalManager } from './hocs/withModalManager.js';
|
|
41
41
|
export { useBreakpoint } from './hooks/useBreakpoint.js';
|
|
42
42
|
export { useFetchNextPageOnScroll } from './hooks/useFetchNextPageOnScroll.js';
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|