@telia-ace/widget-ui 1.0.8 → 1.0.11
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 +5 -5
- package/README.md +3 -3
- package/{lib-esm → dist}/components/anchor-link.d.ts +4 -4
- package/{lib → dist}/components/button.d.ts +4 -4
- package/{lib-esm → dist}/components/checkbox.d.ts +7 -7
- package/{lib-esm → dist}/components/drawer/drawer.d.ts +21 -21
- package/{lib-esm → dist}/components/drawer/index.d.ts +3 -3
- package/{lib-esm → dist}/components/dropdown/dropdown.d.ts +9 -9
- package/{lib → dist}/components/dropdown/index.d.ts +4 -4
- package/{lib-esm → dist}/components/dropdown/use-position.d.ts +5 -5
- package/{lib → dist}/components/empty.d.ts +4 -4
- package/{lib → dist}/components/grid.d.ts +7 -7
- package/{lib-esm → dist}/components/html.d.ts +12 -12
- package/{lib → dist}/components/icon.d.ts +7 -7
- package/{lib-esm → dist}/components/index.d.ts +58 -58
- package/{lib-esm → dist}/components/input.d.ts +10 -10
- package/{lib → dist}/components/item-list.d.ts +10 -10
- package/{lib → dist}/components/item-tree.d.ts +13 -13
- package/{lib-esm → dist}/components/lightbox.d.ts +6 -6
- package/{lib-esm → dist}/components/link.d.ts +11 -11
- package/{lib-esm → dist}/components/list.d.ts +9 -9
- package/{lib-esm → dist}/components/modal/confirm.d.ts +12 -12
- package/{lib → dist}/components/modal/index.d.ts +4 -4
- package/{lib-esm → dist}/components/modal/modal.d.ts +10 -10
- package/{lib → dist}/components/not-found.d.ts +9 -9
- package/{lib → dist}/components/overlay.d.ts +8 -8
- package/{lib-esm → dist}/components/paragraph.d.ts +11 -11
- package/{lib → dist}/components/portal.d.ts +7 -7
- package/{lib-esm → dist}/components/route-link.d.ts +11 -11
- package/{lib → dist}/components/symbol-badge.d.ts +15 -15
- package/{lib-esm → dist}/components/tab-stop.d.ts +18 -18
- package/{lib-esm → dist}/components/text-link.d.ts +8 -8
- package/{lib-esm → dist}/components/text.d.ts +4 -4
- package/{lib-esm → dist}/components/timestamp.d.ts +13 -13
- package/{lib-esm → dist}/components/tooltip.d.ts +8 -8
- package/{lib-esm → dist}/components/transition-component.d.ts +30 -30
- package/{lib → dist}/components/typography.d.ts +9 -9
- package/{lib → dist}/components/widget-link.d.ts +10 -10
- package/{lib → dist}/contexts/index.d.ts +9 -9
- package/{lib-esm → dist}/create-react-component.d.ts +11 -11
- package/{lib-esm → dist}/hooks/index.d.ts +27 -27
- package/{lib → dist}/hooks/use-action.d.ts +4 -4
- package/{lib-esm → dist}/hooks/use-children.d.ts +4 -4
- package/{lib-esm → dist}/hooks/use-columns.d.ts +2 -2
- package/{lib-esm → dist}/hooks/use-component-descriptor.d.ts +2 -2
- package/{lib-esm → dist}/hooks/use-component-node.d.ts +6 -6
- package/{lib → dist}/hooks/use-component-platform.d.ts +4 -4
- package/{lib → dist}/hooks/use-component.d.ts +3 -3
- package/{lib-esm → dist}/hooks/use-container.d.ts +2 -2
- package/{lib-esm → dist}/hooks/use-context.d.ts +3 -3
- package/{lib-esm → dist}/hooks/use-dispatch.d.ts +3 -3
- package/{lib-esm → dist}/hooks/use-event-listener.d.ts +2 -2
- package/{lib-esm → dist}/hooks/use-events.d.ts +3 -3
- package/{lib-esm → dist}/hooks/use-is-mounted.d.ts +3 -3
- package/{lib-esm → dist}/hooks/use-key-press.d.ts +2 -2
- package/{lib-esm → dist}/hooks/use-layout.d.ts +3 -3
- package/{lib-esm → dist}/hooks/use-previous.d.ts +2 -2
- package/{lib-esm → dist}/hooks/use-properties.d.ts +6 -6
- package/{lib-esm → dist}/hooks/use-render-state.d.ts +4 -4
- package/{lib → dist}/hooks/use-route-data.d.ts +4 -4
- package/{lib-esm → dist}/hooks/use-router.d.ts +3 -3
- package/{lib → dist}/hooks/use-scroll.d.ts +2 -2
- package/{lib-esm → dist}/hooks/use-settings.d.ts +3 -3
- package/{lib-esm → dist}/hooks/use-toggle.d.ts +2 -2
- package/{lib → dist}/hooks/use-transition-end.d.ts +2 -2
- package/{lib-esm → dist}/hooks/use-unique-menu.d.ts +2 -2
- package/{lib-esm → dist}/hooks/use-widget-event.d.ts +3 -3
- package/{lib-esm → dist}/index.d.ts +9 -9
- package/dist/index.js +2988 -0
- package/dist/index.js.map +1 -0
- package/{lib-esm → dist}/styles.d.ts +19 -19
- package/{lib-esm → dist}/utils/animations.d.ts +18 -18
- package/{lib → dist}/utils/browser.d.ts +12 -12
- package/{lib-esm → dist}/utils/convert-to-string-attributes.d.ts +2 -2
- package/{lib → dist}/utils/create-empty-component.d.ts +3 -3
- package/{lib → dist}/utils/embedded-link-mapper.d.ts +3 -3
- package/{lib-esm → dist}/utils/filter-css-props.d.ts +8 -8
- package/{lib → dist}/utils/generic-hash-link.d.ts +8 -8
- package/{lib-esm → dist}/utils/heading-styles.d.ts +1 -1
- package/{lib-esm → dist}/utils/index.d.ts +12 -12
- package/{lib → dist}/utils/process-html-string.d.ts +4 -4
- package/{lib-esm → dist}/utils/render-instructions.d.ts +8 -8
- package/package.json +11 -12
- package/lib/components/anchor-link.d.ts +0 -4
- package/lib/components/anchor-link.js +0 -7
- 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.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.js +0 -40
- 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.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.js +0 -62
- 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.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.js +0 -55
- 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.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.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.js +0 -43
- package/lib/components/widget-link.js +0 -116
- 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.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.js +0 -39
- 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.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.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.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.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.js +0 -25
- 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.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.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.d.ts +0 -4
- 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.d.ts +0 -4
- package/lib-esm/components/dropdown/index.js +0 -3
- package/lib-esm/components/dropdown/use-position.js +0 -53
- package/lib-esm/components/empty.d.ts +0 -4
- package/lib-esm/components/empty.js +0 -35
- package/lib-esm/components/grid.d.ts +0 -7
- package/lib-esm/components/grid.js +0 -36
- package/lib-esm/components/html.js +0 -53
- package/lib-esm/components/icon.d.ts +0 -7
- 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.d.ts +0 -10
- package/lib-esm/components/item-list.js +0 -34
- package/lib-esm/components/item-tree.d.ts +0 -13
- 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.d.ts +0 -4
- package/lib-esm/components/modal/index.js +0 -3
- package/lib-esm/components/modal/modal.js +0 -99
- package/lib-esm/components/not-found.d.ts +0 -9
- package/lib-esm/components/not-found.js +0 -27
- package/lib-esm/components/overlay.d.ts +0 -8
- package/lib-esm/components/overlay.js +0 -45
- package/lib-esm/components/paragraph.js +0 -38
- package/lib-esm/components/portal.d.ts +0 -7
- package/lib-esm/components/portal.js +0 -36
- package/lib-esm/components/route-link.js +0 -90
- package/lib-esm/components/symbol-badge.d.ts +0 -15
- 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.d.ts +0 -9
- package/lib-esm/components/typography.js +0 -38
- package/lib-esm/components/widget-link.d.ts +0 -10
- package/lib-esm/components/widget-link.js +0 -88
- package/lib-esm/contexts/index.d.ts +0 -9
- 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.d.ts +0 -4
- 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.d.ts +0 -4
- package/lib-esm/hooks/use-component-platform.js +0 -34
- package/lib-esm/hooks/use-component.d.ts +0 -3
- 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.d.ts +0 -4
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -12
- 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.d.ts +0 -3
- package/lib-esm/utils/create-empty-component.js +0 -20
- package/lib-esm/utils/embedded-link-mapper.d.ts +0 -3
- 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.d.ts +0 -8
- 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.d.ts +0 -4
- package/lib-esm/utils/process-html-string.js +0 -10
- package/lib-esm/utils/render-instructions.js +0 -12
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare enum Browsers {
|
|
2
|
-
Opera = "opera",
|
|
3
|
-
Chrome = "chrome",
|
|
4
|
-
Firefox = "firefox",
|
|
5
|
-
Safari = "safari",
|
|
6
|
-
Edge = "edge",
|
|
7
|
-
EdgeChromium = "edge-chromium",
|
|
8
|
-
Blink = "blink",
|
|
9
|
-
IE = "internet-explorer"
|
|
10
|
-
}
|
|
11
|
-
declare const _default: () => Browsers | void;
|
|
12
|
-
export default _default;
|
|
1
|
+
export declare enum Browsers {
|
|
2
|
+
Opera = "opera",
|
|
3
|
+
Chrome = "chrome",
|
|
4
|
+
Firefox = "firefox",
|
|
5
|
+
Safari = "safari",
|
|
6
|
+
Edge = "edge",
|
|
7
|
+
EdgeChromium = "edge-chromium",
|
|
8
|
+
Blink = "blink",
|
|
9
|
+
IE = "internet-explorer"
|
|
10
|
+
}
|
|
11
|
+
declare const _default: () => Browsers | void;
|
|
12
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (props: any) => object;
|
|
2
|
-
export default _default;
|
|
1
|
+
declare const _default: (props: any) => object;
|
|
2
|
+
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Container } from '@webprovisions/platform';
|
|
2
|
-
declare const createEmptyComponent: (container: Container, props: any) => JSX.Element | null;
|
|
3
|
-
export default createEmptyComponent;
|
|
1
|
+
import { Container } from '@webprovisions/platform';
|
|
2
|
+
declare const createEmptyComponent: (container: Container, props: any) => JSX.Element | null;
|
|
3
|
+
export default createEmptyComponent;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Container } from '@webprovisions/platform';
|
|
2
|
-
declare const embeddedLinkMapper: (container: Container) => ({ children, ...props }: any) => JSX.Element;
|
|
3
|
-
export default embeddedLinkMapper;
|
|
1
|
+
import { Container } from '@webprovisions/platform';
|
|
2
|
+
declare const embeddedLinkMapper: (container: Container) => ({ children, ...props }: any) => JSX.Element;
|
|
3
|
+
export default embeddedLinkMapper;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
declare const filterCssProps: (props: any) => {
|
|
2
|
-
[key: string]: any;
|
|
3
|
-
};
|
|
4
|
-
declare type FilterCssPropsStyle = {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
};
|
|
7
|
-
export declare const filterCssPropsStyle: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<FilterCssPropsStyle, any>>;
|
|
8
|
-
export default filterCssProps;
|
|
1
|
+
declare const filterCssProps: (props: any) => {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
};
|
|
4
|
+
declare type FilterCssPropsStyle = {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
export declare const filterCssPropsStyle: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<FilterCssPropsStyle, any>>;
|
|
8
|
+
export default filterCssProps;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type Props = Merge<React.ComponentProps<'a'>, {
|
|
3
|
-
disabled?: string;
|
|
4
|
-
to?: string;
|
|
5
|
-
smooth?: boolean;
|
|
6
|
-
scroll?: Function;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const genericHashLink: (props: Props, As: any) => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type Props = Merge<React.ComponentProps<'a'>, {
|
|
3
|
+
disabled?: string;
|
|
4
|
+
to?: string;
|
|
5
|
+
smooth?: boolean;
|
|
6
|
+
scroll?: Function;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const genericHashLink: (props: Props, As: any) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const headingElement: (element: string, style: any) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
1
|
+
export declare const headingElement: (element: string, style: any) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { transitionComposer } from './animations';
|
|
2
|
-
export type { TransitionStateSettings } from './animations';
|
|
3
|
-
export { Browsers, default as browser } from './browser';
|
|
4
|
-
export { default as convertToStringAttributes } from './convert-to-string-attributes';
|
|
5
|
-
export { default as createEmptyComponent } from './create-empty-component';
|
|
6
|
-
export { default as embeddedLinkMapper } from './embedded-link-mapper';
|
|
7
|
-
export { default as filterCssProps, filterCssPropsStyle } from './filter-css-props';
|
|
8
|
-
export { genericHashLink } from './generic-hash-link';
|
|
9
|
-
export type { Props as GenericHashLinkProps } from './generic-hash-link';
|
|
10
|
-
export { headingElement } from './heading-styles';
|
|
11
|
-
export { default as processHtmlString } from './process-html-string';
|
|
12
|
-
export { defaultRenderInstructions } from './render-instructions';
|
|
1
|
+
export { transitionComposer } from './animations';
|
|
2
|
+
export type { TransitionStateSettings } from './animations';
|
|
3
|
+
export { Browsers, default as browser } from './browser';
|
|
4
|
+
export { default as convertToStringAttributes } from './convert-to-string-attributes';
|
|
5
|
+
export { default as createEmptyComponent } from './create-empty-component';
|
|
6
|
+
export { default as embeddedLinkMapper } from './embedded-link-mapper';
|
|
7
|
+
export { default as filterCssProps, filterCssPropsStyle } from './filter-css-props';
|
|
8
|
+
export { genericHashLink } from './generic-hash-link';
|
|
9
|
+
export type { Props as GenericHashLinkProps } from './generic-hash-link';
|
|
10
|
+
export { headingElement } from './heading-styles';
|
|
11
|
+
export { default as processHtmlString } from './process-html-string';
|
|
12
|
+
export { defaultRenderInstructions } from './render-instructions';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts a html chunk to managed React nodes.
|
|
3
|
-
*/
|
|
4
|
-
export default function parseHtmlString(html: any, instruction: any): any;
|
|
1
|
+
/**
|
|
2
|
+
* Converts a html chunk to managed React nodes.
|
|
3
|
+
*/
|
|
4
|
+
export default function parseHtmlString(html: any, instruction: any): any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Container } from '@webprovisions/platform';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export declare const defaultRenderInstructions: (container: Container) => {
|
|
4
|
-
transform: {
|
|
5
|
-
a: ({ children, ...props }: any) => JSX.Element;
|
|
6
|
-
img: (attrs: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLImageElement>, HTMLImageElement>) => JSX.Element;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
1
|
+
import { Container } from '@webprovisions/platform';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const defaultRenderInstructions: (container: Container) => {
|
|
4
|
+
transform: {
|
|
5
|
+
a: ({ children, ...props }: any) => JSX.Element;
|
|
6
|
+
img: (attrs: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLImageElement>, HTMLImageElement>) => JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
};
|
package/package.json
CHANGED
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "UI components used by ACE Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"telia"
|
|
9
9
|
],
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"module": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
12
|
"files": [
|
|
13
13
|
"LICENSE.txt",
|
|
14
14
|
"README.md",
|
|
15
|
-
"
|
|
16
|
-
"lib-esm/"
|
|
15
|
+
"dist/"
|
|
17
16
|
],
|
|
18
17
|
"publishConfig": {
|
|
19
18
|
"access": "public"
|
|
20
19
|
},
|
|
21
20
|
"scripts": {
|
|
22
|
-
"clean": "
|
|
23
|
-
"
|
|
21
|
+
"clean": "rimraf ./dist",
|
|
22
|
+
"precompile": "tsc -emitDeclarationOnly",
|
|
23
|
+
"compile": "vite build"
|
|
24
24
|
},
|
|
25
25
|
"sideEffects": false,
|
|
26
|
-
"typings": "lib/index.d.ts",
|
|
27
26
|
"dependencies": {
|
|
28
|
-
"@telia-ace/widget-core": "^1.0.
|
|
29
|
-
"@telia-ace/widget-routing": "^1.0.
|
|
30
|
-
"@telia-ace/widget-utilities": "^1.0.
|
|
27
|
+
"@telia-ace/widget-core": "^1.0.7",
|
|
28
|
+
"@telia-ace/widget-routing": "^1.0.8",
|
|
29
|
+
"@telia-ace/widget-utilities": "^1.0.2",
|
|
31
30
|
"@webprovisions/platform": "^1.1.2",
|
|
32
31
|
"htmr": "0.8.8"
|
|
33
32
|
},
|
|
@@ -45,5 +44,5 @@
|
|
|
45
44
|
"@types/react-transition-group": "^4.2.3",
|
|
46
45
|
"@types/styled-components": "^5.1.7"
|
|
47
46
|
},
|
|
48
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "0dfcfc79a4b6c45f98b7e62b71d5c0a30b907236"
|
|
49
48
|
}
|
package/lib/components/button.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
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 widget_utilities_1 = require("@telia-ace/widget-utilities");
|
|
56
|
-
var react_1 = __importStar(require("react"));
|
|
57
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
58
|
-
var utils_1 = require("../utils");
|
|
59
|
-
exports.default = (0, react_1.forwardRef)(function (_a, ref) {
|
|
60
|
-
var className = _a.className, children = _a.children, other = __rest(_a, ["className", "children"]);
|
|
61
|
-
return (react_1.default.createElement(StyledButton, __assign({ type: "button", className: (0, widget_utilities_1.appendClassNames)(className, 'humany-button') }, (0, utils_1.convertToStringAttributes)(other), { ref: ref }), children));
|
|
62
|
-
});
|
|
63
|
-
var StyledButton = styled_components_1.default.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n -webkit-appearance: button;\n text-transform: none;\n overflow: visible;\n outline: none;\n border: none;\n background-color: transparent;\n cursor: pointer;\n font-family: inherit;\n font-size: inherit;\n line-height: normal;\n margin: 0;\n padding: 0;\n"], ["\n -webkit-appearance: button;\n text-transform: none;\n overflow: visible;\n outline: none;\n border: none;\n background-color: transparent;\n cursor: pointer;\n font-family: inherit;\n font-size: inherit;\n line-height: normal;\n margin: 0;\n padding: 0;\n"])));
|
|
64
|
-
var templateObject_1;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type Props = Merge<React.ComponentProps<'input'>, {
|
|
3
|
-
onChange?: (value: string, checked: boolean) => void;
|
|
4
|
-
onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
5
|
-
}>;
|
|
6
|
-
declare const Checkbox: React.SFC<Props>;
|
|
7
|
-
export default Checkbox;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
var widget_utilities_1 = require("@telia-ace/widget-utilities");
|
|
29
|
-
var react_1 = __importDefault(require("react"));
|
|
30
|
-
var utils_1 = require("../utils");
|
|
31
|
-
var Checkbox = function (_a) {
|
|
32
|
-
var _b = _a.onChange, onChange = _b === void 0 ? function () { } : _b, _c = _a.onEnter, onEnter = _c === void 0 ? function () { } : _c, className = _a.className, other = __rest(_a, ["onChange", "onEnter", "className"]);
|
|
33
|
-
return (react_1.default.createElement("input", __assign({ className: (0, widget_utilities_1.appendClassNames)(className, 'humany-checkbox'), onKeyDown: function (e) {
|
|
34
|
-
if (e.key === 'Enter') {
|
|
35
|
-
onEnter(e);
|
|
36
|
-
}
|
|
37
|
-
}, onChange: function (e) { return onChange(e.target.value, e.currentTarget.checked); } }, (0, utils_1.convertToStringAttributes)(other))));
|
|
38
|
-
};
|
|
39
|
-
exports.default = Checkbox;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare enum AnimationType {
|
|
3
|
-
SlideInLeft = "slide-in-left",
|
|
4
|
-
SlideInRight = "slide-in-right",
|
|
5
|
-
SlideInBottom = "slide-in-bottom",
|
|
6
|
-
SlideInTop = "slide-in-top"
|
|
7
|
-
}
|
|
8
|
-
export declare type Props = {
|
|
9
|
-
header?: string | React.ReactNode;
|
|
10
|
-
className?: string;
|
|
11
|
-
animation?: {
|
|
12
|
-
type: AnimationType;
|
|
13
|
-
duration?: number;
|
|
14
|
-
};
|
|
15
|
-
trigger: React.ReactElement;
|
|
16
|
-
fullScreen?: boolean;
|
|
17
|
-
closeButtonAriaLabel?: string;
|
|
18
|
-
onToggle?: (visible: boolean) => void;
|
|
19
|
-
};
|
|
20
|
-
declare const Drawer: React.FC<Props>;
|
|
21
|
-
export default Drawer;
|
|
@@ -1,150 +0,0 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
-
if (k2 === undefined) k2 = k;
|
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
30
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
31
|
-
if (!m) return o;
|
|
32
|
-
var i = m.call(o), r, ar = [], e;
|
|
33
|
-
try {
|
|
34
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
35
|
-
}
|
|
36
|
-
catch (error) { e = { error: error }; }
|
|
37
|
-
finally {
|
|
38
|
-
try {
|
|
39
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
40
|
-
}
|
|
41
|
-
finally { if (e) throw e.error; }
|
|
42
|
-
}
|
|
43
|
-
return ar;
|
|
44
|
-
};
|
|
45
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
46
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
47
|
-
};
|
|
48
|
-
var _a;
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.AnimationType = void 0;
|
|
51
|
-
var widget_utilities_1 = require("@telia-ace/widget-utilities");
|
|
52
|
-
var react_1 = __importStar(require("react"));
|
|
53
|
-
var react_transition_group_1 = require("react-transition-group");
|
|
54
|
-
var styled_components_1 = __importStar(require("styled-components"));
|
|
55
|
-
var hooks_1 = require("../../hooks");
|
|
56
|
-
var styles_1 = require("../../styles");
|
|
57
|
-
var portal_1 = __importDefault(require("../portal"));
|
|
58
|
-
var symbol_badge_1 = __importDefault(require("../symbol-badge"));
|
|
59
|
-
var typography_1 = __importDefault(require("../typography"));
|
|
60
|
-
var AnimationType;
|
|
61
|
-
(function (AnimationType) {
|
|
62
|
-
AnimationType["SlideInLeft"] = "slide-in-left";
|
|
63
|
-
AnimationType["SlideInRight"] = "slide-in-right";
|
|
64
|
-
AnimationType["SlideInBottom"] = "slide-in-bottom";
|
|
65
|
-
AnimationType["SlideInTop"] = "slide-in-top";
|
|
66
|
-
// Fade = 'fade',
|
|
67
|
-
})(AnimationType = exports.AnimationType || (exports.AnimationType = {}));
|
|
68
|
-
var defaultDuration = 300;
|
|
69
|
-
var Drawer = function (_a) {
|
|
70
|
-
var className = _a.className, children = _a.children, header = _a.header, onToggle = _a.onToggle, trigger = _a.trigger, _b = _a.fullScreen, fullScreen = _b === void 0 ? false : _b, closeButtonAriaLabel = _a.closeButtonAriaLabel, _c = _a.animation, animation = _c === void 0 ? {
|
|
71
|
-
type: AnimationType.SlideInBottom,
|
|
72
|
-
} : _c;
|
|
73
|
-
var _d = animation.duration, duration = _d === void 0 ? defaultDuration : _d;
|
|
74
|
-
var closeButtonRef = (0, react_1.useRef)();
|
|
75
|
-
var triggerRef = (0, react_1.useRef)();
|
|
76
|
-
var _e = __read((0, hooks_1.useScroll)(true), 2), css = _e[0], ref = _e[1];
|
|
77
|
-
var _f = __read((0, hooks_1.useToggle)(), 2), visible = _f[0], toggleVisible = _f[1];
|
|
78
|
-
var previousVisible = (0, hooks_1.usePrevious)(visible);
|
|
79
|
-
var id = (0, react_1.useRef)((0, widget_utilities_1.uuid)());
|
|
80
|
-
(0, react_1.useEffect)(function () {
|
|
81
|
-
if (onToggle) {
|
|
82
|
-
onToggle(visible);
|
|
83
|
-
}
|
|
84
|
-
}, [visible]);
|
|
85
|
-
var esc = (0, hooks_1.useKeyPress)('Escape');
|
|
86
|
-
(0, react_1.useEffect)(function () {
|
|
87
|
-
if (esc) {
|
|
88
|
-
toggleVisible(false);
|
|
89
|
-
}
|
|
90
|
-
}, [esc]);
|
|
91
|
-
(0, hooks_1.useEventListener)('click', function (event) {
|
|
92
|
-
var target = event.target;
|
|
93
|
-
if (!triggerRef.current || !ref.current || !target) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (triggerRef.current !== target &&
|
|
97
|
-
ref.current !== target &&
|
|
98
|
-
!ref.current.contains(target) &&
|
|
99
|
-
!triggerRef.current.contains(target)) {
|
|
100
|
-
toggleVisible(false);
|
|
101
|
-
}
|
|
102
|
-
}, window);
|
|
103
|
-
var closeMenus = (0, hooks_1.useUniqueMenu)(id.current, function () {
|
|
104
|
-
toggleVisible(false);
|
|
105
|
-
});
|
|
106
|
-
(0, hooks_1.useWidgetEvent)('router:changed', function () {
|
|
107
|
-
toggleVisible(false);
|
|
108
|
-
});
|
|
109
|
-
(0, react_1.useEffect)(function () {
|
|
110
|
-
if (visible && closeButtonRef.current) {
|
|
111
|
-
closeButtonRef.current.focus();
|
|
112
|
-
}
|
|
113
|
-
else if (!visible && triggerRef.current && previousVisible) {
|
|
114
|
-
triggerRef.current.focus();
|
|
115
|
-
}
|
|
116
|
-
}, [visible, closeButtonRef.current, triggerRef.current]);
|
|
117
|
-
var WrapperWithAnimation = animations[animation.type];
|
|
118
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
119
|
-
react_1.default.createElement(react_transition_group_1.CSSTransition, { in: visible, className: "humany-drawer-transition", classNames: "humany-drawer-transition", unmountOnExit: true, timeout: duration },
|
|
120
|
-
react_1.default.createElement(portal_1.default, null,
|
|
121
|
-
react_1.default.createElement(WrapperWithAnimation, { duration: duration, fullScreen: fullScreen, className: (0, widget_utilities_1.appendClassNames)(className, 'humany-drawer', "humany-drawer-".concat(id.current)), clientHeight: document.body.clientHeight, css: css, ref: ref },
|
|
122
|
-
react_1.default.createElement(styles_1.CloseButton, { onClick: function () { return toggleVisible(false); }, tabIndex: 0, ref: closeButtonRef, "aria-label": closeButtonAriaLabel },
|
|
123
|
-
react_1.default.createElement(symbol_badge_1.default, { symbol: { type: 'Svg', content: 'close' } })),
|
|
124
|
-
!!header && (react_1.default.createElement(Header, { variant: "h1", className: "humany-drawer-header" }, header)),
|
|
125
|
-
children))),
|
|
126
|
-
react_1.default.cloneElement(trigger, {
|
|
127
|
-
onClick: function (event) {
|
|
128
|
-
toggleVisible();
|
|
129
|
-
closeMenus();
|
|
130
|
-
},
|
|
131
|
-
ref: triggerRef,
|
|
132
|
-
'aria-label': trigger.props.title,
|
|
133
|
-
'aria-expanded': visible,
|
|
134
|
-
})));
|
|
135
|
-
};
|
|
136
|
-
exports.default = Drawer;
|
|
137
|
-
var Wrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n position: fixed;\n bottom: 0;\n left: 0;\n border: ", ";\n width: 100%;\n box-shadow: ", ";\n background: #ffffff;\n ", "\n"], ["\n font-family: ", ";\n font-size: ", ";\n position: fixed;\n bottom: 0;\n left: 0;\n border: ", ";\n width: 100%;\n box-shadow: ", ";\n background: #ffffff;\n ", "\n"])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.type; }, function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { return p.theme.border; }, function (p) { return p.theme.boxShadow; }, function (p) { return p.css && p.css; });
|
|
138
|
-
var Header = (0, styled_components_1.default)(typography_1.default)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: ", ";\n margin: 0;\n text-align: center;\n border-bottom: #eeeeee 1px solid;\n background: #ffffff;\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: bold;\n color: ", ";\n font-size: ", ";\n line-height: 1.2em;\n"], ["\n padding: ", ";\n margin: 0;\n text-align: center;\n border-bottom: #eeeeee 1px solid;\n background: #ffffff;\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: bold;\n color: ", ";\n font-size: ", ";\n line-height: 1.2em;\n"])), function (p) { return p.theme.sizes.normal; }, 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.fonts) === null || _a === void 0 ? void 0 : _a.normal; });
|
|
139
|
-
var AnimationBase = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n transition: ", "ms;\n"], ["\n transition: ", "ms;\n"])), function (p) { return p.duration; });
|
|
140
|
-
var WrapperWithSlideInBottom = (0, styled_components_1.default)(Wrapper)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n max-height: 0;\n ", "\n\n &.humany-drawer-transition-enter {\n max-height: 0;\n }\n &.humany-drawer-transition-enter-active,\n &.humany-drawer-transition-enter-done,\n &.humany-drawer-transition-exit {\n max-height: ", ";\n }\n\n &.humany-drawer-transition-exit-active,\n &.humany-drawer-transition-exit-done {\n max-height: 0;\n }\n"], ["\n max-height: 0;\n ", "\n\n &.humany-drawer-transition-enter {\n max-height: 0;\n }\n &.humany-drawer-transition-enter-active,\n &.humany-drawer-transition-enter-done,\n &.humany-drawer-transition-exit {\n max-height: ", ";\n }\n\n &.humany-drawer-transition-exit-active,\n &.humany-drawer-transition-exit-done {\n max-height: 0;\n }\n"])), AnimationBase, function (p) { return (p.fullScreen ? '100%' : '400px'); });
|
|
141
|
-
var WrapperWithSlideInRight = (0, styled_components_1.default)(Wrapper)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n transform: translateX(100%);\n height: ", ";\n\n &.humany-drawer-transition-enter {\n transform: translateX(100%);\n }\n &.humany-drawer-transition-enter-active,\n &.humany-drawer-transition-enter-done,\n &.humany-drawer-transition-exit {\n transform: translateX(0);\n }\n\n &.humany-drawer-transition-exit-active,\n &.humany-drawer-transition-exit-done {\n transform: translateX(100%);\n }\n"], ["\n ", "\n transform: translateX(100%);\n height: ", ";\n\n &.humany-drawer-transition-enter {\n transform: translateX(100%);\n }\n &.humany-drawer-transition-enter-active,\n &.humany-drawer-transition-enter-done,\n &.humany-drawer-transition-exit {\n transform: translateX(0);\n }\n\n &.humany-drawer-transition-exit-active,\n &.humany-drawer-transition-exit-done {\n transform: translateX(100%);\n }\n"])), AnimationBase, function (p) { return (p.fullScreen ? '100%' : 'auto'); });
|
|
142
|
-
var WrapperWithSlideInLeft = (0, styled_components_1.default)(Wrapper)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n transform: translateX(-100%);\n height: ", ";\n\n &.humany-drawer-transition-enter {\n transform: translateX(-100%);\n }\n &.humany-drawer-transition-enter-active,\n &.humany-drawer-transition-enter-done,\n &.humany-drawer-transition-exit {\n transform: translateX(0);\n }\n\n &.humany-drawer-transition-exit-active,\n &.humany-drawer-transition-exit-done {\n transform: translateX(-100%);\n }\n"], ["\n ", "\n transform: translateX(-100%);\n height: ", ";\n\n &.humany-drawer-transition-enter {\n transform: translateX(-100%);\n }\n &.humany-drawer-transition-enter-active,\n &.humany-drawer-transition-enter-done,\n &.humany-drawer-transition-exit {\n transform: translateX(0);\n }\n\n &.humany-drawer-transition-exit-active,\n &.humany-drawer-transition-exit-done {\n transform: translateX(-100%);\n }\n"])), AnimationBase, function (p) { return (p.fullScreen ? '100%' : 'auto'); });
|
|
143
|
-
var WrapperWithSlideInTop = (0, styled_components_1.default)(Wrapper)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n bottom: unset;\n top: 0;\n height: 0;\n\n &.humany-drawer-transition-enter {\n height: 0;\n }\n &.humany-drawer-transition-enter-active,\n &.humany-drawer-transition-enter-done,\n &.humany-drawer-transition-exit {\n height: ", "px;\n }\n\n &.humany-drawer-transition-exit-active,\n &.humany-drawer-transition-exit-done {\n height: 0;\n }\n"], ["\n ", "\n bottom: unset;\n top: 0;\n height: 0;\n\n &.humany-drawer-transition-enter {\n height: 0;\n }\n &.humany-drawer-transition-enter-active,\n &.humany-drawer-transition-enter-done,\n &.humany-drawer-transition-exit {\n height: ", "px;\n }\n\n &.humany-drawer-transition-exit-active,\n &.humany-drawer-transition-exit-done {\n height: 0;\n }\n"])), AnimationBase, function (p) { return p.clientHeight; });
|
|
144
|
-
var animations = (_a = {},
|
|
145
|
-
_a[AnimationType.SlideInBottom] = WrapperWithSlideInBottom,
|
|
146
|
-
_a[AnimationType.SlideInRight] = WrapperWithSlideInRight,
|
|
147
|
-
_a[AnimationType.SlideInLeft] = WrapperWithSlideInLeft,
|
|
148
|
-
_a[AnimationType.SlideInTop] = WrapperWithSlideInTop,
|
|
149
|
-
_a);
|
|
150
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
exports.AnimationType = void 0;
|
|
27
|
-
var drawer_1 = __importStar(require("./drawer"));
|
|
28
|
-
Object.defineProperty(exports, "AnimationType", { enumerable: true, get: function () { return drawer_1.AnimationType; } });
|
|
29
|
-
exports.default = drawer_1.default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement } from 'react';
|
|
2
|
-
export declare type Props = {
|
|
3
|
-
className?: string;
|
|
4
|
-
children?: any;
|
|
5
|
-
trigger: ReactElement;
|
|
6
|
-
closeButtonAriaLabel?: string;
|
|
7
|
-
};
|
|
8
|
-
declare const Dropdown: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
export default Dropdown;
|