@procore/core-react
Version:
JSX implementations for core-css
24 lines • 14.5 kB
JavaScript
!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 n="object"==typeof exports?t(require("react")):t(e.react);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=143)}({0:function(t,n){t.exports=e},1:function(e,t,n){var r;
/*!
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 n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(this&&this[r]||r);else if(Array.isArray(r))e.push(o.apply(this,r));else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(this&&this[a]||a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},143:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(0),c=n(1),s=n(144),f=n(16),l=n(9);!function(e){e.disabled="disabled",e.icon="icon",e.standard="standard"}(i=t.TokenVariantNS||(t.TokenVariantNS={}));var u=c.bind(s),p=a.forwardRef(function(e,t){var n,c=e.children,s=e.className,f=e.disabled,l=void 0!==f&&f,p=e.variant,d=void 0===p?i.standard:p,h=o(e,["children","className","disabled","variant"]);return a.createElement("div",r({className:u("core-token",(n={},n["core-token--"+i.disabled]=l,n["core-token--"+d]=d,n),s)},h),c)}),d=a.forwardRef(function(e,t){var n=e.className,i=e.icon,c=o(e,["className","icon"]);return a.createElement(f.default,r({ref:t,icon:i,className:u("core-token__icon",n)},c))}),h=a.forwardRef(function(e,t){var n=e.children,i=e.className,c=o(e,["children","className"]);return a.createElement("span",r({ref:t,className:u("core-token__label",i)},c),n)});p.displayName="Token",d.displayName="Token.Icon",h.displayName="Token.Label",t.default=l.default({Icon:d,Label:h},p)},144:function(e,t,n){var r=n(145);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o);r.locals&&(e.exports=r.locals)},145:function(e,t,n){(t=e.exports=n(2)(!1)).push([e.i,"._2mikp-7_3_0 {\n align-items: center;\n background-color: #006ddf;\n border-radius: 200px;\n display: inline-flex;\n line-height: 1;\n max-width: 360px;\n min-width: 48px;\n padding: 4px 12px; }\n ._2mikp-7_3_0:hover, .lZil8-7_3_0 {\n background-color: #003aa1; }\n ._2mikp-7_3_0:disabled, .LZ7Tc-7_3_0 {\n background-color: #bfbfbf;\n pointer-events: none; }\n ._1ZQJj-7_3_0 {\n min-width: 64px;\n padding-bottom: 2px;\n padding-right: 4px;\n padding-top: 2px; }\n ._3sEPZ-7_3_0 {\n color: #ffffff;\n cursor: pointer;\n font-size: 16px;\n height: 16px;\n margin-bottom: 2px;\n margin-left: 8px;\n margin-right: 1px;\n margin-top: 2px;\n text-align: center;\n width: 16px; }\n ._3sEPZ-7_3_0:hover, .pZwVz-7_3_0 {\n background-color: #ffffff;\n border-radius: 100%;\n color: #003aa1; }\n ._3CSKJ-7_3_0 {\n color: #ffffff;\n font-size: 13px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap; }\n",""]),t.locals={"core-token":"_2mikp-7_3_0","core-token--hover":"lZil8-7_3_0","core-token--disabled":"LZ7Tc-7_3_0","core-token--icon":"_1ZQJj-7_3_0","core-token__icon":"_3sEPZ-7_3_0","core-token__icon--hover":"pZwVz-7_3_0","core-token__label":"_3CSKJ-7_3_0"}},16:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(0),c=n(1),s=n(23),f=n(24),l=n(4);!function(e){e.none="",e.hoverCircle="hover-circle",e.hoverFill="hover-fill"}(i=t.IconVariantNS||(t.IconVariantNS={}));var u=c.bind(f),p=a.forwardRef(function(e,t){var n,c=e.className,f=e.clickable,p=void 0!==f&&f,d=e.icon,h=e.size,v=void 0===h?l.SizeNS.inherit:h,b=e.variant,_=void 0===b?i.none:b,m=o(e,["className","clickable","icon","size","variant"]);return a.createElement("span",r({ref:t,className:s.default("ci","ci-"+d,u("core-icon",(n={"core-icon--clickable":p},n["core-icon--"+v]=v,n["core-icon--"+_]=_,n)),c)},m))});p.displayName="Icon",t.default=p},2:function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];null!=a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},23:function(e,t,n){var r;
/*!
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 n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},24:function(e,t,n){var r=n(25);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(3)(r,o);r.locals&&(e.exports=r.locals)},25:function(e,t,n){(t=e.exports=n(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,n){var r,o,i={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),c=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),s=null,f=0,l=[],u=n(6);function p(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=i[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(m(r.parts[a],t))}else{var c=[];for(a=0;a<r.parts.length;a++)c.push(m(r.parts[a],t));i[r.id]={id:r.id,refs:1,parts:c}}}}function d(e,t){for(var n=[],r={},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]};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}function h(e,t){var n=c(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),l.push(t);else if("bottom"===e.insertAt)n.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,n);n.insertBefore(t,o)}}function v(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=l.indexOf(e);t>=0&&l.splice(t,1)}function b(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return _(t,e.attrs),h(e,t),t}function _(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function m(e,t){var n,r,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++;n=s||(s=b(t)),r=x.bind(null,n,a,!1),o=x.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",_(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=u(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(a),c&&URL.revokeObjectURL(c)}.bind(null,n,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(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 n=d(e,t);return p(n,t),function(e){for(var r=[],o=0;o<n.length;o++){var a=n[o];(c=i[a.id]).refs--,r.push(c)}e&&p(d(e,t),t);for(o=0;o<r.length;o++){var c;if(0===(c=r[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,n,r){var o=n?"":r.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,n){"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 n=t.protocol+"//"+t.host,r=n+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("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},9:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var n=t;return Object.keys(e).forEach(function(t){n[t]=e[t]}),n}}})});
//# sourceMappingURL=Token.js.map