@revotech-group/revotech-ui-kit 0.0.74 → 0.0.75
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/rtg-ui-kit.js +9 -2
- package/dist/rtg-ui-kit.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/rtg-ui-kit.js
CHANGED
|
@@ -5412,7 +5412,14 @@ let Gt = class extends h {
|
|
|
5412
5412
|
e.type === "file" ? this.value = e.files ? e.files[0].name : "" : this.value = e.value;
|
|
5413
5413
|
}
|
|
5414
5414
|
getAttributesToExclude() {
|
|
5415
|
-
return [
|
|
5415
|
+
return [
|
|
5416
|
+
"disabled",
|
|
5417
|
+
"type",
|
|
5418
|
+
"placeholder",
|
|
5419
|
+
"value",
|
|
5420
|
+
"data-testid",
|
|
5421
|
+
"custom-class"
|
|
5422
|
+
];
|
|
5416
5423
|
}
|
|
5417
5424
|
getAttributesToRemoveFromParent() {
|
|
5418
5425
|
return ["class"];
|
|
@@ -5431,7 +5438,7 @@ let Gt = class extends h {
|
|
|
5431
5438
|
.value=${this.type !== "file" ? this.value : ""}
|
|
5432
5439
|
@change="${this.handleInputChange}"
|
|
5433
5440
|
${G(t)}
|
|
5434
|
-
class="${p(ya, this.
|
|
5441
|
+
class="${p(ya, this.customClass)}"
|
|
5435
5442
|
/>
|
|
5436
5443
|
`;
|
|
5437
5444
|
}
|
package/dist/rtg-ui-kit.umd.cjs
CHANGED
|
@@ -2859,7 +2859,7 @@ body {
|
|
|
2859
2859
|
.wrapper {
|
|
2860
2860
|
display: block;
|
|
2861
2861
|
}
|
|
2862
|
-
`;let Se=nr;customElements.define("shadow-wrapper",Se);const vo="rtg-flex rtg-h-9 rtg-w-full rtg-rounded-md rtg-border rtg-border-input rtg-bg-transparent rtg-px-3 rtg-py-1 rtg-text-sm rtg-shadow-sm rtg-transition-colors file:rtg-border-0 file:rtg-bg-transparent file:rtg-text-sm file:rtg-font-medium placeholder:rtg-text-muted-foreground focus-visible:rtg-outline-none focus-visible:rtg-ring-1 focus-visible:rtg-ring-ring disabled:rtg-opacity-50 input-base";class br extends An.AsyncDirective{constructor(){super(...arguments),this.prevData={}}render(t){return Tn.nothing}update(t,[r]){var n;this.element!==t.element&&(this.element=t.element),this.host=((n=t.options)===null||n===void 0?void 0:n.host)||this.element,this.apply(r),this.groom(r),this.prevData={...r}}apply(t){if(!t)return;const{prevData:r,element:n}=this;for(const e in t){const a=t[e];a!==r[e]&&(n[e]=a)}}groom(t){const{prevData:r,element:n}=this;if(r)for(const e in r)(!t||!(e in t)&&n[e]===r[e])&&(n[e]=void 0)}}_e.directive(br);class yr extends br{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const r in t){const n=t[r];n!==this.eventData[r]&&this.applyEvent(r,n)}}applyEvent(t,r){const{prevData:n,element:e}=this;this.eventData[t]=r,n[t]&&e.removeEventListener(t,this,r),e.addEventListener(t,this,r)}groom(t){const{prevData:r,element:n}=this;if(r)for(const e in r)(!t||!(e in t)&&n[e]===r[e])&&this.groomEvent(e,r[e])}groomEvent(t,r){const{element:n}=this;delete this.eventData[t],n.removeEventListener(t,this,r)}handleEvent(t){const r=this.eventData[t.type];typeof r=="function"?r.call(this.host,t):r.handleEvent(t)}disconnected(){const{eventData:t,element:r}=this;for(const n in t){const e=n.slice(1),a=t[n];r.removeEventListener(e,this,a)}}reconnected(){const{eventData:t,element:r}=this;for(const n in t){const e=n.slice(1),a=t[n];r.addEventListener(e,this,a)}}}_e.directive(yr);class bo extends yr{apply(t){if(!t)return;const{prevData:r,element:n}=this;for(const e in t){const a=t[e];if(a===r[e])continue;const s=e.slice(1);switch(e[0]){case"@":this.eventData[s]=a,this.applyEvent(s,a);break;case".":n[s]=a;break;case"?":a?n.setAttribute(s,""):n.removeAttribute(s);break;default:a!=null?n.setAttribute(e,String(a)):n.removeAttribute(e);break}}}groom(t){const{prevData:r,element:n}=this;if(r)for(const e in r){const a=e.slice(1);if(!t||!(e in t)&&n[a]===r[e])switch(e[0]){case"@":this.groomEvent(a,r[e]);break;case".":n[a]=void 0;break;case"?":n.removeAttribute(a);break;default:n.removeAttribute(e);break}}}}const H=_e.directive(bo);var yo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,Tt=(i,t,r,n)=>{for(var e=n>1?void 0:n?wo(t,r):t,a=i.length-1,s;a>=0;a--)(s=i[a])&&(e=(n?s(t,r,e):s(e))||e);return n&&e&&yo(t,r,e),e};o.RtgInput=class extends h{constructor(){super(),this.disabled=!1,this.type="text",this.placeholder="",this.defaultValue="",this.value="",this.value=this.value||this.defaultValue}firstUpdated(t){this.removeParentAttributes();const r=["--input-border-radius","--input-padding"];this.applyCustomClass(r,"input","input-base"),this.type!=="file"&&this.defaultValue&&(this.value=this.defaultValue)}handleInputChange(t){const r=t.target;r.type==="file"?this.value=r.files?r.files[0].name:"":this.value=r.value}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}getAttributesToRemoveFromParent(){return["class"]}createRenderRoot(){return this}render(){const t=this.getFilteredAttributes();return d.html`
|
|
2862
|
+
`;let Se=nr;customElements.define("shadow-wrapper",Se);const vo="rtg-flex rtg-h-9 rtg-w-full rtg-rounded-md rtg-border rtg-border-input rtg-bg-transparent rtg-px-3 rtg-py-1 rtg-text-sm rtg-shadow-sm rtg-transition-colors file:rtg-border-0 file:rtg-bg-transparent file:rtg-text-sm file:rtg-font-medium placeholder:rtg-text-muted-foreground focus-visible:rtg-outline-none focus-visible:rtg-ring-1 focus-visible:rtg-ring-ring disabled:rtg-opacity-50 input-base";class br extends An.AsyncDirective{constructor(){super(...arguments),this.prevData={}}render(t){return Tn.nothing}update(t,[r]){var n;this.element!==t.element&&(this.element=t.element),this.host=((n=t.options)===null||n===void 0?void 0:n.host)||this.element,this.apply(r),this.groom(r),this.prevData={...r}}apply(t){if(!t)return;const{prevData:r,element:n}=this;for(const e in t){const a=t[e];a!==r[e]&&(n[e]=a)}}groom(t){const{prevData:r,element:n}=this;if(r)for(const e in r)(!t||!(e in t)&&n[e]===r[e])&&(n[e]=void 0)}}_e.directive(br);class yr extends br{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const r in t){const n=t[r];n!==this.eventData[r]&&this.applyEvent(r,n)}}applyEvent(t,r){const{prevData:n,element:e}=this;this.eventData[t]=r,n[t]&&e.removeEventListener(t,this,r),e.addEventListener(t,this,r)}groom(t){const{prevData:r,element:n}=this;if(r)for(const e in r)(!t||!(e in t)&&n[e]===r[e])&&this.groomEvent(e,r[e])}groomEvent(t,r){const{element:n}=this;delete this.eventData[t],n.removeEventListener(t,this,r)}handleEvent(t){const r=this.eventData[t.type];typeof r=="function"?r.call(this.host,t):r.handleEvent(t)}disconnected(){const{eventData:t,element:r}=this;for(const n in t){const e=n.slice(1),a=t[n];r.removeEventListener(e,this,a)}}reconnected(){const{eventData:t,element:r}=this;for(const n in t){const e=n.slice(1),a=t[n];r.addEventListener(e,this,a)}}}_e.directive(yr);class bo extends yr{apply(t){if(!t)return;const{prevData:r,element:n}=this;for(const e in t){const a=t[e];if(a===r[e])continue;const s=e.slice(1);switch(e[0]){case"@":this.eventData[s]=a,this.applyEvent(s,a);break;case".":n[s]=a;break;case"?":a?n.setAttribute(s,""):n.removeAttribute(s);break;default:a!=null?n.setAttribute(e,String(a)):n.removeAttribute(e);break}}}groom(t){const{prevData:r,element:n}=this;if(r)for(const e in r){const a=e.slice(1);if(!t||!(e in t)&&n[a]===r[e])switch(e[0]){case"@":this.groomEvent(a,r[e]);break;case".":n[a]=void 0;break;case"?":n.removeAttribute(a);break;default:n.removeAttribute(e);break}}}}const H=_e.directive(bo);var yo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,Tt=(i,t,r,n)=>{for(var e=n>1?void 0:n?wo(t,r):t,a=i.length-1,s;a>=0;a--)(s=i[a])&&(e=(n?s(t,r,e):s(e))||e);return n&&e&&yo(t,r,e),e};o.RtgInput=class extends h{constructor(){super(),this.disabled=!1,this.type="text",this.placeholder="",this.defaultValue="",this.value="",this.value=this.value||this.defaultValue}firstUpdated(t){this.removeParentAttributes();const r=["--input-border-radius","--input-padding"];this.applyCustomClass(r,"input","input-base"),this.type!=="file"&&this.defaultValue&&(this.value=this.defaultValue)}handleInputChange(t){const r=t.target;r.type==="file"?this.value=r.files?r.files[0].name:"":this.value=r.value}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid","custom-class"]}getAttributesToRemoveFromParent(){return["class"]}createRenderRoot(){return this}render(){const t=this.getFilteredAttributes();return d.html`
|
|
2863
2863
|
<input
|
|
2864
2864
|
part="input"
|
|
2865
2865
|
type="${this.type}"
|
|
@@ -2868,7 +2868,7 @@ body {
|
|
|
2868
2868
|
.value=${this.type!=="file"?this.value:""}
|
|
2869
2869
|
@change="${this.handleInputChange}"
|
|
2870
2870
|
${H(t)}
|
|
2871
|
-
class="${p(vo,this.
|
|
2871
|
+
class="${p(vo,this.customClass)}"
|
|
2872
2872
|
/>
|
|
2873
2873
|
`}},Tt([l.property({type:Boolean})],o.RtgInput.prototype,"disabled",2),Tt([l.property({type:String})],o.RtgInput.prototype,"type",2),Tt([l.property({type:String})],o.RtgInput.prototype,"placeholder",2),Tt([l.property({type:String})],o.RtgInput.prototype,"defaultValue",2),Tt([l.property({type:String})],o.RtgInput.prototype,"value",2),o.RtgInput=Tt([l.customElement("rtg-input")],o.RtgInput);const wr=i=>typeof i=="boolean"?`${i}`:i===0?"0":i,Cr=lr,Z=(i,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Cr(i,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:e,defaultVariants:a}=t,s=Object.keys(e).map(b=>{const w=r==null?void 0:r[b],E=a==null?void 0:a[b];if(w===null)return null;const N=wr(w)||wr(E);return e[b][N]}),m=r&&Object.entries(r).reduce((b,w)=>{let[E,N]=w;return N===void 0||(b[E]=N),b},{}),C=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((b,w)=>{let{class:E,className:N,...F}=w;return Object.entries(F).every(L=>{let[z,P]=L;return Array.isArray(P)?P.includes({...a,...m}[z]):{...a,...m}[z]===P})?[...b,E,N]:b},[]);return Cr(i,s,C,r==null?void 0:r.class,r==null?void 0:r.className)},Co=Z("rtg-text-sm rtg-font-medium rtg-leading-none peer-disabled:rtg-cursor-not-allowed peer-disabled:rtg-opacity-70");var _o=Object.defineProperty,xo=Object.getOwnPropertyDescriptor,_r=(i,t,r,n)=>{for(var e=n>1?void 0:n?xo(t,r):t,a=i.length-1,s;a>=0;a--)(s=i[a])&&(e=(n?s(t,r,e):s(e))||e);return n&&e&&_o(t,r,e),e};o.Label=class extends h{constructor(){super(...arguments),this.for=""}firstUpdated(t){const r=["--label-text-color","--label-padding"];this.applyCustomClass(r,"label","label-base")}getAttributesToExclude(){return["for","data-testid","class"]}createRenderRoot(){return this}render(){const t=this.getFilteredAttributes();return d.html`
|
|
2874
2874
|
<label
|
package/package.json
CHANGED