UNPKG

monday-ui-react-core

Version:

Official monday.com UI resources for application development in React.js

1 lines • 69.9 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["monday-style"]=t():e["monday-style"]=t()}(this,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=149)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("classnames")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.refs,n=void 0===t?[]:t;return(0,o.useMemo)((function(){return n.every((function(e){return null===e}))?null:function(e){n.forEach((function(t){t&&function(e,t){if(null===e)return;if("function"==typeof e)return void e(t);try{e.current=t}catch(n){throw console.error(n),new Error("Cannot assign value '".concat(t,"' to ref '").concat(e,"'"))}}(t,e)}))}}),[n])};var o=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.eventName,n=e.callback,r=e.ref,a=e.capture,i=void 0!==a&&a;(0,o.useEffect)((function(){var e=r&&r.current;if(e){var o={capture:i};return e.addEventListener(t,n,o),function(){e.removeEventListener(t,n,o)}}}),[t,r,n,i])};var o=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogPositions=t.SIZES=void 0;var o=Object.freeze({LARGE:"large",MEDIUM:"medium",SMALL:"small"});t.SIZES=o;var r=Object.freeze({LEFT:"left",LEFT_START:"left-start",LEFT_END:"left-end",RIGHT:"right",RIGHT_START:"right-start",RIGHT_END:"right-end",TOP:"top",TOP_START:"top-start",TOP_END:"top-end",BOTTOM:"bottom",BOTTOM_START:"bottom-start",BOTTOM_END:"bottom-end"});t.DialogPositions=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.keys,o=void 0===n?[]:n,i=e.ref,u=e.callback,l=e.ignoreDocumentFallback,c=void 0!==l&&l,s=e.capture,d=void 0!==s&&s,f=e.preventDefault,p=void 0!==f&&f,m=e.stopPropagation,y=void 0!==m&&m,v=e.keyEventName,b=void 0===v?"keydown":v,g=(0,r.useRef)(document),h=(0,r.useCallback)((function(e){var t=e.key;o.includes(t)&&(p&&e.preventDefault(),y&&e.stopPropagation(),u(e))}),[u,o,p,y]);t=i||(c?null:g);(0,a.default)({eventName:b,callback:h,ref:t,capture:d})};var o,r=n(0),a=(o=n(4))&&o.__esModule?o:{default:o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==m(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}o.default=e,n&&n.set(e,o);return o}(n(0)),r=d(n(1)),a=d(n(2)),i=n(18),u=d(n(14)),l=d(n(19)),c=d(n(21)),s=d(n(3));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n(22);var y=(0,o.forwardRef)((function(e,t){var n=e.onClick,r=e.className,d=e.icon,f=e.clickable,y=e.iconLabel,v=e.iconType,b=e.iconSize,g=e.ignoreFocusStyle,h=e.tabindex,O=e.ariaHidden,T=(0,c.default)({onClick:n,iconLabel:y,clickable:f,className:r,isDecorationOnly:O,ignoreFocusStyle:g,externalTabIndex:h}),S=T.screenReaderAccessProps,E=T.onClickCallback,w=T.computedClassName,k=T.iconRef,P=(0,s.default)({refs:[t,k]});if(!d)return null;var _="function"==typeof d;if(v===i.ICON_TYPES.SVG||_||"object"===m(d)){var C=d;return o.default.createElement(C,p({},S,{ref:_?void 0:P,size:b.toString(),onClick:n,className:w}))}return v===i.ICON_TYPES.SRC?o.default.createElement(u.default,p({src:d},S,{className:(0,a.default)(w),onClick:E})):o.default.createElement(l.default,p({},S,{className:(0,a.default)(w),onClick:E,ref:P,icon:d}))}));y.type=i.ICON_TYPES,y.propTypes={onClick:r.default.func,className:r.default.string,iconType:r.default.oneOf([y.type.SVG,y.type.ICON_FONT,i.ICON_TYPES.SRC]),icon:r.default.oneOfType([r.default.string,r.default.func]),clickable:r.default.bool,iconLabel:r.default.string,iconSize:r.default.oneOfType([r.default.number,r.default.string]),ignoreFocusStyle:r.default.bool,ariaHidden:r.default.bool},y.defaultProps={onClick:function(){},className:"",icon:"",clickable:!0,iconLabel:void 0,iconType:i.ICON_TYPES.SVG,iconSize:16,ignoreFocusStyle:!1,ariaHidden:void 0},y.__docgenInfo={description:"",methods:[],displayName:"Icon",props:{onClick:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},className:{defaultValue:{value:'""',computed:!1},type:{name:"string"},required:!1,description:""},icon:{defaultValue:{value:'""',computed:!1},type:{name:"union",value:[{name:"string"},{name:"func"}]},required:!1,description:"we support three types of icons - SVG, FONT and SRC (classname) so this prop is either the name of the icon or the component"},clickable:{defaultValue:{value:"true",computed:!1},type:{name:"bool"},required:!1,description:"is in used for tabIndex"},iconLabel:{defaultValue:{value:"undefined",computed:!0},type:{name:"string"},required:!1,description:"icon aria label support"},iconType:{defaultValue:{value:"ICON_TYPES.SVG",computed:!0},type:{name:"enum",value:[{value:"Icon.type.SVG",computed:!0},{value:"Icon.type.ICON_FONT",computed:!0},{value:"ICON_TYPES.SRC",computed:!0}]},required:!1,description:"the type of the component - svg, font or custom svg (using react-inlinesvg)"},iconSize:{defaultValue:{value:"16",computed:!1},type:{name:"union",value:[{name:"number"},{name:"string"}]},required:!1,description:"size for font icon"},ignoreFocusStyle:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"remove focus style"},ariaHidden:{defaultValue:{value:"undefined",computed:!0},type:{name:"bool"},required:!1,description:""}}};var v=y;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chainRefFunctions=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){for(var o=0;o<e.length;o++){var a=e[o];try{var i=void 0;if((0,r.default)(a)?i=a(n):a&&(a.current=n),!1===i&&t)return}catch(e){return void console.error(e)}}}},t.chainFunctions=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){for(var o=0;o<e.length;o++){var r=e[o];try{if(!1===(r&&r(n))&&t)return}catch(e){return void console.error(e)}}}},t.convertToArray=function(e){return(0,o.default)(e)?e:[e]},t.NOOP=function(){};var o=a(n(24)),r=a(n(11));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.isClickable,n=e.label,a=e.isDecorationOnly;return(0,o.useMemo)((function(){return(0,r.getIconScreenReaderAccessProps)({isClickable:t,label:n,isDecorationOnly:a})}),[t,n,a])};var o=n(0),r=n(17)},function(e,t){e.exports=require("lodash/noop")},function(e,t){e.exports=require("lodash/isFunction")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keyCodes=void 0;t.keyCodes={ENTER:"Enter",SPACE:" "}},function(e,t){e.exports=require("lodash/isNil")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=c(n(0)),r=c(n(1)),a=c(n(2)),i=c(n(15));n(16);var u=c(n(9)),l=["className","src","onClick","clickable","ariaLabel","ariaHidden"];function c(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var f=function(e){var t=e.className,n=e.src,r=e.onClick,c=e.clickable,f=e.ariaLabel,p=e.ariaHidden,m=d(e,l),y=(0,u.default)({isClickable:c,label:f,isDecorationOnly:p});return o.default.createElement(i.default,s({},y,{onClick:r,src:n,className:(0,a.default)("monday-style-custom-svg-icon--wrapper",t)},m))};f.propTypes={className:r.default.string,src:r.default.string,ariaLabel:r.default.string,ariaHidden:r.default.bool},f.defaultProps={className:"",src:"",ariaLabel:void 0,ariaHidden:void 0},f.__docgenInfo={description:"",methods:[],displayName:"CustomSvgIcon",props:{className:{defaultValue:{value:'""',computed:!1},type:{name:"string"},required:!1,description:""},src:{defaultValue:{value:'""',computed:!1},type:{name:"string"},required:!1,description:""},ariaLabel:{defaultValue:{value:"undefined",computed:!0},type:{name:"string"},required:!1,description:""},ariaHidden:{defaultValue:{value:"undefined",computed:!0},type:{name:"bool"},required:!1,description:""}}};var p=f;t.default=p},function(e,t){e.exports=require("react-inlinesvg")},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIconScreenReaderAccessProps=function(e){var t=e.isClickable,n=e.isDecorationOnly,o=e.isKeyboardAccessible,a=e.label,i=(0,r.default)(n)?!t:n;return t?c({label:a,isDecorationOnly:i,isKeyboardAccessible:o}):{role:"img","aria-hidden":i,tabIndex:void 0,"aria-label":n?void 0:a}},t.getClickableScreenReaderAccessProps=l,t.getClickableIconScreenReaderAccessProps=c;var o,r=(o=n(13))&&o.__esModule?o:{default:o};function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=e.isKeyboardAccessible,n=void 0===t||t,o=e.isDecorationOnly;return{role:"button",tabIndex:n?0:-1,"aria-hidden":void 0!==o&&o}}function c(e){var t=e.label,n=e.isDecorationOnly,o=void 0!==n&&n,r=e.isKeyboardAccessible;return i(i({},l({isDecorationOnly:o,isKeyboardAccessible:void 0===r||r})),{},{"aria-label":t})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ICON_TYPES=void 0;t.ICON_TYPES={SVG:"SVG",ICON_FONT:"FA",SRC:"SRC"}},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(0));n(20);var a,i=(a=n(2))&&a.__esModule?a:{default:a};function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}var l=(0,r.forwardRef)((function(e,t){var n=e.className,o=e.onClick,a=e["aria-label"],u=e.tabIndex,l=e.icon,c=e.role,s=void 0===c?"img":c,d=e["aria-hidden"],f="function"==typeof l?"":l;return r.default.createElement("span",{"aria-hidden":d,className:(0,i.default)(n,"fa",f),onClick:o,ref:t,"aria-label":a,tabIndex:u,role:s},"function"==typeof l&&l())}));l.__docgenInfo={description:"",methods:[],displayName:"FontIcon",props:{role:{defaultValue:{value:'"img"',computed:!1},required:!1}}};var c=l;t.default=c},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.onClick,n=e.className,l=e.clickable,s=e.ignoreFocusStyle,f=e.isDecorationOnly,p=e.iconLabel,m=e.externalTabIndex,y=(0,o.useRef)(null),v=(0,o.useCallback)((function(e){document.activeElement===y.current&&t(e)}),[y,t]),b=(0,o.useCallback)((function(e){e.preventDefault()}),[]),g=(0,o.useMemo)((function(){return(0,r.default)("icon_component",n,{"icon_component--clickable":l,"icon_component--no-focus-style":s})}),[l,n,s]);(0,i.default)({eventName:"mousedown",callback:b,ref:y}),(0,u.default)({keys:d,ref:y,callback:v,ignoreDocumentFallback:!0,capture:!0,stopPropagation:!0,preventDefault:!0});var h=(0,o.useCallback)((function(e){(t||a.default)(e)}),[t]),O=(0,c.default)({isClickable:l,label:p,isDecorationOnly:f});return O.tabIndex=null!=m?m:O.tabIndex,{screenReaderAccessProps:O,onClickCallback:h,computedClassName:g,onEnterCallback:v,iconRef:y}};var o=n(0),r=s(n(2)),a=s(n(10)),i=s(n(4)),u=s(n(6)),l=n(12),c=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}var d=[l.keyCodes.ENTER,l.keyCodes.SPACE]},function(e,t,n){},function(e,t){e.exports=require("lodash/debounce")},function(e,t){e.exports=require("lodash/isArray")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HIDE_SHOW_EVENTS=void 0;t.HIDE_SHOW_EVENTS={CLICK:"click",CLICK_OUTSIDE:"clickoutside",ESCAPE_KEY:"esckey",TAB_KEY:"tab",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",ENTER:"enter",MOUSE_DOWN:"mousedown",FOCUS:"focus",BLUR:"blur",CONTENT_CLICK:"onContentClick"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.ref,n=e.callback,o=e.debounceTime,i=void 0===o?200:o,u=(0,r.useMemo)((function(){return 0===i?n:(0,a.default)(n,i)}),[n,i]);(0,r.useEffect)((function(){if(!window.ResizeObserver)return function(){};if(t.current){var e=function(e){return window.requestAnimationFrame((function(){u({borderBoxSize:e})}))},n=null,o=new ResizeObserver((function(t){var o=t[0];if(o&&o.borderBoxSize){var r=o.borderBoxSize.length>0?o.borderBoxSize[0]:o.borderBoxSize;n=e(r)}else{if(!o.contentRect)return function(){};var a={blockSize:o.contentRect.height};n=e(a)}}));return o.observe(t.current),function(){0!==i&&u.cancel(),n&&window.cancelAnimationFrame(n),o.disconnect()}}}),[t.current,n,i,u])};var o,r=n(0),a=(o=n(23))&&o.__esModule?o:{default:o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DIALOG_ANIMATION_TYPES=void 0;t.DIALOG_ANIMATION_TYPES={OPACITY_AND_SLIDE:"opacity-and-slide",EXPAND:"expand"}},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(0)),a=y(n(1)),i=y(n(2)),u=y(n(26)),l=y(n(3));n(44);var c=n(45),s=n(8),d=y(n(7)),f=y(n(34)),p=n(5),m=n(46);function y(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=!!window.MSInputMethodContext&&!!document.documentMode?32:6,h=(0,r.forwardRef)((function(e,t){var n=e.className,o=e.children,a=e.kind,s=e.onClick,y=e.name,v=e.size,h=e.color,O=e.disabled,T=e.rightIcon,S=e.leftIcon,E=e.success,w=e.successText,k=e.successIcon,P=e.style,_=e.loading,C=e.active,D=e.id,I=e.marginRight,M=e.marginLeft,N=e.type,j=e.onMouseDown,R=e.ariaLabel,A=e.rightFlat,V=e.leftFlat,q=e.preventClickAnimation,L=e.noSidePadding,x=e.onFocus,B=e.onBlur,F=e.ariaLabeledBy,U=e.defaultTextColorOnPrimaryColor,Y=e.ariaHasPopup,H=e.ariaExpanded,z=e.ariaControls,W=e.blurOnMouseUp,G=(0,r.useRef)(null),K=(0,r.useMemo)((function(){return function(e){var t=e.borderBoxSize,n=t.blockSize,o=t.inlineSize,r=Math.max(o,g),a=Math.max(n,g);G.current&&(G.current.style.setProperty("--element-width","".concat(r,"px")),G.current.style.setProperty("--element-height","".concat(a,"px")))}}),[G]);(0,u.default)({ref:G,callback:K,debounceTime:200}),(0,r.useEffect)((function(){if(h===c.BUTTON_COLORS.ON_PRIMARY_COLOR&&a===c.BUTTON_TYPES.PRIMARY&&G.current){var e=G.current;e.style.color=(0,m.getParentBackgroundColorNotTransparent)(e,U)}}),[a,G,h,U]);var Z=(0,r.useCallback)((function(){var e=G.current;e&&W&&e.blur()}),[G,W]),X=(0,r.useCallback)((function(e){O||_||E?e.preventDefault():s&&s(e)}),[s,O,_,E]),J=(0,r.useCallback)((function(e){O||_||E?e.preventDefault():j&&j(e)}),[j,O,_,E]),$=(0,r.useMemo)((function(){var e,t=E?c.BUTTON_COLORS.POSITIVE:h;return(0,i.default)(n,"monday-style-button","monday-style-button--size-".concat((0,c.getActualSize)(v)),"monday-style-button--kind-".concat(a),"monday-style-button--color-".concat(t),(b(e={"monday-style-button--loading":_},"monday-style-button--color-".concat(t,"-active"),C),b(e,"monday-style-button--margin-right",I),b(e,"monday-style-button--margin-left",M),b(e,"monday-style-button--right-flat",A),b(e,"monday-style-button--left-flat",V),b(e,"monday-style-button--prevent-click-animation",q),b(e,"monday-style-button--no-side-padding",L),e))}),[v,a,h,n,E,_,C,I,M,L,q,V,A]),Q=(0,l.default)({refs:[t,G]}),ee=(0,r.useMemo)((function(){return{disabled:O,ref:Q,type:N,className:$,name:y,onMouseUp:Z,style:P,onClick:X,id:D,onFocus:x,onBlur:B,onMouseDown:J,"aria-labelledby":F,"aria-label":R,"aria-busy":_?"true":void 0,"aria-haspopup":Y,"aria-expanded":H,"aria-controls":z}}),[O,$,y,Z,P,X,D,N,J,R,_,x,B,Q,F,z,H,Y]),te=(0,r.useMemo)((function(){if("function"==typeof S)return v===p.SIZES.SMALL?"20":(p.SIZES.MEDIUM,"24")}),[S,v]),ne=(0,r.useMemo)((function(){if("function"==typeof T)return v===p.SIZES.SMALL?"20":(p.SIZES.MEDIUM,"24")}),[T,v]);return _?r.default.createElement("button",ee,r.default.createElement("span",{className:"monday-style-button__loader"},r.default.createElement(f.default,{svgClassName:"monday-style-button-loader-svg"}))):E?r.default.createElement("button",ee,k?r.default.createElement(d.default,{iconType:d.default.type.ICON_FONT,clickable:!1,icon:k,className:(0,i.default)({"monday-style-button--left-icon":!!w}),ignoreFocusStyle:!0}):null,w):r.default.createElement("button",ee,S?r.default.createElement(d.default,{iconType:d.default.type.ICON_FONT,clickable:!1,icon:S,iconSize:te,className:(0,i.default)({"monday-style-button--left-icon":!!o}),ignoreFocusStyle:!0}):null,o,T?r.default.createElement(d.default,{iconType:d.default.type.ICON_FONT,clickable:!1,icon:T,iconSize:ne,className:(0,i.default)({"monday-style-button--right-icon":!!o}),ignoreFocusStyle:!0}):null)}));h.sizes=p.SIZES,h.colors=c.BUTTON_COLORS,h.kinds=c.BUTTON_TYPES,h.inputTags=c.BUTTON_INPUT_TYPE,h.propTypes={className:a.default.string,kind:a.default.oneOf([h.kinds.PRIMARY,h.kinds.SECONDARY,h.kinds.TERTIARY]),onClick:a.default.func,onMouseDown:a.default.func,blurOnMouseUp:a.default.bool,name:a.default.string,size:a.default.oneOf([h.sizes.SMALL,h.sizes.MEDIUM,h.sizes.LARGE]),color:a.default.oneOf([h.colors.PRIMARY,h.colors.NEGATIVE,h.colors.POSITIVE,h.colors.ON_PRIMARY_COLOR,h.colors.ON_INVERTED_BACKGROUND]),type:a.default.oneOf([h.inputTags.BUTTON,h.inputTags.SUBMIT,h.inputTags.RESET]),disabled:a.default.bool,rightIcon:a.default.oneOfType([a.default.string,a.default.func]),leftIcon:a.default.oneOfType([a.default.string,a.default.func]),success:a.default.bool,successIcon:a.default.oneOfType([a.default.string,a.default.func]),successText:a.default.string,loading:a.default.bool,style:a.default.object,active:a.default.bool,id:a.default.string,marginRight:a.default.bool,marginLeft:a.default.bool,ariaLabeledBy:a.default.string,ariaLabel:a.default.string,ariaHasPopup:a.default.oneOfType([a.default.string,a.default.bool]),ariaExpanded:a.default.bool,ariaControls:a.default.string,onFocus:a.default.func,onBlur:a.default.func,rightFlat:a.default.bool,leftFlat:a.default.bool,preventClickAnimation:a.default.bool,noSidePadding:a.default.bool,defaultTextColorOnPrimaryColor:a.default.string},h.defaultProps={kind:c.BUTTON_TYPES.PRIMARY,onClick:s.NOOP,onMouseDown:s.NOOP,blurOnMouseUp:!0,name:void 0,style:void 0,size:p.SIZES.MEDIUM,color:c.BUTTON_COLORS.PRIMARY,disabled:!1,className:"",rightIcon:null,leftIcon:null,successIcon:"",successText:"",success:!1,loading:!1,active:!1,id:void 0,marginRight:!1,marginLeft:!1,type:c.BUTTON_INPUT_TYPE.BUTTON,rightFlat:!1,leftFlat:!1,preventClickAnimation:!1,noSidePadding:!1,onFocus:s.NOOP,onBlur:s.NOOP,defaultTextColorOnPrimaryColor:m.TRANSPARENT_COLOR,ariaHasPopup:void 0,ariaExpanded:void 0,ariaControls:void 0,ariaLabel:void 0,ariaLabeledBy:void 0},h.__docgenInfo={description:"",methods:[],displayName:"Button",props:{kind:{defaultValue:{value:"BUTTON_TYPES.PRIMARY",computed:!0},type:{name:"enum",value:[{value:"Button.kinds.PRIMARY",computed:!0},{value:"Button.kinds.SECONDARY",computed:!0},{value:"Button.kinds.TERTIARY",computed:!0}]},required:!1,description:"The kind of a button is exposed on the component"},onClick:{defaultValue:{value:"NOOP",computed:!0},type:{name:"func"},required:!1,description:""},onMouseDown:{defaultValue:{value:"NOOP",computed:!0},type:{name:"func"},required:!1,description:""},blurOnMouseUp:{defaultValue:{value:"true",computed:!1},type:{name:"bool"},required:!1,description:"Blur on button click"},name:{defaultValue:{value:"undefined",computed:!0},type:{name:"string"},required:!1,description:"Name of the button - for form submit usages"},style:{defaultValue:{value:"undefined",computed:!0},type:{name:"object"},required:!1,description:""},size:{defaultValue:{value:"SIZES.MEDIUM",computed:!0},type:{name:"enum",value:[{value:"Button.sizes.SMALL",computed:!0},{value:"Button.sizes.MEDIUM",computed:!0},{value:"Button.sizes.LARGE",computed:!0}]},required:!1,description:"The size of a button is exposed on the component"},color:{defaultValue:{value:"BUTTON_COLORS.PRIMARY",computed:!0},type:{name:"enum",value:[{value:"Button.colors.PRIMARY",computed:!0},{value:"Button.colors.NEGATIVE",computed:!0},{value:"Button.colors.POSITIVE",computed:!0},{value:"Button.colors.ON_PRIMARY_COLOR",computed:!0},{value:"Button.colors.ON_INVERTED_BACKGROUND",computed:!0}]},required:!1,description:"The color of a button is exposed on the component"},disabled:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"Disabled property which causes the button to be disabled"},className:{defaultValue:{value:'""',computed:!1},type:{name:"string"},required:!1,description:""},rightIcon:{defaultValue:{value:"null",computed:!1},type:{name:"union",value:[{name:"string"},{name:"func"}]},required:!1,description:"Icon to place on the right"},leftIcon:{defaultValue:{value:"null",computed:!1},type:{name:"union",value:[{name:"string"},{name:"func"}]},required:!1,description:"Icon to place on the left"},successIcon:{defaultValue:{value:'""',computed:!1},type:{name:"union",value:[{name:"string"},{name:"func"}]},required:!1,description:"Success icon name"},successText:{defaultValue:{value:'""',computed:!1},type:{name:"string"},required:!1,description:"Success text"},success:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"the success props are used when you have async action and wants to display a success message"},loading:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"loading boolean which switches the text to a loader"},active:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"displays the active state"},id:{defaultValue:{value:"undefined",computed:!0},type:{name:"string"},required:!1,description:"id to pass to the button"},marginRight:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"adds 8px margin to the right"},marginLeft:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"adds 8px margin to the left"},type:{defaultValue:{value:"BUTTON_INPUT_TYPE.BUTTON",computed:!0},type:{name:"enum",value:[{value:"Button.inputTags.BUTTON",computed:!0},{value:"Button.inputTags.SUBMIT",computed:!0},{value:"Button.inputTags.RESET",computed:!0}]},required:!1,description:"The type of a button is exposed on the component"},rightFlat:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},leftFlat:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},preventClickAnimation:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},noSidePadding:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},onFocus:{defaultValue:{value:"NOOP",computed:!0},type:{name:"func"},required:!1,description:"On Button Focus callback"},onBlur:{defaultValue:{value:"NOOP",computed:!0},type:{name:"func"},required:!1,description:"On Button Blur callback"},defaultTextColorOnPrimaryColor:{defaultValue:{value:"TRANSPARENT_COLOR",computed:!0},type:{name:"string"},required:!1,description:"default color for text color in ON_PRIMARY_COLOR kind (should be any type of css color (rbg, var, hex...)"},ariaHasPopup:{defaultValue:{value:"undefined",computed:!0},type:{name:"union",value:[{name:"string"},{name:"bool"}]},required:!1,description:"aria for a button popup"},ariaExpanded:{defaultValue:{value:"undefined",computed:!0},type:{name:"bool"},required:!1,description:"aria to be set if the popup is open"},ariaControls:{defaultValue:{value:"undefined",computed:!0},type:{name:"string"},required:!1,description:"aria controls - receives id for the controlled region"},ariaLabel:{defaultValue:{value:"undefined",computed:!0},type:{name:"string"},required:!1,description:"aria label to provide important when providing only Icon"},ariaLabeledBy:{defaultValue:{value:"undefined",computed:!0},type:{name:"string"},required:!1,description:"element id to describe the button accordingly"}}};var O=h;t.default=O},,function(e,t){e.exports=require("react-transition-group")},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(0)),a=n(39),i=b(n(1)),u=n(36),l=b(n(2)),c=b(n(11)),s=n(8),d=n(40),f=n(37);n(42);var p=n(43),m=n(25),y=n(5),v=n(27);function b(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function h(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function T(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=P(e);if(t){var r=P(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?k(e):t}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(){},C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(y,e);var t,n,o,i=E(y);function y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(t=i.call(this,e)).state={shouldUseDerivedStateFromProps:e.useDerivedStateFromProps,isOpen:e.shouldShowOnMount},t.onMouseEnter=t.onMouseEnter.bind(k(t)),t.onMouseLeave=t.onMouseLeave.bind(k(t)),t.onMouseDown=t.onMouseDown.bind(k(t)),t.onClick=t.onClick.bind(k(t)),t.onFocus=t.onFocus.bind(k(t)),t.onBlur=t.onBlur.bind(k(t)),t.isShown=t.isShown.bind(k(t)),t.onEsc=t.onEsc.bind(k(t)),t.onClickOutside=t.onClickOutside.bind(k(t)),t.onDialogEnter=t.onDialogEnter.bind(k(t)),t.onDialogLeave=t.onDialogLeave.bind(k(t)),t.getContainer=t.getContainer.bind(k(t)),t.onContentClick=t.onContentClick.bind(k(t)),t.onKeyDown=t.onKeyDown.bind(k(t)),t.closeDialogOnEscape=t.closeDialogOnEscape.bind(k(t)),t.hideTimeout=null,t.showTimeout=null,t}return t=y,o=[{key:"getDerivedStateFromProps",value:function(e,t){return t.shouldUseDerivedStateFromProps?{isOpen:e.isOpen}:null}}],(n=[{key:"closeDialogOnEscape",value:function(e){this.state.isOpen&&("Escape"===e.key&&this.hideDialogIfNeeded(e,m.HIDE_SHOW_EVENTS.ESCAPE_KEY),"Tab"===e.key&&this.handleEvent(m.HIDE_SHOW_EVENTS.TAB_KEY,e))}},{key:"componentDidMount",value:function(){document.addEventListener("keyup",this.closeDialogOnEscape)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keyup",this.closeDialogOnEscape)}},{key:"getContainer",value:function(){var e=this.props.containerSelector;return e&&document.querySelector(e)||document.body}},{key:"showDialog",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props,o=n.showDelay,r=n.instantShowAndHide,a=n.getDynamicShowDelay,i=o,u=t.preventAnimation;if(a){var l=a();i=l.showDelay||0,u=u||l.preventAnimation}r?(this.onShowDialog(t),this.setState({isOpen:!0,preventAnimation:u}),this.showTimeout=null):this.showTimeout=setTimeout((function(){e.onShowDialog(t),e.showTimeout=null,e.setState({isOpen:!0,preventAnimation:u})}),i)}},{key:"onShowDialog",value:function(){this.isShown()||(0,this.props.onDialogDidShow)()}},{key:"showDialogIfNeeded",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.props.disable;t||(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),this.showTimeout||this.showDialog(e))}},{key:"hideDialog",value:function(e,t){var n=this,o=this.props,r=o.hideDelay;o.instantShowAndHide?(this.onHideDialog(e,t),this.setState({isOpen:!1}),this.hideTimeout=null):this.hideTimeout=setTimeout((function(){n.onHideDialog(e,t),n.setState({isOpen:!1}),n.hideTimeout=null}),r)}},{key:"onHideDialog",value:function(e,t){var n=this.props.onDialogDidHide;n&&n(e,t)}},{key:"hideDialogIfNeeded",value:function(e,t){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.hideTimeout||this.hideDialog(e,t)}},{key:"handleEvent",value:function(e,t,n){var o=this.props,r=o.showTriggerIgnoreClass,a=o.hideTriggerIgnoreClass;return!this.isShowTrigger(e)||this.isShown()||(0,f.isInsideClass)(t,r)?this.isHideTrigger(e)&&!(0,f.isInsideClass)(t,a)?this.hideDialogIfNeeded(n,e):void 0:this.showDialogIfNeeded()}},{key:"isShown",value:function(){var e=this.state.isOpen,t=this.props.open;return e||t}},{key:"isShowTrigger",value:function(e){var t=this.props.showTrigger;return(0,s.convertToArray)(t).indexOf(e)>-1}},{key:"isHideTrigger",value:function(e){var t=this.props.hideTrigger;return(0,s.convertToArray)(t).indexOf(e)>-1}},{key:"onMouseEnter",value:function(e){this.handleEvent("mouseenter",e.target,e)}},{key:"onMouseLeave",value:function(e){this.handleEvent("mouseleave",e.target,e)}},{key:"onClick",value:function(e){e.button||this.handleEvent("click",e.target,e)}},{key:"onKeyDown",value:function(e){"Enter"===e.key&&this.handleEvent("enter",e.target,e),"Tab"===e.key&&this.handleEvent("tab",e.target,e)}},{key:"onMouseDown",value:function(e){e.button||this.handleEvent("mousedown",e.target,e)}},{key:"onFocus",value:function(e){this.handleEvent("focus",e.target,e)}},{key:"onBlur",value:function(e){this.handleEvent("blur",e.relatedTarget,e)}},{key:"onEsc",value:function(e){this.handleEvent("esckey",e.target,e)}},{key:"onClickOutside",value:function(e){var t=this.props.onClickOutside;this.handleEvent("clickoutside",e.target,e),t(e)}},{key:"onDialogEnter",value:function(){this.props.showOnDialogEnter&&this.showDialogIfNeeded()}},{key:"onDialogLeave",value:function(e){this.props.showOnDialogEnter&&this.hideDialogIfNeeded(e,"DialogLeave")}},{key:"onContentClick",value:function(e){var t=this.props.onContentClick;this.handleEvent("onContentClick",e.target,e),t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.wrapperClassName,o=t.content,i=t.startingEdge,s=t.children,f=t.preventAnimationOnMount,m=t.animationType,y=t.position,v=t.showDelay,b=t.moveBy,g=t.modifiers,O=t.tooltip,T=t.tooltipClassName,S=t.referenceWrapperClassName,E=t.zIndex,w=this.state.preventAnimation,k=!this.isHideTrigger("clickoutside"),P=!f&&!w&&m,_=(0,c.default)(o)?o():o;return _?r.default.createElement(u.Manager,null,r.default.createElement(u.Reference,null,(function(t){var n=t.ref;return r.default.createElement(p.Refable,{className:S,ref:n,onBlur:D("onBlur",e,e.props),onKeyDown:D("onKeyDown",e,e.props),onClick:D("onClick",e,e.props),onFocus:D("onFocus",e,e.props),onMouseDown:D("onMouseDown",e,e.props),onMouseEnter:D("onMouseEnter",e,e.props),onMouseLeave:D("onMouseLeave",e,e.props)},s)})),(0,a.createPortal)(r.default.createElement(u.Popper,{placement:y,modifiers:[{name:"offset",options:{offset:[b.secondary,b.main]}},{name:"zIndex",enabled:!0,phase:"write",fn:function(e){var t=e.state;return E&&(t.styles.popper.zIndex=E),t}},{name:"rotator",enabled:!0,phase:"write",fn:function(e){var t=e.state;return t.styles.arrow?(t.styles.arrow.transform="".concat(t.styles.arrow.transform," rotate(45deg)"),t):t}}].concat(h(g))},(function(t){var o=t.placement,a=t.style,u=t.ref,c=t.arrowProps;return!e.isShown()&&o?null:r.default.createElement(d.DialogContent,{onMouseEnter:e.onDialogEnter,onMouseLeave:e.onDialogLeave,disableOnClickOutside:k,onClickOutside:e.onClickOutside,onEscKey:e.onEsc,animationType:P,position:o,wrapperClassName:n,startingEdge:i,isOpen:e.isShown(),showDelay:v,styleObject:a,ref:u,onClick:e.onContentClick},_,O&&r.default.createElement("div",{style:c.style,ref:c.ref,className:(0,l.default)("monday-style-tooltip-arrow",T),"data-placement":o}))})),this.getContainer())):s}}])&&T(t.prototype,n),o&&T(t,o),y}(r.PureComponent);function D(e,t,n){return(0,s.chainFunctions)([n[e],t[e]],!0)}t.default=C,C.hideShowTriggers=m.HIDE_SHOW_EVENTS,C.positions=y.DialogPositions,C.animationTypes=v.DIALOG_ANIMATION_TYPES,C.propTypes={referenceWrapperClassName:i.default.string,position:i.default.oneOf(h(Object.values(C.positions))),modifiers:i.default.array,startingEdge:i.default.string,moveBy:i.default.shape({main:i.default.number,secondary:i.default.number}),showDelay:i.default.number,hideDelay:i.default.number,showTrigger:i.default.any,hideTrigger:i.default.any,showOnDialogEnter:i.default.bool,shouldShowOnMount:i.default.bool,disable:i.default.bool,open:i.default.bool,showTriggerIgnoreClass:i.default.string,hideTriggerIgnoreClass:i.default.string,animationType:i.default.oneOf([C.animationTypes.EXPAND,C.animationTypes.OPACITY_AND_SLIDE]),wrapperClassName:i.default.string,preventAnimationOnMount:i.default.bool,containerSelector:i.default.string,tooltip:i.default.bool,tooltipClassName:i.default.string,onDialogDidShow:i.default.func,onDialogDidHide:i.default.func,onClickOutside:i.default.func,onContentClick:i.default.func,zIndex:i.default.number,useDerivedStateFromProps:i.default.bool},C.defaultProps={referenceWrapperClassName:"",position:"top",modifiers:[],startingEdge:"",moveBy:{main:0,secondary:0},showDelay:100,hideDelay:100,showTrigger:C.hideShowTriggers.MOUSE_ENTER,hideTrigger:C.hideShowTriggers.MOUSE_LEAVE,showOnDialogEnter:!1,shouldShowOnMount:!1,disable:!1,open:!1,showTriggerIgnoreClass:null,hideTriggerIgnoreClass:null,animationType:C.animationTypes.EXPAND,wrapperClassName:null,preventAnimationOnMount:!1,containerSelector:"body",tooltip:!1,tooltipClassName:"",onDialogDidShow:_,onDialogDidHide:_,onClickOutside:_,onContentClick:_,zIndex:null,useDerivedStateFromProps:!1},C.__docgenInfo={description:"",methods:[{name:"closeDialogOnEscape",docblock:null,modifiers:[],params:[{name:"event",type:null}],returns:null},{name:"getContainer",docblock:null,modifiers:[],params:[],returns:null},{name:"showDialog",docblock:null,modifiers:[],params:[{name:"options",type:null}],returns:null},{name:"onShowDialog",docblock:null,modifiers:[],params:[],returns:null},{name:"showDialogIfNeeded",docblock:null,modifiers:[],params:[{name:"options",type:null}],returns:null},{name:"hideDialog",docblock:null,modifiers:[],params:[{name:"event",type:null},{name:"eventName",type:null}],returns:null},{name:"onHideDialog",docblock:null,modifiers:[],params:[{name:"event",type:null},{name:"eventName",type:null}],returns:null},{name:"hideDialogIfNeeded",docblock:null,modifiers:[],params:[{name:"event",type:null},{name:"eventName",type:null}],returns:null},{name:"handleEvent",docblock:null,modifiers:[],params:[{name:"eventName",type:null},{name:"target",type:null},{name:"event",type:null}],returns:null},{name:"isShown",docblock:null,modifiers:[],params:[],returns:null},{name:"isShowTrigger",docblock:null,modifiers:[],params:[{name:"event",type:null}],returns:null},{name:"isHideTrigger",docblock:null,modifiers:[],params:[{name:"eventName",type:null}],returns:null},{name:"onMouseEnter",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"onMouseLeave",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"onClick",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"onKeyDown",docblock:null,modifiers:[],params:[{name:"event",type:null}],returns:null},{name:"onMouseDown",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"onFocus",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"onBlur",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"onEsc",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"onClickOutside",docblock:null,modifiers:[],params:[{name:"event",type:null}],returns:null},{name:"onDialogEnter",docblock:null,modifiers:[],params:[],returns:null},{name:"onDialogLeave",docblock:null,modifiers:[],params:[{name:"event",type:null}],returns:null},{name:"onContentClick",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null}],displayName:"Dialog",props:{referenceWrapperClassName:{defaultValue:{value:'""',computed:!1},type:{name:"string"},required:!1,description:"A Classname to be added to <spam> element which wraps the children"},position:{defaultValue:{value:'"top"',computed:!1},type:{name:"enum",value:[{value:"...Object.values(Dialog.positions)",computed:!0}]},required:!1,description:"Where the dialog should be in reference to the children,\nTop, Left, Right, Bottom ..."},modifiers:{defaultValue:{value:"[]",computed:!1},type:{name:"array"},required:!1,description:"PopperJS Modifiers type\nhttps://popper.js.org/docs/v2/modifiers/"},startingEdge:{defaultValue:{value:'""',computed:!1},type:{name:"string"},required:!1,description:""},moveBy:{defaultValue:{value:"{ main: 0, secondary: 0 }",computed:!1},type:{name:"shape",value:{main:{name:"number",required:!1},secondary:{name:"number",required:!1}}},required:!1,description:"How much to move the dialog in relative to children\nmain is the axis in which the position is aligned to\nsecondary is the vertical axes to the position"},showDelay:{defaultValue:{value:"100",computed:!1},type:{name:"number"},required:!1,description:"how much delay should the Dialog wait until it should trigger the show in MS"},hideDelay:{defaultValue:{value:"100",computed:!1},type:{name:"number"},required:!1,description:"how much delay should the Dialog wait until it should trigger the hide in MS"},showTrigger:{defaultValue:{value:"Dialog.hideShowTriggers.MOUSE_ENTER",computed:!0},type:{name:"any"},required:!1,description:"an array of hide/show trigger -\nDialog.hideShowTriggers"},hideTrigger:{defaultValue:{value:"Dialog.hideShowTriggers.MOUSE_LEAVE",computed:!0},type:{name:"any"},required:!1,description:"an array of hide/show trigger -\nDialog.hideShowTriggers"},showOnDialogEnter:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},shouldShowOnMount:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"Show the Dialog when the children is mounting"},disable:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"disable the opening of the dialog"},open:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"open is a controlled prop to open the dialog"},showTriggerIgnoreClass:{defaultValue:{value:"null",computed:!1},type:{name:"string"},required:!1,description:"if this class exists on the children the show trigger will be ignored"},hideTriggerIgnoreClass:{defaultValue:{value:"null",computed:!1},type:{name:"string"},required:!1,description:"if this class exists on the children the hide trigger will be ignored"},animationType:{defaultValue:{value:"Dialog.animationTypes.EXPAND",computed:!0},type:{name:"enum",value:[{value:"Dialog.animationTypes.EXPAND",computed:!0},{value:"Dialog.animationTypes.OPACITY_AND_SLIDE",computed:!0}]},required:!1,description:"Dialog animation type"},wrapperClassName:{defaultValue:{value:"null",computed:!1},type:{name:"string"},required:!1,description:"Classname to be added to the content container"},preventAnimationOnMount:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"Prevent Animation"},containerSelector:{defaultValue:{value:'"body"',computed:!1},type:{name:"string"},required:!1,description:'the container selector in which to append the dialog\nfor examples: "body" , ".my-class", "#my-id"'},tooltip:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:"should position the tooltip element\nhttps://popper.js.org/docs/v2/modifiers/arrow/"},tooltipClassName:{defaultValue:{value:'""',computed:!1},type:{name:"string"},required:!1,description:"class name to add to the tooltip element"},onDialogDidShow:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:"callback to be called when the dialog is shown"},onDialogDidHide:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:"callback to be called when the dialog is hidden"},onClickOutside:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:"callback to be called when click outside is being triggered"},onContentClick:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:"callback to be called when click on the content is being triggered"},zIndex:{defaultValue:{value:"null",computed:!1},type:{name:"number"},required:!1,description:"z-index to add to the dialog"},useDerivedStateFromProps:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.ref,n=e.callback,o=(0,r.useCallback)((function(e){t&&t.current&&!t.current.contains(e.target)&&n(e)}),[t,n]),i=(0,r.useRef)(document);(0,a.default)({eventName:"click",ref:i,callback:o,capture:!0}),(0,a.default)({eventName:"touchend",ref:i,callback:o,capture:!0})};var o,r=n(0),a=(o=n(4))&&o.__esModule?o:{default:o}},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(0)),a=d(n(2)),i=d(n(11)),u=d(n(31));n(48);var l=n(5),c=n(27),s=n(47);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=O(e);if(t){var r=O(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T={lastTooltipHideTS:null,openTooltipsCount:0},S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(c,e);var t,n,o,l=b(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=l.call(this,e)).renderTooltipContent=t.renderTooltipContent.bind(h(t)),t.getShowDelay=t.getShowDelay.bind(h(t)),t.onTooltipShow=t.onTooltipShow.bind(h(t)),t.onTooltipHide=t.onTooltipHide.bind(h(t)),t.wasShown=!1,t}return t=c,(n=[{key:"getContainer",value:function(){return do