@kroyd/ui-core 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/index.d.ts +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/kroyd-ui-core.mjs +2220 -0
- package/dist/kroyd-ui-core.umd.js +156 -1
- package/dist/react/button/index.d.ts +1 -0
- package/dist/react/index.d.ts +1 -1
- package/dist/register.d.ts +2 -1
- package/package.json +1 -1
- /package/dist/react/{UiButton.d.ts → button/UiButton.d.ts} +0 -0
|
@@ -1 +1,156 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(te,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):(te=typeof globalThis<"u"?globalThis:te||self,G(te.KroydUICore={}))})(this,function(te){"use strict";/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/var Ht;const G=globalThis,Xe=G.ShadowRoot&&(G.ShadyCSS===void 0||G.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ze=Symbol(),wt=new WeakMap;let At=class{constructor(t,n,o){if(this._$cssResult$=!0,o!==Ze)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(Xe&&t===void 0){const o=n!==void 0&&n.length===1;o&&(t=wt.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&wt.set(n,t))}return t}toString(){return this.cssText}};const Ar=c=>new At(typeof c=="string"?c:c+"",void 0,Ze),Cr=(c,...t)=>{const n=c.length===1?c[0]:t.reduce((o,a,l)=>o+(d=>{if(d._$cssResult$===!0)return d.cssText;if(typeof d=="number")return d;throw Error("Value passed to 'css' function must be a 'css' function result: "+d+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+c[l+1],c[0]);return new At(n,c,Ze)},Rr=(c,t)=>{if(Xe)c.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const o=document.createElement("style"),a=G.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=n.cssText,c.appendChild(o)}},Ct=Xe?c=>c:c=>c instanceof CSSStyleSheet?(t=>{let n="";for(const o of t.cssRules)n+=o.cssText;return Ar(n)})(c):c;/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const{is:Or,defineProperty:Pr,getOwnPropertyDescriptor:Tr,getOwnPropertyNames:kr,getOwnPropertySymbols:xr,getPrototypeOf:jr}=Object,J=globalThis,Rt=J.trustedTypes,Mr=Rt?Rt.emptyScript:"",et=J.reactiveElementPolyfillSupport,ge=(c,t)=>c,je={toAttribute(c,t){switch(t){case Boolean:c=c?Mr:null;break;case Object:case Array:c=c==null?c:JSON.stringify(c)}return c},fromAttribute(c,t){let n=c;switch(t){case Boolean:n=c!==null;break;case Number:n=c===null?null:Number(c);break;case Object:case Array:try{n=JSON.parse(c)}catch{n=null}}return n}},tt=(c,t)=>!Or(c,t),Ot={attribute:!0,type:String,converter:je,reflect:!1,useDefault:!1,hasChanged:tt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),J.litPropertyMetadata??(J.litPropertyMetadata=new WeakMap);let ce=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=Ot){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(t,n),!n.noAccessor){const o=Symbol(),a=this.getPropertyDescriptor(t,o,n);a!==void 0&&Pr(this.prototype,t,a)}}static getPropertyDescriptor(t,n,o){const{get:a,set:l}=Tr(this.prototype,t)??{get(){return this[n]},set(d){this[n]=d}};return{get:a,set(d){const g=a==null?void 0:a.call(this);l==null||l.call(this,d),this.requestUpdate(t,g,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ot}static _$Ei(){if(this.hasOwnProperty(ge("elementProperties")))return;const t=jr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ge("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ge("properties"))){const n=this.properties,o=[...kr(n),...xr(n)];for(const a of o)this.createProperty(a,n[a])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[o,a]of n)this.elementProperties.set(o,a)}this._$Eh=new Map;for(const[n,o]of this.elementProperties){const a=this._$Eu(n,o);a!==void 0&&this._$Eh.set(a,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const a of o)n.unshift(Ct(a))}else t!==void 0&&n.push(Ct(t));return n}static _$Eu(t,n){const o=n.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$EO)==null||n.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const o of n.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Rr(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(n=>{var o;return(o=n.hostConnected)==null?void 0:o.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(n=>{var o;return(o=n.hostDisconnected)==null?void 0:o.call(n)})}attributeChangedCallback(t,n,o){this._$AK(t,o)}_$ET(t,n){var l;const o=this.constructor.elementProperties.get(t),a=this.constructor._$Eu(t,o);if(a!==void 0&&o.reflect===!0){const d=(((l=o.converter)==null?void 0:l.toAttribute)!==void 0?o.converter:je).toAttribute(n,o.type);this._$Em=t,d==null?this.removeAttribute(a):this.setAttribute(a,d),this._$Em=null}}_$AK(t,n){var l,d;const o=this.constructor,a=o._$Eh.get(t);if(a!==void 0&&this._$Em!==a){const g=o.getPropertyOptions(a),v=typeof g.converter=="function"?{fromAttribute:g.converter}:((l=g.converter)==null?void 0:l.fromAttribute)!==void 0?g.converter:je;this._$Em=a;const C=v.fromAttribute(n,g.type);this[a]=C??((d=this._$Ej)==null?void 0:d.get(a))??C,this._$Em=null}}requestUpdate(t,n,o){var a;if(t!==void 0){const l=this.constructor,d=this[t];if(o??(o=l.getPropertyOptions(t)),!((o.hasChanged??tt)(d,n)||o.useDefault&&o.reflect&&d===((a=this._$Ej)==null?void 0:a.get(t))&&!this.hasAttribute(l._$Eu(t,o))))return;this.C(t,n,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,n,{useDefault:o,reflect:a,wrapped:l},d){o&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,d??n??this[t]),l!==!0||d!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(n=void 0),this._$AL.set(t,n)),a===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[l,d]of this._$Ep)this[l]=d;this._$Ep=void 0}const a=this.constructor.elementProperties;if(a.size>0)for(const[l,d]of a){const{wrapped:g}=d,v=this[l];g!==!0||this._$AL.has(l)||v===void 0||this.C(l,void 0,d,v)}}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(o=this._$EO)==null||o.forEach(a=>{var l;return(l=a.hostUpdate)==null?void 0:l.call(a)}),this.update(n)):this._$EM()}catch(a){throw t=!1,this._$EM(),a}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$EO)==null||n.forEach(o=>{var a;return(a=o.hostUpdated)==null?void 0:a.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(n=>this._$ET(n,this[n]))),this._$EM()}updated(t){}firstUpdated(t){}};ce.elementStyles=[],ce.shadowRootOptions={mode:"open"},ce[ge("elementProperties")]=new Map,ce[ge("finalized")]=new Map,et==null||et({ReactiveElement:ce}),(J.reactiveElementVersions??(J.reactiveElementVersions=[])).push("2.1.1");/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2017 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/const be=globalThis,Me=be.trustedTypes,Pt=Me?Me.createPolicy("lit-html",{createHTML:c=>c}):void 0,Tt="$lit$",Q=`lit$${Math.random().toFixed(9).slice(2)}$`,kt="?"+Q,Ur=`<${kt}>`,re=document,Ee=()=>re.createComment(""),$e=c=>c===null||typeof c!="object"&&typeof c!="function",rt=Array.isArray,Dr=c=>rt(c)||typeof(c==null?void 0:c[Symbol.iterator])=="function",nt=`[
|
|
14
|
+
\f\r]`,Se=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xt=/-->/g,jt=/>/g,ne=RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Mt=/'/g,Ut=/"/g,Dt=/^(?:script|style|textarea|title)$/i,Ir=c=>(t,...n)=>({_$litType$:c,strings:t,values:n}),Nr=Ir(1),le=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),It=new WeakMap,oe=re.createTreeWalker(re,129);function Nt(c,t){if(!rt(c)||!c.hasOwnProperty("raw"))throw Error("invalid template strings array");return Pt!==void 0?Pt.createHTML(t):t}const Lr=(c,t)=>{const n=c.length-1,o=[];let a,l=t===2?"<svg>":t===3?"<math>":"",d=Se;for(let g=0;g<n;g++){const v=c[g];let C,P,w=-1,H=0;for(;H<v.length&&(d.lastIndex=H,P=d.exec(v),P!==null);)H=d.lastIndex,d===Se?P[1]==="!--"?d=xt:P[1]!==void 0?d=jt:P[2]!==void 0?(Dt.test(P[2])&&(a=RegExp("</"+P[2],"g")),d=ne):P[3]!==void 0&&(d=ne):d===ne?P[0]===">"?(d=a??Se,w=-1):P[1]===void 0?w=-2:(w=d.lastIndex-P[2].length,C=P[1],d=P[3]===void 0?ne:P[3]==='"'?Ut:Mt):d===Ut||d===Mt?d=ne:d===xt||d===jt?d=Se:(d=ne,a=void 0);const N=d===ne&&c[g+1].startsWith("/>")?" ":"";l+=d===Se?v+Ur:w>=0?(o.push(C),v.slice(0,w)+Tt+v.slice(w)+Q+N):v+Q+(w===-2?g:N)}return[Nt(c,l+(c[n]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]};class we{constructor({strings:t,_$litType$:n},o){let a;this.parts=[];let l=0,d=0;const g=t.length-1,v=this.parts,[C,P]=Lr(t,n);if(this.el=we.createElement(C,o),oe.currentNode=this.el.content,n===2||n===3){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(a=oe.nextNode())!==null&&v.length<g;){if(a.nodeType===1){if(a.hasAttributes())for(const w of a.getAttributeNames())if(w.endsWith(Tt)){const H=P[d++],N=a.getAttribute(w).split(Q),B=/([.?@])?(.*)/.exec(H);v.push({type:1,index:l,name:B[2],strings:N,ctor:B[1]==="."?Hr:B[1]==="?"?zr:B[1]==="@"?Vr:Ue}),a.removeAttribute(w)}else w.startsWith(Q)&&(v.push({type:6,index:l}),a.removeAttribute(w));if(Dt.test(a.tagName)){const w=a.textContent.split(Q),H=w.length-1;if(H>0){a.textContent=Me?Me.emptyScript:"";for(let N=0;N<H;N++)a.append(w[N],Ee()),oe.nextNode(),v.push({type:2,index:++l});a.append(w[H],Ee())}}}else if(a.nodeType===8)if(a.data===kt)v.push({type:2,index:l});else{let w=-1;for(;(w=a.data.indexOf(Q,w+1))!==-1;)v.push({type:7,index:l}),w+=Q.length-1}l++}}static createElement(t,n){const o=re.createElement("template");return o.innerHTML=t,o}}function fe(c,t,n=c,o){var d,g;if(t===le)return t;let a=o!==void 0?(d=n._$Co)==null?void 0:d[o]:n._$Cl;const l=$e(t)?void 0:t._$litDirective$;return(a==null?void 0:a.constructor)!==l&&((g=a==null?void 0:a._$AO)==null||g.call(a,!1),l===void 0?a=void 0:(a=new l(c),a._$AT(c,n,o)),o!==void 0?(n._$Co??(n._$Co=[]))[o]=a:n._$Cl=a),a!==void 0&&(t=fe(c,a._$AS(c,t.values),a,o)),t}class Fr{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:n},parts:o}=this._$AD,a=((t==null?void 0:t.creationScope)??re).importNode(n,!0);oe.currentNode=a;let l=oe.nextNode(),d=0,g=0,v=o[0];for(;v!==void 0;){if(d===v.index){let C;v.type===2?C=new Ae(l,l.nextSibling,this,t):v.type===1?C=new v.ctor(l,v.name,v.strings,this,t):v.type===6&&(C=new Wr(l,this,t)),this._$AV.push(C),v=o[++g]}d!==(v==null?void 0:v.index)&&(l=oe.nextNode(),d++)}return oe.currentNode=re,a}p(t){let n=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,n),n+=o.strings.length-2):o._$AI(t[n])),n++}}class Ae{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,n,o,a){this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=o,this.options=a,this._$Cv=(a==null?void 0:a.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=fe(this,t,n),$e(t)?t===I||t==null||t===""?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==le&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Dr(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==I&&$e(this._$AH)?this._$AA.nextSibling.data=t:this.T(re.createTextNode(t)),this._$AH=t}$(t){var l;const{values:n,_$litType$:o}=t,a=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=we.createElement(Nt(o.h,o.h[0]),this.options)),o);if(((l=this._$AH)==null?void 0:l._$AD)===a)this._$AH.p(n);else{const d=new Fr(a,this),g=d.u(this.options);d.p(n),this.T(g),this._$AH=d}}_$AC(t){let n=It.get(t.strings);return n===void 0&&It.set(t.strings,n=new we(t)),n}k(t){rt(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let o,a=0;for(const l of t)a===n.length?n.push(o=new Ae(this.O(Ee()),this.O(Ee()),this,this.options)):o=n[a],o._$AI(l),a++;a<n.length&&(this._$AR(o&&o._$AB.nextSibling,a),n.length=a)}_$AR(t=this._$AA.nextSibling,n){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,n);t!==this._$AB;){const a=t.nextSibling;t.remove(),t=a}}setConnected(t){var n;this._$AM===void 0&&(this._$Cv=t,(n=this._$AP)==null||n.call(this,t))}}class Ue{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,o,a,l){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=n,this._$AM=a,this.options=l,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=I}_$AI(t,n=this,o,a){const l=this.strings;let d=!1;if(l===void 0)t=fe(this,t,n,0),d=!$e(t)||t!==this._$AH&&t!==le,d&&(this._$AH=t);else{const g=t;let v,C;for(t=l[0],v=0;v<l.length-1;v++)C=fe(this,g[o+v],n,v),C===le&&(C=this._$AH[v]),d||(d=!$e(C)||C!==this._$AH[v]),C===I?t=I:t!==I&&(t+=(C??"")+l[v+1]),this._$AH[v]=C}d&&!a&&this.j(t)}j(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Hr extends Ue{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===I?void 0:t}}class zr extends Ue{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==I)}}class Vr extends Ue{constructor(t,n,o,a,l){super(t,n,o,a,l),this.type=5}_$AI(t,n=this){if((t=fe(this,t,n,0)??I)===le)return;const o=this._$AH,a=t===I&&o!==I||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,l=t!==I&&(o===I||a);a&&this.element.removeEventListener(this.name,this,o),l&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,t):this._$AH.handleEvent(t)}}class Wr{constructor(t,n,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){fe(this,t)}}const ot=be.litHtmlPolyfillSupport;ot==null||ot(we,Ae),(be.litHtmlVersions??(be.litHtmlVersions=[])).push("3.3.1");const Br=(c,t,n)=>{const o=(n==null?void 0:n.renderBefore)??t;let a=o._$litPart$;if(a===void 0){const l=(n==null?void 0:n.renderBefore)??null;o._$litPart$=a=new Ae(t.insertBefore(Ee(),l),l,void 0,n??{})}return a._$AI(c),a};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2017 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const ie=globalThis;class Ce extends ce{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Br(n,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return le}}Ce._$litElement$=!0,Ce.finalized=!0,(Ht=ie.litElementHydrateSupport)==null||Ht.call(ie,{LitElement:Ce});const it=ie.litElementPolyfillSupport;it==null||it({LitElement:Ce}),(ie.litElementVersions??(ie.litElementVersions=[])).push("4.2.1");/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/const Yr={attribute:!0,type:String,converter:je,reflect:!1,hasChanged:tt},qr=(c=Yr,t,n)=>{const{kind:o,metadata:a}=n;let l=globalThis.litPropertyMetadata.get(a);if(l===void 0&&globalThis.litPropertyMetadata.set(a,l=new Map),o==="setter"&&((c=Object.create(c)).wrapped=!0),l.set(n.name,c),o==="accessor"){const{name:d}=n;return{set(g){const v=t.get.call(this);t.set.call(this,g),this.requestUpdate(d,v,c)},init(g){return g!==void 0&&this.C(d,void 0,c,g),g}}}if(o==="setter"){const{name:d}=n;return function(g){const v=this[d];t.call(this,g),this.requestUpdate(d,v,c)}}throw Error("Unsupported decorator location: "+o)};function st(c){return(t,n)=>typeof n=="object"?qr(c,t,n):((o,a,l)=>{const d=a.hasOwnProperty(l);return a.constructor.createProperty(l,o),d?Object.getOwnPropertyDescriptor(a,l):void 0})(c,t,n)}const Kr=Cr`
|
|
24
|
+
:host {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.button {
|
|
29
|
+
padding: 8px 12px;
|
|
30
|
+
user-select: none;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
background-color: var(--grey);
|
|
33
|
+
text-align: center;
|
|
34
|
+
color: var(--text-primary);
|
|
35
|
+
border-radius: 10px;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
line-height: 16px;
|
|
39
|
+
transition: opacity 200ms;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
border: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* ================== variants ================== */
|
|
45
|
+
|
|
46
|
+
.button__primary {
|
|
47
|
+
background-color: var(--main-primary);
|
|
48
|
+
color: var(--cards-white);
|
|
49
|
+
outline: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.button__error {
|
|
53
|
+
background-color: var(--error);
|
|
54
|
+
border: 1px solid var(--error);
|
|
55
|
+
color: var(--cards-white);
|
|
56
|
+
padding: 7px 12px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.button__error_outline {
|
|
60
|
+
background-color: var(--cards-white);
|
|
61
|
+
border: 1px solid var(--error);
|
|
62
|
+
color: var(--error);
|
|
63
|
+
padding: 7px 12px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.button__success {
|
|
67
|
+
background-color: var(--success);
|
|
68
|
+
border: 1px solid var(--success);
|
|
69
|
+
color: var(--cards-white);
|
|
70
|
+
outline: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ================== sizes ================== */
|
|
74
|
+
|
|
75
|
+
.button__lg {
|
|
76
|
+
padding: 12px 20px;
|
|
77
|
+
line-height: 20px;
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.button__md {
|
|
82
|
+
padding: 10px 12px;
|
|
83
|
+
line-height: 20px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.button__sm {
|
|
87
|
+
padding: 8px 12px;
|
|
88
|
+
line-height: 16px;
|
|
89
|
+
font-size: 12px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* ================== states ================== */
|
|
93
|
+
|
|
94
|
+
.button:hover {
|
|
95
|
+
opacity: 0.85;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.button:disabled {
|
|
99
|
+
opacity: 0.4;
|
|
100
|
+
cursor: not-allowed;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.button:disabled:hover {
|
|
104
|
+
opacity: 0.4;
|
|
105
|
+
}
|
|
106
|
+
`;var Gr=Object.defineProperty,at=(c,t,n,o)=>{for(var a=void 0,l=c.length-1,d;l>=0;l--)(d=c[l])&&(a=d(t,n,a)||a);return a&&Gr(t,n,a),a};const lt=class lt extends Ce{constructor(){super(...arguments),this.disabled=!1,this.variant="primary",this.size="md"}handleClick(t){this.disabled||this.dispatchEvent(new CustomEvent("ui-click",{detail:{variant:this.variant,size:this.size,disabled:this.disabled,originalEvent:t},bubbles:!0,composed:!0}))}render(){return Nr`
|
|
107
|
+
<button
|
|
108
|
+
class="
|
|
109
|
+
button
|
|
110
|
+
button__${this.variant}
|
|
111
|
+
button__${this.size}
|
|
112
|
+
"
|
|
113
|
+
?disabled=${this.disabled}
|
|
114
|
+
@click=${this.handleClick}
|
|
115
|
+
>
|
|
116
|
+
<slot></slot>
|
|
117
|
+
</button>
|
|
118
|
+
`}};lt.styles=Kr;let se=lt;at([st({type:Boolean,reflect:!0})],se.prototype,"disabled"),at([st({reflect:!0})],se.prototype,"variant"),at([st({reflect:!0})],se.prototype,"size"),customElements.define("ui-button",se);function Jr(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var ut={exports:{}},b={};/**
|
|
119
|
+
* @license React
|
|
120
|
+
* react.production.min.js
|
|
121
|
+
*
|
|
122
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the MIT license found in the
|
|
125
|
+
* LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/var Lt;function Qr(){if(Lt)return b;Lt=1;var c=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),C=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),w=Symbol.iterator;function H(i){return i===null||typeof i!="object"?null:(i=w&&i[w]||i["@@iterator"],typeof i=="function"?i:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,De={};function q(i,f,E){this.props=i,this.context=f,this.refs=De,this.updater=E||N}q.prototype.isReactComponent={},q.prototype.setState=function(i,f){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,f,"setState")},q.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function Ie(){}Ie.prototype=q.prototype;function de(i,f,E){this.props=i,this.context=f,this.refs=De,this.updater=E||N}var pe=de.prototype=new Ie;pe.constructor=de,B(pe,q.prototype),pe.isPureReactComponent=!0;var K=Array.isArray,L=Object.prototype.hasOwnProperty,W={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function ae(i,f,E){var S,A={},U=null,x=null;if(f!=null)for(S in f.ref!==void 0&&(x=f.ref),f.key!==void 0&&(U=""+f.key),f)L.call(f,S)&&!X.hasOwnProperty(S)&&(A[S]=f[S]);var j=arguments.length-2;if(j===1)A.children=E;else if(1<j){for(var O=Array(j),z=0;z<j;z++)O[z]=arguments[z+2];A.children=O}if(i&&i.defaultProps)for(S in j=i.defaultProps,j)A[S]===void 0&&(A[S]=j[S]);return{$$typeof:c,type:i,key:U,ref:x,props:A,_owner:W.current}}function Ne(i,f){return{$$typeof:c,type:i.type,key:f,ref:i.ref,props:i.props,_owner:i._owner}}function Oe(i){return typeof i=="object"&&i!==null&&i.$$typeof===c}function ft(i){var f={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(E){return f[E]})}var Le=/\/+/g;function Pe(i,f){return typeof i=="object"&&i!==null&&i.key!=null?ft(""+i.key):f.toString(36)}function he(i,f,E,S,A){var U=typeof i;(U==="undefined"||U==="boolean")&&(i=null);var x=!1;if(i===null)x=!0;else switch(U){case"string":case"number":x=!0;break;case"object":switch(i.$$typeof){case c:case t:x=!0}}if(x)return x=i,A=A(x),i=S===""?"."+Pe(x,0):S,K(A)?(E="",i!=null&&(E=i.replace(Le,"$&/")+"/"),he(A,f,E,"",function(z){return z})):A!=null&&(Oe(A)&&(A=Ne(A,E+(!A.key||x&&x.key===A.key?"":(""+A.key).replace(Le,"$&/")+"/")+i)),f.push(A)),1;if(x=0,S=S===""?".":S+":",K(i))for(var j=0;j<i.length;j++){U=i[j];var O=S+Pe(U,j);x+=he(U,f,E,O,A)}else if(O=H(i),typeof O=="function")for(i=O.call(i),j=0;!(U=i.next()).done;)U=U.value,O=S+Pe(U,j++),x+=he(U,f,E,O,A);else if(U==="object")throw f=String(i),Error("Objects are not valid as a React child (found: "+(f==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":f)+"). If you meant to render a collection of children, use an array instead.");return x}function Y(i,f,E){if(i==null)return i;var S=[],A=0;return he(i,S,"","",function(U){return f.call(E,U,A++)}),S}function Z(i){if(i._status===-1){var f=i._result;f=f(),f.then(function(E){(i._status===0||i._status===-1)&&(i._status=1,i._result=E)},function(E){(i._status===0||i._status===-1)&&(i._status=2,i._result=E)}),i._status===-1&&(i._status=0,i._result=f)}if(i._status===1)return i._result.default;throw i._result}var _={current:null},ue={transition:null},Fe={ReactCurrentDispatcher:_,ReactCurrentBatchConfig:ue,ReactCurrentOwner:W};function ve(){throw Error("act(...) is not supported in production builds of React.")}return b.Children={map:Y,forEach:function(i,f,E){Y(i,function(){f.apply(this,arguments)},E)},count:function(i){var f=0;return Y(i,function(){f++}),f},toArray:function(i){return Y(i,function(f){return f})||[]},only:function(i){if(!Oe(i))throw Error("React.Children.only expected to receive a single React element child.");return i}},b.Component=q,b.Fragment=n,b.Profiler=a,b.PureComponent=de,b.StrictMode=o,b.Suspense=v,b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fe,b.act=ve,b.cloneElement=function(i,f,E){if(i==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+i+".");var S=B({},i.props),A=i.key,U=i.ref,x=i._owner;if(f!=null){if(f.ref!==void 0&&(U=f.ref,x=W.current),f.key!==void 0&&(A=""+f.key),i.type&&i.type.defaultProps)var j=i.type.defaultProps;for(O in f)L.call(f,O)&&!X.hasOwnProperty(O)&&(S[O]=f[O]===void 0&&j!==void 0?j[O]:f[O])}var O=arguments.length-2;if(O===1)S.children=E;else if(1<O){j=Array(O);for(var z=0;z<O;z++)j[z]=arguments[z+2];S.children=j}return{$$typeof:c,type:i.type,key:A,ref:U,props:S,_owner:x}},b.createContext=function(i){return i={$$typeof:d,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},i.Provider={$$typeof:l,_context:i},i.Consumer=i},b.createElement=ae,b.createFactory=function(i){var f=ae.bind(null,i);return f.type=i,f},b.createRef=function(){return{current:null}},b.forwardRef=function(i){return{$$typeof:g,render:i}},b.isValidElement=Oe,b.lazy=function(i){return{$$typeof:P,_payload:{_status:-1,_result:i},_init:Z}},b.memo=function(i,f){return{$$typeof:C,type:i,compare:f===void 0?null:f}},b.startTransition=function(i){var f=ue.transition;ue.transition={};try{i()}finally{ue.transition=f}},b.unstable_act=ve,b.useCallback=function(i,f){return _.current.useCallback(i,f)},b.useContext=function(i){return _.current.useContext(i)},b.useDebugValue=function(){},b.useDeferredValue=function(i){return _.current.useDeferredValue(i)},b.useEffect=function(i,f){return _.current.useEffect(i,f)},b.useId=function(){return _.current.useId()},b.useImperativeHandle=function(i,f,E){return _.current.useImperativeHandle(i,f,E)},b.useInsertionEffect=function(i,f){return _.current.useInsertionEffect(i,f)},b.useLayoutEffect=function(i,f){return _.current.useLayoutEffect(i,f)},b.useMemo=function(i,f){return _.current.useMemo(i,f)},b.useReducer=function(i,f,E){return _.current.useReducer(i,f,E)},b.useRef=function(i){return _.current.useRef(i)},b.useState=function(i){return _.current.useState(i)},b.useSyncExternalStore=function(i,f,E){return _.current.useSyncExternalStore(i,f,E)},b.useTransition=function(){return _.current.useTransition()},b.version="18.3.1",b}var Re={exports:{}};/**
|
|
127
|
+
* @license React
|
|
128
|
+
* react.development.js
|
|
129
|
+
*
|
|
130
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the MIT license found in the
|
|
133
|
+
* LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/Re.exports;var Ft;function Xr(){return Ft||(Ft=1,function(c,t){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",o=Symbol.for("react.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),C=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),De=Symbol.for("react.offscreen"),q=Symbol.iterator,Ie="@@iterator";function de(e){if(e===null||typeof e!="object")return null;var r=q&&e[q]||e[Ie];return typeof r=="function"?r:null}var pe={current:null},K={transition:null},L={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},W={current:null},X={},ae=null;function Ne(e){ae=e}X.setExtraStackFrame=function(e){ae=e},X.getCurrentStack=null,X.getStackAddendum=function(){var e="";ae&&(e+=ae);var r=X.getCurrentStack;return r&&(e+=r()||""),e};var Oe=!1,ft=!1,Le=!1,Pe=!1,he=!1,Y={ReactCurrentDispatcher:pe,ReactCurrentBatchConfig:K,ReactCurrentOwner:W};Y.ReactDebugCurrentFrame=X,Y.ReactCurrentActQueue=L;function Z(e){{for(var r=arguments.length,s=new Array(r>1?r-1:0),u=1;u<r;u++)s[u-1]=arguments[u];ue("warn",e,s)}}function _(e){{for(var r=arguments.length,s=new Array(r>1?r-1:0),u=1;u<r;u++)s[u-1]=arguments[u];ue("error",e,s)}}function ue(e,r,s){{var u=Y.ReactDebugCurrentFrame,p=u.getStackAddendum();p!==""&&(r+="%s",s=s.concat([p]));var y=s.map(function(h){return String(h)});y.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,y)}}var Fe={};function ve(e,r){{var s=e.constructor,u=s&&(s.displayName||s.name)||"ReactClass",p=u+"."+r;if(Fe[p])return;_("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",r,u),Fe[p]=!0}}var i={isMounted:function(e){return!1},enqueueForceUpdate:function(e,r,s){ve(e,"forceUpdate")},enqueueReplaceState:function(e,r,s,u){ve(e,"replaceState")},enqueueSetState:function(e,r,s,u){ve(e,"setState")}},f=Object.assign,E={};Object.freeze(E);function S(e,r,s){this.props=e,this.context=r,this.refs=E,this.updater=s||i}S.prototype.isReactComponent={},S.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,r,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};{var A={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},U=function(e,r){Object.defineProperty(S.prototype,e,{get:function(){Z("%s(...) is deprecated in plain JavaScript React classes. %s",r[0],r[1])}})};for(var x in A)A.hasOwnProperty(x)&&U(x,A[x])}function j(){}j.prototype=S.prototype;function O(e,r,s){this.props=e,this.context=r,this.refs=E,this.updater=s||i}var z=O.prototype=new j;z.constructor=O,f(z,S.prototype),z.isPureReactComponent=!0;function tn(){var e={current:null};return Object.seal(e),e}var rn=Array.isArray;function He(e){return rn(e)}function nn(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,s=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s}}function on(e){try{return zt(e),!1}catch{return!0}}function zt(e){return""+e}function ze(e){if(on(e))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nn(e)),zt(e)}function sn(e,r,s){var u=e.displayName;if(u)return u;var p=r.displayName||r.name||"";return p!==""?s+"("+p+")":s}function Vt(e){return e.displayName||"Context"}function ee(e){if(e==null)return null;if(typeof e.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case a:return"Portal";case g:return"Profiler";case d:return"StrictMode";case w:return"Suspense";case H:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C:var r=e;return Vt(r)+".Consumer";case v:var s=e;return Vt(s._context)+".Provider";case P:return sn(e,e.render,"ForwardRef");case N:var u=e.displayName||null;return u!==null?u:ee(e.type)||"Memo";case B:{var p=e,y=p._payload,h=p._init;try{return ee(h(y))}catch{return null}}}return null}var Te=Object.prototype.hasOwnProperty,Wt={key:!0,ref:!0,__self:!0,__source:!0},Bt,Yt,dt;dt={};function qt(e){if(Te.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Kt(e){if(Te.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function an(e,r){var s=function(){Bt||(Bt=!0,_("%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)",r))};s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}function un(e,r){var s=function(){Yt||(Yt=!0,_("%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)",r))};s.isReactWarning=!0,Object.defineProperty(e,"ref",{get:s,configurable:!0})}function cn(e){if(typeof e.ref=="string"&&W.current&&e.__self&&W.current.stateNode!==e.__self){var r=ee(W.current.type);dt[r]||(_('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',r,e.ref),dt[r]=!0)}}var pt=function(e,r,s,u,p,y,h){var m={$$typeof:o,type:e,key:r,ref:s,props:h,_owner:y};return m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(m,"_self",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.defineProperty(m,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m};function ln(e,r,s){var u,p={},y=null,h=null,m=null,$=null;if(r!=null){qt(r)&&(h=r.ref,cn(r)),Kt(r)&&(ze(r.key),y=""+r.key),m=r.__self===void 0?null:r.__self,$=r.__source===void 0?null:r.__source;for(u in r)Te.call(r,u)&&!Wt.hasOwnProperty(u)&&(p[u]=r[u])}var R=arguments.length-2;if(R===1)p.children=s;else if(R>1){for(var T=Array(R),k=0;k<R;k++)T[k]=arguments[k+2];Object.freeze&&Object.freeze(T),p.children=T}if(e&&e.defaultProps){var M=e.defaultProps;for(u in M)p[u]===void 0&&(p[u]=M[u])}if(y||h){var D=typeof e=="function"?e.displayName||e.name||"Unknown":e;y&&an(p,D),h&&un(p,D)}return pt(e,y,h,m,$,W.current,p)}function fn(e,r){var s=pt(e.type,r,e.ref,e._self,e._source,e._owner,e.props);return s}function dn(e,r,s){if(e==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var u,p=f({},e.props),y=e.key,h=e.ref,m=e._self,$=e._source,R=e._owner;if(r!=null){qt(r)&&(h=r.ref,R=W.current),Kt(r)&&(ze(r.key),y=""+r.key);var T;e.type&&e.type.defaultProps&&(T=e.type.defaultProps);for(u in r)Te.call(r,u)&&!Wt.hasOwnProperty(u)&&(r[u]===void 0&&T!==void 0?p[u]=T[u]:p[u]=r[u])}var k=arguments.length-2;if(k===1)p.children=s;else if(k>1){for(var M=Array(k),D=0;D<k;D++)M[D]=arguments[D+2];p.children=M}return pt(e.type,y,h,m,$,R,p)}function ye(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}var Gt=".",pn=":";function hn(e){var r=/[=:]/g,s={"=":"=0",":":"=2"},u=e.replace(r,function(p){return s[p]});return"$"+u}var Jt=!1,vn=/\/+/g;function Qt(e){return e.replace(vn,"$&/")}function ht(e,r){return typeof e=="object"&&e!==null&&e.key!=null?(ze(e.key),hn(""+e.key)):r.toString(36)}function Ve(e,r,s,u,p){var y=typeof e;(y==="undefined"||y==="boolean")&&(e=null);var h=!1;if(e===null)h=!0;else switch(y){case"string":case"number":h=!0;break;case"object":switch(e.$$typeof){case o:case a:h=!0}}if(h){var m=e,$=p(m),R=u===""?Gt+ht(m,0):u;if(He($)){var T="";R!=null&&(T=Qt(R)+"/"),Ve($,r,T,"",function(ao){return ao})}else $!=null&&(ye($)&&($.key&&(!m||m.key!==$.key)&&ze($.key),$=fn($,s+($.key&&(!m||m.key!==$.key)?Qt(""+$.key)+"/":"")+R)),r.push($));return 1}var k,M,D=0,F=u===""?Gt:u+pn;if(He(e))for(var Qe=0;Qe<e.length;Qe++)k=e[Qe],M=F+ht(k,Qe),D+=Ve(k,r,s,M,p);else{var St=de(e);if(typeof St=="function"){var $r=e;St===$r.entries&&(Jt||Z("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Jt=!0);for(var io=St.call($r),Sr,so=0;!(Sr=io.next()).done;)k=Sr.value,M=F+ht(k,so++),D+=Ve(k,r,s,M,p)}else if(y==="object"){var wr=String(e);throw new Error("Objects are not valid as a React child (found: "+(wr==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":wr)+"). If you meant to render a collection of children, use an array instead.")}}return D}function We(e,r,s){if(e==null)return e;var u=[],p=0;return Ve(e,u,"","",function(y){return r.call(s,y,p++)}),u}function yn(e){var r=0;return We(e,function(){r++}),r}function _n(e,r,s){We(e,function(){r.apply(this,arguments)},s)}function mn(e){return We(e,function(r){return r})||[]}function gn(e){if(!ye(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}function bn(e){var r={$$typeof:C,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};r.Provider={$$typeof:v,_context:r};var s=!1,u=!1,p=!1;{var y={$$typeof:C,_context:r};Object.defineProperties(y,{Provider:{get:function(){return u||(u=!0,_("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(h){r.Provider=h}},_currentValue:{get:function(){return r._currentValue},set:function(h){r._currentValue=h}},_currentValue2:{get:function(){return r._currentValue2},set:function(h){r._currentValue2=h}},_threadCount:{get:function(){return r._threadCount},set:function(h){r._threadCount=h}},Consumer:{get:function(){return s||(s=!0,_("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}},displayName:{get:function(){return r.displayName},set:function(h){p||(Z("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",h),p=!0)}}}),r.Consumer=y}return r._currentRenderer=null,r._currentRenderer2=null,r}var ke=-1,vt=0,Xt=1,En=2;function $n(e){if(e._status===ke){var r=e._result,s=r();if(s.then(function(y){if(e._status===vt||e._status===ke){var h=e;h._status=Xt,h._result=y}},function(y){if(e._status===vt||e._status===ke){var h=e;h._status=En,h._result=y}}),e._status===ke){var u=e;u._status=vt,u._result=s}}if(e._status===Xt){var p=e._result;return p===void 0&&_(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
135
|
+
|
|
136
|
+
Your code should look like:
|
|
137
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
138
|
+
|
|
139
|
+
Did you accidentally put curly braces around the import?`,p),"default"in p||_(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
140
|
+
|
|
141
|
+
Your code should look like:
|
|
142
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,p),p.default}else throw e._result}function Sn(e){var r={_status:ke,_result:e},s={$$typeof:B,_payload:r,_init:$n};{var u,p;Object.defineProperties(s,{defaultProps:{configurable:!0,get:function(){return u},set:function(y){_("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),u=y,Object.defineProperty(s,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return p},set:function(y){_("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),p=y,Object.defineProperty(s,"propTypes",{enumerable:!0})}}})}return s}function wn(e){e!=null&&e.$$typeof===N?_("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?_("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&_("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&(e.defaultProps!=null||e.propTypes!=null)&&_("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var r={$$typeof:P,render:e};{var s;Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return s},set:function(u){s=u,!e.name&&!e.displayName&&(e.displayName=u)}})}return r}var Zt;Zt=Symbol.for("react.module.reference");function er(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===g||he||e===d||e===w||e===H||Pe||e===De||Oe||ft||Le||typeof e=="object"&&e!==null&&(e.$$typeof===B||e.$$typeof===N||e.$$typeof===v||e.$$typeof===C||e.$$typeof===P||e.$$typeof===Zt||e.getModuleId!==void 0))}function An(e,r){er(e)||_("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e);var s={$$typeof:N,type:e,compare:r===void 0?null:r};{var u;Object.defineProperty(s,"displayName",{enumerable:!1,configurable:!0,get:function(){return u},set:function(p){u=p,!e.name&&!e.displayName&&(e.displayName=p)}})}return s}function V(){var e=pe.current;return e===null&&_(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
143
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
144
|
+
2. You might be breaking the Rules of Hooks
|
|
145
|
+
3. You might have more than one copy of React in the same app
|
|
146
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function Cn(e){var r=V();if(e._context!==void 0){var s=e._context;s.Consumer===e?_("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):s.Provider===e&&_("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return r.useContext(e)}function Rn(e){var r=V();return r.useState(e)}function On(e,r,s){var u=V();return u.useReducer(e,r,s)}function Pn(e){var r=V();return r.useRef(e)}function Tn(e,r){var s=V();return s.useEffect(e,r)}function kn(e,r){var s=V();return s.useInsertionEffect(e,r)}function xn(e,r){var s=V();return s.useLayoutEffect(e,r)}function jn(e,r){var s=V();return s.useCallback(e,r)}function Mn(e,r){var s=V();return s.useMemo(e,r)}function Un(e,r,s){var u=V();return u.useImperativeHandle(e,r,s)}function Dn(e,r){{var s=V();return s.useDebugValue(e,r)}}function In(){var e=V();return e.useTransition()}function Nn(e){var r=V();return r.useDeferredValue(e)}function Ln(){var e=V();return e.useId()}function Fn(e,r,s){var u=V();return u.useSyncExternalStore(e,r,s)}var xe=0,tr,rr,nr,or,ir,sr,ar;function ur(){}ur.__reactDisabledLog=!0;function Hn(){{if(xe===0){tr=console.log,rr=console.info,nr=console.warn,or=console.error,ir=console.group,sr=console.groupCollapsed,ar=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ur,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}xe++}}function zn(){{if(xe--,xe===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:f({},e,{value:tr}),info:f({},e,{value:rr}),warn:f({},e,{value:nr}),error:f({},e,{value:or}),group:f({},e,{value:ir}),groupCollapsed:f({},e,{value:sr}),groupEnd:f({},e,{value:ar})})}xe<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var yt=Y.ReactCurrentDispatcher,_t;function Be(e,r,s){{if(_t===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);_t=u&&u[1]||""}return`
|
|
147
|
+
`+_t+e}}var mt=!1,Ye;{var Vn=typeof WeakMap=="function"?WeakMap:Map;Ye=new Vn}function cr(e,r){if(!e||mt)return"";{var s=Ye.get(e);if(s!==void 0)return s}var u;mt=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var y;y=yt.current,yt.current=null,Hn();try{if(r){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(F){u=F}Reflect.construct(e,[],h)}else{try{h.call()}catch(F){u=F}e.call(h.prototype)}}else{try{throw Error()}catch(F){u=F}e()}}catch(F){if(F&&u&&typeof F.stack=="string"){for(var m=F.stack.split(`
|
|
148
|
+
`),$=u.stack.split(`
|
|
149
|
+
`),R=m.length-1,T=$.length-1;R>=1&&T>=0&&m[R]!==$[T];)T--;for(;R>=1&&T>=0;R--,T--)if(m[R]!==$[T]){if(R!==1||T!==1)do if(R--,T--,T<0||m[R]!==$[T]){var k=`
|
|
150
|
+
`+m[R].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&Ye.set(e,k),k}while(R>=1&&T>=0);break}}}finally{mt=!1,yt.current=y,zn(),Error.prepareStackTrace=p}var M=e?e.displayName||e.name:"",D=M?Be(M):"";return typeof e=="function"&&Ye.set(e,D),D}function Wn(e,r,s){return cr(e,!1)}function Bn(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function qe(e,r,s){if(e==null)return"";if(typeof e=="function")return cr(e,Bn(e));if(typeof e=="string")return Be(e);switch(e){case w:return Be("Suspense");case H:return Be("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case P:return Wn(e.render);case N:return qe(e.type,r,s);case B:{var u=e,p=u._payload,y=u._init;try{return qe(y(p),r,s)}catch{}}}return""}var lr={},fr=Y.ReactDebugCurrentFrame;function Ke(e){if(e){var r=e._owner,s=qe(e.type,e._source,r?r.type:null);fr.setExtraStackFrame(s)}else fr.setExtraStackFrame(null)}function Yn(e,r,s,u,p){{var y=Function.call.bind(Te);for(var h in e)if(y(e,h)){var m=void 0;try{if(typeof e[h]!="function"){var $=Error((u||"React class")+": "+s+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw $.name="Invariant Violation",$}m=e[h](r,h,u,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){m=R}m&&!(m instanceof Error)&&(Ke(p),_("%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).",u||"React class",s,h,typeof m),Ke(null)),m instanceof Error&&!(m.message in lr)&&(lr[m.message]=!0,Ke(p),_("Failed %s type: %s",s,m.message),Ke(null))}}}function _e(e){if(e){var r=e._owner,s=qe(e.type,e._source,r?r.type:null);Ne(s)}else Ne(null)}var gt;gt=!1;function dr(){if(W.current){var e=ee(W.current.type);if(e)return`
|
|
151
|
+
|
|
152
|
+
Check the render method of \``+e+"`."}return""}function qn(e){if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),s=e.lineNumber;return`
|
|
153
|
+
|
|
154
|
+
Check your code at `+r+":"+s+"."}return""}function Kn(e){return e!=null?qn(e.__source):""}var pr={};function Gn(e){var r=dr();if(!r){var s=typeof e=="string"?e:e.displayName||e.name;s&&(r=`
|
|
155
|
+
|
|
156
|
+
Check the top-level render call using <`+s+">.")}return r}function hr(e,r){if(!(!e._store||e._store.validated||e.key!=null)){e._store.validated=!0;var s=Gn(r);if(!pr[s]){pr[s]=!0;var u="";e&&e._owner&&e._owner!==W.current&&(u=" It was passed a child from "+ee(e._owner.type)+"."),_e(e),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,u),_e(null)}}}function vr(e,r){if(typeof e=="object"){if(He(e))for(var s=0;s<e.length;s++){var u=e[s];ye(u)&&hr(u,r)}else if(ye(e))e._store&&(e._store.validated=!0);else if(e){var p=de(e);if(typeof p=="function"&&p!==e.entries)for(var y=p.call(e),h;!(h=y.next()).done;)ye(h.value)&&hr(h.value,r)}}}function yr(e){{var r=e.type;if(r==null||typeof r=="string")return;var s;if(typeof r=="function")s=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===P||r.$$typeof===N))s=r.propTypes;else return;if(s){var u=ee(r);Yn(s,e.props,"prop",u,e)}else if(r.PropTypes!==void 0&&!gt){gt=!0;var p=ee(r);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Jn(e){{for(var r=Object.keys(e.props),s=0;s<r.length;s++){var u=r[s];if(u!=="children"&&u!=="key"){_e(e),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",u),_e(null);break}}e.ref!==null&&(_e(e),_("Invalid attribute `ref` supplied to `React.Fragment`."),_e(null))}}function _r(e,r,s){var u=er(e);if(!u){var p="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(p+=" 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 y=Kn(r);y?p+=y:p+=dr();var h;e===null?h="null":He(e)?h="array":e!==void 0&&e.$$typeof===o?(h="<"+(ee(e.type)||"Unknown")+" />",p=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,_("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h,p)}var m=ln.apply(this,arguments);if(m==null)return m;if(u)for(var $=2;$<arguments.length;$++)vr(arguments[$],e);return e===l?Jn(m):yr(m),m}var mr=!1;function Qn(e){var r=_r.bind(null,e);return r.type=e,mr||(mr=!0,Z("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(r,"type",{enumerable:!1,get:function(){return Z("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),r}function Xn(e,r,s){for(var u=dn.apply(this,arguments),p=2;p<arguments.length;p++)vr(arguments[p],u.type);return yr(u),u}function Zn(e,r){var s=K.transition;K.transition={};var u=K.transition;K.transition._updatedFibers=new Set;try{e()}finally{if(K.transition=s,s===null&&u._updatedFibers){var p=u._updatedFibers.size;p>10&&Z("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),u._updatedFibers.clear()}}}var gr=!1,Ge=null;function eo(e){if(Ge===null)try{var r=("require"+Math.random()).slice(0,7),s=c&&c[r];Ge=s.call(c,"timers").setImmediate}catch{Ge=function(p){gr===!1&&(gr=!0,typeof MessageChannel>"u"&&_("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var y=new MessageChannel;y.port1.onmessage=p,y.port2.postMessage(void 0)}}return Ge(e)}var me=0,br=!1;function Er(e){{var r=me;me++,L.current===null&&(L.current=[]);var s=L.isBatchingLegacy,u;try{if(L.isBatchingLegacy=!0,u=e(),!s&&L.didScheduleLegacyUpdate){var p=L.current;p!==null&&(L.didScheduleLegacyUpdate=!1,$t(p))}}catch(M){throw Je(r),M}finally{L.isBatchingLegacy=s}if(u!==null&&typeof u=="object"&&typeof u.then=="function"){var y=u,h=!1,m={then:function(M,D){h=!0,y.then(function(F){Je(r),me===0?bt(F,M,D):M(F)},function(F){Je(r),D(F)})}};return!br&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){h||(br=!0,_("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),m}else{var $=u;if(Je(r),me===0){var R=L.current;R!==null&&($t(R),L.current=null);var T={then:function(M,D){L.current===null?(L.current=[],bt($,M,D)):M($)}};return T}else{var k={then:function(M,D){M($)}};return k}}}}function Je(e){e!==me-1&&_("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),me=e}function bt(e,r,s){{var u=L.current;if(u!==null)try{$t(u),eo(function(){u.length===0?(L.current=null,r(e)):bt(e,r,s)})}catch(p){s(p)}else r(e)}}var Et=!1;function $t(e){if(!Et){Et=!0;var r=0;try{for(;r<e.length;r++){var s=e[r];do s=s(!0);while(s!==null)}e.length=0}catch(u){throw e=e.slice(r+1),u}finally{Et=!1}}}var to=_r,ro=Xn,no=Qn,oo={map:We,forEach:_n,count:yn,toArray:mn,only:gn};t.Children=oo,t.Component=S,t.Fragment=l,t.Profiler=g,t.PureComponent=O,t.StrictMode=d,t.Suspense=w,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,t.act=Er,t.cloneElement=ro,t.createContext=bn,t.createElement=to,t.createFactory=no,t.createRef=tn,t.forwardRef=wn,t.isValidElement=ye,t.lazy=Sn,t.memo=An,t.startTransition=Zn,t.unstable_act=Er,t.useCallback=jn,t.useContext=Cn,t.useDebugValue=Dn,t.useDeferredValue=Nn,t.useEffect=Tn,t.useId=Ln,t.useImperativeHandle=Un,t.useInsertionEffect=kn,t.useLayoutEffect=xn,t.useMemo=Mn,t.useReducer=On,t.useRef=Pn,t.useState=Rn,t.useSyncExternalStore=Fn,t.useTransition=In,t.version=n,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(Re,Re.exports)),Re.exports}process.env.NODE_ENV==="production"?ut.exports=Qr():ut.exports=Xr();var ct=ut.exports;const Zr=Jr(ct),en=({onUiClick:c,children:t,...n})=>{const o=ct.useRef(null);return ct.useEffect(()=>{const a=o.current;if(!a||!c)return;const l=d=>{c(d)};return a.addEventListener("ui-click",l),()=>{a.removeEventListener("ui-click",l)}},[c]),Zr.createElement("ui-button",{ref:o,...n},t)};te.UiButton=se,te.iButton=en,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { iButton } from './UiButton';
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './button';
|
package/dist/register.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export * from './components/index';
|
|
2
|
+
export * from './react/index';
|
package/package.json
CHANGED
|
File without changes
|