@telia-ace/widget-ui 1.3.31-rc.0 → 1.3.31-rc.3

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 (69) hide show
  1. package/components/anchor-link.d.ts +2 -1
  2. package/components/button.d.ts +2 -1
  3. package/components/drawer/drawer.d.ts +2 -1
  4. package/components/drawer/index.d.ts +2 -1
  5. package/components/dropdown/dropdown.d.ts +2 -1
  6. package/components/dropdown/index.d.ts +2 -1
  7. package/components/empty.d.ts +2 -1
  8. package/components/item-tree.d.ts +2 -1
  9. package/components/lightbox.d.ts +2 -1
  10. package/components/loader.d.ts +4 -3
  11. package/components/modal/index.d.ts +2 -1
  12. package/components/not-found.d.ts +2 -1
  13. package/components/overlay.d.ts +2 -1
  14. package/components/portal.d.ts +1 -0
  15. package/components/tab-stop.d.ts +1 -0
  16. package/components/text.d.ts +2 -1
  17. package/components/timestamp.d.ts +2 -1
  18. package/components/tooltip.d.ts +2 -1
  19. package/components/transition-component.d.ts +2 -1
  20. package/components/typography.d.ts +2 -1
  21. package/components/widget-overlay-outlet.d.ts +2 -1
  22. package/components/zoomable-img.d.ts +2 -1
  23. package/contexts/index.d.ts +9 -9
  24. package/create-react-component.d.ts +2 -1
  25. package/hooks/use-action.d.ts +1 -0
  26. package/hooks/use-children.d.ts +2 -1
  27. package/hooks/use-component-descriptor.d.ts +1 -1
  28. package/hooks/use-component-node.d.ts +2 -1
  29. package/hooks/use-component-platform.d.ts +2 -1
  30. package/hooks/use-component.d.ts +1 -0
  31. package/hooks/use-container.d.ts +1 -1
  32. package/hooks/use-context.d.ts +2 -1
  33. package/hooks/use-events.d.ts +1 -0
  34. package/hooks/use-is-mounted.d.ts +1 -2
  35. package/hooks/use-layout.d.ts +2 -1
  36. package/hooks/use-properties.d.ts +2 -1
  37. package/hooks/use-render-state.d.ts +2 -1
  38. package/hooks/use-route-data.d.ts +2 -1
  39. package/hooks/use-router.d.ts +2 -1
  40. package/hooks/use-settings.d.ts +2 -1
  41. package/hooks/use-widget-event.d.ts +1 -0
  42. package/index.d.ts +1 -0
  43. package/index.js +1 -1
  44. package/index.mjs +4 -16
  45. package/package.json +4 -4
  46. package/styles.d.ts +12 -12
  47. package/utils/animations.d.ts +3 -2
  48. package/utils/create-empty-component.d.ts +1 -0
  49. package/utils/embedded-link-mapper.d.ts +1 -0
  50. package/utils/filter-css-props.d.ts +1 -1
  51. package/utils/heading-styles.d.ts +2 -1
  52. package/utils/process-html-string.d.ts +1 -1
  53. package/utils/render-instructions.d.ts +2 -1
  54. package/components/checkbox.d.ts +0 -7
  55. package/components/grid.d.ts +0 -7
  56. package/components/html.d.ts +0 -12
  57. package/components/icon.d.ts +0 -7
  58. package/components/input.d.ts +0 -10
  59. package/components/item-list.d.ts +0 -10
  60. package/components/link.d.ts +0 -12
  61. package/components/list.d.ts +0 -9
  62. package/components/modal/confirm.d.ts +0 -12
  63. package/components/modal/modal.d.ts +0 -10
  64. package/components/paragraph.d.ts +0 -11
  65. package/components/route-link.d.ts +0 -12
  66. package/components/symbol-badge.d.ts +0 -15
  67. package/components/text-link.d.ts +0 -8
  68. package/components/widget-link.d.ts +0 -10
  69. package/utils/generic-hash-link.d.ts +0 -8
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { GenericHashLinkProps } from '../utils';
3
+
3
4
  declare const AnchorLink: React.FC<GenericHashLinkProps>;
4
5
  export default AnchorLink;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type Props = React.ComponentProps<'button'>;
3
4
  declare const _default: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
