@telia-ace/widget-ui 1.0.12 → 1.0.13

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/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import { AnchorLink, Button, ButtonProps, Checkbox, CheckboxProps, Confirm, Date
2
2
  import { ColumnContext, ComponentNodeContext, ComponentPropertyContext, ContainerContext, RoutingContext } from './contexts';
3
3
  import { default as createReactComponent } from './create-react-component';
4
4
  import { DispatchAction, useAction, useChildren, useColumns, useComponent, useComponentDescriptor, useComponentNode, useComponentPlatform, useContainer, useContext, useDispatch, useEventListener, useEvents, useIsMounted, useKeyPress, useLayout, usePrevious, useProperties, useRenderState, useRouteData, useRouter, useScroll, useSettings, useToggle, useTransitionEnd, useUniqueMenu, useWidgetEvent } from './hooks';
5
- import { borderTabStyle, buttonCss, contentBox, invertedHoverButton, itemList, linkTabStyle, list, paddedBorderTabStyle, StyledText } from './styles';
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, processHtmlString, transitionComposer, TransitionStateSettings } from './utils';
7
- export { AnchorLink, borderTabStyle, Button, buttonCss, Checkbox, ColumnContext, ComponentNodeContext, ComponentPropertyContext, Confirm, ContainerContext, contentBox, createEmptyComponent, createReactComponent, DateFormats, Drawer, DrawerAnimationType, Dropdown, filterCssProps, filterCssPropsStyle, Grid, headingElement, Html, Icon, Input, invertedHoverButton, ItemList, ItemTree, Lightbox, Link, linkTabStyle, List, paddedBorderTabStyle, RoutingContext, SymbolBadge, Text, TextLink, TransitionComponent, transitionComposer, Typography, useChildren, useColumns, useComponent, useComponentDescriptor, useComponentNode, useComponentPlatform, useContainer, useContext, useDispatch, useIsMounted, useLayout, useProperties, useRenderState, useRouteData, useRouter, useScroll, useTransitionEnd, useAction, useEventListener, useEvents, useKeyPress, usePrevious, useSettings, useToggle, useUniqueMenu, useWidgetEvent, Empty, Modal, NotFound, Overlay, Paragraph, Portal, RouteLink, TabStop, Timestamp, Tooltip, WidgetLink, itemList, list, StyledText, browser, convertToStringAttributes, defaultRenderInstructions, embeddedLinkMapper, genericHashLink, processHtmlString, };
7
+ export { AnchorLink, borderTabStyle, Button, buttonCss, Checkbox, ColumnContext, ComponentNodeContext, ComponentPropertyContext, 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, useComponentDescriptor, useComponentNode, useComponentPlatform, useContainer, useContext, useDispatch, useIsMounted, useLayout, useProperties, useRenderState, useRouteData, useRouter, useScroll, useTransitionEnd, useAction, useEventListener, useEvents, useKeyPress, usePrevious, useSettings, useToggle, useUniqueMenu, useWidgetEvent, Empty, Modal, NotFound, Overlay, Paragraph, Portal, RouteLink, TabStop, Timestamp, Tooltip, WidgetLink, itemList, list, StyledText, browser, convertToStringAttributes, defaultRenderInstructions, embeddedLinkMapper, genericHashLink, processHtmlString, };
8
8
  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
9
  export type { DispatchAction };
package/dist/index.js CHANGED
@@ -1094,6 +1094,80 @@ const itemList = css`
1094
1094
  }
1095
1095
  `)}
