@telia-ace/widget-components-image-link 1.0.18 → 1.0.19-next.0

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/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
- Copyright © 2021, Telia Company AB. All rights reserved.
2
-
3
- THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
4
- THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
5
- AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
1
+ Copyright © 2021, Telia Company AB. All rights reserved.
2
+
3
+ THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
4
+ THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
5
+ AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
6
6
  http://www.humany.com/legal
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # `@telia-ace/widget-components-image-link`
2
-
3
- Image link component for ACE Widgets.
1
+ # `@telia-ace/widget-components-image-link`
2
+
3
+ Image link component for ACE Widgets.
@@ -1,9 +1,9 @@
1
- import { Container } from '@webprovisions/platform';
2
- export declare type ImageLinkComponentProps = {
3
- route: string;
4
- image: string;
5
- ariaLabel: string;
6
- altLabel: string;
7
- };
8
- declare const ImageLinkComponent: (container: Container) => Promise<void>;
9
- export default ImageLinkComponent;
1
+ import { Container } from '@webprovisions/platform';
2
+ export declare type ImageLinkComponentProps = {
3
+ route: string;
4
+ image: string;
5
+ ariaLabel: string;
6
+ altLabel: string;
7
+ };
8
+ declare const ImageLinkComponent: (container: Container) => Promise<void>;
9
+ export default ImageLinkComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"image-link.05d2515a.js","sources":["../src/image-link.tsx"],"sourcesContent":["import { borderTabStyle, Link, useProperties } from '@telia-ace/widget-ui';\r\nimport { appendClassNames } from '@telia-ace/widget-utilities';\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { ImageLinkComponentProps } from './image-link-component';\r\n\r\ntype Props = {\r\n className: string;\r\n};\r\n\r\nconst ImageLink: React.SFC<Props> = ({ className, ...other }) => {\r\n const { route, image, ariaLabel, altLabel } = useProperties<ImageLinkComponentProps>();\r\n\r\n // ariaLabel is used as alt text when no link is specified, else\r\n // used for aria-label on the link.\r\n\r\n return (\r\n <Wrapper {...other} className={appendClassNames(className, 'humany-image-link')}>\r\n {route ? (\r\n <Link routeName={route} aria-label={ariaLabel}>\r\n <img src={image} alt={altLabel} />\r\n </Link>\r\n ) : (\r\n <img src={image} alt={altLabel} aria-label={ariaLabel} />\r\n )}\r\n </Wrapper>\r\n );\r\n};\r\n\r\nconst Wrapper = styled.div`\r\n a {\r\n display: block;\r\n &:focus-visible {\r\n ${borderTabStyle};\r\n }\r\n }\r\n img {\r\n max-width: 100%;\r\n }\r\n`;\r\n\r\nexport default ImageLink;\r\n"],"names":["ImageLink","_a","_b","className","other","__objRest","route","image","ariaLabel","altLabel","useProperties","React","Wrapper","__spreadProps","__spreadValues","appendClassNames","Link","styled","borderTabStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,IAA8B,CAACC,MAA4B;AAA5B,MAAAC,IAAAD,GAAE,aAAAE,MAAFD,GAAgBE,IAAAC,EAAhBH,GAAgB,CAAd;AACnC,QAAM,EAAE,OAAAI,GAAO,OAAAC,GAAO,WAAAC,GAAW,UAAAC,EAAA,IAAaC;AAK9C,SACK,gBAAAC,EAAA,cAAAC,GAAAC,EAAAC,EAAA,IAAYV,IAAZ;AAAA,IAAmB,WAAWW,EAAiBZ,GAAW,mBAAmB;AAAA,EAAA,IACzEG,IACI,gBAAAK,EAAA,cAAAK,GAAA;AAAA,IAAK,WAAWV;AAAA,IAAO,cAAYE;AAAA,EAAA,GAC/B,gBAAAG,EAAA,cAAA,OAAA;AAAA,IAAI,KAAKJ;AAAA,IAAO,KAAKE;AAAA,EAAU,CAAA,CACpC,IAEC,gBAAAE,EAAA,cAAA,OAAA;AAAA,IAAI,KAAKJ;AAAA,IAAO,KAAKE;AAAA,IAAU,cAAYD;AAAA,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.05d2515a.js","sources":["../src/image-link.tsx"],"sourcesContent":["import { borderTabStyle, Link, useProperties } from '@telia-ace/widget-ui';\nimport { appendClassNames } from '@telia-ace/widget-utilities';\nimport React from 'react';\nimport styled from 'styled-components';\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;AAAA,IAAmB,WAAWW,EAAiBZ,GAAW,mBAAmB;AAAA,EAAA,IACzEG,IACI,gBAAAK,EAAA,cAAAK,GAAA;AAAA,IAAK,WAAWV;AAAA,IAAO,cAAYE;AAAA,EAAA,GAC/B,gBAAAG,EAAA,cAAA,OAAA;AAAA,IAAI,KAAKJ;AAAA,IAAO,KAAKE;AAAA,EAAU,CAAA,CACpC,IAEC,gBAAAE,EAAA,cAAA,OAAA;AAAA,IAAI,KAAKJ;AAAA,IAAO,KAAKE;AAAA,IAAU,cAAYD;AAAA,EAAW,CAAA,CAE/D;AAER,GAEMI,IAAUK,EAAO;AAAA;AAAA;AAAA;AAAA,cAITC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- declare type Props = {
3
- className: string;
4
- };
5
- declare const ImageLink: React.SFC<Props>;
6
- export default ImageLink;
1
+ import React from 'react';
2
+ declare type Props = {
3
+ className: string;
4
+ };
5
+ declare const ImageLink: React.FC<Props>;
6
+ export default ImageLink;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import ImageLinkComponent from './image-link-component';
2
- export default ImageLinkComponent;
1
+ import ImageLinkComponent from './image-link-component';
2
+ export default ImageLinkComponent;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/image-link-component.ts"],"sourcesContent":["import { createReactComponent } from '@telia-ace/widget-ui';\r\nimport { Container } from '@webprovisions/platform';\r\n\r\nexport type ImageLinkComponentProps = {\r\n route: string;\r\n image: string;\r\n ariaLabel: string;\r\n altLabel: string;\r\n};\r\n\r\nconst ImageLinkComponent = (container: Container) => {\r\n return createReactComponent(container, 'image-link', import('./image-link'));\r\n};\r\n\r\nexport default ImageLinkComponent;\r\n"],"names":["ImageLinkComponent","container","createReactComponent"],"mappings":";AAUM,MAAAA,IAAqB,CAACC,MACjBC,EAAqBD,GAAW,cAAc,OAAO,2BAAe;"}
1
+ {"version":3,"file":"index.js","sources":["../src/image-link-component.ts"],"sourcesContent":["import { createReactComponent } from '@telia-ace/widget-ui';\nimport { Container } from '@webprovisions/platform';\n\nexport type ImageLinkComponentProps = {\n route: string;\n image: string;\n ariaLabel: string;\n altLabel: string;\n};\n\nconst ImageLinkComponent = (container: Container) => {\n return createReactComponent(container, 'image-link', import('./image-link'));\n};\n\nexport default ImageLinkComponent;\n"],"names":["ImageLinkComponent","container","createReactComponent"],"mappings":";AAUM,MAAAA,IAAqB,CAACC,MACjBC,EAAqBD,GAAW,cAAc,OAAO,2BAAe;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-image-link",
3
- "version": "1.0.18",
3
+ "version": "1.0.19-next.0",
4
4
  "description": "Image link component for ACE Widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -26,19 +26,18 @@
26
26
  },
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@telia-ace/widget-ui": "^1.0.22",
30
- "@telia-ace/widget-utilities": "^1.0.4",
29
+ "@telia-ace/widget-ui": "^1.0.23-next.1",
30
+ "@telia-ace/widget-utilities": "^1.0.5-next.1",
31
31
  "@webprovisions/platform": "^1.1.2"
32
32
  },
33
33
  "peerDependencies": {
34
- "react": "^16.8.0",
35
- "react-dom": "^16.8.0",
36
- "styled-components": "^4.3.2"
34
+ "react": "^18.2.0",
35
+ "react-dom": "^18.2.0",
36
+ "styled-components": "^5.3.6"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/react": "^16.8.0",
40
- "@types/react-dom": "^16.8.0",
41
- "@types/styled-components": "^5.1.7"
39
+ "@types/react-dom": "^18.0.6",
40
+ "@types/styled-components": "^5.1.26"
42
41
  },
43
- "gitHead": "c3045eebac4251ae8ba27333abd9b6aa3ccd5b38"
42
+ "gitHead": "d475a1626b7bec7add7db950829ef7943a9e0e25"
44
43
  }