globalfy-design-system 0.24.0 → 0.26.0
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.
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Input: import("react").
|
|
3
|
-
label: string;
|
|
4
|
-
placeholder?: string | undefined;
|
|
5
|
-
message?: string | undefined;
|
|
6
|
-
icon?: string | undefined;
|
|
7
|
-
isInvalid?: boolean | undefined;
|
|
8
|
-
isValid?: boolean | undefined;
|
|
9
|
-
disabled?: boolean | undefined;
|
|
10
|
-
value?: string | undefined;
|
|
11
|
-
isDatePicker?: boolean | undefined;
|
|
12
|
-
iconAction?: (() => void) | undefined;
|
|
13
|
-
} & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "color" | "onFocus" | "onBlur" | "size"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
1
|
+
import { InputProps } from ".";
|
|
2
|
+
export declare const Input: ({ message, className, isInvalid, isValid, disabled, value, icon, iconAction, isDatePicker, onClick, ...props }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { StoryObj } from "@storybook/react";
|
|
3
2
|
declare const meta: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: import("react").
|
|
6
|
-
label: string;
|
|
7
|
-
placeholder?: string | undefined;
|
|
8
|
-
message?: string | undefined;
|
|
9
|
-
icon?: string | undefined;
|
|
10
|
-
isInvalid?: boolean | undefined;
|
|
11
|
-
isValid?: boolean | undefined;
|
|
12
|
-
disabled?: boolean | undefined;
|
|
13
|
-
value?: string | undefined;
|
|
14
|
-
isDatePicker?: boolean | undefined;
|
|
15
|
-
iconAction?: (() => void) | undefined;
|
|
16
|
-
} & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "color" | "onFocus" | "onBlur" | "size"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
|
+
component: ({ message, className, isInvalid, isValid, disabled, value, icon, iconAction, isDatePicker, onClick, ...props }: import("./Input.types").InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
5
|
tags: string[];
|
|
18
6
|
};
|
|
19
7
|
export default meta;
|
|
@@ -41826,129 +41826,126 @@ const eK = YW, tK = QW, nK = XW, rK = JW, eq = ({
|
|
|
41826
41826
|
]
|
|
41827
41827
|
}
|
|
41828
41828
|
);
|
|
41829
|
-
}, aK =
|
|
41830
|
-
|
|
41831
|
-
|
|
41832
|
-
|
|
41833
|
-
|
|
41834
|
-
|
|
41835
|
-
|
|
41836
|
-
|
|
41837
|
-
|
|
41838
|
-
|
|
41839
|
-
|
|
41840
|
-
|
|
41841
|
-
|
|
41842
|
-
|
|
41843
|
-
|
|
41844
|
-
|
|
41845
|
-
|
|
41846
|
-
|
|
41847
|
-
|
|
41848
|
-
|
|
41849
|
-
|
|
41850
|
-
|
|
41851
|
-
|
|
41852
|
-
|
|
41853
|
-
true: "[&_label]:data-[filled-within=true]:!text-primary-grey-700"
|
|
41854
|
-
}
|
|
41855
|
-
}
|
|
41856
|
-
}), T = zn({
|
|
41857
|
-
base: "left-[15px] font-satoshi font-satoshi text-base text-sm text-primary-grey-800",
|
|
41858
|
-
variants: {
|
|
41859
|
-
isInvalid: {
|
|
41860
|
-
true: "text-complementary-red-500"
|
|
41861
|
-
},
|
|
41862
|
-
isValid: {
|
|
41863
|
-
true: "text-secondary-green-500"
|
|
41864
|
-
},
|
|
41865
|
-
disabled: {
|
|
41866
|
-
true: "text-primary-grey-700"
|
|
41867
|
-
}
|
|
41829
|
+
}, aK = ({
|
|
41830
|
+
message: e,
|
|
41831
|
+
className: n,
|
|
41832
|
+
isInvalid: a = !1,
|
|
41833
|
+
isValid: o = !1,
|
|
41834
|
+
disabled: u = !1,
|
|
41835
|
+
value: f,
|
|
41836
|
+
icon: c,
|
|
41837
|
+
iconAction: v,
|
|
41838
|
+
isDatePicker: m = !1,
|
|
41839
|
+
onClick: b,
|
|
41840
|
+
...x
|
|
41841
|
+
}) => {
|
|
41842
|
+
const w = zn({
|
|
41843
|
+
base: "[&_label]:data-[filled-within=true]:!left-[15px] [&_label]:data-[filled-within=true]:!top-[20px] [&_label]:data-[filled-within=true]:!ml-[1px] [&_label]:data-[filled-within=true]:!text-xs [&_label]:data-[filled-within=true]:!text-primary-grey-800",
|
|
41844
|
+
variants: {
|
|
41845
|
+
isInvalid: {
|
|
41846
|
+
true: "[&_label]:data-[filled-within=true]:!text-complementary-red-500"
|
|
41847
|
+
},
|
|
41848
|
+
isValid: {
|
|
41849
|
+
true: "[&_label]:data-[filled-within=true]:!text-secondary-green-500"
|
|
41850
|
+
},
|
|
41851
|
+
disabled: {
|
|
41852
|
+
true: "[&_label]:data-[filled-within=true]:!text-primary-grey-700"
|
|
41868
41853
|
}
|
|
41869
|
-
}
|
|
41870
|
-
|
|
41871
|
-
|
|
41872
|
-
|
|
41873
|
-
|
|
41874
|
-
|
|
41875
|
-
|
|
41876
|
-
|
|
41877
|
-
|
|
41854
|
+
}
|
|
41855
|
+
}), M = zn({
|
|
41856
|
+
base: "left-[15px] font-satoshi font-satoshi text-base text-sm text-primary-grey-800",
|
|
41857
|
+
variants: {
|
|
41858
|
+
isInvalid: {
|
|
41859
|
+
true: "text-complementary-red-500"
|
|
41860
|
+
},
|
|
41861
|
+
isValid: {
|
|
41862
|
+
true: "text-secondary-green-500"
|
|
41863
|
+
},
|
|
41864
|
+
disabled: {
|
|
41865
|
+
true: "text-primary-grey-700"
|
|
41878
41866
|
}
|
|
41879
|
-
}
|
|
41880
|
-
|
|
41881
|
-
|
|
41882
|
-
|
|
41883
|
-
|
|
41884
|
-
|
|
41885
|
-
|
|
41886
|
-
|
|
41887
|
-
|
|
41888
|
-
disabled: {
|
|
41889
|
-
true: "!border-primary-grey-500 !bg-primary-grey-500"
|
|
41890
|
-
},
|
|
41891
|
-
isDatePicker: {
|
|
41892
|
-
true: "!cursor-pointer"
|
|
41893
|
-
}
|
|
41867
|
+
}
|
|
41868
|
+
}), T = zn({
|
|
41869
|
+
base: "text-left font-satoshi text-base",
|
|
41870
|
+
variants: {
|
|
41871
|
+
disabled: {
|
|
41872
|
+
true: "!text-primary-grey-700"
|
|
41873
|
+
},
|
|
41874
|
+
isDatePicker: {
|
|
41875
|
+
true: "!cursor-pointer"
|
|
41894
41876
|
}
|
|
41895
|
-
}
|
|
41896
|
-
|
|
41897
|
-
|
|
41898
|
-
|
|
41899
|
-
|
|
41900
|
-
|
|
41901
|
-
|
|
41902
|
-
|
|
41903
|
-
|
|
41877
|
+
}
|
|
41878
|
+
}), P = zn({
|
|
41879
|
+
base: "h-12 rounded-lg border border-primary-grey-700 !bg-white px-[15px] text-black !ring-0 !ring-offset-0",
|
|
41880
|
+
variants: {
|
|
41881
|
+
isInvalid: {
|
|
41882
|
+
true: "border-complementary-red-500"
|
|
41883
|
+
},
|
|
41884
|
+
isValid: {
|
|
41885
|
+
true: "border-secondary-green-500"
|
|
41886
|
+
},
|
|
41887
|
+
disabled: {
|
|
41888
|
+
true: "!border-primary-grey-500 !bg-primary-grey-500"
|
|
41889
|
+
},
|
|
41890
|
+
isDatePicker: {
|
|
41891
|
+
true: "!cursor-pointer"
|
|
41904
41892
|
}
|
|
41905
|
-
}
|
|
41906
|
-
|
|
41907
|
-
|
|
41908
|
-
|
|
41909
|
-
|
|
41910
|
-
|
|
41893
|
+
}
|
|
41894
|
+
}), _ = zn({
|
|
41895
|
+
base: "mt-[5px] pl-3 font-satoshi",
|
|
41896
|
+
variants: {
|
|
41897
|
+
isInvalid: {
|
|
41898
|
+
true: "text-complementary-red-500"
|
|
41899
|
+
},
|
|
41900
|
+
isValid: {
|
|
41901
|
+
true: "text-secondary-green-500"
|
|
41911
41902
|
}
|
|
41912
|
-
}
|
|
41913
|
-
|
|
41914
|
-
|
|
41915
|
-
|
|
41916
|
-
|
|
41917
|
-
|
|
41918
|
-
input: P({ disabled: u, isDatePicker: m }),
|
|
41919
|
-
inputWrapper: _({
|
|
41920
|
-
isInvalid: a,
|
|
41921
|
-
isValid: o,
|
|
41922
|
-
disabled: u,
|
|
41923
|
-
isDatePicker: m
|
|
41924
|
-
}),
|
|
41925
|
-
base: M({
|
|
41926
|
-
isInvalid: a,
|
|
41927
|
-
isValid: o,
|
|
41928
|
-
disabled: u,
|
|
41929
|
-
className: n
|
|
41930
|
-
}),
|
|
41931
|
-
label: T({ isInvalid: a, isValid: o, disabled: u }),
|
|
41932
|
-
description: k({ isInvalid: a, isValid: o })
|
|
41933
|
-
},
|
|
41934
|
-
labelPlacement: "outside",
|
|
41935
|
-
description: e,
|
|
41936
|
-
disabled: u,
|
|
41937
|
-
value: f,
|
|
41938
|
-
readOnly: m,
|
|
41939
|
-
endContent: c && /* @__PURE__ */ de.jsx(
|
|
41940
|
-
Co,
|
|
41941
|
-
{
|
|
41942
|
-
onClick: v,
|
|
41943
|
-
name: c,
|
|
41944
|
-
className: z({ iconAction: !!v })
|
|
41945
|
-
}
|
|
41946
|
-
),
|
|
41947
|
-
...x
|
|
41903
|
+
}
|
|
41904
|
+
}), k = zn({
|
|
41905
|
+
base: "text-primary-grey-800",
|
|
41906
|
+
variants: {
|
|
41907
|
+
iconAction: {
|
|
41908
|
+
true: "cursor-pointer"
|
|
41948
41909
|
}
|
|
41949
|
-
|
|
41950
|
-
}
|
|
41951
|
-
|
|
41910
|
+
}
|
|
41911
|
+
});
|
|
41912
|
+
return /* @__PURE__ */ de.jsx("div", { onClick: b, children: /* @__PURE__ */ de.jsx(
|
|
41913
|
+
QU,
|
|
41914
|
+
{
|
|
41915
|
+
classNames: {
|
|
41916
|
+
input: T({ disabled: u, isDatePicker: m }),
|
|
41917
|
+
inputWrapper: P({
|
|
41918
|
+
isInvalid: a,
|
|
41919
|
+
isValid: o,
|
|
41920
|
+
disabled: u,
|
|
41921
|
+
isDatePicker: m
|
|
41922
|
+
}),
|
|
41923
|
+
base: w({
|
|
41924
|
+
isInvalid: a,
|
|
41925
|
+
isValid: o,
|
|
41926
|
+
disabled: u,
|
|
41927
|
+
className: n
|
|
41928
|
+
}),
|
|
41929
|
+
label: M({ isInvalid: a, isValid: o, disabled: u }),
|
|
41930
|
+
description: _({ isInvalid: a, isValid: o })
|
|
41931
|
+
},
|
|
41932
|
+
labelPlacement: "outside",
|
|
41933
|
+
description: e,
|
|
41934
|
+
disabled: u,
|
|
41935
|
+
value: f,
|
|
41936
|
+
readOnly: m,
|
|
41937
|
+
endContent: c && /* @__PURE__ */ de.jsx(
|
|
41938
|
+
Co,
|
|
41939
|
+
{
|
|
41940
|
+
onClick: v,
|
|
41941
|
+
name: c,
|
|
41942
|
+
className: k({ iconAction: !!v })
|
|
41943
|
+
}
|
|
41944
|
+
),
|
|
41945
|
+
...x
|
|
41946
|
+
}
|
|
41947
|
+
) });
|
|
41948
|
+
};
|
|
41952
41949
|
let B5 = 0;
|
|
41953
41950
|
function iK() {
|
|
41954
41951
|
E.useEffect(() => {
|
|
@@ -45505,7 +45502,7 @@ const NQ = (e) => {
|
|
|
45505
45502
|
}, x = () => {
|
|
45506
45503
|
f(!1);
|
|
45507
45504
|
};
|
|
45508
|
-
return /* @__PURE__ */ de.jsx(
|
|
45505
|
+
return /* @__PURE__ */ de.jsx(
|
|
45509
45506
|
HK,
|
|
45510
45507
|
{
|
|
45511
45508
|
isOpen: u,
|
|
@@ -45519,7 +45516,7 @@ const NQ = (e) => {
|
|
|
45519
45516
|
mode: "single"
|
|
45520
45517
|
}
|
|
45521
45518
|
),
|
|
45522
|
-
children: /* @__PURE__ */ de.jsx(
|
|
45519
|
+
children: /* @__PURE__ */ de.jsx("div", { children: /* @__PURE__ */ de.jsx(
|
|
45523
45520
|
aK,
|
|
45524
45521
|
{
|
|
45525
45522
|
value: c ? ou(c, o ?? "dd/MM/yyyy") : "",
|
|
@@ -45528,9 +45525,9 @@ const NQ = (e) => {
|
|
|
45528
45525
|
label: e,
|
|
45529
45526
|
icon: "calendar"
|
|
45530
45527
|
}
|
|
45531
|
-
)
|
|
45528
|
+
) })
|
|
45532
45529
|
}
|
|
45533
|
-
)
|
|
45530
|
+
);
|
|
45534
45531
|
}, rq = {
|
|
45535
45532
|
white: "#ffffff",
|
|
45536
45533
|
black: "#000000",
|