lawgic-dev-kit 0.22.2 → 0.22.6
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/components/atoms/Chip/Chip.d.ts +13 -0
- package/dist/components/atoms/Chip/Chip.js +32 -0
- package/dist/components/atoms/Chip/index.d.ts +1 -0
- package/dist/components/atoms/InformationDisclaimer/InformationDisclaimer.js +17 -30
- package/dist/components/atoms/InformationDisclaimer/InformationDisclaimer.styles.d.ts +8 -2
- package/dist/components/atoms/InformationDisclaimer/InformationDisclaimer.styles.js +46 -12
- package/dist/components/atoms/InformationDisclaimer/InformationDisclaimer.types.d.ts +3 -3
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.js +56 -12
- package/dist/components/atoms/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/atoms/PasswordInput/PasswordInput.js +57 -41
- package/dist/components/atoms/PasswordInput/PasswordInput.types.d.ts +1 -0
- package/dist/components/atoms/SelectInput/SelectInput.js +10 -10
- package/dist/components/atoms/SelectInput/SelectInput.types.d.ts +2 -2
- package/dist/components/atoms/TextInput/TextInput.js +13 -13
- package/dist/components/atoms/TextInput/TextInput.types.d.ts +1 -1
- package/dist/components/atoms/UncontrolledSelector/UncontrolledSelector.d.ts +1 -1
- package/dist/components/atoms/UncontrolledSelector/UncontrolledSelector.js +14 -14
- package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.js +12 -12
- package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.types.d.ts +1 -1
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/molecules/DateInput/DateInput.d.ts +1 -1
- package/dist/components/molecules/FloatingMenu/FloatingMenu.js +16 -16
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.d.ts +5 -4
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.js +123 -105
- package/dist/components/molecules/SingleSelectDropdown/SingleSelectDropdown.d.ts +25 -0
- package/dist/components/molecules/SingleSelectDropdown/SingleSelectDropdown.js +212 -0
- package/dist/components/molecules/SingleSelectDropdown/index.d.ts +1 -0
- package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +1 -1
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/index.js +143 -139
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +94 -89
- package/dist/node_modules/@fortawesome/pro-solid-svg-icons/index.js +14 -9
- package/dist/src/components/atoms/Chip/Chip.d.ts +13 -0
- package/dist/src/components/atoms/Chip/index.d.ts +1 -0
- package/dist/src/components/atoms/InformationDisclaimer/InformationDisclaimer.styles.d.ts +8 -2
- package/dist/src/components/atoms/InformationDisclaimer/InformationDisclaimer.types.d.ts +3 -3
- package/dist/src/components/atoms/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/src/components/atoms/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/src/components/atoms/PasswordInput/PasswordInput.types.d.ts +1 -0
- package/dist/src/components/atoms/SelectInput/SelectInput.types.d.ts +2 -2
- package/dist/src/components/atoms/TextInput/TextInput.types.d.ts +1 -1
- package/dist/src/components/atoms/UncontrolledSelector/UncontrolledSelector.d.ts +1 -1
- package/dist/src/components/atoms/UncontrolledTextInput/UncontrolledTextInput.types.d.ts +1 -1
- package/dist/src/components/atoms/index.d.ts +1 -0
- package/dist/src/components/molecules/DateInput/DateInput.d.ts +1 -1
- package/dist/src/components/molecules/MultiSelectDropdown/MultiSelectDropdown.d.ts +5 -4
- package/dist/src/components/molecules/SingleSelectDropdown/SingleSelectDropdown.d.ts +25 -0
- package/dist/src/components/molecules/SingleSelectDropdown/index.d.ts +1 -0
- package/dist/src/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +1 -1
- package/dist/src/components/molecules/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ChipProps {
|
|
3
|
+
bgColor?: string;
|
|
4
|
+
textColor?: string;
|
|
5
|
+
label?: string | React.ReactNode;
|
|
6
|
+
labelClassName?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
size?: "sm" | "md";
|
|
9
|
+
showDot?: boolean;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
declare const Chip: React.FC<ChipProps>;
|
|
13
|
+
export default Chip;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { FontAwesomeIcon as o } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
3
|
+
import { faCircle as a } from "../../../node_modules/@fortawesome/pro-solid-svg-icons/index.js";
|
|
4
|
+
const f = ({
|
|
5
|
+
bgColor: p = "bg-green-100",
|
|
6
|
+
textColor: r = "text-green-700",
|
|
7
|
+
label: s = "Completed",
|
|
8
|
+
labelClassName: n = "",
|
|
9
|
+
className: i = "",
|
|
10
|
+
size: t = "sm",
|
|
11
|
+
showDot: x = !1,
|
|
12
|
+
style: m = {}
|
|
13
|
+
}) => /* @__PURE__ */ e.jsxs(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: `flex items-center justify-center rounded-[6px] ${t === "md" ? "py-8 px-12" : "py-4 px-8"} text-center text-nowrap h-fit w-fit ${x ? "gap-[6px]" : ""} ${p} ${r} ${i}`,
|
|
17
|
+
style: m,
|
|
18
|
+
children: [
|
|
19
|
+
x && /* @__PURE__ */ e.jsx(o, { icon: a, className: "text-[6px]" }),
|
|
20
|
+
/* @__PURE__ */ e.jsx(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: `font-semibold ${t === "md" ? "text-[16px] leading-[22px]" : "text-[12px] leading-[16px]"} ${n}`,
|
|
24
|
+
children: s
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
export {
|
|
31
|
+
f as default
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Chip } from './Chip';
|
|
@@ -1,35 +1,22 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { resolveDisclaimerClasses as c, resolveIconColor as a } from "./InformationDisclaimer.styles.js";
|
|
2
|
+
import { FontAwesomeIcon as a } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
3
|
+
import { resolveSizeStyles as m, resolveIconColor as d, resolveIcon as x } from "./InformationDisclaimer.styles.js";
|
|
5
4
|
const j = ({
|
|
6
|
-
description:
|
|
7
|
-
title:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"div",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
s
|
|
17
|
-
|
|
18
|
-
children:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
icon: t,
|
|
23
|
-
className: `min-h-20 h-20 ${l} ${a(s)}`
|
|
24
|
-
}
|
|
25
|
-
),
|
|
26
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
27
|
-
/* @__PURE__ */ e.jsx("h4", { className: "text-body-s font-500 text-black leading-none", children: i }),
|
|
28
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-gray-600 text-body-s leading-none", children: n })
|
|
29
|
-
] })
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
);
|
|
5
|
+
description: o,
|
|
6
|
+
title: r,
|
|
7
|
+
showIcon: t = !0,
|
|
8
|
+
type: l = "informative",
|
|
9
|
+
size: n = "normal"
|
|
10
|
+
}) => {
|
|
11
|
+
const s = m(n), i = x(l), c = d(l);
|
|
12
|
+
return /* @__PURE__ */ e.jsx("div", { className: `w-full rounded-xl bg-white border border-blue-100 ${s.containerStyles}`, children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-8", children: [
|
|
13
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-12", children: [
|
|
14
|
+
t && /* @__PURE__ */ e.jsx(a, { icon: i, className: `rounded-full ${s.iconStyles} ${c}` }),
|
|
15
|
+
/* @__PURE__ */ e.jsx("h5", { className: `font-semibold text-blue-900 self-center ${s.titleStyles}`, children: r })
|
|
16
|
+
] }),
|
|
17
|
+
o && /* @__PURE__ */ e.jsx("p", { className: `text-gray-500 leading-[16px] ${s.descriptionStyles}`, children: o })
|
|
18
|
+
] }) });
|
|
19
|
+
};
|
|
33
20
|
export {
|
|
34
21
|
j as default
|
|
35
22
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { InformationDisclaimerType } from './InformationDisclaimer.types';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
2
|
+
export declare const resolveSizeStyles: (size: "small" | "normal") => {
|
|
3
|
+
containerStyles: string;
|
|
4
|
+
titleStyles: string;
|
|
5
|
+
descriptionStyles: string;
|
|
6
|
+
iconStyles: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const resolveIconColor: (type: InformationDisclaimerType) => "bg-green-100 text-green-500" | "bg-yellow-100 text-yellow-500" | "bg-red-100 text-red-500" | "bg-blue-100 text-blue-500";
|
|
9
|
+
export declare const resolveIcon: (type: InformationDisclaimerType) => "info" | import('@fortawesome/fontawesome-common-types').IconDefinition;
|
|
@@ -1,23 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { faBell as t, faTriangleExclamation as r, faCircleInfo as s, faCircleCheck as n } from "../../../node_modules/@fortawesome/pro-regular-svg-icons/index.js";
|
|
2
|
+
const c = (e) => {
|
|
3
|
+
switch (e) {
|
|
4
|
+
case "small":
|
|
5
|
+
return {
|
|
6
|
+
containerStyles: "p-12",
|
|
7
|
+
titleStyles: "text-sm",
|
|
8
|
+
descriptionStyles: "text-xs",
|
|
9
|
+
iconStyles: "p-4 text-xs"
|
|
10
|
+
};
|
|
11
|
+
case "normal":
|
|
12
|
+
return {
|
|
13
|
+
containerStyles: "p-16",
|
|
14
|
+
titleStyles: "text-14",
|
|
15
|
+
descriptionStyles: "text-sm",
|
|
16
|
+
iconStyles: "p-6 text-md"
|
|
17
|
+
};
|
|
18
|
+
default:
|
|
19
|
+
return {
|
|
20
|
+
containerStyles: "p-16",
|
|
21
|
+
titleStyles: "text-14",
|
|
22
|
+
descriptionStyles: "text-sm",
|
|
23
|
+
iconStyles: "p-6 text-md"
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}, o = (e) => {
|
|
27
|
+
switch (e) {
|
|
28
|
+
case "success":
|
|
29
|
+
return "bg-green-100 text-green-500";
|
|
3
30
|
case "warning":
|
|
4
|
-
return "bg-yellow-
|
|
31
|
+
return "bg-yellow-100 text-yellow-500";
|
|
5
32
|
case "error":
|
|
6
|
-
return "bg-red-
|
|
33
|
+
return "bg-red-100 text-red-500";
|
|
34
|
+
case "informative":
|
|
35
|
+
return "bg-blue-100 text-blue-500";
|
|
7
36
|
default:
|
|
8
|
-
return "bg-blue-
|
|
37
|
+
return "bg-blue-100 text-blue-500";
|
|
9
38
|
}
|
|
10
|
-
},
|
|
11
|
-
switch (
|
|
39
|
+
}, i = (e) => {
|
|
40
|
+
switch (e) {
|
|
41
|
+
case "success":
|
|
42
|
+
return n;
|
|
12
43
|
case "warning":
|
|
13
|
-
return
|
|
44
|
+
return s;
|
|
14
45
|
case "error":
|
|
15
|
-
return
|
|
46
|
+
return r;
|
|
47
|
+
case "informative":
|
|
48
|
+
return t;
|
|
16
49
|
default:
|
|
17
|
-
return "
|
|
50
|
+
return "info";
|
|
18
51
|
}
|
|
19
52
|
};
|
|
20
53
|
export {
|
|
21
|
-
|
|
22
|
-
o as resolveIconColor
|
|
54
|
+
i as resolveIcon,
|
|
55
|
+
o as resolveIconColor,
|
|
56
|
+
c as resolveSizeStyles
|
|
23
57
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export type InformationDisclaimerType = "informative" | "warning" | "error";
|
|
1
|
+
export type InformationDisclaimerType = "success" | "informative" | "warning" | "error";
|
|
3
2
|
export type InformationDisclaimerProps = {
|
|
4
3
|
title: string;
|
|
5
4
|
description: string;
|
|
6
5
|
className?: string;
|
|
7
|
-
|
|
6
|
+
showIcon?: boolean;
|
|
8
7
|
type?: InformationDisclaimerType;
|
|
9
8
|
iconClassName?: string;
|
|
9
|
+
size?: "small" | "normal";
|
|
10
10
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface LoadingSpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
variant?: 'circle' | 'cube';
|
|
3
4
|
size?: number;
|
|
4
|
-
strokeWidth?: number;
|
|
5
5
|
color?: string;
|
|
6
6
|
}
|
|
7
7
|
declare const LoadingSpinner: React.FC<LoadingSpinnerProps>;
|
|
@@ -1,20 +1,64 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
const f = [
|
|
3
|
+
{ rotate: "0deg", delay: "0s" },
|
|
4
|
+
{ rotate: "90deg", delay: "0.3s" },
|
|
5
|
+
{ rotate: "270deg", delay: "0.9s" },
|
|
6
|
+
{ rotate: "180deg", delay: "0.6s" }
|
|
7
|
+
], x = ({
|
|
8
|
+
variant: d = "circle",
|
|
9
|
+
size: e = 16,
|
|
10
|
+
color: s = "#1DA696",
|
|
11
|
+
...h
|
|
12
|
+
}) => {
|
|
13
|
+
const { className: r = "", ...o } = h;
|
|
14
|
+
if (d === "cube") {
|
|
15
|
+
const n = e / Math.SQRT2;
|
|
16
|
+
return /* @__PURE__ */ t.jsx(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
...o,
|
|
20
|
+
className: `relative flex items-center justify-center overflow-hidden ${r}`,
|
|
21
|
+
style: { width: e, height: e },
|
|
22
|
+
children: /* @__PURE__ */ t.jsx(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: "relative rotate-45",
|
|
26
|
+
style: { width: n, height: n },
|
|
27
|
+
children: f.map((c, m) => /* @__PURE__ */ t.jsx(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: "float-left w-1/2 h-1/2 relative",
|
|
31
|
+
style: { transform: `scale(1.1) rotate(${c.rotate})` },
|
|
32
|
+
children: /* @__PURE__ */ t.jsx(
|
|
33
|
+
"span",
|
|
34
|
+
{
|
|
35
|
+
className: "absolute inset-0 origin-bottom-right animate-sk-fold-cube",
|
|
36
|
+
style: { backgroundColor: s, animationDelay: c.delay }
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
m
|
|
41
|
+
))
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const l = Math.max(1, Math.round(e * 0.125)), i = (e - l) / 2, a = 2 * Math.PI * i;
|
|
48
|
+
return /* @__PURE__ */ t.jsx("div", { ...o, className: `relative flex items-center justify-center ${r}`, children: /* @__PURE__ */ t.jsx("svg", { height: e, width: e, className: "animate-spin", children: /* @__PURE__ */ t.jsx(
|
|
5
49
|
"circle",
|
|
6
50
|
{
|
|
7
|
-
stroke:
|
|
51
|
+
stroke: s,
|
|
8
52
|
fill: "transparent",
|
|
9
|
-
strokeWidth:
|
|
10
|
-
strokeDasharray:
|
|
11
|
-
strokeDashoffset:
|
|
12
|
-
r:
|
|
13
|
-
cx:
|
|
14
|
-
cy:
|
|
53
|
+
strokeWidth: l,
|
|
54
|
+
strokeDasharray: `${a} ${a}`,
|
|
55
|
+
strokeDashoffset: a / 4,
|
|
56
|
+
r: i,
|
|
57
|
+
cx: e / 2,
|
|
58
|
+
cy: e / 2
|
|
15
59
|
}
|
|
16
60
|
) }) });
|
|
17
61
|
};
|
|
18
62
|
export {
|
|
19
|
-
|
|
63
|
+
x as default
|
|
20
64
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PasswordInputProps } from './PasswordInput.types';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
|
-
declare const PasswordInput: <T extends FieldValues>({ label, control, name, placeholder, className, disabled, leftSide, }: PasswordInputProps<T>) => React.ReactElement;
|
|
4
|
+
declare const PasswordInput: <T extends FieldValues>({ label, control, name, placeholder, className, disabled, size, leftSide, }: PasswordInputProps<T>) => React.ReactElement;
|
|
5
5
|
export default PasswordInput;
|
|
@@ -1,33 +1,49 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useController as
|
|
4
|
-
import { FontAwesomeIcon as
|
|
5
|
-
import { faEye as
|
|
6
|
-
import { useTheme as
|
|
7
|
-
const
|
|
8
|
-
label:
|
|
9
|
-
control:
|
|
2
|
+
import { useState as y } from "react";
|
|
3
|
+
import { useController as w } from "react-hook-form";
|
|
4
|
+
import { FontAwesomeIcon as $ } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
5
|
+
import { faEye as j, faEyeSlash as v } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
|
|
6
|
+
import { useTheme as N } from "../../../hooks/useTheme.js";
|
|
7
|
+
const V = ({
|
|
8
|
+
label: i,
|
|
9
|
+
control: c,
|
|
10
10
|
name: e,
|
|
11
|
-
placeholder:
|
|
12
|
-
className:
|
|
13
|
-
disabled:
|
|
11
|
+
placeholder: p,
|
|
12
|
+
className: x = "",
|
|
13
|
+
disabled: t = !1,
|
|
14
|
+
size: d = "md",
|
|
14
15
|
leftSide: a
|
|
15
16
|
}) => {
|
|
16
17
|
const {
|
|
17
|
-
field: { value:
|
|
18
|
-
fieldState: { error:
|
|
19
|
-
} =
|
|
18
|
+
field: { value: n = "", onChange: m, ref: f, onBlur: g },
|
|
19
|
+
fieldState: { error: l }
|
|
20
|
+
} = w({ name: e, control: c }), [s, h] = y(!1), { t: u } = N(), o = {
|
|
21
|
+
sm: {
|
|
22
|
+
container: "px-16 py-8",
|
|
23
|
+
text: "text-sm",
|
|
24
|
+
label: "text-sm",
|
|
25
|
+
error: "text-sm",
|
|
26
|
+
gap: "gap-8"
|
|
27
|
+
},
|
|
28
|
+
md: {
|
|
29
|
+
container: "p-16",
|
|
30
|
+
text: "text-14",
|
|
31
|
+
label: "text-14",
|
|
32
|
+
error: "text-sm",
|
|
33
|
+
gap: "gap-8"
|
|
34
|
+
}
|
|
35
|
+
}[d];
|
|
20
36
|
return /* @__PURE__ */ r.jsxs(
|
|
21
37
|
"label",
|
|
22
38
|
{
|
|
23
|
-
className: `flex flex-col group
|
|
39
|
+
className: `flex flex-col group select-none ${o.gap} ${t && "cursor-not-allowed"} ${x}`,
|
|
24
40
|
htmlFor: e,
|
|
25
41
|
children: [
|
|
26
42
|
/* @__PURE__ */ r.jsx(
|
|
27
43
|
"h6",
|
|
28
44
|
{
|
|
29
|
-
className: `text-gray-600 font-600 group ${
|
|
30
|
-
children:
|
|
45
|
+
className: `text-gray-600 font-600 group ${l && "!text-red-500"} ${o.label} ${t && "text-gray-300"}`,
|
|
46
|
+
children: i
|
|
31
47
|
}
|
|
32
48
|
),
|
|
33
49
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -35,20 +51,20 @@ const P = ({
|
|
|
35
51
|
{
|
|
36
52
|
htmlFor: e,
|
|
37
53
|
className: `
|
|
38
|
-
flex items-center justify-between gap-8
|
|
39
|
-
|
|
40
|
-
${
|
|
54
|
+
flex items-center justify-between gap-8 ${o.container}
|
|
55
|
+
|
|
56
|
+
${l && "!border-red-500"}
|
|
41
57
|
|
|
42
58
|
bg-light
|
|
43
|
-
|
|
44
|
-
w-full h-full rounded-full border
|
|
45
|
-
|
|
46
|
-
${
|
|
47
|
-
${!
|
|
48
|
-
${
|
|
49
|
-
|
|
59
|
+
|
|
60
|
+
w-full h-full rounded-full border
|
|
61
|
+
|
|
62
|
+
${n && !t ? "border-blue-200" : "border-blue-100"}
|
|
63
|
+
${!t && "group-hover:border-blue-300"}
|
|
64
|
+
${t && "cursor-not-allowed"}
|
|
65
|
+
|
|
50
66
|
group-focus-within:border-blue-500 transition-colors duration-200 ease-in-out
|
|
51
|
-
|
|
67
|
+
|
|
52
68
|
group-disabled:bg-gray-500
|
|
53
69
|
`,
|
|
54
70
|
children: [
|
|
@@ -57,35 +73,35 @@ const P = ({
|
|
|
57
73
|
"input",
|
|
58
74
|
{
|
|
59
75
|
id: e,
|
|
60
|
-
type:
|
|
76
|
+
type: s ? "text" : "password",
|
|
61
77
|
autoComplete: "off",
|
|
62
78
|
"aria-autocomplete": "none",
|
|
63
79
|
name: e,
|
|
64
|
-
disabled:
|
|
65
|
-
placeholder:
|
|
66
|
-
value:
|
|
67
|
-
onChange: (
|
|
68
|
-
onBlur:
|
|
69
|
-
ref:
|
|
70
|
-
className:
|
|
80
|
+
disabled: t,
|
|
81
|
+
placeholder: p,
|
|
82
|
+
value: n,
|
|
83
|
+
onChange: (b) => m(b.target.value),
|
|
84
|
+
onBlur: g,
|
|
85
|
+
ref: f,
|
|
86
|
+
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 ${o.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none`
|
|
71
87
|
}
|
|
72
88
|
),
|
|
73
89
|
/* @__PURE__ */ r.jsx(
|
|
74
|
-
|
|
90
|
+
$,
|
|
75
91
|
{
|
|
76
|
-
icon:
|
|
92
|
+
icon: s ? j : v,
|
|
77
93
|
className: "min-h-16 max-h-16 text-gray-400 hover:text-gray-500 transition-colors duration-150 cursor-pointer ease-in-out",
|
|
78
|
-
onClick: () =>
|
|
94
|
+
onClick: () => h(!s)
|
|
79
95
|
}
|
|
80
96
|
)
|
|
81
97
|
]
|
|
82
98
|
}
|
|
83
99
|
),
|
|
84
|
-
/* @__PURE__ */ r.jsx("h4", { className:
|
|
100
|
+
/* @__PURE__ */ r.jsx("h4", { className: `font-500 text-red-500 leading-none ${o.error}`, children: l && u(l.message || "", { x: u(e) }) })
|
|
85
101
|
]
|
|
86
102
|
}
|
|
87
103
|
);
|
|
88
104
|
};
|
|
89
105
|
export {
|
|
90
|
-
|
|
106
|
+
V as default
|
|
91
107
|
};
|
|
@@ -16,17 +16,17 @@ const me = ({
|
|
|
16
16
|
dropdownStyle: f = {},
|
|
17
17
|
innerClassName: h = "",
|
|
18
18
|
showChevron: g = !0,
|
|
19
|
-
size:
|
|
19
|
+
size: y = "md"
|
|
20
20
|
}) => {
|
|
21
21
|
const {
|
|
22
|
-
field: { value:
|
|
22
|
+
field: { value: b, onChange: o },
|
|
23
23
|
fieldState: { error: s }
|
|
24
24
|
} = K({ name: i, control: p });
|
|
25
25
|
return /* @__PURE__ */ t.jsx(
|
|
26
26
|
ne,
|
|
27
27
|
{
|
|
28
28
|
options: c,
|
|
29
|
-
value:
|
|
29
|
+
value: b,
|
|
30
30
|
onChange: o,
|
|
31
31
|
label: d,
|
|
32
32
|
placeholder: m,
|
|
@@ -36,7 +36,7 @@ const me = ({
|
|
|
36
36
|
dropdownStyle: f,
|
|
37
37
|
innerClassName: h,
|
|
38
38
|
showChevron: g,
|
|
39
|
-
size:
|
|
39
|
+
size: y
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
}, ne = ({
|
|
@@ -50,8 +50,8 @@ const me = ({
|
|
|
50
50
|
className: f = "",
|
|
51
51
|
dropdownStyle: h = {},
|
|
52
52
|
innerClassName: g = "",
|
|
53
|
-
showChevron:
|
|
54
|
-
size:
|
|
53
|
+
showChevron: y = !0,
|
|
54
|
+
size: b = "md"
|
|
55
55
|
}) => {
|
|
56
56
|
var T;
|
|
57
57
|
const { t: o } = Q(), [s, j] = $(!1), [v, C] = $(""), [l, S] = $(i || null), w = z(null), O = z(null), r = {
|
|
@@ -63,15 +63,15 @@ const me = ({
|
|
|
63
63
|
gap: "gap-8",
|
|
64
64
|
icon: "w-12 h-12"
|
|
65
65
|
},
|
|
66
|
-
|
|
66
|
+
md: {
|
|
67
67
|
container: "p-16",
|
|
68
|
-
text: "text-
|
|
68
|
+
text: "text-14",
|
|
69
69
|
label: "text-14",
|
|
70
70
|
error: "text-sm",
|
|
71
71
|
gap: "gap-8",
|
|
72
72
|
icon: "w-16 h-16"
|
|
73
73
|
}
|
|
74
|
-
}[
|
|
74
|
+
}[b], { x: I, y: R, strategy: F, refs: N, context: k } = U({
|
|
75
75
|
open: s,
|
|
76
76
|
onOpenChange: j,
|
|
77
77
|
middleware: [
|
|
@@ -127,7 +127,7 @@ const me = ({
|
|
|
127
127
|
...H,
|
|
128
128
|
children: [
|
|
129
129
|
/* @__PURE__ */ t.jsx("div", { className: "flex items-center w-full overflow-hidden", children: /* @__PURE__ */ t.jsx("span", { className: `flex-grow font-600 truncate ${r.text} ${l ? "" : "text-gray-400"}`, children: o(l ? l.label : m) }) }),
|
|
130
|
-
|
|
130
|
+
y && /* @__PURE__ */ t.jsx(
|
|
131
131
|
"svg",
|
|
132
132
|
{
|
|
133
133
|
className: `${r.icon} transition-transform ${s ? "rotate-180" : ""}`,
|
|
@@ -15,7 +15,7 @@ export interface SelectInputProps<T extends FieldValues> {
|
|
|
15
15
|
innerClassName?: string;
|
|
16
16
|
dropdownStyle?: React.CSSProperties;
|
|
17
17
|
showChevron?: boolean;
|
|
18
|
-
size?: 'sm' | '
|
|
18
|
+
size?: 'sm' | 'md';
|
|
19
19
|
}
|
|
20
20
|
export interface SelectInputFieldProps {
|
|
21
21
|
options: Option[];
|
|
@@ -29,5 +29,5 @@ export interface SelectInputFieldProps {
|
|
|
29
29
|
innerClassName?: string;
|
|
30
30
|
dropdownStyle?: React.CSSProperties;
|
|
31
31
|
showChevron?: boolean;
|
|
32
|
-
size?: 'sm' | '
|
|
32
|
+
size?: 'sm' | 'md';
|
|
33
33
|
}
|
|
@@ -6,17 +6,17 @@ const S = ({
|
|
|
6
6
|
label: c,
|
|
7
7
|
control: x,
|
|
8
8
|
name: e,
|
|
9
|
-
placeholder:
|
|
10
|
-
className:
|
|
9
|
+
placeholder: d,
|
|
10
|
+
className: p = "",
|
|
11
11
|
disabled: t = !1,
|
|
12
12
|
leftSide: a,
|
|
13
13
|
rightSide: n,
|
|
14
14
|
translateKey: i = "",
|
|
15
|
-
size: g = "
|
|
16
|
-
...
|
|
15
|
+
size: g = "md",
|
|
16
|
+
...m
|
|
17
17
|
}) => {
|
|
18
18
|
const {
|
|
19
|
-
field: { value: u = "", onChange:
|
|
19
|
+
field: { value: u = "", onChange: b, ref: f, onBlur: h },
|
|
20
20
|
fieldState: { error: r }
|
|
21
21
|
} = w({ name: e, control: x }), { t: s } = v(), o = {
|
|
22
22
|
sm: {
|
|
@@ -26,18 +26,18 @@ const S = ({
|
|
|
26
26
|
error: "text-sm",
|
|
27
27
|
gap: "gap-8"
|
|
28
28
|
},
|
|
29
|
-
|
|
29
|
+
md: {
|
|
30
30
|
container: "p-16",
|
|
31
|
-
text: "text-
|
|
31
|
+
text: "text-14",
|
|
32
32
|
label: "text-14",
|
|
33
33
|
error: "text-sm",
|
|
34
34
|
gap: "gap-8"
|
|
35
35
|
}
|
|
36
|
-
}[g],
|
|
36
|
+
}[g], $ = s(e), y = s(i);
|
|
37
37
|
return /* @__PURE__ */ l.jsxs(
|
|
38
38
|
"label",
|
|
39
39
|
{
|
|
40
|
-
className: `flex flex-col group select-none ${o.gap} ${t && "cursor-not-allowed"} ${
|
|
40
|
+
className: `flex flex-col group select-none ${o.gap} ${t && "cursor-not-allowed"} ${p}`,
|
|
41
41
|
htmlFor: e,
|
|
42
42
|
children: [
|
|
43
43
|
/* @__PURE__ */ l.jsx(
|
|
@@ -76,20 +76,20 @@ const S = ({
|
|
|
76
76
|
id: e,
|
|
77
77
|
name: e,
|
|
78
78
|
disabled: t,
|
|
79
|
-
placeholder:
|
|
79
|
+
placeholder: d,
|
|
80
80
|
value: u,
|
|
81
|
-
onChange: (j) =>
|
|
81
|
+
onChange: (j) => b(j.target.value),
|
|
82
82
|
onBlur: h,
|
|
83
83
|
ref: f,
|
|
84
84
|
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 ${o.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,
|
|
85
|
-
...
|
|
85
|
+
...m
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
88
|
n && n
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
|
-
/* @__PURE__ */ l.jsx("h4", { className: `font-500 text-red-500 leading-none ${o.error}`, children: (r == null ? void 0 : r.message) && s(r.message, { x:
|
|
92
|
+
/* @__PURE__ */ l.jsx("h4", { className: `font-500 text-red-500 leading-none ${o.error}`, children: (r == null ? void 0 : r.message) && s(r.message, { x: y || $ }) })
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
);
|
|
@@ -17,7 +17,7 @@ interface UncontrolledSelectorProps {
|
|
|
17
17
|
innerClassName?: string;
|
|
18
18
|
dropdownStyle?: React.CSSProperties;
|
|
19
19
|
showChevron?: boolean;
|
|
20
|
-
size?: 'sm' | '
|
|
20
|
+
size?: 'sm' | 'md';
|
|
21
21
|
}
|
|
22
22
|
declare const UncontrolledSelector: React.FC<UncontrolledSelectorProps>;
|
|
23
23
|
export default UncontrolledSelector;
|