@idea-fragments/react-components-zendesk 0.1.53 → 0.1.54

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/layouts.js CHANGED
@@ -11784,7 +11784,7 @@ Dropdown=styled__default["default"](Dropdown)(templateObject_1$7||(templateObjec
11784
11784
  onChange:DO_NOTHING,onStateChange:DO_NOTHING};styled__default["default"](Multiselect)(templateObject_5||(templateObject_5=__makeTemplateObject(["\n && {\n div { max-width: 100%; }\n }\n"],["\n && {\n div { max-width: 100%; }\n }\n"])));var Label=styled__default["default"](Label$1)(templateObject_6||(templateObject_6=__makeTemplateObject(["\n && { color: ","; }\n"],["\n && { color: ","; }\n"])),function(p){return p.theme.styles.textColorPrimary;});var createOptions=function(options,key,label,menuItemComponent,isFilteringOptions,isClearable){if(isClearable===void 0){isClearable=false;}if(isFilteringOptions)return[jsxRuntime.jsx(Item,__assign({disabled:true},{children:"Loading items..."}))];if(isEmpty(options))return[jsxRuntime.jsx(Item,__assign({disabled:true},{children:"No matches found"}))];var nodes=options.map(function(o){var Component=o.Component,componentProps=o.componentProps,itemProps=o.itemProps,attrs=__rest(o,["Component","componentProps","itemProps"]);var ItemType=getItemType(attrs);return jsxRuntime.jsx(ItemType,__assign({value:o},itemProps,{children:Component?jsxRuntime.jsx(Component,__assign({},componentProps,{children:attrs[label]})):attrs[label]}),o[key]);});if(isClearable){nodes.unshift(jsxRuntime.jsx(Item,__assign({value:CLEAR_OPTION},{children:CLEAR_OPTION.label}),CLEAR_OPTION.value));}return nodes;};var templateObject_1$7,templateObject_2$4,templateObject_3$2,templateObject_4$2,templateObject_5,templateObject_6;var COMPONENT_NAME="OverflowMenu";var OverflowButton=styled__default["default"](OverflowButton$1).attrs(function(_a){var theme=_a.theme;return{icon:js.mdiDotsVertical,"data-component-name":COMPONENT_NAME,compact:true,color:lightness(theme.styles.textColorPrimary,95),"aria-label":"Row actions",size:"small",primary:true,iconSize:"1.2rem",as:Button// color: darker(COLORS.GREY),
11785
11785
  // pill: true,
11786
11786
  };})(templateObject_1$6||(templateObject_1$6=__makeTemplateObject(["\n &&&& {\n margin-top: 4px;\n padding: 0 4px;\n }\n"],["\n &&&& {\n margin-top: 4px;\n padding: 0 4px;\n }\n"])));var OverflowMenu=function(_a){var actions=_a.actions,appendToNode=_a.appendToNode,placement=_a.placement;return jsxRuntime.jsx(Dropdown,{appendMenuToNode:appendToNode,keyField:"label",labelField:"label",// @ts-ignore
11787
- onChange:function(_a){var action=_a.action;action();},options:actions,placement:placement,returnItemOnChange:true,trigger:jsxRuntime.jsx(OverflowButton,{})});};var templateObject_1$6;var PhonesOnly=function(_a){var children=_a.children;var isPhone=useDeviceSizeWatcher().isPhone;return isPhone?jsxRuntime.jsx(jsxRuntime.Fragment,{children:children}):null;};var PhonesAndTabletsOnly=function(_a){var children=_a.children;var _b=useDeviceSizeWatcher(),isPhone=_b.isPhone,isTablet=_b.isTablet,isLargeTablet=_b.isLargeTablet;return isPhone||isTablet||isLargeTablet?jsxRuntime.jsx(jsxRuntime.Fragment,{children:children}):null;};var boxShadow=styled.css(templateObject_1$5||(templateObject_1$5=__makeTemplateObject(["\n box-shadow: ",";\n"],["\n box-shadow: ",";\n"])),function(p){return p.theme.styles.section.shadow;});var roundBorder=styled.css(templateObject_2$3||(templateObject_2$3=__makeTemplateObject(["\n border-radius: ",";\n"],["\n border-radius: ",";\n"])),function(p){return p.theme.styles.section.borderRadius;});var sectionBorder$1=styled.css(templateObject_3$1||(templateObject_3$1=__makeTemplateObject(["\n border: 1px solid ",";\n"],["\n border: 1px solid ",";\n"])),function(_a){var theme=_a.theme;return theme.styles.border.color;});var Section=styled__default["default"].section(templateObject_4$1||(templateObject_4$1=__makeTemplateObject(["\n background: ",";\n\n ",";\n ",";\n ",";\n ",";\n "," //& > section {\n // padding-bottom: 0;\n //}\n\n //& + section {\n // padding-top: 0;\n //}\n"],["\n background: ",";\n\n ",";\n ",";\n ",";\n ",";\n "," //& > section {\n // padding-bottom: 0;\n //}\n\n //& + section {\n // padding-top: 0;\n //}\n"])),function(_a){var color=_a.color,theme=_a.theme;return color?color:theme.styles.section.background;},function(_a){var bordered=_a.bordered;return bordered?sectionBorder$1:"";},function(_a){var color=_a.color;return color?textColorForBackground:"";},function(_a){var rounded=_a.rounded;return rounded?roundBorder:"";},function(_a){var shadowed=_a.shadowed;return shadowed?boxShadow:"";},function(_a){var _css=_a._css;return _css;});var templateObject_1$5,templateObject_2$3,templateObject_3$1,templateObject_4$1;var removeHorizontalPadding=styled.css(templateObject_1$4||(templateObject_1$4=__makeTemplateObject(["\n padding-left: 0;\n padding-right: 0;\n"],["\n padding-left: 0;\n padding-right: 0;\n"])));var SectionBody=styled__default["default"].div(templateObject_2$2||(templateObject_2$2=__makeTemplateObject(["\n width: 100%;\n padding: ",";\n ",";\n ","\n \n\n //& > :last-child {\n // margin-bottom: 0;\n //}\n"],["\n width: 100%;\n padding: ",";\n ",";\n ","\n \n\n //& > :last-child {\n // margin-bottom: 0;\n //}\n"])),function(_a){var theme=_a.theme;return theme.styles.section.body.padding;},function(_a){var noHorizontalPadding=_a.noHorizontalPadding;return noHorizontalPadding?removeHorizontalPadding:"";},function(_a){var _css=_a._css;return _css;});var templateObject_1$4,templateObject_2$2;var SectionHeader=styled__default["default"](function(_a){var actions=_a.actions,_b=_a.bordered,bordered=_b===void 0?false:_b,caption=_a.caption,children=_a.children,className=_a.className,_c=_a.title,title=_c===void 0?children:_c;return jsxRuntime.jsxs(Container$2,__assign({bordered:bordered,className:className,withRows:true},{children:[jsxRuntime.jsxs(FlexBox,__assign({alignItems:"center",fluid:true},{children:[jsxRuntime.jsx(Text,{children:title}),actions?jsxRuntime.jsx(FlexBox,{children:actions}):null]})),caption?jsxRuntime.jsx(Text,{children:caption}):null]}));})(templateObject_1$3||(templateObject_1$3=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(_a){var _css=_a._css;return _css;});var sectionBorder=styled.css(templateObject_2$1||(templateObject_2$1=__makeTemplateObject(["\n border-bottom: 1px solid ",";\n"],["\n border-bottom: 1px solid ",";\n"])),function(_a){var theme=_a.theme;return theme.styles.border.color;});var Container$2=styled__default["default"](FlexBox)(templateObject_3||(templateObject_3=__makeTemplateObject(["\n width: 100%;\n padding: ",";\n ",";\n"],["\n width: 100%;\n padding: ",";\n ",";\n"])),function(_a){var theme=_a.theme;return theme.styles.section.header.padding;},function(_a){var bordered=_a.bordered;return bordered?sectionBorder:"";});var Text=styled__default["default"].div(templateObject_4||(templateObject_4=__makeTemplateObject(["\n flex: 1;\n\n & h1,\n & h2,\n & h3,\n & h4,\n & h5,\n & h6,\n & p {\n margin: 0;\n }\n\n"],["\n flex: 1;\n\n & h1,\n & h2,\n & h3,\n & h4,\n & h5,\n & h6,\n & p {\n margin: 0;\n }\n\n"])));var templateObject_1$3,templateObject_2$1,templateObject_3,templateObject_4;var Sidebar=function(_a){var actions=_a.actions,actionIconSize=_a.actionIconSize,activeAction=_a.activeAction,logo=_a.logo,lowerActions=_a.lowerActions;var createActionButtons=function(actions){return actions.map(function(a){var as=a.as,icon=a.icon,label=a.label;var props={active:label===activeAction,as:as,_css:actionButtonStyles,fluid:true,icon:icon,iconPosition:"left",iconSize:actionIconSize,key:label,size:BUTTON_SIZES.SMALL};return a.href?jsxRuntime.jsx(ButtonLink,__assign({href:a.href},props,{children:a.label})):jsxRuntime.jsx(Button,__assign({onClick:a.onClick},props,{children:a.label}));});};return jsxRuntime.jsxs(Container$1,__assign({gap:SPACINGS.XXXL,withRows:true},{children:[logo,jsxRuntime.jsx(FlexBox,__assign({fluid:true,gap:SPACINGS.XS,withRows:true},{children:createActionButtons(actions)})),jsxRuntime.jsx(FlexBox,__assign({gap:SPACINGS.XS,withRows:true},{children:lowerActions?createActionButtons(lowerActions):null}))]}));};var actionButtonStyles=styled.css(templateObject_1$2||(templateObject_1$2=__makeTemplateObject(["\n &&&&& {\n border-radius: ",";\n justify-content: flex-start;\n background: ",";\n color: ",";\n\n :hover {\n color: ",";\n }\n }\n"],["\n &&&&& {\n border-radius: ",";\n justify-content: flex-start;\n background: ",";\n color: ",";\n\n :hover {\n color: ",";\n }\n }\n"])),function(_a){var theme=_a.theme;return theme.styles.sidebar.actionButton.borderRadius;},function(_a){var active=_a.active,theme=_a.theme;return active?theme.styles.sidebar.actionButton.color:"transparent";},function(_a){var active=_a.active,theme=_a.theme;return active?theme.styles.textColorPrimary:fade(theme.styles.textColorPrimary,.2);},function(_a){var theme=_a.theme;return theme.styles.textColorPrimary;});var Container$1=styled__default["default"](FlexBox)(templateObject_2||(templateObject_2=__makeTemplateObject(["\n background: ",";\n height: 100%;\n padding: ",";\n width: ",";\n flex-shrink: 0;\n"],["\n background: ",";\n height: 100%;\n padding: ",";\n width: ",";\n flex-shrink: 0;\n"])),function(_a){var theme=_a.theme;return theme.styles.sidebar.background;},function(_a){var theme=_a.theme;return theme.styles.sidebar.padding;},function(_a){var theme=_a.theme;return theme.styles.sidebar.width;});var templateObject_1$2,templateObject_2;var SidebarLayout=function(_a){var sidebar=_a.sidebar,mainContent=_a.mainContent;return jsxRuntime.jsxs(Container,__assign({gap:"unset"},{children:[sidebar,mainContent]}));};var Container=styled__default["default"](FlexBox)(templateObject_1$1||(templateObject_1$1=__makeTemplateObject(["\n width: 100%;\n height: 100%;\n overflow: hidden;\n"],["\n width: 100%;\n height: 100%;\n overflow: hidden;\n"])));var templateObject_1$1;var TabletsOnly=function(_a){var children=_a.children;var _b=useDeviceSizeWatcher(),isTablet=_b.isTablet,isLargeTablet=_b.isLargeTablet;return isTablet||isLargeTablet?jsxRuntime.jsx(jsxRuntime.Fragment,{children:children}):null;};function canUseDOM(){return!!(typeof window!=="undefined"&&window.document&&window.document.createElement);}/**
11787
+ onChange:function(_a){var action=_a.action;action();},options:actions,placement:placement,returnItemOnChange:true,trigger:jsxRuntime.jsx(OverflowButton,{})});};var templateObject_1$6;var PhonesOnly=function(_a){var children=_a.children;var isPhone=useDeviceSizeWatcher().isPhone;return isPhone?jsxRuntime.jsx(jsxRuntime.Fragment,{children:children}):null;};var PhonesAndTabletsOnly=function(_a){var children=_a.children;var _b=useDeviceSizeWatcher(),isPhone=_b.isPhone,isTablet=_b.isTablet,isLargeTablet=_b.isLargeTablet;return isPhone||isTablet||isLargeTablet?jsxRuntime.jsx(jsxRuntime.Fragment,{children:children}):null;};var boxShadow=styled.css(templateObject_1$5||(templateObject_1$5=__makeTemplateObject(["\n box-shadow: ",";\n"],["\n box-shadow: ",";\n"])),function(p){return p.theme.styles.section.shadow;});var roundBorder=styled.css(templateObject_2$3||(templateObject_2$3=__makeTemplateObject(["\n border-radius: ",";\n"],["\n border-radius: ",";\n"])),function(p){return p.theme.styles.section.borderRadius;});var sectionBorder$1=styled.css(templateObject_3$1||(templateObject_3$1=__makeTemplateObject(["\n border: 1px solid ",";\n"],["\n border: 1px solid ",";\n"])),function(_a){var theme=_a.theme;return theme.styles.border.color;});var Section=styled__default["default"].section(templateObject_4$1||(templateObject_4$1=__makeTemplateObject(["\n background: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n \n ",";\n ",";\n ",";\n ",";\n "," //& > section {\n // padding-bottom: 0;\n //}\n\n //& + section {\n // padding-top: 0;\n //}\n"],["\n background: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n \n ",";\n ",";\n ",";\n ",";\n "," //& > section {\n // padding-bottom: 0;\n //}\n\n //& + section {\n // padding-top: 0;\n //}\n"])),function(_a){var color=_a.color,theme=_a.theme;return color?color:theme.styles.section.background;},function(_a){var bordered=_a.bordered;return bordered?sectionBorder$1:"";},function(_a){var color=_a.color;return color?textColorForBackground:"";},function(_a){var rounded=_a.rounded;return rounded?roundBorder:"";},function(_a){var shadowed=_a.shadowed;return shadowed?boxShadow:"";},function(_a){var _css=_a._css;return _css;});var templateObject_1$5,templateObject_2$3,templateObject_3$1,templateObject_4$1;var removeHorizontalPadding=styled.css(templateObject_1$4||(templateObject_1$4=__makeTemplateObject(["\n padding-left: 0;\n padding-right: 0;\n"],["\n padding-left: 0;\n padding-right: 0;\n"])));var SectionBody=styled__default["default"].div(templateObject_2$2||(templateObject_2$2=__makeTemplateObject(["\n width: 100%;\n flex: 1;\n overflow-y: ",";\n padding: ",";\n ",";\n ","\n\n\n & > :first-child {\n margin-top: 0;\n }\n \n & > :last-child {\n margin-bottom: 0;\n }\n"],["\n width: 100%;\n flex: 1;\n overflow-y: ",";\n padding: ",";\n ",";\n ","\n\n\n & > :first-child {\n margin-top: 0;\n }\n \n & > :last-child {\n margin-bottom: 0;\n }\n"])),function(_a){var scrollable=_a.scrollable;return scrollable?"scroll":"unset";},function(_a){var theme=_a.theme;return theme.styles.section.body.padding;},function(_a){var noHorizontalPadding=_a.noHorizontalPadding;return noHorizontalPadding?removeHorizontalPadding:"";},function(_a){var _css=_a._css;return _css;});var templateObject_1$4,templateObject_2$2;var SectionHeader=styled__default["default"](function(_a){var actions=_a.actions,_b=_a.bordered,bordered=_b===void 0?false:_b,caption=_a.caption,children=_a.children,className=_a.className,_c=_a.title,title=_c===void 0?children:_c;return jsxRuntime.jsxs(Container$2,__assign({bordered:bordered,className:className,withRows:true},{children:[jsxRuntime.jsxs(FlexBox,__assign({alignItems:"center",fluid:true},{children:[jsxRuntime.jsx(Text,{children:title}),actions?jsxRuntime.jsx(FlexBox,{children:actions}):null]})),caption?jsxRuntime.jsx(Text,{children:caption}):null]}));})(templateObject_1$3||(templateObject_1$3=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(_a){var _css=_a._css;return _css;});var sectionBorder=styled.css(templateObject_2$1||(templateObject_2$1=__makeTemplateObject(["\n border-bottom: 1px solid ",";\n"],["\n border-bottom: 1px solid ",";\n"])),function(_a){var theme=_a.theme;return theme.styles.border.color;});var Container$2=styled__default["default"](FlexBox)(templateObject_3||(templateObject_3=__makeTemplateObject(["\n width: 100%;\n padding: ",";\n ",";\n"],["\n width: 100%;\n padding: ",";\n ",";\n"])),function(_a){var theme=_a.theme;return theme.styles.section.header.padding;},function(_a){var bordered=_a.bordered;return bordered?sectionBorder:"";});var Text=styled__default["default"].div(templateObject_4||(templateObject_4=__makeTemplateObject(["\n flex: 1;\n\n & h1,\n & h2,\n & h3,\n & h4,\n & h5,\n & h6,\n & p {\n margin: 0;\n }\n\n"],["\n flex: 1;\n\n & h1,\n & h2,\n & h3,\n & h4,\n & h5,\n & h6,\n & p {\n margin: 0;\n }\n\n"])));var templateObject_1$3,templateObject_2$1,templateObject_3,templateObject_4;var Sidebar=function(_a){var actions=_a.actions,actionIconSize=_a.actionIconSize,activeAction=_a.activeAction,logo=_a.logo,lowerActions=_a.lowerActions;var createActionButtons=function(actions){return actions.map(function(a){var as=a.as,icon=a.icon,label=a.label;var props={active:label===activeAction,as:as,_css:actionButtonStyles,fluid:true,icon:icon,iconPosition:"left",iconSize:actionIconSize,key:label,size:BUTTON_SIZES.SMALL};return a.href?jsxRuntime.jsx(ButtonLink,__assign({href:a.href},props,{children:a.label})):jsxRuntime.jsx(Button,__assign({onClick:a.onClick},props,{children:a.label}));});};return jsxRuntime.jsxs(Container$1,__assign({gap:SPACINGS.XXXL,withRows:true},{children:[logo,jsxRuntime.jsx(FlexBox,__assign({fluid:true,gap:SPACINGS.XS,withRows:true},{children:createActionButtons(actions)})),jsxRuntime.jsx(FlexBox,__assign({gap:SPACINGS.XS,withRows:true},{children:lowerActions?createActionButtons(lowerActions):null}))]}));};var actionButtonStyles=styled.css(templateObject_1$2||(templateObject_1$2=__makeTemplateObject(["\n &&&&& {\n border-radius: ",";\n justify-content: flex-start;\n background: ",";\n color: ",";\n\n :hover {\n color: ",";\n }\n }\n"],["\n &&&&& {\n border-radius: ",";\n justify-content: flex-start;\n background: ",";\n color: ",";\n\n :hover {\n color: ",";\n }\n }\n"])),function(_a){var theme=_a.theme;return theme.styles.sidebar.actionButton.borderRadius;},function(_a){var active=_a.active,theme=_a.theme;return active?theme.styles.sidebar.actionButton.color:"transparent";},function(_a){var active=_a.active,theme=_a.theme;return active?theme.styles.textColorPrimary:fade(theme.styles.textColorPrimary,.2);},function(_a){var theme=_a.theme;return theme.styles.textColorPrimary;});var Container$1=styled__default["default"](FlexBox)(templateObject_2||(templateObject_2=__makeTemplateObject(["\n background: ",";\n height: 100%;\n padding: ",";\n width: ",";\n flex-shrink: 0;\n"],["\n background: ",";\n height: 100%;\n padding: ",";\n width: ",";\n flex-shrink: 0;\n"])),function(_a){var theme=_a.theme;return theme.styles.sidebar.background;},function(_a){var theme=_a.theme;return theme.styles.sidebar.padding;},function(_a){var theme=_a.theme;return theme.styles.sidebar.width;});var templateObject_1$2,templateObject_2;var SidebarLayout=function(_a){var sidebar=_a.sidebar,mainContent=_a.mainContent;return jsxRuntime.jsxs(Container,__assign({gap:"unset"},{children:[sidebar,mainContent]}));};var Container=styled__default["default"](FlexBox)(templateObject_1$1||(templateObject_1$1=__makeTemplateObject(["\n width: 100%;\n height: 100%;\n overflow: hidden;\n"],["\n width: 100%;\n height: 100%;\n overflow: hidden;\n"])));var templateObject_1$1;var TabletsOnly=function(_a){var children=_a.children;var _b=useDeviceSizeWatcher(),isTablet=_b.isTablet,isLargeTablet=_b.isLargeTablet;return isTablet||isLargeTablet?jsxRuntime.jsx(jsxRuntime.Fragment,{children:children}):null;};function canUseDOM(){return!!(typeof window!=="undefined"&&window.document&&window.document.createElement);}/**
11788
11788
  * React currently throws a warning when using useLayoutEffect on the server. To
11789
11789
  * get around it, we can conditionally useEffect on the server (no-op) and
11790
11790
  * useLayoutEffect in the browser. We occasionally need useLayoutEffect to