@ncino/web-components 2.2.0-preview.2 → 2.2.0-preview.4

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{a as m,x as d}from"../../../../assets/index-chunk2.js";import"../input-label/input-label.gator.js";import"../help-text/help-text.gator.js";import"../../../icon/gator/icon.gator.js";import"../../../icon/gator/templates/arrow-left.js";import"../../../icon/gator/templates/arrow-right.js";import"../../../icon/gator/templates/calendar.js";import"../../../icon/gator/templates/check-circle.js";import"../../../icon/gator/templates/check.js";import"../../../icon/gator/templates/checkbox.js";import"../../../icon/gator/templates/checkbox-selected.js";import"../../../icon/gator/templates/chevron-down.js";import"../../../icon/gator/templates/chevron-left.js";import"../../../icon/gator/templates/chevron-right.js";import"../../../icon/gator/templates/chevron-up.js";import"../../../icon/gator/templates/dashboard.js";import"../../../icon/gator/templates/exit.js";import"../../../icon/gator/templates/exit-circle.js";import"../../../icon/gator/templates/eye-crossed.js";import"../../../icon/gator/templates/info.js";import"../../../icon/gator/templates/link.js";import"../../../icon/gator/templates/overflow-menu.js";import"../../../icon/gator/templates/percent.js";import"../../../icon/gator/templates/picture.js";import"../../../icon/gator/templates/shield-lock.js";import"../../../icon/gator/templates/radio.js";import"../../../icon/gator/templates/radio-selected.js";import"../../../icon/gator/templates/restricted.js";import"../../../icon/gator/templates/settings.js";import"../../../icon/gator/templates/warning.js";import"../../../list/gator/list/list.gator.js";import"../../../list/gator/list-item/list-item.gator.js";import{t as b}from"../../../../assets/index-chunk3.js";import{n}from"../../../../assets/index-chunk.js";import{r as f}from"../../../../assets/index-chunk4.js";import{e as c,n as p}from"../../../../assets/index-chunk8.js";import{a as x,c as y,b as g}from"../../../../assets/index-chunk12.js";import{K as o}from"../../../../consts/key-constants.js";import{N as w}from"../../base/input-base.gator.js";import{f as $,a as _}from"../../../../utils/places-utils.js";import{f as R}from"../../../../utils/industry-utils.js";import{f as D}from"../../../../utils/phone-utils.js";import{o as v}from"../../../../assets/index-chunk7.js";import"../../../../assets/index-chunk5.js";import"../../../../assets/index-chunk6.js";import"../../../../utils/mixins/attribute-deletion.js";import"../../../icon/icon-registry.js";import"../../../../utils/components/testable-lit-element/testable-lit-element.js";import"../../../divider/gator/divider.gator.js";import"../../../divider/divider.js";import"../../../../assets/index-chunk9.js";import"../../base/input-base.js";const C=':root,:host{--ngc-input-dropdown-list-max-height: 14rem}.gator-dropdown-listbox{position:absolute;width:max-content;top:0;left:0;display:none;max-height:var(--ngc-input-dropdown-list-max-height);overflow-y:scroll;overflow-x:hidden;border-radius:var(--radius-card-medium, .5rem);padding:var(--spacing-padding-margin-8, .5rem) 2px;background:var(--color-surface-primary-white, #FFF);box-shadow:var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-1-y-offset, 7px) var(--shadow-shadow-3-dropdown-property-1-blur, 12px) var(--shadow-shadow-3-dropdown-property-1-spread, 0px) var(--shadow-color-10, rgba(31, 31, 31, .1)),var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-2-y-offset, 8px) var(--shadow-shadow-3-dropdown-property-2-blur, 16px) var(--shadow-shadow-3-dropdown-property-2-spread, 0px) var(--shadow-color-8, rgba(31, 31, 31, .08)),var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-3-y-offset, 9px) var(--shadow-shadow-3-dropdown-property-3-blur, 18px) var(--shadow-shadow-3-dropdown-property-3-spread, 0px) var(--shadow-color-8, rgba(31, 31, 31, .08))}.gator-form-element-control:focus-visible:not(.gator-disabled){outline:2px solid var(--ngc-input-border-color-focused, #1F1F1F)!important;border:1px solid transparent!important}.gator-dropdown-listbox_expanded{display:block;z-index:1}.gator-faux-input-placeholder{color:var(--text-color-placeholder, #6D6D6D);font-family:var(--text-family-body, "Open Sans");font-size:var(--text-size-body-1, 1.0625rem);line-height:var(--text-line-height-body-1, 1.5rem);letter-spacing:var(--text-letter-spacing-default, 0rem)}';var F=Object.defineProperty,k=Object.getOwnPropertyDescriptor,I=Object.getPrototypeOf,P=Reflect.get,r=(t,e,i,s)=>{for(var l=s>1?void 0:s?k(e,i):e,h=t.length-1,u;h>=0;h--)(u=t[h])&&(l=(s?u(e,i,l):u(l))||l);return s&&l&&F(e,i,l),l},O=(t,e,i)=>P(I(t),i,e);let a=class extends w{constructor(){super(...arguments),this.options=[],this.autocomplete=!1,this.valueDisplayed=!1,this._expanded=!1,this._searchValue="",this.listboxRef=c(),this.listRef=c(),this.inputRef=c()}render(){return d`
1
+ import{a as v,x as d}from"../../../../assets/index-chunk2.js";import"../input-label/input-label.gator.js";import"../help-text/help-text.gator.js";import"../../../icon/gator/icon.gator.js";import"../../../icon/gator/templates/arrow-left.js";import"../../../icon/gator/templates/arrow-right.js";import"../../../icon/gator/templates/calendar.js";import"../../../icon/gator/templates/check-circle.js";import"../../../icon/gator/templates/check.js";import"../../../icon/gator/templates/checkbox.js";import"../../../icon/gator/templates/checkbox-selected.js";import"../../../icon/gator/templates/chevron-down.js";import"../../../icon/gator/templates/chevron-left.js";import"../../../icon/gator/templates/chevron-right.js";import"../../../icon/gator/templates/chevron-up.js";import"../../../icon/gator/templates/dashboard.js";import"../../../icon/gator/templates/exit.js";import"../../../icon/gator/templates/exit-circle.js";import"../../../icon/gator/templates/eye-crossed.js";import"../../../icon/gator/templates/info.js";import"../../../icon/gator/templates/link.js";import"../../../icon/gator/templates/overflow-menu.js";import"../../../icon/gator/templates/percent.js";import"../../../icon/gator/templates/picture.js";import"../../../icon/gator/templates/shield-lock.js";import"../../../icon/gator/templates/radio.js";import"../../../icon/gator/templates/radio-selected.js";import"../../../icon/gator/templates/restricted.js";import"../../../icon/gator/templates/settings.js";import"../../../icon/gator/templates/warning.js";import"../../../list/gator/list/list.gator.js";import"../../../list/gator/list-item/list-item.gator.js";import{t as b}from"../../../../assets/index-chunk3.js";import{n}from"../../../../assets/index-chunk.js";import{r as f}from"../../../../assets/index-chunk4.js";import{e as c,n as p}from"../../../../assets/index-chunk8.js";import{a as x,c as y,b as g}from"../../../../assets/index-chunk12.js";import{K as o}from"../../../../consts/key-constants.js";import{N as w}from"../../base/input-base.gator.js";import{f as $,a as _}from"../../../../utils/places-utils.js";import{f as R}from"../../../../utils/industry-utils.js";import{f as D}from"../../../../utils/phone-utils.js";import{o as m}from"../../../../assets/index-chunk7.js";import"../../../../assets/index-chunk5.js";import"../../../../assets/index-chunk6.js";import"../../../../utils/mixins/attribute-deletion.js";import"../../../icon/icon-registry.js";import"../../../../utils/components/testable-lit-element/testable-lit-element.js";import"../../../divider/gator/divider.gator.js";import"../../../divider/divider.js";import"../../../../assets/index-chunk9.js";import"../../base/input-base.js";const C=':root,:host{--ngc-input-dropdown-list-max-height: 14rem}.gator-dropdown-listbox{position:absolute;width:max-content;top:0;left:0;display:none;max-height:var(--ngc-input-dropdown-list-max-height);overflow-y:scroll;overflow-x:hidden;border-radius:var(--radius-card-medium, .5rem);padding:var(--spacing-padding-margin-8, .5rem) 2px;background:var(--color-surface-primary-white, #FFF);box-shadow:var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-1-y-offset, 7px) var(--shadow-shadow-3-dropdown-property-1-blur, 12px) var(--shadow-shadow-3-dropdown-property-1-spread, 0px) var(--shadow-color-10, rgba(31, 31, 31, .1)),var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-2-y-offset, 8px) var(--shadow-shadow-3-dropdown-property-2-blur, 16px) var(--shadow-shadow-3-dropdown-property-2-spread, 0px) var(--shadow-color-8, rgba(31, 31, 31, .08)),var(--shadow-x-offset-0, 0px) var(--shadow-shadow-3-dropdown-property-3-y-offset, 9px) var(--shadow-shadow-3-dropdown-property-3-blur, 18px) var(--shadow-shadow-3-dropdown-property-3-spread, 0px) var(--shadow-color-8, rgba(31, 31, 31, .08))}.gator-form-element-control:focus-visible:not(.gator-disabled){outline:2px solid var(--ngc-input-border-color-focused, #1F1F1F)!important;border:1px solid transparent!important}.gator-dropdown-listbox_expanded{display:block;z-index:1}.gator-faux-input-placeholder{color:var(--text-color-placeholder, #6D6D6D);font-family:var(--text-family-body, "Open Sans");font-size:var(--text-size-body-1, 1.0625rem);line-height:var(--text-line-height-body-1, 1.5rem);letter-spacing:var(--text-letter-spacing-default, 0rem)}';var F=Object.defineProperty,k=Object.getOwnPropertyDescriptor,P=Object.getPrototypeOf,I=Reflect.get,r=(t,e,i,s)=>{for(var l=s>1?void 0:s?k(e,i):e,h=t.length-1,u;h>=0;h--)(u=t[h])&&(l=(s?u(e,i,l):u(l))||l);return s&&l&&F(e,i,l),l},O=(t,e,i)=>I(P(t),i,e);let a=class extends w{constructor(){super(...arguments),this.options=[],this.autocomplete=!1,this.valueDisplayed=!1,this._expanded=!1,this._searchValue="",this.listboxRef=c(),this.listRef=c(),this.inputRef=c()}render(){return d`
2
2
  <div class="gator-form-element">
3
3
  <slot name="label">
4
4
  ${this.label?this.labelMarkup:null}
@@ -6,7 +6,7 @@ import{a as m,x as d}from"../../../../assets/index-chunk2.js";import"../input-la
6
6
  <div
7
7
  ${p(this.controlRef)}
8
8
  class="gator-form-element-control ${this.errorClass} ${this.disabledClass}"
9
- data-testid=${v(this.dataTestid)}-listbox
9
+ data-testid=${m(this.dataTestid)}-listbox
10
10
  aria-controls="listbox-${this.id}"
11
11
  aria-expanded="${this._expanded}"
12
12
  aria-haspopup="listbox"
@@ -36,7 +36,7 @@ import{a as m,x as d}from"../../../../assets/index-chunk2.js";import"../input-la
36
36
  .disabled="${this.disabled}"
37
37
  class="gator-input"
38
38
  autocomplete="one-time-code"
39
- aria-label="${v(this.label)}"
39
+ aria-label="${m(this.label)}"
40
40
  .value="${this.displayedValue}"
41
41
  @input="${this.handleInput}"
42
42
  @keydown="${this.handleInputKeydown}"
@@ -92,4 +92,4 @@ import{a as m,x as d}from"../../../../assets/index-chunk2.js";import"../input-la
92
92
  type="div"
93
93
  >
94
94
  ${this.label}
95
- </ngc-input-label>`}toggleListbox(t,e){var i;this.disabled||(e||(this._expanded=!this._expanded),setTimeout(()=>{var s;this.assignPosition(),this.listRef.value&&(t==o.DOWN||!this.value)?this._activeDescendant=this.listRef.value.falseFocusFirstItem():this.value&&this.listRef.value&&(this._activeDescendant=this.listRef.value.setFalseFocusToValue(this.value)),this._expanded&&((s=this.controlRef.value)==null||s.setAttribute("aria-activedescendant",this.replacedActiveDescendant))}),this._expanded||(this._activeDescendant=void 0,(i=this.controlRef.value)==null||i.removeAttribute("aria-activedescendant")))}get endIconMarkup(){return d`<ngc-icon .name="${this.endIcon||"chevron-down"}"></ngc-icon>`}assignPosition(){const t=this.controlRef.value;!this.listboxRef||!this.listboxRef.value||!t||(this._cleanup=x(t,this.listboxRef.value,async()=>{if(!this.listboxRef||!this.listboxRef.value||!t)return;const{x:e,y:i,placement:s}=await y(t,this.listboxRef.value,{placement:"bottom-start",middleware:[g({alignment:"start"})]});let l=s==="bottom-start"?4:-4;Object.assign(this.listboxRef.value.style,{left:`${e}px`,top:`${i+l}px`,width:`${this.listWidth??t.clientWidth}px`})}))}handleInput(t){let e=t.target;this._searchValue=e.value,this._expanded=!0}handleInputKeydown(t){if((t.key===o.DOWN||t.key===o.UP)&&t.preventDefault(),t.key===o.SPACE){t.stopPropagation();return}}};a.styles=[...O(a,a,"styles"),m(C)];r([n({type:Array})],a.prototype,"options",2);r([n({type:Boolean})],a.prototype,"autocomplete",2);r([n({type:String,attribute:"data-type"})],a.prototype,"dataType",2);r([n({type:String,attribute:"country-code"})],a.prototype,"countryCode",2);r([n({type:String,attribute:"list-width"})],a.prototype,"listWidth",2);r([n({type:Boolean,attribute:"value-displayed"})],a.prototype,"valueDisplayed",2);r([f()],a.prototype,"_activeDescendant",2);r([f()],a.prototype,"_expanded",2);r([f()],a.prototype,"_searchValue",2);a=r([b("ngc-input-dropdown")],a);
95
+ </ngc-input-label>`}toggleListbox(t,e){var i;this.disabled||(e||(this._expanded=!this._expanded),setTimeout(()=>{var s;this.assignPosition(),this.listRef.value&&(t==o.DOWN||!this.value)?this._activeDescendant=this.listRef.value.falseFocusFirstItem():this.value&&this.listRef.value&&(this._activeDescendant=this.listRef.value.setFalseFocusToValue(this.value)),this._expanded&&((s=this.controlRef.value)==null||s.setAttribute("aria-activedescendant",this.replacedActiveDescendant))}),this._expanded||(this._activeDescendant=void 0,(i=this.controlRef.value)==null||i.removeAttribute("aria-activedescendant")))}get endIconMarkup(){return d`<ngc-icon .name="${this.endIcon||"chevron-down"}"></ngc-icon>`}assignPosition(){const t=this.controlRef.value;!this.listboxRef||!this.listboxRef.value||!t||(this._cleanup=x(t,this.listboxRef.value,async()=>{if(!this.listboxRef||!this.listboxRef.value||!t)return;const{x:e,y:i,placement:s}=await y(t,this.listboxRef.value,{placement:"bottom-start",middleware:[g({alignment:"start",allowedPlacements:["top","bottom"]})]});let l=s==="bottom-start"?4:-4;Object.assign(this.listboxRef.value.style,{left:`${e}px`,top:`${i+l}px`,width:`${this.listWidth??t.clientWidth}px`})}))}handleInput(t){let e=t.target;this._searchValue=e.value,this._expanded=!0}handleInputKeydown(t){if((t.key===o.DOWN||t.key===o.UP)&&t.preventDefault(),t.key===o.SPACE){t.stopPropagation();return}}};a.styles=[...O(a,a,"styles"),v(C)];r([n({type:Array})],a.prototype,"options",2);r([n({type:Boolean})],a.prototype,"autocomplete",2);r([n({type:String,attribute:"data-type"})],a.prototype,"dataType",2);r([n({type:String,attribute:"country-code"})],a.prototype,"countryCode",2);r([n({type:String,attribute:"list-width"})],a.prototype,"listWidth",2);r([n({type:Boolean,attribute:"value-displayed"})],a.prototype,"valueDisplayed",2);r([f()],a.prototype,"_activeDescendant",2);r([f()],a.prototype,"_expanded",2);r([f()],a.prototype,"_searchValue",2);a=r([b("ngc-input-dropdown")],a);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/web-components",
3
3
  "author": "nCino",
4
- "version": "2.2.0-preview.2",
4
+ "version": "2.2.0-preview.4",
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": "2.2.0-preview.1",
4
+ "version": "2.2.0-preview.3",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {