@revotech-group/revotech-ui-kit 0.0.78 → 0.0.80

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.
@@ -5403,9 +5403,7 @@ let Tt = class extends h {
5403
5403
  super(), this.disabled = !1, this.type = "text", this.placeholder = "", this.defaultValue = "", this.value = "", this.dataKey = "", this.value = this.value || this.defaultValue;
5404
5404
  }
5405
5405
  firstUpdated(t) {
5406
- this.removeParentAttributes();
5407
- const e = ["--input-border-radius", "--input-padding"];
5408
- this.applyCustomClass(e, "input", "input-base"), this.type !== "file" && this.defaultValue && (this.value = this.defaultValue);
5406
+ this.removeParentAttributes(), this.type !== "file" && this.defaultValue && (this.value = this.defaultValue);
5409
5407
  }
5410
5408
  handleInputChange(t) {
5411
5409
  const e = t.target;
@@ -10830,7 +10828,13 @@ let Ut = class extends h {
10830
10828
  var t, e;
10831
10829
  this.isSelected = this.value.toLowerCase() === ((e = (t = this._select.selectStore.selectedValue) == null ? void 0 : t.toLowerCase) == null ? void 0 : e.call(t)), this.requestUpdate();
10832
10830
  }, this.handleClick = (t) => {
10833
- t.stopPropagation(), this._select.selectStore.select(this.value), this.onSelect(this.value, this.selectItemIndex);
10831
+ t.stopPropagation(), this._select.selectStore.select(this.value), this.onSelect(this.value, this.selectItemIndex), this.dispatchEvent(
10832
+ new CustomEvent("change", {
10833
+ detail: { value: this.value },
10834
+ bubbles: !0,
10835
+ composed: !0
10836
+ })
10837
+ );
10834
10838
  };
10835
10839
  }
10836
10840
  get _select() {
@@ -14251,7 +14255,9 @@ let _o = class extends h {
14251
14255
  return this;
14252
14256
  }
14253
14257
  render() {
14254
- return d`<div>Here Is Your Playground:</div>`;
14258
+ return d`<rtg-alert variant="error"
14259
+ >Here Is Your Playground:</rtg-alert
14260
+ >`;
14255
14261
  }
14256
14262
  };
