@telia-ace/widget-ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/components/anchor-link.d.ts +5 -0
  2. package/components/button.d.ts +5 -0
  3. package/components/drawer/drawer.d.ts +23 -0
  4. package/components/drawer/index.d.ts +4 -0
  5. package/components/dropdown/dropdown.d.ts +10 -0
  6. package/components/dropdown/index.d.ts +5 -0
  7. package/components/dropdown/use-position.d.ts +5 -0
  8. package/components/empty.d.ts +5 -0
  9. package/components/index.d.ts +59 -0
  10. package/components/item-tree.d.ts +14 -0
  11. package/components/lightbox.d.ts +12 -0
  12. package/components/loader.d.ts +14 -0
  13. package/components/modal/index.d.ts +5 -0
  14. package/components/not-found.d.ts +10 -0
  15. package/components/overlay.d.ts +10 -0
  16. package/components/portal.d.ts +9 -0
  17. package/components/tab-stop.d.ts +19 -0
  18. package/components/text.d.ts +5 -0
  19. package/components/timestamp.d.ts +14 -0
  20. package/components/tooltip.d.ts +10 -0
  21. package/components/transition-component.d.ts +31 -0
  22. package/components/typography.d.ts +11 -0
  23. package/components/widget-overlay-outlet.d.ts +9 -0
  24. package/components/zoomable-img.d.ts +10 -0
  25. package/contexts/index.d.ts +12 -0
  26. package/create-react-component.d.ts +12 -0
  27. package/hooks/index.d.ts +29 -0
  28. package/hooks/use-action.d.ts +5 -0
  29. package/hooks/use-children.d.ts +5 -0
  30. package/hooks/use-columns.d.ts +2 -0
  31. package/hooks/use-component-descriptor.d.ts +2 -0
  32. package/hooks/use-component-node.d.ts +7 -0
  33. package/hooks/use-component-platform.d.ts +5 -0
  34. package/hooks/use-component.d.ts +4 -0
  35. package/hooks/use-container.d.ts +2 -0
  36. package/hooks/use-context.d.ts +4 -0
  37. package/hooks/use-conversation.d.ts +4 -0
  38. package/hooks/use-dispatch.d.ts +3 -0
  39. package/hooks/use-event-listener.d.ts +2 -0
  40. package/hooks/use-events.d.ts +4 -0
  41. package/hooks/use-is-mounted.d.ts +2 -0
  42. package/hooks/use-is-tabbing.d.ts +2 -0
  43. package/hooks/use-key-press.d.ts +2 -0
  44. package/hooks/use-layout.d.ts +4 -0
  45. package/hooks/use-previous.d.ts +2 -0
  46. package/hooks/use-properties.d.ts +7 -0
  47. package/hooks/use-render-state.d.ts +5 -0
  48. package/hooks/use-route-data.d.ts +5 -0
  49. package/hooks/use-router.d.ts +4 -0
  50. package/hooks/use-scroll.d.ts +2 -0
  51. package/hooks/use-settings.d.ts +4 -0
  52. package/hooks/use-toggle.d.ts +2 -0
  53. package/hooks/use-transition-end.d.ts +2 -0
  54. package/hooks/use-unique-menu.d.ts +2 -0
  55. package/hooks/use-widget-event.d.ts +4 -0
  56. package/index.d.ts +11 -0
  57. package/index.js +752 -0
  58. package/index.mjs +3577 -0
  59. package/package.json +27 -0
  60. package/styles.d.ts +40 -0
  61. package/utils/animations.d.ts +18 -0
  62. package/utils/browser.d.ts +12 -0
  63. package/utils/convert-to-string-attributes.d.ts +2 -0
  64. package/utils/create-empty-component.d.ts +4 -0
  65. package/utils/embedded-link-mapper.d.ts +4 -0
  66. package/utils/filter-css-props.d.ts +8 -0
  67. package/utils/heading-styles.d.ts +5 -0
  68. package/utils/index.d.ts +12 -0
  69. package/utils/process-html-string.d.ts +4 -0
  70. package/utils/render-instructions.d.ts +10 -0
  71. package/utils/tabbing-state.d.ts +2 -0
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@telia-ace/widget-ui",
3
+ "version": "0.0.1",
4
+ "main": "./index.js",
5
+ "types": "./index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./index.mjs",
9
+ "require": "./index.js"
10
+ }
11
+ },
12
+ "dependencies": {
13
+ "@telia-ace/widget-core": "*",
14
+ "@telia-ace/widget-routing": "*",
15
+ "@telia-ace/widget-utilities": "*",
16
+ "@webprovisions/platform": "^1.1.4",
17
+ "htmr": "1.0.2"
18
+ },
19
+ "peerDependencies": {
20
+ "react": "18.2.0",
21
+ "@emotion/styled": "11.11.0",
22
+ "@emotion/react": "11.11.1",
23
+ "react-transition-group": "4.4.5",
24
+ "react-dom": "18.2.0",
25
+ "react-router-dom": "5.3.4"
26
+ }
27
+ }
package/styles.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ import { Theme } from '@emotion/react';
2
+
3
+ type InvertedHoverButtonSettings = {
4
+ primaryColor: string;
5
+ secondaryColor: string;
6
+ active?: boolean;
7
+ theme: Theme;
8
+ disabled?: boolean;
9
+ };
10
+ export declare const contentBox: (p: {
11
+ theme: Theme;
12
+ 'data-loading'?: boolean;
13
+ }) => import('@emotion/react').SerializedStyles;
14
+ export declare const buttonCss: (p: {
15
+ theme: Partial<Theme>;
16
+ }) => import('@emotion/react').SerializedStyles;
17
+ export declare const invertedHoverButton: (p: InvertedHoverButtonSettings) => import('@emotion/react').SerializedStyles;
18
+ export declare const borderTabStyle: (p: {
19
+ theme: Partial<Theme>;
20
+ }) => import('@emotion/react').SerializedStyles;
21
+ export declare const linkTabStyle: (p: {
22
+ theme: Theme;
23
+ }) => import('@emotion/react').SerializedStyles;
24
+ export declare const paddedBorderTabStyle: (p: {
25
+ theme: Partial<Theme>;
26
+ }) => import('@emotion/react').SerializedStyles;
27
+ export declare const CloseButton: import('@emotion/styled').StyledComponent<any, {}, {}>;
28
+ export declare const StyledText: import('@emotion/styled').StyledComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement> & {
29
+ theme?: Theme | undefined;
30
+ }, {}, {}>;
31
+ export declare const list: (p: {
32
+ theme: Partial<Theme>;
33
+ }) => import('@emotion/react').SerializedStyles;
34
+ export declare const itemList: (p: {
35
+ theme: Partial<Theme>;
36
+ }) => import('@emotion/react').SerializedStyles;
37
+ export declare const genericHtml: (p: {
38
+ theme: Theme;
39
+ }) => import('@emotion/react').SerializedStyles;
40
+ export {};
@@ -0,0 +1,18 @@
1
+ import { TransitionStatus } from 'react-transition-group/Transition';
2
+
3
+ export type CssTransitions = {
4
+ [key: string]: any;
5
+ };
6
+ export type TransitionStateSettings = {
7
+ transitionKeys: string;
8
+ duration?: number;
9
+ easing?: string;
10
+ };
11
+ export declare const transitionComposer: {
12
+ compose: (status: TransitionStatus | undefined, definitions: {
13
+ enter: TransitionStateSettings;
14
+ exit: TransitionStateSettings;
15
+ }) => false | import('@emotion/react').SerializedStyles | "" | undefined;
16
+ composeViewTransition: (status: TransitionStatus, type: string, direction?: 'forth' | 'back') => false | import('@emotion/react').SerializedStyles | "" | undefined;
17
+ get: (title: string) => any;
18
+ };
@@ -0,0 +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;
@@ -0,0 +1,2 @@
1
+ declare const _default: (props: any) => object;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { Container } from '@webprovisions/platform';
2
+
3
+ declare const createEmptyComponent: (container: Container, props: any) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element | null;
4
+ export default createEmptyComponent;
@@ -0,0 +1,4 @@
1
+ import { Container } from '@webprovisions/platform';
2
+
3
+ declare const embeddedLinkMapper: (container: Container) => ({ children, ...props }: any) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
4
+ export default embeddedLinkMapper;
@@ -0,0 +1,8 @@
1
+ declare const filterCssProps: (props: any) => {
2
+ [key: string]: any;
3
+ };
4
+ type FilterCssPropsStyle = {
5
+ [key: string]: any;
6
+ };
7
+ export declare const filterCssPropsStyle: (p: FilterCssPropsStyle) => import('@emotion/react').SerializedStyles;
8
+ export default filterCssProps;
@@ -0,0 +1,5 @@
1
+ import { Theme } from '@emotion/react';
2
+
3
+ export declare const headingElement: (p: {
4
+ theme: Theme;
5
+ }) => (element: string, style: any) => import('@emotion/react').SerializedStyles;
@@ -0,0 +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, imageLightboxRenderer, } from './render-instructions';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Converts a html chunk to managed React nodes.
3
+ */
4
+ export default function parseHtmlString(html: any, instruction: any): import('react').ReactNode;
@@ -0,0 +1,10 @@
1
+ import { Container } from '@webprovisions/platform';
2
+ import { default as React } from 'react';
3
+
4
+ export declare const imageLightboxRenderer: (htmlBody: string) => (attrs: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLImageElement>, HTMLImageElement>) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
5
+ export declare const defaultRenderInstructions: (container: Container, htmlBody: string) => {
6
+ transform: {
7
+ a: ({ children, ...props }: any) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
8
+ img: (attrs: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLImageElement>, HTMLImageElement>) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
9
+ };
10
+ };
@@ -0,0 +1,2 @@
1
+ export declare const setHumanyIsTabbing: (value: boolean) => void;
2
+ export declare const getHumanyIsTabbing: () => boolean;