@apteva/apteva-kit 0.1.86 → 0.1.87
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 +20 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +467 -447
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1204,6 +1204,24 @@ function Form({ widget, onAction }) {
|
|
|
1204
1204
|
] });
|
|
1205
1205
|
}
|
|
1206
1206
|
|
|
1207
|
+
// src/components/Widgets/widget-library/Image.tsx
|
|
1208
|
+
|
|
1209
|
+
function Image({ widget }) {
|
|
1210
|
+
const { src, alt, caption } = widget.props;
|
|
1211
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "figure", { className: "overflow-hidden rounded-xl", children: [
|
|
1212
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1213
|
+
"img",
|
|
1214
|
+
{
|
|
1215
|
+
src,
|
|
1216
|
+
alt,
|
|
1217
|
+
className: "w-full h-auto object-contain bg-neutral-100 dark:bg-neutral-800",
|
|
1218
|
+
loading: "lazy"
|
|
1219
|
+
}
|
|
1220
|
+
),
|
|
1221
|
+
caption && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "figcaption", { className: "mt-2 text-center text-sm text-neutral-600 dark:text-neutral-400", children: caption })
|
|
1222
|
+
] });
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1207
1225
|
// src/components/Widgets/WidgetRenderer.tsx
|
|
1208
1226
|
|
|
1209
1227
|
function WidgetRenderer({ widget, onAction }) {
|
|
@@ -1221,6 +1239,8 @@ function WidgetRenderer({ widget, onAction }) {
|
|
|
1221
1239
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Table, { widget, onAction });
|
|
1222
1240
|
case "form":
|
|
1223
1241
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { widget, onAction });
|
|
1242
|
+
case "image":
|
|
1243
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Image, { widget });
|
|
1224
1244
|
default:
|
|
1225
1245
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-4 border border-yellow-300 bg-yellow-50 rounded-lg", children: [
|
|
1226
1246
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm text-yellow-800", children: [
|