@telia-ace/widget-components-image-link 1.0.19-next.3 → 1.0.19-next.4

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.
@@ -19,16 +19,16 @@ var f = (e, a) => {
19
19
  a.indexOf(t) < 0 && b.call(e, t) && (r[t] = e[t]);
20
20
  return r;
21
21
  };
22
- import { useProperties as E, Link as L, borderTabStyle as N } from "@telia-ace/widget-ui";
23
- import { appendClassNames as h } from "@telia-ace/widget-utilities";
22
+ import E from "@emotion/styled";
23
+ import { useProperties as L, Link as N, borderTabStyle as h } from "@telia-ace/widget-ui";
24
+ import { appendClassNames as v } from "@telia-ace/widget-utilities";
24
25
  import l from "react";
25
- import v from "styled-components";
26
26
  const S = (r) => {
27
27
  var t = r, { className: e } = t, a = f(t, ["className"]);
28
- const { route: i, image: o, ariaLabel: s, altLabel: c } = E();
28
+ const { route: i, image: o, ariaLabel: s, altLabel: c } = L();
29
29
  return /* @__PURE__ */ l.createElement(x, u(d({}, a), {
30
- className: h(e, "humany-image-link")
31
- }), i ? /* @__PURE__ */ l.createElement(L, {
30
+ className: v(e, "humany-image-link")
31
+ }), i ? /* @__PURE__ */ l.createElement(N, {
32
32
  routeName: i,
33
33
  "aria-label": s
34
34
  }, /* @__PURE__ */ l.createElement("img", {
@@ -39,11 +39,11 @@ const S = (r) => {
39
39
  alt: c,
40
40
  "aria-label": s
41
41
  }));
42
- }, x = v.div`
42
+ }, x = E.div`
43
43
  a {
44
44
  display: block;
45
45
  &:focus-visible {
46
- ${N};
46
+ ${h};
47
47
  }
48
48
  }
49
49
  img {
@@ -53,4 +53,4 @@ const S = (r) => {
53
53
  export {
54
54
  S as default
55
55
  };
56
- //# sourceMappingURL=image-link.05d2515a.js.map
56
+ //# sourceMappingURL=image-link.cfc65681.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-link.cfc65681.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;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;"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { createReactComponent as t } from "@telia-ace/widget-ui";
2
- const n = (e) => t(e, "image-link", import("./image-link.05d2515a.js"));
1
+ import { createReactComponent as n } from "@telia-ace/widget-ui";
2
+ const o = (e) => n(e, "image-link", import("./image-link.cfc65681.js")), m = o;
3
3
  export {
4
- n as default
4
+ m as default
5
5
  };
6
6
  //# sourceMappingURL=index.js.map
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';\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;"}
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","ImageLinkComponent$1"],"mappings":";AAUA,MAAMA,IAAqB,CAACC,MACjBC,EAAqBD,GAAW,cAAc,OAAO,2BAAe,GAG/EE,IAAeH;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-image-link",
3
- "version": "1.0.19-next.3",
3
+ "version": "1.0.19-next.4",
4
4
  "description": "Image link component for ACE Widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -31,16 +31,17 @@
31
31
  "@webprovisions/platform": "^1.1.2"
32
32
  },
33
33
  "peerDependencies": {
34
+ "@emotion/react": "^11.10.4",
35
+ "@emotion/styled": "^11.10.4",
34
36
  "react": "^18.2.0",
35
- "react-dom": "^18.2.0",
36
- "styled-components": "^5.3.6"
37
+ "react-dom": "^18.2.0"
37
38
  },
38
39
  "devDependencies": {
40
+ "@emotion/react": "^11.10.4",
41
+ "@emotion/styled": "^11.10.4",
39
42
  "@types/react-dom": "^18.0.6",
40
- "@types/styled-components": "^5.1.26",
41
43
  "react": "^18.2.0",
42
- "react-dom": "^18.2.0",
43
- "styled-components": "^5.3.6"
44
+ "react-dom": "^18.2.0"
44
45
  },
45
- "gitHead": "2097fcca840d4a41a639f78c53af2f43c36d287a"
46
+ "gitHead": "eceba39c106d39bcb0064769bb5406db88771686"
46
47
  }
@@ -1 +0,0 @@
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;"}