lawgic-dev-kit 0.8.2 → 0.8.8

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.
Files changed (39) hide show
  1. package/dist/_virtual/index2.js +3 -2
  2. package/dist/_virtual/index3.js +3 -2
  3. package/dist/_virtual/index4.js +5 -3
  4. package/dist/_virtual/index5.js +2 -3
  5. package/dist/_virtual/index6.js +2 -5
  6. package/dist/components/atoms/Avatar/Avatar.js +3 -2
  7. package/dist/components/atoms/Checkbox/Checkbox.d.ts +7 -2
  8. package/dist/components/atoms/CountryLabel/CountryLabel.js +32 -0
  9. package/dist/components/atoms/PhoneInput/PhoneInput.js +282 -0
  10. package/dist/components/atoms/TextInput/TextInput.js +38 -38
  11. package/dist/components/atoms/TextInput/TextInput.types.d.ts +1 -0
  12. package/dist/components/atoms/UploadContainer/UploadContainer.js +14 -13
  13. package/dist/components/atoms/index.d.ts +3 -0
  14. package/dist/components/molecules/AlertModal/AlertModal.js +7 -6
  15. package/dist/components/molecules/CalendarSelector/CalendarSelector.d.ts +1 -0
  16. package/dist/components/molecules/CalendarSelector/CalendarSelector.js +166 -106
  17. package/dist/components/molecules/DateInput/DateInput.js +8 -7
  18. package/dist/components/molecules/DialogModal/DialogModal.js +3 -2
  19. package/dist/components/molecules/Dropdown/Dropdown.js +22 -21
  20. package/dist/components/molecules/Dropdown/Dropdown.types.d.ts +2 -0
  21. package/dist/components/molecules/FloatingMenu/FloatingMenu.js +6 -5
  22. package/dist/components/molecules/Tabs/Tabs.d.ts +2 -1
  23. package/dist/components/molecules/Tabs/Tabs.js +19 -17
  24. package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +5 -7
  25. package/dist/constants/countries.js +1749 -0
  26. package/dist/index.js +61 -57
  27. package/dist/lawgic-dev-kit.css +1 -1
  28. package/dist/lawgic-dev-kit.umd.js +161 -162
  29. package/dist/node_modules/prop-types/index.js +1 -1
  30. package/dist/node_modules/scheduler/index.js +1 -1
  31. package/dist/node_modules/yup/index.esm.js +3 -3
  32. package/dist/src/components/atoms/TextInput/TextInput.types.d.ts +12 -0
  33. package/dist/utils/modal.js +18 -17
  34. package/dist/utils/toast.js +3 -2
  35. package/package.json +1 -1
  36. package/dist/components/atoms/Logo/Logo.d.ts +0 -3
  37. package/dist/components/atoms/Logo/Slogan.d.ts +0 -3
  38. package/dist/src/components/atoms/Tab/Tab.d.ts +0 -3
  39. package/dist/src/components/molecules/Tabs/Tabs.d.ts +0 -19
@@ -1,4 +1,4 @@
1
- import { __module as r } from "../../_virtual/index2.js";
1
+ import { __module as r } from "../../_virtual/index6.js";
2
2
  import { __require as s } from "./node_modules/react-is/index.js";
3
3
  import { __require as t } from "./factoryWithTypeCheckers.js";
4
4
  import { __require as p } from "./factoryWithThrowingShims.js";
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../_virtual/index3.js";
1
+ import { __module as e } from "../../_virtual/index5.js";
2
2
  import { __require as o } from "./cjs/scheduler.production.js";
3
3
  import { __require as u } from "./cjs/scheduler.development.js";
4
4
  var r;
@@ -1,6 +1,6 @@
1
- import { p as v } from "../../_virtual/index4.js";
2
- import { t as U } from "../../_virtual/index5.js";
3
- import oe from "../../_virtual/index6.js";
1
+ import { p as v } from "../../_virtual/index2.js";
2
+ import { t as U } from "../../_virtual/index3.js";
3
+ import oe from "../../_virtual/index4.js";
4
4
  const ce = Object.prototype.toString, he = Error.prototype.toString, fe = RegExp.prototype.toString, de = typeof Symbol < "u" ? Symbol.prototype.toString : () => "", pe = /^Symbol\((.*)\)(.*)$/;
