@telia-ace/widget-ui 1.0.8 → 1.0.9
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/{lib-esm → dist}/components/anchor-link.d.ts +0 -0
- package/{lib-esm → dist}/components/button.d.ts +0 -0
- package/{lib-esm → dist}/components/checkbox.d.ts +0 -0
- package/{lib-esm → dist}/components/drawer/drawer.d.ts +0 -0
- package/{lib-esm → dist}/components/drawer/index.d.ts +0 -0
- package/{lib-esm → dist}/components/dropdown/dropdown.d.ts +0 -0
- package/{lib-esm → dist}/components/dropdown/index.d.ts +0 -0
- package/{lib-esm → dist}/components/dropdown/use-position.d.ts +0 -0
- package/{lib-esm → dist}/components/empty.d.ts +0 -0
- package/{lib-esm → dist}/components/grid.d.ts +0 -0
- package/{lib-esm → dist}/components/html.d.ts +0 -0
- package/{lib-esm → dist}/components/icon.d.ts +0 -0
- package/{lib-esm → dist}/components/index.d.ts +0 -0
- package/{lib-esm → dist}/components/input.d.ts +0 -0
- package/{lib-esm → dist}/components/item-list.d.ts +0 -0
- package/{lib-esm → dist}/components/item-tree.d.ts +0 -0
- package/{lib-esm → dist}/components/lightbox.d.ts +0 -0
- package/{lib-esm → dist}/components/link.d.ts +0 -0
- package/{lib-esm → dist}/components/list.d.ts +0 -0
- package/{lib-esm → dist}/components/modal/confirm.d.ts +0 -0
- package/{lib-esm → dist}/components/modal/index.d.ts +0 -0
- package/{lib-esm → dist}/components/modal/modal.d.ts +0 -0
- package/{lib-esm → dist}/components/not-found.d.ts +0 -0
- package/{lib-esm → dist}/components/overlay.d.ts +0 -0
- package/{lib-esm → dist}/components/paragraph.d.ts +0 -0
- package/{lib-esm → dist}/components/portal.d.ts +0 -0
- package/{lib-esm → dist}/components/route-link.d.ts +0 -0
- package/{lib-esm → dist}/components/symbol-badge.d.ts +0 -0
- package/{lib-esm → dist}/components/tab-stop.d.ts +0 -0
- package/{lib-esm → dist}/components/text-link.d.ts +0 -0
- package/{lib-esm → dist}/components/text.d.ts +0 -0
- package/{lib-esm → dist}/components/timestamp.d.ts +0 -0
- package/{lib-esm → dist}/components/tooltip.d.ts +0 -0
- package/{lib-esm → dist}/components/transition-component.d.ts +0 -0
- package/{lib-esm → dist}/components/typography.d.ts +0 -0
- package/{lib-esm → dist}/components/widget-link.d.ts +0 -0
- package/{lib-esm → dist}/contexts/index.d.ts +0 -0
- package/{lib-esm → dist}/create-react-component.d.ts +0 -0
- package/{lib-esm → dist}/hooks/index.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-action.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-children.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-columns.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-component-descriptor.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-component-node.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-component-platform.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-component.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-container.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-context.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-dispatch.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-event-listener.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-events.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-is-mounted.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-key-press.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-layout.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-previous.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-properties.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-render-state.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-route-data.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-router.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-scroll.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-settings.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-toggle.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-transition-end.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-unique-menu.d.ts +0 -0
- package/{lib-esm → dist}/hooks/use-widget-event.d.ts +0 -0
- package/{lib-esm → dist}/index.d.ts +0 -0
- package/dist/index.js +2988 -0
- package/dist/index.js.map +1 -0
- package/{lib-esm → dist}/styles.d.ts +0 -0
- package/{lib-esm → dist}/utils/animations.d.ts +0 -0
- package/{lib-esm → dist}/utils/browser.d.ts +0 -0
- package/{lib-esm → dist}/utils/convert-to-string-attributes.d.ts +0 -0
- package/{lib-esm → dist}/utils/create-empty-component.d.ts +0 -0
- package/{lib-esm → dist}/utils/embedded-link-mapper.d.ts +0 -0
- package/{lib-esm → dist}/utils/filter-css-props.d.ts +0 -0
- package/{lib-esm → dist}/utils/generic-hash-link.d.ts +0 -0
- package/{lib-esm → dist}/utils/heading-styles.d.ts +0 -0
- package/{lib-esm → dist}/utils/index.d.ts +0 -0
- package/{lib-esm → dist}/utils/process-html-string.d.ts +0 -0
- package/{lib-esm → dist}/utils/render-instructions.d.ts +0 -0
- package/package.json +10 -11
- package/lib/components/anchor-link.d.ts +0 -4
- package/lib/components/anchor-link.js +0 -7
- package/lib/components/button.d.ts +0 -4
- package/lib/components/button.js +0 -64
- package/lib/components/checkbox.d.ts +0 -7
- package/lib/components/checkbox.js +0 -39
- package/lib/components/drawer/drawer.d.ts +0 -21
- package/lib/components/drawer/drawer.js +0 -150
- package/lib/components/drawer/index.d.ts +0 -3
- package/lib/components/drawer/index.js +0 -29
- package/lib/components/dropdown/dropdown.d.ts +0 -9
- package/lib/components/dropdown/dropdown.js +0 -155
- package/lib/components/dropdown/index.d.ts +0 -4
- package/lib/components/dropdown/index.js +0 -10
- package/lib/components/dropdown/use-position.d.ts +0 -5
- package/lib/components/dropdown/use-position.js +0 -57
- package/lib/components/empty.d.ts +0 -4
- package/lib/components/empty.js +0 -40
- package/lib/components/grid.d.ts +0 -7
- package/lib/components/grid.js +0 -64
- package/lib/components/html.d.ts +0 -12
- package/lib/components/html.js +0 -78
- package/lib/components/icon.d.ts +0 -7
- package/lib/components/icon.js +0 -35
- package/lib/components/index.d.ts +0 -58
- package/lib/components/index.js +0 -69
- package/lib/components/input.d.ts +0 -10
- package/lib/components/input.js +0 -94
- package/lib/components/item-list.d.ts +0 -10
- package/lib/components/item-list.js +0 -62
- package/lib/components/item-tree.d.ts +0 -13
- package/lib/components/item-tree.js +0 -55
- package/lib/components/lightbox.d.ts +0 -6
- package/lib/components/lightbox.js +0 -92
- package/lib/components/link.d.ts +0 -11
- package/lib/components/link.js +0 -99
- package/lib/components/list.d.ts +0 -9
- package/lib/components/list.js +0 -56
- package/lib/components/modal/confirm.d.ts +0 -12
- package/lib/components/modal/confirm.js +0 -61
- package/lib/components/modal/index.d.ts +0 -4
- package/lib/components/modal/index.js +0 -10
- package/lib/components/modal/modal.d.ts +0 -10
- package/lib/components/modal/modal.js +0 -127
- package/lib/components/not-found.d.ts +0 -9
- package/lib/components/not-found.js +0 -55
- package/lib/components/overlay.d.ts +0 -8
- package/lib/components/overlay.js +0 -73
- package/lib/components/paragraph.d.ts +0 -11
- package/lib/components/paragraph.js +0 -66
- package/lib/components/portal.d.ts +0 -7
- package/lib/components/portal.js +0 -61
- package/lib/components/route-link.d.ts +0 -11
- package/lib/components/route-link.js +0 -115
- package/lib/components/symbol-badge.d.ts +0 -15
- package/lib/components/symbol-badge.js +0 -205
- package/lib/components/tab-stop.d.ts +0 -18
- package/lib/components/tab-stop.js +0 -100
- package/lib/components/text-link.d.ts +0 -8
- package/lib/components/text-link.js +0 -62
- package/lib/components/text.d.ts +0 -4
- package/lib/components/text.js +0 -35
- package/lib/components/timestamp.d.ts +0 -13
- package/lib/components/timestamp.js +0 -39
- package/lib/components/tooltip.d.ts +0 -8
- package/lib/components/tooltip.js +0 -127
- package/lib/components/transition-component.d.ts +0 -30
- package/lib/components/transition-component.js +0 -77
- package/lib/components/typography.d.ts +0 -9
- package/lib/components/typography.js +0 -43
- package/lib/components/widget-link.d.ts +0 -10
- package/lib/components/widget-link.js +0 -116
- package/lib/contexts/index.d.ts +0 -9
- package/lib/contexts/index.js +0 -15
- package/lib/create-react-component.d.ts +0 -11
- package/lib/create-react-component.js +0 -18
- package/lib/hooks/index.d.ts +0 -27
- package/lib/hooks/index.js +0 -58
- package/lib/hooks/use-action.d.ts +0 -4
- package/lib/hooks/use-action.js +0 -21
- package/lib/hooks/use-children.d.ts +0 -4
- package/lib/hooks/use-children.js +0 -70
- package/lib/hooks/use-columns.d.ts +0 -2
- package/lib/hooks/use-columns.js +0 -6
- package/lib/hooks/use-component-descriptor.d.ts +0 -2
- package/lib/hooks/use-component-descriptor.js +0 -6
- package/lib/hooks/use-component-node.d.ts +0 -6
- package/lib/hooks/use-component-node.js +0 -37
- package/lib/hooks/use-component-platform.d.ts +0 -4
- package/lib/hooks/use-component-platform.js +0 -39
- package/lib/hooks/use-component.d.ts +0 -3
- package/lib/hooks/use-component.js +0 -57
- package/lib/hooks/use-container.d.ts +0 -2
- package/lib/hooks/use-container.js +0 -6
- package/lib/hooks/use-context.d.ts +0 -3
- package/lib/hooks/use-context.js +0 -50
- package/lib/hooks/use-dispatch.d.ts +0 -3
- package/lib/hooks/use-dispatch.js +0 -64
- package/lib/hooks/use-event-listener.d.ts +0 -2
- package/lib/hooks/use-event-listener.js +0 -21
- package/lib/hooks/use-events.d.ts +0 -3
- package/lib/hooks/use-events.js +0 -12
- package/lib/hooks/use-is-mounted.d.ts +0 -3
- package/lib/hooks/use-is-mounted.js +0 -14
- package/lib/hooks/use-key-press.d.ts +0 -2
- package/lib/hooks/use-key-press.js +0 -46
- package/lib/hooks/use-layout.d.ts +0 -3
- package/lib/hooks/use-layout.js +0 -50
- package/lib/hooks/use-previous.d.ts +0 -2
- package/lib/hooks/use-previous.js +0 -11
- package/lib/hooks/use-properties.d.ts +0 -6
- package/lib/hooks/use-properties.js +0 -9
- package/lib/hooks/use-render-state.d.ts +0 -4
- package/lib/hooks/use-render-state.js +0 -70
- package/lib/hooks/use-route-data.d.ts +0 -4
- package/lib/hooks/use-route-data.js +0 -58
- package/lib/hooks/use-router.d.ts +0 -3
- package/lib/hooks/use-router.js +0 -9
- package/lib/hooks/use-scroll.d.ts +0 -2
- package/lib/hooks/use-scroll.js +0 -71
- package/lib/hooks/use-settings.d.ts +0 -3
- package/lib/hooks/use-settings.js +0 -38
- package/lib/hooks/use-toggle.d.ts +0 -2
- package/lib/hooks/use-toggle.js +0 -28
- package/lib/hooks/use-transition-end.d.ts +0 -2
- package/lib/hooks/use-transition-end.js +0 -62
- package/lib/hooks/use-unique-menu.d.ts +0 -2
- package/lib/hooks/use-unique-menu.js +0 -15
- package/lib/hooks/use-widget-event.d.ts +0 -3
- package/lib/hooks/use-widget-event.js +0 -21
- package/lib/index.d.ts +0 -9
- package/lib/index.js +0 -98
- package/lib/styles.d.ts +0 -19
- package/lib/styles.js +0 -53
- package/lib/utils/animations.d.ts +0 -18
- package/lib/utils/animations.js +0 -104
- package/lib/utils/browser.d.ts +0 -12
- package/lib/utils/browser.js +0 -54
- package/lib/utils/convert-to-string-attributes.d.ts +0 -2
- package/lib/utils/convert-to-string-attributes.js +0 -23
- package/lib/utils/create-empty-component.d.ts +0 -3
- package/lib/utils/create-empty-component.js +0 -25
- package/lib/utils/embedded-link-mapper.d.ts +0 -3
- package/lib/utils/embedded-link-mapper.js +0 -62
- package/lib/utils/filter-css-props.d.ts +0 -8
- package/lib/utils/filter-css-props.js +0 -28
- package/lib/utils/generic-hash-link.d.ts +0 -8
- package/lib/utils/generic-hash-link.js +0 -70
- package/lib/utils/heading-styles.d.ts +0 -1
- package/lib/utils/heading-styles.js +0 -48
- package/lib/utils/index.d.ts +0 -12
- package/lib/utils/index.js +0 -28
- package/lib/utils/process-html-string.d.ts +0 -4
- package/lib/utils/process-html-string.js +0 -16
- package/lib/utils/render-instructions.d.ts +0 -8
- package/lib/utils/render-instructions.js +0 -19
- package/lib-esm/components/anchor-link.js +0 -5
- package/lib-esm/components/button.js +0 -36
- package/lib-esm/components/checkbox.js +0 -34
- package/lib-esm/components/drawer/drawer.js +0 -121
- package/lib-esm/components/drawer/index.js +0 -3
- package/lib-esm/components/dropdown/dropdown.js +0 -127
- package/lib-esm/components/dropdown/index.js +0 -3
- package/lib-esm/components/dropdown/use-position.js +0 -53
- package/lib-esm/components/empty.js +0 -35
- package/lib-esm/components/grid.js +0 -36
- package/lib-esm/components/html.js +0 -53
- package/lib-esm/components/icon.js +0 -30
- package/lib-esm/components/index.js +0 -30
- package/lib-esm/components/input.js +0 -69
- package/lib-esm/components/item-list.js +0 -34
- package/lib-esm/components/item-tree.js +0 -50
- package/lib-esm/components/lightbox.js +0 -64
- package/lib-esm/components/link.js +0 -71
- package/lib-esm/components/list.js +0 -31
- package/lib-esm/components/modal/confirm.js +0 -33
- package/lib-esm/components/modal/index.js +0 -3
- package/lib-esm/components/modal/modal.js +0 -99
- package/lib-esm/components/not-found.js +0 -27
- package/lib-esm/components/overlay.js +0 -45
- package/lib-esm/components/paragraph.js +0 -38
- package/lib-esm/components/portal.js +0 -36
- package/lib-esm/components/route-link.js +0 -90
- package/lib-esm/components/symbol-badge.js +0 -200
- package/lib-esm/components/tab-stop.js +0 -75
- package/lib-esm/components/text-link.js +0 -34
- package/lib-esm/components/text.js +0 -30
- package/lib-esm/components/timestamp.js +0 -33
- package/lib-esm/components/tooltip.js +0 -99
- package/lib-esm/components/transition-component.js +0 -72
- package/lib-esm/components/typography.js +0 -38
- package/lib-esm/components/widget-link.js +0 -88
- package/lib-esm/contexts/index.js +0 -12
- package/lib-esm/create-react-component.js +0 -16
- package/lib-esm/hooks/index.js +0 -26
- package/lib-esm/hooks/use-action.js +0 -14
- package/lib-esm/hooks/use-children.js +0 -65
- package/lib-esm/hooks/use-columns.js +0 -4
- package/lib-esm/hooks/use-component-descriptor.js +0 -4
- package/lib-esm/hooks/use-component-node.js +0 -35
- package/lib-esm/hooks/use-component-platform.js +0 -34
- package/lib-esm/hooks/use-component.js +0 -52
- package/lib-esm/hooks/use-container.js +0 -4
- package/lib-esm/hooks/use-context.js +0 -45
- package/lib-esm/hooks/use-dispatch.js +0 -59
- package/lib-esm/hooks/use-event-listener.js +0 -19
- package/lib-esm/hooks/use-events.js +0 -7
- package/lib-esm/hooks/use-is-mounted.js +0 -12
- package/lib-esm/hooks/use-key-press.js +0 -41
- package/lib-esm/hooks/use-layout.js +0 -45
- package/lib-esm/hooks/use-previous.js +0 -9
- package/lib-esm/hooks/use-properties.js +0 -7
- package/lib-esm/hooks/use-render-state.js +0 -65
- package/lib-esm/hooks/use-route-data.js +0 -53
- package/lib-esm/hooks/use-router.js +0 -7
- package/lib-esm/hooks/use-scroll.js +0 -66
- package/lib-esm/hooks/use-settings.js +0 -33
- package/lib-esm/hooks/use-toggle.js +0 -26
- package/lib-esm/hooks/use-transition-end.js +0 -60
- package/lib-esm/hooks/use-unique-menu.js +0 -10
- package/lib-esm/hooks/use-widget-event.js +0 -16
- package/lib-esm/index.js +0 -7
- package/lib-esm/styles.js +0 -26
- package/lib-esm/utils/animations.js +0 -101
- package/lib-esm/utils/browser.js +0 -51
- package/lib-esm/utils/convert-to-string-attributes.js +0 -21
- package/lib-esm/utils/create-empty-component.js +0 -20
- package/lib-esm/utils/embedded-link-mapper.js +0 -57
- package/lib-esm/utils/filter-css-props.js +0 -25
- package/lib-esm/utils/generic-hash-link.js +0 -63
- package/lib-esm/utils/heading-styles.js +0 -44
- package/lib-esm/utils/index.js +0 -10
- package/lib-esm/utils/process-html-string.js +0 -10
- package/lib-esm/utils/render-instructions.js +0 -12
|
@@ -1,35 +0,0 @@
|
|
|
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 React from 'react';
|
|
28
|
-
import styled from 'styled-components';
|
|
29
|
-
var Empty = function (_a) {
|
|
30
|
-
var other = __rest(_a, []);
|
|
31
|
-
return React.createElement(Wrapper, __assign({}, other));
|
|
32
|
-
};
|
|
33
|
-
export default Empty;
|
|
34
|
-
var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: none;\n"], ["\n display: none;\n"])));
|
|
35
|
-
var templateObject_1;
|
|
@@ -1,36 +0,0 @@
|
|
|
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 { appendClassNames } from '@telia-ace/widget-utilities';
|
|
28
|
-
import React, { forwardRef } from 'react';
|
|
29
|
-
import styled from 'styled-components';
|
|
30
|
-
import { convertToStringAttributes, filterCssProps, filterCssPropsStyle } from '../utils';
|
|
31
|
-
export default forwardRef(function (_a, ref) {
|
|
32
|
-
var children = _a.children, columns = _a.columns, gap = _a.gap, className = _a.className, other = __rest(_a, ["children", "columns", "gap", "className"]);
|
|
33
|
-
return (React.createElement(Div, __assign({ className: appendClassNames(className, 'humany-grid'), "data-columns": columns, "data-gap": gap }, filterCssProps(other), convertToStringAttributes(other), { ref: ref }), children));
|
|
34
|
-
});
|
|
35
|
-
var Div = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: repeat(", ", 1fr);\n grid-gap: ", ";\n justify-content: center;\n grid-auto-rows: max-content;\n ", "\n"], ["\n display: grid;\n grid-template-columns: repeat(", ", 1fr);\n grid-gap: ", ";\n justify-content: center;\n grid-auto-rows: max-content;\n ", "\n"])), function (p) { return p['data-columns']; }, function (p) { return p['data-gap']; }, filterCssPropsStyle);
|
|
36
|
-
var templateObject_1;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
24
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
25
|
-
if (!m) return o;
|
|
26
|
-
var i = m.call(o), r, ar = [], e;
|
|
27
|
-
try {
|
|
28
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
29
|
-
}
|
|
30
|
-
catch (error) { e = { error: error }; }
|
|
31
|
-
finally {
|
|
32
|
-
try {
|
|
33
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
34
|
-
}
|
|
35
|
-
finally { if (e) throw e.error; }
|
|
36
|
-
}
|
|
37
|
-
return ar;
|
|
38
|
-
};
|
|
39
|
-
import { appendClassNames } from '@telia-ace/widget-utilities';
|
|
40
|
-
import React, { forwardRef, useEffect, useState } from 'react';
|
|
41
|
-
import { useContainer } from '../hooks';
|
|
42
|
-
import { convertToStringAttributes, defaultRenderInstructions, processHtmlString } from '../utils';
|
|
43
|
-
export default forwardRef(function (_a, ref) {
|
|
44
|
-
var _b = _a.htmlParseInstruction, htmlParseInstruction = _b === void 0 ? null : _b, className = _a.className, html = _a.html, other = __rest(_a, ["htmlParseInstruction", "className", "html"]);
|
|
45
|
-
var container = useContainer();
|
|
46
|
-
var _c = __read(useState(), 2), processedHtml = _c[0], setProcessedHtml = _c[1];
|
|
47
|
-
useEffect(function () {
|
|
48
|
-
var instructions = htmlParseInstruction || defaultRenderInstructions(container);
|
|
49
|
-
var processed = processHtmlString(html, instructions);
|
|
50
|
-
setProcessedHtml(processed);
|
|
51
|
-
}, [html, htmlParseInstruction]);
|
|
52
|
-
return (React.createElement("div", __assign({ className: appendClassNames(className, 'humany-html') }, convertToStringAttributes(other), { ref: ref }), processedHtml));
|
|
53
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { appendClassNames } from '@telia-ace/widget-utilities';
|
|
24
|
-
import React from 'react';
|
|
25
|
-
import { convertToStringAttributes } from '../utils';
|
|
26
|
-
var Icon = function (_a) {
|
|
27
|
-
var faIcon = _a.faIcon, title = _a.title, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.role, role = _c === void 0 ? 'presentation' : _c, other = __rest(_a, ["faIcon", "title", "className", "role"]);
|
|
28
|
-
return (React.createElement("i", __assign({ className: appendClassNames(className, "fa fa-".concat(faIcon)), title: title, role: role }, convertToStringAttributes(other))));
|
|
29
|
-
};
|
|
30
|
-
export default Icon;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export { default as AnchorLink } from './anchor-link';
|
|
2
|
-
export { default as Button } from './button';
|
|
3
|
-
export { default as Checkbox } from './checkbox';
|
|
4
|
-
export { AnimationType as DrawerAnimationType, default as Drawer } from './drawer';
|
|
5
|
-
export { default as Dropdown } from './dropdown';
|
|
6
|
-
export { default as Empty } from './empty';
|
|
7
|
-
export { default as Grid } from './grid';
|
|
8
|
-
export { default as Html } from './html';
|
|
9
|
-
export { default as Icon } from './icon';
|
|
10
|
-
export { default as Input } from './input';
|
|
11
|
-
export { default as ItemList } from './item-list';
|
|
12
|
-
export { default as ItemTree } from './item-tree';
|
|
13
|
-
export { default as Lightbox } from './lightbox';
|
|
14
|
-
export { default as Link } from './link';
|
|
15
|
-
export { default as List } from './list';
|
|
16
|
-
export { Confirm, default as Modal } from './modal';
|
|
17
|
-
export { default as NotFound } from './not-found';
|
|
18
|
-
export { default as Overlay } from './overlay';
|
|
19
|
-
export { default as Paragraph } from './paragraph';
|
|
20
|
-
export { default as Portal } from './portal';
|
|
21
|
-
export { default as RouteLink } from './route-link';
|
|
22
|
-
export { default as SymbolBadge } from './symbol-badge';
|
|
23
|
-
export { default as TabStop } from './tab-stop';
|
|
24
|
-
export { default as Text } from './text';
|
|
25
|
-
export { default as TextLink } from './text-link';
|
|
26
|
-
export { DateFormats, default as Timestamp } from './timestamp';
|
|
27
|
-
export { default as Tooltip } from './tooltip';
|
|
28
|
-
export { default as TransitionComponent } from './transition-component';
|
|
29
|
-
export { default as Typography } from './typography';
|
|
30
|
-
export { default as WidgetLink } from './widget-link';
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
24
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
25
|
-
if (!m) return o;
|
|
26
|
-
var i = m.call(o), r, ar = [], e;
|
|
27
|
-
try {
|
|
28
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
29
|
-
}
|
|
30
|
-
catch (error) { e = { error: error }; }
|
|
31
|
-
finally {
|
|
32
|
-
try {
|
|
33
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
34
|
-
}
|
|
35
|
-
finally { if (e) throw e.error; }
|
|
36
|
-
}
|
|
37
|
-
return ar;
|
|
38
|
-
};
|
|
39
|
-
import { appendClassNames } from '@telia-ace/widget-utilities';
|
|
40
|
-
import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
41
|
-
import { convertToStringAttributes } from '../utils';
|
|
42
|
-
export default forwardRef(function (_a, ref) {
|
|
43
|
-
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.autoFocus, autoFocus = _c === void 0 ? false : _c, _d = _a.onFocusChange, onFocusChange = _d === void 0 ? function () { } : _d, _e = _a.onEnter, onEnter = _e === void 0 ? function () { } : _e, _f = _a.onEscape, onEscape = _f === void 0 ? function () { } : _f, selectAllOnFocus = _a.selectAllOnFocus, _g = _a.onChange, onChange = _g === void 0 ? function () { } : _g, _h = _a.disabled, disabled = _h === void 0 ? false : _h, type = _a.type, other = __rest(_a, ["className", "autoFocus", "onFocusChange", "onEnter", "onEscape", "selectAllOnFocus", "onChange", "disabled", "type"]);
|
|
44
|
-
var _j = __read(useState(autoFocus), 2), hasFocus = _j[0], setHasFocus = _j[1];
|
|
45
|
-
var innerRef = useRef();
|
|
46
|
-
useImperativeHandle(ref, function () { return innerRef.current; });
|
|
47
|
-
useEffect(function () {
|
|
48
|
-
var _a;
|
|
49
|
-
if (autoFocus) {
|
|
50
|
-
(_a = innerRef === null || innerRef === void 0 ? void 0 : innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
51
|
-
}
|
|
52
|
-
}, [autoFocus, ref, innerRef]);
|
|
53
|
-
var handleFocus = function (inFocus, event) {
|
|
54
|
-
setHasFocus(inFocus);
|
|
55
|
-
onFocusChange && onFocusChange(inFocus);
|
|
56
|
-
if (selectAllOnFocus && inFocus) {
|
|
57
|
-
event.target.select();
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
var props = __assign(__assign({}, convertToStringAttributes(other)), { disabled: disabled, autoFocus: autoFocus, type: type, onKeyDown: function (e) {
|
|
61
|
-
if (e.key === 'Enter' && hasFocus) {
|
|
62
|
-
onEnter(e);
|
|
63
|
-
}
|
|
64
|
-
if (e.key === 'Escape' && hasFocus) {
|
|
65
|
-
onEscape(e);
|
|
66
|
-
}
|
|
67
|
-
}, onFocus: function (e) { return handleFocus(true, e); }, onBlur: function (e) { return handleFocus(false, e); }, onChange: function (e) { return onChange(e.target.value || ''); }, className: appendClassNames(className, 'humany-input'), 'data-type': type });
|
|
68
|
-
return type !== 'textarea' ? (React.createElement("input", __assign({}, props, { ref: innerRef }))) : (React.createElement("textarea", __assign({}, props, { ref: innerRef })));
|
|
69
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { appendClassNames } from '@telia-ace/widget-utilities';
|
|
24
|
-
import React, { forwardRef } from 'react';
|
|
25
|
-
import { convertToStringAttributes } from '../utils';
|
|
26
|
-
import List from './list';
|
|
27
|
-
import Paragraph from './paragraph';
|
|
28
|
-
export default forwardRef(function (_a, ref) {
|
|
29
|
-
var header = _a.header, customHeader = _a.customHeader, text = _a.text, html = _a.html, className = _a.className, children = _a.children, symbol = _a.symbol, items = _a.items, renderItem = _a.renderItem, renderLi = _a.renderLi, ulProps = _a.ulProps, other = __rest(_a, ["header", "customHeader", "text", "html", "className", "children", "symbol", "items", "renderItem", "renderLi", "ulProps"]);
|
|
30
|
-
return (React.createElement("div", __assign({ className: appendClassNames(className, 'humany-item-list'), "data-item-count": items.length }, convertToStringAttributes(other), { ref: ref }),
|
|
31
|
-
customHeader ? (customHeader) : header || text || html ? (React.createElement(Paragraph, { symbol: symbol, header: header, text: text, html: html })) : null,
|
|
32
|
-
items.length ? (React.createElement(List, __assign({ items: items, renderItem: renderItem, renderLi: renderLi }, ulProps))) : null,
|
|
33
|
-
children));
|
|
34
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { appendClassNames } from '@telia-ace/widget-utilities';
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import { ItemList } from '.';
|
|
15
|
-
import { convertToStringAttributes } from '../utils';
|
|
16
|
-
var ItemTree = function (_a) {
|
|
17
|
-
var _b = _a.className, className = _b === void 0 ? '' : _b, tree = _a.tree, renderItem = _a.renderItem, rootItem = _a.rootItem, _c = _a.renderUnselected, renderUnselected = _c === void 0 ? true : _c, _d = _a.renderEmpty, renderEmpty = _d === void 0 ? true : _d, ulProps = _a.ulProps, liProps = _a.liProps;
|
|
18
|
-
var hasSelectedChildren = function (items) {
|
|
19
|
-
return !checkIfSelected(items);
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Checks if the selected item is actually selected or just expanded by
|
|
23
|
-
* checking if any of its immediate children has selection active
|
|
24
|
-
* @param items
|
|
25
|
-
*/
|
|
26
|
-
var checkIfSelected = function (items) {
|
|
27
|
-
if (!items || items.length < 1) {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
return !items.some(function (item) { return !!item.selected; });
|
|
31
|
-
};
|
|
32
|
-
var renderTreeItems = function (treeItems, level) {
|
|
33
|
-
return (React.createElement(ItemList, { className: appendClassNames("humany-item-tree-level-".concat(level)), items: treeItems, ulProps: ulProps, renderItem: function (itemProps) {
|
|
34
|
-
var id = itemProps.id, selected = itemProps.selected, items = itemProps.items, matches = itemProps.matches;
|
|
35
|
-
var isSelected = selected && checkIfSelected(items);
|
|
36
|
-
if (!renderEmpty && !matches) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
return (React.createElement("li", __assign({}, convertToStringAttributes(liProps), { key: id, className: 'humany-item-tree-item' }),
|
|
40
|
-
renderItem && renderItem(itemProps, level, isSelected),
|
|
41
|
-
items &&
|
|
42
|
-
(renderUnselected || isSelected) &&
|
|
43
|
-
renderTreeItems(items, level + 1)));
|
|
44
|
-
} }));
|
|
45
|
-
};
|
|
46
|
-
return (React.createElement("div", { className: appendClassNames(className, 'humany-item-tree') },
|
|
47
|
-
rootItem && rootItem(!hasSelectedChildren(tree || [])),
|
|
48
|
-
tree && renderTreeItems(tree, 1)));
|
|
49
|
-
};
|
|
50
|
-
export default ItemTree;
|
|
@@ -1,64 +0,0 @@
|
|
|
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 __read = (this && this.__read) || function (o, n) {
|
|
17
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
18
|
-
if (!m) return o;
|
|
19
|
-
var i = m.call(o), r, ar = [], e;
|
|
20
|
-
try {
|
|
21
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
22
|
-
}
|
|
23
|
-
catch (error) { e = { error: error }; }
|
|
24
|
-
finally {
|
|
25
|
-
try {
|
|
26
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
27
|
-
}
|
|
28
|
-
finally { if (e) throw e.error; }
|
|
29
|
-
}
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
32
|
-
import React, { useCallback, useEffect } from 'react';
|
|
33
|
-
import styled from 'styled-components';
|
|
34
|
-
import { useKeyPress, useToggle } from '../hooks';
|
|
35
|
-
import Button from './button';
|
|
36
|
-
import Overlay from './overlay';
|
|
37
|
-
import SymbolBadge from './symbol-badge';
|
|
38
|
-
var Lightbox = function (_a) {
|
|
39
|
-
var attrs = _a.attrs;
|
|
40
|
-
var _b = __read(useToggle(false), 2), visible = _b[0], toggleVisible = _b[1];
|
|
41
|
-
var esc = useKeyPress('Escape');
|
|
42
|
-
useEffect(function () {
|
|
43
|
-
if (esc) {
|
|
44
|
-
toggleVisible(false);
|
|
45
|
-
}
|
|
46
|
-
}, [esc]);
|
|
47
|
-
var overlayClick = useCallback(function (e) {
|
|
48
|
-
toggleVisible(false);
|
|
49
|
-
}, [toggleVisible]);
|
|
50
|
-
return (React.createElement(React.Fragment, null,
|
|
51
|
-
React.createElement(Overlay, { visible: visible, onClick: overlayClick },
|
|
52
|
-
React.createElement(CloseButton, { onClick: function () { return toggleVisible(false); } },
|
|
53
|
-
React.createElement(StyledSymbolBadge, { size: 24, symbol: { type: 'Svg', content: 'close' } })),
|
|
54
|
-
React.createElement(Content, null,
|
|
55
|
-
React.createElement("img", __assign({}, attrs)))),
|
|
56
|
-
React.createElement("a", { onClick: function () { return toggleVisible(); } },
|
|
57
|
-
React.createElement(Thumbnail, __assign({}, attrs)))));
|
|
58
|
-
};
|
|
59
|
-
var Content = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", ";\n max-width: 80%;\n max-height: 80%;\n\n img {\n width: auto !important;\n height: auto !important;\n max-width: 100%;\n max-height: 100%;\n }\n"], ["\n padding: ", ";\n max-width: 80%;\n max-height: 80%;\n\n img {\n width: auto !important;\n height: auto !important;\n max-width: 100%;\n max-height: 100%;\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; });
|
|
60
|
-
var CloseButton = styled(Button)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: fixed;\n top: 50px;\n right: 50px;\n transition: opacity 300ms ease-in-out;\n opacity: 0.7;\n\n &:hover {\n opacity: 1;\n }\n"], ["\n position: fixed;\n top: 50px;\n right: 50px;\n transition: opacity 300ms ease-in-out;\n opacity: 0.7;\n\n &:hover {\n opacity: 1;\n }\n"])));
|
|
61
|
-
var StyledSymbolBadge = styled(SymbolBadge)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n path {\n stroke: #ffffff;\n }\n"], ["\n path {\n stroke: #ffffff;\n }\n"])));
|
|
62
|
-
var Thumbnail = styled.img(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n cursor: pointer;\n"], ["\n cursor: pointer;\n"])));
|
|
63
|
-
export default Lightbox;
|
|
64
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,71 +0,0 @@
|
|
|
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 { appendClassNames } from '@telia-ace/widget-utilities';
|
|
28
|
-
import React, { forwardRef } from 'react';
|
|
29
|
-
import styled from 'styled-components';
|
|
30
|
-
import { convertToStringAttributes } from '../utils';
|
|
31
|
-
import RouteLink from './route-link';
|
|
32
|
-
export default forwardRef(function (_a, ref) {
|
|
33
|
-
var className = _a.className, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.role, role = _c === void 0 ? 'link' : _c, _d = _a.tabIndex, tabIndex = _d === void 0 ? 0 : _d, _e = _a.onClick, onClick = _e === void 0 ? function () { } : _e, _f = _a.onKeyDown, onKeyDown = _f === void 0 ? function () { } : _f, title = _a.title, href = _a.href, children = _a.children, target = _a.target, routeName = _a.routeName, params = _a.params, other = __rest(_a, ["className", "disabled", "role", "tabIndex", "onClick", "onKeyDown", "title", "href", "children", "target", "routeName", "params"]);
|
|
34
|
-
var props = {
|
|
35
|
-
title: title,
|
|
36
|
-
disabled: disabled,
|
|
37
|
-
role: role,
|
|
38
|
-
tabIndex: tabIndex,
|
|
39
|
-
className: appendClassNames(className, 'humany-link', [!!disabled, 'humany-disabled']),
|
|
40
|
-
onClick: function (e) {
|
|
41
|
-
e.persist();
|
|
42
|
-
if (disabled) {
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
onClick(e);
|
|
47
|
-
},
|
|
48
|
-
onKeyDown: function (e) {
|
|
49
|
-
e.persist();
|
|
50
|
-
if (disabled) {
|
|
51
|
-
if (e.key !== 'Tab') {
|
|
52
|
-
e.preventDefault();
|
|
53
|
-
}
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
onKeyDown(e);
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
return routeName ? (React.createElement(StyledRouteLink, __assign({ name: routeName, params: params }, props, convertToStringAttributes(other), { ref: ref }), children)) : (React.createElement(StyledLink, __assign({ href: href, target: target }, props, convertToStringAttributes(other), { ref: ref }), children));
|
|
60
|
-
});
|
|
61
|
-
var StyledRouteLink = styled(RouteLink)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (p) {
|
|
62
|
-
return p.disabled
|
|
63
|
-
? "\n pointer-events: none;\n opacity: .7;\n "
|
|
64
|
-
: 'cursor: pointer;';
|
|
65
|
-
});
|
|
66
|
-
var StyledLink = styled.a(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (p) {
|
|
67
|
-
return p.disabled
|
|
68
|
-
? "\n pointer-events: none;\n opacity: .7;\n "
|
|
69
|
-
: 'cursor: pointer;';
|
|
70
|
-
});
|
|
71
|
-
var templateObject_1, templateObject_2;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { appendClassNames } from '@telia-ace/widget-utilities';
|
|
24
|
-
import React, { forwardRef } from 'react';
|
|
25
|
-
import { convertToStringAttributes } from '../utils';
|
|
26
|
-
export default forwardRef(function (_a, ref) {
|
|
27
|
-
var className = _a.className, items = _a.items, renderItem = _a.renderItem, _b = _a.renderLi, renderLi = _b === void 0 ? false : _b, other = __rest(_a, ["className", "items", "renderItem", "renderLi"]);
|
|
28
|
-
return (React.createElement("ul", __assign({ className: appendClassNames(className, 'humany-list'), "data-item-count": items.length }, convertToStringAttributes(other), { ref: ref }), items.map(function (item, index, items) {
|
|
29
|
-
return renderLi ? (React.createElement("li", { className: "humany-list-item", key: item.id }, renderItem(item, index, items))) : (renderItem(item, index, items));
|
|
30
|
-
})));
|
|
31
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
import React, { useCallback, useRef } from 'react';
|
|
6
|
-
import styled from 'styled-components';
|
|
7
|
-
import { Button } from '..';
|
|
8
|
-
import { borderTabStyle, StyledText } from '../../styles';
|
|
9
|
-
import Modal from './modal';
|
|
10
|
-
var Confirm = function (_a) {
|
|
11
|
-
var className = _a.className, trigger = _a.trigger, _b = _a.header, header = _b === void 0 ? '' : _b, _c = _a.text, text = _c === void 0 ? '' : _c, _d = _a.onCancel, onCancel = _d === void 0 ? function () { } : _d, _e = _a.onConfirm, onConfirm = _e === void 0 ? function () { } : _e, _f = _a.cancelLabel, cancelLabel = _f === void 0 ? '' : _f, _g = _a.confirmLabel, confirmLabel = _g === void 0 ? '' : _g;
|
|
12
|
-
var ref = useRef();
|
|
13
|
-
var cancel = useCallback(function () {
|
|
14
|
-
var _a;
|
|
15
|
-
onCancel();
|
|
16
|
-
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
17
|
-
}, [onCancel]);
|
|
18
|
-
var confirm = useCallback(function () {
|
|
19
|
-
var _a;
|
|
20
|
-
onConfirm();
|
|
21
|
-
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
22
|
-
}, [onConfirm]);
|
|
23
|
-
return (React.createElement(StyledModal, { className: className, trigger: trigger, ref: ref, onOverlayClick: cancel },
|
|
24
|
-
header && React.createElement(StyledText, null, header),
|
|
25
|
-
text && React.createElement(StyledText, null, text),
|
|
26
|
-
confirmLabel && (React.createElement(StyledConfirmButton, { onClick: confirm }, confirmLabel)),
|
|
27
|
-
cancelLabel && React.createElement(StyledCancelButton, { onClick: cancel }, cancelLabel)));
|
|
28
|
-
};
|
|
29
|
-
export default Confirm;
|
|
30
|
-
var StyledModal = styled(Modal)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n\n span {\n display: block;\n margin: 0 0 ", ";\n\n &:first-of-type:not(:only-of-type) {\n font-weight: 700;\n margin: 0 0 ", ";\n }\n }\n"], ["\n display: block;\n\n span {\n display: block;\n margin: 0 0 ", ";\n\n &:first-of-type:not(:only-of-type) {\n font-weight: 700;\n margin: 0 0 ", ";\n }\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === 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; });
|
|
31
|
-
var StyledConfirmButton = styled(Button)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-block;\n min-width: 50px;\n ", "\n ", "\n color: #FFFFFF;\n background-color: ", ";\n border: 1px solid ", ";\n\n margin: 0 ", " 0 0;\n\n &:focus {\n ", ";\n background-color: transparent;\n }\n"], ["\n display: inline-block;\n min-width: 50px;\n ", "\n ", "\n color: #FFFFFF;\n background-color: ", ";\n border: 1px solid ", ";\n\n margin: 0 ", " 0 0;\n\n &:focus {\n ", ";\n background-color: transparent;\n }\n"])), function (p) { var _a, _b; return "padding: ".concat((_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small, " ").concat((_b = p.theme.sizes) === null || _b === void 0 ? void 0 : _b.normal, ";"); }, function (p) { return p.theme.borderRadius && "border-radius: ".concat(p.theme.borderRadius, ";"); }, 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.primary; }, 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.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && borderTabStyle; });
|
|
32
|
-
var StyledCancelButton = styled(Button)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-block;\n min-width: 50px;\n ", "\n ", "\n background-color: transparent;\n color: ", ";\n border: 1px solid ", ";\n\n &:focus {\n ", ";\n }\n"], ["\n display: inline-block;\n min-width: 50px;\n ", "\n ", "\n background-color: transparent;\n color: ", ";\n border: 1px solid ", ";\n\n &:focus {\n ", ";\n }\n"])), function (p) { var _a, _b; return "padding: ".concat((_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small, " ").concat((_b = p.theme.sizes) === null || _b === void 0 ? void 0 : _b.normal, ";"); }, function (p) { return p.theme.borderRadius && "border-radius: ".concat(p.theme.borderRadius, ";"); }, 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.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; });
|
|
33
|
-
var templateObject_1, templateObject_2, templateObject_3;
|