@elqnt/react 1.0.2 → 1.0.4
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/form-controls/icon.js +54 -3
- package/dist/components/form-controls/icon.js.map +1 -1
- package/dist/components/form-controls/icon.mjs +28 -3
- package/dist/components/form-controls/icon.mjs.map +1 -1
- package/dist/components/index.d.mts +587 -0
- package/dist/components/index.d.ts +587 -0
- package/dist/components/index.js +6252 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +6185 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/components/upload/upload-actions.js +147 -8
- package/dist/components/upload/upload-actions.js.map +1 -1
- package/dist/components/upload/upload-actions.mjs +118 -4
- package/dist/components/upload/upload-actions.mjs.map +1 -1
- package/dist/index.d.mts +21 -585
- package/dist/index.d.ts +21 -585
- package/dist/index.js +1414 -1201
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +626 -483
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -1
- package/dist/chunk-FLTEIMWJ.mjs +0 -36
- package/dist/chunk-FLTEIMWJ.mjs.map +0 -1
- package/dist/chunk-UXJQ7CBV.mjs +0 -122
- package/dist/chunk-UXJQ7CBV.mjs.map +0 -1
- package/dist/chunk-W4AIK44N.js +0 -122
- package/dist/chunk-W4AIK44N.js.map +0 -1
- package/dist/chunk-ZCBGKBZS.js +0 -36
- package/dist/chunk-ZCBGKBZS.js.map +0 -1
|
@@ -1,7 +1,58 @@
|
|
|
1
|
-
"use
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
2
20
|
|
|
3
|
-
|
|
21
|
+
// components/form-controls/icon.tsx
|
|
22
|
+
var icon_exports = {};
|
|
23
|
+
__export(icon_exports, {
|
|
24
|
+
Icon: () => Icon
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(icon_exports);
|
|
4
27
|
|
|
28
|
+
// lib/utils.ts
|
|
29
|
+
var import_clsx = require("clsx");
|
|
30
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
31
|
+
function cn(...inputs) {
|
|
32
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
33
|
+
}
|
|
5
34
|
|
|
6
|
-
|
|
35
|
+
// components/form-controls/icon.tsx
|
|
36
|
+
var import_lucide_react = require("lucide-react");
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
var Icon = (0, import_react.memo)(({ name, className, strokeWidth, size }) => {
|
|
40
|
+
const IconComponent = import_lucide_react.icons[name];
|
|
41
|
+
if (!IconComponent) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
45
|
+
IconComponent,
|
|
46
|
+
{
|
|
47
|
+
className: cn(className),
|
|
48
|
+
strokeWidth: strokeWidth || 2.5,
|
|
49
|
+
size
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
});
|
|
53
|
+
Icon.displayName = "Icon";
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
Icon
|
|
57
|
+
});
|
|
7
58
|
//# sourceMappingURL=icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../components/form-controls/icon.tsx","../../../lib/utils.ts"],"sourcesContent":["import { cn } from \"../../lib/utils\";\nimport { icons } from \"lucide-react\";\nimport { memo } from \"react\";\n\nexport type IconProps = {\n name: keyof typeof icons;\n size?: number;\n className?: string;\n strokeWidth?: number;\n};\n\nexport const Icon = memo(({ name, className, strokeWidth, size }: IconProps) => {\n const IconComponent = icons[name];\n\n if (!IconComponent) {\n return null;\n }\n\n return (\n <IconComponent\n className={cn(className)}\n strokeWidth={strokeWidth || 2.5}\n size={size}\n />\n );\n});\n\nIcon.displayName = \"Icon\";\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport function getBadgeVariant(status: string) {\n return status === \"open\" ? \"default\" : \"secondary\";\n}\n\n// export function getColspanByFieldType(fieldType: EntityFieldType) {\n// return fieldType === \"text\" ? \"col-span-2\" : \"\";\n// }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADJA,0BAAsB;AACtB,mBAAqB;AAiBjB;AARG,IAAM,WAAO,mBAAK,CAAC,EAAE,MAAM,WAAW,aAAa,KAAK,MAAiB;AAC9E,QAAM,gBAAgB,0BAAM,IAAI;AAEhC,MAAI,CAAC,eAAe;AAClB,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,SAAS;AAAA,MACvB,aAAa,eAAe;AAAA,MAC5B;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,KAAK,cAAc;","names":[]}
|
|
@@ -1,6 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// lib/utils.ts
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { twMerge } from "tailwind-merge";
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
return twMerge(clsx(inputs));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// components/form-controls/icon.tsx
|
|
11
|
+
import { icons } from "lucide-react";
|
|
12
|
+
import { memo } from "react";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
var Icon = memo(({ name, className, strokeWidth, size }) => {
|
|
15
|
+
const IconComponent = icons[name];
|
|
16
|
+
if (!IconComponent) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
IconComponent,
|
|
21
|
+
{
|
|
22
|
+
className: cn(className),
|
|
23
|
+
strokeWidth: strokeWidth || 2.5,
|
|
24
|
+
size
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
Icon.displayName = "Icon";
|
|
4
29
|
export {
|
|
5
30
|
Icon
|
|
6
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../lib/utils.ts","../../../components/form-controls/icon.tsx"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport function getBadgeVariant(status: string) {\n return status === \"open\" ? \"default\" : \"secondary\";\n}\n\n// export function getColspanByFieldType(fieldType: EntityFieldType) {\n// return fieldType === \"text\" ? \"col-span-2\" : \"\";\n// }\n","import { cn } from \"../../lib/utils\";\nimport { icons } from \"lucide-react\";\nimport { memo } from \"react\";\n\nexport type IconProps = {\n name: keyof typeof icons;\n size?: number;\n className?: string;\n strokeWidth?: number;\n};\n\nexport const Icon = memo(({ name, className, strokeWidth, size }: IconProps) => {\n const IconComponent = icons[name];\n\n if (!IconComponent) {\n return null;\n }\n\n return (\n <IconComponent\n className={cn(className)}\n strokeWidth={strokeWidth || 2.5}\n size={size}\n />\n );\n});\n\nIcon.displayName = \"Icon\";\n"],"mappings":";;;AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACJA,SAAS,aAAa;AACtB,SAAS,YAAY;AAiBjB;AARG,IAAM,OAAO,KAAK,CAAC,EAAE,MAAM,WAAW,aAAa,KAAK,MAAiB;AAC9E,QAAM,gBAAgB,MAAM,IAAI;AAEhC,MAAI,CAAC,eAAe;AAClB,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,SAAS;AAAA,MACvB,aAAa,eAAe;AAAA,MAC5B;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,KAAK,cAAc;","names":[]}
|