@blateral/b.kit 2.8.1 → 2.8.3

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.
Files changed (49) hide show
  1. package/cjs/{FilterBar-0781490f.js → FilterBar-0cb49472.js} +2 -2
  2. package/cjs/FilterBar-0cb49472.js.map +1 -0
  3. package/cjs/{FilterField-7efcacb7.js → FilterField-0ba59002.js} +2 -2
  4. package/cjs/FilterField-0ba59002.js.map +1 -0
  5. package/cjs/MultiselectDropdown-07d543dc.js +2 -0
  6. package/cjs/MultiselectDropdown-07d543dc.js.map +1 -0
  7. package/cjs/Pointer-0f69256f.js +2 -0
  8. package/cjs/Pointer-0f69256f.js.map +1 -0
  9. package/cjs/blocks.js +1 -1
  10. package/cjs/buttons.js +1 -1
  11. package/cjs/fields.js +1 -1
  12. package/cjs/sections.events.js +1 -1
  13. package/cjs/sections.jobs.js +1 -1
  14. package/cjs/sections.js +1 -1
  15. package/cjs/sections.news.js +1 -1
  16. package/cjs/sections.pois.js +1 -1
  17. package/cjs/sections.pois.js.map +1 -1
  18. package/esm/{FilterBar-2a2a09b7.js → FilterBar-821e43bc.js} +23 -23
  19. package/esm/FilterBar-821e43bc.js.map +1 -0
  20. package/esm/{FilterField-bec061bc.js → FilterField-60359bfc.js} +2 -2
  21. package/esm/FilterField-60359bfc.js.map +1 -0
  22. package/esm/{MultiselectDropdown-a97be6bc.js → MultiselectDropdown-91d0151c.js} +19 -14
  23. package/esm/MultiselectDropdown-91d0151c.js.map +1 -0
  24. package/esm/{Pointer-b4abee91.js → Pointer-3e965d7b.js} +2 -2
  25. package/esm/Pointer-3e965d7b.js.map +1 -0
  26. package/esm/blocks.js +4 -4
  27. package/esm/buttons.js +1 -1
  28. package/esm/fields.js +2 -2
  29. package/esm/sections.events.js +1 -1
  30. package/esm/sections.jobs.js +1 -1
  31. package/esm/sections.js +1 -1
  32. package/esm/sections.news.js +1 -1
  33. package/esm/sections.pois.js +8 -5
  34. package/esm/sections.pois.js.map +1 -1
  35. package/package.json +1 -1
  36. package/types/components/blocks/FilterBar.d.ts.map +1 -1
  37. package/types/components/fields/FilterField.d.ts.map +1 -1
  38. package/types/components/fields/MultiselectDropdown.d.ts.map +1 -1
  39. package/types/components/sections/pois/PointOfInterestOverview.d.ts.map +1 -1
  40. package/cjs/FilterBar-0781490f.js.map +0 -1
  41. package/cjs/FilterField-7efcacb7.js.map +0 -1
  42. package/cjs/MultiselectDropdown-a16ea1c9.js +0 -2
  43. package/cjs/MultiselectDropdown-a16ea1c9.js.map +0 -1
  44. package/cjs/Pointer-331140b6.js +0 -2
  45. package/cjs/Pointer-331140b6.js.map +0 -1
  46. package/esm/FilterBar-2a2a09b7.js.map +0 -1
  47. package/esm/FilterField-bec061bc.js.map +0 -1
  48. package/esm/MultiselectDropdown-a97be6bc.js.map +0 -1
  49. package/esm/Pointer-b4abee91.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";var n=require("./Filter-89286db9.js"),e=require("react"),t=require("styled-components"),i=require("./Copy-a0bc570d.js"),l=require("./styles-13e5d9ac.js"),r=require("./arrays-c272ed59.js"),a=require("./InfoList-e416058c.js"),o=require("./FilterField-7efcacb7.js"),s=require("./MultiselectDropdown-a16ea1c9.js");require("./useScroll-2f086e7f.js"),require("react-dom/server");var d=require("react-dom"),c=require("./Pointer-331140b6.js"),p=require("./LibThemeProvider-69109901.js"),m=require("./formFieldText-046fcbf4.js");function u(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var f,g,b,x,h,w,y,v,_,k,I,C,F,j,O,E,B,T,N,q,P,S,z,L,V,A,M=u(e),D=u(t),R=D.default.div.withConfig({displayName:"POIFacts__View",componentId:"sc-zp61fw-0"})(f||(f=n.__makeTemplateObject(["\n display: inline-flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n margin-top: -","px;\n margin-left: -","px;\n\n &:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n display: inline-flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n margin-top: -","px;\n margin-left: -","px;\n\n &:not(:first-child) {\n margin-top: ","px;\n }\n"])),l.spacings.nudge,2*l.spacings.nudge,3*l.spacings.nudge),G=D.default.div.withConfig({displayName:"POIFacts__FactsWrapper",componentId:"sc-zp61fw-1"})(g||(g=n.__makeTemplateObject(["\n padding-top: ","px;\n padding-left: ","px;\n"],["\n padding-top: ","px;\n padding-left: ","px;\n"])),l.spacings.nudge,2*l.spacings.nudge),H=D.default.span.withConfig({displayName:"POIFacts__Fact",componentId:"sc-zp61fw-2"})(b||(b=n.__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n ","\n color: ",";\n\n & > * + * {\n margin-left: ","px;\n }\n"],["\n display: inline-flex;\n align-items: center;\n ","\n color: ",";\n\n & > * + * {\n margin-left: ","px;\n }\n"])),i.copyStyle("copy","medium"),(function(n){var e=n.theme;return n.isInverted?l.getColors(e).text.copyInverted:l.getColors(e).text.copy}),.5*l.spacings.nudge),$=function(e){var t=e.facts,i=e.customFact,l=e.isInverted;return M.default.createElement(R,null,t.map((function(e,t){return M.default.createElement(G,{key:"tag_"+t},i?i({key:"headtag-".concat(t),name:e||"",isInverted:l}):M.default.createElement(H,{isInverted:l},M.default.createElement(n.Check,null),M.default.createElement("span",null,e)))})))},W=D.default.div.withConfig({displayName:"POICard__View",componentId:"sc-1l0tnmw-0"})(x||(x=n.__makeTemplateObject(["\n border: 1px solid\n ",";\n padding: ","px;\n border-radius: ",";\n overflow: hidden;\n\n & > * + * {\n margin-top: ","px;\n }\n"],["\n border: 1px solid\n ",";\n padding: ","px;\n border-radius: ",";\n overflow: hidden;\n\n & > * + * {\n margin-top: ","px;\n }\n"])),(function(n){var e=n.theme;return n.isInverted?l.getColors(e).elementBg.light:l.getColors(e).elementBg.dark}),2*l.spacings.nudge,(function(n){var e=n.theme;return l.getGlobals(e).sections.edgeRadius}),3*l.spacings.nudge),J=D.default(i.Copy).withConfig({displayName:"POICard__Title",componentId:"sc-1l0tnmw-1"})(h||(h=n.__makeTemplateObject(["\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2; /* number of lines to show */\n line-clamp: 2;\n -webkit-box-orient: vertical;\n\n &:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2; /* number of lines to show */\n line-clamp: 2;\n -webkit-box-orient: vertical;\n\n &:not(:first-child) {\n margin-top: ","px;\n }\n"])),3*l.spacings.nudge),K=D.default(i.Copy).withConfig({displayName:"POICard__Description",componentId:"sc-1l0tnmw-2"})(w||(w=n.__makeTemplateObject(["\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 4; /* number of lines to show */\n line-clamp: 4;\n -webkit-box-orient: vertical;\n"],["\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 4; /* number of lines to show */\n line-clamp: 4;\n -webkit-box-orient: vertical;\n"]))),Q=D.default.div.withConfig({displayName:"POICard__Body",componentId:"sc-1l0tnmw-3"})(y||(y=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n /* align-items: flex-start; */\n\n @media "," {\n margin-left: -","px;\n margin-right: -","px;\n\n & > * + * {\n border-left: 1px solid\n ",";\n }\n }\n"],["\n display: flex;\n flex-direction: row;\n /* align-items: flex-start; */\n\n @media "," {\n margin-left: -","px;\n margin-right: -","px;\n\n & > * + * {\n border-left: 1px solid\n ",";\n }\n }\n"])),l.mq.semilarge,l.spacings.spacer,l.spacings.spacer,(function(n){var e=n.theme;return n.isInverted?l.getColors(e).elementBg.light:l.getColors(e).elementBg.dark})),U=D.default.div.withConfig({displayName:"POICard__Col",componentId:"sc-1l0tnmw-4"})(v||(v=n.__makeTemplateObject(["\n flex: 1 0 100%;\n\n & > * + * {\n margin-top: ","px;\n }\n\n @media "," {\n flex: 1 0 60%;\n padding: 0 ","px;\n }\n\n @media "," {\n flex: 1 0 ","%;\n }\n"],["\n flex: 1 0 100%;\n\n & > * + * {\n margin-top: ","px;\n }\n\n @media "," {\n flex: 1 0 60%;\n padding: 0 ","px;\n }\n\n @media "," {\n flex: 1 0 ","%;\n }\n"])),3*l.spacings.nudge,l.mq.semilarge,l.spacings.spacer,l.mq.large,2/3*100),X=D.default(U).withConfig({displayName:"POICard__InfoCol",componentId:"sc-1l0tnmw-5"})(_||(_=n.__makeTemplateObject(["\n display: none;\n margin-bottom: ","px;\n\n @media "," {\n display: block;\n flex: 1 0 40%;\n }\n\n @media "," {\n display: block;\n flex: 1 0 ","%;\n }\n"],["\n display: none;\n margin-bottom: ","px;\n\n @media "," {\n display: block;\n flex: 1 0 40%;\n }\n\n @media "," {\n display: block;\n flex: 1 0 ","%;\n }\n"])),2*l.spacings.nudge,l.mq.semilarge,l.mq.large,1/3*100),Y=D.default.div.withConfig({displayName:"POICard__Action",componentId:"sc-1l0tnmw-6"})(k||(k=n.__makeTemplateObject([""],[""]))),Z=function(n){var t=n.isVisible,i=n.root,l=n.children,r=e.useRef(null);return e.useEffect((function(){r.current=i||document.body}),[i]),t&&r.current?d.createPortal(l,r.current):null},nn=function n(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var i,l,r;if(Array.isArray(e)){if((i=e.length)!=t.length)return!1;for(l=i;0!=l--;)if(!n(e[l],t[l]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((i=(r=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(l=i;0!=l--;)if(!Object.prototype.hasOwnProperty.call(t,r[l]))return!1;for(l=i;0!=l--;){var a=r[l];if(("_owner"!==a||!e.$$typeof)&&!n(e[a],t[a]))return!1}return!0}return e!=e&&t!=t},en=D.default.div.withConfig({displayName:"FilterBar__FilterView",componentId:"sc-xnsmbb-0"})(I||(I=n.__makeTemplateObject(["\n display: inline-block;\n"],["\n display: inline-block;\n"]))),tn=D.default(o.FilterField).withConfig({displayName:"FilterBar__TextFilter",componentId:"sc-xnsmbb-1"})(C||(C=n.__makeTemplateObject(["\n min-height: 45px;\n height: 45px;\n background: ",";\n border: ",";\n"],["\n min-height: 45px;\n height: 45px;\n background: ",";\n border: ",";\n"])),(function(n){var e=n.theme;return l.getColors(e).elementBg.light}),(function(n){return n.hasBorders?void 0:"none"})),ln=D.default(s.MultiselectDropdown).withConfig({displayName:"FilterBar__Select",componentId:"sc-xnsmbb-2"})(F||(F=n.__makeTemplateObject(["\n min-width: 220px;\n min-height: 45px;\n\n button,\n ul {\n border: ",";\n background: ",";\n }\n"],["\n min-width: 220px;\n min-height: 45px;\n\n button,\n ul {\n border: ",";\n background: ",";\n }\n"])),(function(n){return n.hasBorders?void 0:"none"}),(function(n){var e=n.theme;return l.getColors(e).elementBg.light})),rn=D.default.button.withConfig({displayName:"FilterBar__OverlayToggleView",componentId:"sc-xnsmbb-3"})(j||(j=n.__makeTemplateObject(["\n width: 250px;\n height: 45px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n padding: ","px;\n background: ",";\n\n ","\n line-height: normal;\n /** Clamping min font size to 16px to prevent browser zooming */\n ","\n\n border: none;\n outline: none;\n border-radius: ",";\n cursor: pointer;\n\n transition: all ease-in-out 0.2s;\n\n & > * + * {\n margin-left: ","px;\n }\n\n @media "," {\n display: none;\n }\n\n &:focus {\n text-decoration: underline;\n box-shadow: 0px 8px 16px\n ",";\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n box-shadow: none;\n }\n"],["\n width: 250px;\n height: 45px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n padding: ","px;\n background: ",";\n\n ","\n line-height: normal;\n /** Clamping min font size to 16px to prevent browser zooming */\n ","\n\n border: none;\n outline: none;\n border-radius: ",";\n cursor: pointer;\n\n transition: all ease-in-out 0.2s;\n\n & > * + * {\n margin-left: ","px;\n }\n\n @media "," {\n display: none;\n }\n\n &:focus {\n text-decoration: underline;\n box-shadow: 0px 8px 16px\n ",";\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n box-shadow: none;\n }\n"])),l.spacings.nudge,(function(n){var e=n.theme;return l.getColors(e).elementBg.light}),i.copyStyle("copy","small"),(function(n){var e=n.theme;return l.withRange(m.getFormFieldTextSize(e),"font-size")}),(function(n){var e=n.theme;return l.getGlobals(e).sections.edgeRadius}),l.spacings.nudge,l.mq.medium,(function(n){return n.isInverted?"rgba(255, 255, 255, 0.25)":"rgba(0, 0, 0, 0.25)"})),an=D.default(i.Copy).withConfig({displayName:"FilterBar__Counter",componentId:"sc-xnsmbb-4"})(O||(O=n.__makeTemplateObject(["\n position: relative;\n background: ",";\n color: ",";\n line-height: normal;\n\n max-height: 20px;\n max-width: 20px;\n\n height: 20px;\n width: 20px;\n\n border-radius: 50px;\n\n margin-left: ","px;\n\n & > * {\n position: absolute;\n top: 50%;\n left: 50%;\n\n transform: translate(-50%, -50%);\n }\n"],["\n position: relative;\n background: ",";\n color: ",";\n line-height: normal;\n\n max-height: 20px;\n max-width: 20px;\n\n height: 20px;\n width: 20px;\n\n border-radius: 50px;\n\n margin-left: ","px;\n\n & > * {\n position: absolute;\n top: 50%;\n left: 50%;\n\n transform: translate(-50%, -50%);\n }\n"])),(function(n){var e=n.theme;return l.getColors(e).text.default}),(function(n){var e=n.theme;return l.getColors(e).text.inverted}),2*l.spacings.nudge),on=D.default.span.withConfig({displayName:"FilterBar__Indicator",componentId:"sc-xnsmbb-5"})(E||(E=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n pointer-events: none;\n\n & > * + * {\n margin-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n pointer-events: none;\n\n & > * + * {\n margin-left: ","px;\n }\n"])),l.spacings.nudge),sn=D.default.div.withConfig({displayName:"FilterBar__Icon",componentId:"sc-xnsmbb-6"})(B||(B=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"],["\n display: flex;\n align-items: center;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"])),l.spacings.nudge),dn=D.default.span.withConfig({displayName:"FilterBar__Label",componentId:"sc-xnsmbb-7"})(T||(T=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n user-select: none;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n\n & > * + * {\n margin-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n user-select: none;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n\n & > * + * {\n margin-left: ","px;\n }\n"])),l.spacings.nudge),cn=function(e){var t=e.isInverted,i=e.label,l=e.selected,r=e.onClick,a=e.icon,o=e.indicator,s=e.className,d=null==a?void 0:a(t),c=p.useLibTheme().colors;return M.default.createElement(rn,{isInverted:t,onClick:r,className:s},M.default.createElement(dn,null,d&&M.default.createElement(sn,null,d),M.default.createElement("span",null,i)),M.default.createElement(on,null,M.default.createElement(an,{size:"small"},M.default.createElement("span",null,l||0)),null==o?void 0:o(),!o&&M.default.createElement(n.AngleDown,{iconColor:c.elementBg.dark})))},pn=D.default.div.withConfig({displayName:"FilterBar__DesktopFilters",componentId:"sc-xnsmbb-8"})(N||(N=n.__makeTemplateObject(["\n display: none;\n\n @media "," {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n justify-content: flex-end;\n\n & > * {\n width: 220px;\n }\n\n & > * + * {\n margin-right: ","px;\n }\n }\n"],["\n display: none;\n\n @media "," {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n justify-content: flex-end;\n\n & > * {\n width: 220px;\n }\n\n & > * + * {\n margin-right: ","px;\n }\n }\n"])),l.mq.medium,l.spacings.nudge),mn=D.default.div.withConfig({displayName:"FilterBar__MobileBarStage",componentId:"sc-xnsmbb-9"})(q||(q=n.__makeTemplateObject(["\n position: fixed;\n bottom: 0;\n left: 0;\n top: 0;\n height: 100vh;\n width: 100vw;\n"],["\n position: fixed;\n bottom: 0;\n left: 0;\n top: 0;\n height: 100vh;\n width: 100vw;\n"]))),un=D.default.div.withConfig({displayName:"FilterBar__MobileBarBackdrop",componentId:"sc-xnsmbb-10"})(P||(P=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n background-color: ",";\n opacity: 0.8;\n z-index: 0;\n"],["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n background-color: ",";\n opacity: 0.8;\n z-index: 0;\n"])),(function(n){var e=n.theme;return l.getColors(e).elementBg.light})),fn=D.default.div.withConfig({displayName:"FilterBar__MobileBarContent",componentId:"sc-xnsmbb-11"})(S||(S=n.__makeTemplateObject(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n max-height: 90vh;\n z-index: 0;\n overflow-y: auto;\n\n padding: ","px;\n background-color: ",";\n border-radius: ",";\n"],["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n max-height: 90vh;\n z-index: 0;\n overflow-y: auto;\n\n padding: ","px;\n background-color: ",";\n border-radius: ",";\n"])),2*l.spacings.nudge,(function(n){var e=n.theme;return l.getColors(e).elementBg.light}),(function(n){var e=n.theme;return l.getGlobals(e).sections.edgeRadius})),gn=D.default(i.Copy).withConfig({displayName:"FilterBar__FilterBarHead",componentId:"sc-xnsmbb-12"})(z||(z=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n margin-bottom: ","px;\n"])),3*l.spacings.nudge),bn=D.default.button.withConfig({displayName:"FilterBar__FilterBarCloseBtn",componentId:"sc-xnsmbb-13"})(L||(L=n.__makeTemplateObject(["\n flex: 0 0 auto;\n\n display: inline-block;\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n\n cursor: pointer;\n"],["\n flex: 0 0 auto;\n\n display: inline-block;\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n\n cursor: pointer;\n"]))),xn=D.default.div.withConfig({displayName:"FilterBar__MobileBarMain",componentId:"sc-xnsmbb-14"})(V||(V=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n & > * {\n width: 100%;\n }\n\n & > * + * {\n margin-top: ","px;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n & > * {\n width: 100%;\n }\n\n & > * + * {\n margin-top: ","px;\n }\n"])),3*l.spacings.nudge),hn=D.default(c.Pointer.View).withConfig({displayName:"FilterBar__MobileBarSubmitPointer",componentId:"sc-xnsmbb-15"})(A||(A=n.__makeTemplateObject(["\n width: auto;\n margin-right: auto;\n margin-top: ","px;\n"],["\n width: auto;\n margin-right: auto;\n margin-top: ","px;\n"])),3*l.spacings.nudge);exports.FilterBar=function(t){var l,a=t.isInverted,d=t.hasBorders,p=t.value,m=t.onChange,u=t.mobileSubmitLabel,f=void 0===u?"Apply filters":u,g=t.toggleLabel,b=t.categoryFilter,x=t.textFilter,h=t.closeIcon,w=t.filterIcon,y=t.indicator,v=t.className,_=e.useState(p||{textFilter:"",categoryFilter:[]}),k=_[0],I=_[1],C=e.useRef(k),F=e.useState(!1),j=F[0],O=F[1],E=e.useState(k.textFilter||""),B=E[0],T=E[1],N=e.useState(k.categoryFilter||[]),q=N[0],P=N[1],S=function(){O(!1),P(k.categoryFilter||[]),T(k.textFilter||"")};e.useEffect((function(){P(k.categoryFilter||[]),T(k.textFilter||"")}),[k]),e.useEffect((function(){nn(k,p)||null==m||m(k)}),[k,m,p]),e.useEffect((function(){p&&!nn(p,C.current)&&(I(p),C.current=p)}),[p]);var z=((null===(l=null==k?void 0:k.categoryFilter)||void 0===l?void 0:l.length)||0)+(k.textFilter?1:0),L=(null==h?void 0:h(a))||M.default.createElement(n.Cross,{width:32,height:32});return M.default.createElement(e.Fragment,null,M.default.createElement(en,{className:v},M.default.createElement(cn,{label:g||"",selected:z,onClick:function(){return O((function(n){return!n}))},icon:w,indicator:y?function(){return y({isOpen:!1,isDisabled:!1})}:void 0}),M.default.createElement(pn,null,x&&M.default.createElement(tn,{isInverted:a,icon:x.icon,submitIcon:x.submitIcon,clearIcon:x.clearIcon,placeholder:x.placeholder,value:k.textFilter,onSubmit:function(e){I((function(t){return n.__assign(n.__assign({},t),{textFilter:e})}))},hasBorders:d}),b&&r.isValidArray(null==b?void 0:b.items,!1)&&M.default.createElement(ln,{isInverted:a,items:b.items,placeholder:b.label,icon:w,indicator:y,resetLabel:b.resetLabel,onChange:function(e){return I((function(t){return n.__assign(n.__assign({},t),{categoryFilter:e})}))},selectedItems:k.categoryFilter,hasBorders:d}))),M.default.createElement(Z,{isVisible:j},M.default.createElement(mn,null,M.default.createElement(un,{onClick:S}),M.default.createElement(fn,null,M.default.createElement(gn,null,M.default.createElement(i.Copy,{type:"copy-b",size:"big"},g),L&&M.default.createElement(bn,{onClick:S},L)),M.default.createElement(xn,null,x&&M.default.createElement(o.FilterField,{icon:x.icon,submitIcon:x.submitIcon,clearIcon:x.clearIcon,placeholder:x.placeholder,value:B,onSubmit:T}),b&&r.isValidArray(null==b?void 0:b.items,!1)&&M.default.createElement(s.MultiselectDropdown,{inlined:!0,items:b.items,placeholder:b.label,icon:w,indicator:y,resetLabel:b.resetLabel,selectedItems:q,onChange:P}),f&&M.default.createElement(hn,{onClick:function(){O(!1),I({textFilter:B,categoryFilter:q})}},M.default.createElement(c.Pointer.Label,null,f),M.default.createElement(c.Pointer.Icon,null,M.default.createElement(n.AngleRight,null))))))))},exports.POICard=function(n){var e=n.isInverted,t=n.name,i=n.shortDescription,l=n.facts,o=n.infos,s=n.customFact,d=n.action,c=r.isValidArray(l,!1),p=r.isValidArray(o,!1);return M.default.createElement(W,{isInverted:e},t&&M.default.createElement(J,{type:"copy-b",size:"big",isInverted:e},t),(c||i||p||d)&&M.default.createElement(Q,{isInverted:e},M.default.createElement(U,null,r.isValidArray(l,!1)&&M.default.createElement($,{facts:l,isInverted:e,customFact:s}),i&&M.default.createElement(K,{isInverted:e,innerHTML:i}),d&&M.default.createElement(Y,null,d(e))),r.isValidArray(o,!1)&&M.default.createElement(X,null,M.default.createElement(a.InfoList,{isInverted:e,items:[{items:o}]}))))},exports.POIFacts=$;
