lkd-web-kit 0.5.11 → 0.5.12
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/components/MyRadioGroup/index.cjs +25 -0
- package/dist/components/MyRadioGroup/index.js +21 -0
- package/dist/form/base/FormRadioGroup.cjs +2 -2
- package/dist/form/base/FormRadioGroup.js +2 -2
- package/dist/index.cjs +33 -31
- package/dist/index.d.ts +12 -2
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
const core = require('@mantine/core');
|
|
7
|
+
|
|
8
|
+
const MyRadioGroup = ({
|
|
9
|
+
options,
|
|
10
|
+
orientation = "vertical",
|
|
11
|
+
gap = "xs",
|
|
12
|
+
...radioGroupProps
|
|
13
|
+
}) => {
|
|
14
|
+
const Container = orientation === "horizontal" ? core.Group : core.Stack;
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core.Radio.Group, { ...radioGroupProps, children: /* @__PURE__ */ jsxRuntime.jsx(Container, { gap, children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
+
core.Radio,
|
|
17
|
+
{
|
|
18
|
+
disabled: radioGroupProps.readOnly,
|
|
19
|
+
...option
|
|
20
|
+
},
|
|
21
|
+
String(option.value) || String(index)
|
|
22
|
+
)) }) });
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.MyRadioGroup = MyRadioGroup;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Radio, Group, Stack } from '@mantine/core';
|
|
3
|
+
|
|
4
|
+
const MyRadioGroup = ({
|
|
5
|
+
options,
|
|
6
|
+
orientation = "vertical",
|
|
7
|
+
gap = "xs",
|
|
8
|
+
...radioGroupProps
|
|
9
|
+
}) => {
|
|
10
|
+
const Container = orientation === "horizontal" ? Group : Stack;
|
|
11
|
+
return /* @__PURE__ */ jsx(Radio.Group, { ...radioGroupProps, children: /* @__PURE__ */ jsx(Container, { gap, children: options.map((option, index) => /* @__PURE__ */ jsx(
|
|
12
|
+
Radio,
|
|
13
|
+
{
|
|
14
|
+
disabled: radioGroupProps.readOnly,
|
|
15
|
+
...option
|
|
16
|
+
},
|
|
17
|
+
String(option.value) || String(index)
|
|
18
|
+
)) }) });
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { MyRadioGroup };
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const
|
|
6
|
+
const index = require('../../components/MyRadioGroup/index.cjs');
|
|
7
7
|
const withController = require('../../hocs/withController.cjs');
|
|
8
8
|
|
|
9
9
|
const FormRadioGroup = withController.withController(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
|
|
10
|
+
index.MyRadioGroup,
|
|
11
11
|
{
|
|
12
12
|
...field,
|
|
13
13
|
...props
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { MyRadioGroup } from '../../components/MyRadioGroup/index.js';
|
|
3
3
|
import { withController } from '../../hocs/withController.js';
|
|
4
4
|
|
|
5
5
|
const FormRadioGroup = withController(({ field, props }) => /* @__PURE__ */ jsx(
|
|
6
|
-
|
|
6
|
+
MyRadioGroup,
|
|
7
7
|
{
|
|
8
8
|
...field,
|
|
9
9
|
...props
|
package/dist/index.cjs
CHANGED
|
@@ -6,22 +6,23 @@ const index = require('./components/EmptyState/index.cjs');
|
|
|
6
6
|
const index$1 = require('./components/InfinityLoader/index.cjs');
|
|
7
7
|
const NavItems = require('./components/NavItems.cjs');
|
|
8
8
|
const Icon = require('./components/Icon.cjs');
|
|
9
|
-
const index$2 = require('./components/
|
|
10
|
-
const index$3 = require('./components/
|
|
11
|
-
const index$4 = require('./components/
|
|
12
|
-
const index$5 = require('./components/
|
|
13
|
-
const index$6 = require('./components/
|
|
14
|
-
const index$7 = require('./components/
|
|
15
|
-
const index$8 = require('./components/
|
|
16
|
-
const index$9 = require('./components/
|
|
17
|
-
const index$a = require('./components/
|
|
18
|
-
const index$b = require('./components/
|
|
19
|
-
const index$c = require('./components/
|
|
20
|
-
const index$d = require('./components/
|
|
9
|
+
const index$2 = require('./components/MyRadioGroup/index.cjs');
|
|
10
|
+
const index$3 = require('./components/MyDatePickerInput/index.cjs');
|
|
11
|
+
const index$4 = require('./components/MyDateTimePicker/index.cjs');
|
|
12
|
+
const index$5 = require('./components/MyNotifications/index.cjs');
|
|
13
|
+
const index$6 = require('./components/MyNumberInput/index.cjs');
|
|
14
|
+
const index$7 = require('./components/MySelect/index.cjs');
|
|
15
|
+
const index$8 = require('./components/MyTextarea/index.cjs');
|
|
16
|
+
const index$9 = require('./components/MyTextInput/index.cjs');
|
|
17
|
+
const index$a = require('./components/MyTimeInput/index.cjs');
|
|
18
|
+
const index$b = require('./components/SelectInfinity/index.cjs');
|
|
19
|
+
const index$c = require('./components/MyMultiSelect/index.cjs');
|
|
20
|
+
const index$d = require('./components/MyMonthPickerInput/index.cjs');
|
|
21
|
+
const index$e = require('./components/MyDateInput/index.cjs');
|
|
21
22
|
const httpStatus = require('./consts/http-status.cjs');
|
|
22
23
|
const revalidate = require('./consts/revalidate.cjs');
|
|
23
|
-
const index$
|
|
24
|
-
const index$
|
|
24
|
+
const index$f = require('./contexts/NavigationHistoryContext/index.cjs');
|
|
25
|
+
const index$g = require('./contexts/PageDataContext/index.cjs');
|
|
25
26
|
const Form = require('./form/Form.cjs');
|
|
26
27
|
const FormButtonSubmit = require('./form/FormButtonSubmit.cjs');
|
|
27
28
|
const zodValidator = require('./form/utils/zodValidator.cjs');
|
|
@@ -66,25 +67,26 @@ exports.EmptyState = index.EmptyState;
|
|
|
66
67
|
exports.InfinityLoader = index$1.InfinityLoader;
|
|
67
68
|
exports.NavItems = NavItems.NavItems;
|
|
68
69
|
exports.Icon = Icon.Icon;
|
|
69
|
-
exports.
|
|
70
|
-
exports.
|
|
71
|
-
exports.
|
|
72
|
-
exports.
|
|
73
|
-
exports.
|
|
74
|
-
exports.
|
|
75
|
-
exports.
|
|
76
|
-
exports.
|
|
77
|
-
exports.
|
|
78
|
-
exports.
|
|
79
|
-
exports.
|
|
80
|
-
exports.
|
|
70
|
+
exports.MyRadioGroup = index$2.MyRadioGroup;
|
|
71
|
+
exports.MyDatePickerInput = index$3.MyDatePickerInput;
|
|
72
|
+
exports.MyDateTimePicker = index$4.MyDateTimePicker;
|
|
73
|
+
exports.MyNotifications = index$5.MyNotifications;
|
|
74
|
+
exports.MyNumberInput = index$6.MyNumberInput;
|
|
75
|
+
exports.MySelect = index$7.MySelect;
|
|
76
|
+
exports.MyTextarea = index$8.MyTextarea;
|
|
77
|
+
exports.MyTextInput = index$9.MyTextInput;
|
|
78
|
+
exports.MyTimeInput = index$a.MyTimeInput;
|
|
79
|
+
exports.InfinitySelect = index$b.InfinitySelect;
|
|
80
|
+
exports.MyMultiSelect = index$c.MyMultiSelect;
|
|
81
|
+
exports.MyMonthPickerInput = index$d.MyMonthPickerInput;
|
|
82
|
+
exports.MyDateInput = index$e.MyDateInput;
|
|
81
83
|
exports.HttpStatus = httpStatus.HttpStatus;
|
|
82
84
|
exports.Revalidate = revalidate.Revalidate;
|
|
83
|
-
exports.NavigationHistoryProvider = index$
|
|
84
|
-
exports.QP_BACK_URL_NAME = index$
|
|
85
|
-
exports.useNavigationHistory = index$
|
|
86
|
-
exports.PageDataProvider = index$
|
|
87
|
-
exports.usePageData = index$
|
|
85
|
+
exports.NavigationHistoryProvider = index$f.NavigationHistoryProvider;
|
|
86
|
+
exports.QP_BACK_URL_NAME = index$f.QP_BACK_URL_NAME;
|
|
87
|
+
exports.useNavigationHistory = index$f.useNavigationHistory;
|
|
88
|
+
exports.PageDataProvider = index$g.PageDataProvider;
|
|
89
|
+
exports.usePageData = index$g.usePageData;
|
|
88
90
|
exports.Form = Form.Form;
|
|
89
91
|
exports.FormButtonSubmit = FormButtonSubmit.FormButtonSubmit;
|
|
90
92
|
exports.zodValidator = zodValidator.zodValidator;
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { JSX } from 'react/jsx-runtime';
|
|
|
25
25
|
import { KyResponse } from 'ky';
|
|
26
26
|
import { LoaderProps } from '@mantine/core';
|
|
27
27
|
import { MantineColorShade } from '@mantine/core';
|
|
28
|
+
import { MantineSpacing } from '@mantine/core';
|
|
28
29
|
import { MantineThemeColors } from '@mantine/core';
|
|
29
30
|
import { MantineThemeOverride } from '@mantine/core';
|
|
30
31
|
import { ModalProps } from '@mantine/core';
|
|
@@ -34,6 +35,7 @@ import { MultiSelectProps } from '@mantine/core';
|
|
|
34
35
|
import { NotificationsProps } from '@mantine/notifications';
|
|
35
36
|
import { NumberInputProps } from '@mantine/core';
|
|
36
37
|
import { RadioGroupProps } from '@mantine/core';
|
|
38
|
+
import { RadioProps } from '@mantine/core';
|
|
37
39
|
import { ReactNode } from 'react';
|
|
38
40
|
import { ReadonlyURLSearchParams } from 'next/navigation';
|
|
39
41
|
import { RefObject } from 'react';
|
|
@@ -161,9 +163,9 @@ declare interface FormProps<T extends FieldValues, TContext = any, TT extends T
|
|
|
161
163
|
onSubmitError?: SubmitErrorHandler<T>;
|
|
162
164
|
}
|
|
163
165
|
|
|
164
|
-
export declare const FormRadioGroup: FC<
|
|
166
|
+
export declare const FormRadioGroup: FC<MyRadioGroupProps & WithControllerProps>;
|
|
165
167
|
|
|
166
|
-
export declare type FormRadioGroupProps =
|
|
168
|
+
export declare type FormRadioGroupProps = MyRadioGroupProps & WithControllerProps;
|
|
167
169
|
|
|
168
170
|
export declare const FormSelect: FC<MySelectProps & WithControllerProps>;
|
|
169
171
|
|
|
@@ -385,6 +387,14 @@ export declare const MyNumberInput: (props: MyNumberInputProps) => JSX.Element;
|
|
|
385
387
|
export declare interface MyNumberInputProps extends NumberInputProps {
|
|
386
388
|
}
|
|
387
389
|
|
|
390
|
+
export declare const MyRadioGroup: ({ options, orientation, gap, ...radioGroupProps }: MyRadioGroupProps) => JSX.Element;
|
|
391
|
+
|
|
392
|
+
export declare interface MyRadioGroupProps extends RadioGroupProps {
|
|
393
|
+
options: RadioProps[];
|
|
394
|
+
orientation?: 'horizontal' | 'vertical';
|
|
395
|
+
gap?: MantineSpacing;
|
|
396
|
+
}
|
|
397
|
+
|
|
388
398
|
export declare const MySelect: (props: MySelectProps) => JSX.Element;
|
|
389
399
|
|
|
390
400
|
export declare interface MySelectProps extends SelectProps {
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { EmptyState } from './components/EmptyState/index.js';
|
|
|
2
2
|
export { InfinityLoader } from './components/InfinityLoader/index.js';
|
|
3
3
|
export { NavItems } from './components/NavItems.js';
|
|
4
4
|
export { Icon } from './components/Icon.js';
|
|
5
|
+
export { MyRadioGroup } from './components/MyRadioGroup/index.js';
|
|
5
6
|
export { MyDatePickerInput } from './components/MyDatePickerInput/index.js';
|
|
6
7
|
export { MyDateTimePicker } from './components/MyDateTimePicker/index.js';
|
|
7
8
|
export { MyNotifications } from './components/MyNotifications/index.js';
|