@digitaldefiance/express-suite-react-components 4.19.15 → 4.19.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/express-suite-react-components",
3
- "version": "4.19.15",
3
+ "version": "4.19.17",
4
4
  "homepage": "https://github.com/Digital-Defiance/react-components",
5
5
  "description": "React MUI components for Digital Defiance Express Suite",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@digitaldefiance/i18n-lib": "4.6.4",
35
- "@digitaldefiance/suite-core-lib": "4.19.15",
35
+ "@digitaldefiance/suite-core-lib": "4.19.16",
36
36
  "@emotion/react": "^11.14.0",
37
37
  "@emotion/styled": "^11.14.0",
38
38
  "@mui/icons-material": "^7.0.2",
@@ -0,0 +1,10 @@
1
+ import { DetailedHTMLProps, ImgHTMLAttributes, ReactElement } from 'react';
2
+ interface FCParams<TEnum extends string> {
3
+ src: string;
4
+ stringKey: TEnum;
5
+ vars?: Record<string, string | number>;
6
+ imgOptions?: DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
7
+ }
8
+ export declare const TImgAlt: <TEnum extends string>({ src, stringKey, vars, imgOptions, }: FCParams<TEnum>) => ReactElement;
9
+ export default TImgAlt;
10
+ //# sourceMappingURL=TImgAlt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TImgAlt.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-react-components/src/components/TImgAlt.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAW,MAAM,OAAO,CAAC;AAGpF,UAAU,QAAQ,CAAC,KAAK,SAAS,MAAM;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,KAAK,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC;CACvF;AAED,eAAO,MAAM,OAAO,GAAI,KAAK,SAAS,MAAM,EAAE,uCAK3C,QAAQ,CAAC,KAAK,CAAC,KAAG,YAQpB,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TImgAlt = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // src/app/components/TImgAlt.tsx
6
+ const react_1 = require("react");
7
+ const contexts_1 = require("../contexts");
8
+ const TImgAlt = ({ src, stringKey, vars, imgOptions, }) => {
9
+ const { currentLanguage, tBranded } = (0, contexts_1.useI18n)();
10
+ const translated = (0, react_1.useMemo)(() => tBranded(stringKey, vars, currentLanguage), [tBranded, stringKey, vars, currentLanguage]);
11
+ return (0, jsx_runtime_1.jsx)("img", { src: src, ...imgOptions, alt: translated });
12
+ };
13
+ exports.TImgAlt = TImgAlt;
14
+ exports.default = exports.TImgAlt;