2
- //# sourceMappingURL=FilterBar-0781490f.js.map
1
+ "use strict";var n=require("./Filter-89286db9.js"),e=require("react"),t=require("styled-components"),i=require("./Copy-a0bc570d.js"),l=require("./styles-13e5d9ac.js"),a=require("./arrays-c272ed59.js"),r=require("./InfoList-e416058c.js"),o=require("./FilterField-0ba59002.js"),s=require("./MultiselectDropdown-07d543dc.js");require("./useScroll-2f086e7f.js"),require("react-dom/server");var d=require("react-dom"),c=require("./Pointer-0f69256f.js"),p=require("./LibThemeProvider-69109901.js"),m=require("./formFieldText-046fcbf4.js");function u(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var f,g,b,x,h,w,y,v,_,k,I,C,F,j,O,E,B,T,N,q,P,S,z,L,V,A,M=u(e),D=u(t),R=D.default.div.withConfig({displayName:"POIFacts__View",componentId:"sc-zp61fw-0"})(f||(f=n.__makeTemplateObject(["\n display: inline-flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n margin-top: -","px;\n margin-left: -","px;\n\n &:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n display: inline-flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n margin-top: -","px;\n margin-left: -","px;\n\n &:not(:first-child) {\n margin-top: ","px;\n }\n"])),l.spacings.nudge,2*l.spacings.nudge,3*l.spacings.nudge),G=D.default.div.withConfig({displayName:"POIFacts__FactsWrapper",componentId:"sc-zp61fw-1"})(g||(g=n.__makeTemplateObject(["\n padding-top: ","px;\n padding-left: ","px;\n"],["\n padding-top: ","px;\n padding-left: ","px;\n"])),l.spacings.nudge,2*l.spacings.nudge),H=D.default.span.withConfig({displayName:"POIFacts__Fact",componentId:"sc-zp61fw-2"})(b||(b=n.__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n ","\n color: ",";\n\n & > * + * {\n margin-left: ","px;\n }\n"],["\n display: inline-flex;\n align-items: center;\n ","\n color: ",";\n\n & > * + * {\n margin-left: ","px;\n }\n"])),i.copyStyle("copy","medium"),(function(n){var e=n.theme;return n.isInverted?l.getColors(e).text.copyInverted:l.getColors(e).text.copy}),.5*l.spacings.nudge),$=function(e){var t=e.facts,i=e.customFact,l=e.isInverted;return M.default.createElement(R,null,t.map((function(e,t){return M.default.createElement(G,{key:"tag_"+t},i?i({key:"headtag-".concat(t),name:e||"",isInverted:l}):M.default.createElement(H,{isInverted:l},M.default.createElement(n.Check,null),M.default.createElement("span",null,e)))})))},W=D.default.div.withConfig({displayName:"POICard__View",componentId:"sc-1l0tnmw-0"})(x||(x=n.__makeTemplateObject(["\n border: 1px solid\n ",";\n padding: ","px;\n border-radius: ",";\n overflow: hidden;\n\n & > * + * {\n margin-top: ","px;\n }\n"],["\n border: 1px solid\n ",";\n padding: ","px;\n border-radius: ",";\n overflow: hidden;\n\n & > * + * {\n margin-top: ","px;\n }\n"])),(function(n){var e=n.theme;return n.isInverted?l.getColors(e).elementBg.light:l.getColors(e).elementBg.dark}),2*l.spacings.nudge,(function(n){var e=n.theme;return l.getGlobals(e).sections.edgeRadius}),3*l.spacings.nudge),J=D.default(i.Copy).withConfig({displayName:"POICard__Title",componentId:"sc-1l0tnmw-1"})(h||(h=n.__makeTemplateObject(["\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2; /* number of lines to show */\n line-clamp: 2;\n -webkit-box-orient: vertical;\n\n &:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2; /* number of lines to show */\n line-clamp: 2;\n -webkit-box-orient: vertical;\n\n &:not(:first-child) {\n margin-top: ","px;\n }\n"])),3*l.spacings.nudge),K=D.default(i.Copy).withConfig({displayName:"POICard__Description",componentId:"sc-1l0tnmw-2"})(w||(w=n.__makeTemplateObject(["\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 4; /* number of lines to show */\n line-clamp: 4;\n -webkit-box-orient: vertical;\n"],["\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 4; /* number of lines to show */\n line-clamp: 4;\n -webkit-box-orient: vertical;\n"]))),Q=D.default.div.withConfig({displayName:"POICard__Body",componentId:"sc-1l0tnmw-3"})(y||(y=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n /* align-items: flex-start; */\n\n @media "," {\n margin-left: -","px;\n margin-right: -","px;\n\n & > * + * {\n border-left: 1px solid\n ",";\n }\n }\n"],["\n display: flex;\n flex-direction: row;\n /* align-items: flex-start; */\n\n @media "," {\n margin-left: -","px;\n margin-right: -","px;\n\n & > * + * {\n border-left: 1px solid\n ",";\n }\n }\n"])),l.mq.semilarge,l.spacings.spacer,l.spacings.spacer,(function(n){var e=n.theme;return n.isInverted?l.getColors(e).elementBg.light:l.getColors(e).elementBg.dark})),U=D.default.div.withConfig({displayName:"POICard__Col",componentId:"sc-1l0tnmw-4"})(v||(v=n.__makeTemplateObject(["\n flex: 1 0 100%;\n\n & > * + * {\n margin-top: ","px;\n }\n\n @media "," {\n flex: 1 0 60%;\n padding: 0 ","px;\n }\n\n @media "," {\n flex: 1 0 ","%;\n }\n"],["\n flex: 1 0 100%;\n\n & > * + * {\n margin-top: ","px;\n }\n\n @media "," {\n flex: 1 0 60%;\n padding: 0 ","px;\n }\n\n @media "," {\n flex: 1 0 ","%;\n }\n"])),3*l.spacings.nudge,l.mq.semilarge,l.spacings.spacer,l.mq.large,2/3*100),X=D.default(U).withConfig({displayName:"POICard__InfoCol",componentId:"sc-1l0tnmw-5"})(_||(_=n.__makeTemplateObject(["\n display: none;\n margin-bottom: ","px;\n\n @media "," {\n display: block;\n flex: 1 0 40%;\n }\n\n @media "," {\n display: block;\n flex: 1 0 ","%;\n }\n"],["\n display: none;\n margin-bottom: ","px;\n\n @media "," {\n display: block;\n flex: 1 0 40%;\n }\n\n @media "," {\n display: block;\n flex: 1 0 ","%;\n }\n"])),2*l.spacings.nudge,l.mq.semilarge,l.mq.large,1/3*100),Y=D.default.div.withConfig({displayName:"POICard__Action",componentId:"sc-1l0tnmw-6"})(k||(k=n.__makeTemplateObject([""],[""]))),Z=function(n){var t=n.isVisible,i=n.root,l=n.children,a=e.useRef(null);return e.useEffect((function(){a.current=i||document.body}),[i]),t&&a.current?d.createPortal(l,a.current):null},nn=function n(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var i,l,a;if(Array.isArray(e)){if((i=e.length)!=t.length)return!1;for(l=i;0!=l--;)if(!n(e[l],t[l]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((i=(a=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(l=i;0!=l--;)if(!Object.prototype.hasOwnProperty.call(t,a[l]))return!1;for(l=i;0!=l--;){var r=a[l];if(("_owner"!==r||!e.$$typeof)&&!n(e[r],t[r]))return!1}return!0}return e!=e&&t!=t},en=D.default.div.withConfig({displayName:"FilterBar__FilterView",componentId:"sc-xnsmbb-0"})(I||(I=n.__makeTemplateObject(["\n display: inline-block;\n"],["\n display: inline-block;\n"]))),tn=D.default(o.FilterField).withConfig({displayName:"FilterBar__TextFilter",componentId:"sc-xnsmbb-1"})(C||(C=n.__makeTemplateObject(["\n min-height: 45px;\n height: 45px;\n background: ",";\n border: ",";\n"],["\n min-height: 45px;\n height: 45px;\n background: ",";\n border: ",";\n"])),(function(n){var e=n.theme;return l.getColors(e).elementBg.light}),(function(n){return n.hasBorders?void 0:"none"})),ln=D.default(s.MultiselectDropdown).withConfig({displayName:"FilterBar__Select",componentId:"sc-xnsmbb-2"})(F||(F=n.__makeTemplateObject(["\n min-width: 220px;\n min-height: 45px;\n\n button,\n ul {\n border: ",";\n background: ",";\n }\n"],["\n min-width: 220px;\n min-height: 45px;\n\n button,\n ul {\n border: ",";\n background: ",";\n }\n"])),(function(n){return n.hasBorders?void 0:"none"}),(function(n){var e=n.theme;return l.getColors(e).elementBg.light})),an=D.default.button.withConfig({displayName:"FilterBar__OverlayToggleView",componentId:"sc-xnsmbb-3"})(j||(j=n.__makeTemplateObject(["\n width: 250px;\n height: 45px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n padding: ","px;\n background: ",";\n\n ","\n line-height: normal;\n /** Clamping min font size to 16px to prevent browser zooming */\n ","\n\n border: none;\n outline: none;\n border-radius: ",";\n cursor: pointer;\n\n transition: all ease-in-out 0.2s;\n\n & > * + * {\n margin-left: ","px;\n }\n\n @media "," {\n display: none;\n }\n\n &:focus {\n text-decoration: underline;\n box-shadow: 0px 8px 16px\n ",";\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n box-shadow: none;\n }\n"],["\n width: 250px;\n height: 45px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n padding: ","px;\n background: ",";\n\n ","\n line-height: normal;\n /** Clamping min font size to 16px to prevent browser zooming */\n ","\n\n border: none;\n outline: none;\n border-radius: ",";\n cursor: pointer;\n\n transition: all ease-in-out 0.2s;\n\n & > * + * {\n margin-left: ","px;\n }\n\n @media "," {\n display: none;\n }\n\n &:focus {\n text-decoration: underline;\n box-shadow: 0px 8px 16px\n ",";\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n box-shadow: none;\n }\n"])),l.spacings.nudge,(function(n){var e=n.theme;return l.getColors(e).elementBg.light}),i.copyStyle("copy","small"),(function(n){var e=n.theme;return l.withRange(m.getFormFieldTextSize(e),"font-size")}),(function(n){var e=n.theme;return l.getGlobals(e).sections.edgeRadius}),l.spacings.nudge,l.mq.medium,(function(n){return n.isInverted?"rgba(255, 255, 255, 0.25)":"rgba(0, 0, 0, 0.25)"})),rn=D.default(i.Copy).withConfig({displayName:"FilterBar__Counter",componentId:"sc-xnsmbb-4"})(O||(O=n.__makeTemplateObject(["\n position: relative;\n background: ",";\n color: ",";\n line-height: normal;\n\n max-height: 20px;\n max-width: 20px;\n\n height: 20px;\n width: 20px;\n\n border-radius: 50px;\n\n margin-left: ","px;\n\n & > * {\n position: absolute;\n top: 50%;\n left: 50%;\n\n transform: translate(-50%, -50%);\n }\n"],["\n position: relative;\n background: ",";\n color: ",";\n line-height: normal;\n\n max-height: 20px;\n max-width: 20px;\n\n height: 20px;\n width: 20px;\n\n border-radius: 50px;\n\n margin-left: ","px;\n\n & > * {\n position: absolute;\n top: 50%;\n left: 50%;\n\n transform: translate(-50%, -50%);\n }\n"])),(function(n){var e=n.theme;return l.getColors(e).text.default}),(function(n){var e=n.theme;return l.getColors(e).text.inverted}),2*l.spacings.nudge),on=D.default.span.withConfig({displayName:"FilterBar__Indicator",componentId:"sc-xnsmbb-5"})(E||(E=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n pointer-events: none;\n\n & > * + * {\n margin-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n pointer-events: none;\n\n & > * + * {\n margin-left: ","px;\n }\n"])),l.spacings.nudge),sn=D.default.div.withConfig({displayName:"FilterBar__Icon",componentId:"sc-xnsmbb-6"})(B||(B=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"],["\n display: flex;\n align-items: center;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"])),l.spacings.nudge),dn=D.default.span.withConfig({displayName:"FilterBar__Label",componentId:"sc-xnsmbb-7"})(T||(T=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n user-select: none;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n\n & > * + * {\n margin-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n user-select: none;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n\n & > * + * {\n margin-left: ","px;\n }\n"])),l.spacings.nudge),cn=function(e){var t=e.isInverted,i=e.label,l=e.selected,a=e.onClick,r=e.icon,o=e.indicator,s=e.className,d=null==r?void 0:r(t),c=p.useLibTheme().colors;return M.default.createElement(an,{isInverted:t,onClick:a,className:s},M.default.createElement(dn,null,d&&M.default.createElement(sn,null,d),M.default.createElement("span",null,i)),M.default.createElement(on,null,l?M.default.createElement(rn,{size:"small"},M.default.createElement("span",null,l||0)):null,null==o?void 0:o(),!o&&M.default.createElement(n.AngleDown,{iconColor:c.elementBg.dark})))},pn=D.default.div.withConfig({displayName:"FilterBar__DesktopFilters",componentId:"sc-xnsmbb-8"})(N||(N=n.__makeTemplateObject(["\n display: none;\n\n @media "," {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n\n & > * {\n width: 220px;\n }\n\n & > * + * {\n margin-left: ","px;\n }\n }\n"],["\n display: none;\n\n @media "," {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n\n & > * {\n width: 220px;\n }\n\n & > * + * {\n margin-left: ","px;\n }\n }\n"])),l.mq.medium,l.spacings.nudge),mn=D.default.div.withConfig({displayName:"FilterBar__MobileBarStage",componentId:"sc-xnsmbb-9"})(q||(q=n.__makeTemplateObject(["\n position: fixed;\n bottom: 0;\n left: 0;\n top: 0;\n height: 100vh;\n width: 100vw;\n"],["\n position: fixed;\n bottom: 0;\n left: 0;\n top: 0;\n height: 100vh;\n width: 100vw;\n"]))),un=D.default.div.withConfig({displayName:"FilterBar__MobileBarBackdrop",componentId:"sc-xnsmbb-10"})(P||(P=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n background-color: ",";\n opacity: 0.8;\n z-index: 0;\n"],["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n background-color: ",";\n opacity: 0.8;\n z-index: 0;\n"])),(function(n){var e=n.theme;return l.getColors(e).elementBg.light})),fn=D.default.div.withConfig({displayName:"FilterBar__MobileBarContent",componentId:"sc-xnsmbb-11"})(S||(S=n.__makeTemplateObject(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n max-height: 90vh;\n z-index: 0;\n overflow-y: auto;\n\n padding: ","px;\n background-color: ",";\n border-radius: ",";\n"],["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n max-height: 90vh;\n z-index: 0;\n overflow-y: auto;\n\n padding: ","px;\n background-color: ",";\n border-radius: ",";\n"])),2*l.spacings.nudge,(function(n){var e=n.theme;return l.getColors(e).elementBg.light}),(function(n){var e=n.theme;return l.getGlobals(e).sections.edgeRadius})),gn=D.default(i.Copy).withConfig({displayName:"FilterBar__FilterBarHead",componentId:"sc-xnsmbb-12"})(z||(z=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n margin-bottom: ","px;\n"])),3*l.spacings.nudge),bn=D.default.button.withConfig({displayName:"FilterBar__FilterBarCloseBtn",componentId:"sc-xnsmbb-13"})(L||(L=n.__makeTemplateObject(["\n flex: 0 0 auto;\n\n display: inline-block;\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n\n cursor: pointer;\n"],["\n flex: 0 0 auto;\n\n display: inline-block;\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n\n cursor: pointer;\n"]))),xn=D.default.div.withConfig({displayName:"FilterBar__MobileBarMain",componentId:"sc-xnsmbb-14"})(V||(V=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n & > * {\n width: 100%;\n }\n\n & > * + * {\n margin-top: ","px;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n & > * {\n width: 100%;\n }\n\n & > * + * {\n margin-top: ","px;\n }\n"])),3*l.spacings.nudge),hn=D.default(c.Pointer.View).withConfig({displayName:"FilterBar__MobileBarSubmitPointer",componentId:"sc-xnsmbb-15"})(A||(A=n.__makeTemplateObject(["\n width: auto;\n margin-right: auto;\n margin-top: ","px;\n"],["\n width: auto;\n margin-right: auto;\n margin-top: ","px;\n"])),3*l.spacings.nudge);exports.FilterBar=function(t){var l,r=t.isInverted,d=t.hasBorders,p=t.value,m=t.onChange,u=t.mobileSubmitLabel,f=void 0===u?"Apply filters":u,g=t.toggleLabel,b=t.categoryFilter,x=t.textFilter,h=t.closeIcon,w=t.filterIcon,y=t.indicator,v=t.className,_=e.useState(p||{textFilter:"",categoryFilter:[]}),k=_[0],I=_[1],C=e.useRef(k),F=e.useState(!1),j=F[0],O=F[1],E=e.useState(k.textFilter||""),B=E[0],T=E[1],N=e.useState(k.categoryFilter||[]),q=N[0],P=N[1],S=function(){O(!1),P(k.categoryFilter||[]),T(k.textFilter||"")};e.useEffect((function(){P(k.categoryFilter||[]),T(k.textFilter||"")}),[k]),e.useEffect((function(){nn(k,p)||null==m||m(k)}),[k,m,p]),e.useEffect((function(){p&&!nn(p,C.current)&&(I(p),C.current=p)}),[p]);var z=((null===(l=null==k?void 0:k.categoryFilter)||void 0===l?void 0:l.length)||0)+(k.textFilter?1:0),L=(null==h?void 0:h(r))||M.default.createElement(n.Cross,{width:32,height:32});return M.default.createElement(e.Fragment,null,M.default.createElement(en,{className:v},M.default.createElement(cn,{label:g||"",selected:z,onClick:function(){return O((function(n){return!n}))},icon:w,indicator:y?function(){return y({isOpen:!1,isDisabled:!1})}:void 0}),M.default.createElement(pn,null,b&&a.isValidArray(null==b?void 0:b.items,!1)&&M.default.createElement(ln,{isInverted:r,items:b.items,placeholder:b.label,icon:w,indicator:y,resetLabel:b.resetLabel,onChange:function(e){return I((function(t){return n.__assign(n.__assign({},t),{categoryFilter:e})}))},selectedItems:k.categoryFilter,hasBorders:d}),x&&M.default.createElement(tn,{isInverted:r,icon:x.icon,submitIcon:x.submitIcon,clearIcon:x.clearIcon,placeholder:x.placeholder,value:k.textFilter,onSubmit:function(e){I((function(t){return n.__assign(n.__assign({},t),{textFilter:e})}))},hasBorders:d}))),M.default.createElement(Z,{isVisible:j},M.default.createElement(mn,null,M.default.createElement(un,{onClick:S}),M.default.createElement(fn,null,M.default.createElement(gn,null,M.default.createElement(i.Copy,{type:"copy-b",size:"big"},g),L&&M.default.createElement(bn,{onClick:S},L)),M.default.createElement(xn,null,x&&M.default.createElement(o.FilterField,{icon:x.icon,submitIcon:x.submitIcon,clearIcon:x.clearIcon,placeholder:x.placeholder,value:B,onSubmit:T}),b&&a.isValidArray(null==b?void 0:b.items,!1)&&M.default.createElement(s.MultiselectDropdown,{inlined:!0,items:b.items,placeholder:b.label,icon:w,indicator:y,resetLabel:b.resetLabel,selectedItems:q,onChange:P}),f&&M.default.createElement(hn,{onClick:function(){O(!1),I({textFilter:B,categoryFilter:q})}},M.default.createElement(c.Pointer.Label,null,f),M.default.createElement(c.Pointer.Icon,null,M.default.createElement(n.AngleRight,null))))))))},exports.POICard=function(n){var e=n.isInverted,t=n.name,i=n.shortDescription,l=n.facts,o=n.infos,s=n.customFact,d=n.action,c=a.isValidArray(l,!1),p=a.isValidArray(o,!1);return M.default.createElement(W,{isInverted:e},t&&M.default.createElement(J,{type:"copy-b",size:"big",isInverted:e},t),(c||i||p||d)&&M.default.createElement(Q,{isInverted:e},M.default.createElement(U,null,a.isValidArray(l,!1)&&M.default.createElement($,{facts:l,isInverted:e,customFact:s}),i&&M.default.createElement(K,{isInverted:e,innerHTML:i}),d&&M.default.createElement(Y,null,d(e))),a.isValidArray(o,!1)&&M.default.createElement(X,null,M.default.createElement(r.InfoList,{isInverted:e,items:[{items:o}]}))))},exports.POIFacts=$;
2
+ //# sourceMappingURL=FilterBar-0cb49472.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterBar-0cb49472.js","sources":["../src/components/blocks/POIFacts.tsx","../src/components/blocks/POICard.tsx","../src/components/blocks/Portal.tsx","../node_modules/fast-deep-equal/react.js","../src/components/blocks/FilterBar.tsx"],"sourcesContent":["import Check from 'components/base/icons/Check';\nimport { copyStyle } from 'components/typography/Copy';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { getColors as color, spacings } from 'utils/styles';\n\nconst View = styled.div`\n display: inline-flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n margin-top: -${spacings.nudge}px;\n margin-left: -${spacings.nudge * 2}px;\n\n &:not(:first-child) {\n margin-top: ${spacings.nudge * 3}px;\n }\n`;\n\nconst FactsWrapper = styled.div`\n padding-top: ${spacings.nudge}px;\n padding-left: ${spacings.nudge * 2}px;\n`;\n\nconst Fact = styled.span<{ isInverted?: boolean }>`\n display: inline-flex;\n align-items: center;\n ${copyStyle('copy', 'medium')}\n color: ${({ theme, isInverted }) =>\n isInverted ? color(theme).text.copyInverted : color(theme).text.copy};\n\n & > * + * {\n margin-left: ${spacings.nudge * 0.5}px;\n }\n`;\n\nconst POIFacts: React.FC<{\n facts: string[];\n customFact?: (props: {\n key: React.Key;\n name: string;\n isInverted?: boolean;\n }) => React.ReactNode;\n isInverted?: boolean;\n}> = ({ facts, customFact, isInverted }) => {\n return (\n <View>\n {facts.map((fact, i) => (\n <FactsWrapper key={'tag_' + i}>\n {customFact ? (\n customFact({\n key: `headtag-${i}`,\n name: fact || '',\n isInverted: isInverted,\n })\n ) : (\n <Fact isInverted={isInverted}>\n <Check />\n <span>{fact}</span>\n </Fact>\n )}\n </FactsWrapper>\n ))}\n </View>\n );\n};\n\nexport default POIFacts;\n","import React from 'react';\nimport styled from 'styled-components';\n\nimport POIFacts from 'components/blocks/POIFacts';\nimport Copy from 'components/typography/Copy';\nimport { isValidArray } from 'utils/arrays';\nimport {\n getColors as color,\n getGlobals as global,\n mq,\n spacings,\n} from 'utils/styles';\nimport InfoList, { Info } from './InfoList';\n\nconst View = styled.div<{ isInverted?: boolean }>`\n border: 1px solid\n ${({ theme, isInverted }) =>\n isInverted\n ? color(theme).elementBg.light\n : color(theme).elementBg.dark};\n padding: ${spacings.nudge * 2}px;\n border-radius: ${({ theme }) => global(theme).sections.edgeRadius};\n overflow: hidden;\n\n & > * + * {\n margin-top: ${spacings.nudge * 3}px;\n }\n`;\n\nconst Title = styled(Copy)`\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2; /* number of lines to show */\n line-clamp: 2;\n -webkit-box-orient: vertical;\n\n &:not(:first-child) {\n margin-top: ${spacings.nudge * 3}px;\n }\n`;\n\nconst Description = styled(Copy)`\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 4; /* number of lines to show */\n line-clamp: 4;\n -webkit-box-orient: vertical;\n`;\n\nconst Body = styled.div<{ isInverted?: boolean }>`\n display: flex;\n flex-direction: row;\n /* align-items: flex-start; */\n\n @media ${mq.semilarge} {\n margin-left: -${spacings.spacer}px;\n margin-right: -${spacings.spacer}px;\n\n & > * + * {\n border-left: 1px solid\n ${({ theme, isInverted }) =>\n isInverted\n ? color(theme).elementBg.light\n : color(theme).elementBg.dark};\n }\n }\n`;\n\nconst Col = styled.div`\n flex: 1 0 100%;\n\n & > * + * {\n margin-top: ${spacings.nudge * 3}px;\n }\n\n @media ${mq.semilarge} {\n flex: 1 0 60%;\n padding: 0 ${spacings.spacer}px;\n }\n\n @media ${mq.large} {\n flex: 1 0 ${(2 / 3) * 100}%;\n }\n`;\n\nconst InfoCol = styled(Col)`\n display: none;\n margin-bottom: ${spacings.nudge * 2}px;\n\n @media ${mq.semilarge} {\n display: block;\n flex: 1 0 40%;\n }\n\n @media ${mq.large} {\n display: block;\n flex: 1 0 ${(1 / 3) * 100}%;\n }\n`;\n\nconst Action = styled.div``;\n\nexport type POILocation = {\n address: string;\n street: string;\n postalCode: string;\n city: string;\n coordinates?: { lat: number; long: number };\n mail: string;\n phone: string;\n web: string;\n};\n\nexport type POIContact = {\n name: string;\n position: string;\n street: string;\n postalCode: string;\n city: string;\n mail: string;\n phone: string;\n};\n\nexport interface POICardProps {\n /** Invert text and background for use on dark sections */\n isInverted?: boolean;\n\n /** POI name */\n name: string;\n\n /** Short POI description text (RichText) */\n shortDescription?: string;\n\n /** Array of additional POI informations */\n infos?: Info[];\n\n /** Array of POI facts */\n facts?: string[];\n\n /** Function to inject custom fact node */\n customFact?: (props: {\n key: React.Key;\n name: string;\n isInverted?: boolean;\n }) => React.ReactNode;\n\n /** Function to inject custom action node */\n action?: (isInverted?: boolean) => React.ReactNode;\n}\n\nconst POICard: React.FC<POICardProps> = ({\n isInverted,\n name,\n shortDescription,\n facts,\n infos,\n customFact,\n action,\n}) => {\n const hasFacts = isValidArray(facts, false);\n const hasInfos = isValidArray(infos, false);\n\n return (\n <View isInverted={isInverted}>\n {name && (\n <Title type=\"copy-b\" size=\"big\" isInverted={isInverted}>\n {name}\n </Title>\n )}\n {(hasFacts || shortDescription || hasInfos || action) && (\n <Body isInverted={isInverted}>\n <Col>\n {isValidArray(facts, false) && (\n <POIFacts\n facts={facts}\n isInverted={isInverted}\n customFact={customFact}\n />\n )}\n {shortDescription && (\n <Description\n isInverted={isInverted}\n innerHTML={shortDescription}\n />\n )}\n {action && <Action>{action(isInverted)}</Action>}\n </Col>\n {isValidArray(infos, false) && (\n <InfoCol>\n <InfoList\n isInverted={isInverted}\n items={[\n {\n items: infos,\n },\n ]}\n />\n </InfoCol>\n )}\n </Body>\n )}\n </View>\n );\n};\n\nexport default POICard;\n","import { FC, ReactNode, useEffect, useRef } from 'react';\nimport { createPortal } from 'react-dom';\n\nconst Portal: FC<{\n isVisible?: boolean;\n root?: HTMLElement;\n children?: ReactNode;\n}> = ({ isVisible, root, children }) => {\n const rootRef = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n rootRef.current = root || document.body;\n }, [root]);\n\n return isVisible && rootRef.current\n ? createPortal(children, rootRef.current)\n : null;\n};\nexport default Portal;\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (key === '_owner' && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner.\n // _owner contains circular references\n // and is not needed when comparing the actual elements (and not their owners)\n continue;\n }\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","import * as Icons from 'components/base/icons/Icons';\nimport FilterField from 'components/fields/FilterField';\nimport MultiselectDropdown from 'components/fields/MultiselectDropdown';\nimport Copy, { copyStyle } from 'components/typography/Copy';\nimport { isValidArray } from 'hooks';\nimport React, {\n FC,\n Fragment,\n ReactNode,\n SyntheticEvent,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport styled from 'styled-components';\nimport {\n mq,\n spacings,\n getColors as color,\n getGlobals as global,\n withRange,\n} from 'utils/styles';\nimport Portal from './Portal';\nimport Pointer from 'components/buttons/Pointer';\nimport equal from 'fast-deep-equal/react';\nimport { useLibTheme } from 'utils/LibThemeProvider';\nimport { getFormFieldTextSize } from 'utils/formFieldText';\n\nconst FilterView = styled.div`\n display: inline-block;\n`;\n\nconst TextFilter = styled(FilterField)<{ hasBorders?: boolean }>`\n min-height: 45px;\n height: 45px;\n background: ${({ theme }) => color(theme).elementBg.light};\n border: ${({ hasBorders }) => (!hasBorders ? 'none' : undefined)};\n`;\n\nconst Select = styled(MultiselectDropdown)<{ hasBorders?: boolean }>`\n min-width: 220px;\n min-height: 45px;\n\n button,\n ul {\n border: ${({ hasBorders }) => (!hasBorders ? 'none' : undefined)};\n background: ${({ theme }) => color(theme).elementBg.light};\n }\n`;\n\nconst OverlayToggleView = styled.button<{ isInverted?: boolean }>`\n width: 250px;\n height: 45px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n padding: ${spacings.nudge}px;\n background: ${({ theme }) => color(theme).elementBg.light};\n\n ${copyStyle('copy', 'small')}\n line-height: normal;\n /** Clamping min font size to 16px to prevent browser zooming */\n ${({ theme }) => withRange(getFormFieldTextSize(theme), 'font-size')}\n\n border: none;\n outline: none;\n border-radius: ${({ theme }) => global(theme).sections.edgeRadius};\n cursor: pointer;\n\n transition: all ease-in-out 0.2s;\n\n & > * + * {\n margin-left: ${spacings.nudge}px;\n }\n\n @media ${mq.medium} {\n display: none;\n }\n\n &:focus {\n text-decoration: underline;\n box-shadow: 0px 8px 16px\n ${({ isInverted }) =>\n isInverted\n ? 'rgba(255, 255, 255, 0.25)'\n : 'rgba(0, 0, 0, 0.25)'};\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n box-shadow: none;\n }\n`;\n\nconst Counter = styled(Copy)`\n position: relative;\n background: ${({ theme }) => color(theme).text.default};\n color: ${({ theme }) => color(theme).text.inverted};\n line-height: normal;\n\n max-height: 20px;\n max-width: 20px;\n\n height: 20px;\n width: 20px;\n\n border-radius: 50px;\n\n margin-left: ${spacings.nudge * 2}px;\n\n & > * {\n position: absolute;\n top: 50%;\n left: 50%;\n\n transform: translate(-50%, -50%);\n }\n`;\n\nconst Indicator = styled.span`\n display: flex;\n align-items: center;\n pointer-events: none;\n\n & > * + * {\n margin-left: ${spacings.nudge}px;\n }\n`;\n\nconst Icon = styled.div`\n display: flex;\n align-items: center;\n padding-left: ${spacings.nudge}px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n`;\n\nconst Label = styled.span`\n display: flex;\n align-items: center;\n user-select: none;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n\n & > * + * {\n margin-left: ${spacings.nudge}px;\n }\n`;\n\nconst OverlayToggle: FC<{\n isInverted?: boolean;\n label: string;\n onClick?: (ev: SyntheticEvent<HTMLButtonElement>) => void;\n icon?: (isInverted?: boolean) => ReactNode;\n indicator?: () => ReactNode;\n selected?: number;\n className?: string;\n}> = ({ isInverted, label, selected, onClick, icon, indicator, className }) => {\n const iconElement = icon?.(isInverted);\n const { colors } = useLibTheme();\n\n return (\n <OverlayToggleView\n isInverted={isInverted}\n onClick={onClick}\n className={className}\n >\n <Label>\n {iconElement && <Icon>{iconElement}</Icon>}\n <span>{label}</span>\n </Label>\n\n <Indicator>\n {selected ? (\n <Counter size=\"small\">\n <span>{selected || 0}</span>\n </Counter>\n ) : null}\n {indicator?.()}\n {!indicator && (\n <Icons.AngleDown iconColor={colors.elementBg.dark} />\n )}\n </Indicator>\n </OverlayToggleView>\n );\n};\n\nconst DesktopFilters = styled.div`\n display: none;\n\n @media ${mq.medium} {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n\n & > * {\n width: 220px;\n }\n\n & > * + * {\n margin-left: ${spacings.nudge}px;\n }\n }\n`;\n\nconst MobileBarStage = styled.div`\n position: fixed;\n bottom: 0;\n left: 0;\n top: 0;\n height: 100vh;\n width: 100vw;\n`;\n\nconst MobileBarBackdrop = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n background-color: ${({ theme }) => color(theme).elementBg.light};\n opacity: 0.8;\n z-index: 0;\n`;\n\nconst MobileBarContent = styled.div`\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n max-height: 90vh;\n z-index: 0;\n overflow-y: auto;\n\n padding: ${spacings.nudge * 2}px;\n background-color: ${({ theme }) => color(theme).elementBg.light};\n border-radius: ${({ theme }) => global(theme).sections.edgeRadius};\n`;\n\nconst FilterBarHead = styled(Copy)`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n margin-bottom: ${spacings.nudge * 3}px;\n`;\n\nconst FilterBarCloseBtn = styled.button`\n flex: 0 0 auto;\n\n display: inline-block;\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n\n cursor: pointer;\n`;\n\nconst MobileBarMain = styled.div`\n display: flex;\n flex-direction: column;\n\n & > * {\n width: 100%;\n }\n\n & > * + * {\n margin-top: ${spacings.nudge * 3}px;\n }\n`;\n\nconst MobileBarSubmitPointer = styled(Pointer.View)`\n width: auto;\n margin-right: auto;\n margin-top: ${spacings.nudge * 3}px;\n`;\n\nexport interface FilterBarProps {\n isInverted?: boolean;\n hasBorders?: boolean;\n value?: FilterState;\n onChange?: (filters: FilterState) => void;\n toggleLabel?: string;\n mobileSubmitLabel?: string;\n categoryFilter?: {\n label?: string;\n resetLabel?: string;\n items?: Array<{\n value: string;\n label: string;\n }>;\n };\n textFilter?: {\n placeholder?: string;\n icon?: (isInverted?: boolean) => React.ReactNode;\n submitIcon?: (isInverted?: boolean) => React.ReactNode;\n clearIcon?: (isInverted?: boolean) => React.ReactNode;\n };\n closeIcon?: (isInverted?: boolean) => React.ReactNode;\n filterIcon?: (isInverted?: boolean) => React.ReactNode;\n indicator?: (props: {\n isOpen: boolean;\n isDisabled?: boolean;\n }) => React.ReactNode;\n}\n\nexport interface FilterState {\n textFilter?: string;\n categoryFilter?: string[];\n}\n\nconst FilterBar: FC<FilterBarProps & { className?: string }> = ({\n isInverted,\n hasBorders,\n value,\n onChange,\n mobileSubmitLabel = 'Apply filters',\n toggleLabel,\n categoryFilter,\n textFilter,\n closeIcon,\n filterIcon,\n indicator,\n className,\n}) => {\n const [filters, setFilters] = useState<FilterState>(\n value || {\n textFilter: '',\n categoryFilter: [],\n }\n );\n const lastFilters = useRef<FilterState>(filters);\n\n const [isMobileBarOpen, setIsMobileBarOpen] = useState(false);\n const [mobileTextFilter, setMobileTextFilter] = useState(\n filters.textFilter || ''\n );\n const [mobileCategoryFilter, setMobileCategoryFilter] = useState(\n filters.categoryFilter || []\n );\n\n const handleMobileBarSubmit = () => {\n setIsMobileBarOpen(false);\n setFilters({\n textFilter: mobileTextFilter,\n categoryFilter: mobileCategoryFilter,\n });\n };\n\n const handleMobileBarClose = () => {\n setIsMobileBarOpen(false);\n setMobileCategoryFilter(filters.categoryFilter || []);\n setMobileTextFilter(filters.textFilter || '');\n };\n\n useEffect(() => {\n setMobileCategoryFilter(filters.categoryFilter || []);\n setMobileTextFilter(filters.textFilter || '');\n }, [filters]);\n\n useEffect(() => {\n if (!equal(filters, value)) {\n onChange?.(filters);\n }\n }, [filters, onChange, value]);\n\n useEffect(() => {\n if (value && !equal(value, lastFilters.current)) {\n setFilters(value);\n lastFilters.current = value;\n }\n }, [value]);\n\n const overallSelected =\n (filters?.categoryFilter?.length || 0) + (filters.textFilter ? 1 : 0);\n\n const closeIconElement = closeIcon?.(isInverted) || (\n <Icons.Cross width={32} height={32} />\n );\n\n return (\n <Fragment>\n <FilterView className={className}>\n <OverlayToggle\n label={toggleLabel || ''}\n selected={overallSelected}\n onClick={() => setIsMobileBarOpen((prev) => !prev)}\n icon={filterIcon}\n indicator={\n indicator\n ? () =>\n indicator({\n isOpen: false,\n isDisabled: false,\n })\n : undefined\n }\n />\n <DesktopFilters>\n {categoryFilter &&\n isValidArray(categoryFilter?.items, false) && (\n <Select\n isInverted={isInverted}\n items={categoryFilter.items}\n placeholder={categoryFilter.label}\n icon={filterIcon}\n indicator={indicator}\n resetLabel={categoryFilter.resetLabel}\n onChange={(value) =>\n setFilters((prev) => ({\n ...prev,\n categoryFilter: value,\n }))\n }\n selectedItems={filters.categoryFilter}\n hasBorders={hasBorders}\n />\n )}\n {textFilter && (\n <TextFilter\n isInverted={isInverted}\n icon={textFilter.icon}\n submitIcon={textFilter.submitIcon}\n clearIcon={textFilter.clearIcon}\n placeholder={textFilter.placeholder}\n value={filters.textFilter}\n onSubmit={(value) => {\n setFilters((prev) => ({\n ...prev,\n textFilter: value,\n }));\n }}\n hasBorders={hasBorders}\n />\n )}\n </DesktopFilters>\n </FilterView>\n <Portal isVisible={isMobileBarOpen}>\n <MobileBarStage>\n <MobileBarBackdrop onClick={handleMobileBarClose} />\n <MobileBarContent>\n <FilterBarHead>\n <Copy type=\"copy-b\" size=\"big\">\n {toggleLabel}\n </Copy>\n {closeIconElement && (\n <FilterBarCloseBtn\n onClick={handleMobileBarClose}\n >\n {closeIconElement}\n </FilterBarCloseBtn>\n )}\n </FilterBarHead>\n <MobileBarMain>\n {textFilter && (\n <FilterField\n icon={textFilter.icon}\n submitIcon={textFilter.submitIcon}\n clearIcon={textFilter.clearIcon}\n placeholder={textFilter.placeholder}\n value={mobileTextFilter}\n onSubmit={setMobileTextFilter}\n />\n )}\n {categoryFilter &&\n isValidArray(categoryFilter?.items, false) && (\n <MultiselectDropdown\n inlined\n items={categoryFilter.items}\n placeholder={categoryFilter.label}\n icon={filterIcon}\n indicator={indicator}\n resetLabel={categoryFilter.resetLabel}\n selectedItems={mobileCategoryFilter}\n onChange={setMobileCategoryFilter}\n />\n )}\n {mobileSubmitLabel && (\n <MobileBarSubmitPointer\n onClick={handleMobileBarSubmit}\n >\n <Pointer.Label>\n {mobileSubmitLabel}\n </Pointer.Label>\n <Pointer.Icon>\n <Icons.AngleRight />\n </Pointer.Icon>\n </MobileBarSubmitPointer>\n )}\n </MobileBarMain>\n </MobileBarContent>\n </MobileBarStage>\n </Portal>\n </Fragment>\n );\n};\n\nexport default FilterBar;\n"],"names":["View","styled","div","withConfig","displayName","componentId","templateObject_1","__makeTemplateObject","spacings","nudge","FactsWrapper","templateObject_2","Fact","span","templateObject_3","copyStyle","_a","theme","isInverted","color","text","copyInverted","copy","POIFacts","facts","customFact","React","createElement","map","fact","i","key","concat","name","Check","elementBg","light","dark","global","sections","edgeRadius","Title","Copy","Description","Body","templateObject_4","mq","semilarge","spacer","Col","templateObject_5","large","InfoCol","templateObject_6","Action","templateObject_7","Portal","isVisible","root","children","rootRef","useRef","useEffect","current","document","body","createPortal","react","equal","a","b","constructor","length","keys","Array","isArray","RegExp","source","flags","valueOf","Object","prototype","toString","hasOwnProperty","call","$$typeof","FilterView","TextFilter","FilterField","hasBorders","undefined","Select","MultiselectDropdown","OverlayToggleView","button","withRange","getFormFieldTextSize","medium","Counter","default","inverted","Indicator","Icon","Label","templateObject_8","OverlayToggle","label","selected","onClick","icon","indicator","className","iconElement","colors","useLibTheme","size","Icons","iconColor","DesktopFilters","templateObject_9","MobileBarStage","templateObject_10","MobileBarBackdrop","templateObject_11","MobileBarContent","templateObject_12","FilterBarHead","templateObject_13","FilterBarCloseBtn","templateObject_14","MobileBarMain","MobileBarSubmitPointer","Pointer","templateObject_16","value","onChange","_c","mobileSubmitLabel","toggleLabel","categoryFilter","textFilter","closeIcon","filterIcon","_d","useState","filters","setFilters","lastFilters","_e","isMobileBarOpen","setIsMobileBarOpen","_f","mobileTextFilter","setMobileTextFilter","_g","mobileCategoryFilter","setMobileCategoryFilter","handleMobileBarClose","overallSelected","_b","closeIconElement","width","height","Fragment","prev","isOpen","isDisabled","isValidArray","items","placeholder","resetLabel","__assign","selectedItems","submitIcon","clearIcon","onSubmit","type","inlined","AngleRight","shortDescription","infos","action","hasFacts","hasInfos","innerHTML","InfoList"],"mappings":"mqBAMMA,EAAOC,EAAAA,QAAOC,IAAVC,WAAA,CAAAC,YAAA,iBAAAC,YAAA,eAAGJ,CAAUK,IAAAA,EAAAC,EAAAA,qBAAA,CAAA,mGAAA,0BAAA,yDAAA,gBAAA,CAAA,mGAKU,0BACK,yDAGE,kBAJ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,SAAS7D,KAAK,MAAMjG,WAAYA,GACvCe,IAGPqJ,GAAYH,GAAoBI,GAAYF,IAC1C3J,EAAAA,QAACC,cAAAiB,EAAK,CAAA1B,WAAYA,GACdQ,UAAAC,cAACsB,EAAG,KACCsH,EAAAA,aAAa/I,GAAO,IACjBE,UAACC,cAAAJ,EACG,CAAAC,MAAOA,EACPN,WAAYA,EACZO,WAAYA,IAGnB0J,GACGzJ,UAACC,cAAAgB,EACG,CAAAzB,WAAYA,EACZsK,UAAWL,IAGlBE,GAAU3J,EAAAA,sBAAC4B,EAAM,KAAE+H,EAAOnK,KAE9BqJ,EAAYA,aAACa,GAAO,IACjB1J,EAAAA,sBAAC0B,EAAO,KACJ1B,EAAAA,QAAAC,cAAC8J,WACG,CAAAvK,WAAYA,EACZsJ,MAAO,CACH,CACIA,MAAOY"}
@@ -1,2 +1,2 @@
1
- "use strict";var n=require("./Filter-89286db9.js"),e=require("react"),t=require("styled-components"),i=require("./Copy-a0bc570d.js"),o=require("./styles-13e5d9ac.js"),r=require("./useLazyInput-911b8eda.js");function l(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var a,d,s,u,c=l(e),p=l(t),f=p.default.div.withConfig({displayName:"FilterField__View",componentId:"sc-1reb7yx-0"})(a||(a=n.__makeTemplateObject(["\n display: flex;\n height: 45px;\n border: solid 1px\n ",";\n border-radius: ",";\n\n color: ",";\n\n &:focus-within {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus-within & > input:not(:focus-visible) {\n outline: none;\n }\n"],["\n display: flex;\n height: 45px;\n border: solid 1px\n ",";\n border-radius: ",";\n\n color: ",";\n\n &:focus-within {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus-within & > input:not(:focus-visible) {\n outline: none;\n }\n"])),(function(n){var e=n.theme;return n.isInverted?o.getColors(e).elementBg.light:o.getColors(e).elementBg.dark}),(function(n){var e=n.theme;return o.getGlobals(e).sections.edgeRadius}),(function(n){var e=n.theme;return n.isInverted?o.getFonts(e).copy.medium.colorInverted:o.getFonts(e).copy.medium.color}),(function(n){var e=n.theme,t=n.isInverted;return"1px solid ".concat(t?o.getColors(e).primary.inverted:o.getColors(e).primary.default)})),g=p.default.input.withConfig({displayName:"FilterField__Field",componentId:"sc-1reb7yx-1"})(d||(d=n.__makeTemplateObject(["\n flex: 1 1 auto;\n min-width: 20%;\n\n background-color: transparent;\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n color: inherit;\n ","\n line-height: 1;\n\n padding: ","px ","px;\n\n &:not(:first-child) {\n padding-left: 0px;\n }\n\n &:not(:last-child) {\n padding-right: 0px;\n }\n\n &::placeholder {\n color: ",";\n }\n"],["\n flex: 1 1 auto;\n min-width: 20%;\n\n background-color: transparent;\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n color: inherit;\n ","\n line-height: 1;\n\n padding: ","px ","px;\n\n &:not(:first-child) {\n padding-left: 0px;\n }\n\n &:not(:last-child) {\n padding-right: 0px;\n }\n\n &::placeholder {\n color: ",";\n }\n"])),i.copyStyle("copy","medium"),2*o.spacings.nudge,o.spacings.nudge,(function(n){var e=n.theme;return n.isInverted?o.getColors(e).text.subtileInverted:o.getColors(e).text.subtile})),h=p.default.div.withConfig({displayName:"FilterField__Icon",componentId:"sc-1reb7yx-2"})(s||(s=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-right: ","px;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"],["\n display: flex;\n align-items: center;\n padding-right: ","px;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"])),o.spacings.nudge,2*o.spacings.nudge),m=p.default.button.withConfig({displayName:"FilterField__ClearBtn",componentId:"sc-1reb7yx-3"})(u||(u=n.__makeTemplateObject(["\n flex: 0 0 auto;\n\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n\n padding-right: ","px;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n\n outline: ",";\n outline-offset: -4px;\n outline-style: dashed;\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n\n & > * {\n height: 20px;\n width: 20px;\n }\n"],["\n flex: 0 0 auto;\n\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n\n padding-right: ","px;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n\n outline: ",";\n outline-offset: -4px;\n outline-style: dashed;\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n\n & > * {\n height: 20px;\n width: 20px;\n }\n"])),o.spacings.nudge,2*o.spacings.nudge,(function(n){var e=n.theme,t=n.isInverted;return"2px solid ".concat(t?o.getColors(e).primary.inverted:o.getColors(e).primary.default)}));exports.FilterField=function(t){var i=t.isInverted,o=t.value,l=t.initialValue,a=t.placeholder,d=t.onSubmit,s=t.onBlur,u=t.icon,p=t.submitIcon,x=t.clearIcon,b=t.className,v=r.useLazyInput((function(n){null==d||d(n)}),l||""),y=v.update,w=v.value,I=v.forceUpdate;e.useEffect((function(){void 0!==o&&y(o)}),[y,o]);var C=u?u(i):null,_=p?p(i):c.default.createElement(n.Magnifier,{width:20,height:20}),F=x?x(i):c.default.createElement(n.Cross,{width:20,height:20});return c.default.createElement(f,{isInverted:i,className:b},C&&c.default.createElement(h,null,C),c.default.createElement(g,{type:"text",isInverted:i,value:w,placeholder:a,onChange:function(n){var e,t=null===(e=null==n?void 0:n.currentTarget)||void 0===e?void 0:e.value;void 0!==t&&y(t,""===t)},onBlur:s,onKeyDown:function(n){"Enter"===n.key&&I()}}),""===w&&_&&c.default.createElement(h,null,_),""!==w&&F&&c.default.createElement(m,{isInverted:i,"aria-label":"clear filter",onClick:function(){y("",!0)}},F))};
2
- //# sourceMappingURL=FilterField-7efcacb7.js.map
1
+ "use strict";var n=require("./Filter-89286db9.js"),e=require("react"),t=require("styled-components"),i=require("./Copy-a0bc570d.js"),o=require("./styles-13e5d9ac.js"),r=require("./useLazyInput-911b8eda.js");function a(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var l,d,s,u,c=a(e),p=a(t),f=p.default.div.withConfig({displayName:"FilterField__View",componentId:"sc-1reb7yx-0"})(l||(l=n.__makeTemplateObject(["\n display: flex;\n height: 45px;\n border: solid 1px\n ",";\n border-radius: ",";\n\n color: ",";\n\n &:focus-within {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus-within & > input:not(:focus-visible) {\n outline: none;\n }\n"],["\n display: flex;\n height: 45px;\n border: solid 1px\n ",";\n border-radius: ",";\n\n color: ",";\n\n &:focus-within {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus-within & > input:not(:focus-visible) {\n outline: none;\n }\n"])),(function(n){var e=n.theme;return n.isInverted?o.getColors(e).elementBg.light:o.getColors(e).elementBg.dark}),(function(n){var e=n.theme;return o.getGlobals(e).sections.edgeRadius}),(function(n){var e=n.theme;return n.isInverted?o.getFonts(e).copy.medium.colorInverted:o.getFonts(e).copy.medium.color}),(function(n){var e=n.theme,t=n.isInverted;return"1px solid ".concat(t?o.getColors(e).primary.inverted:o.getColors(e).primary.default)})),g=p.default.input.withConfig({displayName:"FilterField__Field",componentId:"sc-1reb7yx-1"})(d||(d=n.__makeTemplateObject(["\n flex: 1 1 auto;\n min-width: 20%;\n\n background-color: transparent;\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n color: inherit;\n ","\n line-height: 1;\n\n padding: ","px ","px;\n\n &:not(:first-child) {\n padding-left: 0px;\n }\n\n &:not(:last-child) {\n padding-right: 0px;\n }\n\n &::placeholder {\n color: ",";\n }\n"],["\n flex: 1 1 auto;\n min-width: 20%;\n\n background-color: transparent;\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n color: inherit;\n ","\n line-height: 1;\n\n padding: ","px ","px;\n\n &:not(:first-child) {\n padding-left: 0px;\n }\n\n &:not(:last-child) {\n padding-right: 0px;\n }\n\n &::placeholder {\n color: ",";\n }\n"])),i.copyStyle("copy","medium"),2*o.spacings.nudge,o.spacings.nudge,(function(n){var e=n.theme;return n.isInverted?o.getColors(e).text.subtileInverted:o.getColors(e).text.subtile})),h=p.default.div.withConfig({displayName:"FilterField__Icon",componentId:"sc-1reb7yx-2"})(s||(s=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-right: ","px;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"],["\n display: flex;\n align-items: center;\n padding-right: ","px;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"])),o.spacings.nudge,2*o.spacings.nudge),m=p.default.button.withConfig({displayName:"FilterField__ClearBtn",componentId:"sc-1reb7yx-3"})(u||(u=n.__makeTemplateObject(["\n flex: 0 0 auto;\n\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n\n padding-right: ","px;\n padding-left: ","px;\n margin-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n opacity: 0.8;\n }\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n\n outline: ",";\n outline-offset: -4px;\n outline-style: dashed;\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n\n & > * {\n height: 20px;\n width: 20px;\n }\n"],["\n flex: 0 0 auto;\n\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n\n padding-right: ","px;\n padding-left: ","px;\n margin-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n opacity: 0.8;\n }\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n\n outline: ",";\n outline-offset: -4px;\n outline-style: dashed;\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n\n & > * {\n height: 20px;\n width: 20px;\n }\n"])),o.spacings.nudge,o.spacings.nudge,o.spacings.nudge,(function(n){var e=n.theme,t=n.isInverted;return"2px solid ".concat(t?o.getColors(e).primary.inverted:o.getColors(e).primary.default)}));exports.FilterField=function(t){var i=t.isInverted,o=t.value,a=t.initialValue,l=t.placeholder,d=t.onSubmit,s=t.onBlur,u=t.icon,p=t.submitIcon,x=t.clearIcon,v=t.className,b=r.useLazyInput((function(n){null==d||d(n)}),a||""),y=b.update,w=b.value,I=b.forceUpdate;e.useEffect((function(){void 0!==o&&y(o)}),[y,o]);var C=u?u(i):null,_=p?p(i):c.default.createElement(n.Magnifier,{width:20,height:20}),F=x?x(i):c.default.createElement(n.Cross,{width:20,height:20});return c.default.createElement(f,{isInverted:i,className:v},C&&c.default.createElement(h,null,C),c.default.createElement(g,{type:"text",isInverted:i,value:w,placeholder:l,onChange:function(n){var e,t=null===(e=null==n?void 0:n.currentTarget)||void 0===e?void 0:e.value;void 0!==t&&y(t,""===t)},onBlur:s,onKeyDown:function(n){"Enter"===n.key&&I()}}),""===w&&_&&c.default.createElement(h,null,_),""!==w&&F&&c.default.createElement(m,{isInverted:i,"aria-label":"clear filter",onClick:function(){y("",!0)}},F))};
2
+ //# sourceMappingURL=FilterField-0ba59002.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterField-0ba59002.js","sources":["../src/components/fields/FilterField.tsx"],"sourcesContent":["import React, { FC, useEffect } from 'react';\nimport styled from 'styled-components';\n\nimport { copyStyle } from 'components/typography/Copy';\nimport {\n spacings,\n getColors as color,\n getFonts as font,\n getGlobals as global,\n} from 'utils/styles';\nimport Magnifier from 'components/base/icons/Magnifier';\nimport useLazyInput from 'utils/useLazyInput';\nimport Cross from 'components/base/icons/Cross';\n\nconst View = styled.div<{ isInverted?: boolean }>`\n display: flex;\n height: 45px;\n border: solid 1px\n ${({ theme, isInverted }) =>\n isInverted\n ? color(theme).elementBg.light\n : color(theme).elementBg.dark};\n border-radius: ${({ theme }) => global(theme).sections.edgeRadius};\n\n color: ${({ theme, isInverted }) =>\n isInverted\n ? font(theme).copy.medium.colorInverted\n : font(theme).copy.medium.color};\n\n &:focus-within {\n outline: ${({ theme, isInverted }) =>\n `1px solid ${\n isInverted\n ? color(theme).primary.inverted\n : color(theme).primary.default\n }`};\n outline-offset: 0;\n }\n\n &:focus-within & > input:not(:focus-visible) {\n outline: none;\n }\n`;\n\nconst Field = styled.input<{ isInverted?: boolean }>`\n flex: 1 1 auto;\n min-width: 20%;\n\n background-color: transparent;\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n color: inherit;\n ${copyStyle('copy', 'medium')}\n line-height: 1;\n\n padding: ${spacings.nudge * 2}px ${spacings.nudge}px;\n\n &:not(:first-child) {\n padding-left: 0px;\n }\n\n &:not(:last-child) {\n padding-right: 0px;\n }\n\n &::placeholder {\n color: ${({ theme, isInverted }) =>\n isInverted\n ? color(theme).text.subtileInverted\n : color(theme).text.subtile};\n }\n`;\n\nconst Icon = styled.div`\n display: flex;\n align-items: center;\n padding-right: ${spacings.nudge}px;\n padding-left: ${spacings.nudge * 2}px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n`;\n\nconst ClearBtn = styled.button<{ isInverted?: boolean }>`\n flex: 0 0 auto;\n\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n\n padding-right: ${spacings.nudge}px;\n padding-left: ${spacings.nudge}px;\n margin-left: ${spacings.nudge}px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n opacity: 0.8;\n }\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n\n outline: ${({ theme, isInverted }) =>\n `2px solid ${\n isInverted\n ? color(theme).primary.inverted\n : color(theme).primary.default\n }`};\n outline-offset: -4px;\n outline-style: dashed;\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n outline: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n\n & > * {\n height: 20px;\n width: 20px;\n }\n`;\n\nconst FilterField: FC<{\n isInverted?: boolean;\n value?: string;\n initialValue?: string;\n placeholder?: string;\n onSubmit?: (value: string) => void;\n onBlur?: (ev: React.SyntheticEvent<HTMLInputElement>) => void;\n icon?: (isInverted?: boolean) => React.ReactNode;\n submitIcon?: (isInverted?: boolean) => React.ReactNode;\n clearIcon?: (isInverted?: boolean) => React.ReactNode;\n className?: string;\n}> = ({\n isInverted,\n value,\n initialValue,\n placeholder,\n onSubmit,\n onBlur,\n icon,\n submitIcon,\n clearIcon,\n className,\n}) => {\n const {\n update,\n value: getValue,\n forceUpdate,\n } = useLazyInput((value) => {\n onSubmit?.(value);\n }, initialValue || '');\n\n useEffect(() => {\n if (value !== undefined) {\n update(value);\n }\n }, [update, value]);\n\n const iconElement = icon ? icon(isInverted) : null;\n const submitIconElement = submitIcon ? (\n submitIcon(isInverted)\n ) : (\n <Magnifier width={20} height={20} />\n );\n const clearIconElement = clearIcon ? (\n clearIcon(isInverted)\n ) : (\n <Cross width={20} height={20} />\n );\n\n return (\n <View isInverted={isInverted} className={className}>\n {iconElement && <Icon>{iconElement}</Icon>}\n <Field\n type=\"text\"\n isInverted={isInverted}\n value={getValue}\n placeholder={placeholder}\n onChange={(ev) => {\n const newValue = ev?.currentTarget?.value;\n if (newValue !== undefined) {\n update(newValue, newValue === '');\n }\n }}\n onBlur={onBlur}\n onKeyDown={(ev) => {\n if (ev.key === 'Enter') {\n forceUpdate();\n }\n }}\n />\n {getValue === '' && submitIconElement && (\n <Icon>{submitIconElement}</Icon>\n )}\n {getValue !== '' && clearIconElement && (\n <ClearBtn\n isInverted={isInverted}\n aria-label=\"clear filter\"\n onClick={() => {\n update('', true);\n }}\n >\n {clearIconElement}\n </ClearBtn>\n )}\n </View>\n );\n};\n\nexport default FilterField;\n"],"names":["View","styled","div","withConfig","displayName","componentId","_a","theme","isInverted","color","elementBg","light","dark","global","sections","edgeRadius","font","getFonts","copy","medium","colorInverted","primary","inverted","default","Field","input","templateObject_2","__makeTemplateObject","copyStyle","spacings","nudge","text","subtileInverted","subtile","Icon","templateObject_3","ClearBtn","button","templateObject_4","value","initialValue","placeholder","onSubmit","onBlur","icon","submitIcon","clearIcon","className","_b","useLazyInput","update","getValue","forceUpdate","useEffect","undefined","iconElement","submitIconElement","React","createElement","Magnifier","width","height","clearIconElement","Cross","type","onChange","ev","newValue","currentTarget","onKeyDown","key","onClick"],"mappings":"iTAcMA,EAAOC,EAAAA,QAAOC,IAAVC,WAAA,CAAAC,YAAA,oBAAAC,YAAA,gBAAGJ,qUAAoC,2EAOJ,yBACwB,mBAK1B,+CAQ7B,kIAjBJ,SAACK,OAAEC,EAAKD,EAAAC,MACN,OADkBD,EAAAE,WAEZC,EAAAA,UAAMF,GAAOG,UAAUC,MACvBF,EAAAA,UAAMF,GAAOG,UAAUE,QACpB,SAACN,GAAE,IAAAC,EAAKD,EAAAC,MAAO,OAAAM,aAAON,GAAOO,SAASC,cAE9C,SAACT,OAAEC,EAAKD,EAAAC,MACbC,OADyBF,EAAAE,WAEnBQ,EAAIC,SAACV,GAAOW,KAAKC,OAAOC,cACxBJ,EAAAA,SAAKT,GAAOW,KAAKC,OAAOV,SAGnB,SAACH,OAAEC,EAAKD,EAAAC,MAAEC,EAAUF,EAAAE,WAC3B,MAAA,oBACIA,EACMC,EAAAA,UAAMF,GAAOc,QAAQC,SACrBb,EAAAA,UAAMF,GAAOc,QAAQE,YAUrCC,EAAQvB,EAAAA,QAAOwB,MAAVtB,WA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EAIFC,gBAAa,SAACV,GACdG,MAAAA,GAAAA,EAAWH,KACZC,GAAgB,IALfU,EAAMF,EAAAE,OACCC,EAAQH,EAAAT,MACfa,gBAKJC,EAAAA,WAAU,gBACQC,IAAVf,GACAW,EAAOX,KAEZ,CAACW,EAAQX,IAENgB,IAAAA,EAAcX,EAAOA,EAAKpC,GAAc,KACxCgD,EAAoBX,EACtBA,EAAWrC,GAEXiD,EAAC,QAAAC,cAAAC,YAAU,CAAAC,MAAO,GAAIC,OAAQ,KAE5BC,EAAmBhB,EACrBA,EAAUtC,GAEViD,EAAC,QAAAC,cAAAK,QAAM,CAAAH,MAAO,GAAIC,OAAQ,KAG9B,OACIJ,EAAC,QAAAC,cAAA1D,EAAK,CAAAQ,WAAYA,EAAYuC,UAAWA,GACpCQ,GAAeE,UAAAC,cAACxB,EAAI,KAAEqB,GACvBE,EAAAA,QAACC,cAAAlC,GACGwC,KAAK,OACLxD,WAAYA,EACZ+B,MAAOY,EACPV,YAAaA,EACbwB,SAAU,SAACC,SACDC,EAA8B,QAAnB7D,EAAA4D,MAAAA,OAAA,EAAAA,EAAIE,qBAAe,IAAA9D,OAAA,EAAAA,EAAAiC,WACnBe,IAAba,GACAjB,EAAOiB,EAAuB,KAAbA,IAGzBxB,OAAQA,EACR0B,UAAW,SAACH,GACO,UAAXA,EAAGI,KACHlB,OAIE,KAAbD,GAAmBK,GAChBC,EAAA,QAAAC,cAACxB,EAAI,KAAEsB,GAEG,KAAbL,GAAmBW,GAChBL,EAAC,QAAAC,cAAAtB,EACG,CAAA5B,WAAYA,EAAU,aACX,eACX+D,QAAS,WACLrB,EAAO,IAAI,KAGdY"}
@@ -0,0 +1,2 @@
1
+ "use strict";var n=require("./Filter-89286db9.js"),e=require("react"),t=require("styled-components"),r=require("./Copy-a0bc570d.js"),o=require("./LibThemeProvider-69109901.js"),i=require("./styles-13e5d9ac.js"),l=require("./formFieldText-046fcbf4.js"),a=require("./useMounted-0bba9869.js"),s=require("./Checkbox-8dccd42f.js");function d(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var u,c,p,f,m,g,h,b,x,v,w,y=d(e),k=d(t),_=k.default.button.withConfig({displayName:"MultiselectDropdown__Select",componentId:"sc-rrwdl0-0"})(c||(c=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n min-height: 45px;\n box-shadow: none;\n position: relative;\n\n -webkit-appearance: none;\n outline: none;\n cursor: ",";\n\n padding: ","px;\n\n border: 1px solid\n ",";\n border-radius: ",";\n\n background: transparent;\n transition: background-color 0.2s ease-in-out;\n\n ","\n /** Clamping min font size to 16px to prevent browser zooming */\n ","\n \n color: ",";\n line-height: normal;\n\n @media (hover: hover) and (pointer: fine) {\n ","\n }\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n & > * + * {\n margin-left: ","px;\n }\n"],["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n min-height: 45px;\n box-shadow: none;\n position: relative;\n\n -webkit-appearance: none;\n outline: none;\n cursor: ",";\n\n padding: ","px;\n\n border: 1px solid\n ",";\n border-radius: ",";\n\n background: transparent;\n transition: background-color 0.2s ease-in-out;\n\n ","\n /** Clamping min font size to 16px to prevent browser zooming */\n ","\n \n color: ",";\n line-height: normal;\n\n @media (hover: hover) and (pointer: fine) {\n ","\n }\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n & > * + * {\n margin-left: ","px;\n }\n"])),(function(n){return n.inlined?"default":"pointer"}),i.spacings.nudge,(function(n){var e=n.theme,t=n.isInverted,r=n.hasError;return t?r?i.getColors(e).errorInverted:i.getColors(e).elementBg.light:r?i.getColors(e).error:i.getColors(e).elementBg.dark}),(function(n){var e=n.theme;return i.getGlobals(e).sections.edgeRadius}),r.copyStyle("copy","small"),(function(n){var e=n.theme;return i.withRange(l.getFormFieldTextSize(e),"font-size")}),(function(n){var e=n.theme,t=n.isInverted,r=n.hasError;return t?r?i.getColors(e).text.errorInverted:i.getFonts(e).copy.small.colorInverted:r?i.getColors(e).text.error:i.getFonts(e).copy.small.color}),(function(e){var r=e.isInverted,o=e.theme,l=e.isOpen;return t.css(u||(u=n.__makeTemplateObject(["\n &:hover {\n outline: ",";\n outline-offset: 0;\n }\n "],["\n &:hover {\n outline: ",";\n outline-offset: 0;\n }\n "])),"1px solid ".concat(l?"transparent":r?i.getColors(o).primary.inverted:i.getColors(o).primary.default))}),(function(n){var e=n.theme,t=n.isInverted,r=n.isOpen;return"1px solid ".concat(r?"transparent":t?i.getColors(e).primary.inverted:i.getColors(e).primary.default)}),i.spacings.nudge),C=k.default(r.Copy).withConfig({displayName:"MultiselectDropdown__SelectMain",componentId:"sc-rrwdl0-1"})(p||(p=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n user-select: none;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n\n & > * + * {\n margin-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n user-select: none;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n\n & > * + * {\n margin-left: ","px;\n }\n"])),i.spacings.nudge),I=k.default.span.withConfig({displayName:"MultiselectDropdown__Indicator",componentId:"sc-rrwdl0-2"})(f||(f=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n pointer-events: none;\n\n & > * + * {\n margin-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n pointer-events: none;\n\n & > * + * {\n margin-left: ","px;\n }\n"])),i.spacings.nudge),E=k.default.ul.withConfig({displayName:"MultiselectDropdown__Flyout",componentId:"sc-rrwdl0-3"})(m||(m=n.__makeTemplateObject(["\n list-style: none;\n padding: ","px ","px;\n margin: 0;\n margin-top: ",";\n\n position: ",";\n top: calc(100% + 3px);\n left: 0;\n width: 100%;\n z-index: 2;\n\n display: ",";\n background: ",";\n border: 1px solid\n ",";\n border-radius: ",";\n\n max-height: 300px;\n overflow-y: auto;\n scrollbar-width: none;\n\n outline: none;\n\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 14px;\n }\n\n ::-webkit-scrollbar-thumb {\n border-radius: 8px;\n background-color: ",";\n border: 4px solid rgba(0, 0, 0, 0);\n background-clip: padding-box;\n }\n"],["\n list-style: none;\n padding: ","px ","px;\n margin: 0;\n margin-top: ",";\n\n position: ",";\n top: calc(100% + 3px);\n left: 0;\n width: 100%;\n z-index: 2;\n\n display: ",";\n background: ",";\n border: 1px solid\n ",";\n border-radius: ",";\n\n max-height: 300px;\n overflow-y: auto;\n scrollbar-width: none;\n\n outline: none;\n\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 14px;\n }\n\n ::-webkit-scrollbar-thumb {\n border-radius: 8px;\n background-color: ",";\n border: 4px solid rgba(0, 0, 0, 0);\n background-clip: padding-box;\n }\n"])),i.spacings.nudge,2*i.spacings.nudge,(function(n){return n.inlined&&"3px"}),(function(n){return n.inlined?"relative":"absolute"}),(function(n){return n.isVisible?"block":"none"}),(function(n){var e=n.theme;return i.getColors(e).elementBg.light}),(function(n){var e=n.theme;return n.isInverted?i.getColors(e).elementBg.light:i.getColors(e).elementBg.dark}),(function(n){var e=n.theme;return i.getGlobals(e).sections.edgeRadius}),(function(n){var e=n.theme;return i.getColors(e).elementBg.medium})),M=k.default.li.withConfig({displayName:"MultiselectDropdown__ItemStyle",componentId:"sc-rrwdl0-4"})(g||(g=n.__makeTemplateObject(["\n width: 100%;\n cursor: pointer;\n position: relative;\n\n padding: 5px 0px;\n"],["\n width: 100%;\n cursor: pointer;\n position: relative;\n\n padding: 5px 0px;\n"]))),j=k.default(s.Checkbox).withConfig({displayName:"MultiselectDropdown__ItemCheckbox",componentId:"sc-rrwdl0-5"})(h||(h=n.__makeTemplateObject(["\n width: 100%;\n"],["\n width: 100%;\n"]))),D=k.default.div.withConfig({displayName:"MultiselectDropdown__Container",componentId:"sc-rrwdl0-6"})(b||(b=n.__makeTemplateObject(["\n position: relative;\n outline: none;\n"],["\n position: relative;\n outline: none;\n"]))),T=k.default(r.Copy).withConfig({displayName:"MultiselectDropdown__Counter",componentId:"sc-rrwdl0-7"})(x||(x=n.__makeTemplateObject(["\n flex: 0 0 20px;\n\n position: relative;\n background: ",";\n\n line-height: normal;\n color: ",";\n\n max-height: 20px;\n max-width: 20px;\n\n height: 20px;\n width: 20px;\n\n border-radius: 50px;\n\n & > * {\n position: absolute;\n top: 50%;\n left: 50%;\n\n transform: translate(-50%, -50%);\n }\n"],["\n flex: 0 0 20px;\n\n position: relative;\n background: ",";\n\n line-height: normal;\n color: ",";\n\n max-height: 20px;\n max-width: 20px;\n\n height: 20px;\n width: 20px;\n\n border-radius: 50px;\n\n & > * {\n position: absolute;\n top: 50%;\n left: 50%;\n\n transform: translate(-50%, -50%);\n }\n"])),(function(n){var e=n.theme;return i.getColors(e).text.default}),(function(n){var e=n.theme;return i.getColors(e).text.inverted})),O=k.default.button.withConfig({displayName:"MultiselectDropdown__Reset",componentId:"sc-rrwdl0-8"})(v||(v=n.__makeTemplateObject(["\n background: none;\n border: none;\n padding: 0;\n\n ",";\n margin-top: ","px;\n\n cursor: pointer;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n outline: 1px dashed ",";\n outline-offset: 1px;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n"],["\n background: none;\n border: none;\n padding: 0;\n\n ",";\n margin-top: ","px;\n\n cursor: pointer;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n outline: 1px dashed ",";\n outline-offset: 1px;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n"])),r.copyStyle("copy","small"),2*i.spacings.nudge,(function(n){var e=n.theme;return i.getFonts(e).link.color})),B=k.default.div.withConfig({displayName:"MultiselectDropdown__Icon",componentId:"sc-rrwdl0-9"})(w||(w=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"],["\n display: flex;\n align-items: center;\n padding-left: ","px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n"])),i.spacings.nudge),F=y.default.memo((function(t){var r=t.label,i=t.isRequired,s=t.errorMessage,d=t.infoMessage,u=t.isDisabled,c=t.isInverted,p=t.items,f=t.name,m=t.selectedItems,g=t.placeholder,h=t.resetLabel,b=t.inlined,x=t.icon,v=t.onChange,w=t.onBlur,k=t.indicator,F=t.className,N=o.useLibTheme().colors,q=e.useState(b||!1),z=q[0],R=q[1],S=e.useState(m||[]),L=S[0],A=S[1],V=e.useRef(null),W=e.useRef(null),G=a.useMounted(),H=e.useRef(!1);e.useEffect((function(){m&&A(m)}),[m]),e.useEffect((function(){G&&(null==v||v(L))}),[L]),u&&(s="");var P=null==x?void 0:x(c);return y.default.createElement(l.FieldWrapper.View,{isDisabled:u,className:F},y.default.createElement(l.FieldWrapper.Head,{label:r,isRequired:i,isInverted:c}),y.default.createElement(l.FieldWrapper.Content,null,y.default.createElement(D,{ref:W,onBlur:function(n){var e;b||(null===(e=W.current)||void 0===e?void 0:e.contains(n.relatedTarget))||H.current||(R(!1),null==w||w())}},y.default.createElement(_,{ref:V,type:"button",isOpen:z,inlined:b,isInverted:c,hasError:!!s,onClick:function(){b||R((function(n){return!n}))},"aria-expanded":z},y.default.createElement(C,null,P&&y.default.createElement(B,null,P),y.default.createElement("span",null,g)),y.default.createElement(I,null,L.length>0&&y.default.createElement(T,{size:"small"},y.default.createElement("span",null,L.length)),k&&k({isOpen:z,isDisabled:u}),!k&&(z?y.default.createElement(n.AngleUp,{iconColor:u?N.elementBg.medium:N.elementBg.dark}):y.default.createElement(n.AngleDown,{iconColor:u?N.elementBg.medium:N.elementBg.dark})))),y.default.createElement(E,{isVisible:z,inlined:b},p.map((function(e,t){var r=L.includes(e.value);return y.default.createElement(M,{key:"key_".concat(t+1),onMouseDown:function(){H.current=!0}},y.default.createElement(j,{isSelected:r,value:e.value,onChange:function(){var t;t=e.value,L.includes(t)?A((function(n){return n.filter((function(n){return n!==t}))})):A((function(e){return n.__spreadArray(n.__spreadArray([],e,!0),[t],!1)})),H.current=!1},label:e.label}))})),h&&y.default.createElement(O,{onClick:function(){return A([])}},h))),y.default.createElement("select",{name:f,multiple:!0,hidden:!0,defaultValue:L},p.map((function(n,e){return y.default.createElement("option",{key:"key_".concat(e),value:n.value},n.label)})))),y.default.createElement(l.FieldWrapper.Messages,{infoMessage:d,errorMessage:s,isInverted:c}))}),(function(n,e){if(!n.enableMemo)return!1;if(n.selectedItems!==e.selectedItems)return!1;if(n.errorMessage!==e.errorMessage)return!1;if(n.infoMessage!==e.infoMessage)return!1;if(n.label!==e.label)return!1;if(n.placeholder!==e.placeholder)return!1;if(n.resetLabel!==e.resetLabel)return!1;if(n.isInverted!==e.isInverted)return!1;if(n.isDisabled!==e.isDisabled)return!1;if(n.inlined!==e.inlined)return!1;if(n.items.length!==e.items.length)return!1;for(var t=0;t<n.items.length;t++)if(n.items[t].label!==e.items[t].label||n.items[t].value!==e.items[t].value)return!1;return!0}));exports.MultiselectDropdown=F;
2
+ //# sourceMappingURL=MultiselectDropdown-07d543dc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiselectDropdown-07d543dc.js","sources":["../src/components/fields/MultiselectDropdown.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport AngleDown from 'components/base/icons/AngleDown';\nimport AngleUp from 'components/base/icons/AngleUp';\nimport Copy, { copyStyle } from 'components/typography/Copy';\nimport { useLibTheme } from 'utils/LibThemeProvider';\nimport {\n getColors as color,\n getFonts as font,\n spacings,\n getGlobals as global,\n withRange,\n} from 'utils/styles';\nimport FieldWrapper from './FormField';\nimport { FormProps } from './Textfield';\nimport { getFormFieldTextSize } from 'utils/formFieldText';\nimport useMounted from 'utils/useMounted';\nimport Checkbox from './Checkbox';\n\nconst Select = styled.button<{\n hasError?: boolean;\n isOpen?: boolean;\n isInverted?: boolean;\n inlined?: boolean;\n}>`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n min-height: 45px;\n box-shadow: none;\n position: relative;\n\n -webkit-appearance: none;\n outline: none;\n cursor: ${({ inlined }) => (inlined ? 'default' : 'pointer')};\n\n padding: ${spacings.nudge}px;\n\n border: 1px solid\n ${({ theme, isInverted, hasError }) => {\n if (isInverted) {\n return hasError\n ? color(theme).errorInverted\n : color(theme).elementBg.light;\n }\n return hasError ? color(theme).error : color(theme).elementBg.dark;\n }};\n border-radius: ${({ theme }) => global(theme).sections.edgeRadius};\n\n background: transparent;\n transition: background-color 0.2s ease-in-out;\n\n ${copyStyle('copy', 'small')}\n /** Clamping min font size to 16px to prevent browser zooming */\n ${({ theme }) => withRange(getFormFieldTextSize(theme), 'font-size')}\n \n color: ${({ theme, isInverted, hasError }) => {\n if (isInverted) {\n return hasError\n ? color(theme).text.errorInverted\n : font(theme).copy.small.colorInverted;\n }\n return hasError\n ? color(theme).text.error\n : font(theme).copy.small.color;\n }};\n line-height: normal;\n\n @media (hover: hover) and (pointer: fine) {\n ${({ isInverted, theme, isOpen }) =>\n css`\n &:hover {\n outline: ${`1px solid ${\n isOpen\n ? 'transparent'\n : isInverted\n ? color(theme).primary.inverted\n : color(theme).primary.default\n }`};\n outline-offset: 0;\n }\n `}\n }\n\n &:focus {\n outline: ${({ theme, isInverted, isOpen }) =>\n `1px solid ${\n isOpen\n ? 'transparent'\n : isInverted\n ? color(theme).primary.inverted\n : color(theme).primary.default\n }`};\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n & > * + * {\n margin-left: ${spacings.nudge}px;\n }\n`;\n\nconst SelectMain = styled(Copy)`\n display: flex;\n align-items: center;\n user-select: none;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n\n & > * + * {\n margin-left: ${spacings.nudge}px;\n }\n`;\n\nconst Indicator = styled.span`\n display: flex;\n align-items: center;\n pointer-events: none;\n\n & > * + * {\n margin-left: ${spacings.nudge}px;\n }\n`;\n\nconst Flyout = styled.ul<{\n isVisible?: boolean;\n isInverted?: boolean;\n inlined?: boolean;\n}>`\n list-style: none;\n padding: ${spacings.nudge}px ${spacings.nudge * 2}px;\n margin: 0;\n margin-top: ${({ inlined }) => inlined && '3px'};\n\n position: ${({ inlined }) => (inlined ? 'relative' : 'absolute')};\n top: calc(100% + 3px);\n left: 0;\n width: 100%;\n z-index: 2;\n\n display: ${({ isVisible }) => (isVisible ? 'block' : 'none')};\n background: ${({ theme }) => color(theme).elementBg.light};\n border: 1px solid\n ${({ theme, isInverted }) =>\n isInverted\n ? color(theme).elementBg.light\n : color(theme).elementBg.dark};\n border-radius: ${({ theme }) => global(theme).sections.edgeRadius};\n\n max-height: 300px;\n overflow-y: auto;\n scrollbar-width: none;\n\n outline: none;\n\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 14px;\n }\n\n ::-webkit-scrollbar-thumb {\n border-radius: 8px;\n background-color: ${({ theme }) => color(theme).elementBg.medium};\n border: 4px solid rgba(0, 0, 0, 0);\n background-clip: padding-box;\n }\n`;\n\nconst ItemStyle = styled.li`\n width: 100%;\n cursor: pointer;\n position: relative;\n\n padding: 5px 0px;\n`;\n\nconst ItemCheckbox = styled(Checkbox)`\n width: 100%;\n`;\n\nconst Container = styled.div`\n position: relative;\n outline: none;\n`;\n\nconst Counter = styled(Copy)`\n flex: 0 0 20px;\n\n position: relative;\n background: ${({ theme }) => color(theme).text.default};\n\n line-height: normal;\n color: ${({ theme }) => color(theme).text.inverted};\n\n max-height: 20px;\n max-width: 20px;\n\n height: 20px;\n width: 20px;\n\n border-radius: 50px;\n\n & > * {\n position: absolute;\n top: 50%;\n left: 50%;\n\n transform: translate(-50%, -50%);\n }\n`;\n\nconst Reset = styled.button`\n background: none;\n border: none;\n padding: 0;\n\n ${copyStyle('copy', 'small')};\n margin-top: ${spacings.nudge * 2}px;\n\n cursor: pointer;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n outline: 1px dashed ${({ theme }) => font(theme).link.color};\n outline-offset: 1px;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n`;\nconst Icon = styled.div`\n display: flex;\n align-items: center;\n padding-left: ${spacings.nudge}px;\n color: inherit;\n\n transition: transform 0.2s ease-in-out;\n`;\n\ninterface FilterItem {\n value: string;\n label: string;\n}\n\nexport type MultiselectDropdownProps = Omit<FormProps, 'value'> & {\n enableMemo?: boolean;\n inlined?: boolean;\n placeholder?: string;\n name?: string;\n selectedItems?: string[];\n items: FilterItem[];\n resetLabel?: string;\n\n onChange?: (values: string[]) => void;\n onBlur?: () => void;\n icon?: (isInverted?: boolean) => React.ReactNode;\n indicator?: (props: {\n isOpen: boolean;\n isDisabled?: boolean;\n }) => React.ReactNode;\n};\n\nconst MultiselectDropdown: React.FC<\n MultiselectDropdownProps & { className?: string }\n> = ({\n label,\n isRequired,\n errorMessage,\n infoMessage,\n isDisabled,\n isInverted,\n items,\n name,\n selectedItems,\n placeholder,\n resetLabel,\n inlined,\n icon,\n onChange,\n onBlur,\n indicator,\n className,\n}) => {\n const { colors } = useLibTheme();\n const [isOpen, setIsOpen] = useState(inlined || false);\n const [selected, setSelected] = useState<string[]>(selectedItems || []);\n\n const selectBtnRef = useRef<HTMLButtonElement>(null);\n const selectContainerRef = useRef<HTMLDivElement>(null);\n const isMounted = useMounted();\n const itemHasBeenClicked = useRef<boolean>(false);\n\n useEffect(() => {\n if (selectedItems) {\n setSelected(selectedItems);\n }\n }, [selectedItems]);\n\n useEffect(() => {\n if (isMounted) {\n onChange?.(selected);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selected]);\n\n if (isDisabled) {\n errorMessage = '';\n }\n\n const toggleSelected = (value: string) => {\n if (selected.includes(value)) {\n setSelected((prev) => prev.filter((v) => v !== value));\n return;\n }\n\n setSelected((prev) => [...prev, value]);\n };\n\n const iconElement = icon?.(isInverted);\n\n return (\n <FieldWrapper.View isDisabled={isDisabled} className={className}>\n <FieldWrapper.Head\n label={label}\n isRequired={isRequired}\n isInverted={isInverted}\n />\n <FieldWrapper.Content>\n <Container\n ref={selectContainerRef}\n onBlur={(ev) => {\n if (\n !inlined &&\n !selectContainerRef.current?.contains(\n ev.relatedTarget\n ) &&\n !itemHasBeenClicked.current\n ) {\n setIsOpen(false);\n onBlur?.();\n }\n }}\n >\n <Select\n ref={selectBtnRef}\n type=\"button\"\n isOpen={isOpen}\n inlined={inlined}\n isInverted={isInverted}\n hasError={!!errorMessage}\n onClick={() => {\n if (inlined) return;\n setIsOpen((prev) => !prev);\n }}\n aria-expanded={isOpen}\n >\n <SelectMain>\n {iconElement && <Icon>{iconElement}</Icon>}\n <span>{placeholder}</span>\n </SelectMain>\n <Indicator>\n {selected.length > 0 && (\n <Counter size=\"small\">\n <span>{selected.length}</span>\n </Counter>\n )}\n {indicator &&\n indicator({ isOpen, isDisabled: isDisabled })}\n {!indicator &&\n (isOpen ? (\n <AngleUp\n iconColor={\n isDisabled\n ? colors.elementBg.medium\n : colors.elementBg.dark\n }\n />\n ) : (\n <AngleDown\n iconColor={\n isDisabled\n ? colors.elementBg.medium\n : colors.elementBg.dark\n }\n />\n ))}\n </Indicator>\n </Select>\n <Flyout isVisible={isOpen} inlined={inlined}>\n {items.map((item, i) => {\n const isSelected = selected.includes(item.value);\n\n return (\n <ItemStyle\n key={`key_${i + 1}`}\n onMouseDown={() => {\n itemHasBeenClicked.current = true;\n }}\n >\n <ItemCheckbox\n isSelected={isSelected}\n value={item.value}\n onChange={() => {\n toggleSelected(item.value);\n itemHasBeenClicked.current = false;\n }}\n label={item.label}\n />\n </ItemStyle>\n );\n })}\n {resetLabel && (\n <Reset onClick={() => setSelected([])}>\n {resetLabel}\n </Reset>\n )}\n </Flyout>\n </Container>\n <select name={name} multiple hidden defaultValue={selected}>\n {items.map((item, i) => {\n return (\n <option key={`key_${i}`} value={item.value}>\n {item.label}\n </option>\n );\n })}\n </select>\n </FieldWrapper.Content>\n <FieldWrapper.Messages\n infoMessage={infoMessage}\n errorMessage={errorMessage}\n isInverted={isInverted}\n />\n </FieldWrapper.View>\n );\n};\n\n/**\n * Function to compare both field prop states\n * @param prev Previous props\n * @param next Next props\n * @returns\n */\nconst areEqual = (\n prev: MultiselectDropdownProps,\n next: MultiselectDropdownProps\n) => {\n // only apply logic if memo functionality is enabled\n if (!prev.enableMemo) return false;\n\n if (prev.selectedItems !== next.selectedItems) return false;\n if (prev.errorMessage !== next.errorMessage) return false;\n if (prev.infoMessage !== next.infoMessage) return false;\n if (prev.label !== next.label) return false;\n if (prev.placeholder !== next.placeholder) return false;\n if (prev.resetLabel !== next.resetLabel) return false;\n if (prev.isInverted !== next.isInverted) return false;\n if (prev.isDisabled !== next.isDisabled) return false;\n if (prev.inlined !== next.inlined) return false;\n\n // compare items\n if (prev.items.length !== next.items.length) return false;\n for (let i = 0; i < prev.items.length; i++) {\n if (\n prev.items[i].label !== next.items[i].label ||\n prev.items[i].value !== next.items[i].value\n ) {\n return false;\n }\n }\n\n return true;\n};\n\nexport default React.memo(MultiselectDropdown, areEqual);\n"],"names":["Select","styled","button","withConfig","displayName","componentId","templateObject_2","__makeTemplateObject","_a","inlined","spacings","nudge","theme","isInverted","hasError","color","errorInverted","elementBg","light","error","dark","global","sections","edgeRadius","copyStyle","withRange","getFormFieldTextSize","text","font","getFonts","copy","small","colorInverted","isOpen","css","templateObject_1","primary","inverted","default","getColors","SelectMain","Copy","templateObject_3","Indicator","span","templateObject_4","Flyout","ul","isVisible","medium","ItemStyle","li","templateObject_6","ItemCheckbox","Checkbox","templateObject_7","Container","div","templateObject_8","Counter","templateObject_9","Reset","templateObject_10","link","Icon","templateObject_11","React","memo","label","isRequired","errorMessage","infoMessage","isDisabled","items","name","selectedItems","placeholder","resetLabel","icon","onChange","onBlur","indicator","className","colors","useLibTheme","_b","useState","setIsOpen","_c","selected","setSelected","selectBtnRef","useRef","selectContainerRef","isMounted","useMounted","itemHasBeenClicked","useEffect","iconElement","createElement","FieldWrapper","View","Head","Content","ref","ev","current","contains","relatedTarget","type","onClick","prev","length","size","AngleUp","iconColor","AngleDown","map","item","i","isSelected","includes","value","key","concat","onMouseDown","filter","v","__spreadArray","multiple","hidden","defaultValue","Messages","next","enableMemo"],"mappings":"sbAoBMA,EAASC,EAAAA,QAAOC,OAAVC,WAAA,CAAAC,YAAA,8BAAAC,YAAA,eAAGJ,CAAaK,IAAAA,EAAAC,EAAAA,qBAAA,CAAA,4QAAA,qBAAA,yCAAA,yBAAA,gGAAA,+EAAA,sBAAA,2FAAA,8CAAA,qJAAA,gBAAA,CAK1B,4QAY8D,qBAEnC,yCAUpB,yBAC4D,gGAKrC,+EAEwC,sBAWnE,2FAgBQ,8CAWC,qJASuB,mBAnEvB,SAACC,GAAgB,OAAPA,EAAAC,QAAkB,UAAY,YAEvCC,EAAQA,SAACC,OAGd,SAACH,GAAE,IAAAI,UAAOC,EAAUL,EAAAK,WAAEC,EAAQN,EAAAM,SAC5B,OAAID,EACOC,EACDC,YAAMH,GAAOI,cACbD,EAAAA,UAAMH,GAAOK,UAAUC,MAE1BJ,EAAWC,YAAMH,GAAOO,MAAQJ,EAAAA,UAAMH,GAAOK,UAAUG,QAErD,SAACZ,GAAE,IAAAI,EAAKJ,EAAAI,MAAO,OAAAS,aAAOT,GAAOU,SAASC,aAKrDC,EAASA,UAAC,OAAQ,UAElB,SAAChB,GAAE,IAAAI,EAAKJ,EAAAI,MAAOa,OAAAA,EAASA,UAACC,EAAoBA,qBAACd,GAAQ,gBAE/C,SAACJ,GAAE,IAAAI,UAAOC,EAAUL,EAAAK,WAAEC,EAAQN,EAAAM,SACnC,OAAID,EACOC,EACDC,EAAAA,UAAMH,GAAOe,KAAKX,cAClBY,EAAIC,SAACjB,GAAOkB,KAAKC,MAAMC,cAE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a,OAAO,EAC9CmC,GAAAA,EAAKlC,aAAewD,EAAKxD,WAAY,OAAO,EAC5CkC,GAAAA,EAAKlG,aAAewH,EAAKxH,WAAY,OAAO,EAC5CkG,GAAAA,EAAKvC,aAAe6D,EAAK7D,WAAY,OAAO,EAC5CuC,GAAAA,EAAKtG,UAAY4H,EAAK5H,QAAS,OAAO,EAG1C,GAAIsG,EAAKtC,MAAMuC,SAAWqB,EAAK5D,MAAMuC,OAAQ,OAAO,EACpD,IAAK,IAAIO,EAAI,EAAGA,EAAIR,EAAKtC,MAAMuC,OAAQO,IACnC,GACIR,EAAKtC,MAAM8C,GAAGnD,QAAUiE,EAAK5D,MAAM8C,GAAGnD,OACtC2C,EAAKtC,MAAM8C,GAAGG,QAAUW,EAAK5D,MAAM8C,GAAGG,MAEtC,OAAO,EAIf,OAAO"}
@@ -0,0 +1,2 @@
1
+ "use strict";var n=require("./Filter-89286db9.js"),e=require("react"),t=require("styled-components"),o=require("./styles-13e5d9ac.js");function i(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}function r(n){if(n&&n.__esModule)return n;var e=Object.create(null);return n&&Object.keys(n).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:function(){return n[t]}})}})),e.default=n,Object.freeze(e)}var a=r(e),l=i(t),c=l.default.a.withConfig({displayName:"Pointer__View",componentId:"sc-1jne5k6-0"})(d||(d=n.__makeTemplateObject(["\n padding: 0.2em 0;\n\n display: inline-block;\n display: inline-flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n vertical-align: middle;\n\n font-family: ",";\n ","\n font-weight: ",";\n text-align: center;\n text-decoration: ",";\n line-height: 1;\n letter-spacing: ",";\n\n perspective: 1000;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-perspective: 1000;\n -moz-osx-font-smoothing: grayscale;\n will-change: auto;\n\n outline-color: ",";\n border: none;\n cursor: pointer;\n\n pointer-events: ",";\n\n background: none;\n color: ",";\n\n & > * {\n color: ",";\n }\n\n & > * + * {\n margin-left: ","px;\n }\n\n /* & > :not(:last-child) {\n padding-right: ","px;\n } */\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n opacity: 0.6;\n }\n }\n\n &:focus {\n outline: 2px solid ",";\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &:active {\n opacity: 0.6;\n }\n"],["\n padding: 0.2em 0;\n\n display: inline-block;\n display: inline-flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n vertical-align: middle;\n\n font-family: ",";\n ","\n font-weight: ",";\n text-align: center;\n text-decoration: ",";\n line-height: 1;\n letter-spacing: ",";\n\n perspective: 1000;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-perspective: 1000;\n -moz-osx-font-smoothing: grayscale;\n will-change: auto;\n\n outline-color: ",";\n border: none;\n cursor: pointer;\n\n pointer-events: ",";\n\n background: none;\n color: ",";\n\n & > * {\n color: ",";\n }\n\n & > * + * {\n margin-left: ","px;\n }\n\n /* & > :not(:last-child) {\n padding-right: ","px;\n } */\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n opacity: 0.6;\n }\n }\n\n &:focus {\n outline: 2px solid ",";\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &:active {\n opacity: 0.6;\n }\n"])),(function(n){var e=n.theme;return o.getFonts(e).copy.medium.family}),(function(n){var e=n.theme;return o.withRange(o.getFonts(e).copy.medium.size,"font-size")}),(function(n){var e=n.theme;return o.getFonts(e).copy.medium.weight}),(function(n){var e=n.textDecoration;return e||"underline"}),(function(n){var e=n.theme;return o.getFonts(e).copy.medium.letterSpacing}),(function(n){var e=n.theme;return n.inverted?o.getColors(e).primary.inverted:o.getColors(e).primary.default}),(function(n){return n.disable?"none":"all"}),(function(n){var e=n.theme,t=n.inverted;return n.disable?o.getColors(e).elementBg.medium:t?o.getColors(e).text.copyInverted:o.getColors(e).text.copy}),(function(n){var e=n.theme,t=n.inverted;return n.disable?o.getColors(e).elementBg.medium:t?o.getColors(e).text.copyInverted:o.getColors(e).text.copy}),o.spacings.nudge,o.spacings.nudge,(function(n){var e=n.theme;return o.getColors(e).primary.default})),s=a.forwardRef((function(e,t){var o=e.as,i=e.isInverted,r=e.isDisabled,l=e.onClick,s=e.className,d=e.textDecoration,u=e.children,f=n.__rest(e,["as","isInverted","isDisabled","onClick","className","textDecoration","children"]);return"button"===o?a.createElement(c,n.__assign({textDecoration:d,ref:t,as:o,inverted:i,disable:r,onClick:l,className:s},f),u):a.createElement(c,n.__assign({textDecoration:d,ref:t,as:o,href:f.href,"data-disabled":r,"data-inverted":i,target:f.isExternal?"_blank":void 0,rel:f.isExternal?"noopener noreferrer":void 0,inverted:i,disable:r,onClick:l,className:s},f),u)}));s.displayName="Button";var d,u,f,p=l.default.div.withConfig({displayName:"Pointer__Icon",componentId:"sc-1jne5k6-1"})(u||(u=n.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n\n color: ",";\n\n transition: transform 0.2s ease-in-out;\n\n ","[data-inverted='true'] > & {\n color: ",";\n }\n\n ","[data-disabled='true'] > & {\n color: ",";\n }\n\n ",":hover > & {\n transform: translateX(3px);\n }\n"],["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n\n color: ",";\n\n transition: transform 0.2s ease-in-out;\n\n ","[data-inverted='true'] > & {\n color: ",";\n }\n\n ","[data-disabled='true'] > & {\n color: ",";\n }\n\n ",":hover > & {\n transform: translateX(3px);\n }\n"])),(function(n){var e=n.theme;return n.iconColor||o.getColors(e).text.copy}),c,(function(n){var e=n.theme;return n.iconColor||o.getColors(e).text.copyInverted}),c,(function(n){var e=n.theme;return n.iconColor||o.getColors(e).elementBg.medium}),c),m={View:s,Label:l.default.span.withConfig({displayName:"Pointer__Label",componentId:"sc-1jne5k6-2"})(f||(f=n.__makeTemplateObject(["\n display: inline-block;\n"],["\n display: inline-block;\n"]))),Icon:p};exports.Pointer=m;
2
+ //# sourceMappingURL=Pointer-0f69256f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pointer-0f69256f.js","sources":["../src/components/buttons/Pointer.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\n\nimport {\n getColors as color,\n getFonts as font,\n spacings,\n withRange,\n} from 'utils/styles';\n\nconst View = styled.a<{\n inverted?: boolean;\n disable?: boolean;\n textDecoration?: 'none' | 'underline';\n}>`\n padding: 0.2em 0;\n\n display: inline-block;\n display: inline-flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n vertical-align: middle;\n\n font-family: ${({ theme }) => font(theme).copy.medium.family};\n ${({ theme }) => withRange(font(theme).copy.medium.size, 'font-size')}\n font-weight: ${({ theme }) => font(theme).copy.medium.weight};\n text-align: center;\n text-decoration: ${({ textDecoration }) =>\n textDecoration ? textDecoration : 'underline'};\n line-height: 1;\n letter-spacing: ${({ theme }) => font(theme).copy.medium.letterSpacing};\n\n perspective: 1000;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-perspective: 1000;\n -moz-osx-font-smoothing: grayscale;\n will-change: auto;\n\n outline-color: ${({ theme, inverted }) =>\n inverted\n ? color(theme).primary.inverted\n : color(theme).primary.default};\n border: none;\n cursor: pointer;\n\n pointer-events: ${({ disable }) => (disable ? 'none' : 'all')};\n\n background: none;\n color: ${({ theme, inverted, disable }) =>\n disable\n ? color(theme).elementBg.medium\n : inverted\n ? color(theme).text.copyInverted\n : color(theme).text.copy};\n\n & > * {\n color: ${({ theme, inverted, disable }) =>\n disable\n ? color(theme).elementBg.medium\n : inverted\n ? color(theme).text.copyInverted\n : color(theme).text.copy};\n }\n\n & > * + * {\n margin-left: ${spacings.nudge}px;\n }\n\n /* & > :not(:last-child) {\n padding-right: ${spacings.nudge}px;\n } */\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n opacity: 0.6;\n }\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => color(theme).primary.default};\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &:active {\n opacity: 0.6;\n }\n`;\n\ninterface Props {\n isInverted?: boolean;\n isDisabled?: boolean;\n onClick?: () => void;\n textDecoration?: 'none' | 'underline';\n className?: string;\n children?: React.ReactNode;\n}\n\nexport type BtnProps = Props & {\n as?: 'button';\n};\n\nexport type LinkProps = Props & {\n as?: 'a';\n href?: string;\n isExternal?: boolean;\n};\n\nconst Pointer: React.FC<BtnProps | LinkProps> = React.forwardRef(\n (\n {\n as,\n isInverted,\n isDisabled,\n onClick,\n className,\n textDecoration,\n children,\n ...rest\n },\n ref\n ) => {\n if (as === 'button') {\n return (\n <View\n textDecoration={textDecoration}\n ref={ref}\n as={as as any}\n inverted={isInverted}\n disable={isDisabled}\n onClick={onClick}\n className={className}\n {...rest}\n >\n {children}\n </View>\n );\n } else {\n return (\n <View\n textDecoration={textDecoration}\n ref={ref}\n as={as as any}\n href={(rest as LinkProps).href}\n data-disabled={isDisabled}\n data-inverted={isInverted}\n target={\n (rest as LinkProps).isExternal ? '_blank' : undefined\n }\n rel={\n (rest as LinkProps).isExternal\n ? 'noopener noreferrer'\n : undefined\n }\n inverted={isInverted}\n disable={isDisabled}\n onClick={onClick}\n className={className}\n {...rest}\n >\n {children}\n </View>\n );\n }\n }\n);\n\nPointer.displayName = 'Button';\n\nconst Icon = styled.div<{ iconColor?: string }>`\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n\n color: ${({ theme, iconColor }) => iconColor || color(theme).text.copy};\n\n transition: transform 0.2s ease-in-out;\n\n ${View}[data-inverted='true'] > & {\n color: ${({ theme, iconColor }) =>\n iconColor || color(theme).text.copyInverted};\n }\n\n ${View}[data-disabled='true'] > & {\n color: ${({ theme, iconColor }) =>\n iconColor || color(theme).elementBg.medium};\n }\n\n ${View}:hover > & {\n transform: translateX(3px);\n }\n`;\n\nconst Label = styled.span`\n display: inline-block;\n`;\n\nexport default { View: Pointer, Label: Label, Icon: Icon };\n"],"names":["View","styled","a","withConfig","displayName","componentId","templateObject_1","__makeTemplateObject","_a","theme","font","getFonts","copy","medium","family","withRange","size","weight","textDecoration","letterSpacing","inverted","color","primary","default","disable","elementBg","text","copyInverted","spacings","nudge","Pointer","React","forwardRef","ref","as","isInverted","isDisabled","onClick","className","children","rest","__rest","createElement","__assign","href","target","isExternal","undefined","rel","Icon","div","templateObject_2","iconColor","getColors","Pointer$1","Label","span","templateObject_3"],"mappings":"ggBAUMA,EAAOC,EAAAA,QAAOC,EAAVC,WAAA,CAAAC,YAAA,gBAAAC,YAAA,gBAAGJ,CAIXK,IAAAA,EAAAC,EAAAA,qBAAA,CAAA,+OAAA,UAAA,sBAAA,oDAAA,+CAAA,yMAAA,qEAAA,0CAAA,oCAAA,qDAAA,wEAAA,iLAAA,kIAAA,CAAA,+OAW8D,UACS,sBACT,oDAGX,+CAEqB,yMAWhC,qEAIuB,0CAQ7B,oCAQI,qDAIH,wEAIE,iLAUiC,qIAxDrD,SAACC,GAAE,IAAAC,EAAKD,EAAAC,MAAOC,OAAAA,EAAIC,SAACF,GAAOG,KAAKC,OAAOC,UACpD,SAACN,GAAE,IAAAC,EAAKD,EAAAC,MAAO,OAAAM,EAASA,UAACL,EAAIC,SAACF,GAAOG,KAAKC,OAAOG,KAAM,gBAC1C,SAACR,GAAE,IAAAC,EAAKD,EAAAC,MAAOC,OAAAA,EAAIC,SAACF,GAAOG,KAAKC,OAAOI,UAEnC,SAACT,GAAE,IAAAU,EAAcV,EAAAU,eAChC,OAAAA,GAAkC,eAEpB,SAACV,GAAE,IAAAC,EAAKD,EAAAC,MAAOC,OAAAA,EAAIC,SAACF,GAAOG,KAAKC,OAAOM,iBAQxC,SAACX,OAAEC,EAAKD,EAAAC,MACrB,OAD+BD,EAAAY,SAEzBC,EAAAA,UAAMZ,GAAOa,QAAQF,SACrBC,EAAAA,UAAMZ,GAAOa,QAAQC,WAIb,SAACf,GAAgB,O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EHD,MAOrBT,EAAQ1B,YAAc,SAEtB,UAAM6C,EAAOhD,EAAAA,QAAOiD,IAAV/C,WAAA,CAAAC,YAAA,gBAAAC,YAAA,gBAAGJ,CAAkCkD,IAAAA,EAAA5C,EAAAA,qBAAA,CAAA,0HAAA,2DAAA,gDAAA,mBAAA,gDAAA,mBAAA,8DAAA,CAAA,0HAM2B,2DAIhE,gDAE6C,mBAG7C,gDAE4C,mBAG5C,iEAdG,SAACC,OAAEC,EAAKD,EAAAC,MAAkB2C,OAAP5C,EAAA4C,WAAoB/B,EAAKgC,UAAC5C,GAAOiB,KAAKd,OAIhEZ,GACW,SAACQ,OAAEC,EAAKD,EAAAC,MACb2C,OADwB5C,EAAA4C,WACX/B,EAAKgC,UAAC5C,GAAOiB,KAAKC,eAGrC3B,GACW,SAACQ,OAAEC,EAAKD,EAAAC,MACb2C,OADwB5C,EAAA4C,WACX/B,EAAKgC,UAAC5C,GAAOgB,UAAUZ,SAG1Cb,GASSsD,EAAA,CAAEtD,KAAM8B,EAASyB,MAJlBtD,EAAAA,QAAOuD,KAAVrD,WAAA,CAAAC,YAAA,iBAAAC,YAAA,gBAAGJ,CAAWwD,IAAAA,EAAAlD,uBAAA,CAAA,kCAAA,CAAA,qCAIqB0C,KAAMA"}
package/cjs/blocks.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./TableBlock-c545ca8d.js"),r=require("./Actions-c52a14e4.js"),s=require("./Bdot-62c8e349.js"),i=require("./VideoBlock-1fbf598b.js"),t=require("./Image-94820dfd.js"),o=require("./LanguageSwitcher-aa96cc7d.js"),c=require("./EventBlock-4e406696.js"),a=require("./Tag-937849ad.js"),u=require("./FilterBar-0781490f.js"),l=require("./InfoList-e416058c.js"),d=require("./SocialList-aec9a5c2.js");require("./Filter-89286db9.js"),require("react"),require("styled-components"),require("./Copy-a0bc570d.js"),require("./clamp-bd21d587.js"),require("./LibThemeProvider-69109901.js"),require("./styles-13e5d9ac.js"),require("react-dom/server"),require("./Link-8951180c.js"),require("./statusFormatter-0393122b.js"),require("./arrays-c272ed59.js"),require("./FilterField-7efcacb7.js"),require("./useLazyInput-911b8eda.js"),require("./MultiselectDropdown-a16ea1c9.js"),require("./formFieldText-046fcbf4.js"),require("./useMounted-0bba9869.js"),require("./Checkbox-8dccd42f.js"),require("./useScroll-2f086e7f.js"),require("react-dom"),require("./Pointer-331140b6.js"),exports.TableBlock=e.TableBlock,exports.Title=e.Title,exports.Actions=r.Actions,exports.Bdot=s.Bdot,exports.IntroBlock=i.IntroBlock,exports.VideoBlock=i.VideoBlock,exports.Image=t.Image,exports.LanguageSwitcher=o.LanguageSwitcher,exports.EventBlock=c.EventBlock,exports.Tag=a.Tag,exports.FilterBar=u.FilterBar,exports.POICard=u.POICard,exports.POIFacts=u.POIFacts,exports.InfoList=l.InfoList,exports.SocialList=d.SocialList;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./TableBlock-c545ca8d.js"),r=require("./Actions-c52a14e4.js"),s=require("./Bdot-62c8e349.js"),i=require("./VideoBlock-1fbf598b.js"),t=require("./Image-94820dfd.js"),o=require("./LanguageSwitcher-aa96cc7d.js"),c=require("./EventBlock-4e406696.js"),a=require("./Tag-937849ad.js"),u=require("./FilterBar-0cb49472.js"),l=require("./InfoList-e416058c.js"),d=require("./SocialList-aec9a5c2.js");require("./Filter-89286db9.js"),require("react"),require("styled-components"),require("./Copy-a0bc570d.js"),require("./clamp-bd21d587.js"),require("./LibThemeProvider-69109901.js"),require("./styles-13e5d9ac.js"),require("react-dom/server"),require("./Link-8951180c.js"),require("./statusFormatter-0393122b.js"),require("./arrays-c272ed59.js"),require("./FilterField-0ba59002.js"),require("./useLazyInput-911b8eda.js"),require("./MultiselectDropdown-07d543dc.js"),require("./formFieldText-046fcbf4.js"),require("./useMounted-0bba9869.js"),require("./Checkbox-8dccd42f.js"),require("./useScroll-2f086e7f.js"),require("react-dom"),require("./Pointer-0f69256f.js"),exports.TableBlock=e.TableBlock,exports.Title=e.Title,exports.Actions=r.Actions,exports.Bdot=s.Bdot,exports.IntroBlock=i.IntroBlock,exports.VideoBlock=i.VideoBlock,exports.Image=t.Image,exports.LanguageSwitcher=o.LanguageSwitcher,exports.EventBlock=c.EventBlock,exports.Tag=a.Tag,exports.FilterBar=u.FilterBar,exports.POICard=u.POICard,exports.POIFacts=u.POIFacts,exports.InfoList=l.InfoList,exports.SocialList=d.SocialList;
2
2
  //# sourceMappingURL=blocks.js.map
package/cjs/buttons.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Button-1adf99b8.js"),r=require("./ButtonGhost-fbab8769.js"),t=require("./Pointer-331140b6.js"),o=require("./Control-e15e1572.js");require("./Filter-89286db9.js"),require("react"),require("styled-components"),require("./hexRgbConverter-91b28aea.js"),require("./clamp-bd21d587.js"),require("./styles-13e5d9ac.js"),require("react-dom/server"),exports.Button=e.Button,exports.ButtonGhost=r.ButtonGhost,exports.Pointer=t.Pointer,exports.Control=o.Control;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Button-1adf99b8.js"),r=require("./ButtonGhost-fbab8769.js"),t=require("./Pointer-0f69256f.js"),o=require("./Control-e15e1572.js");require("./Filter-89286db9.js"),require("react"),require("styled-components"),require("./hexRgbConverter-91b28aea.js"),require("./clamp-bd21d587.js"),require("./styles-13e5d9ac.js"),require("react-dom/server"),exports.Button=e.Button,exports.ButtonGhost=r.ButtonGhost,exports.Pointer=t.Pointer,exports.Control=o.Control;
2
2
  //# sourceMappingURL=buttons.js.map
