sharedui2 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +2 -2
- package/dist/shared.js +0 -3
package/package.json
CHANGED
package/dist/shared.js
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
/*! For license information please see shared.js.LICENSE.txt */
|
2
|
-
!function(n,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("React")):"function"===typeof define&&define.amd?define(["React"],e):"object"===typeof exports?exports.SharedLibrary=e(require("React")):n.SharedLibrary=e(n.React)}(this,(n=>(()=>{"use strict";var e={424:n=>{n.exports=function(n){var e=[];return e.toString=function(){return this.map((function(e){var o="",r="undefined"!==typeof e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),r&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=n(e),r&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(n,o,r,t,a){"string"===typeof n&&(n=[[null,n,void 0]]);var s={};if(r)for(var c=0;c<this.length;c++){var i=this[c][0];null!=i&&(s[i]=!0)}for(var A=0;A<n.length;A++){var u=[].concat(n[A]);r&&s[u[0]]||("undefined"!==typeof a&&("undefined"===typeof u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),t&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=t):u[4]="".concat(t)),e.push(u))}},e}},963:n=>{n.exports=function(n,e){return e||(e={}),n?(n=String(n.__esModule?n.default:n),/^['"].*['"]$/.test(n)&&(n=n.slice(1,-1)),e.hash&&(n+=e.hash),/["'() \t\n]|(%20)/.test(n)||e.needQuotes?'"'.concat(n.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):n):n}},136:n=>{n.exports=function(n){var e=n[1],o=n[3];if(!o)return e;if("function"===typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),t="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(t," */");return[e].concat([a]).join("\n")}return[e].join("\n")}},998:(n,e,o)=>{var r=o(883),t=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function A(n,e,o){var r,a={},A=null,u=null;for(r in void 0!==o&&(A=""+o),void 0!==e.key&&(A=""+e.key),void 0!==e.ref&&(u=e.ref),e)s.call(e,r)&&!i.hasOwnProperty(r)&&(a[r]=e[r]);if(n&&n.defaultProps)for(r in e=n.defaultProps)void 0===a[r]&&(a[r]=e[r]);return{$$typeof:t,type:n,key:A,ref:u,props:a,_owner:c.current}}e.jsx=A},446:(n,e,o)=>{n.exports=o(998)},994:(n,e,o)=>{o.d(e,{A:()=>b});var r=o(136),t=o.n(r),a=o(424),s=o.n(a),c=o(963),i=o.n(c),A=new URL(o(226),o.b),u=new URL(o(714),o.b),d=s()(t()),l=i()(A),p=i()(u);d.push([n.id,`.ws-button {\n cursor: pointer;\n display: inline-block;\n font-size: 16px;\n font-weight: 600;\n text-align: center;\n transition: background-color 0.1s ease, border 0.1s ease, color 0.1s ease;\n user-select: none;\n width: 100%;\n}\n.ws-button-default {\n border-radius: 20px;\n height: 40px;\n}\n.ws-button-baby {\n border-radius: 12px;\n height: 24px;\n}\n.ws-button-loading {\n background-color: #05758a;\n border: none;\n}\n.ws-button-loading-content-light {\n background-image: url(${l});\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n}\n.ws-button-loading-content-dark {\n background-image: url(${p});\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n}\n.ws-button:focus {\n outline: none;\n}\n.ws-button-primary,\n.ws-button-primary-loading {\n background-color: #05758a;\n border: none;\n color: #ffffff;\n}\n.ws-button-primary-loading {\n cursor: none;\n}\n.ws-button-primary:hover {\n background-color: #005463;\n}\n.ws-button-primary.disabled,\n.ws-button-primary[disabled] {\n background-color: #82bac4;\n border: none;\n cursor: none;\n}\n.ws-button-secondary,\n.ws-button-secondary-loading {\n background-color: #ffffff;\n border: 2px solid #05758a;\n color: #05758a;\n}\n.ws-button-secondary-loading {\n cursor: none;\n}\n.ws-button-secondary:hover {\n border: 2px solid #005463;\n color: #005463;\n}\n.ws-button-secondary.disabled,\n.ws-button-secondary[disabled] {\n background-color: #ffffff;\n border: 2px solid #82bac4;\n color: #82bac4;\n cursor: none;\n}\n`,"",{version:3,sources:["webpack://./src/components/ws-button/ws-button.component.less"],names:[],mappings:"AAIA;EACI,eAAA;EACA,qBAAA;EACA,eAAA;EACA,gBAAA;EACA,kBAAA;EACA,yEAAA;EACA,iBAAA;EACA,WAAA;AAHJ;AAKI;EACI,mBAAA;EACA,YAAA;AAHR;AAMI;EACI,mBAAA;EACA,YAAA;AAJR;AAOI;EACI,yBAAA;EACA,YAAA;AALR;AAQI;EACI,yDAAA;EACA,4BAAA;EACA,cAAA;EACA,YAAA;EACA,cAAA;EACA,WAAA;AANR;AAUI;EACI,yDAAA;EACA,4BAAA;EACA,cAAA;EACA,YAAA;EACA,cAAA;EACA,WAAA;AARR;AAYA;EACI,aAAA;AAVJ;AAcA;;EAEI,yBAAA;EACA,YAAA;EACA,cAAA;AAZJ;AAeA;EACI,YAAA;AAbJ;AAgBA;EACI,yBAAA;AAdJ;AAiBA;;EAEI,yBAAA;EACA,YAAA;EACA,YAAA;AAfJ;AAmBA;;EAEI,yBAAA;EACA,yBAAA;EACA,cAAA;AAjBJ;AAoBA;EACI,YAAA;AAlBJ;AAqBA;EACI,yBAAA;EACA,cAAA;AAnBJ;AAsBA;;EAEI,yBAAA;EACA,yBAAA;EACA,cAAA;EACA,YAAA;AApBJ",sourcesContent:["// Copyright \xa9 2024. Cloud Software Group, Inc. All Rights Reserved. Confidential & Proprietary.\n\n@import (reference) '../../../theme.less';\n\n.ws-button {\n cursor: pointer;\n display: inline-block;\n font-size: 16px;\n font-weight: 600;\n text-align: center;\n transition: background-color 0.1s ease, border 0.1s ease, color 0.1s ease;\n user-select: none;\n width: 100%;\n\n &-default {\n border-radius: 20px;\n height: 40px;\n }\n\n &-baby {\n border-radius: 12px;\n height: 24px;\n }\n\n &-loading {\n background-color: @ws-button-primary-background-color;\n border: none;\n }\n\n &-loading-content-light {\n background-image: url('../../assets/spinner-light.svg');\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n \n }\n\n &-loading-content-dark {\n background-image: url('../../assets/spinner-dark.svg');\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n }\n}\n\n.ws-button:focus {\n outline: none;\n}\n\n// primary button\n.ws-button-primary, \n.ws-button-primary-loading {\n background-color: @ws-button-primary-background-color;\n border: none;\n color: @ws-button-primary-text-color;\n}\n\n.ws-button-primary-loading {\n cursor: none;\n}\n\n.ws-button-primary:hover {\n background-color: @ws-button-primary-background-color-hover;\n}\n\n.ws-button-primary.disabled, \n.ws-button-primary[disabled] {\n background-color: @ws-button-primary-background-color-disabled;\n border: none;\n cursor: none;\n}\n\n// secondary button\n.ws-button-secondary,\n.ws-button-secondary-loading {\n background-color: @ws-button-secondary-background-color;\n border: 2px solid @ws-button-secondary-border-color;\n color: @ws-button-secondary-text-color;\n}\n\n.ws-button-secondary-loading {\n cursor: none;\n}\n\n.ws-button-secondary:hover {\n border: 2px solid @ws-button-secondary-border-hover;\n color: @ws-button-secondary-text-color-hover;\n}\n\n.ws-button-secondary.disabled, \n.ws-button-secondary[disabled] {\n background-color: @ws-button-secondary-background-color-disabled;\n border: 2px solid @ws-button-secondary-border-hover-disabled;\n color: @ws-button-secondary-text-color-disabled;\n cursor: none;\n}\n"],sourceRoot:""}]);const b=d},186:n=>{var e=[];function o(n){for(var o=-1,r=0;r<e.length;r++)if(e[r].identifier===n){o=r;break}return o}function r(n,r){for(var a={},s=[],c=0;c<n.length;c++){var i=n[c],A=r.base?i[0]+r.base:i[0],u=a[A]||0,d="".concat(A," ").concat(u);a[A]=u+1;var l=o(d),p={css:i[1],media:i[2],sourceMap:i[3],supports:i[4],layer:i[5]};if(-1!==l)e[l].references++,e[l].updater(p);else{var b=t(p,r);r.byIndex=c,e.splice(c,0,{identifier:d,updater:b,references:1})}s.push(d)}return s}function t(n,e){var o=e.domAPI(e);o.update(n);return function(e){if(e){if(e.css===n.css&&e.media===n.media&&e.sourceMap===n.sourceMap&&e.supports===n.supports&&e.layer===n.layer)return;o.update(n=e)}else o.remove()}}n.exports=function(n,t){var a=r(n=n||[],t=t||{});return function(n){n=n||[];for(var s=0;s<a.length;s++){var c=o(a[s]);e[c].references--}for(var i=r(n,t),A=0;A<a.length;A++){var u=o(a[A]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}a=i}}},433:n=>{var e={};n.exports=function(n,o){var r=function(n){if("undefined"===typeof e[n]){var o=document.querySelector(n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(r){o=null}e[n]=o}return e[n]}(n);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},990:n=>{n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},626:(n,e,o)=>{n.exports=function(n){var e=o.nc;e&&n.setAttribute("nonce",e)}},155:n=>{n.exports=function(n){if("undefined"===typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(o){!function(n,e,o){var r="";o.supports&&(r+="@supports (".concat(o.supports,") {")),o.media&&(r+="@media ".concat(o.media," {"));var t="undefined"!==typeof o.layer;t&&(r+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),r+=o.css,t&&(r+="}"),o.media&&(r+="}"),o.supports&&(r+="}");var a=o.sourceMap;a&&"undefined"!==typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(r,n,e.options)}(e,n,o)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(e)}}}},827:n=>{n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},714:(n,e,o)=>{n.exports=o.p+"65512c09253771cf0875.svg"},226:(n,e,o)=>{n.exports=o.p+"b0f8f368da08f13ab31d.svg"},883:e=>{e.exports=n}},o={};function r(n){var t=o[n];if(void 0!==t)return t.exports;var a=o[n]={id:n,exports:{}};return e[n](a,a.exports,r),a.exports}r.m=e,r.n=n=>{var e=n&&n.__esModule?()=>n.default:()=>n;return r.d(e,{a:e}),e},r.d=(n,e)=>{for(var o in e)r.o(e,o)&&!r.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"===typeof window)return window}}(),r.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),r.r=n=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},(()=>{var n;r.g.importScripts&&(n=r.g.location+"");var e=r.g.document;if(!n&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(n=e.currentScript.src),!n)){var o=e.getElementsByTagName("script");if(o.length)for(var t=o.length-1;t>-1&&(!n||!/^http(s?):/.test(n));)n=o[t--].src}if(!n)throw new Error("Automatic publicPath is not supported in this browser");n=n.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=n})(),r.b=document.baseURI||self.location.href,r.nc=void 0;var t={};r.r(t),r.d(t,{WsButton:()=>w});r(883);var a=r(186),s=r.n(a),c=r(155),i=r.n(c),A=r(433),u=r.n(A),d=r(626),l=r.n(d),p=r(990),b=r.n(p),f=r(827),y=r.n(f),g=r(994),h={};h.styleTagTransform=y(),h.setAttributes=l(),h.insert=u().bind(null,"head"),h.domAPI=i(),h.insertStyleElement=b();s()(g.A,h);g.A&&g.A.locals&&g.A.locals;var m=r(446);const w=function(n){let{id:e,children:o,disabled:r,isLoading:t,name:a,onClick:s,size:c,tabIndex:i,type:A,value:u,variant:d}=n;const l=["ws-button"];c&&"default"!==c?"baby"===c&&l.push("ws-button-baby"):l.push("ws-button-default");let p=null;return t?(l.push("ws-button-loading"),"primary"===d?p=(0,m.jsx)("div",{className:"ws-button-loading-content-light"}):"secondary"===d&&(p=(0,m.jsx)("div",{className:"ws-button-loading-content-dark"})),"primary"===d?l.push("ws-button-primary-loading"):"secondary"===d&&l.push("ws-button-secondary-loading")):"primary"===d?l.push("ws-button-primary"):"secondary"===d&&l.push("ws-button-secondary"),(0,m.jsx)("button",{"data-testid":"ws-button.component",className:l.join(" "),disabled:r,id:e,name:a,onClick:s,tabIndex:i,type:A,value:u,children:p||o})};return t})()));
|
3
|
-
//# sourceMappingURL=shared.js.map
|