@openfin/ui-library 0.26.1-alpha.1721400277 → 0.26.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.
@@ -1,4 +1,4 @@
1
- import React, { HTMLAttributes, ReactNode } from 'react';
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { IconSizeType, IconType } from '../../system/ThemeProvider/lib/types';
3
3
  export type PropsWithIcon = {
4
4
  icon: IconType;
@@ -15,4 +15,4 @@ export type IconSizeProps = {
15
15
  export type IconProps = HTMLAttributes<HTMLDivElement> & (PropsWithIcon | PropsWithChild) & IconSizeProps & {
16
16
  'data-testid'?: string;
17
17
  };
18
- export declare const Icon: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
18
+ export declare const Icon: import("styled-components").StyledComponent<({ tabIndex, icon, children, size, containerSize, "data-testid": dataTestId, ...props }: IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
package/dist/index.js CHANGED
@@ -165,7 +165,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
165
165
 
166
166
  background-color: ${({theme:e})=>e.palette.background1};
167
167
  transition: ${({transitionSpeed:e})=>`all ${e}ms linear`};
168
- border: ${({theme:e})=>`1px solid ${e.palette.background4}`};
168
+ border: ${({theme:e})=>`1px solid ${e.palette.background2}`};
169
169
  border-radius: ${({isWindows:e})=>!e&&"10px"};
170
170
  `,h=(0,a.default)(c.Box)`
171
171
  display: flex;
@@ -237,7 +237,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
237
237
  width: 100%;
238
238
  height: 1px;
239
239
  border: none;
240
- background-color: ${({theme:e})=>e.palette.background4};
240
+ background-color: ${({theme:e})=>e.palette.background2};
241
241
  `},9068:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SubmenuHeaderCustomContextMenuItem=void 0;const o=n(5893),i=n(6689),a=r(n(7518)),l=n(9634),c=n(7769),u=n(1335),s=n(3600);t.SubmenuHeaderCustomContextMenuItem=({label:e,showShouldHomeButton:t,onClose:n,onBack:r,selected:a})=>{const l=(0,i.useCallback)((e=>{e.stopPropagation(),null==r||r()}),[r]),c=(0,i.useCallback)((e=>{e.stopPropagation(),null==n||n()}),[n]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(f,{children:[(0,o.jsx)(d,Object.assign({side:"left",selected:a},{children:(0,o.jsx)(p,{icon:"ArrowLeftIcon",onClick:l,id:"back-icon",selected:a})})),(0,o.jsx)(C,Object.assign({size:"base",weight:"normal"},{children:e})),t&&(0,o.jsx)(d,Object.assign({side:"right"},{children:(0,o.jsx)(h,{icon:"Cross1Icon",onClick:c,id:"close-icon"})}))]}),(0,o.jsx)(s.SeparatorCustomContextMenuItem,{})]})};const f=(0,a.default)(u.Box)`
242
242
  width: 100%;
243
243
  height: 28px;
@@ -633,7 +633,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
633
633
  `},7261:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useTooltip=t.isElementOverflown=t.OptionTitle=void 0;const i=n(5893),a=n(6689),l=n(7769),c=n(9507),u=o(n(7518));t.OptionTitle=e=>{var{children:n}=e,o=r(e,["children"]);return(0,i.jsx)(s,Object.assign({ref:(0,t.useTooltip)(n)},o,{children:(0,i.jsx)("div",{children:n})}))};const s=(0,u.default)(l.Text)`
634
634
  ${c.Mixins.textOverflow};
635
635
  margin-left: ${({theme:e})=>e.px.xsmall};
636
- `;function f(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}t.isElementOverflown=f,t.useTooltip=e=>(0,a.useCallback)((t=>{t&&e&&f(t)&&(t.title=e)}),[])},7006:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;const i=n(5893),a=n(6689),l=o(n(7518)),c=n(1335),u=n(9507),s=n(3471),f=n(9669),d=(0,a.forwardRef)(((e,t)=>{var{tabIndex:n,icon:o,children:a,size:l="base",containerSize:c,"data-testid":u}=e,s=r(e,["tabIndex","icon","children","size","containerSize","data-testid"]);return(0,i.jsx)(C,Object.assign({},s,{iconSize:l,containerSize:c||l,justifyContent:"center",alignItems:"center","data-testid":u,tabIndex:n,ref:t},{children:o?(0,i.jsx)(p,Object.assign({ariaLabel:s["aria-label"],icon:o},s)):a}))}));d.displayName="Icon",t.Icon=(0,l.default)(d)``;const p=(0,l.default)((e=>{var{icon:t,ariaLabel:n}=e,o=r(e,["icon","ariaLabel"]);const a=s.IconSet[t];return(0,i.jsx)(a,Object.assign({role:"img","aria-label":n},o))}))``,C=(0,l.default)(c.Box)`
636
+ `;function f(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}t.isElementOverflown=f,t.useTooltip=e=>(0,a.useCallback)((t=>{t&&e&&f(t)&&(t.title=e)}),[])},7006:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;const i=n(5893),a=o(n(7518)),l=n(1335),c=n(9507),u=n(3471),s=n(9669);t.Icon=(0,a.default)((e=>{var{tabIndex:t,icon:n,children:o,size:a="base",containerSize:l,"data-testid":c}=e,u=r(e,["tabIndex","icon","children","size","containerSize","data-testid"]);return(0,i.jsx)(d,Object.assign({},u,{iconSize:a,containerSize:l||a,justifyContent:"center",alignItems:"center","data-testid":c,tabIndex:t},{children:n?(0,i.jsx)(f,Object.assign({ariaLabel:u["aria-label"],icon:n},u)):o}))}))``;const f=(0,a.default)((e=>{var{icon:t,ariaLabel:n}=e,o=r(e,["icon","ariaLabel"]);const a=u.IconSet[t];return(0,i.jsx)(a,Object.assign({role:"img","aria-label":n},o))}))``,d=(0,a.default)(l.Box)`
637
637
  /**
638
638
  * 1. Initialize local variables with reasonable defaults
639
639
  */
@@ -642,16 +642,15 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
642
642
  /**
643
643
  * 2. Inject variants -- ? What are Variants
644
644
  */
645
- ${(0,u.getVariantCSS)(f.variants,f.Variant.containerSize)}
646
- ${(0,u.getVariantCSS)(f.variants,f.Variant.iconSize)}
645
+ ${(0,c.getVariantCSS)(s.variants,s.Variant.containerSize)}
646
+ ${(0,c.getVariantCSS)(s.variants,s.Variant.iconSize)}
647
647
 
648
648
  width: var(--px-container, var(--px-default));
649
649
  height: var(--px-container, var(--px-default));
650
650
 
651
651
  /* SVG Asset */
652
-
653
652
  & > *,
654
- ${p} {
653
+ ${f} {
655
654
  display: block;
656
655
  width: var(--px-icon, var(--px-default));
657
656
  height: var(--px-icon, var(--px-default));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfin/ui-library",
3
3
  "description": "OpenFin UI Component Library",
4
- "version": "0.26.1-alpha.1721400277",
4
+ "version": "0.26.1",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "github:openfin/ui-library",