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

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 +1 -1
  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};
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.1670011425",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "github:openfin/ui-library",