@ncino/web-components 4.0.0-preview.1 → 4.0.0-preview.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as h}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as
|
|
1
|
+
import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as h}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as u}from"../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as m}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as s}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{generateRandomId as f,getElementId as c}from"../../utils/string-utils.js";import b from"../../packages/web-components/src/tokens/primitive.tokens.scss.js";import v from"../../packages/web-components/src/tokens/semantic.tokens.scss.js";import y from"../../packages/web-components/src/components/radio/radio.gator.tokens.scss.js";import g from"../../packages/web-components/src/components/radio/radio.gator.scss.js";import"../icon/gator/icon.gator.js";import{TestableLitElement as x}from"../../utils/components/testable-lit-element/testable-lit-element.js";import{createRef as R,ref as E}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{unsafeCSS as d}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var $=Object.defineProperty,T=Object.getOwnPropertyDescriptor,i=(t,a,l,o)=>{for(var r=o>1?void 0:o?T(a,l):a,n=t.length-1,p;n>=0;n--)(p=t[n])&&(r=(o?p(a,l,r):p(r))||r);return o&&r&&$(a,l,r),r};let e=class extends x{constructor(){super(...arguments),this.id="",this.titleText="",this.value="",this.selected=!1,this.disabled=!1,this.hasError=!1,this.radioTabindex=-1,this.inputRef=R(),this._randomId=f()}updated(t){super.updated(t),t.has("hasError")&&this.inputRef.value&&this.inputRef.value.setCustomValidity(this.hasError?"true":""),t.has("selected")&&this.inputRef.value&&(this.inputRef.value.checked=this.selected)}render(){return h`
|
|
2
2
|
<div id="${this.elementId}-radio" class="gator-radio">
|
|
3
3
|
<div class="gator-radio-input-wrapper">
|
|
4
4
|
<div class="gator-radio-hover-overlay"></div>
|
|
@@ -19,4 +19,4 @@ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/re
|
|
|
19
19
|
<slot></slot>
|
|
20
20
|
</label>
|
|
21
21
|
</div>
|
|
22
|
-
`}get elementId(){return c(this.id,this._randomId)}get tabindex(){let t=this.radioTabindex;return this.selected&&(t=0),this.disabled&&(t=-1),t}handleChange(){this.selected=!this.selected,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:this.value}))}click(){var t;this.disabled||(t=this.inputRef.value)==null||t.click()}};e.shadowRootOptions={...
|
|
22
|
+
`}get elementId(){return c(this.id,this._randomId)}get tabindex(){let t=this.radioTabindex;return this.selected&&(t=0),this.disabled&&(t=-1),t}handleChange(){this.selected=!this.selected,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:this.value}))}click(){var t;this.disabled||(t=this.inputRef.value)==null||t.click()}focus(){var t;this.disabled||(t=this.inputRef.value)==null||t.focus()}};e.shadowRootOptions={...u.shadowRootOptions,delegatesFocus:!0,mode:"open"};e.styles=[d(y),d(g),d(b),d(v)];i([s({type:String})],e.prototype,"id",2);i([s({type:String,attribute:"title-text"})],e.prototype,"titleText",2);i([s({type:String})],e.prototype,"value",2);i([s({type:Boolean})],e.prototype,"selected",2);i([s({type:Boolean})],e.prototype,"disabled",2);i([s({type:Boolean,attribute:"has-error"})],e.prototype,"hasError",2);i([s({type:Number,attribute:"radio-tabindex"})],e.prototype,"radioTabindex",2);e=i([m("ngc-radio")],e);export{e as NgcRadio};
|
package/package.json
CHANGED
package/web-types.json
CHANGED