@apia/components 3.0.27 → 3.0.30

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 CHANGED
@@ -1626,6 +1626,7 @@ type TIcon<P = Record<string, unknown>> = {
1626
1626
  * Permite modificar el color individual de un ícono.
1627
1627
  */
1628
1628
  textColor?: string;
1629
+ title?: string;
1629
1630
  };
1630
1631
  type TIconsList<P = Record<string, unknown>> = {
1631
1632
  /**
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(Box, { title: props.label, className: "iconsList__icon__wrapper", children: [
7407
- /* @__PURE__ */ jsxs(Box, { className: "iconsList__icon__image__wrapper", children: [
7408
- props.imageUrl && /* @__PURE__ */ jsx(
7409
- Image,
7410
- {
7411
- className: "iconsList__icon__image",
7412
- src: props.imageUrl,
7413
- role: "none",
7414
- alt: ""
7415
- }
7416
- ),
7417
- props.icon && /* @__PURE__ */ jsx(Icon$1, { icon: props.icon, title: props.ariaLabel })
7418
- ] }),
7419
- /* @__PURE__ */ jsx(Box, { className: "iconsList__icon__label", children: props.label })
7420
- ] });
7416
+ return /* @__PURE__ */ jsxs(
7417
+ Box,
7418
+ {
7419
+ title: props.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