@telia-ace/widget-components-close-button 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-9afe331a.js");require("react/jsx-runtime");require("react");require("react-dom");module.exports=e.CloseButtonComponent;
package/index.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import { e } from "./index-d8df022f.mjs";
2
+ import "react/jsx-runtime";
3
+ import "react";
4
+ import "react-dom";
5
+ export {
6
+ e as default
7
+ };
package/package.json CHANGED
@@ -1,47 +1,22 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-close-button",
3
- "version": "1.0.31",
4
- "description": "Close button 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
- "@webprovisions/platform": "^1.1.3"
13
+ "@telia-ace/widget-ui": "^1.1.1-rc.0",
14
+ "@telia-ace/widget-core": "^1.1.1-rc.0",
15
+ "@webprovisions/platform": "^1.1.4"
26
16
  },
27
17
  "peerDependencies": {
28
- "@emotion/react": "^11.10.5",
29
- "@emotion/styled": "^11.10.5",
30
- "react": "^18.2.0",
31
- "react-dom": "^18.2.0"
32
- },
33
- "devDependencies": {
34
- "@emotion/react": "^11.10.5",
35
- "@emotion/styled": "^11.10.5",
36
- "@telia-ace/widget-core": "1.0.28",
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"
18
+ "@emotion/styled": "11.11.0",
19
+ "react": "18.2.0",
20
+ "@emotion/react": "11.11.1"
46
21
  }