14257
14263
  _o = df([
@@ -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,Ct=(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.dataKey="",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}handleFocus(){this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0,detail:{dataKey:this.dataKey}}))}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid","custom-class","data-key"]}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,Ct=(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.dataKey="",this.value=this.value||this.defaultValue}firstUpdated(t){this.removeParentAttributes(),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}handleFocus(){this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0,detail:{dataKey:this.dataKey}}))}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid","custom-class","data-key"]}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}"
@@ -4186,7 +4186,7 @@ body {
4186
4186
  <div class="${p("",this.className)}" rtgdlg-root part="drawer">
4187
4187
  ${this.state===Ve?d.html` <rtg-drawer-overlay></rtg-drawer-overlay>`:d.nothing}
4188
4188
  </div>
4189
- `}},Xr([l.property({attribute:"data-state",type:String})],o.Drawer.prototype,"state",2),o.Drawer=Xr([l.customElement("rtg-drawer")],o.Drawer);const sc="rtg-absolute rtg-z-50 rtg-mt-1 rtg-max-h-72 rtg-w-full rtg-overflow-hidden rtg-overflow-y-auto rtg-rounded-md rtg-border rtg-border-gray-200 rtg-bg-white rtg-px-1 rtg-py-2 rtg-shadow-md dark:rtg-border-neutral-700 dark:rtg-bg-neutral-900",lc="rtg-flex rtg-w-full rtg-cursor-pointer rtg-items-center rtg-justify-between rtg-rounded-lg rtg-px-4 rtg-py-2 hover:rtg-bg-gray-100 focus:rtg-bg-gray-100 focus:rtg-outline-none dark:rtg-bg-neutral-900 dark:rtg-text-neutral-200 dark:hover:rtg-bg-neutral-800 dark:focus:rtg-bg-neutral-800",cc="rtg-px-4 rtg-w-full rtg-text-base rtg-font-bold",dc="rtg-absolute rtg-z-50 rtg-max-h-72 rtg-w-full rtg-overflow-hidden rtg-overflow-y-auto rtg-rounded-lg rtg-border rtg-border-gray-200 bg-white p-1 dark:rtg-border-neutral-700 dark:rtg-bg-neutral-900 [&::-webkit-scrollbar-thumb]:rtg-rounded-full [&::-webkit-scrollbar-thumb]:rtg-bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:rtg-bg-neutral-500 [&::-webkit-scrollbar-track]:rtg-bg-gray-100 dark:[&::-webkit-scrollbar-track]:rtg-bg-neutral-700 [&::-webkit-scrollbar]:rtg-w-2",uc="rtg-mx-1 rtg-h-px rtg-bg-border",gc="rtg-flex rtg-h-10 rtg-items-center rtg-justify-between rtg-rounded-md rtg-border rtg-border-input rtg-bg-background rtg-px-3 rtg-py-2 rtg-text-sm rtg-ring-offset-background placeholder:rtg-text-muted-foreground focus:rtg-outline-none focus:ring-2 focus:rtg-ring-ring focus:rtg-ring-offset-2 disabled:rtg-cursor-not-allowed disabled:rtg-opacity-50",pc="rtg-line-clamp-1 rtg-flex rtg-w-[180px]";var hc=Object.defineProperty,mc=Object.getOwnPropertyDescriptor,Ot=(i,t,r,n)=>{for(var e=n>1?void 0:n?mc(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&&hc(t,r,e),e};o.SelectItem=class extends h{constructor(){super(...arguments),this.value="",this.isSelected=!1,this.isFocus=!1,this.selectItemIndex=-1,this.onSelect=(t,r)=>{},this.class="",this._onStoreChange=()=>{var t,r;this.isSelected=this.value.toLowerCase()===((r=(t=this._select.selectStore.selectedValue)==null?void 0:t.toLowerCase)==null?void 0:r.call(t)),this.requestUpdate()},this.handleClick=t=>{t.stopPropagation(),this._select.selectStore.select(this.value),this.onSelect(this.value,this.selectItemIndex)}}get _select(){let t=this.parentElement;for(;t&&!(t instanceof o.Select);)t=t.parentElement;return t}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this._onStoreChange)}disconnectedCallback(){this._select.selectStore.unsubscribe(this._onStoreChange),super.disconnectedCallback()}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get _containerElement(){return this.querySelector("div[part=select-item-container]")}createRenderRoot(){return this}render(){const t=this.getFilteredAttributes();return d.html`
4189
+ `}},Xr([l.property({attribute:"data-state",type:String})],o.Drawer.prototype,"state",2),o.Drawer=Xr([l.customElement("rtg-drawer")],o.Drawer);const sc="rtg-absolute rtg-z-50 rtg-mt-1 rtg-max-h-72 rtg-w-full rtg-overflow-hidden rtg-overflow-y-auto rtg-rounded-md rtg-border rtg-border-gray-200 rtg-bg-white rtg-px-1 rtg-py-2 rtg-shadow-md dark:rtg-border-neutral-700 dark:rtg-bg-neutral-900",lc="rtg-flex rtg-w-full rtg-cursor-pointer rtg-items-center rtg-justify-between rtg-rounded-lg rtg-px-4 rtg-py-2 hover:rtg-bg-gray-100 focus:rtg-bg-gray-100 focus:rtg-outline-none dark:rtg-bg-neutral-900 dark:rtg-text-neutral-200 dark:hover:rtg-bg-neutral-800 dark:focus:rtg-bg-neutral-800",cc="rtg-px-4 rtg-w-full rtg-text-base rtg-font-bold",dc="rtg-absolute rtg-z-50 rtg-max-h-72 rtg-w-full rtg-overflow-hidden rtg-overflow-y-auto rtg-rounded-lg rtg-border rtg-border-gray-200 bg-white p-1 dark:rtg-border-neutral-700 dark:rtg-bg-neutral-900 [&::-webkit-scrollbar-thumb]:rtg-rounded-full [&::-webkit-scrollbar-thumb]:rtg-bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:rtg-bg-neutral-500 [&::-webkit-scrollbar-track]:rtg-bg-gray-100 dark:[&::-webkit-scrollbar-track]:rtg-bg-neutral-700 [&::-webkit-scrollbar]:rtg-w-2",uc="rtg-mx-1 rtg-h-px rtg-bg-border",gc="rtg-flex rtg-h-10 rtg-items-center rtg-justify-between rtg-rounded-md rtg-border rtg-border-input rtg-bg-background rtg-px-3 rtg-py-2 rtg-text-sm rtg-ring-offset-background placeholder:rtg-text-muted-foreground focus:rtg-outline-none focus:ring-2 focus:rtg-ring-ring focus:rtg-ring-offset-2 disabled:rtg-cursor-not-allowed disabled:rtg-opacity-50",pc="rtg-line-clamp-1 rtg-flex rtg-w-[180px]";var hc=Object.defineProperty,mc=Object.getOwnPropertyDescriptor,Ot=(i,t,r,n)=>{for(var e=n>1?void 0:n?mc(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&&hc(t,r,e),e};o.SelectItem=class extends h{constructor(){super(...arguments),this.value="",this.isSelected=!1,this.isFocus=!1,this.selectItemIndex=-1,this.onSelect=(t,r)=>{},this.class="",this._onStoreChange=()=>{var t,r;this.isSelected=this.value.toLowerCase()===((r=(t=this._select.selectStore.selectedValue)==null?void 0:t.toLowerCase)==null?void 0:r.call(t)),this.requestUpdate()},this.handleClick=t=>{t.stopPropagation(),this._select.selectStore.select(this.value),this.onSelect(this.value,this.selectItemIndex),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}}get _select(){let t=this.parentElement;for(;t&&!(t instanceof o.Select);)t=t.parentElement;return t}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this._onStoreChange)}disconnectedCallback(){this._select.selectStore.unsubscribe(this._onStoreChange),super.disconnectedCallback()}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get _containerElement(){return this.querySelector("div[part=select-item-container]")}createRenderRoot(){return this}render(){const t=this.getFilteredAttributes();return d.html`
4190
4190
  <div
4191
4191
  ${H(t)}
4192
4192
  @click=${this.handleClick}
@@ -4870,7 +4870,9 @@ body {
4870
4870
  style="overflow: hidden scroll;"
4871
4871
  ></div>
4872
4872
  </div>
4873
- `}},gn([l.query("[data-radix-scroll-area-viewport]")],o.RtgScrollArea.prototype,"viewportEl",2),o.RtgScrollArea=gn([l.customElement("rtg-scroll-area")],o.RtgScrollArea);var ig=Object.getOwnPropertyDescriptor,ag=(i,t,r,n)=>{for(var e=n>1?void 0:n?ig(t,r):t,a=i.length-1,s;a>=0;a--)(s=i[a])&&(e=s(e)||e);return e};o.LightSampleDemo=class extends h{constructor(){super()}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}createRenderRoot(){return this}render(){return d.html`<div>Here Is Your Playground:</div>`}},o.LightSampleDemo=ag([l.customElement("light-sample-demo")],o.LightSampleDemo);/**
4873
+ `}},gn([l.query("[data-radix-scroll-area-viewport]")],o.RtgScrollArea.prototype,"viewportEl",2),o.RtgScrollArea=gn([l.customElement("rtg-scroll-area")],o.RtgScrollArea);var ig=Object.getOwnPropertyDescriptor,ag=(i,t,r,n)=>{for(var e=n>1?void 0:n?ig(t,r):t,a=i.length-1,s;a>=0;a--)(s=i[a])&&(e=s(e)||e);return e};o.LightSampleDemo=class extends h{constructor(){super()}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}createRenderRoot(){return this}render(){return d.html`<rtg-alert variant="error"
4874
+ >Here Is Your Playground:</rtg-alert
4875
+ >`}},o.LightSampleDemo=ag([l.customElement("light-sample-demo")],o.LightSampleDemo);/**
4874
4876
  * @license
4875
4877
  * Copyright 2018 Google LLC
4876
4878
  * SPDX-License-Identifier: BSD-3-Clause
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent wc-ui following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "wc-ui",
6
- "version": "0.0.78",
6
+ "version": "0.0.80",
7
7
  "type": "module",
8
8
  "main": "dist/rtg-ui-kit.umd.cjs",
9
9
  "module": "./dist/rtg-ui-kit.js",