ingeniuscliq-core 0.2.28 → 0.2.30

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.
@@ -1,3 +1,4 @@
1
+ import { InputExtendedProps } from '../../ui/input';
1
2
  import { BaseStyleProps } from '../../../types/ui/main';
2
3
  import { Control, FieldValues, Path } from 'react-hook-form';
3
4
  declare enum SUPPORTED_INPUT_TYPES {
@@ -11,7 +12,7 @@ interface FormInputProps<T extends FieldValues = FieldValues> extends BaseStyleP
11
12
  readonly name: Path<T>;
12
13
  readonly placeholder?: string;
13
14
  readonly type?: keyof typeof SUPPORTED_INPUT_TYPES;
14
- readonly inputProps?: T;
15
+ readonly inputProps?: React.ComponentProps<"input"> & InputExtendedProps;
15
16
  }
16
17
  export declare function FormInput<T extends FieldValues = FieldValues>({ control, name, placeholder, type, className, inputProps }: FormInputProps<T>): import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- interface InputExtendedProps {
2
+ export interface InputExtendedProps {
3
3
  withoutShadow?: boolean;
4
4
  outlined?: boolean;
5
5
  }
@@ -1,6 +1,8 @@
1
1
  export type SUPPORTED_LANGUAGES = 'es' | 'en';
2
2
  export declare function useLanguage(lang?: SUPPORTED_LANGUAGES): {
3
3
  t: import('i18next').TFunction<"translation", undefined>;
4
+ language: string;
4
5
  i18n: import('i18next').i18n;
6
+ setLanguage: (newLang?: SUPPORTED_LANGUAGES) => void;
5
7
  toggleLanguage: () => void;
6
8
  };
package/dist/index.js CHANGED
@@ -1748,12 +1748,12 @@ const {
1748
1748
  formToJSON: B5,
1749
1749
  getAdapter: z5,
1750
1750
  mergeConfig: W5
1751
- } = Xe, kl = "http://localhost:8000", Ki = (e = !1) => {
1751
+ } = Xe, kl = "undefined://undefined", Ki = (e = !1) => {
1752
1752
  if (typeof window > "u")
1753
1753
  return kl;
1754
1754
  let t = kl;
1755
- return e && (t = `${t}/api/`), t;
1756
- }, V5 = () => window.location.host === "localhost:8000", gr = Xe.create({
1755
+ return e && (t = `${t}/undefined/`), t;
1756
+ }, V5 = () => window.location.host === void 0, gr = Xe.create({
1757
1757
  baseURL: Ki(),
1758
1758
  withCredentials: !0,
1759
1759
  headers: {
@@ -5657,12 +5657,14 @@ function w1({ className: e, ...t }) {
5657
5657
  }
5658
5658
  function kn(e = "es") {
5659
5659
  const { t, i18n: n } = Rv(), r = () => {
5660
- const o = n.language === "en" ? "es" : "en";
5661
- n.changeLanguage(o);
5660
+ const a = n.language === "en" ? "es" : "en";
5661
+ n.changeLanguage(a);
5662
+ }, o = (a = "es") => {
5663
+ n.changeLanguage(a);
5662
5664
  };
5663
5665
  return gn(() => {
5664
5666
  n.changeLanguage(e);
5665
- }, []), { t, i18n: n, toggleLanguage: r };
5667
+ }, []), { t, language: n.language, i18n: n, setLanguage: o, toggleLanguage: r };
5666
5668
  }
5667
5669
  function Nf({ control: e, name: t, label: n, render: r, className: o = "", withinLabel: a = !1, withinMessage: s = !1 }) {
5668
5670
  const { t: i } = kn();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.2.28",
3
+ "version": "0.2.30",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",