diff --git a/CHANGELOG.md b/CHANGELOG.md index d31bc5c5..6c07d9b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# [7.0.0](https://github.com/melfore/mosaic/compare/v6.4.1...v7.0.0) (2022-05-02) + + +### Features + +* 🎸 [Select] Display checkbox only when multiple=true ([7d3d961](https://github.com/melfore/mosaic/commit/7d3d9616700bc3e72d0052eee699e65a024113df)) +* 🎸 [Select] Wrapped each option in a div with dataCy ([13172e5](https://github.com/melfore/mosaic/commit/13172e547b2f0d6622339142ec610b51c9657468)) + + +### BREAKING CHANGES + +* 🧨 Potential breaking: style should be preserved via display: 'contents' + +✅ Closes: 249 + # [6.5.0-beta.1](https://github.com/melfore/mosaic/compare/v6.4.1...v6.5.0-beta.1) (2022-04-11) diff --git a/docs/latest/iframe.html b/docs/latest/iframe.html index 40d83d13..2216935a 100644 --- a/docs/latest/iframe.html +++ b/docs/latest/iframe.html @@ -345,4 +345,4 @@ - window['STORIES'] = [{"titlePrefix":"","directory":"./src/components","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src\\/components(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src/components","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src\\/components(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}]; \ No newline at end of file + window['STORIES'] = [{"titlePrefix":"","directory":"./src/components","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src\\/components(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src/components","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src\\/components(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}]; \ No newline at end of file diff --git a/docs/latest/main.61e52be8.iframe.bundle.js b/docs/latest/main.29c252a0.iframe.bundle.js similarity index 51% rename from docs/latest/main.61e52be8.iframe.bundle.js rename to docs/latest/main.29c252a0.iframe.bundle.js index a625bf76..3db856cd 100644 --- a/docs/latest/main.61e52be8.iframe.bundle.js +++ b/docs/latest/main.29c252a0.iframe.bundle.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"./.storybook/preview.js-generated-config-entry.js":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var preview_namespaceObject={};__webpack_require__.r(preview_namespaceObject),__webpack_require__.d(preview_namespaceObject,"parameters",(function(){return parameters}));__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.object.define-properties.js"),__webpack_require__("./node_modules/core-js/modules/es.object.define-property.js");var ClientApi=__webpack_require__("./node_modules/@storybook/client-api/dist/esm/ClientApi.js"),esm=__webpack_require__("./node_modules/@storybook/client-logger/dist/esm/index.js"),parameters={actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},options:{storySort:{method:"alphabetical"}},previewTabs:{canvas:{hidden:!0}},viewMode:"docs"};function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.keys(preview_namespaceObject).forEach((function(key){var value=preview_namespaceObject[key];switch(key){case"args":case"argTypes":return esm.a.warn("Invalid args/argTypes in config, ignoring.",JSON.stringify(value));case"decorators":return value.forEach((function(decorator){return Object(ClientApi.d)(decorator,!1)}));case"loaders":return value.forEach((function(loader){return Object(ClientApi.e)(loader,!1)}));case"parameters":return Object(ClientApi.f)(function _objectSpread(target){for(var i=1;i "}},Primary.parameters),Actions.parameters=Object.assign({storySource:{source:"(args) => "}},Actions.parameters),CustomContent.parameters=Object.assign({storySource:{source:"(args) => "}},CustomContent.parameters),Locale.parameters=Object.assign({storySource:{source:"(args) => "}},Locale.parameters),Styled.parameters=Object.assign({storySource:{source:"(args) => "}},Styled.parameters),Username.parameters=Object.assign({storySource:{source:"(args) => "}},Username.parameters)},"./src/components/AppBar/index.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return AppBar_DATA_CY_DEFAULT})),__webpack_require__.d(__webpack_exports__,"c",(function(){return DATA_CY_SHORTCUT})),__webpack_require__.d(__webpack_exports__,"d",(function(){return LOCALIZABLE_PROPS})),__webpack_require__.d(__webpack_exports__,"e",(function(){return SUBPARTS_MAP})),__webpack_require__.d(__webpack_exports__,"a",(function(){return AppBarWithProps}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js");var react=__webpack_require__("./node_modules/react/index.js"),AppBar_AppBar=__webpack_require__("./node_modules/@material-ui/core/esm/AppBar/AppBar.js"),Toolbar=__webpack_require__("./node_modules/@material-ui/core/esm/Toolbar/Toolbar.js"),localized=__webpack_require__("./src/utils/hocs/localized.tsx"),logger=__webpack_require__("./src/utils/logger/index.ts"),useTheme=__webpack_require__("./node_modules/@material-ui/core/esm/styles/useTheme.js"),Icon=__webpack_require__("./src/types/Icon.ts"),utils=__webpack_require__("./src/utils/index.ts"),IconButton=__webpack_require__("./src/components/IconButton/index.tsx"),Menu_Menu=(__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/@material-ui/core/esm/Menu/Menu.js")),MenuItem=__webpack_require__("./node_modules/@material-ui/core/esm/MenuItem/MenuItem.js"),Button=__webpack_require__("./src/components/Button/index.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null==_i)return;var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&void 0!==arguments[0]?arguments[0]:"{n}";return"action-"+n}},localesMenu:{label:"Locales Menu"},localesMenuItem:{label:"Locales Menu Item (at index n)",value:function value(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"{n}";return"locales-menu-item-"+n}},userMenu:{label:"User Menu"},userMenuItem:{label:"User Menu Item (at index n)",value:function value(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"{n}";return"user-menu-item-"+n}}},Actions_AppBarActions=function AppBarActions(_ref){var actions=_ref.actions,_ref$dataCy=_ref.dataCy,dataCy=void 0===_ref$dataCy?"appbar-actions":_ref$dataCy,locale=_ref.locale,user=_ref.user,theme=Object(useTheme.a)(),localeMenuDataCy=Object(react.useMemo)((function(){return Object(utils.c)(dataCy,APPBAR_ACTIONS_SUBPARTS.localesMenu)}),[dataCy]),userMenuDataCy=Object(react.useMemo)((function(){return Object(utils.c)(dataCy,APPBAR_ACTIONS_SUBPARTS.userMenu)}),[dataCy]),userMenuStyle=Object(react.useMemo)((function(){return{textTransform:"lowercase"}}),[]),actionsButtons=Object(react.useMemo)((function(){return actions?actions.map((function(_ref2,index){var icon=_ref2.icon,onClick=_ref2.onClick,style=_ref2.style;return Object(jsx_runtime.jsx)(IconButton.c,{dataCy:Object(utils.c)(dataCy,APPBAR_ACTIONS_SUBPARTS.action,index),icon:icon,onClick:onClick,style:Object.assign({marginRight:theme.spacing(.5)+"px"},style)},"action-"+index)})):null}),[actions,dataCy,theme]),localeMenu=Object(react.useMemo)((function(){return locale?Object(jsx_runtime.jsx)(components_Menu,Object.assign({dataCy:localeMenuDataCy,icon:Icon.b.language},locale)):null}),[locale,localeMenuDataCy]),userMenu=Object(react.useMemo)((function(){return user?Object(jsx_runtime.jsx)(components_Menu,Object.assign({dataCy:userMenuDataCy,icon:Icon.b.account,style:userMenuStyle},user)):null}),[user,userMenuDataCy,userMenuStyle]),empty=Object(react.useMemo)((function(){return!actionsButtons&&!localeMenu&&!userMenu}),[actionsButtons,localeMenu,userMenu]),style=Object(react.useMemo)((function(){return{alignItems:"center",display:"flex"}}),[]);return empty?null:Object(jsx_runtime.jsxs)("div",{style:style,children:[actionsButtons,localeMenu,userMenu]})};Actions_AppBarActions.displayName="AppBarActions";var components_Actions=Actions_AppBarActions;try{Actions.displayName="Actions",Actions.__docgenInfo={description:"",displayName:"Actions",props:{actions:{defaultValue:null,description:"Actions available for AppBar",name:"actions",required:!1,type:{name:"IBaseIconButton[]"}},locale:{defaultValue:null,description:"Locale dedicated menu",name:"locale",required:!1,type:{name:"IMenu"}},user:{defaultValue:null,description:"User dedicated menu",name:"user",required:!1,type:{name:"IMenu"}},dataCy:{defaultValue:{value:"appbar-actions"},description:"Identifier for element selection in e2e testing",name:"dataCy",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Custom styling applied to root element",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/AppBar/components/Actions/index.tsx#Actions"]={docgenInfo:Actions.__docgenInfo,name:"Actions",path:"src/components/AppBar/components/Actions/index.tsx#Actions"})}catch(__react_docgen_typescript_loader_error){}var Typography=__webpack_require__("./src/components/Typography/index.tsx"),APPBAR_TITLE_SUBPARTS={titleClickable:{label:"Title Clickable"},titleText:{label:"Title Text"}},Title_AppBarTitle=function AppBarTitle(_ref){var children=_ref.children,_ref$dataCy=_ref.dataCy,dataCy=void 0===_ref$dataCy?"appbar-title":_ref$dataCy,externalOnTitleClick=_ref.onTitleClick,externalTitle=_ref.title,theme=Object(useTheme.a)(),titleClickableDataCy=Object(react.useMemo)((function(){return Object(utils.c)(dataCy,APPBAR_TITLE_SUBPARTS.titleClickable)}),[dataCy]),titleTextDataCy=Object(react.useMemo)((function(){return Object(utils.c)(dataCy,APPBAR_TITLE_SUBPARTS.titleText)}),[dataCy]),title=Object(react.useMemo)((function(){return externalTitle?Object(jsx_runtime.jsx)(Typography.d,{dataCy:titleTextDataCy,variant:"title",children:externalTitle}):null}),[externalTitle,titleTextDataCy]),titleClickableStyle=Object(react.useMemo)((function(){return{borderRadius:theme.shape.borderRadius+"px",cursor:"pointer",padding:theme.spacing(.5)+"px "+theme.spacing(1)+"px",userSelect:"none"}}),[theme]),onTitleClick=Object(react.useCallback)((function(event){Object(utils.e)(event),externalOnTitleClick&&externalOnTitleClick()}),[externalOnTitleClick]);return children||(title?externalOnTitleClick?Object(jsx_runtime.jsx)("div",{"data-cy":titleClickableDataCy,onClick:onTitleClick,style:titleClickableStyle,children:title}):title:null)};Title_AppBarTitle.displayName="AppBarTitle";var components_Title=Title_AppBarTitle;try{Title.displayName="Title",Title.__docgenInfo={description:"",displayName:"Title",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/AppBar/components/Title/index.tsx#Title"]={docgenInfo:Title.__docgenInfo,name:"Title",path:"src/components/AppBar/components/Title/index.tsx#Title"})}catch(__react_docgen_typescript_loader_error){}var APPBAR_CONTENT_SUBPARTS=Object.assign({},APPBAR_TITLE_SUBPARTS,{menu:{label:"Menu"}}),Content_AppBarContent=function AppBarContent(_ref){var children=_ref.children,_ref$dataCy=_ref.dataCy,dataCy=void 0===_ref$dataCy?"appbar-content":_ref$dataCy,menu=_ref.menu,onTitleClick=_ref.onTitleClick,title=_ref.title,mainMenuDataCy=Object(react.useMemo)((function(){return Object(utils.c)(dataCy,APPBAR_CONTENT_SUBPARTS.menu)}),[dataCy]),mainMenu=Object(react.useMemo)((function(){if(!menu)return null;var icon=menu.icon,onClick=menu.onClick;return Object(jsx_runtime.jsx)(IconButton.c,{dataCy:mainMenuDataCy,icon:icon,onClick:onClick})}),[mainMenuDataCy,menu]),style=Object(react.useMemo)((function(){return{alignItems:"center",display:"flex",flex:1}}),[]);return Object(jsx_runtime.jsxs)("div",{style:style,children:[mainMenu,Object(jsx_runtime.jsx)(components_Title,{dataCy:dataCy,onTitleClick:onTitleClick,title:title,children:children})]})};Content_AppBarContent.displayName="AppBarContent";var components_Content=Content_AppBarContent;try{Content.displayName="Content",Content.__docgenInfo={description:"",displayName:"Content",props:{menu:{defaultValue:null,description:"Main AppBar menu",name:"menu",required:!1,type:{name:"IBaseIconButton"}},onTitleClick:{defaultValue:null,description:"Callback for click events on AppBar title",name:"onTitleClick",required:!1,type:{name:"(() => void)"}},title:{defaultValue:null,description:"AppBar title",name:"title",required:!1,type:{name:"string"}},dataCy:{defaultValue:{value:"appbar-content"},description:"Identifier for element selection in e2e testing",name:"dataCy",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Custom styling applied to root element",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/AppBar/components/Content/index.tsx#Content"]={docgenInfo:Content.__docgenInfo,name:"Content",path:"src/components/AppBar/components/Content/index.tsx#Content"})}catch(__react_docgen_typescript_loader_error){}var AppBar_DATA_CY_DEFAULT="appbar",DATA_CY_SHORTCUT="title",LOCALIZABLE_PROPS=[{name:DATA_CY_SHORTCUT,type:"string"},{name:"userMenu.label",type:"any[]"}],SUBPARTS_MAP=Object.assign({},APPBAR_CONTENT_SUBPARTS,APPBAR_ACTIONS_SUBPARTS),components_AppBar_AppBar=function AppBar(_ref){var _ref$actions=_ref.actions,actions=void 0===_ref$actions?[]:_ref$actions,children=_ref.children,_ref$dataCy=_ref.dataCy,dataCy=void 0===_ref$dataCy?AppBar_DATA_CY_DEFAULT:_ref$dataCy,locale=_ref.locale,menu=_ref.menu,onTitleClick=_ref.onTitleClick,style=_ref.style,title=_ref.title,user=_ref.user,_ref$userMenu=_ref.userMenu,userMenu=void 0===_ref$userMenu?[]:_ref$userMenu,username=_ref.username,toolbarStyle=Object(react.useMemo)((function(){return{alignItems:"center",display:"flex",justifyContent:"space-between"}}),[]),userProps=Object(react.useMemo)((function(){return user?Object.assign({},user):userMenu&&userMenu.length?(Object(logger.b)("AppBar",'Deprecation notice, "userMenu" and "username" will be deprecated in favour of "user". Please update your code.'),{items:userMenu.map((function(menuItem){return Object.assign({},menuItem,{value:menuItem.label})})),label:username}):void 0}),[user,userMenu,username]);return Object(jsx_runtime.jsx)(AppBar_AppBar.a,{"data-cy":dataCy,position:"sticky",style:style,children:Object(jsx_runtime.jsxs)(Toolbar.a,{style:toolbarStyle,children:[Object(jsx_runtime.jsx)(components_Content,{dataCy:dataCy,menu:menu,onTitleClick:onTitleClick,title:title,children:children}),Object(jsx_runtime.jsx)(components_Actions,{actions:actions,dataCy:dataCy,locale:locale,user:userProps})]})})};components_AppBar_AppBar.displayName="AppBar";var AppBarWithProps=components_AppBar_AppBar;__webpack_exports__.f=Object(localized.a)(components_AppBar_AppBar,{dataCyShortcut:DATA_CY_SHORTCUT,localizableProps:LOCALIZABLE_PROPS});try{AppBarWithProps.displayName="AppBarWithProps",AppBarWithProps.__docgenInfo={description:"",displayName:"AppBarWithProps",props:{actions:{defaultValue:{value:"[]"},description:"Actions available for AppBar",name:"actions",required:!1,type:{name:"IBaseIconButton[]"}},locale:{defaultValue:null,description:"Locale dedicated menu",name:"locale",required:!1,type:{name:"IMenu"}},user:{defaultValue:null,description:"User dedicated menu",name:"user",required:!1,type:{name:"IMenu"}},dataCy:{defaultValue:{value:"appbar"},description:"Identifier for element selection in e2e testing",name:"dataCy",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Custom styling applied to root element",name:"style",required:!1,type:{name:"CSSProperties"}},menu:{defaultValue:null,description:"Main AppBar menu",name:"menu",required:!1,type:{name:"IBaseIconButton"}},onTitleClick:{defaultValue:null,description:"Callback for click events on AppBar title",name:"onTitleClick",required:!1,type:{name:"(() => void)"}},title:{defaultValue:null,description:"AppBar title",name:"title",required:!1,type:{name:"string"}},localized:{defaultValue:null,description:"Component localization support",name:"localized",required:!1,type:{name:"boolean"}},children:{defaultValue:null,description:"When specified it gets rendered as main content, has precedence over title",name:"children",required:!1,type:{name:"ReactNode"}},userMenu:{defaultValue:{value:"[]"},description:"User dedicated menu\n[@deprecated Use user.items]",name:"userMenu",required:!1,type:{name:"IBaseButton[]"}},username:{defaultValue:null,description:"Username to display\n[@deprecated Use user.label]",name:"username",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/AppBar/index.tsx#AppBarWithProps"]={docgenInfo:AppBarWithProps.__docgenInfo,name:"AppBarWithProps",path:"src/components/AppBar/index.tsx#AppBarWithProps"})}catch(__react_docgen_typescript_loader_error){}try{components_AppBar_AppBar.displayName="AppBar",components_AppBar_AppBar.__docgenInfo={description:"",displayName:"AppBar",props:{actions:{defaultValue:{value:"[]"},description:"Actions available for AppBar",name:"actions",required:!1,type:{name:"IBaseIconButton[]"}},locale:{defaultValue:null,description:"Locale dedicated menu",name:"locale",required:!1,type:{name:"IMenu"}},user:{defaultValue:null,description:"User dedicated menu",name:"user",required:!1,type:{name:"IMenu"}},dataCy:{defaultValue:{value:"appbar"},description:"Identifier for element selection in e2e testing",name:"dataCy",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Custom styling applied to root element",name:"style",required:!1,type:{name:"CSSProperties"}},menu:{defaultValue:null,description:"Main AppBar menu",name:"menu",required:!1,type:{name:"IBaseIconButton"}},onTitleClick:{defaultValue:null,description:"Callback for click events on AppBar title",name:"onTitleClick",required:!1,type:{name:"(() => void)"}},title:{defaultValue:null,description:"AppBar title",name:"title",required:!1,type:{name:"string"}},localized:{defaultValue:null,description:"Component localization support",name:"localized",required:!1,type:{name:"boolean"}},children:{defaultValue:null,description:"When specified it gets rendered as main content, has precedence over title",name:"children",required:!1,type:{name:"ReactNode"}},userMenu:{defaultValue:{value:"[]"},description:"User dedicated menu\n[@deprecated Use user.items]",name:"userMenu",required:!1,type:{name:"IBaseButton[]"}},username:{defaultValue:null,description:"Username to display\n[@deprecated Use user.label]",name:"username",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/AppBar/index.tsx#AppBar"]={docgenInfo:components_AppBar_AppBar.__docgenInfo,name:"AppBar",path:"src/components/AppBar/index.tsx#AppBar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Avatar/index.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"Primary",(function(){return Primary})),__webpack_require__.d(__webpack_exports__,"CustomIcon",(function(){return CustomIcon})),__webpack_require__.d(__webpack_exports__,"Image",(function(){return Image})),__webpack_require__.d(__webpack_exports__,"Loading",(function(){return Loading})),__webpack_require__.d(__webpack_exports__,"Styled",(function(){return Styled})),__webpack_require__.d(__webpack_exports__,"Text",(function(){return Text})),__webpack_require__.d(__webpack_exports__,"VariantRounded",(function(){return VariantRounded})),__webpack_require__.d(__webpack_exports__,"VariantSquare",(function(){return VariantSquare}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/react/index.js");var _material_ui_icons_Style__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@material-ui/icons/Style.js"),_material_ui_icons_Style__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_material_ui_icons_Style__WEBPACK_IMPORTED_MODULE_2__),_types_Icon__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/types/Icon.ts"),_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/index.ts"),_utils_stories__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/utils/stories/index.tsx"),___WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/Avatar/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react/jsx-runtime.js");__webpack_exports__.default={title:"Display/Avatar",component:___WEBPACK_IMPORTED_MODULE_6__.c,parameters:{docs:Object.assign({},Object(_utils_stories__WEBPACK_IMPORTED_MODULE_5__.a)({basedOn:{label:"MUI Avatar Component",url:"https://v4.mui.com/components/avatars/"},component:"Avatar",e2eTestInfo:{dataCyDefault:___WEBPACK_IMPORTED_MODULE_6__.a,subpartsSuffixes:Object(_utils__WEBPACK_IMPORTED_MODULE_4__.b)(___WEBPACK_IMPORTED_MODULE_6__.b)}}))}};var Template=function Template(args){return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(___WEBPACK_IMPORTED_MODULE_6__.c,Object.assign({},args,{dataCy:___WEBPACK_IMPORTED_MODULE_6__.a}))};Template.displayName="Template";var Primary=Template.bind({});Primary.args={icon:_types_Icon__WEBPACK_IMPORTED_MODULE_3__.b.add};var CustomIcon=Template.bind({});CustomIcon.args={icon:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_material_ui_icons_Style__WEBPACK_IMPORTED_MODULE_2___default.a,{})};var Image=Template.bind({});Image.args={src:"//upload.wikimedia.org/wikipedia/commons/thumb/6/60/Roof_hafez_tomb.jpg/440px-Roof_hafez_tomb.jpg"};var Loading=Template.bind({});Loading.args={loading:!0};var Styled=Template.bind({});Styled.args=Object.assign({},Primary.args,{style:{backgroundColor:"red",color:"white"}});var Text=Template.bind({});Text.args={text:"MO"};var VariantRounded=Template.bind({});VariantRounded.args=Object.assign({},Primary.args,{variant:"rounded"});var VariantSquare=Template.bind({});VariantSquare.args=Object.assign({},Primary.args,{variant:"square"}),Primary.parameters=Object.assign({storySource:{source:"(args) => "}},Primary.parameters),CustomIcon.parameters=Object.assign({storySource:{source:"(args) => "}},CustomIcon.parameters),Image.parameters=Object.assign({storySource:{source:"(args) => "}},Image.parameters),Loading.parameters=Object.assign({storySource:{source:"(args) => "}},Loading.parameters),Styled.parameters=Object.assign({storySource:{source:"(args) => "}},Styled.parameters),Text.parameters=Object.assign({storySource:{source:"(args) => "}},Text.parameters),VariantRounded.parameters=Object.assign({storySource:{source:"(args) => "}},VariantRounded.parameters),VariantSquare.parameters=Object.assign({storySource:{source:"(args) => "}},VariantSquare.parameters)},"./src/components/Avatar/index.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return DATA_CY_DEFAULT})),__webpack_require__.d(__webpack_exports__,"b",(function(){return SUBPARTS_MAP}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js");var react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),_material_ui_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@material-ui/core/esm/styles/useTheme.js"),_material_ui_core__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@material-ui/core/esm/Avatar/Avatar.js"),_material_ui_lab__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@material-ui/lab/esm/Skeleton/Skeleton.js"),_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/utils/index.ts"),_IconWrapper__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/IconWrapper/index.tsx"),_Typography__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/Typography/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/react/jsx-runtime.js"),DATA_CY_DEFAULT="avatar",SUBPARTS_MAP={loading:{label:"Loading"},icon:{label:"Icon"},text:{label:"Text"}},Avatar=function Avatar(_ref){var _ref$alt=_ref.alt,alt=void 0===_ref$alt?"avatar":_ref$alt,_ref$dataCy=_ref.dataCy,dataCy=void 0===_ref$dataCy?DATA_CY_DEFAULT:_ref$dataCy,icon=_ref.icon,_ref$loading=_ref.loading,loading=void 0!==_ref$loading&&_ref$loading,src=_ref.src,style=_ref.style,text=_ref.text,_ref$variant=_ref.variant,variant=void 0===_ref$variant?"circular":_ref$variant,theme=Object(_material_ui_core__WEBPACK_IMPORTED_MODULE_2__.a)(),baseStyle={backgroundColor:theme.palette.primary.main,color:theme.palette.primary.contrastText};return loading?Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_material_ui_lab__WEBPACK_IMPORTED_MODULE_4__.a,{variant:"circular"===variant?"circle":"rect",children:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_material_ui_core__WEBPACK_IMPORTED_MODULE_3__.a,{"data-cy":Object(_utils__WEBPACK_IMPORTED_MODULE_5__.c)(dataCy,SUBPARTS_MAP.loading)})}):Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_material_ui_core__WEBPACK_IMPORTED_MODULE_3__.a,{alt:text||alt,"data-cy":dataCy,src:src,style:Object.assign({},baseStyle,style),variant:variant,children:[icon&&Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_IconWrapper__WEBPACK_IMPORTED_MODULE_6__.a,{dataCy:Object(_utils__WEBPACK_IMPORTED_MODULE_5__.c)(dataCy,SUBPARTS_MAP.icon),icon:icon}),!icon&&text&&Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_Typography__WEBPACK_IMPORTED_MODULE_7__.d,{dataCy:Object(_utils__WEBPACK_IMPORTED_MODULE_5__.c)(dataCy,SUBPARTS_MAP.text),children:text})]})};Avatar.displayName="Avatar";var AvatarWithProps=Avatar;__webpack_exports__.c=Object(react__WEBPACK_IMPORTED_MODULE_1__.memo)(Avatar);try{AvatarWithProps.displayName="AvatarWithProps",AvatarWithProps.__docgenInfo={description:"",displayName:"AvatarWithProps",props:{alt:{defaultValue:{value:"avatar"},description:"Alternative text for avatar (mandatory when using src)",name:"alt",required:!1,type:{name:"string"}},src:{defaultValue:null,description:"Source for avatar image, has precedence over icon and text",name:"src",required:!1,type:{name:"string"}},text:{defaultValue:null,description:"Text for avatar content, displayed only when no icon nor src are defined",name:"text",required:!1,type:{name:"string"}},variant:{defaultValue:{value:"circular"},description:"Variant for avatar shape",name:"variant",required:!1,type:{name:"enum",value:[{value:'"circular"'},{value:'"rounded"'},{value:'"square"'},{value:'"circular"'},{value:'"rounded"'},{value:'"square"'}]}},loading:{defaultValue:{value:"false"},description:"Component loading state",name:"loading",required:!1,type:{name:"boolean"}},dataCy:{defaultValue:{value:"avatar"},description:"Identifier for element selection in e2e testing",name:"dataCy",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Custom styling applied to root element",name:"style",required:!1,type:{name:"CSSProperties"}},icon:{defaultValue:null,description:"Icon expressed as Mosaic.Icons or ReactElement",name:"icon",required:!1,type:{name:"IIconElement"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Avatar/index.tsx#AvatarWithProps"]={docgenInfo:AvatarWithProps.__docgenInfo,name:"AvatarWithProps",path:"src/components/Avatar/index.tsx#AvatarWithProps"})}catch(__react_docgen_typescript_loader_error){}try{Avatar.displayName="Avatar",Avatar.__docgenInfo={description:"",displayName:"Avatar",props:{alt:{defaultValue:{value:"avatar"},description:"Alternative text for avatar (mandatory when using src)",name:"alt",required:!1,type:{name:"string"}},src:{defaultValue:null,description:"Source for avatar image, has precedence over icon and text",name:"src",required:!1,type:{name:"string"}},text:{defaultValue:null,description:"Text for avatar content, displayed only when no icon nor src are defined",name:"text",required:!1,type:{name:"string"}},variant:{defaultValue:{value:"circular"},description:"Variant for avatar shape",name:"variant",required:!1,type:{name:"enum",value:[{value:'"circular"'},{value:'"rounded"'},{value:'"square"'},{value:'"circular"'},{value:'"rounded"'},{value:'"square"'}]}},loading:{defaultValue:{value:"false"},description:"Component loading state",name:"loading",required:!1,type:{name:"boolean"}},dataCy:{defaultValue:{value:"avatar"},description:"Identifier for element selection in e2e testing",name:"dataCy",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"Custom styling applied to root element",name:"style",required:!1,type:{name:"CSSProperties"}},icon:{defaultValue:null,description:"Icon expressed as Mosaic.Icons or ReactElement",name:"icon",required:!1,type:{name:"IIconElement"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Avatar/index.tsx#Avatar"]={docgenInfo:Avatar.__docgenInfo,name:"Avatar",path:"src/components/Avatar/index.tsx#Avatar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Button/index.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"Primary",(function(){return Primary})),__webpack_require__.d(__webpack_exports__,"Disabled",(function(){return Disabled})),__webpack_require__.d(__webpack_exports__,"Elevated",(function(){return Elevated})),__webpack_require__.d(__webpack_exports__,"Icon",(function(){return Icon})),__webpack_require__.d(__webpack_exports__,"IconCustom",(function(){return IconCustom})),__webpack_require__.d(__webpack_exports__,"IconRight",(function(){return IconRight})),__webpack_require__.d(__webpack_exports__,"IconRotate",(function(){return IconRotate})),__webpack_require__.d(__webpack_exports__,"Styled",(function(){return Styled})),__webpack_require__.d(__webpack_exports__,"VariantOutlined",(function(){return VariantOutlined}));__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/react/index.js");var _material_ui_icons_Style__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@material-ui/icons/Style.js"),_material_ui_icons_Style__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_material_ui_icons_Style__WEBPACK_IMPORTED_MODULE_2__),_types_Icon__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/types/Icon.ts"),_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/index.ts"),_utils_mocks_LocaleMock__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/utils/mocks/LocaleMock.tsx"),_utils_stories__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/utils/stories/index.tsx"),___WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/Button/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/react/jsx-runtime.js");___WEBPACK_IMPORTED_MODULE_7__.f.displayName="Button",___WEBPACK_IMPORTED_MODULE_7__.a.displayName="Button",__webpack_exports__.default={title:"Inputs/Button",component:___WEBPACK_IMPORTED_MODULE_7__.a,decorators:[_utils_mocks_LocaleMock__WEBPACK_IMPORTED_MODULE_5__.a],parameters:{docs:Object.assign({},Object(_utils_stories__WEBPACK_IMPORTED_MODULE_6__.a)({basedOn:{label:"MUI Button Component",url:"https://v4.mui.com/components/buttons/"},component:"Button",e2eTestInfo:{dataCyDefault:___WEBPACK_IMPORTED_MODULE_7__.b,dataCyShortcut:___WEBPACK_IMPORTED_MODULE_7__.c,subpartsSuffixes:Object(_utils__WEBPACK_IMPORTED_MODULE_4__.b)(___WEBPACK_IMPORTED_MODULE_7__.e)},localizableProps:___WEBPACK_IMPORTED_MODULE_7__.d}))}};var Template=function Template(args){return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(___WEBPACK_IMPORTED_MODULE_7__.f,Object.assign({},args,{dataCy:___WEBPACK_IMPORTED_MODULE_7__.b}))};Template.displayName="Template";var Primary=Template.bind({});Primary.args={label:"Button"};var Disabled=Template.bind({});Disabled.args=Object.assign({},Primary.args,{disabled:!0});var Elevated=Template.bind({});Elevated.args=Object.assign({},Primary.args,{elevated:!0});var Icon=Template.bind({});Icon.args=Object.assign({},Primary.args,{icon:{name:_types_Icon__WEBPACK_IMPORTED_MODULE_3__.b.send}});var IconCustom=Template.bind({});IconCustom.args=Object.assign({},Primary.args,{icon:{component:Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_material_ui_icons_Style__WEBPACK_IMPORTED_MODULE_2___default.a,{})}});var IconRight=Template.bind({});IconRight.args=Object.assign({},Primary.args,{icon:{name:_types_Icon__WEBPACK_IMPORTED_MODULE_3__.b.send,position:"right"}});var IconRotate=Template.bind({});IconRotate.args=Object.assign({},Disabled.args,{icon:{name:_types_Icon__WEBPACK_IMPORTED_MODULE_3__.b.refresh,rotate:!0},label:"Loading"});var Styled=Template.bind({});Styled.args=Object.assign({},Primary.args,{style:{backgroundColor:"red",color:"white"}});var VariantOutlined=Template.bind({});VariantOutlined.args=Object.assign({},Primary.args,{variant:"outlined"}),Primary.parameters=Object.assign({storySource:{source:"(args) =>