@telia-ace/widget-components-image-link 1.0.31 → 1.1.1-rc.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/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./index-6120625f.js");require("react/jsx-runtime");require("react");require("react-dom");module.exports=e.ImageLinkComponent;
package/index.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import { I as i } from "./index-2bd7b581.mjs";
2
+ import "react/jsx-runtime";
3
+ import "react";
4
+ import "react-dom";
5
+ export {
6
+ i as default
7
+ };
package/package.json CHANGED
@@ -1,47 +1,23 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-image-link",
3
- "version": "1.0.31",
4
- "description": "Image link component for ACE Widgets.",
5
- "license": "SEE LICENSE IN LICENSE.txt",
6
- "author": "Telia Company AB",
7
- "keywords": [
8
- "telia"
9
- ],
10
- "main": "dist/index.js",
11
- "sourceMain": "src/index.ts",
12
- "type": "module",
13
- "types": "dist/index.d.ts",
14
- "files": [
15
- "LICENSE.txt",
16
- "README.md",
17
- "dist/"
18
- ],
19
- "publishConfig": {
20
- "access": "public"
3
+ "version": "1.1.1-rc.0",
4
+ "main": "./index.js",
5
+ "types": "./index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./index.mjs",
9
+ "require": "./index.js"
10
+ }
21
11
  },
22
- "sideEffects": false,
23
12
  "dependencies": {
24
- "@telia-ace/widget-ui": "1.0.35",
25
- "@telia-ace/widget-utilities": "1.0.17",
26
- "@webprovisions/platform": "^1.1.3"
13
+ "@telia-ace/widget-core": "^1.1.1-rc.0",
14
+ "@telia-ace/widget-ui": "^1.1.1-rc.0",
15
+ "@telia-ace/widget-utilities": "^1.1.1-rc.0",
16
+ "@webprovisions/platform": "^1.1.4"
27
17
  },
28
18
  "peerDependencies": {
29
- "@emotion/react": "^11.10.5",
30
- "@emotion/styled": "^11.10.5",
31
- "react": "^18.2.0",
32
- "react-dom": "^18.2.0"
33
- },
34
- "devDependencies": {
35
- "@emotion/react": "^11.10.5",
36
- "@emotion/styled": "^11.10.5",
37
- "@telia-ace/widget-developer-tools": "1.0.23",
38
- "@types/react": "^18.0.27",
39
- "@types/react-dom": "^18.0.10",
40
- "react": "^18.2.0",
41
- "react-dom": "^18.2.0"
42
- },
43
- "scripts": {
44
- "clean": "rimraf ./dist",
45
- "build": "rimraf ./dist && tsc -emitDeclarationOnly && vite build"
19
+ "@emotion/react": "11.11.1",
20
+ "@emotion/styled": "11.11.0",
21
+ "react": "18.2.0"
46
22
  }
47
23
  }
package/LICENSE.txt DELETED
@@ -1,6 +0,0 @@
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
- http://www.humany.com/legal
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # `@telia-ace/widget-components-image-link`
2
-
3
- Image link component for ACE Widgets.
@@ -1,44 +0,0 @@
1
- var g = Object.defineProperty, k = Object.defineProperties;
2
- var y = Object.getOwnPropertyDescriptors;
3
- var m = Object.getOwnPropertySymbols;
4
- var p = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
5
- var n = (e, a, r) => a in e ? g(e, a, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[a] = r, d = (e, a) => {
6
- for (var r in a || (a = {}))
7
- p.call(a, r) && n(e, r, a[r]);
8
- if (m)
9
- for (var r of m(a))
10
- b.call(a, r) && n(e, r, a[r]);
11
- return e;
12
- }, u = (e, a) => k(e, y(a));
13
- var f = (e, a) => {
14
- var r = {};
15
- for (var t in e)
16
- p.call(e, t) && a.indexOf(t) < 0 && (r[t] = e[t]);
17
- if (e != null && m)
18
- for (var t of m(e))
19
- a.indexOf(t) < 0 && b.call(e, t) && (r[t] = e[t]);
20
- return r;
21
- };
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";
25
- import l from "react";
26
- const S = (r) => {
27
- var t = r, { className: e } = t, a = f(t, ["className"]);
28
- const { route: i, image: o, ariaLabel: s, altLabel: c } = L();
29
- return /* @__PURE__ */ l.createElement(x, u(d({}, a), { className: v(e, "humany-image-link") }), i ? /* @__PURE__ */ l.createElement(N, { routeName: i, "aria-label": s }, /* @__PURE__ */ l.createElement("img", { src: o, alt: c })) : /* @__PURE__ */ l.createElement("img", { src: o, alt: c, "aria-label": s }));
30
- }, x = E.div`
31
- a {
32
- display: block;
33
- &:focus-visible {
34
- ${h};
35
- }
36
- }
37
- img {
38
- max-width: 100%;
39
- }
40
- `;
41
- export {
42
- S as default
43
- };
44
- //# sourceMappingURL=image-link-3c832e94.js.map
@@ -1 +0,0 @@
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;"}
package/dist/index.js DELETED
@@ -1,6 +0,0 @@
1
- import { createReactComponent as n } from "@telia-ace/widget-ui";
2
- const o = (e) => n(e, "image-link", import("./image-link-3c832e94.js")), m = o;
3
- export {
4
- m as default
5
- };
6
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
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,0BAAc,CAAC,GAG/EE,IAAeH;"}
File without changes
File without changes