UNPKG

@procore/core-react

Version:

JSX implementations for core-css

24 lines • 13.8 kB
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var r="object"==typeof exports?t(require("react")):t(e.react);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=98)}({0:function(t,r){t.exports=e},1:function(e,t,r){var n; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(this&&this[n]||n);else if(Array.isArray(n))e.push(o.apply(this,n));else if("object"===i)for(var a in n)r.call(n,a)&&n[a]&&e.push(this&&this[a]||a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},100:function(e,t,r){(t=e.exports=r(2)(!1)).push([e.i,"._15F9P-7_3_0 {\n color: #808080;\n display: flex;\n font-size: 13px;\n align-items: center; }\n ._15F9P-7_3_0 a,\n ._15F9P-7_3_0 a:hover {\n text-decoration: none; }\n ._3b_y5-7_3_0 {\n color: #808080;\n text-decoration: none; }\n ._3b_y5-7_3_0:hover {\n color: #808080;\n text-decoration: underline; }\n ._3b_y5-7_3_0._2SIJi-7_3_0 {\n color: #4d4d4d;\n font-weight: bold;\n text-decoration: none; }\n ._3Zp9B-7_3_0 {\n margin: 0px 8px; }\n",""]),t.locals={"core-breadcrumbs":"_15F9P-7_3_0","core-breadcrumbs__crumb":"_3b_y5-7_3_0","core-breadcrumbs__crumb--active":"_2SIJi-7_3_0","core-breadcrumbs__separator":"_3Zp9B-7_3_0"}},16:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0});var i,a=r(0),c=r(1),s=r(23),f=r(24),u=r(4);!function(e){e.none="",e.hoverCircle="hover-circle",e.hoverFill="hover-fill"}(i=t.IconVariantNS||(t.IconVariantNS={}));var l=c.bind(f),p=a.forwardRef(function(e,t){var r,c=e.className,f=e.clickable,p=void 0!==f&&f,d=e.icon,b=e.size,h=void 0===b?u.SizeNS.inherit:b,v=e.variant,m=void 0===v?i.none:v,_=o(e,["className","clickable","icon","size","variant"]);return a.createElement("span",n({ref:t,className:s.default("ci","ci-"+d,l("core-icon",(r={"core-icon--clickable":p},r["core-icon--"+h]=h,r["core-icon--"+m]=m,r)),c)},_))});p.displayName="Icon",t.default=p},2:function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var o=(a=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[r].concat(i).concat([o]).join("\n")}var a;return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;o<this.length;o++){var i=this[o][0];null!=i&&(n[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];null!=a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),t.push(a))}},t}},23:function(e,t,r){var n; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===i)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},24:function(e,t,r){var n=r(25);"string"==typeof n&&(n=[[e.i,n,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r(3)(n,o);n.locals&&(e.exports=n.locals)},25:function(e,t,r){(t=e.exports=r(2)(!1)).push([e.i,"._1FgAl-7_3_0 {\n display: inline-flex; }\n .QtZLT-7_3_0 {\n cursor: pointer; }\n ._3Hw5E-7_3_0 {\n transition: color 0.2s ease-in-out; }\n ._3Hw5E-7_3_0:hover {\n color: #000000; }\n ._2g2N0-7_3_0:hover {\n color: #ffffff; }\n ._2g2N0-7_3_0:hover:before {\n background-color: #808080;\n border-radius: 50%; }\n ._3TrT9-7_3_0 {\n font-size: 16px;\n min-width: 16px; }\n ._157DG-7_3_0 {\n font-size: 24px;\n min-width: 24px; }\n ._3UApg-7_3_0 {\n font-size: 26px;\n min-width: 26px; }\n",""]),t.locals={"core-icon":"_1FgAl-7_3_0","core-icon--clickable":"QtZLT-7_3_0","core-icon--hover-fill":"_3Hw5E-7_3_0","core-icon--hover-circle":"_2g2N0-7_3_0","core-icon--sm":"_3TrT9-7_3_0","core-icon--md":"_157DG-7_3_0","core-icon--lg":"_3UApg-7_3_0"}},3:function(e,t,r){var n,o,i={},a=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=n.apply(this,arguments)),o}),c=function(e){var t={};return function(e,r){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,r);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),s=null,f=0,u=[],l=r(6);function p(e,t){for(var r=0;r<e.length;r++){var n=e[r],o=i[n.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](n.parts[a]);for(;a<n.parts.length;a++)o.parts.push(_(n.parts[a],t))}else{var c=[];for(a=0;a<n.parts.length;a++)c.push(_(n.parts[a],t));i[n.id]={id:n.id,refs:1,parts:c}}}}function d(e,t){for(var r=[],n={},o=0;o<e.length;o++){var i=e[o],a=t.base?i[0]+t.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};n[a]?n[a].parts.push(c):r.push(n[a]={id:a,parts:[c]})}return r}function b(e,t){var r=c(e.insertInto);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=u[u.length-1];if("top"===e.insertAt)n?n.nextSibling?r.insertBefore(t,n.nextSibling):r.appendChild(t):r.insertBefore(t,r.firstChild),u.push(t);else if("bottom"===e.insertAt)r.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=c(e.insertAt.before,r);r.insertBefore(t,o)}}function h(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=u.indexOf(e);t>=0&&u.splice(t,1)}function v(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return r.nc}();n&&(e.attrs.nonce=n)}return m(t,e.attrs),b(e,t),t}function m(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})}function _(e,t){var r,n,o,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var a=f++;r=s||(s=v(t)),n=x.bind(null,r,a,!1),o=x.bind(null,r,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),b(e,t),t}(t),n=function(e,t,r){var n=r.css,o=r.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(n=l(n));o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([n],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(a),c&&URL.revokeObjectURL(c)}.bind(null,r,t),o=function(){h(r),r.href&&URL.revokeObjectURL(r.href)}):(r=v(t),n=function(e,t){var r=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}.bind(null,r),o=function(){h(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=d(e,t);return p(r,t),function(e){for(var n=[],o=0;o<r.length;o++){var a=r[o];(c=i[a.id]).refs--,n.push(c)}e&&p(d(e,t),t);for(o=0;o<n.length;o++){var c;if(0===(c=n[o]).refs){for(var s=0;s<c.parts.length;s++)c.parts[s]();delete i[c.id]}}}};var y,g=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function x(e,t,r,n){var o=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},4:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.auto="auto",e.block="block",e.inherit="",e.lg="lg",e.md="md",e.none="none",e.sm="sm",e.xl="xl",e.xs="xs",e.xxl="xxl"}(t.SizeNS||(t.SizeNS={})),function(e){e.bottom="bottom",e.bottomLeft="bottom-left",e.bottomRight="bottom-right",e.center="center",e.left="left",e.leftBottom="left-bottom",e.leftTop="left-top",e.right="right",e.rightBottom="right-bottom",e.rightTop="right-top",e.top="top",e.topLeft="top-left",e.topRight="top-right"}(t.PlacementNS||(t.PlacementNS={}))},6:function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},9:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var r=t;return Object.keys(e).forEach(function(t){r[t]=e[t]}),r}},98:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),a=r(1),c=r(99),s=r(9),f=r(16),u=a.bind(c);t.Breadcrumbs=i.forwardRef(function(e,t){var r=e.className,a=e.children,c=o(e,["className","children"]);return i.createElement("nav",n({ref:t,className:u("core-breadcrumbs",r)},c),i.Children.toArray(a).filter(function(e){return e}).map(function(e,t){return i.createElement(i.Fragment,{key:"separator-"+t},t>0&&i.createElement(f.default,{className:u("core-breadcrumbs__separator"),icon:"chevron-right"}),e)}))}),t.Crumb=i.forwardRef(function(e,t){var r=e.className,a=e.children,c=e.active,s=o(e,["className","children","active"]);return i.createElement("span",n({ref:t,className:u("core-breadcrumbs__crumb",{"core-breadcrumbs__crumb--active":c},r)},s),a)}),t.Breadcrumbs.displayName="Breadcrumbs",t.Crumb.displayName="Breadcrumbs.Crumb",t.default=s.default({Crumb:t.Crumb},t.Breadcrumbs)},99:function(e,t,r){var n=r(100);"string"==typeof n&&(n=[[e.i,n,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};r(3)(n,o);n.locals&&(e.exports=n.locals)}})}); //# sourceMappingURL=Breadcrumbs.js.map