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,28 +1,30 @@
1
1
  import { j as r } from "../../../_virtual/jsx-runtime.js";
2
- import { useRef as m, useState as j, useEffect as u } from "react";
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 v from "../../atoms/Tab/Tab.js";
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 k = ({
11
+ const A = ({
11
12
  variant: p = "underline",
13
+ color: h = "blue",
12
14
  tabs: i,
13
15
  activeTab: n,
14
- onTabChange: h,
15
- className: w = "",
16
- direction: x = "row",
17
- showLabel: R = !0
16
+ onTabChange: w,
17
+ className: x = "",
18
+ direction: R = "row",
19
+ showLabel: g = !0
18
20
  }) => {
19
- const o = m([]), [c, g] = j({ left: 0, width: 0 }), s = m(null), d = () => {
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
- g({
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 ${w}`,
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
- v,
57
+ L,
56
58
  {
57
59
  href: e.href,
58
- label: R ? e.label : "",
60
+ label: g ? e.label : "",
59
61
  icon: e.icon,
60
- direction: x,
62
+ direction: R,
61
63
  isSelected: n === e.id,
62
- onClick: () => h(e.id),
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: "absolute bottom-0 h-2 bg-blue-500",
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
- k as default
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 | undefined | null;
4
- onDateChange: (date: Date | undefined | null) => void;
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
- declare const UncontrolledDateInput: React.FC<UncontrolledDateInputProps>;
12
- export default UncontrolledDateInput;
10
+ export default function UncontrolledDateInput({ currentDate, onDateChange, label, placeholder, error, translatedKey, showTimeSelector, }: UncontrolledDateInputProps): import("react/jsx-runtime").JSX.Element;