passbolt-styleguide
Version:
Passbolt styleguide contains common styling assets used by the different sites, plugin, etc.
2 lines • 15.7 kB
JavaScript
/*! For license information please see api-feedback.js.LICENSE.txt */
(()=>{"use strict";var e,t,r,n={2138(e,t,r){var n,a,o=r(6540),s=r(5338),i=r(5556),c=r.n(i),l=r(2389);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(null,arguments)}const h=function(e){return o.createElement("svg",d({shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 128 128"},e),n||(n=o.createElement("circle",{id:"success-circle",r:62.5,fill:"none",strokeDasharray:392.7,strokeDashoffset:392.7,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,transform:"rotate(-90 64 0)"})),a||(a=o.createElement("path",{id:"success-check",fill:"none",strokeDasharray:65.24,strokeDashoffset:65.24,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:7,d:"M87.062 46.703 55.351 78.415 40.936 64"})))};var u,m,f;function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p.apply(null,arguments)}const g=function(e){return o.createElement("svg",p({shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 128 128"},e),u||(u=o.createElement("path",{id:"warning-dot",fill:"none",strokeDasharray:23.42,strokeDashoffset:23.42,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:7,d:"M64.038 46.76v23.413"})),m||(m=o.createElement("path",{id:"warning-bar",fill:"none",strokeDasharray:.09,strokeDashoffset:.09,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:7,d:"M64.038 93.585h.088"})),f||(f=o.createElement("path",{id:"warning-triangle",fill:"none",strokeDasharray:364.98,strokeDashoffset:364.98,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M53.954 16.685 4.412 99.459a11.66 11.66 0 0 0-1.167 8.872 11.66 11.66 0 0 0 5.464 7.087 10.97 10.97 0 0 0 5.7 1.578h99.17a11.67 11.67 0 0 0 8.253-3.508 11.68 11.68 0 0 0 3.323-8.329 11 11 0 0 0-1.579-5.7L74.033 16.685A11.66 11.66 0 0 0 57.9 12.739a12.1 12.1 0 0 0-3.946 3.946"})))};var v,k,y;function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(null,arguments)}const b=function(e){return o.createElement("svg",E({shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 128 128"},e),v||(v=o.createElement("circle",{id:"attention-circle",r:62.5,fill:"none",strokeDasharray:392.7,strokeDashoffset:392.7,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,transform:"rotate(-90 64 0)"})),k||(k=o.createElement("path",{id:"attention-dot",fill:"none",strokeDasharray:23.42,strokeDashoffset:23.42,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:7,d:"M63.956 40.588V64",transform:"rotate(180 63.956 52.294)"})),y||(y=o.createElement("path",{id:"attention-bar",fill:"none",strokeDasharray:.09,strokeDashoffset:.09,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:7,d:"M63.956 87.412h.088"})))};var w,O,j;function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L.apply(null,arguments)}const x=function(e){return o.createElement("svg",L({shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 128 128"},e),w||(w=o.createElement("circle",{id:"error-circle",r:62.5,fill:"none",strokeDasharray:392.7,strokeDashoffset:392.7,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,transform:"rotate(-90 64 0)"})),O||(O=o.createElement("path",{id:"error-stroke-1",fill:"none",strokeDasharray:37.96,strokeDashoffset:37.96,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:7,d:"m50.58 50.58 26.84 26.84",transform:"rotate(180 64 64)"})),j||(j=o.createElement("path",{id:"error-stroke-2",fill:"none",strokeDasharray:37.96,strokeDashoffset:37.96,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:7,d:"M77.42 50.58 50.58 77.42"})))};var D,P;function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(null,arguments)}const C=function(e){return o.createElement("svg",M({xmlns:"http://www.w3.org/2000/svg",width:128,height:129,fill:"none",viewBox:"0 0 128 129"},e),D||(D=o.createElement("circle",{cx:64,cy:64.844,r:62.5,stroke:"var(--Palette-Contrast-1)",strokeWidth:3})),P||(P=o.createElement("path",{stroke:"var(--Palette-Contrast-1)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:7,d:"M69.932 57.034c6.386-6.402 12.773-9.594 19.16-9.594a17 17 0 0 1 12.02 29.018 17 17 0 0 1-12.02 4.979c-8.499 0-16.998-5.652-25.497-16.998-8.5-11.347-16.998-16.999-25.497-16.999a16.998 16.998 0 0 0 0 33.997c6.372 0 12.744-3.177 19.117-9.55"})))},N={success:o.createElement(h,null),warning:o.createElement(g,null),attention:o.createElement(b,null),error:o.createElement(x,null),infinity_illustration:o.createElement(C,null)};class S extends o.Component{get animatedIconSVG(){return N[this.props.name]}render(){return o.createElement("div",{className:"illustration icon-feedback"},o.createElement("div",{className:this.props.name},this.animatedIconSVG))}}S.defaultProps={},S.propTypes={name:c().string};const W=S;var _;function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(null,arguments)}const R=function(e){return o.createElement("svg",B({xmlns:"http://www.w3.org/2000/svg",width:10,height:8,fill:"none",viewBox:"0 0 10 8"},e),_||(_=o.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m1 2 4 4 4-4"})))};var T;function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},q.apply(null,arguments)}const z=function(e){return o.createElement("svg",q({xmlns:"http://www.w3.org/2000/svg",width:8,height:10,fill:"none",viewBox:"0 0 8 10"},e),T||(T=o.createElement("path",{stroke:"var(--icon-color)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m2 9 4-4-4-4"})))};var H,I,V,F,G;function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(null,arguments)}const A=function(e){return o.createElement("svg",U({xmlns:"http://www.w3.org/2000/svg",width:151,height:27,fill:"none","aria-labelledby":"logo-title logo-description",viewBox:"0 0 151 27"},e),H||(H=o.createElement("title",{id:"logo-title"},"Passbolt logo")),I||(I=o.createElement("desc",{id:"logo-description"},"This is the logo of passbolt.")),V||(V=o.createElement("path",{fill:"var(--icon-color)",d:"M4.648 9.234v8.607h2.48c1.646 0 2.786-.349 3.47-1.012.685-.664 1.013-1.823 1.013-3.395 0-1.52-.305-2.595-.938-3.218-.633-.673-1.695-.972-3.24-.972zM.597 5.963h7.797c2.357 0 4.178.676 5.496 2.048q1.976 2.058 1.974 5.689a8.6 8.6 0 0 1-.406 2.749 7.1 7.1 0 0 1-1.24 2.278 5.9 5.9 0 0 1-2.38 1.773c-.937.349-2.152.524-3.697.524H4.648V26.5H.597zM24.016 18.016h5.064v-3.119h-4.76c-.937 0-1.594.124-1.95.375-.357.25-.517.698-.517 1.321 0 .524.15.899.429 1.122.28.223.848.301 1.734.301M18.649 5.963h8.268c2.103 0 3.672.476 4.736 1.423 1.065.947 1.594 2.347 1.594 4.217v9.456H22.37c-1.52 0-2.708-.375-3.52-1.121-.81-.747-1.2-1.823-1.2-3.22 0-1.722.454-2.945 1.392-3.692s2.483-1.134 4.697-1.134h5.315v-.365c0-.898-.276-1.518-.809-1.896-.532-.377-1.47-.55-2.86-.55H18.65zM36.55 17.915h8.525c.76 0 1.318-.124 1.646-.35.183-.122.328-.29.423-.486.094-.197.134-.414.115-.63a1.2 1.2 0 0 0-.112-.632 1.24 1.24 0 0 0-.42-.492c-.355-.253-.91-.374-1.646-.374h-3.494c-2.067 0-3.467-.325-4.203-.947-.737-.623-1.088-1.747-1.088-3.32 0-1.62.431-2.82 1.318-3.592.886-.772 2.255-1.152 4.064-1.152h8.684v3.142h-7.134q-1.75 0-2.279.301c-.354.198-.532.547-.532 1.071-.017.193.016.387.096.564s.204.332.361.449c.302.223.809.324 1.468.324h3.676c1.672 0 2.961.397 3.824 1.172s1.315 1.871 1.315 3.32c0 1.397-.405 2.53-1.188 3.417-.37.427-.833.768-1.354.996-.522.23-1.09.34-1.661.325H36.549zM53.822 17.915h8.526c.76 0 1.318-.124 1.646-.35a1.23 1.23 0 0 0 .42-.487c.093-.196.132-.413.112-.629a1.2 1.2 0 0 0-.111-.632 1.24 1.24 0 0 0-.421-.492c-.354-.253-.91-.374-1.646-.374h-3.493c-2.067 0-3.467-.325-4.204-.947-.736-.623-1.088-1.752-1.088-3.324 0-1.62.432-2.82 1.318-3.593.886-.772 2.253-1.147 4.075-1.147h8.686v3.142h-7.141q-1.747 0-2.28.301c-.353.198-.531.547-.531 1.071-.017.193.016.387.096.564s.204.332.361.449c.302.223.809.324 1.468.324h3.671c1.672 0 2.963.397 3.824 1.172s1.315 1.871 1.315 3.32c0 1.397-.403 2.53-1.188 3.417-.37.427-.832.767-1.354.996a3.9 3.9 0 0 1-1.66.325H53.769v-3.106zM75.387.5v5.463h3.47c1.55 0 2.759.175 3.694.55.946.362 1.77.976 2.38 1.772a7.2 7.2 0 0 1 1.243 2.296c.281.888.417 1.814.403 2.744q0 3.63-1.974 5.689c-1.315 1.372-3.14 2.046-5.493 2.046h-7.8V.5zm2.462 8.734h-2.483v8.608h2.785c1.55 0 2.633-.324 3.243-.95s.935-1.721.935-3.268-.354-2.694-1.033-3.367c-.68-.673-1.832-1.023-3.447-1.023M92.3 13.525c0 1.445.328 2.532 1.013 3.367s1.62 1.198 2.86 1.198 2.152-.398 2.863-1.198 1.033-1.921 1.033-3.367-.356-2.547-1.033-3.344c-.677-.798-1.62-1.198-2.863-1.198a3.64 3.64 0 0 0-1.57.279 3.6 3.6 0 0 0-1.29.919c-.685.797-1.013 1.921-1.013 3.344m12.002 0q0 3.544-2.202 5.689c-1.47 1.397-3.42 2.121-5.901 2.121s-4.457-.699-5.924-2.121-2.202-3.292-2.202-5.664q0-3.558 2.202-5.69c1.467-1.424 3.444-2.145 5.919-2.145s4.431.724 5.901 2.144 2.207 3.294 2.207 5.666M110.935 21.06h-4.202V.5h4.202zM112.884 5.963h2.86V.5h4.052v5.463h4.278v3.02h-4.278v6.09c0 1.12.204 1.895.581 2.343.377.449 1.064.649 2.026.649h1.671v3.02h-3.72c-1.494 0-2.636-.4-3.444-1.223-.809-.823-1.189-1.995-1.189-3.519v-7.36h-2.863v-3.02z"})),F||(F=o.createElement("path",{fill:"#D40101",d:"m149.951 10.68-9.059-8.36a2.12 2.12 0 0 0-1.421-.543c-.526 0-1.033.194-1.421.544l-5.684 5.268c.745.271 1.414.71 1.952 1.282.539.572.933 1.26 1.149 2.01h7.673a.73.73 0 0 1 .504.204.69.69 0 0 1 .207.494v1.147a.68.68 0 0 1-.207.494.72.72 0 0 1-.504.204h-.886v1.623a.68.68 0 0 1-.205.494.72.72 0 0 1-.503.205h-1.945a.73.73 0 0 1-.503-.205.69.69 0 0 1-.205-.494v-1.623h-3.426a4.84 4.84 0 0 1-1.135 2.033 5 5 0 0 1-1.966 1.287l5.71 5.276c.388.349.895.543 1.421.543a2.12 2.12 0 0 0 1.421-.543l9.043-8.355a2.03 2.03 0 0 0-.01-2.985"})),G||(G=o.createElement("path",{fill:"#D40101",d:"M130.683 9.867a2.6 2.6 0 0 0-1.064.253c-.371.18-.686.455-.913.794a2.242 2.242 0 0 0-.113 2.305 2.3 2.3 0 0 0 .831.877 2.36 2.36 0 0 0 2.355.059c.362-.197.664-.484.875-.833a2.24 2.24 0 0 0 .324-1.153 2.21 2.21 0 0 0-.653-1.625 2.3 2.3 0 0 0-.751-.5 2.3 2.3 0 0 0-.891-.177"})))};class J extends o.Component{constructor(e){super(e),this.state=this.defaultState,this.bindCallbacks()}get defaultState(){return{displayLogs:!1}}bindCallbacks(){this.handleDisplayLogsClick=this.handleDisplayLogsClick.bind(this)}handleDisplayLogsClick(){this.setState({displayLogs:!this.state.displayLogs})}render(){return o.createElement("div",{id:"container",className:"container api-feedback page"},o.createElement("div",{className:"content"},o.createElement("div",{className:"header"},o.createElement("div",{className:"logo-svg"},o.createElement(A,{role:"img",width:"20rem",height:"3.5rem"}))),o.createElement("div",{className:"api-feedback-card"},o.createElement(W,{name:"attention"}),o.createElement("h1",null,o.createElement(l.x6,null,"Something went wrong!")),o.createElement("p",null,o.createElement(l.x6,null,"Please try again later or contact your administrator.")),o.createElement("div",{className:"accordion-header"},o.createElement("button",{type:"button",className:"link no-border",onClick:this.handleDisplayLogsClick},o.createElement(l.x6,null,"Logs")," ",this.state.displayLogs?o.createElement(R,null):o.createElement(z,null))),this.state.displayLogs&&o.createElement("div",{className:"accordion-content"},o.createElement("textarea",{readOnly:!0,value:this.props.message})))))}}J.propTypes={message:c().string.isRequired,t:c().func};const K=(0,l.CI)("common")(J);class Q extends o.Component{render(){return o.createElement("div",{id:"container",className:"container api-feedback page"},o.createElement("div",{className:"content"},o.createElement("div",{className:"header"},o.createElement("div",{className:"logo-svg"},o.createElement(A,{role:"img",width:"20rem",height:"3.5rem"}))),o.createElement("div",{className:"api-feedback-card"},o.createElement(W,{name:"success"}),o.createElement("p",null,this.props.message))))}}Q.propTypes={message:c().string.isRequired,t:c().func};const X=(0,l.CI)("common")(Q),Y="loading",Z="Error",$="Success";class ee extends o.Component{constructor(e){super(e),this.state=this.defaultState}get defaultState(){return{state:Y,message:null}}componentDidMount(){const e=document.getElementById("api-error-details"),t=document.getElementById("api-success");e?this.setState({state:Z,message:e?.textContent}):this.setState({state:$,message:t?.textContent})}render(){switch(this.state.state){case Y:return o.createElement(o.Fragment,null);case Z:return o.createElement(K,{message:this.state.message});case $:return o.createElement(X,{message:this.state.message})}}}ee.propTypes={t:c().func};const te=(0,l.CI)("common")(ee),re=document.createElement("div");document.body.appendChild(re),(0,s.H)(re).render(o.createElement(te,null))}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;if(void 0===n[e]){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var s=a[e]={exports:{}};return n[e].call(s.exports,s,s.exports,o),s.exports}o.m=n,e=[],o.O=(t,r,n,a)=>{if(!r){var s=1/0;for(d=0;d<e.length;d++){for(var[r,n,a]=e[d],i=!0,c=0;c<r.length;c++)(!1&a||s>=a)&&Object.keys(o.O).every(e=>o.O[e](r[c]))?r.splice(c--,1):(i=!1,a<s&&(s=a));if(i){e.splice(d--,1);var l=n();void 0!==l&&(t=l)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[r,n,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var a=Object.create(null);o.r(a);var s={};t=t||[null,r({}),r([]),r(r)];for(var i=2&n&&e;("object"==typeof i||"function"==typeof i)&&!~t.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(t=>s[t]=()=>e[t]);return s.default=()=>e,o.d(a,s),a},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.e=()=>Promise.resolve(),o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.j=647,(()=>{var e={647:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var n,a,[s,i,c]=r,l=0;if(s.some(t=>0!==e[t])){for(n in i)o.o(i,n)&&(o.m[n]=i[n]);if(c)var d=c(o)}for(t&&t(r);l<s.length;l++)a=s[l],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(d)},r=self.webpackChunkpassbolt_styleguide=self.webpackChunkpassbolt_styleguide||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var s=o.O(void 0,[847],()=>o(2138));s=o.O(s)})();