@apia/components 3.0.28 → 3.0.31
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.d.ts +1 -0
- package/dist/index.js +32 -15
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -7103,6 +7103,7 @@ function findIcon(icons, arg) {
|
|
|
7103
7103
|
const icon = icons.find((current) => String(current.id) === iconId);
|
|
7104
7104
|
return icon ?? null;
|
|
7105
7105
|
}
|
|
7106
|
+
return null;
|
|
7106
7107
|
}
|
|
7107
7108
|
const KeyHandler = ({
|
|
7108
7109
|
children,
|
|
@@ -7195,6 +7196,15 @@ const KeyHandler = ({
|
|
|
7195
7196
|
},
|
|
7196
7197
|
[actions]
|
|
7197
7198
|
),
|
|
7199
|
+
onClick: useCallback(
|
|
7200
|
+
(ev) => {
|
|
7201
|
+
const icon = findIcon(icons, ev.target);
|
|
7202
|
+
if (onIconClick && icon) {
|
|
7203
|
+
onIconClick(ev, icon);
|
|
7204
|
+
}
|
|
7205
|
+
},
|
|
7206
|
+
[icons, onIconClick]
|
|
7207
|
+
),
|
|
7198
7208
|
onDoubleClick: useCallback(
|
|
7199
7209
|
(ev) => {
|
|
7200
7210
|
if (onIconDoubleClick) {
|
|
@@ -7403,21 +7413,28 @@ const DefaultIconRendererNoMemo = (props) => {
|
|
|
7403
7413
|
console.error({ props });
|
|
7404
7414
|
console.error("The icon has no imageUrl nor icon defined");
|
|
7405
7415
|
}
|
|
7406
|
-
return /* @__PURE__ */ jsxs(
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7416
|
+
return /* @__PURE__ */ jsxs(
|
|
7417
|
+
Box,
|
|
7418
|
+
{
|
|
7419
|
+
title: String(props.additionalProps?.title) || props.label,
|
|
7420
|
+
className: "iconsList__icon__wrapper",
|
|
7421
|
+
children: [
|
|
7422
|
+
/* @__PURE__ */ jsxs(Box, { className: "iconsList__icon__image__wrapper", children: [
|
|
7423
|
+
props.imageUrl && /* @__PURE__ */ jsx(
|
|
7424
|
+
Image,
|
|
7425
|
+
{
|
|
7426
|
+
className: "iconsList__icon__image",
|
|
7427
|
+
src: props.imageUrl,
|
|
7428
|
+
role: "none",
|
|
7429
|
+
alt: ""
|
|
7430
|
+
}
|
|
7431
|
+
),
|
|
7432
|
+
props.icon && /* @__PURE__ */ jsx(Icon$1, { icon: props.icon, title: props.ariaLabel })
|
|
7433
|
+
] }),
|
|
7434
|
+
/* @__PURE__ */ jsx(Box, { className: "iconsList__icon__label", children: props.label })
|
|
7435
|
+
]
|
|
7436
|
+
}
|
|
7437
|
+
);
|
|
7421
7438
|
};
|
|
7422
7439
|
const DefaultIconRenderer = memo(DefaultIconRendererNoMemo);
|
|
7423
7440
|
|