@telia-ace/knowledge-widget-components-contact-link 1.0.1
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 +6 -0
- package/README.md +3 -0
- package/lib/contact-link-component.d.ts +14 -0
- package/lib/contact-link-component.js +30 -0
- package/lib/contact-link.d.ts +6 -0
- package/lib/contact-link.js +90 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +7 -0
- package/lib-esm/contact-link-component.d.ts +14 -0
- package/lib-esm/contact-link-component.js +5 -0
- package/lib-esm/contact-link.d.ts +6 -0
- package/lib-esm/contact-link.js +62 -0
- package/lib-esm/index.d.ts +2 -0
- package/lib-esm/index.js +2 -0
- package/package.json +42 -0
package/LICENSE.txt
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Symbol } from '@telia-ace/knowledge-widget-core';
|
|
2
|
+
import { Container } from '@webprovisions/platform';
|
|
3
|
+
export declare type ContactLinkComponentProps = {
|
|
4
|
+
widget: string;
|
|
5
|
+
route: string;
|
|
6
|
+
mode: 'large' | 'compact';
|
|
7
|
+
iconSize: 'large' | 'small';
|
|
8
|
+
symbol?: Symbol;
|
|
9
|
+
label: string;
|
|
10
|
+
descriptionLabel: string;
|
|
11
|
+
textAlign: string;
|
|
12
|
+
};
|
|
13
|
+
declare const ContactLinkComponent: (container: Container) => Promise<void>;
|
|
14
|
+
export default ContactLinkComponent;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
var knowledge_widget_ui_1 = require("@telia-ace/knowledge-widget-ui");
|
|
27
|
+
var ContactLinkComponent = function (container) {
|
|
28
|
+
return (0, knowledge_widget_ui_1.createReactComponent)(container, 'contact-link', Promise.resolve().then(function () { return __importStar(require('./contact-link')); }));
|
|
29
|
+
};
|
|
30
|
+
exports.default = ContactLinkComponent;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
41
|
+
var t = {};
|
|
42
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
43
|
+
t[p] = s[p];
|
|
44
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
45
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
46
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
47
|
+
t[p[i]] = s[p[i]];
|
|
48
|
+
}
|
|
49
|
+
return t;
|
|
50
|
+
};
|
|
51
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
52
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
53
|
+
};
|
|
54
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
+
var knowledge_widget_ui_1 = require("@telia-ace/knowledge-widget-ui");
|
|
56
|
+
var widget_utilities_1 = require("@telia-ace/widget-utilities");
|
|
57
|
+
var react_1 = __importDefault(require("react"));
|
|
58
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
59
|
+
var ContactLink = function (_a) {
|
|
60
|
+
var className = _a.className, other = __rest(_a, ["className"]);
|
|
61
|
+
var _b = (0, knowledge_widget_ui_1.useProperties)(), widget = _b.widget, route = _b.route, _c = _b.mode, mode = _c === void 0 ? 'large' : _c, _d = _b.iconSize, iconSize = _d === void 0 ? 'large' : _d, symbol = _b.symbol, descriptionLabel = _b.descriptionLabel, label = _b.label, textAlign = _b.textAlign;
|
|
62
|
+
var align = textAlign ? textAlign : mode === 'large' ? 'center' : 'right';
|
|
63
|
+
var iconSizePx = iconSize === 'large' ? '64' : '48';
|
|
64
|
+
var activationOptions = {
|
|
65
|
+
apiNotificationPriorityBy: 'contacts',
|
|
66
|
+
};
|
|
67
|
+
if (mode === 'compact') {
|
|
68
|
+
return (react_1.default.createElement(CompactWrapper, __assign({}, other, { className: (0, widget_utilities_1.appendClassNames)(className, 'humany-contact-link', 'humany-contact-link-compact'), textAlign: align }),
|
|
69
|
+
descriptionLabel && react_1.default.createElement(knowledge_widget_ui_1.Text, null, descriptionLabel),
|
|
70
|
+
route ? (react_1.default.createElement(knowledge_widget_ui_1.Link, { routeName: route }, label)) : (react_1.default.createElement(knowledge_widget_ui_1.WidgetLink, { "aria-haspopup": "dialog", role: "button", activationOptions: activationOptions, widgetName: widget }, label))));
|
|
71
|
+
}
|
|
72
|
+
var children = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
73
|
+
symbol ? (react_1.default.createElement(knowledge_widget_ui_1.SymbolBadge, { symbol: symbol })) : (react_1.default.createElement(ContactIcon, { width: iconSizePx, viewBox: "0 0 63 37", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
74
|
+
react_1.default.createElement("path", { d: "M1 1H62M1 1L24.7579 15.6328M1 1V36M62 1V36M62 1L38.8842 15.5402M1 36H62M1 36L24.7579 15.6328M62 36L38.8842 15.5402M38.8842 15.5402L37.0898 16.6689C33.8642 18.6979 29.7658 18.7172 26.5212 16.7188L24.7579 15.6328", stroke: "#990AE3" }))),
|
|
75
|
+
label && react_1.default.createElement(Heading, null, label),
|
|
76
|
+
descriptionLabel && react_1.default.createElement(Description, null, descriptionLabel)));
|
|
77
|
+
return route ? (react_1.default.createElement(StyledLink, __assign({}, other, { className: (0, widget_utilities_1.appendClassNames)(className, 'humany-contact-link', 'humany-contact-link-large'), routeName: route }), children)) : (react_1.default.createElement(StyledWidgetLink, __assign({}, other, { "aria-haspopup": "dialog", role: "button", className: (0, widget_utilities_1.appendClassNames)(className, 'humany-contact-link', 'humany-contact-link-large'), textAlign: align, widgetName: widget, activationOptions: activationOptions }), children));
|
|
78
|
+
};
|
|
79
|
+
var CompactWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: ", ";\n font-weight: 300;\n\n span,\n a {\n display: inline-block;\n font-size: ", ";\n }\n\n span {\n margin: 0 ", " 0 0;\n }\n a {\n text-decoration: underline;\n color: ", ";\n &:focus {\n ", ";\n }\n }\n"], ["\n text-align: ", ";\n font-weight: 300;\n\n span,\n a {\n display: inline-block;\n font-size: ", ";\n }\n\n span {\n margin: 0 ", " 0 0;\n }\n a {\n text-decoration: underline;\n color: ", ";\n &:focus {\n ", ";\n }\n }\n"])), function (p) { return p.textAlign; }, function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) {
|
|
80
|
+
var _a;
|
|
81
|
+
return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n padding: ", ";\n "], ["\n ", "\n padding: ", ";\n "])), knowledge_widget_ui_1.linkTabStyle, function (p) { var _a, _b; return "calc(".concat((_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small, " / 2) ").concat((_b = p.theme.sizes) === null || _b === void 0 ? void 0 : _b.small); });
|
|
82
|
+
});
|
|
83
|
+
var styling = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n padding: ", ";\n text-align: center;\n cursor: pointer;\n text-decoration: none;\n i {\n font-size: ", ";\n min-width: 1em;\n min-height: 1em;\n color: ", ";\n }\n span {\n color: ", ";\n }\n &:focus {\n ", ";\n }\n"], ["\n ", "\n padding: ", ";\n text-align: center;\n cursor: pointer;\n text-decoration: none;\n i {\n font-size: ", ";\n min-width: 1em;\n min-height: 1em;\n color: ", ";\n }\n span {\n color: ", ";\n }\n &:focus {\n ", ";\n }\n"])), knowledge_widget_ui_1.contentBox, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.large; }, function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.huge; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; }, function (p) { var _a; return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && knowledge_widget_ui_1.borderTabStyle; });
|
|
84
|
+
var StyledWidgetLink = (0, styled_components_1.default)(knowledge_widget_ui_1.WidgetLink)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n text-align: ", ";\n"], ["\n ", "\n text-align: ", ";\n"])), styling, function (p) { return p.textAlign; });
|
|
85
|
+
var StyledLink = (0, styled_components_1.default)(knowledge_widget_ui_1.Link)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styling);
|
|
86
|
+
var Description = (0, styled_components_1.default)(knowledge_widget_ui_1.Text)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n line-height: 1.6em;\n font-weight: 300;\n font-size: ", ";\n"], ["\n line-height: 1.6em;\n font-weight: 300;\n font-size: ", ";\n"])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.normal; });
|
|
87
|
+
var Heading = (0, styled_components_1.default)(knowledge_widget_ui_1.Text)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: block;\n font-size: ", ";\n margin: ", " 0;\n"], ["\n display: block;\n font-size: ", ";\n margin: ", " 0;\n"])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.medium; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; });
|
|
88
|
+
var ContactIcon = styled_components_1.default.svg(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-self: center;\n\n path {\n vector-effect: non-scaling-stroke;\n stroke: ", ";\n }\n"], ["\n align-self: center;\n\n path {\n vector-effect: non-scaling-stroke;\n stroke: ", ";\n }\n"])), function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; });
|
|
89
|
+
exports.default = ContactLink;
|
|
90
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var contact_link_component_1 = __importDefault(require("./contact-link-component"));
|
|
7
|
+
exports.default = contact_link_component_1.default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Symbol } from '@telia-ace/knowledge-widget-core';
|
|
2
|
+
import { Container } from '@webprovisions/platform';
|
|
3
|
+
export declare type ContactLinkComponentProps = {
|
|
4
|
+
widget: string;
|
|
5
|
+
route: string;
|
|
6
|
+
mode: 'large' | 'compact';
|
|
7
|
+
iconSize: 'large' | 'small';
|
|
8
|
+
symbol?: Symbol;
|
|
9
|
+
label: string;
|
|
10
|
+
descriptionLabel: string;
|
|
11
|
+
textAlign: string;
|
|
12
|
+
};
|
|
13
|
+
declare const ContactLinkComponent: (container: Container) => Promise<void>;
|
|
14
|
+
export default ContactLinkComponent;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
import { borderTabStyle, contentBox, Link, linkTabStyle, SymbolBadge, Text, useProperties, WidgetLink, } from '@telia-ace/knowledge-widget-ui';
|
|
28
|
+
import { appendClassNames } from '@telia-ace/widget-utilities';
|
|
29
|
+
import React from 'react';
|
|
30
|
+
import styled, { css } from 'styled-components';
|
|
31
|
+
var ContactLink = function (_a) {
|
|
32
|
+
var className = _a.className, other = __rest(_a, ["className"]);
|
|
33
|
+
var _b = useProperties(), widget = _b.widget, route = _b.route, _c = _b.mode, mode = _c === void 0 ? 'large' : _c, _d = _b.iconSize, iconSize = _d === void 0 ? 'large' : _d, symbol = _b.symbol, descriptionLabel = _b.descriptionLabel, label = _b.label, textAlign = _b.textAlign;
|
|
34
|
+
var align = textAlign ? textAlign : mode === 'large' ? 'center' : 'right';
|
|
35
|
+
var iconSizePx = iconSize === 'large' ? '64' : '48';
|
|
36
|
+
var activationOptions = {
|
|
37
|
+
apiNotificationPriorityBy: 'contacts',
|
|
38
|
+
};
|
|
39
|
+
if (mode === 'compact') {
|
|
40
|
+
return (React.createElement(CompactWrapper, __assign({}, other, { className: appendClassNames(className, 'humany-contact-link', 'humany-contact-link-compact'), textAlign: align }),
|
|
41
|
+
descriptionLabel && React.createElement(Text, null, descriptionLabel),
|
|
42
|
+
route ? (React.createElement(Link, { routeName: route }, label)) : (React.createElement(WidgetLink, { "aria-haspopup": "dialog", role: "button", activationOptions: activationOptions, widgetName: widget }, label))));
|
|
43
|
+
}
|
|
44
|
+
var children = (React.createElement(React.Fragment, null,
|
|
45
|
+
symbol ? (React.createElement(SymbolBadge, { symbol: symbol })) : (React.createElement(ContactIcon, { width: iconSizePx, viewBox: "0 0 63 37", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
46
|
+
React.createElement("path", { d: "M1 1H62M1 1L24.7579 15.6328M1 1V36M62 1V36M62 1L38.8842 15.5402M1 36H62M1 36L24.7579 15.6328M62 36L38.8842 15.5402M38.8842 15.5402L37.0898 16.6689C33.8642 18.6979 29.7658 18.7172 26.5212 16.7188L24.7579 15.6328", stroke: "#990AE3" }))),
|
|
47
|
+
label && React.createElement(Heading, null, label),
|
|
48
|
+
descriptionLabel && React.createElement(Description, null, descriptionLabel)));
|
|
49
|
+
return route ? (React.createElement(StyledLink, __assign({}, other, { className: appendClassNames(className, 'humany-contact-link', 'humany-contact-link-large'), routeName: route }), children)) : (React.createElement(StyledWidgetLink, __assign({}, other, { "aria-haspopup": "dialog", role: "button", className: appendClassNames(className, 'humany-contact-link', 'humany-contact-link-large'), textAlign: align, widgetName: widget, activationOptions: activationOptions }), children));
|
|
50
|
+
};
|
|
51
|
+
var CompactWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: ", ";\n font-weight: 300;\n\n span,\n a {\n display: inline-block;\n font-size: ", ";\n }\n\n span {\n margin: 0 ", " 0 0;\n }\n a {\n text-decoration: underline;\n color: ", ";\n &:focus {\n ", ";\n }\n }\n"], ["\n text-align: ", ";\n font-weight: 300;\n\n span,\n a {\n display: inline-block;\n font-size: ", ";\n }\n\n span {\n margin: 0 ", " 0 0;\n }\n a {\n text-decoration: underline;\n color: ", ";\n &:focus {\n ", ";\n }\n }\n"])), function (p) { return p.textAlign; }, function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) {
|
|
52
|
+
var _a;
|
|
53
|
+
return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n padding: ", ";\n "], ["\n ", "\n padding: ", ";\n "])), linkTabStyle, function (p) { var _a, _b; return "calc(".concat((_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small, " / 2) ").concat((_b = p.theme.sizes) === null || _b === void 0 ? void 0 : _b.small); });
|
|
54
|
+
});
|
|
55
|
+
var styling = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n padding: ", ";\n text-align: center;\n cursor: pointer;\n text-decoration: none;\n i {\n font-size: ", ";\n min-width: 1em;\n min-height: 1em;\n color: ", ";\n }\n span {\n color: ", ";\n }\n &:focus {\n ", ";\n }\n"], ["\n ", "\n padding: ", ";\n text-align: center;\n cursor: pointer;\n text-decoration: none;\n i {\n font-size: ", ";\n min-width: 1em;\n min-height: 1em;\n color: ", ";\n }\n span {\n color: ", ";\n }\n &:focus {\n ", ";\n }\n"])), contentBox, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.large; }, function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.huge; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; }, function (p) { var _a; return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && borderTabStyle; });
|
|
56
|
+
var StyledWidgetLink = styled(WidgetLink)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n text-align: ", ";\n"], ["\n ", "\n text-align: ", ";\n"])), styling, function (p) { return p.textAlign; });
|
|
57
|
+
var StyledLink = styled(Link)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styling);
|
|
58
|
+
var Description = styled(Text)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n line-height: 1.6em;\n font-weight: 300;\n font-size: ", ";\n"], ["\n line-height: 1.6em;\n font-weight: 300;\n font-size: ", ";\n"])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.normal; });
|
|
59
|
+
var Heading = styled(Text)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: block;\n font-size: ", ";\n margin: ", " 0;\n"], ["\n display: block;\n font-size: ", ";\n margin: ", " 0;\n"])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.medium; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; });
|
|
60
|
+
var ContactIcon = styled.svg(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-self: center;\n\n path {\n vector-effect: non-scaling-stroke;\n stroke: ", ";\n }\n"], ["\n align-self: center;\n\n path {\n vector-effect: non-scaling-stroke;\n stroke: ", ";\n }\n"])), function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; });
|
|
61
|
+
export default ContactLink;
|
|
62
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
package/lib-esm/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@telia-ace/knowledge-widget-components-contact-link",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Contact link component for ACE Knowledge Widgets.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"author": "Telia Company AB",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"telia"
|
|
9
|
+
],
|
|
10
|
+
"main": "lib/index.js",
|
|
11
|
+
"module": "lib-esm/index.js",
|
|
12
|
+
"files": [
|
|
13
|
+
"LICENSE.txt",
|
|
14
|
+
"README.md",
|
|
15
|
+
"lib/",
|
|
16
|
+
"lib-esm/"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"clean": "cleandir lib && cleandir lib-esm",
|
|
23
|
+
"compile": "tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json"
|
|
24
|
+
},
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"typings": "lib/index.d.ts",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@telia-ace/knowledge-widget-core": "^1.0.1",
|
|
29
|
+
"@telia-ace/knowledge-widget-ui": "^1.0.1",
|
|
30
|
+
"@telia-ace/widget-utilities": "^1.0.1",
|
|
31
|
+
"@webprovisions/platform": "^1.1.2",
|
|
32
|
+
"react": "^17.0.2",
|
|
33
|
+
"react-dom": "^17.0.2",
|
|
34
|
+
"styled-components": "^4.3.2"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/react": "^17.0.39",
|
|
38
|
+
"@types/react-dom": "^17.0.13",
|
|
39
|
+
"@types/styled-components": "^5.1.7"
|
|
40
|
+
},
|
|
41
|
+
"gitHead": "58b00b80f6a1e4a3c13f4291cb29b9422ea1aa4a"
|
|
42
|
+
}
|