@telia-ace/widget-components-image-link 1.0.32-next.0 → 1.0.32
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-link-3c832e94.js","sources":["../src/image-link.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { borderTabStyle, Link, useProperties } from '@telia-ace/widget-ui';\nimport { appendClassNames } from '@telia-ace/widget-utilities';\nimport React from 'react';\nimport { ImageLinkComponentProps } from './image-link-component';\n\ntype Props = {\n className: string;\n};\n\nconst ImageLink: React.FC<Props> = ({ className, ...other }) => {\n const { route, image, ariaLabel, altLabel } = useProperties<ImageLinkComponentProps>();\n\n // ariaLabel is used as alt text when no link is specified, else\n // used for aria-label on the link.\n\n return (\n <Wrapper {...other} className={appendClassNames(className, 'humany-image-link')}>\n {route ? (\n <Link routeName={route} aria-label={ariaLabel}>\n <img src={image} alt={altLabel} />\n </Link>\n ) : (\n <img src={image} alt={altLabel} aria-label={ariaLabel} />\n )}\n </Wrapper>\n );\n};\n\nconst Wrapper = styled.div`\n a {\n display: block;\n &:focus-visible {\n ${borderTabStyle};\n }\n }\n img {\n max-width: 100%;\n }\n`;\n\nexport default ImageLink;\n"],"names":["ImageLink","_a","_b","className","other","__objRest","route","image","ariaLabel","altLabel","useProperties","React","Wrapper","__spreadProps","__spreadValues","appendClassNames","Link","styled","borderTabStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,IAA6B,CAACC,MAA4B;AAA5B,MAAAC,IAAAD,GAAE,aAAAE,MAAFD,GAAgBE,IAAAC,EAAhBH,GAAgB,CAAd;AAClC,QAAM,EAAE,OAAAI,GAAO,OAAAC,GAAO,WAAAC,GAAW,UAAAC,EAAA,IAAaC;AAK9C,SACK,gBAAAC,EAAA,cAAAC,GAAAC,EAAAC,EAAA,IAAYV,IAAZ,EAAmB,WAAWW,EAAiBZ,GAAW,mBAAmB,EAAA,IACzEG,IACG,gBAAAK,EAAA,cAACK,GAAK,EAAA,WAAWV,GAAO,cAAYE,EAAA,GAC/B,gBAAAG,EAAA,cAAA,OAAA,EAAI,KAAKJ,GAAO,KAAKE,EAAA,CAAU,CACpC,IAEA,gBAAAE,EAAA,cAAC,OAAI,EAAA,KAAKJ,GAAO,KAAKE,GAAU,cAAYD,EAAW,CAAA,CAE/D;AAER,GAEMI,IAAUK,EAAO;AAAA;AAAA;AAAA;AAAA,cAITC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
1
|
+
{"version":3,"file":"image-link-3c832e94.js","sources":["../src/image-link.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { borderTabStyle, Link, useProperties } from '@telia-ace/widget-ui';\nimport { appendClassNames } from '@telia-ace/widget-utilities';\nimport React from 'react';\nimport { ImageLinkComponentProps } from './image-link-component';\n\ntype Props = {\n className: string;\n};\n\nconst ImageLink: React.FC<Props> = ({ className, ...other }) => {\n const { route, image, ariaLabel, altLabel } = useProperties<ImageLinkComponentProps>();\n\n // ariaLabel is used as alt text when no link is specified, else\n // used for aria-label on the link.\n\n return (\n <Wrapper {...other} className={appendClassNames(className, 'humany-image-link')}>\n {route ? (\n <Link routeName={route} aria-label={ariaLabel}>\n <img src={image} alt={altLabel} />\n </Link>\n ) : (\n <img src={image} alt={altLabel} aria-label={ariaLabel} />\n )}\n </Wrapper>\n );\n};\n\nconst Wrapper = styled.div`\n a {\n display: block;\n &:focus-visible {\n ${borderTabStyle};\n }\n }\n img {\n max-width: 100%;\n }\n`;\n\nexport default ImageLink;\n"],"names":["ImageLink","_a","_b","className","other","__objRest","route","image","ariaLabel","altLabel","useProperties","React","Wrapper","__spreadProps","__spreadValues","appendClassNames","Link","styled","borderTabStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,IAA6B,CAACC,MAA4B;AAA5B,MAAAC,IAAAD,GAAE,aAAAE,MAAFD,GAAgBE,IAAAC,EAAhBH,GAAgB,CAAd;AAClC,QAAM,EAAE,OAAAI,GAAO,OAAAC,GAAO,WAAAC,GAAW,UAAAC,EAAA,IAAaC;AAK9C,SACK,gBAAAC,EAAA,cAAAC,GAAAC,EAAAC,EAAA,IAAYV,IAAZ,EAAmB,WAAWW,EAAiBZ,GAAW,mBAAmB,EAAA,IACzEG,IACG,gBAAAK,EAAA,cAACK,GAAK,EAAA,WAAWV,GAAO,cAAYE,EAAA,GAC/B,gBAAAG,EAAA,cAAA,OAAA,EAAI,KAAKJ,GAAO,KAAKE,EAAA,CAAU,CACpC,IAEA,gBAAAE,EAAA,cAAC,OAAI,EAAA,KAAKJ,GAAO,KAAKE,GAAU,cAAYD,EAAW,CAAA,CAE/D;AAER,GAEMI,IAAUK,EAAO;AAAA;AAAA;AAAA;AAAA,cAITC,CAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-image-link",
|
|
3
|
-
"version": "1.0.32
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "Image link component for ACE Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@telia-ace/widget-ui": "1.0.36
|
|
25
|
-
"@telia-ace/widget-utilities": "1.0.18
|
|
26
|
-
"@webprovisions/platform": "^1.1.
|
|
24
|
+
"@telia-ace/widget-ui": "1.0.36",
|
|
25
|
+
"@telia-ace/widget-utilities": "1.0.18",
|
|
26
|
+
"@webprovisions/platform": "^1.1.4"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@emotion/react": "^11.10.5",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"react-dom": "^18.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@emotion/react": "^11.
|
|
36
|
-
"@emotion/styled": "^11.
|
|
37
|
-
"@telia-ace/widget-developer-tools": "1.0.24
|
|
38
|
-
"@types/react": "^18.
|
|
39
|
-
"@types/react-dom": "^18.
|
|
35
|
+
"@emotion/react": "^11.11.1",
|
|
36
|
+
"@emotion/styled": "^11.11.0",
|
|
37
|
+
"@telia-ace/widget-developer-tools": "1.0.24",
|
|
38
|
+
"@types/react": "^18.2.23",
|
|
39
|
+
"@types/react-dom": "^18.2.8",
|
|
40
40
|
"react": "^18.2.0",
|
|
41
41
|
"react-dom": "^18.2.0"
|
|
42
42
|
},
|