package/cjs/fields.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("./Filter-89286db9.js"),e=require("react"),t=require("styled-components"),o=require("./LibThemeProvider-69109901.js"),r=require("./styles-13e5d9ac.js"),i=require("./FilterField-7efcacb7.js"),a=require("./formFieldText-046fcbf4.js"),l=require("./Textarea-599e94a4.js"),c=require("./Checkbox-8dccd42f.js"),s=require("./MultiselectDropdown-a16ea1c9.js"),u=require("./Textfield-24f468be.js");function d(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}require("react-dom/server"),require("./Copy-a0bc570d.js"),require("./clamp-bd21d587.js"),require("./useLazyInput-911b8eda.js"),require("./ButtonGhost-fbab8769.js"),require("./hexRgbConverter-91b28aea.js"),require("./Button-1adf99b8.js"),require("react-datepicker"),require("./useLeafletMap-514304b6.js"),require("./useUpdateEffect-4d233e2c.js"),require("./useGeolocation-d8946470.js"),require("./useMounted-0bba9869.js"),require("./arrays-c272ed59.js");var p,f,m,h,g,b,x,v,w=d(e),y=d(t),k=y.default.form.withConfig({displayName:"CompactForm__View",componentId:"sc-v44fzp-0"})(p||(p=n.__makeTemplateObject(["\n width: 100%;\n display: flex;\n flex-direction: column;\n\n color: ",";\n\n @media "," {\n flex-direction: row;\n }\n"],["\n width: 100%;\n display: flex;\n flex-direction: column;\n\n color: ",";\n\n @media "," {\n flex-direction: row;\n }\n"])),(function(n){var e=n.theme;return r.getColors(e).text.default}),r.mq.medium),C=y.default.input.withConfig({displayName:"CompactForm__InputField",componentId:"sc-v44fzp-1"})(f||(f=n.__makeTemplateObject(["\n display: block;\n width: 100%;\n height: 49px;\n max-height: 49px;\n padding: ","px ","px;\n color: inherit;\n\n background-color: ",";\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n\n font-family: ",";\n font-weight: ",";\n ","\n line-height: ",";\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &::placeholder {\n color: inherit;\n }\n"],["\n display: block;\n width: 100%;\n height: 49px;\n max-height: 49px;\n padding: ","px ","px;\n color: inherit;\n\n background-color: ",";\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n\n font-family: ",";\n font-weight: ",";\n ","\n line-height: ",";\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &::placeholder {\n color: inherit;\n }\n"])),r.spacings.nudge,3*r.spacings.nudge,(function(n){var e=n.backColor;return e&&e}),(function(n){var e=n.theme;return r.getFonts(e).copy.small.family}),(function(n){var e=n.theme;return r.getFonts(e).copy.small.weight}),(function(n){var e=n.theme;return r.withRange(r.getFonts(e).copy.small.size,"font-size")}),(function(n){var e=n.theme;return r.getFonts(e).copy.small.lineHeight}),(function(n){var e=n.theme;return"2px solid ".concat(r.getColors(e).primary.default)})),j=y.default.button.withConfig({displayName:"CompactForm__SubmitBtn",componentId:"sc-v44fzp-2"})(m||(m=n.__makeTemplateObject(["\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 49px;\n\n margin-top: ","px;\n\n background-color: ",";\n color: ",";\n\n outline: none;\n border: none;\n user-select: none;\n cursor: pointer;\n transition: all ease-in-out 0.2s;\n\n @media "," {\n width: 100px;\n margin-top: 0;\n }\n\n &:hover {\n transform: scale(1.05);\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n"],["\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 49px;\n\n margin-top: ","px;\n\n background-color: ",";\n color: ",";\n\n outline: none;\n border: none;\n user-select: none;\n cursor: pointer;\n transition: all ease-in-out 0.2s;\n\n @media "," {\n width: 100px;\n margin-top: 0;\n }\n\n &:hover {\n transform: scale(1.05);\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n"])),.5*r.spacings.spacer,(function(n){var e=n.theme;return r.getColors(e).primary.default}),(function(n){var e=n.theme;return r.getColors(e).text.inverted}),r.mq.medium),_=y.default.div.withConfig({displayName:"SearchInput__View",componentId:"sc-21j67n-0"})(h||(h=n.__makeTemplateObject(["\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: row;\n\n color: ",";\n\n background-color: ",";\n"],["\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: row;\n\n color: ",";\n\n background-color: ",";\n"])),(function(n){var e=n.theme;return r.getColors(e).text.default}),(function(n){var e=n.theme;return n.isInverted?r.getColors(e).elementBg.light:r.getColors(e).elementBg.medium})),F=y.default.input.withConfig({displayName:"SearchInput__InputField",componentId:"sc-21j67n-1"})(g||(g=n.__makeTemplateObject(["\n display: block;\n width: 100%;\n height: 100%;\n padding: ","px ","px;\n padding-left: ",";\n padding-right: ",";\n color: inherit;\n\n background-color: transparent;\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n\n font-family: ",";\n font-weight: 400;\n ","\n line-height: 1.25;\n\n &::placeholder {\n color: inherit;\n }\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n"],["\n display: block;\n width: 100%;\n height: 100%;\n padding: ","px ","px;\n padding-left: ",";\n padding-right: ",";\n color: inherit;\n\n background-color: transparent;\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n\n font-family: ",";\n font-weight: 400;\n ","\n line-height: 1.25;\n\n &::placeholder {\n color: inherit;\n }\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n"])),3*r.spacings.nudge,3.5*r.spacings.nudge,(function(n){return n.hasLeftIcon&&2.5*r.spacings.spacer+"px"}),(function(n){return n.hasRightIcon&&2.5*r.spacings.spacer+"px"}),(function(n){var e=n.theme;return r.getFonts(e).copy.small.family}),(function(n){var e=n.theme;return r.withRange(r.getFonts(e).copy.small.size,"font-size")}),(function(n){var e=n.theme;return"1px solid ".concat(r.getColors(e).primary.default)})),I=y.default.button.withConfig({displayName:"SearchInput__ControlBtn",componentId:"sc-21j67n-2"})(b||(b=n.__makeTemplateObject(["\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 53px;\n\n margin: -2px;\n background-color: transparent;\n color: ",";\n\n outline: none;\n border: none;\n user-select: none;\n cursor: pointer;\n /* transition: all ease-in-out 0.2s; */\n\n &:hover {\n transform: scale(1.02);\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n"],["\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 53px;\n\n margin: -2px;\n background-color: transparent;\n color: ",";\n\n outline: none;\n border: none;\n user-select: none;\n cursor: pointer;\n /* transition: all ease-in-out 0.2s; */\n\n &:hover {\n transform: scale(1.02);\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n"])),(function(n){var e=n.theme;return r.getColors(e).text.default})),q=y.default(I).withConfig({displayName:"SearchInput__SubmitBtn",componentId:"sc-21j67n-3"})(x||(x=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n"]))),T=y.default(I).withConfig({displayName:"SearchInput__ClearBtn",componentId:"sc-21j67n-4"})(v||(v=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n"],["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n"])));exports.FilterField=i.FilterField,exports.FormField=a.FieldWrapper,exports.Datepicker=l.DatepickerCmp,exports.FileUpload=l.FileUploadCmp,exports.LocationField=l.LocationField,exports.Radio=l.RadioButton,exports.SelectDropdown=l.SelectDropdown,exports.Textarea=l.Textarea,exports.Checkbox=c.Checkbox,exports.MultiselectDropdown=s.MultiselectDropdown,exports.Textfield=u.Textfield,exports.CompactForm=function(n){var e=n.mode,t=void 0===e?"default":e,r=n.value,i=n.placeholder,a=n.method,l=n.action,c=n.buttonIcon,s=n.onSubmit,u=n.onClick,d=n.onBlur,p=n.onFocus,f=n.className,m=o.useLibTheme().colors,h="default"===t?m.elementBg.medium:m.elementBg.light;return w.default.createElement(k,{onSubmit:s,method:a,action:l,className:f},w.default.createElement(C,{placeholder:i,value:r,onClick:u,onBlur:d,onFocus:p,backColor:h}),c&&w.default.createElement(j,{isInverted:"onDark"===t},c))},exports.SearchInput=function(n){var e=n.isInverted,t=void 0!==e&&e,o=n.value,r=n.placeholder,i=n.submitIcon,a=n.clearIcon,l=n.onSubmit,c=n.onClick,s=n.onClear,u=n.onBlur,d=n.onFocus,p=n.className;return w.default.createElement(_,{isInverted:t,className:p},i&&w.default.createElement(q,{isInverted:t,onClick:function(){return l&&l()}},i),w.default.createElement(F,{hasLeftIcon:void 0!==i,hasRightIcon:void 0!==a,placeholder:r,value:o,onClick:c,onBlur:u,onFocus:d,onKeyDown:function(n){13===n.keyCode&&(l&&l(),n.preventDefault())}}),a&&w.default.createElement(T,{isInverted:t,onClick:function(){return s&&s()}},a))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("./Filter-89286db9.js"),e=require("react"),t=require("styled-components"),o=require("./LibThemeProvider-69109901.js"),r=require("./styles-13e5d9ac.js"),i=require("./FilterField-0ba59002.js"),a=require("./formFieldText-046fcbf4.js"),l=require("./Textarea-599e94a4.js"),c=require("./Checkbox-8dccd42f.js"),s=require("./MultiselectDropdown-07d543dc.js"),u=require("./Textfield-24f468be.js");function d(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}require("react-dom/server"),require("./Copy-a0bc570d.js"),require("./clamp-bd21d587.js"),require("./useLazyInput-911b8eda.js"),require("./ButtonGhost-fbab8769.js"),require("./hexRgbConverter-91b28aea.js"),require("./Button-1adf99b8.js"),require("react-datepicker"),require("./useLeafletMap-514304b6.js"),require("./useUpdateEffect-4d233e2c.js"),require("./useGeolocation-d8946470.js"),require("./useMounted-0bba9869.js"),require("./arrays-c272ed59.js");var p,f,m,h,g,b,x,v,w=d(e),y=d(t),k=y.default.form.withConfig({displayName:"CompactForm__View",componentId:"sc-v44fzp-0"})(p||(p=n.__makeTemplateObject(["\n width: 100%;\n display: flex;\n flex-direction: column;\n\n color: ",";\n\n @media "," {\n flex-direction: row;\n }\n"],["\n width: 100%;\n display: flex;\n flex-direction: column;\n\n color: ",";\n\n @media "," {\n flex-direction: row;\n }\n"])),(function(n){var e=n.theme;return r.getColors(e).text.default}),r.mq.medium),C=y.default.input.withConfig({displayName:"CompactForm__InputField",componentId:"sc-v44fzp-1"})(f||(f=n.__makeTemplateObject(["\n display: block;\n width: 100%;\n height: 49px;\n max-height: 49px;\n padding: ","px ","px;\n color: inherit;\n\n background-color: ",";\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n\n font-family: ",";\n font-weight: ",";\n ","\n line-height: ",";\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &::placeholder {\n color: inherit;\n }\n"],["\n display: block;\n width: 100%;\n height: 49px;\n max-height: 49px;\n padding: ","px ","px;\n color: inherit;\n\n background-color: ",";\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n\n font-family: ",";\n font-weight: ",";\n ","\n line-height: ",";\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n\n &::placeholder {\n color: inherit;\n }\n"])),r.spacings.nudge,3*r.spacings.nudge,(function(n){var e=n.backColor;return e&&e}),(function(n){var e=n.theme;return r.getFonts(e).copy.small.family}),(function(n){var e=n.theme;return r.getFonts(e).copy.small.weight}),(function(n){var e=n.theme;return r.withRange(r.getFonts(e).copy.small.size,"font-size")}),(function(n){var e=n.theme;return r.getFonts(e).copy.small.lineHeight}),(function(n){var e=n.theme;return"2px solid ".concat(r.getColors(e).primary.default)})),j=y.default.button.withConfig({displayName:"CompactForm__SubmitBtn",componentId:"sc-v44fzp-2"})(m||(m=n.__makeTemplateObject(["\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 49px;\n\n margin-top: ","px;\n\n background-color: ",";\n color: ",";\n\n outline: none;\n border: none;\n user-select: none;\n cursor: pointer;\n transition: all ease-in-out 0.2s;\n\n @media "," {\n width: 100px;\n margin-top: 0;\n }\n\n &:hover {\n transform: scale(1.05);\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n"],["\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 49px;\n\n margin-top: ","px;\n\n background-color: ",";\n color: ",";\n\n outline: none;\n border: none;\n user-select: none;\n cursor: pointer;\n transition: all ease-in-out 0.2s;\n\n @media "," {\n width: 100px;\n margin-top: 0;\n }\n\n &:hover {\n transform: scale(1.05);\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n"])),.5*r.spacings.spacer,(function(n){var e=n.theme;return r.getColors(e).primary.default}),(function(n){var e=n.theme;return r.getColors(e).text.inverted}),r.mq.medium),_=y.default.div.withConfig({displayName:"SearchInput__View",componentId:"sc-21j67n-0"})(h||(h=n.__makeTemplateObject(["\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: row;\n\n color: ",";\n\n background-color: ",";\n"],["\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: row;\n\n color: ",";\n\n background-color: ",";\n"])),(function(n){var e=n.theme;return r.getColors(e).text.default}),(function(n){var e=n.theme;return n.isInverted?r.getColors(e).elementBg.light:r.getColors(e).elementBg.medium})),F=y.default.input.withConfig({displayName:"SearchInput__InputField",componentId:"sc-21j67n-1"})(g||(g=n.__makeTemplateObject(["\n display: block;\n width: 100%;\n height: 100%;\n padding: ","px ","px;\n padding-left: ",";\n padding-right: ",";\n color: inherit;\n\n background-color: transparent;\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n\n font-family: ",";\n font-weight: 400;\n ","\n line-height: 1.25;\n\n &::placeholder {\n color: inherit;\n }\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n"],["\n display: block;\n width: 100%;\n height: 100%;\n padding: ","px ","px;\n padding-left: ",";\n padding-right: ",";\n color: inherit;\n\n background-color: transparent;\n box-shadow: none;\n border: none;\n border-right: none;\n border-radius: 0px;\n outline: none;\n -webkit-appearance: none;\n\n font-family: ",";\n font-weight: 400;\n ","\n line-height: 1.25;\n\n &::placeholder {\n color: inherit;\n }\n\n &:focus {\n outline: ",";\n outline-offset: 0;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n"])),3*r.spacings.nudge,3.5*r.spacings.nudge,(function(n){return n.hasLeftIcon&&2.5*r.spacings.spacer+"px"}),(function(n){return n.hasRightIcon&&2.5*r.spacings.spacer+"px"}),(function(n){var e=n.theme;return r.getFonts(e).copy.small.family}),(function(n){var e=n.theme;return r.withRange(r.getFonts(e).copy.small.size,"font-size")}),(function(n){var e=n.theme;return"1px solid ".concat(r.getColors(e).primary.default)})),I=y.default.button.withConfig({displayName:"SearchInput__ControlBtn",componentId:"sc-21j67n-2"})(b||(b=n.__makeTemplateObject(["\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 53px;\n\n margin: -2px;\n background-color: transparent;\n color: ",";\n\n outline: none;\n border: none;\n user-select: none;\n cursor: pointer;\n /* transition: all ease-in-out 0.2s; */\n\n &:hover {\n transform: scale(1.02);\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n"],["\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 53px;\n\n margin: -2px;\n background-color: transparent;\n color: ",";\n\n outline: none;\n border: none;\n user-select: none;\n cursor: pointer;\n /* transition: all ease-in-out 0.2s; */\n\n &:hover {\n transform: scale(1.02);\n }\n\n &:focus {\n text-decoration: underline;\n transform: scale(1.012);\n }\n\n &:focus:not(:focus-visible) {\n text-decoration: none;\n }\n\n &:active {\n transform: scale(0.95);\n }\n"])),(function(n){var e=n.theme;return r.getColors(e).text.default})),q=y.default(I).withConfig({displayName:"SearchInput__SubmitBtn",componentId:"sc-21j67n-3"})(x||(x=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n"]))),T=y.default(I).withConfig({displayName:"SearchInput__ClearBtn",componentId:"sc-21j67n-4"})(v||(v=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n"],["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n"])));exports.FilterField=i.FilterField,exports.FormField=a.FieldWrapper,exports.Datepicker=l.DatepickerCmp,exports.FileUpload=l.FileUploadCmp,exports.LocationField=l.LocationField,exports.Radio=l.RadioButton,exports.SelectDropdown=l.SelectDropdown,exports.Textarea=l.Textarea,exports.Checkbox=c.Checkbox,exports.MultiselectDropdown=s.MultiselectDropdown,exports.Textfield=u.Textfield,exports.CompactForm=function(n){var e=n.mode,t=void 0===e?"default":e,r=n.value,i=n.placeholder,a=n.method,l=n.action,c=n.buttonIcon,s=n.onSubmit,u=n.onClick,d=n.onBlur,p=n.onFocus,f=n.className,m=o.useLibTheme().colors,h="default"===t?m.elementBg.medium:m.elementBg.light;return w.default.createElement(k,{onSubmit:s,method:a,action:l,className:f},w.default.createElement(C,{placeholder:i,value:r,onClick:u,onBlur:d,onFocus:p,backColor:h}),c&&w.default.createElement(j,{isInverted:"onDark"===t},c))},exports.SearchInput=function(n){var e=n.isInverted,t=void 0!==e&&e,o=n.value,r=n.placeholder,i=n.submitIcon,a=n.clearIcon,l=n.onSubmit,c=n.onClick,s=n.onClear,u=n.onBlur,d=n.onFocus,p=n.className;return w.default.createElement(_,{isInverted:t,className:p},i&&w.default.createElement(q,{isInverted:t,onClick:function(){return l&&l()}},i),w.default.createElement(F,{hasLeftIcon:void 0!==i,hasRightIcon:void 0!==a,placeholder:r,value:o,onClick:c,onBlur:u,onFocus:d,onKeyDown:function(n){13===n.keyCode&&(l&&l(),n.preventDefault())}}),a&&w.default.createElement(T,{isInverted:t,onClick:function(){return s&&s()}},a))};
2
2
  //# sourceMappingURL=fields.js.map