@openfin/ui-library 0.8.0-alpha.1669761878 → 0.8.0-alpha.1670018115

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 (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -94,7 +94,7 @@ var e={1521:(e,t,n)=>{n.r(t),n.d(t,{ActivityLogIcon:()=>i,AlignBaselineIcon:()=>
94
94
  &:focus {
95
95
  border-color: ${({theme:e})=>e.palette.inputFocused};
96
96
  }
97
- `}}},4130:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4249),t),o(n(6126),t)},9644:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandDirection=void 0,(n=t.ExpandDirection||(t.ExpandDirection={}))[n.Up=0]="Up",n[n.Down=1]="Down"},4021: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.ExpandableButton=void 0;const o=n(5893),i=n(6689),l=n(4130),a=r(n(7518)),c=n(9634),s=n(9141),u=n(3030),d=n(1335),C=n(9644);t.ExpandableButton=e=>{var t,n,r;const[a,g]=(0,i.useState)({show:!1,requestedByCollapse:!1}),m={size:e.size,kind:e.kind},w=Object.assign(Object.assign({},e),{shape:l.ButtonShape.square,"aria-label":null!==(t=e["aria-label"])&&void 0!==t?t:`Primary Button ${e.title}`}),b=null!==(n=e.expandDirection)&&void 0!==n?n:C.ExpandDirection.Down;return(0,i.useEffect)((()=>{if(!a.requestedByCollapse)return;const e=setTimeout((()=>g({requestedByCollapse:!1,show:!1})),200);return()=>clearTimeout(e)}),[a.requestedByCollapse]),(0,o.jsxs)(p,{children:[(0,o.jsxs)(v,{children:[(0,o.jsx)(f,Object.assign({},w)),e.secondaryButtons&&e.secondaryButtons.length>0&&(0,o.jsx)(d.Box,Object.assign({id:"dropdown-container"},{children:(0,o.jsxs)(h,Object.assign({},m,{role:"combobox",onClick:()=>{a.requestedByCollapse||g({requestedByCollapse:!1,show:!a.show})},"aria-label":"Expand Secondary Buttons Panel","aria-expanded":a.show},{children:[b===C.ExpandDirection.Down&&(0,o.jsx)(c.Icon,{icon:"CaretDownIcon"}),b===C.ExpandDirection.Up&&(0,o.jsx)(c.Icon,{icon:"CaretUpIcon"})]}))}))]}),e.secondaryButtons&&e.secondaryButtons.length>0&&(0,o.jsx)(s.AnimatePresence,{children:a.show&&(0,o.jsx)(u.ExpandablePanel,{expandDirection:b,secondaryButtons:null!==(r=e.secondaryButtons)&&void 0!==r?r:[],closePanelOnSecondaryButtonClick:e.closePanelOnSecondaryButtonClick,onCollapseRequest:()=>g({show:!1,requestedByCollapse:!0}),buttonSize:e.size})})]})};const f=(0,a.default)(l.Button)`
97
+ `}}},4130:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4249),t),o(n(6126),t)},9644:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandDirection=void 0,(n=t.ExpandDirection||(t.ExpandDirection={}))[n.Up=0]="Up",n[n.Down=1]="Down"},4021: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.ExpandableButton=void 0;const o=n(5893),i=n(6689),l=n(4130),a=r(n(7518)),c=n(9634),s=n(9141),u=n(3030),d=n(1335),C=n(9644);t.ExpandableButton=e=>{var t,n,r;const[a,g]=(0,i.useState)({show:!1,requestedByCollapse:!1}),m={size:e.size,kind:e.kind,disabled:e.disabled},w=Object.assign(Object.assign({},e),{shape:l.ButtonShape.square,"aria-label":null!==(t=e["aria-label"])&&void 0!==t?t:`Primary Button ${e.title}`}),b=null!==(n=e.expandDirection)&&void 0!==n?n:C.ExpandDirection.Down;return(0,i.useEffect)((()=>{if(!a.requestedByCollapse)return;const e=setTimeout((()=>g({requestedByCollapse:!1,show:!1})),200);return()=>clearTimeout(e)}),[a.requestedByCollapse]),(0,o.jsxs)(p,{children:[(0,o.jsxs)(v,{children:[(0,o.jsx)(f,Object.assign({},w)),e.secondaryButtons&&e.secondaryButtons.length>0&&(0,o.jsx)(d.Box,Object.assign({id:"dropdown-container"},{children:(0,o.jsxs)(h,Object.assign({},m,{role:"combobox",onClick:()=>{a.requestedByCollapse||g({requestedByCollapse:!1,show:!a.show})},"aria-label":"Expand Secondary Buttons Panel","aria-expanded":a.show},{children:[b===C.ExpandDirection.Down&&(0,o.jsx)(c.Icon,{icon:"CaretDownIcon"}),b===C.ExpandDirection.Up&&(0,o.jsx)(c.Icon,{icon:"CaretUpIcon"})]}))}))]}),e.secondaryButtons&&e.secondaryButtons.length>0&&(0,o.jsx)(s.AnimatePresence,{children:a.show&&(0,o.jsx)(u.ExpandablePanel,{expandDirection:b,secondaryButtons:null!==(r=e.secondaryButtons)&&void 0!==r?r:[],closePanelOnSecondaryButtonClick:e.closePanelOnSecondaryButtonClick,onCollapseRequest:()=>g({show:!1,requestedByCollapse:!0}),buttonSize:e.size})})]})};const f=(0,a.default)(l.Button)`
98
98
  margin-right: ${({theme:e})=>e.px.xsmall};
99
99
  `,h=(0,a.default)(l.Button)`
100
100
  width: ${e=>e.theme.px.xxlarge};
@@ -109,7 +109,7 @@ var e={1521:(e,t,n)=>{n.r(t),n.d(t,{ActivityLogIcon:()=>i,AlignBaselineIcon:()=>
109
109
  `,p=a.default.div`
110
110
  position: relative;
111
111
  display: inline-block;
112
- `},2128:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setupExpandablePanel=void 0;const r=n(9644);t.setupExpandablePanel=(e,t)=>{if(!e||0===e.childNodes.length)return;const n=e.parentElement,o=null==n?void 0:n.getBoundingClientRect(),i=e.getBoundingClientRect();if(!o)return;const l=i.height,a=i.width>o.width?o.width:i.width;e.style.width=`${a}px`,e.style.opacity="1",e.style.left="0px",t===r.ExpandDirection.Down&&(e.style.top=`${o.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)),l=n(9141),a=n(4130),c=n(1335),s=n(2128),u=r(n(4483)),d={type:"spring",duration:.2,bounce:.25};t.ExpandablePanel=e=>{const t=`${e.panelId}-expandable-panel`;return(0,o.jsx)(u.default,Object.assign({focusTrapOptions:{fallbackFocus:`#${t}`,clickOutsideDeactivates:!0,onDeactivate:e.onCollapseRequest}},{children:(0,o.jsx)(f,Object.assign({ref:t=>(0,s.setupExpandablePanel)(t,e.expandDirection),tabIndex:0,id:t,initial:"initial",exit:"hidden",animate:"visible",role:"menu",transition:d},{children:e.secondaryButtons.map(((t,n)=>(0,o.jsx)(a.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)(C,Object.assign({"aria-label":t.title},{children:t.title}))}),n)))}),"expandablePanel")}))};const C=(0,i.default)(c.Box)`
112
+ `},2128:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setupExpandablePanel=void 0;const r=n(9644);t.setupExpandablePanel=(e,t)=>{if(!e||0===e.childNodes.length)return;const n=e.parentElement,o=null==n?void 0:n.getBoundingClientRect(),i=e.getBoundingClientRect();if(!o)return;const l=i.height,a=i.width>o.width?o.width:i.width;e.style.width=`${a}px`,e.style.opacity="1",e.style.left=a<o.width?o.width-a+"px":"0px",t===r.ExpandDirection.Down&&(e.style.top=`${o.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)),l=n(9141),a=n(4130),c=n(1335),s=n(2128),u=r(n(4483)),d={type:"spring",duration:.2,bounce:.25};t.ExpandablePanel=e=>{const t=`${e.panelId}-expandable-panel`;return(0,o.jsx)(u.default,Object.assign({focusTrapOptions:{fallbackFocus:`#${t}`,clickOutsideDeactivates:!0,onDeactivate:e.onCollapseRequest}},{children:(0,o.jsx)(f,Object.assign({ref:t=>(0,s.setupExpandablePanel)(t,e.expandDirection),tabIndex:0,id:t,initial:"initial",exit:"hidden",animate:"visible",role:"menu",transition:d},{children:e.secondaryButtons.map(((t,n)=>(0,o.jsx)(a.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)(C,Object.assign({"aria-label":t.title},{children:t.title}))}),n)))}),"expandablePanel")}))};const C=(0,i.default)(c.Box)`
113
113
  padding: ${({theme:e})=>`0 ${e.px.xsmall}`};
114
114
  white-space: nowrap;
115
115
  text-overflow: ellipsis;
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.8.0-alpha.1669761878",
4
+ "version": "0.8.0-alpha.1670018115",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "github:openfin/ui-library",