@telia-ace/widget-components-close-button 1.0.18 → 1.0.19-next.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/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
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:
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
6
  http://www.humany.com/legal
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # `@telia-ace/widget-components-close-button`
2
-
3
- Close button component for ACE Widgets.
1
+ # `@telia-ace/widget-components-close-button`
2
+
3
+ Close button component for ACE Widgets.
@@ -1,6 +1,6 @@
1
- import { Container } from '@webprovisions/platform';
2
- export declare type CloseButtonComponentProps = {
3
- ariaLabel?: string;
4
- };
5
- declare const CloseButtonComponent: (container: Container) => Promise<void>;
6
- export default CloseButtonComponent;
1
+ import { Container } from '@webprovisions/platform';
2
+ export declare type CloseButtonComponentProps = {
3
+ ariaLabel?: string;
4
+ };
5
+ declare const CloseButtonComponent: (container: Container) => Promise<void>;
6
+ export default CloseButtonComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"close-button.cd48ea6e.js","sources":["../src/close-button.tsx"],"sourcesContent":["import {\r\n borderTabStyle,\r\n Button,\r\n SymbolBadge,\r\n useDispatch,\r\n useProperties,\r\n} from '@telia-ace/widget-ui';\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { CloseButtonComponentProps } from './close-button-component';\r\n\r\ntype Props = {\r\n className: string;\r\n};\r\n\r\nconst CloseButton: React.SFC<Props> = ({ className, ...other }) => {\r\n const dispatch = useDispatch();\r\n const { ariaLabel = '' } = useProperties<CloseButtonComponentProps>();\r\n\r\n return (\r\n <StyledButtonContainer {...other} className={className}>\r\n <StyledButton onClick={() => dispatch('close')} aria-label={ariaLabel}>\r\n <StyledSymbolBadge size={12} symbol={{ type: 'Svg', content: 'close' }} />\r\n </StyledButton>\r\n </StyledButtonContainer>\r\n );\r\n};\r\n\r\nexport default CloseButton;\r\n\r\nconst StyledButtonContainer = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n align-items: flex-start;\r\n`;\r\n\r\nconst StyledButton = styled(Button)`\r\n &:focus-visible {\r\n ${borderTabStyle}\r\n padding: ${(p) => `calc(${p.theme.sizes?.small} / 2) ${p.theme.sizes?.small}`};\r\n line,\r\n path {\r\n stroke: ${(p) => p.theme.accessibility?.colors?.inactiveText};\r\n }\r\n }\r\n`;\r\n\r\nconst StyledSymbolBadge = styled(SymbolBadge)`\r\n line,\r\n path {\r\n stroke: ${(p) => p.theme.colors?.text};\r\n }\r\n`;\r\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,IAAgC,CAACC,MAA4B;AAA5B,MAAAC,IAAAD,GAAE,aAAAE,MAAFD,GAAgBE,IAAAC,EAAhBH,GAAgB,CAAd;AACrC,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;"}
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;"}
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- declare type Props = {
3
- className: string;
4
- };
5
- declare const CloseButton: React.SFC<Props>;
6
- export default CloseButton;
1
+ import React from 'react';
2
+ declare type Props = {
3
+ className: string;
4
+ };
5
+ declare const CloseButton: React.FC<Props>;
6
+ export default CloseButton;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import CloseButtonComponent from './close-button-component';
2
- export default CloseButtonComponent;
1
+ import CloseButtonComponent from './close-button-component';
2
+ export default CloseButtonComponent;
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';\r\nimport { Container } from '@webprovisions/platform';\r\n\r\nexport type CloseButtonComponentProps = {\r\n ariaLabel?: string;\r\n};\r\n\r\nconst CloseButtonComponent = (container: Container) => {\r\n return createReactComponent(\r\n container,\r\n 'close-button',\r\n import('./close-button'),\r\n (component) => {\r\n // Action: 'close'\r\n component.actions.create('close', (options = {}) => {\r\n if (options.preventDefault) {\r\n return;\r\n }\r\n\r\n const widget = container.get('$widget');\r\n widget.invoke('close');\r\n });\r\n }\r\n );\r\n};\r\n\r\nexport default CloseButtonComponent;\r\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"],"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;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-close-button",
3
- "version": "1.0.18",
3
+ "version": "1.0.19-next.0",
4
4
  "description": "Close button component for ACE Widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -26,18 +26,17 @@
26
26
  },
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@telia-ace/widget-ui": "^1.0.22",
29
+ "@telia-ace/widget-ui": "^1.0.23-next.1",
30
30
  "@webprovisions/platform": "^1.1.2"
31
31
  },
32
32
  "peerDependencies": {
33
- "react": "^16.8.0",
34
- "react-dom": "^16.8.0",
35
- "styled-components": "^4.3.2"
33
+ "react": "^18.2.0",
34
+ "react-dom": "^18.2.0",
35
+ "styled-components": "^5.3.6"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/react": "^16.8.0",
39
- "@types/react-dom": "^16.8.0",
40
- "@types/styled-components": "^5.1.7"
38
+ "@types/react-dom": "^18.0.6",
39
+ "@types/styled-components": "^5.1.26"
41
40
  },
42
- "gitHead": "c3045eebac4251ae8ba27333abd9b6aa3ccd5b38"
41
+ "gitHead": "d475a1626b7bec7add7db950829ef7943a9e0e25"
43
42
  }