@visiion/forms-library 1.1.5 → 1.2.0
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/Forms/GenericForm.d.ts +1 -0
- package/dist/contexts/MiDtContext.d.ts +5 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +67 -57
- package/dist/index.js +66 -57
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -2
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { Region, Comuna } from "../utils/Common";
|
|
3
2
|
interface MiDtData {
|
|
4
3
|
allData: {
|
|
@@ -8,14 +7,10 @@ interface MiDtData {
|
|
|
8
7
|
};
|
|
9
8
|
};
|
|
10
9
|
}
|
|
11
|
-
interface
|
|
10
|
+
interface MiDtStore {
|
|
12
11
|
miDtData: MiDtData;
|
|
12
|
+
setMiDtData: (data: MiDtData) => void;
|
|
13
|
+
resetMiDtData: () => void;
|
|
13
14
|
}
|
|
14
|
-
declare const
|
|
15
|
-
export
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
regiones?: Region[];
|
|
18
|
-
comunas?: Comuna[];
|
|
19
|
-
}>;
|
|
20
|
-
export declare const useMiDt: () => MiDtContextType;
|
|
21
|
-
export default MiDtContext;
|
|
15
|
+
export declare const useMiDt: import("zustand").UseBoundStore<import("zustand").StoreApi<MiDtStore>>;
|
|
16
|
+
export default useMiDt;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { GenericForm } from "./components/Forms";
|
|
|
2
2
|
export { TextInput, SelectInput, RadioInput, CheckboxInput, TextareaInput, RutInput, AddressInput, Alert, DynamicInput, InputWrapper, StatusScreen, SwornDeclaration, DatePicker, SubtitleInput, } from "./components/Inputs";
|
|
3
3
|
export { NavigationButton, TextInputField, RadioOption, } from "./components/Common";
|
|
4
4
|
export { GoogleMaps } from "./components/Inputs/GoogleMaps";
|
|
5
|
-
export {
|
|
5
|
+
export { useMiDt } from "./contexts/MiDtContext";
|
|
6
6
|
export { Flowbite } from "flowbite-react";
|
|
7
7
|
export type { CustomFlowbiteTheme } from "flowbite-react";
|
|
8
8
|
export type { IFormField, IFormConfig, IStepProps, ResponseOnSearch, NavigationButtonProps, DynamicInputProps, InputWrapperProps, StepperContextType, ValidationRule, CommonValidations, } from "./types";
|
package/dist/index.esm.js
CHANGED
|
@@ -34004,63 +34004,60 @@ _defineProperty(Autocomplete, "defaultProps", {
|
|
|
34004
34004
|
});
|
|
34005
34005
|
_defineProperty(Autocomplete, "contextType", MapContext);
|
|
34006
34006
|
|
|
34007
|
-
|
|
34008
|
-
|
|
34009
|
-
|
|
34010
|
-
|
|
34011
|
-
|
|
34012
|
-
|
|
34013
|
-
|
|
34014
|
-
|
|
34015
|
-
|
|
34016
|
-
|
|
34017
|
-
|
|
34018
|
-
|
|
34019
|
-
|
|
34020
|
-
|
|
34021
|
-
|
|
34022
|
-
|
|
34023
|
-
|
|
34024
|
-
|
|
34025
|
-
|
|
34026
|
-
|
|
34027
|
-
|
|
34028
|
-
|
|
34029
|
-
|
|
34030
|
-
|
|
34031
|
-
|
|
34032
|
-
|
|
34033
|
-
|
|
34007
|
+
const createStoreImpl = (createState) => {
|
|
34008
|
+
let state;
|
|
34009
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
34010
|
+
const setState = (partial, replace) => {
|
|
34011
|
+
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
34012
|
+
if (!Object.is(nextState, state)) {
|
|
34013
|
+
const previousState = state;
|
|
34014
|
+
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
34015
|
+
listeners.forEach((listener) => listener(state, previousState));
|
|
34016
|
+
}
|
|
34017
|
+
};
|
|
34018
|
+
const getState = () => state;
|
|
34019
|
+
const getInitialState = () => initialState;
|
|
34020
|
+
const subscribe = (listener) => {
|
|
34021
|
+
listeners.add(listener);
|
|
34022
|
+
return () => listeners.delete(listener);
|
|
34023
|
+
};
|
|
34024
|
+
const api = { setState, getState, getInitialState, subscribe };
|
|
34025
|
+
const initialState = state = createState(setState, getState, api);
|
|
34026
|
+
return api;
|
|
34027
|
+
};
|
|
34028
|
+
const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
34029
|
+
|
|
34030
|
+
const identity = (arg) => arg;
|
|
34031
|
+
function useStore(api, selector = identity) {
|
|
34032
|
+
const slice = React__default.useSyncExternalStore(
|
|
34033
|
+
api.subscribe,
|
|
34034
|
+
() => selector(api.getState()),
|
|
34035
|
+
() => selector(api.getInitialState())
|
|
34036
|
+
);
|
|
34037
|
+
React__default.useDebugValue(slice);
|
|
34038
|
+
return slice;
|
|
34039
|
+
}
|
|
34040
|
+
const createImpl = (createState) => {
|
|
34041
|
+
const api = createStore(createState);
|
|
34042
|
+
const useBoundStore = (selector) => useStore(api, selector);
|
|
34043
|
+
Object.assign(useBoundStore, api);
|
|
34044
|
+
return useBoundStore;
|
|
34045
|
+
};
|
|
34046
|
+
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
34047
|
+
|
|
34034
34048
|
var defaultMiDtData = {
|
|
34035
34049
|
allData: {
|
|
34036
34050
|
metadata: {
|
|
34037
|
-
Regiones:
|
|
34038
|
-
Comunas:
|
|
34051
|
+
Regiones: [],
|
|
34052
|
+
Comunas: [],
|
|
34039
34053
|
},
|
|
34040
34054
|
},
|
|
34041
34055
|
};
|
|
34042
|
-
var
|
|
34056
|
+
var useMiDt = create(function (set) { return ({
|
|
34043
34057
|
miDtData: defaultMiDtData,
|
|
34044
|
-
});
|
|
34045
|
-
|
|
34046
|
-
|
|
34047
|
-
var miDtData = {
|
|
34048
|
-
allData: {
|
|
34049
|
-
metadata: {
|
|
34050
|
-
Regiones: regiones || defaultRegiones,
|
|
34051
|
-
Comunas: comunas || defaultComunas,
|
|
34052
|
-
},
|
|
34053
|
-
},
|
|
34054
|
-
};
|
|
34055
|
-
return (jsx(MiDtContext.Provider, { value: { miDtData: miDtData }, children: children }));
|
|
34056
|
-
};
|
|
34057
|
-
var useMiDt = function () {
|
|
34058
|
-
var context = useContext(MiDtContext);
|
|
34059
|
-
if (!context) {
|
|
34060
|
-
throw new Error("useMiDt must be used within a MiDtProvider");
|
|
34061
|
-
}
|
|
34062
|
-
return context;
|
|
34063
|
-
};
|
|
34058
|
+
setMiDtData: function (data) { return set({ miDtData: data }); },
|
|
34059
|
+
resetMiDtData: function () { return set({ miDtData: defaultMiDtData }); },
|
|
34060
|
+
}); });
|
|
34064
34061
|
|
|
34065
34062
|
var Common = /** @class */ (function () {
|
|
34066
34063
|
function Common() {
|
|
@@ -34112,7 +34109,7 @@ var center = {
|
|
|
34112
34109
|
};
|
|
34113
34110
|
var AddressInput = function (_a) {
|
|
34114
34111
|
var field = _a.field, value = _a.value, onChange = _a.onChange, error = _a.error, onSearch = _a.onSearch, _b = _a.showMap, showMap = _b === void 0 ? true : _b, _c = _a.mapHeight, mapHeight = _c === void 0 ? "h-80" : _c;
|
|
34115
|
-
var miDtData =
|
|
34112
|
+
var miDtData = useMiDt().miDtData;
|
|
34116
34113
|
var _d = useState(null), autocomplete = _d[0], setAutocomplete = _d[1];
|
|
34117
34114
|
var _e = useState(center), location = _e[0], setLocation = _e[1];
|
|
34118
34115
|
var mapRef = useRef(null);
|
|
@@ -34283,7 +34280,6 @@ var AddressInput = function (_a) {
|
|
|
34283
34280
|
var libraries = ["places"];
|
|
34284
34281
|
var GoogleMaps = function (_a) {
|
|
34285
34282
|
var children = _a.children, _b = _a.apiKey, apiKey = _b === void 0 ? "" : _b;
|
|
34286
|
-
console.log('apiKey', apiKey);
|
|
34287
34283
|
var _c = useJsApiLoader({
|
|
34288
34284
|
googleMapsApiKey: apiKey,
|
|
34289
34285
|
libraries: libraries,
|
|
@@ -36558,7 +36554,7 @@ var createValidationSchema = function (fields) {
|
|
|
36558
36554
|
var schema = {};
|
|
36559
36555
|
// Filtrar campos válidos antes de procesarlos
|
|
36560
36556
|
var validFields = fields.filter(function (_a) {
|
|
36561
|
-
var _b = _a.validate, validate = _b === void 0 ? true : _b,
|
|
36557
|
+
var _b = _a.validate, validate = _b === void 0 ? true : _b, name = _a.name, type = _a.type;
|
|
36562
36558
|
// Excluir campos que no tienen name o son de tipos especiales
|
|
36563
36559
|
if (!name || ["subtitle", "alert", "status"].includes(type)) {
|
|
36564
36560
|
return false;
|
|
@@ -36674,7 +36670,9 @@ var FormStepper = function (_a) {
|
|
|
36674
36670
|
|
|
36675
36671
|
var GenericForm = function (_a) {
|
|
36676
36672
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
36677
|
-
var config = _a.config, _o = _a.stepperData, stepperData = _o === void 0 ? {} : _o, onStepComplete = _a.onStepComplete, _p = _a.loading, loading = _p === void 0 ? false : _p, _q = _a.className, className = _q === void 0 ? "" : _q, stepperDataKey = _a.stepperDataKey, flowbiteTheme = _a.flowbiteTheme
|
|
36673
|
+
var config = _a.config, _o = _a.stepperData, stepperData = _o === void 0 ? {} : _o, onStepComplete = _a.onStepComplete, _p = _a.loading, loading = _p === void 0 ? false : _p, _q = _a.className, className = _q === void 0 ? "" : _q, stepperDataKey = _a.stepperDataKey, flowbiteTheme = _a.flowbiteTheme, // Nuevo prop
|
|
36674
|
+
allData = _a.allData;
|
|
36675
|
+
var _r = useMiDt(); _r.miDtData; var setMiDtData = _r.setMiDtData;
|
|
36678
36676
|
// Función para obtener datos del stepper o valores por defecto
|
|
36679
36677
|
var getFieldValue = function (field) {
|
|
36680
36678
|
// Prioridad 1: Valor por defecto del campo (máxima prioridad)
|
|
@@ -36707,8 +36705,20 @@ var GenericForm = function (_a) {
|
|
|
36707
36705
|
}
|
|
36708
36706
|
return initialData;
|
|
36709
36707
|
};
|
|
36710
|
-
var
|
|
36711
|
-
var
|
|
36708
|
+
var _s = useState(getInitialFormData), formData = _s[0], setFormData = _s[1];
|
|
36709
|
+
var _t = useState({}), errors = _t[0], setErrors = _t[1];
|
|
36710
|
+
useEffect(function () {
|
|
36711
|
+
if (allData) {
|
|
36712
|
+
setMiDtData({
|
|
36713
|
+
allData: {
|
|
36714
|
+
metadata: {
|
|
36715
|
+
Regiones: allData.metadata.Regiones,
|
|
36716
|
+
Comunas: allData.metadata.Comunas,
|
|
36717
|
+
},
|
|
36718
|
+
},
|
|
36719
|
+
});
|
|
36720
|
+
}
|
|
36721
|
+
}, [allData]);
|
|
36712
36722
|
// Sincronizar formData cuando cambie stepperData
|
|
36713
36723
|
useEffect(function () {
|
|
36714
36724
|
if (stepperData && Array.isArray(config.fields)) {
|
|
@@ -36848,4 +36858,4 @@ var GenericForm = function (_a) {
|
|
|
36848
36858
|
return formContent;
|
|
36849
36859
|
};
|
|
36850
36860
|
|
|
36851
|
-
export { AddressInput, Alert, CheckboxInput, Common, DatePicker, DynamicInput, Flowbite, GenericForm, GoogleMaps, InputWrapper,
|
|
36861
|
+
export { AddressInput, Alert, CheckboxInput, Common, DatePicker, DynamicInput, Flowbite, GenericForm, GoogleMaps, InputWrapper, NavigationButton, RadioInput, RadioOption, RutInput, SelectInput, StatusScreen, SubtitleInput, SwornDeclaration, TextInput, TextInputField, TextareaInput, clean as cleanRut, commonValidations, createValidationSchema, formatRut, maskRut, useMiDt, validateOnlyNumbersAndLetters, validate as validateRut };
|
package/dist/index.js
CHANGED
|
@@ -34024,63 +34024,60 @@ _defineProperty(Autocomplete, "defaultProps", {
|
|
|
34024
34024
|
});
|
|
34025
34025
|
_defineProperty(Autocomplete, "contextType", MapContext);
|
|
34026
34026
|
|
|
34027
|
-
|
|
34028
|
-
|
|
34029
|
-
|
|
34030
|
-
|
|
34031
|
-
|
|
34032
|
-
|
|
34033
|
-
|
|
34034
|
-
|
|
34035
|
-
|
|
34036
|
-
|
|
34037
|
-
|
|
34038
|
-
|
|
34039
|
-
|
|
34040
|
-
|
|
34041
|
-
|
|
34042
|
-
|
|
34043
|
-
|
|
34044
|
-
|
|
34045
|
-
|
|
34046
|
-
|
|
34047
|
-
|
|
34048
|
-
|
|
34049
|
-
|
|
34050
|
-
|
|
34051
|
-
|
|
34052
|
-
|
|
34053
|
-
|
|
34027
|
+
const createStoreImpl = (createState) => {
|
|
34028
|
+
let state;
|
|
34029
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
34030
|
+
const setState = (partial, replace) => {
|
|
34031
|
+
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
34032
|
+
if (!Object.is(nextState, state)) {
|
|
34033
|
+
const previousState = state;
|
|
34034
|
+
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
34035
|
+
listeners.forEach((listener) => listener(state, previousState));
|
|
34036
|
+
}
|
|
34037
|
+
};
|
|
34038
|
+
const getState = () => state;
|
|
34039
|
+
const getInitialState = () => initialState;
|
|
34040
|
+
const subscribe = (listener) => {
|
|
34041
|
+
listeners.add(listener);
|
|
34042
|
+
return () => listeners.delete(listener);
|
|
34043
|
+
};
|
|
34044
|
+
const api = { setState, getState, getInitialState, subscribe };
|
|
34045
|
+
const initialState = state = createState(setState, getState, api);
|
|
34046
|
+
return api;
|
|
34047
|
+
};
|
|
34048
|
+
const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
34049
|
+
|
|
34050
|
+
const identity = (arg) => arg;
|
|
34051
|
+
function useStore(api, selector = identity) {
|
|
34052
|
+
const slice = React.useSyncExternalStore(
|
|
34053
|
+
api.subscribe,
|
|
34054
|
+
() => selector(api.getState()),
|
|
34055
|
+
() => selector(api.getInitialState())
|
|
34056
|
+
);
|
|
34057
|
+
React.useDebugValue(slice);
|
|
34058
|
+
return slice;
|
|
34059
|
+
}
|
|
34060
|
+
const createImpl = (createState) => {
|
|
34061
|
+
const api = createStore(createState);
|
|
34062
|
+
const useBoundStore = (selector) => useStore(api, selector);
|
|
34063
|
+
Object.assign(useBoundStore, api);
|
|
34064
|
+
return useBoundStore;
|
|
34065
|
+
};
|
|
34066
|
+
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
34067
|
+
|
|
34054
34068
|
var defaultMiDtData = {
|
|
34055
34069
|
allData: {
|
|
34056
34070
|
metadata: {
|
|
34057
|
-
Regiones:
|
|
34058
|
-
Comunas:
|
|
34071
|
+
Regiones: [],
|
|
34072
|
+
Comunas: [],
|
|
34059
34073
|
},
|
|
34060
34074
|
},
|
|
34061
34075
|
};
|
|
34062
|
-
var
|
|
34076
|
+
var useMiDt = create(function (set) { return ({
|
|
34063
34077
|
miDtData: defaultMiDtData,
|
|
34064
|
-
});
|
|
34065
|
-
|
|
34066
|
-
|
|
34067
|
-
var miDtData = {
|
|
34068
|
-
allData: {
|
|
34069
|
-
metadata: {
|
|
34070
|
-
Regiones: regiones || defaultRegiones,
|
|
34071
|
-
Comunas: comunas || defaultComunas,
|
|
34072
|
-
},
|
|
34073
|
-
},
|
|
34074
|
-
};
|
|
34075
|
-
return (jsxRuntime.jsx(MiDtContext.Provider, { value: { miDtData: miDtData }, children: children }));
|
|
34076
|
-
};
|
|
34077
|
-
var useMiDt = function () {
|
|
34078
|
-
var context = React.useContext(MiDtContext);
|
|
34079
|
-
if (!context) {
|
|
34080
|
-
throw new Error("useMiDt must be used within a MiDtProvider");
|
|
34081
|
-
}
|
|
34082
|
-
return context;
|
|
34083
|
-
};
|
|
34078
|
+
setMiDtData: function (data) { return set({ miDtData: data }); },
|
|
34079
|
+
resetMiDtData: function () { return set({ miDtData: defaultMiDtData }); },
|
|
34080
|
+
}); });
|
|
34084
34081
|
|
|
34085
34082
|
var Common = /** @class */ (function () {
|
|
34086
34083
|
function Common() {
|
|
@@ -34132,7 +34129,7 @@ var center = {
|
|
|
34132
34129
|
};
|
|
34133
34130
|
var AddressInput = function (_a) {
|
|
34134
34131
|
var field = _a.field, value = _a.value, onChange = _a.onChange, error = _a.error, onSearch = _a.onSearch, _b = _a.showMap, showMap = _b === void 0 ? true : _b, _c = _a.mapHeight, mapHeight = _c === void 0 ? "h-80" : _c;
|
|
34135
|
-
var miDtData =
|
|
34132
|
+
var miDtData = useMiDt().miDtData;
|
|
34136
34133
|
var _d = React.useState(null), autocomplete = _d[0], setAutocomplete = _d[1];
|
|
34137
34134
|
var _e = React.useState(center), location = _e[0], setLocation = _e[1];
|
|
34138
34135
|
var mapRef = React.useRef(null);
|
|
@@ -34303,7 +34300,6 @@ var AddressInput = function (_a) {
|
|
|
34303
34300
|
var libraries = ["places"];
|
|
34304
34301
|
var GoogleMaps = function (_a) {
|
|
34305
34302
|
var children = _a.children, _b = _a.apiKey, apiKey = _b === void 0 ? "" : _b;
|
|
34306
|
-
console.log('apiKey', apiKey);
|
|
34307
34303
|
var _c = useJsApiLoader({
|
|
34308
34304
|
googleMapsApiKey: apiKey,
|
|
34309
34305
|
libraries: libraries,
|
|
@@ -36578,7 +36574,7 @@ var createValidationSchema = function (fields) {
|
|
|
36578
36574
|
var schema = {};
|
|
36579
36575
|
// Filtrar campos válidos antes de procesarlos
|
|
36580
36576
|
var validFields = fields.filter(function (_a) {
|
|
36581
|
-
var _b = _a.validate, validate = _b === void 0 ? true : _b,
|
|
36577
|
+
var _b = _a.validate, validate = _b === void 0 ? true : _b, name = _a.name, type = _a.type;
|
|
36582
36578
|
// Excluir campos que no tienen name o son de tipos especiales
|
|
36583
36579
|
if (!name || ["subtitle", "alert", "status"].includes(type)) {
|
|
36584
36580
|
return false;
|
|
@@ -36694,7 +36690,9 @@ var FormStepper = function (_a) {
|
|
|
36694
36690
|
|
|
36695
36691
|
var GenericForm = function (_a) {
|
|
36696
36692
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
36697
|
-
var config = _a.config, _o = _a.stepperData, stepperData = _o === void 0 ? {} : _o, onStepComplete = _a.onStepComplete, _p = _a.loading, loading = _p === void 0 ? false : _p, _q = _a.className, className = _q === void 0 ? "" : _q, stepperDataKey = _a.stepperDataKey, flowbiteTheme = _a.flowbiteTheme
|
|
36693
|
+
var config = _a.config, _o = _a.stepperData, stepperData = _o === void 0 ? {} : _o, onStepComplete = _a.onStepComplete, _p = _a.loading, loading = _p === void 0 ? false : _p, _q = _a.className, className = _q === void 0 ? "" : _q, stepperDataKey = _a.stepperDataKey, flowbiteTheme = _a.flowbiteTheme, // Nuevo prop
|
|
36694
|
+
allData = _a.allData;
|
|
36695
|
+
var _r = useMiDt(); _r.miDtData; var setMiDtData = _r.setMiDtData;
|
|
36698
36696
|
// Función para obtener datos del stepper o valores por defecto
|
|
36699
36697
|
var getFieldValue = function (field) {
|
|
36700
36698
|
// Prioridad 1: Valor por defecto del campo (máxima prioridad)
|
|
@@ -36727,8 +36725,20 @@ var GenericForm = function (_a) {
|
|
|
36727
36725
|
}
|
|
36728
36726
|
return initialData;
|
|
36729
36727
|
};
|
|
36730
|
-
var
|
|
36731
|
-
var
|
|
36728
|
+
var _s = React.useState(getInitialFormData), formData = _s[0], setFormData = _s[1];
|
|
36729
|
+
var _t = React.useState({}), errors = _t[0], setErrors = _t[1];
|
|
36730
|
+
React.useEffect(function () {
|
|
36731
|
+
if (allData) {
|
|
36732
|
+
setMiDtData({
|
|
36733
|
+
allData: {
|
|
36734
|
+
metadata: {
|
|
36735
|
+
Regiones: allData.metadata.Regiones,
|
|
36736
|
+
Comunas: allData.metadata.Comunas,
|
|
36737
|
+
},
|
|
36738
|
+
},
|
|
36739
|
+
});
|
|
36740
|
+
}
|
|
36741
|
+
}, [allData]);
|
|
36732
36742
|
// Sincronizar formData cuando cambie stepperData
|
|
36733
36743
|
React.useEffect(function () {
|
|
36734
36744
|
if (stepperData && Array.isArray(config.fields)) {
|
|
@@ -36878,7 +36888,6 @@ exports.Flowbite = Flowbite;
|
|
|
36878
36888
|
exports.GenericForm = GenericForm;
|
|
36879
36889
|
exports.GoogleMaps = GoogleMaps;
|
|
36880
36890
|
exports.InputWrapper = InputWrapper;
|
|
36881
|
-
exports.MiDtProvider = MiDtProvider;
|
|
36882
36891
|
exports.NavigationButton = NavigationButton;
|
|
36883
36892
|
exports.RadioInput = RadioInput;
|
|
36884
36893
|
exports.RadioOption = RadioOption;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface IFormField {
|
|
3
3
|
id: string;
|
|
4
|
-
name: string
|
|
4
|
+
name: string;
|
|
5
5
|
type: "radio" | "text" | "select" | "textarea" | "checkbox" | "rut" | "address" | "subtitle" | "alert" | "date" | "declaration" | "status";
|
|
6
6
|
label: string;
|
|
7
7
|
value?: string | number | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visiion/forms-library",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Librería de componentes de formularios reutilizables",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"flowbite-react": "0.10.1",
|
|
41
41
|
"framer-motion": "^11.3.8",
|
|
42
42
|
"react-icons": "^5.5.0",
|
|
43
|
-
"yup": "^1.6.1"
|
|
43
|
+
"yup": "^1.6.1",
|
|
44
|
+
"zustand": "^5.0.6"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@rollup/plugin-commonjs": "^25.0.7",
|