5
5
  function me(n) {
6
6
  return n != +n ? "NaN" : n === 0 && 1 / n < 0 ? "-0" : "" + n;
@@ -0,0 +1,12 @@
1
+ import { Control, FieldValues, Path } from "react-hook-form";
2
+ export type TextInputProps<T extends FieldValues = FieldValues> = {
3
+ label: string;
4
+ placeholder?: string;
5
+ className?: string;
6
+ disabled?: boolean;
7
+ translateKey?: string;
8
+ control: Control<T>;
9
+ name: Path<T>;
10
+ leftSide?: React.ReactNode;
11
+ rightSide?: React.ReactNode;
12
+ } & React.InputHTMLAttributes<HTMLInputElement>;
@@ -1,4 +1,4 @@
1
- import { j as c } from "../_virtual/jsx-runtime.js";
1
+ import { j as i } from "../_virtual/jsx-runtime.js";
2
2
  import { l as u } from "../_virtual/lodash.js";
3
3
  import { useState as l, useRef as a, useCallback as d, useEffect as f } from "react";
4
4
  import M from "../components/molecules/AlertModal/AlertModal.js";
@@ -7,8 +7,9 @@ import "react-dom";
7
7
  import "../providers/ThemeProvider.js";
8
8
  import w from "../components/atoms/CenterModal/CenterModal.js";
9
9
  import "../components/atoms/ImageProfileInput/ImageProfileInput.validators.js";
10
- import x from "../components/molecules/DialogModal/DialogModal.js";
11
- const I = () => {
10
+ import "../constants/countries.js";
11
+ import m from "../components/molecules/DialogModal/DialogModal.js";
12
+ const b = () => {
12
13
  const [p, n] = l([]), t = a([]), s = d((e) => {
13
14
  const r = {
14
15
  ...e,
@@ -33,13 +34,13 @@ const I = () => {
33
34
  }, []);
34
35
  return f(() => {
35
36
  window.openModal = s, window.closeModal = o;
36
- }, [s, o]), /* @__PURE__ */ c.jsx(c.Fragment, { children: p.map((e) => {
37
+ }, [s, o]), /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e) => {
37
38
  if (e.type === "dialog") {
38
- const { props: i } = e;
39
- return /* @__PURE__ */ c.jsx(
40
- x,
39
+ const { props: c } = e;
40
+ return /* @__PURE__ */ i.jsx(
41
+ m,
41
42
  {
42
- ...i,
43
+ ...c,
43
44
  open: e.open,
44
45
  onClose: () => o(e.id)
45
46
  },
@@ -47,11 +48,11 @@ const I = () => {
47
48
  );
48
49
  }
49
50
  if (e.type === "alert") {
50
- const { props: i } = e;
51
- return /* @__PURE__ */ c.jsx(
51
+ const { props: c } = e;
52
+ return /* @__PURE__ */ i.jsx(
52
53
  M,
53
54
  {
54
- ...i,
55
+ ...c,
55
56
  open: e.open,
56
57
  onClose: () => o(e.id)
57
58
  },
@@ -59,7 +60,7 @@ const I = () => {
59
60
  );
60
61
  }
61
62
  const { props: r } = e;
62
- return /* @__PURE__ */ c.jsx(
63
+ return /* @__PURE__ */ i.jsx(
63
64
  w,
64
65
  {
65
66
  ...r,
@@ -71,16 +72,16 @@ const I = () => {
71
72
  );
72
73
  }) });
73
74
  };
74
- function b(p) {
75
+ function k(p) {
75
76
  var n;
76
77
  (n = window == null ? void 0 : window.openModal) == null || n.call(window, p);
77
78
  }
78
- function k(p) {
79
+ function A(p) {
79
80
  var n;
80
81
  (n = window == null ? void 0 : window.closeModal) == null || n.call(window, p);
81
82
  }
82
83
  export {
83
- I as ModalContainer,
84
- k as closeModal,
85
- b as openModal
84
+ b as ModalContainer,
85
+ A as closeModal,
86
+ k as openModal
86
87
  };
@@ -7,6 +7,7 @@ import "../_virtual/lodash.js";
7
7
  import "../providers/ThemeProvider.js";
8
8
  import "../components/atoms/ImageProfileInput/ImageProfileInput.validators.js";
9
9
  import E from "../components/atoms/Toast/Toast.js";
10
+ import "../constants/countries.js";
10
11
  const f = [];
11
12
  function p(t = "bottom-center") {
12
13
  var s;
@@ -120,7 +121,7 @@ const b = (t, s, e = {}) => {
120
121
  resolve: e,
121
122
  reject: n
122
123
  };
123
- }, F = {
124
+ }, N = {
124
125
  success: (t, s = {}) => m(t, "success", s),
125
126
  error: (t, s = {}) => m(t, "error", s),
126
127
  warning: (t, s = {}) => m(t, "warning", s),
@@ -131,5 +132,5 @@ const b = (t, s, e = {}) => {
131
132
  export {
132
133
  b as showToastAsync,
133
134
  L as showToastLoading,
134
- F as toast
135
+ N as toast
135
136
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lawgic-dev-kit",
3
- "version": "0.8.2",
3
+ "version": "0.8.8",
4
4
  "description": "Componentes de UI para Lawgic",
5
5
  "type": "module",
6
6
  "private": false,
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- declare const Logo: React.FC<React.SVGProps<SVGSVGElement>>;
3
- export default Logo;
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- declare const Slogan: React.FC<React.SVGProps<SVGSVGElement>>;
3
- export default Slogan;
@@ -1,3 +0,0 @@
1
- import TabProps from "./Tab.types";
2
- declare const Tab: ({ label, icon, isSelected, onClick, variant, direction, }: TabProps) => import("react/jsx-runtime").JSX.Element;
3
- export default Tab;
@@ -1,19 +0,0 @@
1
- import { IconProp } from "@fortawesome/fontawesome-svg-core";
2
- import { Tab } from "../../atoms";
3
- interface Tab {
4
- id: string | number;
5
- label: string;
6
- icon: IconProp;
7
- href?: string;
8
- }
9
- interface TabsProps {
10
- variant?: "default" | "underline";
11
- tabs: Tab[];
12
- activeTab: string | number;
13
- onTabChange: (tab: string | number) => void;
14
- direction?: "row" | "col";
15
- className?: string;
16
- showLabel?: boolean;
17
- }
18
- declare const Tabs: ({ variant, tabs, activeTab, onTabChange, className, direction, showLabel, }: TabsProps) => import("react/jsx-runtime").JSX.Element;
19
- export default Tabs;