@telia-ace/widget-components-image-link 1.1.1-rc.2 → 1.1.1-rc.3

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.
@@ -0,0 +1,11 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("@emotion/styled"),i=require("@telia-ace/widget-ui"),c=require("@telia-ace/widget-utilities"),u=({className:l,...n})=>{const{route:a,image:r,ariaLabel:t,altLabel:s}=i.useProperties();return e.jsx(d,{...n,className:c.appendClassNames(l,"humany-image-link"),children:a?e.jsx(i.Link,{routeName:a,"aria-label":t,children:e.jsx("img",{src:r,alt:s})}):e.jsx("img",{src:r,alt:s,"aria-label":t})})},d=o.div`
2
+ a {
3
+ display: block;
4
+ &:focus-visible {
5
+ ${i.borderTabStyle};
6
+ }
7
+ }
8
+ img {
9
+ max-width: 100%;
10
+ }
11
+ `;exports.default=u;
@@ -0,0 +1,21 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import o from "@emotion/styled";
3
+ import { useProperties as s, Link as n, borderTabStyle as p } from "@telia-ace/widget-ui";
4
+ import { appendClassNames as c } from "@telia-ace/widget-utilities";
5
+ const h = ({ className: m, ...t }) => {
6
+ const { route: e, image: r, ariaLabel: i, altLabel: l } = s();
7
+ return /* @__PURE__ */ a(d, { ...t, className: c(m, "humany-image-link"), children: e ? /* @__PURE__ */ a(n, { routeName: e, "aria-label": i, children: /* @__PURE__ */ a("img", { src: r, alt: l }) }) : /* @__PURE__ */ a("img", { src: r, alt: l, "aria-label": i }) });
8
+ }, d = o.div`
9
+ a {
10
+ display: block;
11
+ &:focus-visible {
12
+ ${p};
13
+ }
14
+ }
15
+ img {
16
+ max-width: 100%;
17
+ }
18
+ `;
19
+ export {
20
+ h as default
21
+ };
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index-6cc1b5e6.js");require("@emotion/react");require("react/jsx-runtime");require("react");require("@emotion/styled");require("react-transition-group");require("react-dom");require("react-router-dom");module.exports=e.ImageLinkComponent;
1
+ "use strict";const t=require("@telia-ace/widget-ui"),r=e=>t.createReactComponent(e,"image-link",Promise.resolve().then(()=>require("./image-link-cc3f21dc.js")));module.exports=r;
package/index.mjs CHANGED
@@ -1,11 +1,5 @@
1
- import { I as d } from "./index-3743be8d.mjs";
2
- import "@emotion/react";
3
- import "react/jsx-runtime";
4
- import "react";
5
- import "@emotion/styled";
6
- import "react-transition-group";
7
- import "react-dom";
8
- import "react-router-dom";
1
+ import { createReactComponent as t } from "@telia-ace/widget-ui";
2
+ const n = (e) => t(e, "image-link", import("./image-link-df3cdeed.mjs"));
9
3
  export {
10
- d as default
4
+ n as default
11
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-image-link",
3
- "version": "1.1.1-rc.2",
3
+ "version": "1.1.1-rc.3",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -10,9 +10,9 @@
10
10
  }
11
11
  },
12
12
  "dependencies": {
13
- "@telia-ace/widget-core": "^1.1.1-rc.2",
14
- "@telia-ace/widget-ui": "^1.1.1-rc.2",
15
- "@telia-ace/widget-utilities": "^1.1.1-rc.2",
13
+ "@telia-ace/widget-core": "^1.1.1-rc.3",
14
+ "@telia-ace/widget-ui": "^1.1.1-rc.3",
15
+ "@telia-ace/widget-utilities": "^1.1.1-rc.3",
16
16
  "@webprovisions/platform": "^1.1.4"
17
17
  },
18
18
  "peerDependencies": {
@@ -1,25 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import m from "@emotion/styled";
3
- import "@emotion/react";
4
- import { C as p, a as l, L as n, b as c } from "./index-3743be8d.mjs";
5
- import { useContext as b } from "react";
6
- import "react-dom";
7
- import "react-transition-group";
8
- import "react-router-dom";
9
- const d = () => b(p), N = ({ className: e, ...s }) => {
10
- const { route: a, image: t, ariaLabel: o, altLabel: i } = d();
11
- return /* @__PURE__ */ r(u, { ...s, className: l(e, "humany-image-link"), children: a ? /* @__PURE__ */ r(n, { routeName: a, "aria-label": o, children: /* @__PURE__ */ r("img", { src: t, alt: i }) }) : /* @__PURE__ */ r("img", { src: t, alt: i, "aria-label": o }) });
12
- }, u = m.div`
13
- a {
14
- display: block;
15
- &:focus-visible {
16
- ${c};
17
- }
18
- }
19
- img {
20
- max-width: 100%;
21
- }
22
- `;
23
- export {
24
- N as default
25
- };
@@ -1,11 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("@emotion/styled");require("@emotion/react");const r=require("./index-6cc1b5e6.js"),u=require("react");require("react-dom");require("react-transition-group");require("react-router-dom");const c=()=>u.useContext(r.ComponentPropertyContext),m=({className:t,...o})=>{const{route:i,image:a,ariaLabel:s,altLabel:n}=c();return e.jsx(p,{...o,className:r.appendClassNames(t,"humany-image-link"),children:i?e.jsx(r.Link,{routeName:i,"aria-label":s,children:e.jsx("img",{src:a,alt:n})}):e.jsx("img",{src:a,alt:n,"aria-label":s})})},p=l.div`
2
- a {
3
- display: block;
4
- &:focus-visible {
5
- ${r.borderTabStyle};
6
- }
7
- }
8
- img {
9
- max-width: 100%;
10
- }
11
- `;exports.default=m;