@openfin/ui-library 0.23.2-alpha.1701363982 → 0.23.2
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 +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -441,7 +441,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
|
|
|
441
441
|
width: 100%;
|
|
442
442
|
user-select: none;
|
|
443
443
|
`,h=(0,s.default)(l.Icon)`
|
|
444
|
-
color: ${({theme:e,status:t})=>(0,d.getStatusColor)(e,t,"
|
|
444
|
+
color: ${({theme:e,status:t})=>(0,d.getStatusColor)(e,t,"inputBorder")};
|
|
445
445
|
`,v=(0,s.default)(u.Box)`
|
|
446
446
|
align-items: center;
|
|
447
447
|
background: ${({theme:e})=>e.palette.background4};
|
|
@@ -475,10 +475,12 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
|
|
|
475
475
|
outline: 0;
|
|
476
476
|
border-color: ${({theme:e,status:t})=>(0,d.getStatusColor)(e,t,"inputFocused")};
|
|
477
477
|
}
|
|
478
|
-
`},6062: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.DropdownMenu=void 0;const o=n(5893),i=n(6689),a=n(1335),l=r(n(7518)),c=n(7261),s=n(279),u=n(347),d=n(162);t.DropdownMenu=(0,i.forwardRef)((({label:e,options:t=[[]],placeholder:n="Select an option",selected:r,onOptionHover:l,onChange:
|
|
478
|
+
`},6062: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.DropdownMenu=void 0;const o=n(5893),i=n(6689),a=n(1335),l=r(n(7518)),c=n(7261),s=n(279),u=n(347),d=n(162);t.DropdownMenu=(0,i.forwardRef)((({label:e,options:t=[[]],placeholder:n="Select an option",selected:r,onOptionHover:l,onChange:h,renderLabel:v,fitContent:g},m)=>{const[w,b]=(0,i.useState)(!1);(0,i.useEffect)((()=>{1===t[0].length&&y(!1)}),[t]);const y=e=>{b(null!=e?e:!w)},{focusedOption:x,handleKeyDown:L}=(0,u.useDropdownKeyboardNavigation)(t,r,w,y,h);return(0,o.jsx)(C,Object.assign({ref:m,flexDirection:"column",onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||b(!1)},onKeyDown:L},{children:(0,o.jsxs)(a.Box,Object.assign({gap:"small",flexDirection:"column",style:{width:"100%"}},{children:[e&&(0,o.jsx)(f,Object.assign({htmlFor:"dropdown-button"},{children:(0,o.jsx)(c.OptionTitle,{children:e})})),(0,o.jsxs)(p,{children:[v?v(r||{title:n,value:null},w,y,x):(0,o.jsx)(d.DropdownButton,{tabIndex:0,activeDescendant:`menu-option-${null==x?void 0:x.value}`,expanded:w&&t[0].length>1,handleClick:()=>y(),selected:r,placeholder:n}),t.length&&t[0].length>1&&w&&(0,o.jsx)(s.Menu,{menuId:"dropdown-listbox",options:t,selected:r,handleExpandMenu:y,onOptionHover:l,onChange:h,fitContent:g,focusedOption:x,absolutePosition:!0})]})]}))}))})),t.DropdownMenu.displayName="DropdownMenu";const f=l.default.label`
|
|
479
|
+
font-weight: ${({theme:e})=>e.fontWeight.bold};
|
|
480
|
+
`,C=(0,l.default)(a.Box)`
|
|
479
481
|
user-select: none;
|
|
480
482
|
position: relative;
|
|
481
|
-
`,
|
|
483
|
+
`,p=(0,l.default)(a.Box)``},6026: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(6062),t),o(n(279),t),o(n(162),t)},279: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.ButtonImage=t.Menu=void 0;const o=n(5893),i=r(n(6689)),a=r(n(7518)),l=n(9634),c=n(1335),s=n(7261);t.Menu=({options:e,selected:n,menuId:r,handleExpandMenu:a,onOptionHover:l,onChange:c,width:h,height:v,header:g,focusedOption:m,absolutePosition:w,fitContent:b})=>{const y=e=>{null==l||l(e)};return(0,o.jsxs)(u,Object.assign({role:"listbox",flexDirection:"column",onMouseLeave:()=>{y(null)},"data-testid":"menu",id:r,width:h,height:v,absolutePosition:w,fitContent:b},{children:[g&&(0,o.jsxs)(i.default.Fragment,{children:[(0,o.jsx)(f,{children:(0,o.jsx)(s.OptionTitle,{children:g})}),(0,o.jsx)(p,{})]}),e.map(((e,r)=>(0,o.jsxs)(i.default.Fragment,{children:[0!==r&&(0,o.jsx)(p,{}),e.map(((e,r)=>(0,o.jsxs)(d,Object.assign({role:"option",isFocused:(null==m?void 0:m.value)===e.value,"aria-selected":(null==n?void 0:n.value)===e.value,alignItems:"center",as:"button","data-testid":`menu-option-${r}`,id:`menu-option-${e.value}`,title:e.title,onClick:()=>{e.overrideOnClick?e.overrideOnClick(e):c(e),null==a||a()},onMouseOver:()=>y(e.value)},{children:[(null==e?void 0:e.iconUrl)&&(0,o.jsx)(t.ButtonImage,{src:e.iconUrl,style:{marginRight:"8px"}}),(0,o.jsx)(s.OptionTitle,{children:e.title}),(null==n?void 0:n.value)===e.value?(0,o.jsx)(C,{icon:"CheckIcon"}):(0,o.jsx)(C,{children:(0,o.jsx)(o.Fragment,{})})]}),r)))]},r)))]}))};const u=(0,a.default)(c.Box)`
|
|
482
484
|
width: ${({width:e,fitContent:t})=>e||(t?"fit-content":"100%")};
|
|
483
485
|
max-height: ${({height:e})=>null!=e?e:"fit-content"};
|
|
484
486
|
top: ${({theme:e})=>`calc(100% + ${e.px.xsmall})`};
|
|
@@ -519,7 +521,7 @@ var e={8594:(e,t,n)=>{n.d(t,{Z:()=>o});var r=/^((children|dangerouslySetInnerHTM
|
|
|
519
521
|
height: ${({theme:e})=>e.iconSize.xlarge};
|
|
520
522
|
width: ${({theme:e})=>e.iconSize.xlarge};
|
|
521
523
|
border-radius: ${({theme:e})=>e.radius.small};
|
|
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)`
|
|
524
|
+
`},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",Object.assign({style:{fontWeight:"bold"}},{children:n}))}))};const u=(0,s.default)(l.Text)`
|
|
523
525
|
${c.Mixins.textOverflow};
|
|
524
526
|
margin-left: ${({theme:e})=>e.px.xsmall};
|
|
525
527
|
`;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)`
|
package/package.json
CHANGED