47
22
  }
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-close-button`
2
-
3
- Close button component for ACE Widgets.
@@ -1,60 +0,0 @@
1
- var b = Object.defineProperty, f = Object.defineProperties;
2
- var h = Object.getOwnPropertyDescriptors;
3
- var l = Object.getOwnPropertySymbols;
4
- var c = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
5
- var n = (e, t, o) => t in e ? b(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, m = (e, t) => {
6
- for (var o in t || (t = {}))
7
- c.call(t, o) && n(e, o, t[o]);
8
- if (l)
9
- for (var o of l(t))
10
- r.call(t, o) && n(e, o, t[o]);
11
- return e;
12
- }, d = (e, t) => f(e, h(t));
13
- var y = (e, t) => {
14
- var o = {};
15
- for (var s in e)
16
- c.call(e, s) && t.indexOf(s) < 0 && (o[s] = e[s]);
17
- if (e != null && l)
18
- for (var s of l(e))
19
- t.indexOf(s) < 0 && r.call(e, s) && (o[s] = e[s]);
20
- return o;
21
- };
22
- import i from "@emotion/styled";
23
- import { useDispatch as S, useProperties as x, Button as B, borderTabStyle as $, SymbolBadge as g } from "@telia-ace/widget-ui";
24
- import a from "react";
25
- const D = (o) => {
26
- var s = o, { className: e } = s, t = y(s, ["className"]);
27
- const p = S(), { ariaLabel: u = "" } = x();
28
- return /* @__PURE__ */ a.createElement(v, d(m({}, t), { className: e }), /* @__PURE__ */ a.createElement(k, { onClick: () => p("close"), "aria-label": u }, /* @__PURE__ */ a.createElement(z, { size: 12, symbol: { type: "Svg", content: "close" } })));
29
- }, v = i.div`
30
- display: flex;
31
- justify-content: flex-end;
32
- align-items: flex-start;
33
- `, k = i(B)`
34
- &:focus-visible {
35
- ${$}
36
- padding: ${(e) => {
37
- var t, o;
38
- return `calc(${(t = e.theme.sizes) == null ? void 0 : t.small} / 2) ${(o = e.theme.sizes) == null ? void 0 : o.small}`;
39
- }};
40
- line,
41
- path {
42
- stroke: ${(e) => {
43
- var t, o;
44
- return (o = (t = e.theme.accessibility) == null ? void 0 : t.colors) == null ? void 0 : o.inactiveText;
45
- }};
46
- }
47
- }
48
- `, z = i(g)`
49
- line,
50
- path {
51
- stroke: ${(e) => {
52
- var t;
53
- return (t = e.theme.colors) == null ? void 0 : t.text;
54
- }};
55
- }
56
- `;
57
- export {
58
- D as default
59
- };
60
- //# sourceMappingURL=close-button-1dac931a.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"close-button-1dac931a.js","sources":["../src/close-button.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport {\n borderTabStyle,\n Button,\n SymbolBadge,\n useDispatch,\n useProperties,\n} from '@telia-ace/widget-ui';\nimport React from 'react';\nimport { CloseButtonComponentProps } from './close-button-component';\n\ntype Props = {\n className: string;\n};\n\nconst CloseButton: React.FC<Props> = ({ className, ...other }) => {\n const dispatch = useDispatch();\n const { ariaLabel = '' } = useProperties<CloseButtonComponentProps>();\n\n return (\n <StyledButtonContainer {...other} className={className}>\n <StyledButton onClick={() => dispatch('close')} aria-label={ariaLabel}>\n <StyledSymbolBadge size={12} symbol={{ type: 'Svg', content: 'close' }} />\n </StyledButton>\n </StyledButtonContainer>\n );\n};\n\nexport default CloseButton;\n\nconst StyledButtonContainer = styled.div`\n display: flex;\n justify-content: flex-end;\n align-items: flex-start;\n`;\n\nconst StyledButton = styled(Button)`\n &:focus-visible {\n ${borderTabStyle}\n padding: ${(p) => `calc(${p.theme.sizes?.small} / 2) ${p.theme.sizes?.small}`};\n line,\n path {\n stroke: ${(p) => p.theme.accessibility?.colors?.inactiveText};\n }\n }\n`;\n\nconst StyledSymbolBadge = styled(SymbolBadge)`\n line,\n path {\n stroke: ${(p) => p.theme.colors?.text};\n }\n`;\n"],"names":["CloseButton","_a","_b","className","other","__objRest","dispatch","useDispatch","ariaLabel","useProperties","React","StyledButtonContainer","__spreadProps","__spreadValues","StyledButton","StyledSymbolBadge","styled","Button","borderTabStyle","p","SymbolBadge"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAMA,IAA+B,CAACC,MAA4B;AAA5B,MAAAC,IAAAD,GAAE,aAAAE,MAAFD,GAAgBE,IAAAC,EAAhBH,GAAgB,CAAd;AACpC,QAAMI,IAAWC,KACX,EAAE,WAAAC,IAAY,GAAG,IAAIC,EAAyC;AAGhE,SAAA,gBAAAC,EAAA,cAACC,GAAuBC,EAAAC,EAAA,IAAGT,IAAH,EAAU,WAAAD,EAAA,IAC7B,gBAAAO,EAAA,cAAAI,GAAA,EAAa,SAAS,MAAMR,EAAS,OAAO,GAAG,cAAYE,KACvD,gBAAAE,EAAA,cAAAK,GAAA,EAAkB,MAAM,IAAI,QAAQ,EAAE,MAAM,OAAO,SAAS,QAAA,EAAW,CAAA,CAC5E,CACJ;AAER,GAIMJ,IAAwBK,EAAO;AAAA;AAAA;AAAA;AAAA,GAM/BF,IAAeE,EAAOC,CAAM;AAAA;AAAA,UAExBC;AAAA,mBACS,CAACC,MAAM;;AAAA,kBAAQlB,IAAAkB,EAAE,MAAM,UAAR,gBAAAlB,EAAe,eAAcC,IAAAiB,EAAE,MAAM,UAAR,gBAAAjB,EAAe;AAAA;AAAA;AAAA;AAAA,sBAGxD,CAACiB,MAAA;;AAAM,UAAAjB,KAAAD,IAAAkB,EAAE,MAAM,kBAAR,gBAAAlB,EAAuB,WAAvB,gBAAAC,EAA+B;AAAA;AAAA;AAAA;AAAA,GAKtDa,IAAoBC,EAAOI,CAAW;AAAA;AAAA;AAAA,kBAG1B,CAACD,MAAM;;AAAA,UAAAlB,IAAAkB,EAAE,MAAM,WAAR,gBAAAlB,EAAgB;AAAA;AAAA;AAAA;"}
package/dist/index.js DELETED
@@ -1,17 +0,0 @@
1
- import { createReactComponent as n } from "@telia-ace/widget-ui";
2
- const r = (t) => n(
3
- t,
4
- "close-button",
5
- import("./close-button-1dac931a.js"),
6
- (e) => {
7
- e.actions.create("close", (o = {}) => {
8
- if (o.preventDefault)
9
- return;
10
- t.get("$widget").invoke("close");
11
- });
12
- }
13
- ), i = r;
14
- export {
15
- i as default
16
- };
17
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../src/close-button-component.ts"],"sourcesContent":["import { createReactComponent } from '@telia-ace/widget-ui';\nimport { Container } from '@webprovisions/platform';\n\nexport type CloseButtonComponentProps = {\n ariaLabel?: string;\n};\n\nconst CloseButtonComponent = (container: Container) => {\n return createReactComponent(\n container,\n 'close-button',\n import('./close-button'),\n (component) => {\n // Action: 'close'\n component.actions.create('close', (options = {}) => {\n if (options.preventDefault) {\n return;\n }\n\n const widget = container.get('$widget');\n widget.invoke('close');\n });\n }\n );\n};\n\nexport default CloseButtonComponent;\n"],"names":["CloseButtonComponent","container","createReactComponent","component","options","CloseButtonComponent$1"],"mappings":";AAOA,MAAMA,IAAuB,CAACC,MACnBC;AAAA,EACHD;AAAA,EACA;AAAA,EACA,OAAO,4BAAgB;AAAA,EACvB,CAACE,MAAc;AAEX,IAAAA,EAAU,QAAQ,OAAO,SAAS,CAACC,IAAU,CAAA,MAAO;AAChD,UAAIA,EAAQ;AACR;AAIJ,MADeH,EAAU,IAAI,SAAS,EAC/B,OAAO,OAAO;AAAA,IAAA,CACxB;AAAA,EACL;AAAA,GAIRI,IAAeL;"}
File without changes
File without changes