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,28 +1,30 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useRef as m, useState as
|
|
2
|
+
import { useRef as m, useState as E, useEffect as u } from "react";
|
|
3
3
|
import "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
4
4
|
import "../../../_virtual/lodash.js";
|
|
5
|
-
import "../../../providers/ThemeProvider.js";
|
|
5
|
+
import { useTheme as S } from "../../../providers/ThemeProvider.js";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
|
|
8
|
-
import
|
|
8
|
+
import L from "../../atoms/Tab/Tab.js";
|
|
9
|
+
import "../../../constants/countries.js";
|
|
9
10
|
import { motion as a } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
10
|
-
const
|
|
11
|
+
const A = ({
|
|
11
12
|
variant: p = "underline",
|
|
13
|
+
color: h = "blue",
|
|
12
14
|
tabs: i,
|
|
13
15
|
activeTab: n,
|
|
14
|
-
onTabChange:
|
|
15
|
-
className:
|
|
16
|
-
direction:
|
|
17
|
-
showLabel:
|
|
16
|
+
onTabChange: w,
|
|
17
|
+
className: x = "",
|
|
18
|
+
direction: R = "row",
|
|
19
|
+
showLabel: g = !0
|
|
18
20
|
}) => {
|
|
19
|
-
const o = m([]), [c,
|
|
21
|
+
const o = m([]), [c, j] = E({ left: 0, width: 0 }), s = m(null), { defaultColorScheme: v } = S(), C = h || v, d = () => {
|
|
20
22
|
const e = i.findIndex((t) => t.id === n);
|
|
21
23
|
if (e >= 0 && o.current[e]) {
|
|
22
24
|
const t = o.current[e];
|
|
23
25
|
if (t && s.current) {
|
|
24
26
|
const l = s.current.getBoundingClientRect(), f = t.getBoundingClientRect();
|
|
25
|
-
|
|
27
|
+
j({
|
|
26
28
|
left: f.left - l.left,
|
|
27
29
|
width: f.width
|
|
28
30
|
});
|
|
@@ -42,7 +44,7 @@ const k = ({
|
|
|
42
44
|
"div",
|
|
43
45
|
{
|
|
44
46
|
ref: s,
|
|
45
|
-
className: `flex items-center relative ${
|
|
47
|
+
className: `flex items-center relative ${x}`,
|
|
46
48
|
children: [
|
|
47
49
|
i.map((e, t) => /* @__PURE__ */ r.jsx(
|
|
48
50
|
a.div,
|
|
@@ -52,14 +54,14 @@ const k = ({
|
|
|
52
54
|
},
|
|
53
55
|
className: "w-full",
|
|
54
56
|
children: /* @__PURE__ */ r.jsx(
|
|
55
|
-
|
|
57
|
+
L,
|
|
56
58
|
{
|
|
57
59
|
href: e.href,
|
|
58
|
-
label:
|
|
60
|
+
label: g ? e.label : "",
|
|
59
61
|
icon: e.icon,
|
|
60
|
-
direction:
|
|
62
|
+
direction: R,
|
|
61
63
|
isSelected: n === e.id,
|
|
62
|
-
onClick: () =>
|
|
64
|
+
onClick: () => w(e.id),
|
|
63
65
|
variant: p
|
|
64
66
|
}
|
|
65
67
|
)
|
|
@@ -69,7 +71,7 @@ const k = ({
|
|
|
69
71
|
/* @__PURE__ */ r.jsx(
|
|
70
72
|
a.div,
|
|
71
73
|
{
|
|
72
|
-
className:
|
|
74
|
+
className: `absolute bottom-0 h-2 bg-${C}-500`,
|
|
73
75
|
initial: !1,
|
|
74
76
|
animate: {
|
|
75
77
|
left: c.left,
|
|
@@ -87,5 +89,5 @@ const k = ({
|
|
|
87
89
|
);
|
|
88
90
|
};
|
|
89
91
|
export {
|
|
90
|
-
|
|
92
|
+
A as default
|
|
91
93
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
export type UncontrolledDateInputProps = {
|
|
3
|
-
currentDate: Date |
|
|
4
|
-
onDateChange: (date: Date |
|
|
2
|
+
currentDate: Date | null;
|
|
3
|
+
onDateChange: (date: Date | null) => void;
|
|
5
4
|
label?: string;
|
|
6
5
|
placeholder?: string;
|
|
7
|
-
showTimeSelector?: boolean;
|
|
8
|
-
translateKey?: string;
|
|
9
6
|
error?: string;
|
|
7
|
+
translatedKey: string;
|
|
8
|
+
showTimeSelector?: boolean;
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
export default UncontrolledDateInput;
|
|
10
|
+
export default function UncontrolledDateInput({ currentDate, onDateChange, label, placeholder, error, translatedKey, showTimeSelector, }: UncontrolledDateInputProps): import("react/jsx-runtime").JSX.Element;
|