@openfin/ui-library 0.30.2-alpha.1743613030 → 0.30.3-alpha.1743695836
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.js +9 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -361,11 +361,14 @@ var e={1193:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(1601),o=n.n(r),a=n(6
|
|
|
361
361
|
flex-direction: row;
|
|
362
362
|
gap: ${({theme:e})=>e.px.small};
|
|
363
363
|
/*
|
|
364
|
-
* Container width is colorbox width *
|
|
364
|
+
* Container width is colorbox width * columnCount + # of gaps * gap width + side padding
|
|
365
365
|
*/
|
|
366
|
-
width: calc(
|
|
366
|
+
width: calc(
|
|
367
|
+
${({theme:e})=>e.px.large} * 5 + 4 * ${({theme:e})=>e.px.small} + 2 *
|
|
368
|
+
${({theme:e})=>e.px.small}
|
|
369
|
+
);
|
|
367
370
|
flex-wrap: wrap;
|
|
368
|
-
padding: ${({theme:e})=>e.px.small}
|
|
371
|
+
padding: ${({theme:e})=>e.px.small} ${({theme:e})=>e.px.small};
|
|
369
372
|
`},9005: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};Object.defineProperty(t,"__esModule",{value:!0}),t.CustomContextMenuItem=void 0;const o=n(4848),a=n(2015),i=n(6554),l=n(2294),s=n(3741),c=n(4953),u={normal:l.NormalCustomContextMenuItem,checkbox:l.NormalCustomContextMenuItem,submenu:l.NormalCustomContextMenuItem,separator:i.SeparatorCustomContextMenuItem,submenuHeader:s.SubmenuHeaderCustomContextMenuItem,widget:c.WidgetCustomContextMenuItem};t.CustomContextMenuItem=e=>{var{type:t="normal",icon:n,label:i,enabled:l=!0,checked:s,hasSubMenu:c,showShouldHomeButton:d,onClick:f,onClose:p,onBack:h,selected:b}=e,g=r(e,["type","icon","label","enabled","checked","hasSubMenu","showShouldHomeButton","onClick","onClose","onBack","selected"]);let m;switch(t){case"normal":case"checkbox":{m=Object.assign(Object.assign({},g),{type:t,label:i,icon:n,enabled:l,checked:s,selected:b,onClick:f});const e=u[t];return(0,a.createElement)(e,Object.assign({},m,{key:i}))}case"submenu":{m=Object.assign(Object.assign({},g),{label:i,enabled:l,checked:s,submenu:c,selected:b,onClick:f});const e=u[t];return(0,a.createElement)(e,Object.assign({},m,{key:i}))}case"submenuHeader":{m={label:i,showShouldHomeButton:d,onClose:p,onBack:h,selected:b,onClick:f};const e=u[t];return(0,a.createElement)(e,Object.assign({},m,{key:i}))}case"separator":{const e=u[t];return(0,o.jsx)(e,{})}case"widget":{const e=Object.assign(Object.assign({},g),{onClick:f,label:i,enabled:l}),n=u[t];return(0,a.createElement)(n,Object.assign({},e,{key:i,onClick:f}))}default:return(0,o.jsx)(o.Fragment,{})}}},2294: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.NormalCustomContextMenuItem=void 0;const o=n(4848),a=r(n(2770)),i=n(5917),l=n(6418);t.NormalCustomContextMenuItem=({type:e,label:t,enabled:n=!0,checked:r,submenu:a,onClick:i,selected:c,data:u})=>(0,o.jsx)(l.MenuItemContainer,{children:(0,o.jsxs)(l.MenuItemInnerContainer,{onClick:n?()=>null==i?void 0:i(u):void 0,enabled:n.toString(),selected:c,children:["checkbox"===e&&(0,o.jsx)(l.MenuItemIconContainer,{side:"left",children:(0,o.jsx)(s,{icon:"CheckIcon",enabled:n.toString(),checked:r})}),(0,o.jsx)(l.MenuItemText,{size:"base",weight:"normal",enabled:n,children:t}),a&&(0,o.jsx)(l.MenuItemIconContainer,{side:"right",children:(0,o.jsx)(l.MenuItemRightIcon,{icon:"ChevronRightIcon",enabled:n})})]})});const s=(0,a.default)(i.Icon)`
|
|
370
373
|
svg path {
|
|
371
374
|
fill: ${({theme:e,enabled:t,checked:n})=>"true"===t?n?e.palette.textDefault:"transparent":e.palette.textInactive};
|
|
@@ -441,7 +444,7 @@ var e={1193:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(1601),o=n.n(r),a=n(6
|
|
|
441
444
|
padding: ${({theme:e})=>`${e.px.small} 0 ${e.px.small} 0`};
|
|
442
445
|
`,t.MenuItemContainer=(0,o.default)(a.Box)`
|
|
443
446
|
width: 100%;
|
|
444
|
-
padding: ${({theme:e})=>`0 ${e.px.
|
|
447
|
+
padding: ${({theme:e})=>`0 ${e.px.small} 0 ${e.px.small}`};
|
|
445
448
|
`,t.MenuItemInnerContainer=(0,o.default)(a.Box)`
|
|
446
449
|
width: 100%;
|
|
447
450
|
min-height: 28px;
|
|
@@ -456,6 +459,7 @@ var e={1193:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(1601),o=n.n(r),a=n(6
|
|
|
456
459
|
}
|
|
457
460
|
`,t.MenuItemIconContainer=(0,o.default)(a.Box)`
|
|
458
461
|
margin-left: ${({side:e})=>"right"===e?"auto":0};
|
|
462
|
+
padding: ${({theme:e,side:t})=>"right"===t?`0 ${e.px.small} 0 0`:`0 0 0 ${e.px.small}`};
|
|
459
463
|
`,t.MenuItemRightIcon=(0,o.default)(i.Icon)`
|
|
460
464
|
margin-left: auto;
|
|
461
465
|
|
|
@@ -473,6 +477,7 @@ var e={1193:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(1601),o=n.n(r),a=n(6
|
|
|
473
477
|
white-space: nowrap;
|
|
474
478
|
|
|
475
479
|
user-select: none;
|
|
480
|
+
padding: ${({theme:e})=>`0 ${e.px.xxxlarge} 0 ${e.px.small}`};
|
|
476
481
|
`},8577: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(3803),t)},3803: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.Toggle=void 0;const a=n(4848),i=n(2015),l=o(n(2770)),s=n(2649),c=n(2094),u=n(8820);t.Toggle=e=>{var{id:t,label:n,onChange:o,labelSide:l="right",type:s="checkbox",helperText:c}=e,b=r(e,["id","label","onChange","labelSide","type","helperText"]);const[g,m]=(0,i.useState)(b.checked);return(0,i.useEffect)((()=>{m(b.checked)}),[b.checked]),(0,a.jsxs)(d,{labelSide:l,children:[(n||c)&&(0,a.jsx)(u.Label,{htmlFor:t,text:n,helperText:c}),(0,a.jsxs)(f,{isChecked:g,children:[(0,a.jsx)(h,Object.assign({},b,{id:t,type:s,onChange:e=>{m(e.target.checked),null==o||o(e)}})),(0,a.jsx)(p,{tabIndex:-1,"aria-hidden":"true",isChecked:g})]})]})};const d=l.default.div`
|
|
477
482
|
display: flex;
|
|
478
483
|
gap: ${({theme:e})=>e.px.xlarge};
|
package/package.json
CHANGED