1096
1096
  `;
1097
+ const genericHtml = css`
1098
+ font-size: ${(p) => {
1099
+ var _a;
1100
+ return (_a = p.theme.fonts) == null ? void 0 : _a.normal;
1101
+ }};
1102
+ font-weight: 300;
1103
+ line-height: 1.5em;
1104
+ color: ${(p) => {
1105
+ var _a;
1106
+ return (_a = p.theme.colors) == null ? void 0 : _a.text;
1107
+ }};
1108
+
1109
+ h1,
1110
+ h2,
1111
+ h3,
1112
+ h4,
1113
+ h5,
1114
+ h6 {
1115
+ word-break: break-word;
1116
+ &:first-child {
1117
+ margin-top: 0;
1118
+ }
1119
+ &:only-child {
1120
+ margin: 0;
1121
+ }
1122
+ &:last-child {
1123
+ margin-bottom: 0;
1124
+ }
1125
+ }
1126
+
1127
+ a {
1128
+ color: ${(p) => {
1129
+ var _a;
1130
+ return (_a = p.theme.colors) == null ? void 0 : _a.link;
1131
+ }};
1132
+ &:focus {
1133
+ ${(p) => {
1134
+ var _a;
1135
+ return ((_a = p.theme.accessibility) == null ? void 0 : _a.isTabbing) && linkTabStyle;
1136
+ }};
1137
+ }
1138
+ }
1139
+
1140
+ img {
1141
+ max-width: 100% !important;
1142
+ height: auto !important;
1143
+ }
1144
+
1145
+ p {
1146
+ word-break: break-word;
1147
+ margin: ${(p) => {
1148
+ var _a;
1149
+ return (_a = p.theme.sizes) == null ? void 0 : _a.normal;
1150
+ }} 0;
1151
+ }
1152
+
1153
+ p:first-child {
1154
+ margin: 0 0 ${(p) => {
1155
+ var _a;
1156
+ return (_a = p.theme.sizes) == null ? void 0 : _a.normal;
1157
+ }};
1158
+ }
1159
+
1160
+ p:last-child {
1161
+ margin: ${(p) => {
1162
+ var _a;
1163
+ return (_a = p.theme.sizes) == null ? void 0 : _a.normal;
1164
+ }} 0 0;
1165
+ }
1166
+
1167
+ p:only-child {
1168
+ margin: 0;
1169
+ }
1170
+ `;
1097
1171
  const Portal = ({ elementId = "humany-portal-elements", children }) => {
1098
1172
  const [container] = React.useState(() => {
1099
1173
  const el = document.getElementById(elementId) || document.createElement("div");
@@ -1502,23 +1576,23 @@ const SymbolBadge = (_g) => {
1502
1576
  r: "12",
1503
1577
  fill: "currentColor"
1504
1578
  }), /* @__PURE__ */ React.createElement("path", {
1505
- "fill-rule": "evenodd",
1506
- "clip-rule": "evenodd",
1579
+ fillRule: "evenodd",
1580
+ clipRule: "evenodd",
1507
1581
  d: "M6.16663 7.33334C6.16663 6.68901 6.68896 6.16667 7.33329 6.16667H10.25C10.8943 6.16667 11.4166 6.68901 11.4166 7.33334V10.25C11.4166 10.8943 10.8943 11.4167 10.25 11.4167H7.33329C6.68896 11.4167 6.16663 10.8943 6.16663 10.25V7.33334ZM7.33329 7.04167H10.25C10.411 7.04167 10.5416 7.17226 10.5416 7.33334V10.25C10.5416 10.4111 10.411 10.5417 10.25 10.5417H7.33329C7.17221 10.5417 7.04163 10.4111 7.04163 10.25V7.33334C7.04163 7.17226 7.17221 7.04167 7.33329 7.04167Z",
1508
1582
  fill: "white"
1509
1583
  }), /* @__PURE__ */ React.createElement("path", {
1510
- "fill-rule": "evenodd",
1511
- "clip-rule": "evenodd",
1584
+ fillRule: "evenodd",
1585
+ clipRule: "evenodd",
1512
1586
  d: "M6.16663 13.75C6.16663 13.1057 6.68896 12.5833 7.33329 12.5833H10.25C10.8943 12.5833 11.4166 13.1057 11.4166 13.75V16.6667C11.4166 17.311 10.8943 17.8333 10.25 17.8333H7.33329C6.68896 17.8333 6.16663 17.311 6.16663 16.6667V13.75ZM7.33329 13.4583H10.25C10.411 13.4583 10.5416 13.5889 10.5416 13.75V16.6667C10.5416 16.8278 10.411 16.9583 10.25 16.9583H7.33329C7.17221 16.9583 7.04163 16.8278 7.04163 16.6667V13.75C7.04163 13.5889 7.17221 13.4583 7.33329 13.4583Z",
1513
1587
  fill: "white"
1514
1588
  }), /* @__PURE__ */ React.createElement("path", {
1515
- "fill-rule": "evenodd",
1516
- "clip-rule": "evenodd",
1589
+ fillRule: "evenodd",
1590
+ clipRule: "evenodd",
1517
1591
  d: "M13.75 6.16667C13.1056 6.16667 12.5833 6.68901 12.5833 7.33334V10.25C12.5833 10.8943 13.1056 11.4167 13.75 11.4167H16.6666C17.311 11.4167 17.8333 10.8943 17.8333 10.25V7.33334C17.8333 6.68901 17.311 6.16667 16.6666 6.16667H13.75ZM16.6666 7.04167H13.75C13.5889 7.04167 13.4583 7.17226 13.4583 7.33334V10.25C13.4583 10.4111 13.5889 10.5417 13.75 10.5417H16.6666C16.8277 10.5417 16.9583 10.4111 16.9583 10.25V7.33334C16.9583 7.17226 16.8277 7.04167 16.6666 7.04167Z",
1518
1592
  fill: "white"
1519
1593
  }), /* @__PURE__ */ React.createElement("path", {
1520
- "fill-rule": "evenodd",
1521
- "clip-rule": "evenodd",
1594
+ fillRule: "evenodd",
1595
+ clipRule: "evenodd",
1522
1596
  d: "M17.8333 15.2083C17.8333 16.6581 16.658 17.8333 15.2083 17.8333C13.7585 17.8333 12.5833 16.6581 12.5833 15.2083C12.5833 13.7586 13.7585 12.5833 15.2083 12.5833C16.658 12.5833 17.8333 13.7586 17.8333 15.2083ZM16.9583 15.2083C16.9583 16.1748 16.1748 16.9583 15.2083 16.9583C14.2418 16.9583 13.4583 16.1748 13.4583 15.2083C13.4583 14.2418 14.2418 13.4583 15.2083 13.4583C16.1748 13.4583 16.9583 14.2418 16.9583 15.2083Z",
1523
1597
  fill: "white"
1524
1598
  }));
@@ -2984,5 +3058,5 @@ const createReactComponent = (container, type, reactComponent, fn, options) => {
2984
3058
  }), type, options);
2985
3059
  });
2986
3060
  };
2987
- export { AnchorLink, Button, Checkbox, ColumnContext, ComponentNodeContext, ComponentPropertyContext, Confirm, ContainerContext, DateFormats, Drawer, AnimationType as DrawerAnimationType, Dropdown, Empty, grid as Grid, Html, Icon, input as Input, ItemList, ItemTree, Lightbox, Link, List, Modal, NotFound, Overlay, Paragraph, Portal, RouteLink, RoutingContext, StyledText, SymbolBadge, TabStop, Text, TextLink, Timestamp, Tooltip, TransitionComponent, Typography, WidgetLink, borderTabStyle, browser, buttonCss, contentBox, convertToStringAttributes, createEmptyComponent, createReactComponent, defaultRenderInstructions, embeddedLinkMapper, filterCssProps, filterCssPropsStyle, genericHashLink, headingElement, invertedHoverButton, itemList, linkTabStyle, list, paddedBorderTabStyle, parseHtmlString as processHtmlString, transitionComposer, useAction, useChildren, useColumns, useComponent, useComponentDescriptor, useComponentNode, useComponentPlatform, useContainer, useContext, useDispatch, useEventListener, useEvents, useIsMounted, useKeyPress, useLayout, usePrevious, useProperties, useRenderState, useRouteData, useRouter, useScroll, useSettings, useToggle, useTransitionEnd, useUniqueMenu, useWidgetEvent };
3061
+ export { AnchorLink, Button, Checkbox, ColumnContext, ComponentNodeContext, ComponentPropertyContext, Confirm, ContainerContext, DateFormats, Drawer, AnimationType as DrawerAnimationType, Dropdown, Empty, grid as Grid, Html, Icon, input as Input, ItemList, ItemTree, Lightbox, Link, List, Modal, NotFound, Overlay, Paragraph, Portal, RouteLink, RoutingContext, StyledText, SymbolBadge, TabStop, Text, TextLink, Timestamp, Tooltip, TransitionComponent, Typography, WidgetLink, borderTabStyle, browser, buttonCss, contentBox, convertToStringAttributes, createEmptyComponent, createReactComponent, defaultRenderInstructions, embeddedLinkMapper, filterCssProps, filterCssPropsStyle, genericHashLink, genericHtml, headingElement, invertedHoverButton, itemList, linkTabStyle, list, paddedBorderTabStyle, parseHtmlString as processHtmlString, transitionComposer, useAction, useChildren, useColumns, useComponent, useComponentDescriptor, useComponentNode, useComponentPlatform, useContainer, useContext, useDispatch, useEventListener, useEvents, useIsMounted, useKeyPress, useLayout, usePrevious, useProperties, useRenderState, useRouteData, useRouter, useScroll, useSettings, useToggle, useTransitionEnd, useUniqueMenu, useWidgetEvent };
2988
3062
  //# sourceMappingURL=index.js.map