@ncino/web-components 6.0.0-preview.1 → 6.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,20 +1,21 @@
1
- import{customElement as d}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as a}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{generateRandomId as c,getElementId as u}from"../../utils/string-utils.js";import m from"../../packages/web-components/src/components/checkbox/checkbox.gator.scss.js";import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as p,nothing as f}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as b}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{NgcInputText as x}from"../input/gator/input-text/input-text.gator.js";import{unsafeCSS as g}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,$=Object.getPrototypeOf,_=Reflect.get,s=(e,r,o,l)=>{for(var i=l>1?void 0:l?y(r,o):r,n=e.length-1,h;n>=0;n--)(h=e[n])&&(i=(l?h(r,o,i):h(i))||i);return l&&i&&v(r,o,i),i},T=(e,r,o)=>_($(e),o,r);let t=class extends x{constructor(){super(...arguments),this.titleText="",this.selected=!1,this.indeterminate=!1,this.hideLabel=!1,this.grouped=!1,this._randomId=c()}updated(e){super.updated(e),e.has("indeterminate")&&this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate),e.has("errorText")&&this.inputRef.value&&this.inputRef.value.setCustomValidity(this.errorText?"true":"")}render(){const e=this.elementId;return p`
1
+ import{customElement as c}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as a}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{generateRandomId as u,getElementId as m}from"../../utils/string-utils.js";import b from"../../packages/web-components/src/components/checkbox/checkbox.gator.scss.js";import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as d,nothing as f}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as v}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{NgcInputText as x}from"../input/gator/input-text/input-text.gator.js";import{ifDefined as p}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/if-defined.js";import{unsafeCSS as g}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var y=Object.defineProperty,$=Object.getOwnPropertyDescriptor,_=Object.getPrototypeOf,T=Reflect.get,s=(e,r,o,l)=>{for(var i=l>1?void 0:l?$(r,o):r,h=e.length-1,n;h>=0;h--)(n=e[h])&&(i=(l?n(r,o,i):n(i))||i);return l&&i&&y(r,o,i),i},k=(e,r,o)=>T(_(e),o,r);let t=class extends x{constructor(){super(...arguments),this.titleText="",this.selected=!1,this.indeterminate=!1,this.hideLabel=!1,this.grouped=!1,this._randomId=u()}updated(e){super.updated(e),e.has("indeterminate")&&this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate),e.has("errorText")&&this.inputRef.value&&this.inputRef.value.setCustomValidity(this.errorText?"true":"")}render(){const e=this.elementId;return d`
2
2
  <div class="gator-form-element">
3
3
  <div id="${e}-checkbox" class="gator-checkbox">
4
4
  <div class="gator-checkbox-input-wrapper">
5
5
  <input
6
- ${b(this.inputRef)}
6
+ ${v(this.inputRef)}
7
7
  id="${e}"
8
8
  class="gator-checkbox-input"
9
9
  type="checkbox"
10
10
  .checked="${this.selected}"
11
11
  ?disabled="${this.disabled}"
12
- aria-labelledby="${e}-checkbox"
12
+ aria-labelledby="${p(this.hideLabel?void 0:`${e}-checkbox`)}"
13
+ aria-describedby=${this.ariaDescribedby}
13
14
  @change="${this.handleChange}"
14
- aria-label="${this.titleText}"
15
+ aria-label=${p(this.hideLabel?this.titleText:void 0)}
15
16
  />
16
17
  </div>
17
- ${this.hideLabel?null:p`
18
+ ${this.hideLabel?null:d`
18
19
  <label class="gator-checkbox-title">
19
20
  ${this.titleText}
20
21
  <slot></slot>
@@ -23,7 +24,7 @@ import{customElement as d}from"../../node_modules/.pnpm/@lit_reactive-element@2.
23
24
  </div>
24
25
  ${this.bottomText}
25
26
  </div>
26
- `}get elementId(){return u(this.id,this._randomId)}get bottomText(){return this.grouped?f:p`
27
+ `}get elementId(){return m(this.id,this._randomId)}get bottomText(){return this.grouped?f:d`
27
28
  ${this.errorTextMarkup}
28
29
  ${this.helpTextMarkup}
29
- `}handleChange(){this.selected=!this.selected,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:this.value,selected:this.selected}}))}click(){this.inputRef.value?.click()}};t.styles=[...T(t,t,"styles"),g(m)];s([a({type:String,attribute:"title-text"})],t.prototype,"titleText",2);s([a({type:Boolean})],t.prototype,"selected",2);s([a({type:Boolean})],t.prototype,"indeterminate",2);s([a({type:Boolean,attribute:"hide-label"})],t.prototype,"hideLabel",2);s([a({type:Boolean,attribute:"grouped"})],t.prototype,"grouped",2);t=s([d("ngc-checkbox")],t);export{t as NgcCheckbox};
30
+ `}handleChange(){this.selected=!this.selected,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:this.value,selected:this.selected}}))}click(){this.inputRef.value?.click()}};t.styles=[...k(t,t,"styles"),g(b)];s([a({type:String,attribute:"title-text"})],t.prototype,"titleText",2);s([a({type:Boolean})],t.prototype,"selected",2);s([a({type:Boolean})],t.prototype,"indeterminate",2);s([a({type:Boolean,attribute:"hide-label"})],t.prototype,"hideLabel",2);s([a({type:Boolean,attribute:"grouped"})],t.prototype,"grouped",2);t=s([c("ngc-checkbox")],t);export{t as NgcCheckbox};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/web-components",
3
3
  "author": "nCino",
4
- "version": "6.0.0-preview.1",
4
+ "version": "6.0.0-preview.2",
5
5
  "license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org/"
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@ncino/web-components",
4
- "version": "5.1.0-preview.13",
4
+ "version": "6.0.0-preview.1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {