@telia-ace/widget-components-close-button 1.0.19-next.2 → 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,9 +19,9 @@ var y = (e, t) => {
19
19
  t.indexOf(s) < 0 && r.call(e, s) && (o[s] = e[s]);
20
20
  return o;
21
21
  };
22
+ import i from "@emotion/styled";
22
23
  import { useDispatch as S, useProperties as x, Button as B, borderTabStyle as $, SymbolBadge as g } from "@telia-ace/widget-ui";
23
24
  import a from "react";
24
- import i from "styled-components";
25
25
  const D = (o) => {
26
26
  var s = o, { className: e } = s, t = y(s, ["className"]);
27
27
  const p = S(), { ariaLabel: u = "" } = x();
@@ -65,4 +65,4 @@ const D = (o) => {
65
65
  export {
66
66
  D as default
67
67
  };
68
- //# sourceMappingURL=close-button.cd48ea6e.js.map
68
+ //# sourceMappingURL=close-button.5d26b7e3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"close-button.5d26b7e3.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;AAEpE,SACK,gBAAAC,EAAA,cAAAC,GAAAC,EAAAC,EAAA,IAA0BT,IAA1B;AAAA,IAAiC,WAAAD;AAAA,EAAA,IAC7B,gBAAAO,EAAA,cAAAI,GAAA;AAAA,IAAa,SAAS,MAAMR,EAAS,OAAO;AAAA,IAAG,cAAYE;AAAA,EAAA,GACvD,gBAAAE,EAAA,cAAAK,GAAA;AAAA,IAAkB,MAAM;AAAA,IAAI,QAAQ,EAAE,MAAM,OAAO,SAAS,QAAQ;AAAA,EAAG,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 CHANGED
@@ -1,8 +1,8 @@
1
1
  import { createReactComponent as n } from "@telia-ace/widget-ui";
2
- const s = (t) => n(
2
+ const r = (t) => n(
3
3
  t,
4
4
  "close-button",
5
- import("./close-button.cd48ea6e.js"),
5
+ import("./close-button.5d26b7e3.js"),
6
6
  (e) => {
7
7
  e.actions.create("close", (o = {}) => {
8
8
  if (o.preventDefault)
@@ -10,8 +10,8 @@ const s = (t) => n(
10
10
  t.get("$widget").invoke("close");
11
11
  });
12
12
  }
13
- );
13
+ ), i = r;
14
14
  export {
15
- s as default
15
+ i as default
16
16
  };
17
17
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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"],"mappings":";AAOM,MAAAA,IAAuB,CAACC,MACnBC;AAAA,EACHD;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,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;"}
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;AAAA,EACP,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;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-close-button",
3
- "version": "1.0.19-next.2",
3
+ "version": "1.0.19-next.4",
4
4
  "description": "Close button component for ACE Widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -30,13 +30,17 @@
30
30
  "@webprovisions/platform": "^1.1.2"
31
31
  },
32
32
  "peerDependencies": {
33
+ "@emotion/react": "^11.10.4",
34
+ "@emotion/styled": "^11.10.4",
33
35
  "react": "^18.2.0",
34
- "react-dom": "^18.2.0",
35
- "styled-components": "^5.3.6"
36
+ "react-dom": "^18.2.0"
36
37
  },
37
38
  "devDependencies": {
39
+ "@emotion/react": "^11.10.4",
40
+ "@emotion/styled": "^11.10.4",
38
41
  "@types/react-dom": "^18.0.6",
39
- "@types/styled-components": "^5.1.26"
42
+ "react": "^18.2.0",
43
+ "react-dom": "^18.2.0"
40
44
  },
41
- "gitHead": "a6321019663402201b8acdb3db25c99f37893340"
45
+ "gitHead": "eceba39c106d39bcb0064769bb5406db88771686"
42
46
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"close-button.cd48ea6e.js","sources":["../src/close-button.tsx"],"sourcesContent":["import {\n borderTabStyle,\n Button,\n SymbolBadge,\n useDispatch,\n useProperties,\n} from '@telia-ace/widget-ui';\nimport React from 'react';\nimport styled from 'styled-components';\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;AAEpE,SACK,gBAAAC,EAAA,cAAAC,GAAAC,EAAAC,EAAA,IAA0BT,IAA1B;AAAA,IAAiC,WAAAD;AAAA,EAAA,IAC7B,gBAAAO,EAAA,cAAAI,GAAA;AAAA,IAAa,SAAS,MAAMR,EAAS,OAAO;AAAA,IAAG,cAAYE;AAAA,EAAA,GACvD,gBAAAE,EAAA,cAAAK,GAAA;AAAA,IAAkB,MAAM;AAAA,IAAI,QAAQ,EAAE,MAAM,OAAO,SAAS,QAAQ;AAAA,EAAG,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;"}