@algorithm-shift/design-system 1.2.979 → 1.2.980
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/index.js +71 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +71 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1690,7 +1690,7 @@ __export(lucide_react_exports, {
|
|
|
1690
1690
|
FerrisWheelIcon: () => FerrisWheel,
|
|
1691
1691
|
Figma: () => Figma,
|
|
1692
1692
|
FigmaIcon: () => Figma,
|
|
1693
|
-
File: () =>
|
|
1693
|
+
File: () => File2,
|
|
1694
1694
|
FileArchive: () => FileArchive,
|
|
1695
1695
|
FileArchiveIcon: () => FileArchive,
|
|
1696
1696
|
FileAudio: () => FileAudio,
|
|
@@ -1743,7 +1743,7 @@ __export(lucide_react_exports, {
|
|
|
1743
1743
|
FileEditIcon: () => FilePen,
|
|
1744
1744
|
FileHeart: () => FileHeart,
|
|
1745
1745
|
FileHeartIcon: () => FileHeart,
|
|
1746
|
-
FileIcon: () =>
|
|
1746
|
+
FileIcon: () => File2,
|
|
1747
1747
|
FileImage: () => FileImage,
|
|
1748
1748
|
FileImageIcon: () => FileImage,
|
|
1749
1749
|
FileInput: () => FileInput,
|
|
@@ -3100,7 +3100,7 @@ __export(lucide_react_exports, {
|
|
|
3100
3100
|
LucideFence: () => Fence,
|
|
3101
3101
|
LucideFerrisWheel: () => FerrisWheel,
|
|
3102
3102
|
LucideFigma: () => Figma,
|
|
3103
|
-
LucideFile: () =>
|
|
3103
|
+
LucideFile: () => File2,
|
|
3104
3104
|
LucideFileArchive: () => FileArchive,
|
|
3105
3105
|
LucideFileAudio: () => FileAudio,
|
|
3106
3106
|
LucideFileAudio2: () => FileAudio2,
|
|
@@ -6521,7 +6521,7 @@ __export(icons_exports, {
|
|
|
6521
6521
|
Fence: () => Fence,
|
|
6522
6522
|
FerrisWheel: () => FerrisWheel,
|
|
6523
6523
|
Figma: () => Figma,
|
|
6524
|
-
File: () =>
|
|
6524
|
+
File: () => File2,
|
|
6525
6525
|
FileArchive: () => FileArchive,
|
|
6526
6526
|
FileAudio: () => FileAudio,
|
|
6527
6527
|
FileAudio2: () => FileAudio2,
|
|
@@ -14671,7 +14671,7 @@ var __iconNode630 = [
|
|
|
14671
14671
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
14672
14672
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
|
|
14673
14673
|
];
|
|
14674
|
-
var
|
|
14674
|
+
var File2 = createLucideIcon("file", __iconNode630);
|
|
14675
14675
|
|
|
14676
14676
|
// node_modules/lucide-react/dist/esm/icons/files.js
|
|
14677
14677
|
var __iconNode631 = [
|
|
@@ -26926,18 +26926,26 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
26926
26926
|
const handleChange = (e) => {
|
|
26927
26927
|
props.onChange?.(e, props?.name || "");
|
|
26928
26928
|
};
|
|
26929
|
+
const formatValue = (value) => {
|
|
26930
|
+
if (props.inputType === "file") {
|
|
26931
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
26932
|
+
}
|
|
26933
|
+
if (value === null || value === void 0) return "";
|
|
26934
|
+
return value;
|
|
26935
|
+
};
|
|
26929
26936
|
return /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
26930
26937
|
/* @__PURE__ */ jsx20(
|
|
26931
26938
|
Input,
|
|
26932
26939
|
{
|
|
26933
26940
|
type: props.inputType || "text",
|
|
26934
26941
|
name: props.name,
|
|
26942
|
+
id: props.name || "text-field",
|
|
26935
26943
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
26936
26944
|
style: {
|
|
26937
26945
|
...style,
|
|
26938
26946
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
26939
26947
|
},
|
|
26940
|
-
value: props.value
|
|
26948
|
+
value: formatValue(props.value),
|
|
26941
26949
|
autoComplete: isAutocomplete ? "on" : "off",
|
|
26942
26950
|
placeholder,
|
|
26943
26951
|
onChange: handleChange,
|
|
@@ -26968,14 +26976,21 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
26968
26976
|
const handleChange = (e) => {
|
|
26969
26977
|
props.onChange?.(e, props.name || "");
|
|
26970
26978
|
};
|
|
26979
|
+
const formatValue = (value) => {
|
|
26980
|
+
if (props.inputType === "file") {
|
|
26981
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
26982
|
+
}
|
|
26983
|
+
if (value === null || value === void 0) return 0;
|
|
26984
|
+
return value;
|
|
26985
|
+
};
|
|
26971
26986
|
return /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
26972
26987
|
/* @__PURE__ */ jsx21("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx21(
|
|
26973
26988
|
Input,
|
|
26974
26989
|
{
|
|
26975
|
-
type: "number",
|
|
26990
|
+
type: props.inputType || "number",
|
|
26976
26991
|
id: props.name || "number-field",
|
|
26977
26992
|
name: props.name,
|
|
26978
|
-
value: props.value
|
|
26993
|
+
value: formatValue(props.value),
|
|
26979
26994
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
26980
26995
|
style: {
|
|
26981
26996
|
...style,
|
|
@@ -27011,13 +27026,21 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
27011
27026
|
const handleChange = (e) => {
|
|
27012
27027
|
props.onChange?.(e, props?.name || "");
|
|
27013
27028
|
};
|
|
27029
|
+
const formatValue = (value) => {
|
|
27030
|
+
if (props.inputType === "file") {
|
|
27031
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
27032
|
+
}
|
|
27033
|
+
if (value === null || value === void 0) return "";
|
|
27034
|
+
return value;
|
|
27035
|
+
};
|
|
27014
27036
|
return /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
27015
27037
|
/* @__PURE__ */ jsx22("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx22(
|
|
27016
27038
|
Input,
|
|
27017
27039
|
{
|
|
27018
|
-
type: "email",
|
|
27040
|
+
type: props.inputType || "email",
|
|
27019
27041
|
name: props.name,
|
|
27020
|
-
|
|
27042
|
+
id: props.name || "email-field",
|
|
27043
|
+
value: formatValue(props.value),
|
|
27021
27044
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27022
27045
|
style: {
|
|
27023
27046
|
...style,
|
|
@@ -27053,14 +27076,21 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
27053
27076
|
const handleChange = (e) => {
|
|
27054
27077
|
props.onChange?.(e, props?.name || "");
|
|
27055
27078
|
};
|
|
27079
|
+
const formatValue = (value) => {
|
|
27080
|
+
if (props.inputType === "file") {
|
|
27081
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
27082
|
+
}
|
|
27083
|
+
if (value === null || value === void 0) return "";
|
|
27084
|
+
return value;
|
|
27085
|
+
};
|
|
27056
27086
|
return /* @__PURE__ */ jsxs10(Fragment6, { children: [
|
|
27057
27087
|
/* @__PURE__ */ jsx23("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx23(
|
|
27058
27088
|
Input,
|
|
27059
27089
|
{
|
|
27060
|
-
type: "password",
|
|
27090
|
+
type: props.inputType || "password",
|
|
27061
27091
|
id: props.name || "password-field",
|
|
27062
27092
|
name: props.name,
|
|
27063
|
-
value: props.value
|
|
27093
|
+
value: formatValue(props.value),
|
|
27064
27094
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27065
27095
|
style: {
|
|
27066
27096
|
...style,
|
|
@@ -27156,16 +27186,23 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
27156
27186
|
const handleChange = (e) => {
|
|
27157
27187
|
props.onChange?.(e, props?.name || "");
|
|
27158
27188
|
};
|
|
27189
|
+
const formatValue = (value) => {
|
|
27190
|
+
if (props.inputType === "file") {
|
|
27191
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
27192
|
+
}
|
|
27193
|
+
if (value === null || value === void 0) return "";
|
|
27194
|
+
return value;
|
|
27195
|
+
};
|
|
27159
27196
|
return /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
|
27160
27197
|
/* @__PURE__ */ jsxs12("div", { className: "flex justify-start items-center relative", children: [
|
|
27161
27198
|
/* @__PURE__ */ jsx26("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
|
|
27162
27199
|
/* @__PURE__ */ jsx26(
|
|
27163
27200
|
Input,
|
|
27164
27201
|
{
|
|
27165
|
-
id: "url-field",
|
|
27166
|
-
type: "url",
|
|
27202
|
+
id: props.name || "url-field",
|
|
27203
|
+
type: props.inputType || "url",
|
|
27167
27204
|
name: props.name,
|
|
27168
|
-
value: props.value
|
|
27205
|
+
value: formatValue(props.value),
|
|
27169
27206
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27170
27207
|
style: {
|
|
27171
27208
|
...style,
|
|
@@ -28400,14 +28437,21 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
28400
28437
|
const handleChange = (e) => {
|
|
28401
28438
|
props.onChange?.(e, props?.name || "");
|
|
28402
28439
|
};
|
|
28440
|
+
const formatValue = (value) => {
|
|
28441
|
+
if (props.inputType === "file") {
|
|
28442
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
28443
|
+
}
|
|
28444
|
+
if (value === null || value === void 0) return "";
|
|
28445
|
+
return value;
|
|
28446
|
+
};
|
|
28403
28447
|
return /* @__PURE__ */ jsxs22(Fragment15, { children: [
|
|
28404
28448
|
/* @__PURE__ */ jsx41("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx41(
|
|
28405
28449
|
Input,
|
|
28406
28450
|
{
|
|
28407
|
-
type: "
|
|
28451
|
+
type: props.inputType || "search",
|
|
28408
28452
|
id: props.name || "text-field",
|
|
28409
28453
|
name: props.name,
|
|
28410
|
-
value: props.value
|
|
28454
|
+
value: formatValue(props.value),
|
|
28411
28455
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
28412
28456
|
style: {
|
|
28413
28457
|
...style,
|
|
@@ -28439,14 +28483,21 @@ var FileInput2 = ({ className, style, ...props }) => {
|
|
|
28439
28483
|
const handleChange = (e) => {
|
|
28440
28484
|
props.onChange?.(e, props?.name || "");
|
|
28441
28485
|
};
|
|
28486
|
+
const formatValue = (value) => {
|
|
28487
|
+
if (props.inputType === "file") {
|
|
28488
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
28489
|
+
}
|
|
28490
|
+
if (value === null || value === void 0) return "";
|
|
28491
|
+
return value;
|
|
28492
|
+
};
|
|
28442
28493
|
return /* @__PURE__ */ jsxs23("div", { className: "d-flex items-center relative align-middle", children: [
|
|
28443
28494
|
/* @__PURE__ */ jsx42(
|
|
28444
28495
|
Input,
|
|
28445
28496
|
{
|
|
28446
|
-
type: "file",
|
|
28447
|
-
id: "file",
|
|
28497
|
+
type: props.inputType || "file",
|
|
28498
|
+
id: props.name || "file-field",
|
|
28448
28499
|
name: props.name,
|
|
28449
|
-
value: props.value
|
|
28500
|
+
value: formatValue(props.value),
|
|
28450
28501
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
28451
28502
|
style: {
|
|
28452
28503
|
...style,
|