lkd-web-kit 0.3.17 → 0.3.18
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/index.d.ts +5 -12
- package/dist/index.mjs +1 -1
- package/dist/index48.mjs +1 -8
- package/package.json +2 -10
- package/dist/index.cjs +0 -118
- package/dist/index10.cjs +0 -16
- package/dist/index11.cjs +0 -16
- package/dist/index12.cjs +0 -16
- package/dist/index13.cjs +0 -16
- package/dist/index14.cjs +0 -118
- package/dist/index15.cjs +0 -16
- package/dist/index16.cjs +0 -19
- package/dist/index17.cjs +0 -70
- package/dist/index18.cjs +0 -14
- package/dist/index19.cjs +0 -66
- package/dist/index2.cjs +0 -43
- package/dist/index20.cjs +0 -21
- package/dist/index21.cjs +0 -30
- package/dist/index22.cjs +0 -24
- package/dist/index23.cjs +0 -15
- package/dist/index24.cjs +0 -16
- package/dist/index25.cjs +0 -16
- package/dist/index26.cjs +0 -18
- package/dist/index27.cjs +0 -17
- package/dist/index28.cjs +0 -17
- package/dist/index29.cjs +0 -17
- package/dist/index3.cjs +0 -46
- package/dist/index30.cjs +0 -17
- package/dist/index31.cjs +0 -17
- package/dist/index32.cjs +0 -17
- package/dist/index33.cjs +0 -17
- package/dist/index34.cjs +0 -17
- package/dist/index35.cjs +0 -29
- package/dist/index36.cjs +0 -17
- package/dist/index37.cjs +0 -17
- package/dist/index38.cjs +0 -51
- package/dist/index39.cjs +0 -38
- package/dist/index4.cjs +0 -40
- package/dist/index40.cjs +0 -15
- package/dist/index41.cjs +0 -23
- package/dist/index42.cjs +0 -39
- package/dist/index43.cjs +0 -24
- package/dist/index44.cjs +0 -14
- package/dist/index45.cjs +0 -19
- package/dist/index46.cjs +0 -43
- package/dist/index47.cjs +0 -14
- package/dist/index48.cjs +0 -20
- package/dist/index49.cjs +0 -11
- package/dist/index5.cjs +0 -54
- package/dist/index50.cjs +0 -45
- package/dist/index51.cjs +0 -19
- package/dist/index52.cjs +0 -24
- package/dist/index53.cjs +0 -7
- package/dist/index54.cjs +0 -65
- package/dist/index6.cjs +0 -19
- package/dist/index7.cjs +0 -19
- package/dist/index8.cjs +0 -17
- package/dist/index9.cjs +0 -16
package/dist/index21.cjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const core = require('@mantine/core');
|
|
8
|
-
const reactHookForm = require('react-hook-form');
|
|
9
|
-
|
|
10
|
-
const Form = ({
|
|
11
|
-
methods,
|
|
12
|
-
onSubmit = () => {
|
|
13
|
-
},
|
|
14
|
-
onSubmitError,
|
|
15
|
-
...rest
|
|
16
|
-
}) => {
|
|
17
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.FormProvider, { ...methods, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18
|
-
core.Box,
|
|
19
|
-
{
|
|
20
|
-
component: "form",
|
|
21
|
-
onSubmit: (e) => {
|
|
22
|
-
e.stopPropagation();
|
|
23
|
-
methods.handleSubmit(onSubmit, onSubmitError)(e);
|
|
24
|
-
},
|
|
25
|
-
...rest
|
|
26
|
-
}
|
|
27
|
-
) });
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
exports.Form = Form;
|
package/dist/index22.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const core = require('@mantine/core');
|
|
8
|
-
const reactHookForm = require('react-hook-form');
|
|
9
|
-
|
|
10
|
-
const FormButtonSubmit = (props) => {
|
|
11
|
-
const {
|
|
12
|
-
formState: { isSubmitting }
|
|
13
|
-
} = reactHookForm.useFormContext();
|
|
14
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
-
core.Button,
|
|
16
|
-
{
|
|
17
|
-
loading: isSubmitting,
|
|
18
|
-
type: "submit",
|
|
19
|
-
...props
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
exports.FormButtonSubmit = FormButtonSubmit;
|
package/dist/index23.cjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const zodValidator = (schema) => {
|
|
6
|
-
return (values) => {
|
|
7
|
-
const result = schema.safeParse(values);
|
|
8
|
-
if (result.success) return;
|
|
9
|
-
const { error } = result;
|
|
10
|
-
const firstError = error.issues[0];
|
|
11
|
-
return firstError?.message;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
exports.zodValidator = zodValidator;
|
package/dist/index24.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const zod = require('zod');
|
|
6
|
-
|
|
7
|
-
const nullableButRequired = (schema, message = "Campo requerido") => schema.nullable().superRefine((val, ctx) => {
|
|
8
|
-
if (val === null) {
|
|
9
|
-
ctx.addIssue({
|
|
10
|
-
code: zod.z.ZodIssueCode.custom,
|
|
11
|
-
message
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
exports.nullableButRequired = nullableButRequired;
|
package/dist/index25.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const zod = require('zod');
|
|
6
|
-
|
|
7
|
-
const optionalButRequired = (schema, message = "Campo requerido") => schema.optional().superRefine((val, ctx) => {
|
|
8
|
-
if (val === void 0) {
|
|
9
|
-
ctx.addIssue({
|
|
10
|
-
code: zod.z.ZodIssueCode.custom,
|
|
11
|
-
message
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
exports.optionalButRequired = optionalButRequired;
|
package/dist/index26.cjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormCheckbox = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
core.Checkbox,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
checked: field.value,
|
|
14
|
-
...props
|
|
15
|
-
}
|
|
16
|
-
));
|
|
17
|
-
|
|
18
|
-
exports.FormCheckbox = FormCheckbox;
|
package/dist/index27.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index6.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormDatePickerInput = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.MyDatePickerInput,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormDatePickerInput = FormDatePickerInput;
|
package/dist/index28.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index7.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormDateTimePicker = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.MyDateTimePicker,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormDateTimePicker = FormDateTimePicker;
|
package/dist/index29.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index9.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormNumberInput = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.MyNumberInput,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormNumberInput = FormNumberInput;
|
package/dist/index3.cjs
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
const hooks = require('@mantine/hooks');
|
|
8
|
-
const react = require('react');
|
|
9
|
-
|
|
10
|
-
const InfinityLoader = ({
|
|
11
|
-
root,
|
|
12
|
-
infinity,
|
|
13
|
-
rootMargin = "0px 0px 0px 0px",
|
|
14
|
-
endMessage = "No hay más resultados",
|
|
15
|
-
loaderProps,
|
|
16
|
-
...props
|
|
17
|
-
}) => {
|
|
18
|
-
const { entry, ref } = hooks.useIntersection({
|
|
19
|
-
root: root?.current,
|
|
20
|
-
rootMargin
|
|
21
|
-
});
|
|
22
|
-
react.useEffect(() => {
|
|
23
|
-
if (entry?.isIntersecting && infinity.hasNextPage) infinity.fetchNextPage();
|
|
24
|
-
}, [entry?.isIntersecting]);
|
|
25
|
-
react.useEffect(() => {
|
|
26
|
-
if (!entry?.isIntersecting) return;
|
|
27
|
-
const el = root?.current ?? document.documentElement;
|
|
28
|
-
const hasScroll = el?.scrollHeight > el?.clientHeight;
|
|
29
|
-
if (!hasScroll) infinity.fetchNextPage();
|
|
30
|
-
}, [entry?.isIntersecting, infinity.data?.pages.length]);
|
|
31
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
|
-
core.Center,
|
|
33
|
-
{
|
|
34
|
-
ref,
|
|
35
|
-
...props,
|
|
36
|
-
style: {
|
|
37
|
-
minHeight: "1rem",
|
|
38
|
-
fontSize: "14px",
|
|
39
|
-
...props.style
|
|
40
|
-
},
|
|
41
|
-
children: infinity.isLoading || infinity.isFetchingNextPage ? /* @__PURE__ */ jsxRuntime.jsx(core.Loader, { ...loaderProps }) : infinity.data && infinity.data.pages.length > 1 && !infinity.hasNextPage ? endMessage : null
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
exports.InfinityLoader = InfinityLoader;
|
package/dist/index30.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormRadioGroup = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
core.Radio.Group,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormRadioGroup = FormRadioGroup;
|
package/dist/index31.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index10.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormSelect = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.MySelect,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormSelect = FormSelect;
|
package/dist/index32.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index14.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormSelectInfinity = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.SelectInfinity,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormSelectInfinity = FormSelectInfinity;
|
package/dist/index33.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index11.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormTextarea = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.MyTextarea,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormTextarea = FormTextarea;
|
package/dist/index34.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index12.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormTextInput = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.MyTextInput,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormTextInput = FormTextInput;
|
package/dist/index35.cjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index13.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormTimeInput = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.MyTimeInput,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
const timeInputToNumber = (timeInput) => {
|
|
17
|
-
const [hours, minutes] = timeInput.split(":").map(Number);
|
|
18
|
-
const result = hours + minutes / 60;
|
|
19
|
-
return Number(result.toFixed(2));
|
|
20
|
-
};
|
|
21
|
-
const numberToTimeInput = (number) => {
|
|
22
|
-
const hours = Math.floor(number);
|
|
23
|
-
const minutes = Math.round((number - hours) * 60);
|
|
24
|
-
return `${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports.FormTimeInput = FormTimeInput;
|
|
28
|
-
exports.numberToTimeInput = numberToTimeInput;
|
|
29
|
-
exports.timeInputToNumber = timeInputToNumber;
|
package/dist/index36.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index15.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormMultiSelect = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.MyMultiSelect,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormMultiSelect = FormMultiSelect;
|
package/dist/index37.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const index = require('./index16.cjs');
|
|
7
|
-
const withForm = require('./index38.cjs');
|
|
8
|
-
|
|
9
|
-
const FormMonthPickerInput = withForm.withForm(({ field, props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
index.MyMonthPickerInput,
|
|
11
|
-
{
|
|
12
|
-
...field,
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
exports.FormMonthPickerInput = FormMonthPickerInput;
|
package/dist/index38.cjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const reactHookForm = require('react-hook-form');
|
|
8
|
-
const zodValidator = require('./index23.cjs');
|
|
9
|
-
|
|
10
|
-
const withForm = (WrappedComponent, getControllerProps) => {
|
|
11
|
-
const FormField = (props) => {
|
|
12
|
-
const { validate, name = "", placeholder, label, description, ...withFormRestProps } = props;
|
|
13
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14
|
-
reactHookForm.Controller,
|
|
15
|
-
{
|
|
16
|
-
name,
|
|
17
|
-
defaultValue: "",
|
|
18
|
-
rules: {
|
|
19
|
-
validate: validate && !props.disabled ? zodValidator.zodValidator(validate) : void 0
|
|
20
|
-
},
|
|
21
|
-
disabled: props.disabled,
|
|
22
|
-
...getControllerProps?.(props),
|
|
23
|
-
render: (renderProps) => {
|
|
24
|
-
const {
|
|
25
|
-
fieldState: { error }
|
|
26
|
-
} = renderProps;
|
|
27
|
-
const fieldProps = {
|
|
28
|
-
...renderProps,
|
|
29
|
-
props: {
|
|
30
|
-
...props,
|
|
31
|
-
validate: void 0
|
|
32
|
-
},
|
|
33
|
-
field: {
|
|
34
|
-
...renderProps.field,
|
|
35
|
-
label,
|
|
36
|
-
placeholder,
|
|
37
|
-
description,
|
|
38
|
-
error: error?.message
|
|
39
|
-
},
|
|
40
|
-
...withFormRestProps
|
|
41
|
-
};
|
|
42
|
-
return /* @__PURE__ */ jsxRuntime.jsx(WrappedComponent, { ...fieldProps });
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
FormField.displayName = `WithForm(${WrappedComponent.displayName})`;
|
|
48
|
-
return FormField;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
exports.withForm = withForm;
|
package/dist/index39.cjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('react');
|
|
8
|
-
|
|
9
|
-
const withModalManager = (WrappedComponent) => {
|
|
10
|
-
const Component = ({
|
|
11
|
-
removeModal,
|
|
12
|
-
opened,
|
|
13
|
-
...props
|
|
14
|
-
}) => {
|
|
15
|
-
const [isOpen, setIsOpen] = react.useState(false);
|
|
16
|
-
const onClose = () => {
|
|
17
|
-
setIsOpen(false);
|
|
18
|
-
setTimeout(() => removeModal(), 200);
|
|
19
|
-
props.onClose?.();
|
|
20
|
-
};
|
|
21
|
-
react.useEffect(() => {
|
|
22
|
-
if (opened) setTimeout(() => setIsOpen(true), 0);
|
|
23
|
-
else onClose();
|
|
24
|
-
}, [opened]);
|
|
25
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26
|
-
WrappedComponent,
|
|
27
|
-
{
|
|
28
|
-
...props,
|
|
29
|
-
opened: isOpen,
|
|
30
|
-
onClose
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
Component.displayName = `WithModalManager(${WrappedComponent.displayName})`;
|
|
35
|
-
return Component;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
exports.withModalManager = withModalManager;
|
package/dist/index4.cjs
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const core = require('@mantine/core');
|
|
8
|
-
const Link = require('next/link');
|
|
9
|
-
const navigation = require('next/navigation');
|
|
10
|
-
|
|
11
|
-
const NavItems = ({ items, activeStrategy = "includes" }) => {
|
|
12
|
-
const pathname = navigation.usePathname();
|
|
13
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 0, children: items.map(({ href, isActive, ...navLinkProps }) => {
|
|
14
|
-
if (href) {
|
|
15
|
-
const active = isActive ?? (activeStrategy === "equals" ? href === pathname : href.includes(pathname));
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17
|
-
core.NavLink,
|
|
18
|
-
{
|
|
19
|
-
active,
|
|
20
|
-
component: Link,
|
|
21
|
-
prefetch: false,
|
|
22
|
-
href,
|
|
23
|
-
...navLinkProps
|
|
24
|
-
},
|
|
25
|
-
navLinkProps.label
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
-
core.NavLink,
|
|
30
|
-
{
|
|
31
|
-
active: isActive,
|
|
32
|
-
component: "button",
|
|
33
|
-
...navLinkProps
|
|
34
|
-
},
|
|
35
|
-
navLinkProps.label
|
|
36
|
-
);
|
|
37
|
-
}) });
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
exports.NavItems = NavItems;
|
package/dist/index40.cjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const core = require('@mantine/core');
|
|
7
|
-
|
|
8
|
-
const useBreakpoint = (breakpoint) => {
|
|
9
|
-
const result = core.useMatches({
|
|
10
|
-
[breakpoint]: true
|
|
11
|
-
});
|
|
12
|
-
return !!result;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
exports.useBreakpoint = useBreakpoint;
|
package/dist/index41.cjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const useOnScrollProgress = require('./index42.cjs');
|
|
7
|
-
|
|
8
|
-
const useFetchNextPageOnScroll = ({
|
|
9
|
-
infinity,
|
|
10
|
-
scrollRef,
|
|
11
|
-
disabled = false
|
|
12
|
-
}) => {
|
|
13
|
-
useOnScrollProgress.useOnScrollProgress({
|
|
14
|
-
triggerPercentage: 0.9,
|
|
15
|
-
callback: () => {
|
|
16
|
-
if (infinity.hasNextPage) infinity.fetchNextPage();
|
|
17
|
-
},
|
|
18
|
-
scrollRef,
|
|
19
|
-
disabled
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
exports.useFetchNextPageOnScroll = useFetchNextPageOnScroll;
|
package/dist/index42.cjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const react = require('react');
|
|
7
|
-
|
|
8
|
-
const useOnScrollProgress = ({
|
|
9
|
-
triggerPercentage,
|
|
10
|
-
callback,
|
|
11
|
-
scrollRef,
|
|
12
|
-
disabled = false
|
|
13
|
-
}) => {
|
|
14
|
-
if (triggerPercentage < 0 || triggerPercentage > 1)
|
|
15
|
-
throw new Error("El porcentaje debe estar entre 0 y 1");
|
|
16
|
-
react.useEffect(() => {
|
|
17
|
-
if (disabled || scrollRef && scrollRef.current === null) return;
|
|
18
|
-
let hasTriggered = false;
|
|
19
|
-
const handleScroll = () => {
|
|
20
|
-
const el = scrollRef?.current;
|
|
21
|
-
const target = el ?? document.documentElement;
|
|
22
|
-
const scrollHeight = target.scrollHeight - target.clientHeight;
|
|
23
|
-
const scrollTop = el ? target.scrollTop : window.scrollY;
|
|
24
|
-
const scrollProgress = scrollHeight > 0 ? Math.min(1, scrollTop / scrollHeight) : 0;
|
|
25
|
-
if (!hasTriggered && scrollProgress >= triggerPercentage) {
|
|
26
|
-
callback();
|
|
27
|
-
hasTriggered = true;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const scrollTarget = scrollRef?.current ?? window;
|
|
31
|
-
scrollTarget.addEventListener("scroll", handleScroll);
|
|
32
|
-
handleScroll();
|
|
33
|
-
return () => {
|
|
34
|
-
scrollTarget.removeEventListener("scroll", handleScroll);
|
|
35
|
-
};
|
|
36
|
-
}, [triggerPercentage, callback, scrollRef, disabled]);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
exports.useOnScrollProgress = useOnScrollProgress;
|
package/dist/index43.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const navigation = require('next/navigation');
|
|
7
|
-
|
|
8
|
-
const useUpdateSearchParams = () => {
|
|
9
|
-
const searchParams = navigation.useSearchParams();
|
|
10
|
-
const updateSearchParams = (newSearchparams) => {
|
|
11
|
-
const params = new URLSearchParams(searchParams.toString());
|
|
12
|
-
Object.entries(newSearchparams).forEach(([key, value]) => {
|
|
13
|
-
if (value === null) {
|
|
14
|
-
params.delete(key);
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
params.set(key, String(value));
|
|
18
|
-
});
|
|
19
|
-
window?.history?.pushState(null, "", `?${params.toString()}`);
|
|
20
|
-
};
|
|
21
|
-
return { updateSearchParams, searchParams };
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
exports.useUpdateSearchParams = useUpdateSearchParams;
|
package/dist/index44.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const breakpointsWithPx = {
|
|
6
|
-
xs: "576px",
|
|
7
|
-
sm: "640px",
|
|
8
|
-
md: "768px",
|
|
9
|
-
lg: "1024px",
|
|
10
|
-
xl: "1280px",
|
|
11
|
-
["2xl"]: "1536px"
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
exports.breakpointsWithPx = breakpointsWithPx;
|
package/dist/index45.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const toTailwindColors = (colors) => Object.entries(colors).reduce(
|
|
6
|
-
(acc, [key, value]) => {
|
|
7
|
-
acc[key] = value.reduce(
|
|
8
|
-
(acc2, color, index) => {
|
|
9
|
-
acc2[index] = color;
|
|
10
|
-
return acc2;
|
|
11
|
-
},
|
|
12
|
-
{}
|
|
13
|
-
);
|
|
14
|
-
return acc;
|
|
15
|
-
},
|
|
16
|
-
{}
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
exports.toTailwindColors = toTailwindColors;
|