@openfin/ui-library 0.23.10-alpha.1706911790 → 0.23.10-alpha.1707338701

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.
@@ -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<({ icon, children, size, containerSize, "data-testid": dataTestId, ...props }: IconProps) => JSX.Element, 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
@@ -184,7 +184,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
184
184
  `,w=l.default.div`
185
185
  position: relative;
186
186
  display: inline-block;
187
- `},2128:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setupExpandablePanel=void 0;const r=n(9644);t.setupExpandablePanel=(e,t,n=!1)=>{if(!e||0===e.childNodes.length)return;const o=e.parentElement,i=null==o?void 0:o.getBoundingClientRect(),a=e.getBoundingClientRect();if(!i)return;const l=a.height,c=a.width<=i.width||n?a.width:i.width,s=i.x+c>document.body.clientWidth||c<i.width;e.style.width=`${c}px`,e.style.opacity="1",s?e.style.right="0px":e.style.left="0px",t===r.ExpandDirection.Down&&(e.style.top=`${i.height}px`),t===r.ExpandDirection.Up&&(e.style.top=-1*l+"px")}},3030: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.ExpandablePanel=void 0;const o=n(5893),i=r(n(7518)),a=n(9141),l=n(4130),c=n(1335),s=n(2128),u=r(n(4483)),d={type:"spring",duration:.2,bounce:.25};t.ExpandablePanel=e=>{var t;const n=`${e.panelId}-expandable-panel`;return(0,o.jsx)(u.default,Object.assign({focusTrapOptions:{fallbackFocus:`#${n}`,clickOutsideDeactivates:!0,onDeactivate:e.onCollapseRequest,initialFocus:!1,document:e.document}},{children:(0,o.jsx)(p,Object.assign({ref:t=>(0,s.setupExpandablePanel)(t,e.expandDirection,e.stretch),tabIndex:0,id:n,initial:"initial",exit:"hidden",buttonSize:null!==(t=e.buttonSize)&&void 0!==t?t:l.ButtonSize.base,animate:"visible",role:"menu",transition:d,onMouseOver:()=>{var e;return null===(e=document.activeElement)||void 0===e?void 0:e.blur()}},{children:e.secondaryButtons.map(((t,n)=>(0,o.jsx)(l.Button,Object.assign({className:"menu-item",tabIndex:n+1,title:t.title,role:"menuitem",size:e.buttonSize,disabled:t.disabled,kind:"textOnly",onClick:n=>((t,n)=>{e.closePanelOnSecondaryButtonClick?(n.onClick(t),e.onCollapseRequest()):n.onClick(t,(()=>e.onCollapseRequest()))})(n,t),"aria-label":t.title},{children:(0,o.jsx)(f,Object.assign({"aria-label":t.title},{children:t.title}))}),n)))}),"expandablePanel")}))};const f=(0,i.default)(c.Box)`
187
+ `},2128:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setupExpandablePanel=void 0;const r=n(9644);t.setupExpandablePanel=(e,t,n=!1)=>{if(!e||0===e.childNodes.length)return;const o=e.parentElement,i=null==o?void 0:o.getBoundingClientRect(),a=e.getBoundingClientRect();if(!i)return;const l=a.height,c=a.width<=i.width||n?a.width:i.width,s=i.x+c>document.body.clientWidth||c<i.width;e.style.width=`${c}px`,e.style.opacity="1",s?e.style.right="0px":e.style.left="0px",t===r.ExpandDirection.Down&&(e.style.top=`${i.height}px`),t===r.ExpandDirection.Up&&(e.style.top=-1*l+"px")}},3030: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.ExpandablePanel=void 0;const o=n(5893),i=r(n(7518)),a=n(9141),l=n(4130),c=n(1335),s=n(2128),u=r(n(4483)),d={type:"spring",duration:.2,bounce:.25};t.ExpandablePanel=e=>{var t;const n=`${e.panelId}-expandable-panel`;return(0,o.jsx)(u.default,Object.assign({focusTrapOptions:{fallbackFocus:`#${n}`,clickOutsideDeactivates:!0,onDeactivate:e.onCollapseRequest,initialFocus:!1,document:e.document,returnFocusOnDeactivate:!1}},{children:(0,o.jsx)(p,Object.assign({ref:t=>(0,s.setupExpandablePanel)(t,e.expandDirection,e.stretch),tabIndex:0,id:n,initial:"initial",exit:"hidden",buttonSize:null!==(t=e.buttonSize)&&void 0!==t?t:l.ButtonSize.base,animate:"visible",role:"menu",transition:d,onMouseOver:()=>{var e;return null===(e=document.activeElement)||void 0===e?void 0:e.blur()}},{children:e.secondaryButtons.map(((t,n)=>(0,o.jsx)(l.Button,Object.assign({className:"menu-item",tabIndex:n+1,title:t.title,role:"menuitem",size:e.buttonSize,disabled:t.disabled,kind:"textOnly",onClick:n=>((t,n)=>{e.closePanelOnSecondaryButtonClick?(n.onClick(t),e.onCollapseRequest()):n.onClick(t,(()=>e.onCollapseRequest()))})(n,t),"aria-label":t.title},{children:(0,o.jsx)(f,Object.assign({"aria-label":t.title},{children:t.title}))}),n)))}),"expandablePanel")}))};const f=(0,i.default)(c.Box)`
188
188
  padding-bottom: 1px;
