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.
- package/dist/_virtual/index2.js +3 -2
- package/dist/_virtual/index3.js +3 -2
- package/dist/_virtual/index4.js +5 -3
- package/dist/_virtual/index5.js +2 -3
- package/dist/_virtual/index6.js +2 -5
- package/dist/components/atoms/Avatar/Avatar.js +3 -2
- package/dist/components/atoms/Checkbox/Checkbox.d.ts +7 -2
- package/dist/components/atoms/CountryLabel/CountryLabel.js +32 -0
- package/dist/components/atoms/PhoneInput/PhoneInput.js +282 -0
- package/dist/components/atoms/TextInput/TextInput.js +38 -38
- package/dist/components/atoms/TextInput/TextInput.types.d.ts +1 -0
- package/dist/components/atoms/UploadContainer/UploadContainer.js +14 -13
- package/dist/components/atoms/index.d.ts +3 -0
- package/dist/components/molecules/AlertModal/AlertModal.js +7 -6
- package/dist/components/molecules/CalendarSelector/CalendarSelector.d.ts +1 -0
- package/dist/components/molecules/CalendarSelector/CalendarSelector.js +166 -106
- package/dist/components/molecules/DateInput/DateInput.js +8 -7
- package/dist/components/molecules/DialogModal/DialogModal.js +3 -2
- package/dist/components/molecules/Dropdown/Dropdown.js +22 -21
- package/dist/components/molecules/Dropdown/Dropdown.types.d.ts +2 -0
- package/dist/components/molecules/FloatingMenu/FloatingMenu.js +6 -5
- package/dist/components/molecules/Tabs/Tabs.d.ts +2 -1
- package/dist/components/molecules/Tabs/Tabs.js +19 -17
- package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +5 -7
- package/dist/constants/countries.js +1749 -0
- package/dist/index.js +61 -57
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +161 -162
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/scheduler/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +3 -3
- package/dist/src/components/atoms/TextInput/TextInput.types.d.ts +12 -0
- package/dist/utils/modal.js +18 -17
- package/dist/utils/toast.js +3 -2
- package/package.json +1 -1
- package/dist/components/atoms/Logo/Logo.d.ts +0 -3
- package/dist/components/atoms/Logo/Slogan.d.ts +0 -3
- package/dist/src/components/atoms/Tab/Tab.d.ts +0 -3
- package/dist/src/components/molecules/Tabs/Tabs.d.ts +0 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as r } from "../../_virtual/
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { p as v } from "../../_virtual/
|
|
2
|
-
import { t as U } from "../../_virtual/
|
|
3
|
-
import oe from "../../_virtual/
|
|
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>;
|
package/dist/utils/modal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as
|
|
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
|
|
11
|
-
|
|
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__ */
|
|
37
|
+
}, [s, o]), /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e) => {
|
|
37
38
|
if (e.type === "dialog") {
|
|
38
|
-
const { props:
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
39
|
+
const { props: c } = e;
|
|
40
|
+
return /* @__PURE__ */ i.jsx(
|
|
41
|
+
m,
|
|
41
42
|
{
|
|
42
|
-
...
|
|
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:
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
const { props: c } = e;
|
|
52
|
+
return /* @__PURE__ */ i.jsx(
|
|
52
53
|
M,
|
|
53
54
|
{
|
|
54
|
-
...
|
|
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__ */
|
|
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
|
|
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
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
b as ModalContainer,
|
|
85
|
+
A as closeModal,
|
|
86
|
+
k as openModal
|
|
86
87
|
};
|
package/dist/utils/toast.js
CHANGED
|
@@ -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
|
-
},
|
|
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
|
-
|
|
135
|
+
N as toast
|
|
135
136
|
};
|
package/package.json
CHANGED
|
@@ -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;
|