@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.js
CHANGED
|
@@ -1786,7 +1786,7 @@ __export(lucide_react_exports, {
|
|
|
1786
1786
|
FerrisWheelIcon: () => FerrisWheel,
|
|
1787
1787
|
Figma: () => Figma,
|
|
1788
1788
|
FigmaIcon: () => Figma,
|
|
1789
|
-
File: () =>
|
|
1789
|
+
File: () => File2,
|
|
1790
1790
|
FileArchive: () => FileArchive,
|
|
1791
1791
|
FileArchiveIcon: () => FileArchive,
|
|
1792
1792
|
FileAudio: () => FileAudio,
|
|
@@ -1839,7 +1839,7 @@ __export(lucide_react_exports, {
|
|
|
1839
1839
|
FileEditIcon: () => FilePen,
|
|
1840
1840
|
FileHeart: () => FileHeart,
|
|
1841
1841
|
FileHeartIcon: () => FileHeart,
|
|
1842
|
-
FileIcon: () =>
|
|
1842
|
+
FileIcon: () => File2,
|
|
1843
1843
|
FileImage: () => FileImage,
|
|
1844
1844
|
FileImageIcon: () => FileImage,
|
|
1845
1845
|
FileInput: () => FileInput,
|
|
@@ -3196,7 +3196,7 @@ __export(lucide_react_exports, {
|
|
|
3196
3196
|
LucideFence: () => Fence,
|
|
3197
3197
|
LucideFerrisWheel: () => FerrisWheel,
|
|
3198
3198
|
LucideFigma: () => Figma,
|
|
3199
|
-
LucideFile: () =>
|
|
3199
|
+
LucideFile: () => File2,
|
|
3200
3200
|
LucideFileArchive: () => FileArchive,
|
|
3201
3201
|
LucideFileAudio: () => FileAudio,
|
|
3202
3202
|
LucideFileAudio2: () => FileAudio2,
|
|
@@ -6617,7 +6617,7 @@ __export(icons_exports, {
|
|
|
6617
6617
|
Fence: () => Fence,
|
|
6618
6618
|
FerrisWheel: () => FerrisWheel,
|
|
6619
6619
|
Figma: () => Figma,
|
|
6620
|
-
File: () =>
|
|
6620
|
+
File: () => File2,
|
|
6621
6621
|
FileArchive: () => FileArchive,
|
|
6622
6622
|
FileAudio: () => FileAudio,
|
|
6623
6623
|
FileAudio2: () => FileAudio2,
|
|
@@ -14767,7 +14767,7 @@ var __iconNode630 = [
|
|
|
14767
14767
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
14768
14768
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
|
|
14769
14769
|
];
|
|
14770
|
-
var
|
|
14770
|
+
var File2 = createLucideIcon("file", __iconNode630);
|
|
14771
14771
|
|
|
14772
14772
|
// node_modules/lucide-react/dist/esm/icons/files.js
|
|
14773
14773
|
var __iconNode631 = [
|
|
@@ -27022,18 +27022,26 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
27022
27022
|
const handleChange = (e) => {
|
|
27023
27023
|
props.onChange?.(e, props?.name || "");
|
|
27024
27024
|
};
|
|
27025
|
+
const formatValue = (value) => {
|
|
27026
|
+
if (props.inputType === "file") {
|
|
27027
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
27028
|
+
}
|
|
27029
|
+
if (value === null || value === void 0) return "";
|
|
27030
|
+
return value;
|
|
27031
|
+
};
|
|
27025
27032
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
27026
27033
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
27027
27034
|
Input,
|
|
27028
27035
|
{
|
|
27029
27036
|
type: props.inputType || "text",
|
|
27030
27037
|
name: props.name,
|
|
27038
|
+
id: props.name || "text-field",
|
|
27031
27039
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27032
27040
|
style: {
|
|
27033
27041
|
...style,
|
|
27034
27042
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27035
27043
|
},
|
|
27036
|
-
value: props.value
|
|
27044
|
+
value: formatValue(props.value),
|
|
27037
27045
|
autoComplete: isAutocomplete ? "on" : "off",
|
|
27038
27046
|
placeholder,
|
|
27039
27047
|
onChange: handleChange,
|
|
@@ -27064,14 +27072,21 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
27064
27072
|
const handleChange = (e) => {
|
|
27065
27073
|
props.onChange?.(e, props.name || "");
|
|
27066
27074
|
};
|
|
27075
|
+
const formatValue = (value) => {
|
|
27076
|
+
if (props.inputType === "file") {
|
|
27077
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
27078
|
+
}
|
|
27079
|
+
if (value === null || value === void 0) return 0;
|
|
27080
|
+
return value;
|
|
27081
|
+
};
|
|
27067
27082
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
27068
27083
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
27069
27084
|
Input,
|
|
27070
27085
|
{
|
|
27071
|
-
type: "number",
|
|
27086
|
+
type: props.inputType || "number",
|
|
27072
27087
|
id: props.name || "number-field",
|
|
27073
27088
|
name: props.name,
|
|
27074
|
-
value: props.value
|
|
27089
|
+
value: formatValue(props.value),
|
|
27075
27090
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27076
27091
|
style: {
|
|
27077
27092
|
...style,
|
|
@@ -27107,13 +27122,21 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
27107
27122
|
const handleChange = (e) => {
|
|
27108
27123
|
props.onChange?.(e, props?.name || "");
|
|
27109
27124
|
};
|
|
27125
|
+
const formatValue = (value) => {
|
|
27126
|
+
if (props.inputType === "file") {
|
|
27127
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
27128
|
+
}
|
|
27129
|
+
if (value === null || value === void 0) return "";
|
|
27130
|
+
return value;
|
|
27131
|
+
};
|
|
27110
27132
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
27111
27133
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
27112
27134
|
Input,
|
|
27113
27135
|
{
|
|
27114
|
-
type: "email",
|
|
27136
|
+
type: props.inputType || "email",
|
|
27115
27137
|
name: props.name,
|
|
27116
|
-
|
|
27138
|
+
id: props.name || "email-field",
|
|
27139
|
+
value: formatValue(props.value),
|
|
27117
27140
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27118
27141
|
style: {
|
|
27119
27142
|
...style,
|
|
@@ -27149,14 +27172,21 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
27149
27172
|
const handleChange = (e) => {
|
|
27150
27173
|
props.onChange?.(e, props?.name || "");
|
|
27151
27174
|
};
|
|
27175
|
+
const formatValue = (value) => {
|
|
27176
|
+
if (props.inputType === "file") {
|
|
27177
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
27178
|
+
}
|
|
27179
|
+
if (value === null || value === void 0) return "";
|
|
27180
|
+
return value;
|
|
27181
|
+
};
|
|
27152
27182
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
27153
27183
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
27154
27184
|
Input,
|
|
27155
27185
|
{
|
|
27156
|
-
type: "password",
|
|
27186
|
+
type: props.inputType || "password",
|
|
27157
27187
|
id: props.name || "password-field",
|
|
27158
27188
|
name: props.name,
|
|
27159
|
-
value: props.value
|
|
27189
|
+
value: formatValue(props.value),
|
|
27160
27190
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27161
27191
|
style: {
|
|
27162
27192
|
...style,
|
|
@@ -27252,16 +27282,23 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
27252
27282
|
const handleChange = (e) => {
|
|
27253
27283
|
props.onChange?.(e, props?.name || "");
|
|
27254
27284
|
};
|
|
27285
|
+
const formatValue = (value) => {
|
|
27286
|
+
if (props.inputType === "file") {
|
|
27287
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
27288
|
+
}
|
|
27289
|
+
if (value === null || value === void 0) return "";
|
|
27290
|
+
return value;
|
|
27291
|
+
};
|
|
27255
27292
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
27256
27293
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
27257
27294
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("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://" }),
|
|
27258
27295
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
27259
27296
|
Input,
|
|
27260
27297
|
{
|
|
27261
|
-
id: "url-field",
|
|
27262
|
-
type: "url",
|
|
27298
|
+
id: props.name || "url-field",
|
|
27299
|
+
type: props.inputType || "url",
|
|
27263
27300
|
name: props.name,
|
|
27264
|
-
value: props.value
|
|
27301
|
+
value: formatValue(props.value),
|
|
27265
27302
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27266
27303
|
style: {
|
|
27267
27304
|
...style,
|
|
@@ -28496,14 +28533,21 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
28496
28533
|
const handleChange = (e) => {
|
|
28497
28534
|
props.onChange?.(e, props?.name || "");
|
|
28498
28535
|
};
|
|
28536
|
+
const formatValue = (value) => {
|
|
28537
|
+
if (props.inputType === "file") {
|
|
28538
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
28539
|
+
}
|
|
28540
|
+
if (value === null || value === void 0) return "";
|
|
28541
|
+
return value;
|
|
28542
|
+
};
|
|
28499
28543
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
28500
28544
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
28501
28545
|
Input,
|
|
28502
28546
|
{
|
|
28503
|
-
type: "
|
|
28547
|
+
type: props.inputType || "search",
|
|
28504
28548
|
id: props.name || "text-field",
|
|
28505
28549
|
name: props.name,
|
|
28506
|
-
value: props.value
|
|
28550
|
+
value: formatValue(props.value),
|
|
28507
28551
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
28508
28552
|
style: {
|
|
28509
28553
|
...style,
|
|
@@ -28535,14 +28579,21 @@ var FileInput2 = ({ className, style, ...props }) => {
|
|
|
28535
28579
|
const handleChange = (e) => {
|
|
28536
28580
|
props.onChange?.(e, props?.name || "");
|
|
28537
28581
|
};
|
|
28582
|
+
const formatValue = (value) => {
|
|
28583
|
+
if (props.inputType === "file") {
|
|
28584
|
+
return value instanceof File || value instanceof FileList ? value : null;
|
|
28585
|
+
}
|
|
28586
|
+
if (value === null || value === void 0) return "";
|
|
28587
|
+
return value;
|
|
28588
|
+
};
|
|
28538
28589
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "d-flex items-center relative align-middle", children: [
|
|
28539
28590
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28540
28591
|
Input,
|
|
28541
28592
|
{
|
|
28542
|
-
type: "file",
|
|
28543
|
-
id: "file",
|
|
28593
|
+
type: props.inputType || "file",
|
|
28594
|
+
id: props.name || "file-field",
|
|
28544
28595
|
name: props.name,
|
|
28545
|
-
value: props.value
|
|
28596
|
+
value: formatValue(props.value),
|
|
28546
28597
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
28547
28598
|
style: {
|
|
28548
28599
|
...style,
|