@hudoro/badges
Advanced tools
Comparing version 0.1.1-beta.9 to 0.1.1-beta.10
@@ -60,6 +60,6 @@ import kr from "react"; | ||
{ | ||
var a = C.ReactDebugCurrentFrame, s = a.getStackAddendum(); | ||
s !== "" && (e += "%s", n = n.concat([s])); | ||
var t = n.map(function(i) { | ||
return String(i); | ||
var a = C.ReactDebugCurrentFrame, i = a.getStackAddendum(); | ||
i !== "" && (e += "%s", n = n.concat([i])); | ||
var t = n.map(function(s) { | ||
return String(s); | ||
}); | ||
@@ -82,4 +82,4 @@ t.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, t); | ||
return a; | ||
var s = e.displayName || e.name || ""; | ||
return s !== "" ? n + "(" + s + ")" : n; | ||
var i = e.displayName || e.name || ""; | ||
return i !== "" ? n + "(" + i + ")" : n; | ||
} | ||
@@ -124,5 +124,5 @@ function er(r) { | ||
case T: { | ||
var s = r, t = s._payload, i = s._init; | ||
var i = r, t = i._payload, s = i._init; | ||
try { | ||
return E(i(t)); | ||
return E(s(t)); | ||
} catch { | ||
@@ -135,3 +135,3 @@ return null; | ||
} | ||
var S = Object.assign, D = 0, nr, ar, or, ir, sr, tr, dr; | ||
var S = Object.assign, D = 0, nr, ar, or, sr, ir, tr, dr; | ||
function ur() { | ||
@@ -143,3 +143,3 @@ } | ||
if (D === 0) { | ||
nr = console.log, ar = console.info, or = console.warn, ir = console.error, sr = console.group, tr = console.groupCollapsed, dr = console.groupEnd; | ||
nr = console.log, ar = console.info, or = console.warn, sr = console.error, ir = console.group, tr = console.groupCollapsed, dr = console.groupEnd; | ||
var r = { | ||
@@ -183,6 +183,6 @@ configurable: !0, | ||
error: S({}, r, { | ||
value: ir | ||
value: sr | ||
}), | ||
group: S({}, r, { | ||
value: sr | ||
value: ir | ||
}), | ||
@@ -206,4 +206,4 @@ groupCollapsed: S({}, r, { | ||
throw Error(); | ||
} catch (s) { | ||
var a = s.stack.trim().match(/\n( *(at )?)/); | ||
} catch (i) { | ||
var a = i.stack.trim().match(/\n( *(at )?)/); | ||
U = a && a[1] || ""; | ||
@@ -230,3 +230,3 @@ } | ||
B = !0; | ||
var s = Error.prepareStackTrace; | ||
var i = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
@@ -237,6 +237,6 @@ var t; | ||
if (e) { | ||
var i = function() { | ||
var s = function() { | ||
throw Error(); | ||
}; | ||
if (Object.defineProperty(i.prototype, "props", { | ||
if (Object.defineProperty(s.prototype, "props", { | ||
set: function() { | ||
@@ -247,14 +247,14 @@ throw Error(); | ||
try { | ||
Reflect.construct(i, []); | ||
Reflect.construct(s, []); | ||
} catch (R) { | ||
a = R; | ||
} | ||
Reflect.construct(r, [], i); | ||
Reflect.construct(r, [], s); | ||
} else { | ||
try { | ||
i.call(); | ||
s.call(); | ||
} catch (R) { | ||
a = R; | ||
} | ||
r.call(i.prototype); | ||
r.call(s.prototype); | ||
} | ||
@@ -289,3 +289,3 @@ } else { | ||
} finally { | ||
B = !1, M.current = t, Nr(), Error.prepareStackTrace = s; | ||
B = !1, M.current = t, Nr(), Error.prepareStackTrace = i; | ||
} | ||
@@ -322,5 +322,5 @@ var j = r ? r.displayName || r.name : "", xr = j ? W(j) : ""; | ||
case T: { | ||
var a = r, s = a._payload, t = a._init; | ||
var a = r, i = a._payload, t = a._init; | ||
try { | ||
return N(t(s), e, n); | ||
return N(t(i), e, n); | ||
} catch { | ||
@@ -340,18 +340,18 @@ } | ||
} | ||
function Mr(r, e, n, a, s) { | ||
function Mr(r, e, n, a, i) { | ||
{ | ||
var t = Function.call.bind(L); | ||
for (var i in r) | ||
if (t(r, i)) { | ||
for (var s in r) | ||
if (t(r, s)) { | ||
var o = void 0; | ||
try { | ||
if (typeof r[i] != "function") { | ||
var f = Error((a || "React class") + ": " + n + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
if (typeof r[s] != "function") { | ||
var f = Error((a || "React class") + ": " + n + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw f.name = "Invariant Violation", f; | ||
} | ||
o = r[i](e, i, a, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
o = r[s](e, s, a, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (d) { | ||
o = d; | ||
} | ||
o && !(o instanceof Error) && (z(s), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", n, i, typeof o), z(null)), o instanceof Error && !(o.message in cr) && (cr[o.message] = !0, z(s), c("Failed %s type: %s", n, o.message), z(null)); | ||
o && !(o instanceof Error) && (z(i), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", n, s, typeof o), z(null)), o instanceof Error && !(o.message in cr) && (cr[o.message] = !0, z(i), c("Failed %s type: %s", n, o.message), z(null)); | ||
} | ||
@@ -435,3 +435,3 @@ } | ||
} | ||
var Qr = function(r, e, n, a, s, t, i) { | ||
var Qr = function(r, e, n, a, i, t, s) { | ||
var o = { | ||
@@ -444,3 +444,3 @@ // This tag allows us to uniquely identify this as a React Element | ||
ref: n, | ||
props: i, | ||
props: s, | ||
// Record the component responsible for creating this element. | ||
@@ -463,21 +463,21 @@ _owner: t | ||
writable: !1, | ||
value: s | ||
value: i | ||
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o; | ||
}; | ||
function re(r, e, n, a, s) { | ||
function re(r, e, n, a, i) { | ||
{ | ||
var t, i = {}, o = null, f = null; | ||
n !== void 0 && (hr(n), o = "" + n), Kr(e) && (hr(e.key), o = "" + e.key), Jr(e) && (f = e.ref, Hr(e, s)); | ||
var t, s = {}, o = null, f = null; | ||
n !== void 0 && (hr(n), o = "" + n), Kr(e) && (hr(e.key), o = "" + e.key), Jr(e) && (f = e.ref, Hr(e, i)); | ||
for (t in e) | ||
L.call(e, t) && !Gr.hasOwnProperty(t) && (i[t] = e[t]); | ||
L.call(e, t) && !Gr.hasOwnProperty(t) && (s[t] = e[t]); | ||
if (r && r.defaultProps) { | ||
var d = r.defaultProps; | ||
for (t in d) | ||
i[t] === void 0 && (i[t] = d[t]); | ||
s[t] === void 0 && (s[t] = d[t]); | ||
} | ||
if (o || f) { | ||
var u = typeof r == "function" ? r.displayName || r.name || "Unknown" : r; | ||
o && Xr(i, u), f && Zr(i, u); | ||
o && Xr(s, u), f && Zr(s, u); | ||
} | ||
return Qr(r, o, f, s, a, F.current, i); | ||
return Qr(r, o, f, i, a, F.current, s); | ||
} | ||
@@ -559,6 +559,6 @@ } | ||
else if (r) { | ||
var s = Cr(r); | ||
if (typeof s == "function" && s !== r.entries) | ||
for (var t = s.call(r), i; !(i = t.next()).done; ) | ||
H(i.value) && Er(i.value, e); | ||
var i = Cr(r); | ||
if (typeof i == "function" && i !== r.entries) | ||
for (var t = i.call(r), s; !(s = t.next()).done; ) | ||
H(s.value) && Er(s.value, e); | ||
} | ||
@@ -586,4 +586,4 @@ } | ||
K = !0; | ||
var s = E(e); | ||
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown"); | ||
var i = E(e); | ||
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown"); | ||
} | ||
@@ -605,9 +605,9 @@ typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
} | ||
function _r(r, e, n, a, s, t) { | ||
function _r(r, e, n, a, i, t) { | ||
{ | ||
var i = $r(r); | ||
if (!i) { | ||
var s = $r(r); | ||
if (!s) { | ||
var o = ""; | ||
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); | ||
var f = ee(s); | ||
var f = ee(i); | ||
f ? o += f : o += mr(); | ||
@@ -617,6 +617,6 @@ var d; | ||
} | ||
var u = re(r, e, n, s, t); | ||
var u = re(r, e, n, i, t); | ||
if (u == null) | ||
return u; | ||
if (i) { | ||
if (s) { | ||
var p = e.children; | ||
@@ -637,9 +637,9 @@ if (p !== void 0) | ||
} | ||
function ie(r, e, n) { | ||
function se(r, e, n) { | ||
return _r(r, e, n, !0); | ||
} | ||
function se(r, e, n) { | ||
function ie(r, e, n) { | ||
return _r(r, e, n, !1); | ||
} | ||
var te = se, de = ie; | ||
var te = ie, de = se; | ||
I.Fragment = m, I.jsx = te, I.jsxs = de; | ||
@@ -738,2 +738,17 @@ }()), I; | ||
--hsd-ui-badges-dark-border-color-true: var(--hsd-ui-color-gray-700, #374151); | ||
/* purple */ | ||
--hsd-ui-badges-purple-border-color-false: var( | ||
--hsd-ui-color-gray-50, | ||
#f9fafb | ||
); | ||
--hsd-ui-badges-purple-background-color: var( | ||
--hsd-ui-color-purple-50, | ||
#e9def5 | ||
); | ||
--hsd-ui-badges-purple-color: var(--hsd-ui-color-purple-500, #7e39c5); | ||
--hsd-ui-badges-purple-border-color-true: var( | ||
--hsd-ui-color-purple-500, | ||
#7e39c5 | ||
); | ||
} | ||
@@ -837,2 +852,10 @@ | ||
} | ||
.hudoro-badges-purple { | ||
border-color: var(--hsd-ui-badges-purple-border-color-false); | ||
background: var(--hsd-ui-badges-purple-background-color); | ||
color: var(--hsd-ui-badges-purple-color); | ||
} | ||
.hudoro-badges-purple.hudoro-badges-border { | ||
border-color: var(--hsd-ui-badges-purple-border-color-true); | ||
} | ||
`, Sr = "hudoro-badges-styles", fe = (g) => { | ||
@@ -839,0 +862,0 @@ if (!document.getElementById(Sr)) { |
@@ -17,7 +17,7 @@ (function(_,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],O):(_=typeof globalThis<"u"?globalThis:_||self,O(_.Badges={},_.React))})(this,function(_,O){"use strict";var B={exports:{}},A={};/** | ||
* LICENSE file in the root directory of this source tree. | ||
*/var nr;function Pr(){return nr||(nr=1,process.env.NODE_ENV!=="production"&&function(){var g=O,h=Symbol.for("react.element"),x=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),T=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),or=Symbol.iterator,Ar="@@iterator";function Ir(r){if(r===null||typeof r!="object")return null;var e=or&&r[or]||r[Ar];return typeof e=="function"?e:null}var j=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(r){{for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a<e;a++)n[a-1]=arguments[a];Wr("error",r,n)}}function Wr(r,e,n){{var a=j.ReactDebugCurrentFrame,s=a.getStackAddendum();s!==""&&(e+="%s",n=n.concat([s]));var t=n.map(function(i){return String(i)});t.unshift("Warning: "+e),Function.prototype.apply.call(console[r],console,t)}}var Yr=!1,$r=!1,Nr=!1,Lr=!1,zr=!1,ir;ir=Symbol.for("react.module.reference");function Vr(r){return!!(typeof r=="string"||typeof r=="function"||r===m||r===C||zr||r===b||r===P||r===v||Lr||r===N||Yr||$r||Nr||typeof r=="object"&&r!==null&&(r.$$typeof===S||r.$$typeof===y||r.$$typeof===w||r.$$typeof===T||r.$$typeof===l||r.$$typeof===ir||r.getModuleId!==void 0))}function Mr(r,e,n){var a=r.displayName;if(a)return a;var s=e.displayName||e.name||"";return s!==""?n+"("+s+")":n}function sr(r){return r.displayName||"Context"}function E(r){if(r==null)return null;if(typeof r.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case m:return"Fragment";case x:return"Portal";case C:return"Profiler";case b:return"StrictMode";case P:return"Suspense";case v:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case T:var e=r;return sr(e)+".Consumer";case w:var n=r;return sr(n._context)+".Provider";case l:return Mr(r,r.render,"ForwardRef");case y:var a=r.displayName||null;return a!==null?a:E(r.type)||"Memo";case S:{var s=r,t=s._payload,i=s._init;try{return E(i(t))}catch{return null}}}return null}var k=Object.assign,W=0,tr,dr,ur,lr,cr,fr,gr;function hr(){}hr.__reactDisabledLog=!0;function Ur(){{if(W===0){tr=console.log,dr=console.info,ur=console.warn,lr=console.error,cr=console.group,fr=console.groupCollapsed,gr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:hr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}W++}}function Br(){{if(W--,W===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},r,{value:tr}),info:k({},r,{value:dr}),warn:k({},r,{value:ur}),error:k({},r,{value:lr}),group:k({},r,{value:cr}),groupCollapsed:k({},r,{value:fr}),groupEnd:k({},r,{value:gr})})}W<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=j.ReactCurrentDispatcher,J;function L(r,e,n){{if(J===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);J=a&&a[1]||""}return` | ||
`+J+r}}var K=!1,z;{var Gr=typeof WeakMap=="function"?WeakMap:Map;z=new Gr}function br(r,e){if(!r||K)return"";{var n=z.get(r);if(n!==void 0)return n}var a;K=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var t;t=q.current,q.current=null,Ur();try{if(e){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(R){a=R}Reflect.construct(r,[],i)}else{try{i.call()}catch(R){a=R}r.call(i.prototype)}}else{try{throw Error()}catch(R){a=R}r()}}catch(R){if(R&&a&&typeof R.stack=="string"){for(var o=R.stack.split(` | ||
*/var nr;function Pr(){return nr||(nr=1,process.env.NODE_ENV!=="production"&&function(){var g=O,h=Symbol.for("react.element"),x=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),T=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),or=Symbol.iterator,Ar="@@iterator";function Ir(r){if(r===null||typeof r!="object")return null;var e=or&&r[or]||r[Ar];return typeof e=="function"?e:null}var j=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(r){{for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a<e;a++)n[a-1]=arguments[a];Wr("error",r,n)}}function Wr(r,e,n){{var a=j.ReactDebugCurrentFrame,i=a.getStackAddendum();i!==""&&(e+="%s",n=n.concat([i]));var t=n.map(function(s){return String(s)});t.unshift("Warning: "+e),Function.prototype.apply.call(console[r],console,t)}}var Yr=!1,$r=!1,Nr=!1,Lr=!1,zr=!1,sr;sr=Symbol.for("react.module.reference");function Vr(r){return!!(typeof r=="string"||typeof r=="function"||r===m||r===C||zr||r===b||r===P||r===v||Lr||r===N||Yr||$r||Nr||typeof r=="object"&&r!==null&&(r.$$typeof===S||r.$$typeof===y||r.$$typeof===w||r.$$typeof===T||r.$$typeof===l||r.$$typeof===sr||r.getModuleId!==void 0))}function Mr(r,e,n){var a=r.displayName;if(a)return a;var i=e.displayName||e.name||"";return i!==""?n+"("+i+")":n}function ir(r){return r.displayName||"Context"}function E(r){if(r==null)return null;if(typeof r.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case m:return"Fragment";case x:return"Portal";case C:return"Profiler";case b:return"StrictMode";case P:return"Suspense";case v:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case T:var e=r;return ir(e)+".Consumer";case w:var n=r;return ir(n._context)+".Provider";case l:return Mr(r,r.render,"ForwardRef");case y:var a=r.displayName||null;return a!==null?a:E(r.type)||"Memo";case S:{var i=r,t=i._payload,s=i._init;try{return E(s(t))}catch{return null}}}return null}var k=Object.assign,W=0,tr,dr,ur,lr,cr,fr,gr;function hr(){}hr.__reactDisabledLog=!0;function Ur(){{if(W===0){tr=console.log,dr=console.info,ur=console.warn,lr=console.error,cr=console.group,fr=console.groupCollapsed,gr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:hr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}W++}}function Br(){{if(W--,W===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},r,{value:tr}),info:k({},r,{value:dr}),warn:k({},r,{value:ur}),error:k({},r,{value:lr}),group:k({},r,{value:cr}),groupCollapsed:k({},r,{value:fr}),groupEnd:k({},r,{value:gr})})}W<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=j.ReactCurrentDispatcher,J;function L(r,e,n){{if(J===void 0)try{throw Error()}catch(i){var a=i.stack.trim().match(/\n( *(at )?)/);J=a&&a[1]||""}return` | ||
`+J+r}}var K=!1,z;{var Gr=typeof WeakMap=="function"?WeakMap:Map;z=new Gr}function br(r,e){if(!r||K)return"";{var n=z.get(r);if(n!==void 0)return n}var a;K=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var t;t=q.current,q.current=null,Ur();try{if(e){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(R){a=R}Reflect.construct(r,[],s)}else{try{s.call()}catch(R){a=R}r.call(s.prototype)}}else{try{throw Error()}catch(R){a=R}r()}}catch(R){if(R&&a&&typeof R.stack=="string"){for(var o=R.stack.split(` | ||
`),f=a.stack.split(` | ||
`),d=o.length-1,u=f.length-1;d>=1&&u>=0&&o[d]!==f[u];)u--;for(;d>=1&&u>=0;d--,u--)if(o[d]!==f[u]){if(d!==1||u!==1)do if(d--,u--,u<0||o[d]!==f[u]){var p=` | ||
`+o[d].replace(" at new "," at ");return r.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",r.displayName)),typeof r=="function"&&z.set(r,p),p}while(d>=1&&u>=0);break}}}finally{K=!1,q.current=t,Br(),Error.prepareStackTrace=s}var F=r?r.displayName||r.name:"",Or=F?L(F):"";return typeof r=="function"&&z.set(r,Or),Or}function qr(r,e,n){return br(r,!1)}function Jr(r){var e=r.prototype;return!!(e&&e.isReactComponent)}function V(r,e,n){if(r==null)return"";if(typeof r=="function")return br(r,Jr(r));if(typeof r=="string")return L(r);switch(r){case P:return L("Suspense");case v:return L("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case l:return qr(r.render);case y:return V(r.type,e,n);case S:{var a=r,s=a._payload,t=a._init;try{return V(t(s),e,n)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,vr={},pr=j.ReactDebugCurrentFrame;function U(r){if(r){var e=r._owner,n=V(r.type,r._source,e?e.type:null);pr.setExtraStackFrame(n)}else pr.setExtraStackFrame(null)}function Kr(r,e,n,a,s){{var t=Function.call.bind(M);for(var i in r)if(t(r,i)){var o=void 0;try{if(typeof r[i]!="function"){var f=Error((a||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}o=r[i](e,i,a,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){o=d}o&&!(o instanceof Error)&&(U(s),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",n,i,typeof o),U(null)),o instanceof Error&&!(o.message in vr)&&(vr[o.message]=!0,U(s),c("Failed %s type: %s",n,o.message),U(null))}}}var Hr=Array.isArray;function H(r){return Hr(r)}function Xr(r){{var e=typeof Symbol=="function"&&Symbol.toStringTag,n=e&&r[Symbol.toStringTag]||r.constructor.name||"Object";return n}}function Zr(r){try{return mr(r),!1}catch{return!0}}function mr(r){return""+r}function yr(r){if(Zr(r))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xr(r)),mr(r)}var Y=j.ReactCurrentOwner,Qr={key:!0,ref:!0,__self:!0,__source:!0},Er,Rr,X;X={};function re(r){if(M.call(r,"ref")){var e=Object.getOwnPropertyDescriptor(r,"ref").get;if(e&&e.isReactWarning)return!1}return r.ref!==void 0}function ee(r){if(M.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return r.key!==void 0}function ne(r,e){if(typeof r.ref=="string"&&Y.current&&e&&Y.current.stateNode!==e){var n=E(Y.current.type);X[n]||(c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',E(Y.current.type),r.ref),X[n]=!0)}}function ae(r,e){{var n=function(){Er||(Er=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"key",{get:n,configurable:!0})}}function oe(r,e){{var n=function(){Rr||(Rr=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"ref",{get:n,configurable:!0})}}var ie=function(r,e,n,a,s,t,i){var o={$$typeof:h,type:r,key:e,ref:n,props:i,_owner:t};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function se(r,e,n,a,s){{var t,i={},o=null,f=null;n!==void 0&&(yr(n),o=""+n),ee(e)&&(yr(e.key),o=""+e.key),re(e)&&(f=e.ref,ne(e,s));for(t in e)M.call(e,t)&&!Qr.hasOwnProperty(t)&&(i[t]=e[t]);if(r&&r.defaultProps){var d=r.defaultProps;for(t in d)i[t]===void 0&&(i[t]=d[t])}if(o||f){var u=typeof r=="function"?r.displayName||r.name||"Unknown":r;o&&ae(i,u),f&&oe(i,u)}return ie(r,o,f,s,a,Y.current,i)}}var Z=j.ReactCurrentOwner,_r=j.ReactDebugCurrentFrame;function D(r){if(r){var e=r._owner,n=V(r.type,r._source,e?e.type:null);_r.setExtraStackFrame(n)}else _r.setExtraStackFrame(null)}var Q;Q=!1;function rr(r){return typeof r=="object"&&r!==null&&r.$$typeof===h}function xr(){{if(Z.current){var r=E(Z.current.type);if(r)return` | ||
`+o[d].replace(" at new "," at ");return r.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",r.displayName)),typeof r=="function"&&z.set(r,p),p}while(d>=1&&u>=0);break}}}finally{K=!1,q.current=t,Br(),Error.prepareStackTrace=i}var F=r?r.displayName||r.name:"",Or=F?L(F):"";return typeof r=="function"&&z.set(r,Or),Or}function qr(r,e,n){return br(r,!1)}function Jr(r){var e=r.prototype;return!!(e&&e.isReactComponent)}function V(r,e,n){if(r==null)return"";if(typeof r=="function")return br(r,Jr(r));if(typeof r=="string")return L(r);switch(r){case P:return L("Suspense");case v:return L("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case l:return qr(r.render);case y:return V(r.type,e,n);case S:{var a=r,i=a._payload,t=a._init;try{return V(t(i),e,n)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,vr={},pr=j.ReactDebugCurrentFrame;function U(r){if(r){var e=r._owner,n=V(r.type,r._source,e?e.type:null);pr.setExtraStackFrame(n)}else pr.setExtraStackFrame(null)}function Kr(r,e,n,a,i){{var t=Function.call.bind(M);for(var s in r)if(t(r,s)){var o=void 0;try{if(typeof r[s]!="function"){var f=Error((a||"React class")+": "+n+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}o=r[s](e,s,a,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){o=d}o&&!(o instanceof Error)&&(U(i),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",n,s,typeof o),U(null)),o instanceof Error&&!(o.message in vr)&&(vr[o.message]=!0,U(i),c("Failed %s type: %s",n,o.message),U(null))}}}var Hr=Array.isArray;function H(r){return Hr(r)}function Xr(r){{var e=typeof Symbol=="function"&&Symbol.toStringTag,n=e&&r[Symbol.toStringTag]||r.constructor.name||"Object";return n}}function Zr(r){try{return mr(r),!1}catch{return!0}}function mr(r){return""+r}function yr(r){if(Zr(r))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xr(r)),mr(r)}var Y=j.ReactCurrentOwner,Qr={key:!0,ref:!0,__self:!0,__source:!0},Er,Rr,X;X={};function re(r){if(M.call(r,"ref")){var e=Object.getOwnPropertyDescriptor(r,"ref").get;if(e&&e.isReactWarning)return!1}return r.ref!==void 0}function ee(r){if(M.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return r.key!==void 0}function ne(r,e){if(typeof r.ref=="string"&&Y.current&&e&&Y.current.stateNode!==e){var n=E(Y.current.type);X[n]||(c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',E(Y.current.type),r.ref),X[n]=!0)}}function ae(r,e){{var n=function(){Er||(Er=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"key",{get:n,configurable:!0})}}function oe(r,e){{var n=function(){Rr||(Rr=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"ref",{get:n,configurable:!0})}}var se=function(r,e,n,a,i,t,s){var o={$$typeof:h,type:r,key:e,ref:n,props:s,_owner:t};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function ie(r,e,n,a,i){{var t,s={},o=null,f=null;n!==void 0&&(yr(n),o=""+n),ee(e)&&(yr(e.key),o=""+e.key),re(e)&&(f=e.ref,ne(e,i));for(t in e)M.call(e,t)&&!Qr.hasOwnProperty(t)&&(s[t]=e[t]);if(r&&r.defaultProps){var d=r.defaultProps;for(t in d)s[t]===void 0&&(s[t]=d[t])}if(o||f){var u=typeof r=="function"?r.displayName||r.name||"Unknown":r;o&&ae(s,u),f&&oe(s,u)}return se(r,o,f,i,a,Y.current,s)}}var Z=j.ReactCurrentOwner,_r=j.ReactDebugCurrentFrame;function D(r){if(r){var e=r._owner,n=V(r.type,r._source,e?e.type:null);_r.setExtraStackFrame(n)}else _r.setExtraStackFrame(null)}var Q;Q=!1;function rr(r){return typeof r=="object"&&r!==null&&r.$$typeof===h}function xr(){{if(Z.current){var r=E(Z.current.type);if(r)return` | ||
@@ -28,3 +28,3 @@ Check the render method of \``+r+"`."}return""}}function te(r){{if(r!==void 0){var e=r.fileName.replace(/^.*[\\\/]/,""),n=r.lineNumber;return` | ||
Check the top-level render call using <`+n+">.")}return e}}function Tr(r,e){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var n=de(e);if(wr[n])return;wr[n]=!0;var a="";r&&r._owner&&r._owner!==Z.current&&(a=" It was passed a child from "+E(r._owner.type)+"."),D(r),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,a),D(null)}}function Sr(r,e){{if(typeof r!="object")return;if(H(r))for(var n=0;n<r.length;n++){var a=r[n];rr(a)&&Tr(a,e)}else if(rr(r))r._store&&(r._store.validated=!0);else if(r){var s=Ir(r);if(typeof s=="function"&&s!==r.entries)for(var t=s.call(r),i;!(i=t.next()).done;)rr(i.value)&&Tr(i.value,e)}}}function ue(r){{var e=r.type;if(e==null||typeof e=="string")return;var n;if(typeof e=="function")n=e.propTypes;else if(typeof e=="object"&&(e.$$typeof===l||e.$$typeof===y))n=e.propTypes;else return;if(n){var a=E(e);Kr(n,r.props,"prop",a,r)}else if(e.PropTypes!==void 0&&!Q){Q=!0;var s=E(e);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof e.getDefaultProps=="function"&&!e.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function le(r){{for(var e=Object.keys(r.props),n=0;n<e.length;n++){var a=e[n];if(a!=="children"&&a!=="key"){D(r),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),D(null);break}}r.ref!==null&&(D(r),c("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function kr(r,e,n,a,s,t){{var i=Vr(r);if(!i){var o="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var f=te(s);f?o+=f:o+=xr();var d;r===null?d="null":H(r)?d="array":r!==void 0&&r.$$typeof===h?(d="<"+(E(r.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):d=typeof r,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,o)}var u=se(r,e,n,s,t);if(u==null)return u;if(i){var p=e.children;if(p!==void 0)if(a)if(H(p)){for(var F=0;F<p.length;F++)Sr(p[F],r);Object.freeze&&Object.freeze(p)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Sr(p,r)}return r===m?le(u):ue(u),u}}function ce(r,e,n){return kr(r,e,n,!0)}function fe(r,e,n){return kr(r,e,n,!1)}var ge=fe,he=ce;I.Fragment=m,I.jsx=ge,I.jsxs=he}()),I}process.env.NODE_ENV==="production"?B.exports=Cr():B.exports=Pr();var G=B.exports;const jr=`@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap"); | ||
Check the top-level render call using <`+n+">.")}return e}}function Tr(r,e){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var n=de(e);if(wr[n])return;wr[n]=!0;var a="";r&&r._owner&&r._owner!==Z.current&&(a=" It was passed a child from "+E(r._owner.type)+"."),D(r),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,a),D(null)}}function Sr(r,e){{if(typeof r!="object")return;if(H(r))for(var n=0;n<r.length;n++){var a=r[n];rr(a)&&Tr(a,e)}else if(rr(r))r._store&&(r._store.validated=!0);else if(r){var i=Ir(r);if(typeof i=="function"&&i!==r.entries)for(var t=i.call(r),s;!(s=t.next()).done;)rr(s.value)&&Tr(s.value,e)}}}function ue(r){{var e=r.type;if(e==null||typeof e=="string")return;var n;if(typeof e=="function")n=e.propTypes;else if(typeof e=="object"&&(e.$$typeof===l||e.$$typeof===y))n=e.propTypes;else return;if(n){var a=E(e);Kr(n,r.props,"prop",a,r)}else if(e.PropTypes!==void 0&&!Q){Q=!0;var i=E(e);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof e.getDefaultProps=="function"&&!e.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function le(r){{for(var e=Object.keys(r.props),n=0;n<e.length;n++){var a=e[n];if(a!=="children"&&a!=="key"){D(r),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),D(null);break}}r.ref!==null&&(D(r),c("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function kr(r,e,n,a,i,t){{var s=Vr(r);if(!s){var o="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var f=te(i);f?o+=f:o+=xr();var d;r===null?d="null":H(r)?d="array":r!==void 0&&r.$$typeof===h?(d="<"+(E(r.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):d=typeof r,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,o)}var u=ie(r,e,n,i,t);if(u==null)return u;if(s){var p=e.children;if(p!==void 0)if(a)if(H(p)){for(var F=0;F<p.length;F++)Sr(p[F],r);Object.freeze&&Object.freeze(p)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Sr(p,r)}return r===m?le(u):ue(u),u}}function ce(r,e,n){return kr(r,e,n,!0)}function fe(r,e,n){return kr(r,e,n,!1)}var ge=fe,he=ce;I.Fragment=m,I.jsx=ge,I.jsxs=he}()),I}process.env.NODE_ENV==="production"?B.exports=Cr():B.exports=Pr();var G=B.exports;const jr=`@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap"); | ||
@@ -117,2 +117,17 @@ :root { | ||
--hsd-ui-badges-dark-border-color-true: var(--hsd-ui-color-gray-700, #374151); | ||
/* purple */ | ||
--hsd-ui-badges-purple-border-color-false: var( | ||
--hsd-ui-color-gray-50, | ||
#f9fafb | ||
); | ||
--hsd-ui-badges-purple-background-color: var( | ||
--hsd-ui-color-purple-50, | ||
#e9def5 | ||
); | ||
--hsd-ui-badges-purple-color: var(--hsd-ui-color-purple-500, #7e39c5); | ||
--hsd-ui-badges-purple-border-color-true: var( | ||
--hsd-ui-color-purple-500, | ||
#7e39c5 | ||
); | ||
} | ||
@@ -216,2 +231,10 @@ | ||
} | ||
.hudoro-badges-purple { | ||
border-color: var(--hsd-ui-badges-purple-border-color-false); | ||
background: var(--hsd-ui-badges-purple-background-color); | ||
color: var(--hsd-ui-badges-purple-color); | ||
} | ||
.hudoro-badges-purple.hudoro-badges-border { | ||
border-color: var(--hsd-ui-badges-purple-border-color-true); | ||
} | ||
`,ar="hudoro-badges-styles";(g=>{if(!document.getElementById(ar)){const h=document.createElement("style");h.id=ar,h.textContent=g,document.head.appendChild(h)}})(jr);const $={sm:16,md:18,lg:18,xl:20},Dr=({size:g="md",variant:h="info",text:x,LeftIcon:m,RightIcon:b,border:C,corners:w="rounded"})=>G.jsxs("div",{className:Fr(g,h,C,w),children:[m?G.jsx(m,{width:$[g],height:$[g]}):null,x,b?G.jsx(b,{width:$[g],height:$[g]}):null]}),Fr=(g,h,x,m)=>{let b=["hudoro-badges"];return g&&b.push(`hudoro-badges-${g}`),h&&b.push(`hudoro-badges-${h}`),x&&b.push("hudoro-badges-border"),m==="rounded"?b.push("hudoro-badges-rounded"):b.push("hudoro-badges-circular"),b.join(" ")};_.Badges=Dr,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}); |
import { SVGProps } from "react"; | ||
export interface IBadges { | ||
size?: "sm" | "md" | "lg" | "xl"; | ||
variant?: "success" | "danger" | "info" | "warning" | "dark"; | ||
variant?: "success" | "danger" | "info" | "warning" | "dark" | "purple"; | ||
border?: boolean; | ||
@@ -6,0 +6,0 @@ corners?: "rounded" | "circular"; |
{ | ||
"name": "@hudoro/badges", | ||
"version": "0.1.1-beta.9", | ||
"version": "0.1.1-beta.10", | ||
"description": "Badges component for Hudoro UI", | ||
@@ -5,0 +5,0 @@ "author": "Prawito Hudoro", |
53510
1123