189
189
  padding-top: 1px;
190
190
  white-space: nowrap;
@@ -522,7 +522,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
522
522
  `},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),s=o(n(7518));t.OptionTitle=e=>{var{children:n}=e,o=r(e,["children"]);return(0,i.jsx)(u,Object.assign({ref:(0,t.useTooltip)(n)},o,{children:(0,i.jsx)("div",{children:n})}))};const u=(0,s.default)(l.Text)`
523
523
  ${c.Mixins.textOverflow};
524
524
  margin-left: ${({theme:e})=>e.px.xsmall};
525
- `;function d(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}t.isElementOverflown=d,t.useTooltip=e=>(0,a.useCallback)((t=>{t&&e&&d(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),s=n(3471),u=n(9669);t.Icon=(0,a.default)((e=>{var{icon:t,children:n,size:o="base",containerSize:a,"data-testid":l}=e,c=r(e,["icon","children","size","containerSize","data-testid"]);return(0,i.jsx)(f,Object.assign({},c,{iconSize:o,containerSize:a||o,justifyContent:"center",alignItems:"center","data-testid":l},{children:t?(0,i.jsx)(d,Object.assign({ariaLabel:c["aria-label"],icon:t},c)):n}))}))``;const d=(0,a.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))}))``,f=(0,a.default)(l.Box)`
525
+ `;function d(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}t.isElementOverflown=d,t.useTooltip=e=>(0,a.useCallback)((t=>{t&&e&&d(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),s=n(3471),u=n(9669);t.Icon=(0,a.default)((e=>{var{tabIndex:t,icon:n,children:o,size:a="base",containerSize:l,"data-testid":c}=e,s=r(e,["tabIndex","icon","children","size","containerSize","data-testid"]);return(0,i.jsx)(f,Object.assign({},s,{iconSize:a,containerSize:l||a,justifyContent:"center",alignItems:"center","data-testid":c,tabIndex:t},{children:n?(0,i.jsx)(d,Object.assign({ariaLabel:s["aria-label"],icon:n},s)):o}))}))``;const d=(0,a.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))}))``,f=(0,a.default)(l.Box)`
526
526
  /**
527
527
  * 1. Initialize local variables with reasonable defaults
528
528
  */
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.23.10-alpha.1706911790",
4
+ "version": "0.23.10-alpha.1707338701",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "github:openfin/ui-library",