5
  export default _default;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export declare enum AnimationType {
3
4
  SlideInLeft = "slide-in-left",
4
5
  SlideInRight = "slide-in-right",
@@ -1,3 +1,4 @@
1
- import Drawer, { AnimationType } from './drawer';
1
+ import { default as Drawer, AnimationType } from './drawer';
2
+
2
3
  export { AnimationType };
3
4
  export default Drawer;
@@ -1,4 +1,5 @@
1
- import React, { ReactElement } from 'react';
1
+ import { default as React, ReactElement } from 'react';
2
+
2
3
  export type Props = {
3
4
  className?: string;
4
5
  children?: any;
@@ -1,4 +1,5 @@
1
- import Dropdown from './dropdown';
1
+ import { default as Dropdown } from './dropdown';
2
+
2
3
  export type { Props } from './dropdown';
3
4
  export { default as useCursorPosition } from './use-position';
4
5
  export default Dropdown;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type Props = {};
3
4
  declare const Empty: React.FC<Props>;
4
5
  export default Empty;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type Props = {
3
4
  className?: string;
4
5
  tree?: any[];
@@ -1,4 +1,5 @@
1
- import React, { FC } from 'react';
1
+ import { default as React, FC } from 'react';
2
+
2
3
  export type Props = {
3
4
  attrs: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
4
5
  htmlBody: string;
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  type Props = {
3
4
  className?: string;
4
5
  loading: boolean | undefined;
5
6
  };
6
- export declare const Wrapper: import("@emotion/styled").StyledComponent<{
7
- theme?: import("@emotion/react").Theme | undefined;
7
+ export declare const Wrapper: import('@emotion/styled').StyledComponent<{
8
+ theme?: import('@emotion/react').Theme | undefined;
8
9
  as?: React.ElementType<any> | undefined;
9
10
  } & {
10
11
  'data-loading': boolean;
@@ -1,4 +1,5 @@
1
- import Modal from './modal';
1
+ import { default as Modal } from './modal';
2
+
2
3
  export { default as Confirm } from './confirm';
3
4
  export type { Props as ModalProps } from './modal';
4
5
  export default Modal;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type Props = {
3
4
  header?: string;
4
5
  link?: string;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type Props = {
3
4
  duration?: number;
4
5
  visible: boolean;
@@ -1,4 +1,5 @@
1
1
  import { FC } from 'react';
2
+
2
3
  export type Props = {
3
4
  elementId?: string;
4
5
  parent?: Element | HTMLElement;
@@ -1,5 +1,6 @@
1
1
  import { Container } from '@webprovisions/platform';
2
2
  import { Component } from 'react';
3
+
3
4
  export type Props = {
4
5
  container: Container;
5
6
  };
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type Props = React.ComponentProps<'span'>;
3
4
  declare const Text: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
5
  export default Text;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export declare enum DateFormats {
3
4
  HH_MM = "hh:mm",
4
5
  YYYY_MM_DD = "yyyy-mm-dd",
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type Props = {
3
4
  className?: string;
4
5
  content: React.ReactNode;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type Props = {
3
4
  in: boolean;
4
5
  timeout?: number | {
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
3
4
  export type Props = {
4
5
  variant: TypographyVariant;
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
+
2
3
  type Props = {
3
4
  portalId: string;
4
5
  className?: string;
@@ -1,5 +1,6 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { ZoomableImage } from './lightbox';
3
+
3
4
  export type Props = {
4
5
  zoomState: number;
5
6
  image: ZoomableImage;
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
2
- import { ComponentDescriptor, ComponentNodeProperties } from '@telia-ace/widget-core';
3
- import { RoutingService } from '@telia-ace/widget-routing';
1
+ import { ComponentDescriptor, ComponentNodeProperties } from '../../../core/src/index.ts';
2
+ import { RoutingService } from '../../../routing/src/index.ts';
4
3
  import { Container } from '@webprovisions/platform';
5
- export declare const ContainerContext: import("react").Context<Container>;
6
- export declare const ColumnContext: import("react").Context<number>;
7
- export declare const ComponentNodeContext: import("react").Context<ComponentDescriptor>;
8
- export declare const ComponentPropertyContext: import("react").Context<ComponentNodeProperties>;
9
- export declare const RoutingContext: import("react").Context<RoutingService | null>;
10
- export declare const ConversationContext: import("react").Context<{
4
+
5
+ export declare const ContainerContext: import('react').Context<Container>;
6
+ export declare const ColumnContext: import('react').Context<number>;
7
+ export declare const ComponentNodeContext: import('react').Context<ComponentDescriptor>;
8
+ export declare const ComponentPropertyContext: import('react').Context<ComponentNodeProperties>;
9
+ export declare const RoutingContext: import('react').Context<RoutingService | null>;
10
+ export declare const ConversationContext: import('react').Context<{
11
11
  id: string;
12
12
  } | null>;
@@ -1,5 +1,6 @@
1
- import { ExtendComponentHandler, ExtendComponentOptions, ReactComponent } from '@telia-ace/widget-core';
1
+ import { ExtendComponentHandler, ExtendComponentOptions, ReactComponent } from '../../core/src/index.ts';
2
2
  import { Container } from '@webprovisions/platform';
3
+
3
4
  /**
4
5
  * Registers a React component on the component platform.
5
6
  * @param container Container to register the component on.
@@ -1,4 +1,5 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  export type Action = (action: string, value?: any) => void;
3
4
  export declare const useAction: (passedOrigin?: string, passedContainer?: Container) => Action;
4
5
  export default useAction;
@@ -1,4 +1,5 @@
1
- import { ComponentDescriptor } from '@telia-ace/widget-core';
1
+ import { ComponentDescriptor } from '../../../core/src/index.ts';
2
+
2
3
  export type SetPropertiesAction<T> = (key: string, value: Partial<T>) => void;
3
4
  declare const useChildren: () => ComponentDescriptor[];
4
5
  export default useChildren;
@@ -1,2 +1,2 @@
1
- declare const useComponentDescriptor: () => import("@telia-ace/widget-core").ComponentDescriptor;
1
+ declare const useComponentDescriptor: () => import('../../../core/src/index.ts').ComponentDescriptor;
2
2
  export default useComponentDescriptor;
@@ -1,4 +1,5 @@
1
- import { ComponentNode } from '@telia-ace/widget-core';
1
+ import { ComponentNode } from '../../../core/src/index.ts';
2
+
2
3
  /**
3
4
  * Provides the `ComponentNode` for the current context.
4
5
  */
@@ -1,4 +1,5 @@
1
- import { ComponentPlatform } from '@telia-ace/widget-core';
1
+ import { ComponentPlatform } from '../../../core/src/index.ts';
2
2
  import { Container } from '@webprovisions/platform';
3
+
3
4
  declare const useComponentPlatform: (passedContainer?: Container) => ComponentPlatform | null;
4
5
  export default useComponentPlatform;
@@ -1,3 +1,4 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  declare const useComponent: (passedType?: string, passedContainer?: Container) => void | any | null;
3
4
  export default useComponent;
@@ -1,2 +1,2 @@
1
- declare const useContainer: () => import("@webprovisions/platform").Container;
1
+ declare const useContainer: () => import('@webprovisions/platform').Container;
2
2
  export default useContainer;
@@ -1,3 +1,4 @@
1
- import { ComponentNodeContext } from '@telia-ace/widget-core';
1
+ import { ComponentNodeContext } from '../../../core/src/index.ts';
2
+
2
3
  declare const useContext: <T extends ComponentNodeContext>(id?: string) => T;
3
4
  export default useContext;
@@ -1,3 +1,4 @@
1
1
  import { Container, EventManager } from '@webprovisions/platform';
2
+
2
3
  declare const useEvents: (passedContainer?: Container) => EventManager;
3
4
  export default useEvents;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare const useIsMounted: () => import("react").MutableRefObject<boolean>;
1
+ declare const useIsMounted: () => import('react').MutableRefObject<boolean>;
3
2
  export default useIsMounted;
@@ -1,3 +1,4 @@
1
- import { ComponentNodeLayout } from '@telia-ace/widget-core';
1
+ import { ComponentNodeLayout } from '../../../core/src/index.ts';
2
+
2
3
  declare const useLayout: (id?: string) => ComponentNodeLayout;
3
4
  export default useLayout;
@@ -1,4 +1,5 @@
1
- import { ComponentNodeProperties } from '@telia-ace/widget-core';
1
+ import { ComponentNodeProperties } from '../../../core/src/index.ts';
2
+
2
3
  type DataProperties = {
3
4
  loading?: boolean;
4
5
  };
@@ -1,4 +1,5 @@
1
- import { WidgetRenderState } from '@telia-ace/widget-core';
1
+ import { WidgetRenderState } from '../../../core/src/index.ts';
2
2
  import { Container } from '@webprovisions/platform';
3
+
3
4
  declare const useRenderState: (passedContainer?: Container) => WidgetRenderState | undefined;
4
5
  export default useRenderState;
@@ -1,4 +1,5 @@
1
- import { RouteData } from '@telia-ace/widget-routing';
1
+ import { RouteData } from '../../../routing/src/index.ts';
2
2
  import { Container } from '@webprovisions/platform';
3
+
3
4
  declare const useRouteData: (passedContainer?: Container) => RouteData;
4
5
  export default useRouteData;
@@ -1,3 +1,4 @@
1
- import { RoutingService } from '@telia-ace/widget-routing';
1
+ import { RoutingService } from '../../../routing/src/index.ts';
2
+
2
3
  declare const useRouter: () => RoutingService | null;
3
4
  export default useRouter;
@@ -1,3 +1,4 @@
1
- import { WidgetSettings } from '@telia-ace/widget-core';
1
+ import { WidgetSettings } from '../../../core/src/index.ts';
2
+
2
3
  declare const useSettings: () => WidgetSettings | null;
3
4
  export default useSettings;
@@ -1,3 +1,4 @@
1
1
  import { Container, EventListener } from '@webprovisions/platform';
2
+
2
3
  declare const useWidgetEvent: (event: string, callback: EventListener, dependencies?: any[], passedContainer?: Container) => (data: any) => void;
3
4
  export default useWidgetEvent;
package/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { default as createReactComponent } from './create-react-component';
4
4
  import { DispatchAction, useAction, useChildren, useColumns, useComponent, useComponentDescriptor, useComponentNode, useComponentPlatform, useContainer, useContext, useConversation, useDispatch, useEventListener, useEvents, useIsMounted, useIsTabbing, useKeyPress, useLayout, usePrevious, useProperties, useRenderState, useRouteData, useRouter, useScroll, useSettings, useToggle, useTransitionEnd, useUniqueMenu, useWidgetEvent } from './hooks';
5
5
  import { borderTabStyle, buttonCss, contentBox, genericHtml, invertedHoverButton, itemList, linkTabStyle, list, paddedBorderTabStyle, StyledText } from './styles';
6
6
  import { browser, Browsers, convertToStringAttributes, createEmptyComponent, defaultRenderInstructions, embeddedLinkMapper, filterCssProps, filterCssPropsStyle, genericHashLink, GenericHashLinkProps, headingElement, imageLightboxRenderer, processHtmlString, transitionComposer, TransitionStateSettings } from './utils';
7
+
7
8
  export { AnchorLink, borderTabStyle, Button, buttonCss, Checkbox, ColumnContext, ComponentNodeContext, ComponentPropertyContext, ConversationContext, Confirm, ContainerContext, contentBox, createEmptyComponent, createReactComponent, DateFormats, Drawer, DrawerAnimationType, Dropdown, filterCssProps, filterCssPropsStyle, Grid, headingElement, Html, Icon, Input, genericHtml, invertedHoverButton, ItemList, ItemTree, Lightbox, Link, linkTabStyle, List, paddedBorderTabStyle, RoutingContext, SymbolBadge, Text, TextLink, TransitionComponent, transitionComposer, Typography, useChildren, useColumns, useComponent, useIsTabbing, useComponentDescriptor, useComponentNode, useComponentPlatform, useContainer, useContext, useDispatch, useIsMounted, useLayout, useProperties, useRenderState, useRouteData, useRouter, useScroll, useTransitionEnd, useAction, useEventListener, useEvents, useKeyPress, usePrevious, useSettings, useToggle, useConversation, useUniqueMenu, useWidgetEvent, Empty, Modal, NotFound, Overlay, Paragraph, Portal, RouteLink, TabStop, Timestamp, Tooltip, WidgetLink, WidgetOverlayOutlet, itemList, list, StyledText, browser, convertToStringAttributes, defaultRenderInstructions, embeddedLinkMapper, genericHashLink, processHtmlString, imageLightboxRenderer, };
8
9
  export type { ButtonProps, CheckboxProps, DropdownProps, EmptyProps, GridProps, HtmlIconProps, HtmlParseInstruction, HtmlProps, IconProps, InputProps, ItemListProps, ItemRenderer, ItemTreeProps, LightboxProps, LinkProps, ListProps, ModalProps, NotFoundProps, OverlayProps, ParagraphProps, PortalProps, RouteLinkProps, Symbol, SymbolBadgeProps, TabStopProps, TextLinkProps, TextProps, TimestampProps, TooltipProps, TransitionComponentProps, TypographyProps, WidgetLinkProps, Browsers, GenericHashLinkProps, TransitionStateSettings, };
9
10
  export type { DispatchAction };
package/index.js CHANGED
@@ -336,7 +336,7 @@
336
336
  &.humany-drawer-transition-exit-done {
337
337
  height: 0;
338
338
  }
339
- `,rn={["slide-in-bottom"]:tn,["slide-in-right"]:nn,["slide-in-left"]:sn,["slide-in-top"]:on},Ue=(e,t,n)=>{const[o,r]=a.useState(0),[i,l]=a.useState(0),f=a.useCallback((c,u)=>{if(c.preventDefault(),u){const d=u.getBoundingClientRect();r(Math.max(document.body.clientWidth-d.right,1)),l(d.bottom+window.scrollY)}},[o,i,r,l]);return a.useEffect(()=>{if(!n||!e)return;const c=n.getBoundingClientRect(),u={x:o,y:i};c.left<0&&(u.x=0),c.bottom>window.innerHeight&&(u.y=0),u.x!==o&&r(u.x),u.y!==i&&l(u.y)},[n,e,t]),[{x:o,y:i},f]},an=a.forwardRef(({className:e="",children:t=null,trigger:n,closeButtonAriaLabel:o,...r},i)=>{const l=a.useRef(),f=a.useRef(),c=a.useRef();a.useImperativeHandle(i,()=>c.current,[c.current]);const u=a.useRef(b.uuid()),[d,h]=a.useState(!1),m=me(d),[{x:g,y:p},x]=Ue(d,u.current,c.current),y=I("Escape");a.useEffect(()=>{y&&h(!1)},[y]),a.useEffect(()=>{d&&l.current?l.current.focus():!d&&f.current&&m&&f.current.focus()},[d,l.current,f.current]),H("click",E=>{const{target:j}=E;!c.current||!j||c.current!==j&&!c.current.contains(j)&&h(!1)},window),Y("router:changed",()=>{h(!1)});const k=ee(u.current,()=>{h(!1)}),$=a.useCallback(E=>{E.stopPropagation(),x(E,f.current),h(!d),k()},[k,x,h]);return s.jsxs(s.Fragment,{children:[d&&s.jsx(A,{children:s.jsxs(cn,{className:b.appendClassNames("humany-dropdown",`humany-dropdown-${u.current}`,e),...r,x:g,y:p,ref:c,children:[s.jsx(ye,{onClick:()=>h(!1),tabIndex:0,ref:l,"aria-label":o,children:s.jsx(P,{symbol:{type:"Svg",content:"close"}})}),t]})}),a.cloneElement(n,{onClick:$,ref:f,"aria-label":n.props.title,"aria-expanded":d})]})}),cn=C.div`
339
+ `,rn={"slide-in-bottom":tn,"slide-in-right":nn,"slide-in-left":sn,"slide-in-top":on},Ue=(e,t,n)=>{const[o,r]=a.useState(0),[i,l]=a.useState(0),f=a.useCallback((c,u)=>{if(c.preventDefault(),u){const d=u.getBoundingClientRect();r(Math.max(document.body.clientWidth-d.right,1)),l(d.bottom+window.scrollY)}},[o,i,r,l]);return a.useEffect(()=>{if(!n||!e)return;const c=n.getBoundingClientRect(),u={x:o,y:i};c.left<0&&(u.x=0),c.bottom>window.innerHeight&&(u.y=0),u.x!==o&&r(u.x),u.y!==i&&l(u.y)},[n,e,t]),[{x:o,y:i},f]},an=a.forwardRef(({className:e="",children:t=null,trigger:n,closeButtonAriaLabel:o,...r},i)=>{const l=a.useRef(),f=a.useRef(),c=a.useRef();a.useImperativeHandle(i,()=>c.current,[c.current]);const u=a.useRef(b.uuid()),[d,h]=a.useState(!1),m=me(d),[{x:g,y:p},x]=Ue(d,u.current,c.current),y=I("Escape");a.useEffect(()=>{y&&h(!1)},[y]),a.useEffect(()=>{d&&l.current?l.current.focus():!d&&f.current&&m&&f.current.focus()},[d,l.current,f.current]),H("click",E=>{const{target:j}=E;!c.current||!j||c.current!==j&&!c.current.contains(j)&&h(!1)},window),Y("router:changed",()=>{h(!1)});const k=ee(u.current,()=>{h(!1)}),$=a.useCallback(E=>{E.stopPropagation(),x(E,f.current),h(!d),k()},[k,x,h]);return s.jsxs(s.Fragment,{children:[d&&s.jsx(A,{children:s.jsxs(cn,{className:b.appendClassNames("humany-dropdown",`humany-dropdown-${u.current}`,e),...r,x:g,y:p,ref:c,children:[s.jsx(ye,{onClick:()=>h(!1),tabIndex:0,ref:l,"aria-label":o,children:s.jsx(P,{symbol:{type:"Svg",content:"close"}})}),t]})}),a.cloneElement(n,{onClick:$,ref:f,"aria-label":n.props.title,"aria-expanded":d})]})}),cn=C.div`
340
340
  ${Ce}
341
341
  padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.medium}};
342
342
  min-width: 150px;
package/index.mjs CHANGED
@@ -1702,22 +1702,10 @@ const Ut = 300, Wo = ({
1702
1702
  height: 0;
1703
1703
  }
1704
1704
  `, tn = {
1705
- [
1706
- "slide-in-bottom"
1707
- /* SlideInBottom */
1708
- ]: Qt,
1709
- [
1710
- "slide-in-right"
1711
- /* SlideInRight */
1712
- ]: Gt,
1713
- [
1714
- "slide-in-left"
1715
- /* SlideInLeft */
1716
- ]: Jt,
1717
- [
1718
- "slide-in-top"
1719
- /* SlideInTop */
1720
- ]: en
1705
+ "slide-in-bottom": Qt,
1706
+ "slide-in-right": Gt,
1707
+ "slide-in-left": Jt,
1708
+ "slide-in-top": en
1721
1709
  }, je = (e, t, n) => {
1722
1710
  const [o, r] = w(0), [s, c] = w(0), u = E(
1723
1711
  (a, l) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-ui",
3
- "version": "1.3.31-rc.0",
3
+ "version": "1.3.31-rc.3",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -10,9 +10,9 @@
10
10
  }
11
11
  },
12
12
  "dependencies": {
13
- "@telia-ace/widget-core": "^1.3.31-rc.0",
14
- "@telia-ace/widget-routing": "^1.3.31-rc.0",
15
- "@telia-ace/widget-utilities": "^1.3.31-rc.0",
13
+ "@telia-ace/widget-core": "^1.3.31-rc.3",
14
+ "@telia-ace/widget-routing": "^1.3.31-rc.3",
15
+ "@telia-ace/widget-utilities": "^1.3.31-rc.3",
16
16
  "@webprovisions/platform": "^1.1.4",
17
17
  "htmr": "1.0.2"
18
18
  },
package/styles.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { Theme } from '@emotion/react';
2
+
3
3
  type InvertedHoverButtonSettings = {
4
4
  primaryColor: string;
5
5
  secondaryColor: string;
@@ -10,31 +10,31 @@ type InvertedHoverButtonSettings = {
10
10
  export declare const contentBox: (p: {
11
11
  theme: Theme;
12
12
  'data-loading'?: boolean;
13
- }) => import("@emotion/react").SerializedStyles;
13
+ }) => import('@emotion/react').SerializedStyles;
14
14
  export declare const buttonCss: (p: {
15
15
  theme: Partial<Theme>;
16
- }) => import("@emotion/react").SerializedStyles;
17
- export declare const invertedHoverButton: (p: InvertedHoverButtonSettings) => import("@emotion/react").SerializedStyles;
16
+ }) => import('@emotion/react').SerializedStyles;
17
+ export declare const invertedHoverButton: (p: InvertedHoverButtonSettings) => import('@emotion/react').SerializedStyles;
18
18
  export declare const borderTabStyle: (p: {
19
19
  theme: Partial<Theme>;
20
- }) => import("@emotion/react").SerializedStyles;
20
+ }) => import('@emotion/react').SerializedStyles;
21
21
  export declare const linkTabStyle: (p: {
22
22
  theme: Theme;
23
- }) => import("@emotion/react").SerializedStyles;
23
+ }) => import('@emotion/react').SerializedStyles;
24
24
  export declare const paddedBorderTabStyle: (p: {
25
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> & {
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
29
  theme?: Theme | undefined;
30
30
  }, {}, {}>;
31
31
  export declare const list: (p: {
32
32
  theme: Partial<Theme>;
33
- }) => import("@emotion/react").SerializedStyles;
33
+ }) => import('@emotion/react').SerializedStyles;
34
34
  export declare const itemList: (p: {
35
35
  theme: Partial<Theme>;
36
- }) => import("@emotion/react").SerializedStyles;
36
+ }) => import('@emotion/react').SerializedStyles;
37
37
  export declare const genericHtml: (p: {
38
38
  theme: Theme;
39
- }) => import("@emotion/react").SerializedStyles;
39
+ }) => import('@emotion/react').SerializedStyles;
40
40
  export {};
@@ -1,4 +1,5 @@
1
1
  import { TransitionStatus } from 'react-transition-group/Transition';
2
+
2
3
  export type CssTransitions = {
3
4
  [key: string]: any;
4
5
  };
@@ -11,7 +12,7 @@ export declare const transitionComposer: {
11
12
  compose: (status: TransitionStatus | undefined, definitions: {
12
13
  enter: TransitionStateSettings;
13
14
  exit: TransitionStateSettings;
14
- }) => false | "" | import("@emotion/react").SerializedStyles | undefined;
15
- composeViewTransition: (status: TransitionStatus, type: string, direction?: 'forth' | 'back') => false | "" | import("@emotion/react").SerializedStyles | undefined;
15
+ }) => false | import('@emotion/react').SerializedStyles | "" | undefined;
16
+ composeViewTransition: (status: TransitionStatus, type: string, direction?: 'forth' | 'back') => false | import('@emotion/react').SerializedStyles | "" | undefined;
16
17
  get: (title: string) => any;
17
18
  };
@@ -1,3 +1,4 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  declare const createEmptyComponent: (container: Container, props: any) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element | null;
3
4
  export default createEmptyComponent;
@@ -1,3 +1,4 @@
1
1
  import { Container } from '@webprovisions/platform';
2
+
2
3
  declare const embeddedLinkMapper: (container: Container) => ({ children, ...props }: any) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
3
4
  export default embeddedLinkMapper;
@@ -4,5 +4,5 @@ declare const filterCssProps: (props: any) => {
4
4
  type FilterCssPropsStyle = {
5
5
  [key: string]: any;
6
6
  };
7
- export declare const filterCssPropsStyle: (p: FilterCssPropsStyle) => import("@emotion/react").SerializedStyles;
7
+ export declare const filterCssPropsStyle: (p: FilterCssPropsStyle) => import('@emotion/react').SerializedStyles;
8
8
  export default filterCssProps;
@@ -1,4 +1,5 @@
1
1
  import { Theme } from '@emotion/react';
2
+
2
3
  export declare const headingElement: (p: {
3
4
  theme: Theme;
4
- }) => (element: string, style: any) => import("@emotion/react").SerializedStyles;
5
+ }) => (element: string, style: any) => import('@emotion/react').SerializedStyles;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Converts a html chunk to managed React nodes.
3
3
  */
4
- export default function parseHtmlString(html: any, instruction: any): any;
4
+ export default function parseHtmlString(html: any, instruction: any): import('react').ReactNode;
@@ -1,5 +1,6 @@
1
1
  import { Container } from '@webprovisions/platform';
2
- import React from 'react';
2
+ import { default as React } from 'react';
3
+
3
4
  export declare const imageLightboxRenderer: (htmlBody: string) => (attrs: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLImageElement>, HTMLImageElement>) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
4
5
  export declare const defaultRenderInstructions: (container: Container, htmlBody: string) => {
5
6
  transform: {
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export 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.FC<Props>;
7
- export default Checkbox;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export type Props = Merge<React.ComponentProps<'div'>, {
3
- columns: number;
4
- gap: string;
5
- }>;
6
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
- export default _default;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- export type HtmlParseInstruction = {
3
- transform: {
4
- [htmlTag: string]: (props: any) => JSX.Element;
5
- };
6
- };
7
- export type Props = Merge<React.ComponentProps<'div'>, {
8
- html: string;
9
- htmlParseInstruction?: HtmlParseInstruction;
10
- }>;
11
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
- export default _default;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export type Props = Merge<React.HTMLProps<HTMLElement>, {
3
- className?: string;
4
- faIcon: string;
5
- }>;
6
- declare const Icon: React.FC<Props>;
7
- export default Icon;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export type Props = Merge<React.ComponentProps<'input'>, {
3
- onChange?: (value: string) => void;
4
- onEnter?: (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
5
- onEscape?: (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
6
- onFocusChange?: (focused: boolean) => void;
7
- selectAllOnFocus?: boolean;
8
- }>;
9
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
10
- export default _default;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { Props as ListProps } from './list';
3
- import { Props as ParagraphProps } from './paragraph';
4
- export type ItemListProps = {
5
- customHeader?: any;
6
- ulProps?: any;
7
- };
8
- export type Props = Merge<ListProps, ParagraphProps> & ItemListProps;
9
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- export default _default;
@@ -1,12 +0,0 @@
1
- import React, { ElementType } from 'react';
2
- export type Props = Merge<React.ComponentProps<'a'>, {
3
- disabled?: boolean;
4
- routeName?: string;
5
- params?: {
6
- [key: string]: any;
7
- };
8
- to?: string;
9
- as?: ElementType<any>;
10
- }>;
11
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
12
- export default _default;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- export type ItemRenderer = (item: any, index: number, items: any[], defaultRenderer?: ItemRenderer) => React.ReactNode;
3
- export type Props = Merge<React.ComponentProps<'ul'>, {
4
- renderItem: ItemRenderer;
5
- items: any[];
6
- renderLi?: boolean;
7
- }>;
8
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLUListElement>>;
9
- export default _default;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Props as ModalProps } from './modal';
3
- type Props = Merge<{
4
- header?: string;
5
- text?: string;
6
- onCancel?: () => void;
7
- onConfirm?: () => void;
8
- cancelLabel?: string;
9
- confirmLabel?: string;
10
- }, ModalProps>;
11
- declare const Confirm: React.FC<Props>;
12
- export default Confirm;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export type Props = Merge<{
3
- trigger: React.ReactElement;
4
- className?: string;
5
- onOverlayClick?: (e: React.MouseEvent) => void;
6
- close?: boolean;
7
- children?: React.ReactNode;
8
- }, React.ComponentProps<'div'>>;
9
- declare const Modal: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<any>>;
10
- export default Modal;
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { Props as HtmlProps } from './html';
3
- import { Symbol } from './symbol-badge';
4
- export type Props = Merge<HtmlProps, {
5
- text?: string;
6
- html?: string;
7
- header?: string;
8
- symbol?: Symbol;
9
- }>;
10
- declare const _default: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
11
- export default _default;
@@ -1,12 +0,0 @@
1
- import React, { ElementType } from 'react';
2
- export type Props = Merge<React.ComponentProps<'a'>, {
3
- disabled?: boolean;
4
- name?: string;
5
- params?: {
6
- [key: string]: any;
7
- };
8
- to?: string;
9
- as?: ElementType<any>;
10
- }>;
11
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
12
- export default _default;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- export type Symbol = {
3
- type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;
4
- content: string;
5
- };
6
- export type HtmlIconProps = Merge<React.ComponentProps<'i'>, React.ComponentProps<'svg'>>;
7
- export type Props = Merge<HtmlIconProps, {
8
- symbol: Symbol;
9
- backgroundSize?: string;
10
- size?: number;
11
- text?: string;
12
- elementStyle?: Object;
13
- }>;
14
- declare const SymbolBadge: React.FC<Props>;
15
- export default SymbolBadge;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { Props as LinkProps } from './link';
3
- export type Props = Merge<LinkProps, {
4
- text: string;
5
- description?: string;
6
- }>;
7
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
8
- export default _default;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { Props as LinkProps } from './link';
3
- export type Props = Merge<LinkProps, {
4
- widgetName: string;
5
- activationOptions?: {
6
- [key: string]: any;
7
- };
8
- }>;
9
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
10
- export default _default;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export 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) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;