prom-pal-ui 1.3.7 → 1.3.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.
|
@@ -834,8 +834,8 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
834
834
|
*/
|
|
835
835
|
|
|
836
836
|
|
|
837
|
-
const __iconNode$
|
|
838
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
837
|
+
const __iconNode$5 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
838
|
+
const Check = createLucideIcon("check", __iconNode$5);
|
|
839
839
|
|
|
840
840
|
/**
|
|
841
841
|
* @license lucide-react v0.562.0 - ISC
|
|
@@ -845,8 +845,8 @@ const Check = createLucideIcon("check", __iconNode$3);
|
|
|
845
845
|
*/
|
|
846
846
|
|
|
847
847
|
|
|
848
|
-
const __iconNode$
|
|
849
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
848
|
+
const __iconNode$4 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
849
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$4);
|
|
850
850
|
|
|
851
851
|
/**
|
|
852
852
|
* @license lucide-react v0.562.0 - ISC
|
|
@@ -856,8 +856,56 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$2);
|
|
|
856
856
|
*/
|
|
857
857
|
|
|
858
858
|
|
|
859
|
-
const __iconNode$
|
|
860
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$
|
|
859
|
+
const __iconNode$3 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
860
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$3);
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* @license lucide-react v0.562.0 - ISC
|
|
864
|
+
*
|
|
865
|
+
* This source code is licensed under the ISC license.
|
|
866
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
867
|
+
*/
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
const __iconNode$2 = [
|
|
871
|
+
[
|
|
872
|
+
"path",
|
|
873
|
+
{
|
|
874
|
+
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
875
|
+
key: "ct8e1f"
|
|
876
|
+
}
|
|
877
|
+
],
|
|
878
|
+
["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
|
|
879
|
+
[
|
|
880
|
+
"path",
|
|
881
|
+
{
|
|
882
|
+
d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
|
|
883
|
+
key: "13bj9a"
|
|
884
|
+
}
|
|
885
|
+
],
|
|
886
|
+
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
887
|
+
];
|
|
888
|
+
const EyeOff = createLucideIcon("eye-off", __iconNode$2);
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* @license lucide-react v0.562.0 - ISC
|
|
892
|
+
*
|
|
893
|
+
* This source code is licensed under the ISC license.
|
|
894
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
895
|
+
*/
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
const __iconNode$1 = [
|
|
899
|
+
[
|
|
900
|
+
"path",
|
|
901
|
+
{
|
|
902
|
+
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
903
|
+
key: "1nclc0"
|
|
904
|
+
}
|
|
905
|
+
],
|
|
906
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
907
|
+
];
|
|
908
|
+
const Eye = createLucideIcon("eye", __iconNode$1);
|
|
861
909
|
|
|
862
910
|
/**
|
|
863
911
|
* @license lucide-react v0.562.0 - ISC
|
|
@@ -21705,6 +21753,11 @@ function PromLabel(_a) {
|
|
|
21705
21753
|
var PromInput = function (_a) {
|
|
21706
21754
|
var name = _a.name, mask = _a.mask, label = _a.label, isLoad = _a.isLoad, styleTitle = _a.styleTitle, styleWrapper = _a.styleWrapper, _b = _a.type, type = _b === void 0 ? "text" : _b, allowedPattern = _a.allowedPattern, props = __rest(_a, ["name", "mask", "label", "isLoad", "styleTitle", "styleWrapper", "type", "allowedPattern"]);
|
|
21707
21755
|
var _c = reactHookForm.useFormContext(), control = _c.control, setValue = _c.setValue;
|
|
21756
|
+
var _d = React.useState(false), showPassword = _d[0], setShowPassword = _d[1];
|
|
21757
|
+
var togglePasswordVisibility = function () {
|
|
21758
|
+
setShowPassword(!showPassword);
|
|
21759
|
+
};
|
|
21760
|
+
var inputType = type === "password" && showPassword ? "text" : type;
|
|
21708
21761
|
var handleChange = function (value) {
|
|
21709
21762
|
var processedValue = value;
|
|
21710
21763
|
if (mask) {
|
|
@@ -21719,7 +21772,7 @@ var PromInput = function (_a) {
|
|
|
21719
21772
|
};
|
|
21720
21773
|
return (jsxRuntimeExports.jsx(PromFormFiled, { control: control, name: name, render: function (_a) {
|
|
21721
21774
|
var field = _a.field, fieldState = _a.fieldState;
|
|
21722
|
-
return (jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [label && (jsxRuntimeExports.jsx(PromLabel, { className: cn("block text-sm font-medium", styleTitle), children: label })), jsxRuntimeExports.jsx("input", __assign({}, field, props, { onChange: function (e) { return handleChange(e.target.value); },
|
|
21775
|
+
return (jsxRuntimeExports.jsxs("div", { className: "space-y-2 relative flex flex-col items-center justify-center", children: [label && (jsxRuntimeExports.jsx(PromLabel, { className: cn("block text-sm font-medium text-center", styleTitle), children: label })), jsxRuntimeExports.jsxs("div", { className: "relative w-full max-w-md", children: [jsxRuntimeExports.jsx("input", __assign({}, field, props, { type: inputType, onChange: function (e) { return handleChange(e.target.value); }, disabled: isLoad || props.disabled, className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", styleWrapper) })), type === "password" && (jsxRuntimeExports.jsx("button", { type: "button", onClick: togglePasswordVisibility, className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700 focus:outline-none", tabIndex: -1, disabled: props.disabled, children: showPassword ? (jsxRuntimeExports.jsx(EyeOff, { className: "h-4 w-4" })) : (jsxRuntimeExports.jsx(Eye, { className: "h-4 w-4" })) }))] }), fieldState.error && (jsxRuntimeExports.jsx("p", { className: "text-red-500 text-sm mt-1 text-center w-full", children: fieldState.error.message }))] }));
|
|
21723
21776
|
} }));
|
|
21724
21777
|
};
|
|
21725
21778
|
|
|
@@ -814,8 +814,8 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
814
814
|
*/
|
|
815
815
|
|
|
816
816
|
|
|
817
|
-
const __iconNode$
|
|
818
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
817
|
+
const __iconNode$5 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
818
|
+
const Check = createLucideIcon("check", __iconNode$5);
|
|
819
819
|
|
|
820
820
|
/**
|
|
821
821
|
* @license lucide-react v0.562.0 - ISC
|
|
@@ -825,8 +825,8 @@ const Check = createLucideIcon("check", __iconNode$3);
|
|
|
825
825
|
*/
|
|
826
826
|
|
|
827
827
|
|
|
828
|
-
const __iconNode$
|
|
829
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
828
|
+
const __iconNode$4 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
829
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$4);
|
|
830
830
|
|
|
831
831
|
/**
|
|
832
832
|
* @license lucide-react v0.562.0 - ISC
|
|
@@ -836,8 +836,56 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$2);
|
|
|
836
836
|
*/
|
|
837
837
|
|
|
838
838
|
|
|
839
|
-
const __iconNode$
|
|
840
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$
|
|
839
|
+
const __iconNode$3 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
840
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$3);
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* @license lucide-react v0.562.0 - ISC
|
|
844
|
+
*
|
|
845
|
+
* This source code is licensed under the ISC license.
|
|
846
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
847
|
+
*/
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
const __iconNode$2 = [
|
|
851
|
+
[
|
|
852
|
+
"path",
|
|
853
|
+
{
|
|
854
|
+
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
855
|
+
key: "ct8e1f"
|
|
856
|
+
}
|
|
857
|
+
],
|
|
858
|
+
["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
|
|
859
|
+
[
|
|
860
|
+
"path",
|
|
861
|
+
{
|
|
862
|
+
d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
|
|
863
|
+
key: "13bj9a"
|
|
864
|
+
}
|
|
865
|
+
],
|
|
866
|
+
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
867
|
+
];
|
|
868
|
+
const EyeOff = createLucideIcon("eye-off", __iconNode$2);
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* @license lucide-react v0.562.0 - ISC
|
|
872
|
+
*
|
|
873
|
+
* This source code is licensed under the ISC license.
|
|
874
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
875
|
+
*/
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
const __iconNode$1 = [
|
|
879
|
+
[
|
|
880
|
+
"path",
|
|
881
|
+
{
|
|
882
|
+
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
883
|
+
key: "1nclc0"
|
|
884
|
+
}
|
|
885
|
+
],
|
|
886
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
887
|
+
];
|
|
888
|
+
const Eye = createLucideIcon("eye", __iconNode$1);
|
|
841
889
|
|
|
842
890
|
/**
|
|
843
891
|
* @license lucide-react v0.562.0 - ISC
|
|
@@ -21685,6 +21733,11 @@ function PromLabel(_a) {
|
|
|
21685
21733
|
var PromInput = function (_a) {
|
|
21686
21734
|
var name = _a.name, mask = _a.mask, label = _a.label, isLoad = _a.isLoad, styleTitle = _a.styleTitle, styleWrapper = _a.styleWrapper, _b = _a.type, type = _b === void 0 ? "text" : _b, allowedPattern = _a.allowedPattern, props = __rest(_a, ["name", "mask", "label", "isLoad", "styleTitle", "styleWrapper", "type", "allowedPattern"]);
|
|
21687
21735
|
var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
|
|
21736
|
+
var _d = useState(false), showPassword = _d[0], setShowPassword = _d[1];
|
|
21737
|
+
var togglePasswordVisibility = function () {
|
|
21738
|
+
setShowPassword(!showPassword);
|
|
21739
|
+
};
|
|
21740
|
+
var inputType = type === "password" && showPassword ? "text" : type;
|
|
21688
21741
|
var handleChange = function (value) {
|
|
21689
21742
|
var processedValue = value;
|
|
21690
21743
|
if (mask) {
|
|
@@ -21699,7 +21752,7 @@ var PromInput = function (_a) {
|
|
|
21699
21752
|
};
|
|
21700
21753
|
return (jsxRuntimeExports.jsx(PromFormFiled, { control: control, name: name, render: function (_a) {
|
|
21701
21754
|
var field = _a.field, fieldState = _a.fieldState;
|
|
21702
|
-
return (jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [label && (jsxRuntimeExports.jsx(PromLabel, { className: cn("block text-sm font-medium", styleTitle), children: label })), jsxRuntimeExports.jsx("input", __assign({}, field, props, { onChange: function (e) { return handleChange(e.target.value); },
|
|
21755
|
+
return (jsxRuntimeExports.jsxs("div", { className: "space-y-2 relative flex flex-col items-center justify-center", children: [label && (jsxRuntimeExports.jsx(PromLabel, { className: cn("block text-sm font-medium text-center", styleTitle), children: label })), jsxRuntimeExports.jsxs("div", { className: "relative w-full max-w-md", children: [jsxRuntimeExports.jsx("input", __assign({}, field, props, { type: inputType, onChange: function (e) { return handleChange(e.target.value); }, disabled: isLoad || props.disabled, className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", styleWrapper) })), type === "password" && (jsxRuntimeExports.jsx("button", { type: "button", onClick: togglePasswordVisibility, className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700 focus:outline-none", tabIndex: -1, disabled: props.disabled, children: showPassword ? (jsxRuntimeExports.jsx(EyeOff, { className: "h-4 w-4" })) : (jsxRuntimeExports.jsx(Eye, { className: "h-4 w-4" })) }))] }), fieldState.error && (jsxRuntimeExports.jsx("p", { className: "text-red-500 text-sm mt-1 text-center w-full", children: fieldState.error.message }))] }));
|
|
21703
21756
|
} }));
|
|
21704
21757
|
};
|
|
21705
21758
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
export interface PromFieldProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
errorStyle?: "";
|
|
4
|
+
errorMsg?: string;
|
|
5
|
+
errorDisplay?: boolean;
|
|
6
|
+
error?: (error: string) => ReactNode;
|
|
7
|
+
label?: string;
|
|
8
|
+
isLoad?: boolean;
|
|
9
|
+
skeleton?: ReactNode;
|
|
10
10
|
}
|
|
@@ -2,11 +2,11 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { PromComponentProps } from "../types";
|
|
4
4
|
declare const buttonVariants: (props?: {
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost";
|
|
6
6
|
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg";
|
|
7
7
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
8
8
|
declare const skeletonVariants: (props?: {
|
|
9
|
-
variant?: "
|
|
9
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost";
|
|
10
10
|
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg";
|
|
11
11
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
12
12
|
interface PromButtonProps extends React.ComponentProps<"button">, VariantProps<typeof buttonVariants>, PromComponentProps {
|
|
File without changes
|