@ncino/web-components 16.4.1 → 16.5.0
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/_virtual/index7.js +1 -1
- package/dist/_virtual/index8.js +1 -1
- package/dist/components/avatar/gator/avatar.gator.js +3 -4
- package/dist/components/selection-box/selection-box.gator.js +16 -13
- package/dist/components/selection-box-group/selection-box-group.gator.js +6 -5
- package/dist/node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/lite/index.js +1 -1
- package/dist/node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/index.js +1 -1
- package/dist/packages/web-components/src/components/selection-box/selection-box.gator.scss.js +1 -1
- package/dist/types/src/components/selection-box/selection-box.gator.d.ts +8 -0
- package/dist/types/src/components/selection-box-group/selection-box-group.gator.d.ts +5 -1
- package/package.json +3 -3
- package/web-types.json +12 -1
package/dist/_virtual/index7.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={};export{e as
|
|
1
|
+
var e={exports:{}};export{e as __module};
|
package/dist/_virtual/index8.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={
|
|
1
|
+
var e={};export{e as __exports};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as
|
|
1
|
+
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as o}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{state as m}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{customElement as u}from"../../../utils/decorators/custom-element-decorator.js";import p from"../../../packages/web-components/src/components/avatar/gator/avatar.gator.scss.js";import f from"../../../packages/styles/dist/tokens/primitive.tokens.css.js";import v from"../../../packages/styles/dist/tokens/semantic.tokens.css.js";import{NjcAvatar as g}from"../avatar.js";import{createRef as d,ref as _}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/ref.js";import{ifDefined as x}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/if-defined.js";import{unsafeCSS as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var z=Object.defineProperty,$=Object.getOwnPropertyDescriptor,h=(t,e,a,s)=>{for(var r=s>1?void 0:s?$(e,a):e,l=t.length-1,n;l>=0;l--)(n=t[l])&&(r=(s?n(e,a,r):n(r))||r);return s&&r&&z(e,a,r),r};let i=class extends g{constructor(){super(...arguments),this._avatarRef=d(),this._size=40,this._srcValid=!1}render(){return this.skeleton?o`<ngc-skeleton-loader width="${this.pixelSize}" height="${this.pixelSize}" rounded></ngc-skeleton-loader>`:o`
|
|
2
2
|
<div ${_(this._avatarRef)}
|
|
3
3
|
class="gator-avatar ${this.interactive?"gator-avatar-interactive":""}"
|
|
4
4
|
tabindex="${x(this.interactive?"0":void 0)}"
|
|
@@ -6,10 +6,9 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
6
6
|
aria-label="${this.avatarAriaLabel}"
|
|
7
7
|
>
|
|
8
8
|
<span class="gator-avatar-content">
|
|
9
|
-
|
|
10
|
-
${this.srcIsPopulated&&this._srcValid?n`
|
|
9
|
+
${this.srcIsPopulated&&this._srcValid?o`
|
|
11
10
|
<span class="gator-avatar-image"></span>
|
|
12
|
-
`:
|
|
11
|
+
`:o`<slot></slot>`}
|
|
13
12
|
</span>
|
|
14
13
|
</div>
|
|
15
14
|
`}get srcIsPopulated(){return this.src&&this.src.trim()!==""}async updated(t){if(t&&t.has("src")&&(this._srcValid=await this.isImageLoadable(this.src)),!!this._avatarRef.value&&(this.size&&(this._size=this.pixelSize,this._avatarRef.value.style.width=`${this._size}px`,this._avatarRef.value.style.height=`${this._size}px`,this._avatarRef.value.querySelector(".gator-avatar-content")?.setAttribute("style",`font-size: ${this._size/2.5}px`),this.applySizeToSlottedIcon()),this.src&&this._srcValid)){let e=this._avatarRef.value.querySelector(".gator-avatar-image");e&&(e.style.backgroundImage=`url(${this.src})`,e.style.width=`${this._size}px`,e.style.height=`${this._size}px`)}}isImageLoadable(t){return!t||t.trim()===""?Promise.resolve(!1):new Promise(e=>{const a=new Image,s=()=>{a.onload=null,a.onerror=null};a.onload=()=>{s(),e(!0)},a.onerror=()=>{s(),e(!1)},a.src=t})}applySizeToSlottedIcon(){const t=this._avatarRef.value?.querySelector("slot");t&&t.assignedElements().forEach(a=>{a.tagName.toLowerCase()==="ngc-icon"&&(a.size=this.size==="xxx-small"?"xx-small":this.size)})}get pixelSize(){const t=parseInt(this.size);if(!Number.isNaN(t))return t;switch(this.size){case"xxx-small":return 16;case"xx-small":return 24;case"x-small":return 32;case"small":return 40;case"medium":return 48;case"large":return 64;case"x-large":return 80;default:return 40}}};i.styles=[c(p),c(f),c(v)];h([m()],i.prototype,"_size",2);h([m()],i.prototype,"_srcValid",2);i=h([u("ngc-avatar")],i);export{i as NgcAvatar};
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as
|
|
1
|
+
import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as o}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as b}from"../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as s}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{customElement as m}from"../../utils/decorators/custom-element-decorator.js";import{generateRandomId as u,getElementId as g}from"../../utils/string-utils.js";import{TestableLitElement as x}from"../../utils/components/testable-lit-element/testable-lit-element.js";import{cloneNamedSlotContent as c}from"../../utils/lightdom-utils.js";import f from"../../packages/styles/dist/tokens/primitive.tokens.css.js";import y from"../../packages/styles/dist/tokens/semantic.tokens.css.js";import $ from"../../packages/web-components/src/components/selection-box/selection-box.gator.scss.js";import"../icon/gator/icon.gator.js";import"../icon/gator/templates/index.js";import{classMap as _}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/class-map.js";import{unsafeCSS as p}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,S=Object.getOwnPropertyDescriptor,i=(e,r,l,a)=>{for(var n=a>1?void 0:a?S(r,l):r,d=e.length-1,h;d>=0;d--)(h=e[d])&&(n=(a?h(r,l,n):h(n))||n);return a&&n&&v(r,l,n),n};let t=class extends x{constructor(){super(),this.id="",this.titleText="",this.subtitleText="",this.value="",this.selected=!1,this.disabled=!1,this.boxTabindex=0,this.hasError=!1,this.type="radio",this.orientation="right",this._randomId=u(),this._labelFromTemplate=null,this._generatedLabel=null,this._prependSlot=null,this.addEventListener("click",this.handleClick)}render(){const e=o`
|
|
2
|
+
<div class="gator-selection-box-label-container">
|
|
3
|
+
${this.labelContent}
|
|
4
|
+
</div>
|
|
5
|
+
`,r=o`
|
|
6
|
+
<ngc-icon
|
|
7
|
+
name="${this.iconName}"
|
|
8
|
+
class="gator-selection-box-icon"
|
|
9
|
+
></ngc-icon>
|
|
10
|
+
`;return o`
|
|
2
11
|
<div id=${this.elementId}-container
|
|
3
12
|
class=${_(this.containerClasses)}
|
|
4
13
|
role=${this.type}
|
|
5
14
|
aria-checked=${this.selected?"true":"false"}
|
|
6
15
|
aria-disabled=${this.disabled?"true":"false"}
|
|
7
16
|
tabindex=${this.tabindex}
|
|
8
|
-
@click=${
|
|
9
|
-
@keydown=${
|
|
17
|
+
@click=${l=>this.handleClick(l)}
|
|
18
|
+
@keydown=${l=>this.handleKeyDown(l)}
|
|
10
19
|
>
|
|
11
|
-
|
|
12
|
-
${this.labelContent}
|
|
13
|
-
</div>
|
|
14
|
-
<ngc-icon
|
|
15
|
-
name="${this.iconName}"
|
|
16
|
-
class="gator-selection-box-icon"
|
|
17
|
-
></ngc-icon>
|
|
20
|
+
${this.isLeftOriented?o`${r}${e}`:o`${e}${r}`}
|
|
18
21
|
</div>
|
|
19
|
-
`}get elementId(){return
|
|
22
|
+
`}get elementId(){return g(this.id,this._randomId)}get containerClasses(){return{"gator-selection-box":!0,"gator-selection-box_disabled":this.disabled,"gator-selection-box_error":this.hasError,"gator-selection-box_left":this.isLeftOriented,"gator-selection-box_right":!this.isLeftOriented}}get isLeftOriented(){return this.orientation==="left"}get iconName(){return this.type==="radio"?this.selected?"radio-selected":"radio":this.type==="checkbox"?this.selected?"checkbox-selected":"checkbox":""}get labelContent(){if(this._labelFromTemplate)return this._labelFromTemplate;const e=c(this,"label");return e?(this._labelFromTemplate=o`<label for=${this.elementId}-input class="gator-selection-box-label-title">${e}</label>`,this._labelFromTemplate):this.generatedLabelContent}get generatedLabelContent(){return this._generatedLabel=o`
|
|
20
23
|
${this.prependSlot}
|
|
21
24
|
<div class="gator-selection-box-label-container-text">
|
|
22
25
|
<label for=${this.elementId}-input class="gator-selection-box-label-title">${this.titleText}</label>
|
|
23
|
-
${this.subtitleText!==""?
|
|
26
|
+
${this.subtitleText!==""?o`<div class="gator-selection-box-label-subtitle">${this.subtitleText}</div>`:""}
|
|
24
27
|
</div>
|
|
25
|
-
`,this._generatedLabel}get prependSlot(){if(!this._prependSlot){const e=c(this,"prepend");this._prependSlot=e?
|
|
28
|
+
`,this._generatedLabel}get prependSlot(){if(!this._prependSlot){const e=c(this,"prepend");this._prependSlot=e?o`<div class="gator-selection-box-prepend">${e}</div>`:null}return this._prependSlot}get isRadio(){return this.type==="radio"}get isCheckbox(){return this.type==="checkbox"}get tabindex(){let e=this.boxTabindex;return(this.isCheckbox||this.selected)&&(e=0),this.disabled&&(e=-1),e}handleClick(e){e.preventDefault(),e.stopPropagation(),!(this.disabled||this.isRadio&&this.selected)&&(this.selected=!this.selected,this.focus(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:this.value,selected:this.selected}})))}handleKeyDown(e){e.key===" "&&this.handleClick(e)}};t.shadowRootOptions={...b.shadowRootOptions,delegatesFocus:!0,mode:"open"};t.styles=[p(f),p(y),p($)];i([s({type:String})],t.prototype,"id",2);i([s({type:String,attribute:"title-text"})],t.prototype,"titleText",2);i([s({type:String,attribute:"subtitle-text"})],t.prototype,"subtitleText",2);i([s({type:String})],t.prototype,"value",2);i([s({type:Boolean})],t.prototype,"selected",2);i([s({type:Boolean})],t.prototype,"disabled",2);i([s({type:Number,attribute:"box-tabindex"})],t.prototype,"boxTabindex",2);i([s({type:Boolean,attribute:"has-error"})],t.prototype,"hasError",2);i([s({type:String})],t.prototype,"type",2);i([s({type:String})],t.prototype,"orientation",2);t=i([m("ngc-selection-box")],t);export{t as NgcSelectionBox};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as o}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as
|
|
1
|
+
import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as o}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as p}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{customElement as u}from"../../utils/decorators/custom-element-decorator.js";import c from"../../packages/web-components/src/components/selection-box-group/selection-box-group.gator.scss.js";import"../selection-box/selection-box.gator.js";import"../radio-group/radio-group.gator.js";import"../checkbox-group/checkbox-group.gator.js";import{ifDefined as d}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/if-defined.js";import{NgcInputText as g}from"../input/gator/input-text/input-text.gator.js";import{unsafeCSS as m}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,$=Object.getPrototypeOf,v=Reflect.get,l=(e,t,i,n)=>{for(var s=n>1?void 0:n?x(t,i):t,a=e.length-1,h;a>=0;a--)(h=e[a])&&(s=(n?h(t,i,s):h(s))||s);return n&&s&&b(t,i,s),s},y=(e,t,i)=>v($(e),i,t);let r=class extends g{constructor(){super(...arguments),this.options=[],this.type="single-select",this.orientation="right"}render(){return o`${this.isSingleSelect?this.radioGroupMarkup:this.checkboxGroupMarkup}`}get radioGroupMarkup(){return o`
|
|
2
2
|
<ngc-radio-group
|
|
3
3
|
id=${this.id}
|
|
4
|
-
value=${
|
|
4
|
+
value=${d(this.value)}
|
|
5
5
|
?required=${this.required}
|
|
6
6
|
?hide-required=${this.hideRequired}
|
|
7
7
|
?optional=${this.optional}
|
|
@@ -16,7 +16,7 @@ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/re
|
|
|
16
16
|
`}get checkboxGroupMarkup(){return o`
|
|
17
17
|
<ngc-checkbox-group
|
|
18
18
|
id=${this.id}
|
|
19
|
-
value=${
|
|
19
|
+
value=${d(this.value)}
|
|
20
20
|
?required=${this.required}
|
|
21
21
|
?hide-required=${this.hideRequired}
|
|
22
22
|
?optional=${this.optional}
|
|
@@ -37,5 +37,6 @@ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/re
|
|
|
37
37
|
?disabled=${this.disabled}
|
|
38
38
|
box-tabindex=${this.getItemTabindex(t)}
|
|
39
39
|
error-text=${this.errorText}
|
|
40
|
-
type=${this.selectionBoxType}
|
|
41
|
-
|
|
40
|
+
type=${this.selectionBoxType}
|
|
41
|
+
orientation=${this.orientation}>
|
|
42
|
+
</ngc-selection-box>`)}get optionElements(){return this.options.length>0?this.shadowRoot?.querySelectorAll("ngc-selection-box"):this.shadowRoot?.querySelector("slot")?.assignedElements()}isItemSelected(e){return this.value?this.isSingleSelect?this.value===e:this.value?.split(";").includes(e):!1}handleChange(e){const t=e;t.stopImmediatePropagation(),this.value=t.detail,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:this.value}))}updated(){this.optionElements?.forEach((e,t)=>{const i=e;i.boxTabindex=this.getItemTabindex(t),i.type=this.selectionBoxType,i.disabled=this.disabled,i.selected=this.isItemSelected(i.getAttribute("value")??""),i.hasError=!!this.errorText,i.orientation=this.orientation})}getItemTabindex(e){return this.isSingleSelect?e===0&&!this.value?0:-1:0}};r.styles=[...y(r,r,"styles"),m(c)];l([p({type:Array})],r.prototype,"options",2);l([p({type:String})],r.prototype,"type",2);l([p({type:String})],r.prototype,"orientation",2);r=l([u("ngc-selection-box-group")],r);export{r as NgcSelectionBoxGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__exports as u}from"../../../../../../_virtual/
|
|
1
|
+
import{__exports as u}from"../../../../../../_virtual/index8.js";var c;function g(){if(c)return u;c=1;var l=Object.prototype.hasOwnProperty;function n(e,t){var r,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((i=e.length)===t.length)for(;i--&&n(e[i],t[i]););return i===-1}if(!r||typeof e=="object"){i=0;for(r in e)if(l.call(e,r)&&++i&&!l.call(t,r)||!(r in t)||!n(e[r],t[r]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}return u.dequal=n,u}export{g as __require};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__module as r}from"../../../../../_virtual/
|
|
1
|
+
import{__module as r}from"../../../../../_virtual/index7.js";import{__require as t}from"./cjs/react-is.production.min.js";var e;function s(){return e?r.exports:(e=1,r.exports=t(),r.exports)}export{s as __require};
|
package/dist/packages/web-components/src/components/selection-box/selection-box.gator.scss.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const o=':focus-visible{outline:none}.gator-selection-box{display:flex;align-items:center;border-radius:var(--ngc-selection-box-border-radius, var(--border-radius-x-small));padding:var(--ngc-selection-box-padding, var(--spacing-8) var(--spacing-8));border:var(--ngc-selection-box-border, 1px solid var(--color-border-primary));background:var(--ngc-selection-box-background-color, var(--color-surface-primary));margin-bottom:var(--ngc-selection-box-margin-bottom);cursor:pointer}.gator-selection-box .gator-selection-box-icon{--ngc-icon-color: var(--ngc-selection-box-icon-color-unselected, var(--color-border-primary))}.gator-selection-box-label-container{width:
|
|
1
|
+
const o=':focus-visible{outline:none}.gator-selection-box{display:flex;align-items:center;gap:var(--spacing-8);border-radius:var(--ngc-selection-box-border-radius, var(--border-radius-x-small));padding:var(--ngc-selection-box-padding, var(--spacing-8) var(--spacing-8));border:var(--ngc-selection-box-border, 1px solid var(--color-border-primary));background:var(--ngc-selection-box-background-color, var(--color-surface-primary));margin-bottom:var(--ngc-selection-box-margin-bottom);cursor:pointer}.gator-selection-box .gator-selection-box-icon{--ngc-icon-color: var(--ngc-selection-box-icon-color-unselected, var(--color-border-primary))}.gator-selection-box-label-container{flex:1;min-width:0;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-5);font-feature-settings:"liga" off,"clig" off;font-style:normal;font-weight:var(--font-weight-normal);font-family:var(--font-family-body, "Open Sans"),sans-serif;cursor:inherit}.gator-selection-box-label-container-text{width:100%;align-items:stretch;display:flex;flex-direction:column}.gator-selection-box-label-title{color:var(--ngc-selection-box-title-color, var(--color-text-primary));font-size:var(--ngc-selection-box-title-font-size, var(--font-size-body-1));line-height:var(--ngc-selection-box-title-line-height, var(--line-height-body-1));font-weight:var(--font-weight-regular);cursor:inherit}.gator-selection-box-label-subtitle{color:var(--ngc-selection-box-subtitle-color, var(--color-text-secondary));font-size:var(--ngc-selection-box-subtitle-font-size, var(--font-size-body-2));line-height:var(--ngc-selection-box-subtitle-line-height, var(--line-height-body-2));font-weight:var(--font-weight-regular)}.gator-selection-box:focus-visible{outline:var(--ngc-selection-box-focus-outline, 2px solid var(--color-border-neutral, #1F1F1F));outline-offset:var(--ngc-selection-box-focus-outline-offset, 2px)}.gator-selection-box:hover:not(.gator-selection-box_disabled){cursor:pointer;box-shadow:var(--ngc-selection-box-hover-box-shadow, var(--shadow-2-card-raised))}.gator-selection-box:hover:not(.gator-selection-box_error):not(.gator-selection-box_disabled){border:var(--ngc-selection-box-hover-border, 1px solid var(--color-border-brand))}.gator-selection-box_disabled{cursor:not-allowed;background:var(--ngc-selection-box-background-color-disabled, var(--color-surface-tertiary));border:var(--ngc-selection-box-disabled-border, 1px solid var(--color-border-disabled))}.gator-selection-box_disabled .gator-selection-box-icon{--ngc-icon-color: var(--ngc-selection-box-icon-color-disabled, var(--color-surface-disabled))}.gator-selection-box_disabled label{color:var(--color-text-disabled)}.gator-selection-box:is([aria-checked=true]):not(.gator-selection-box_disabled):not(.gator-selection-box_error){border:var(--ngc-selection-box-selected-border, 1px solid var(--color-border-brand));background:var(--ngc-selection-box-background-color-selected, var(--color-surface-brand))}.gator-selection-box:is([aria-checked=true]):not(.gator-selection-box_disabled):not(.gator-selection-box_error) .gator-selection-box-icon{--ngc-icon-color: var(--ngc-selection-box-icon-color-selected, var(--color-feedback-brand))}.gator-selection-box_error{border:var(--ngc-selection-box-error-border, 1px solid var(--color-feedback-error))}.gator-selection-box_error .gator-selection-box-icon{--ngc-icon-color: var(--ngc-selection-box-icon-color-error, var(--color-feedback-error))}';export{o as default};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit';
|
|
2
2
|
import { TestableLitElement } from '../../utils/components/testable-lit-element/testable-lit-element';
|
|
3
3
|
export type SELECTION_BOX_TYPE = 'radio' | 'checkbox';
|
|
4
|
+
export type SELECTION_BOX_ORIENTATION = 'left' | 'right';
|
|
4
5
|
export declare class NgcSelectionBox extends TestableLitElement {
|
|
5
6
|
static shadowRootOptions: {
|
|
6
7
|
delegatesFocus: boolean;
|
|
@@ -48,6 +49,10 @@ export declare class NgcSelectionBox extends TestableLitElement {
|
|
|
48
49
|
* @property {SELECTION_BOX_TYPE} type - Indicates if the selection-box should render as a radio or checkbox.
|
|
49
50
|
*/
|
|
50
51
|
type: SELECTION_BOX_TYPE;
|
|
52
|
+
/**
|
|
53
|
+
* @property {SELECTION_BOX_ORIENTATION} orientation - Places the radio or checkbox icon on the left or right of the label. Defaults to right.
|
|
54
|
+
*/
|
|
55
|
+
orientation: SELECTION_BOX_ORIENTATION;
|
|
51
56
|
private _randomId;
|
|
52
57
|
private _labelFromTemplate;
|
|
53
58
|
private _generatedLabel;
|
|
@@ -58,7 +63,10 @@ export declare class NgcSelectionBox extends TestableLitElement {
|
|
|
58
63
|
'gator-selection-box': boolean;
|
|
59
64
|
'gator-selection-box_disabled': boolean;
|
|
60
65
|
'gator-selection-box_error': boolean;
|
|
66
|
+
'gator-selection-box_left': boolean;
|
|
67
|
+
'gator-selection-box_right': boolean;
|
|
61
68
|
};
|
|
69
|
+
get isLeftOriented(): boolean;
|
|
62
70
|
get iconName(): "" | "checkbox-selected" | "checkbox" | "radio" | "radio-selected";
|
|
63
71
|
get labelContent(): TemplateResult;
|
|
64
72
|
get generatedLabelContent(): TemplateResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NgcSelectionBox } from '../selection-box/selection-box.gator';
|
|
1
|
+
import { NgcSelectionBox, SELECTION_BOX_ORIENTATION } from '../selection-box/selection-box.gator';
|
|
2
2
|
import { NgcInputText } from '../input/gator/input-text/input-text.gator.ts';
|
|
3
3
|
export type NGC_SELECTION_BOX_GROUP_OPTION = {
|
|
4
4
|
title: string;
|
|
@@ -18,6 +18,10 @@ export declare class NgcSelectionBoxGroup extends NgcInputText {
|
|
|
18
18
|
* @property {string} type - Defines if the selection box group should be multi-select or single-select.
|
|
19
19
|
*/
|
|
20
20
|
type: string;
|
|
21
|
+
/**
|
|
22
|
+
* @property {SELECTION_BOX_ORIENTATION} orientation - Places the radio or checkbox icon on the left or right of each selection box. Defaults to right.
|
|
23
|
+
*/
|
|
24
|
+
orientation: SELECTION_BOX_ORIENTATION;
|
|
21
25
|
render(): import('lit').TemplateResult<1>;
|
|
22
26
|
get radioGroupMarkup(): import('lit').TemplateResult<1>;
|
|
23
27
|
get checkboxGroupMarkup(): import('lit').TemplateResult<1>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncino/web-components",
|
|
3
3
|
"author": "nCino",
|
|
4
|
-
"version": "16.
|
|
4
|
+
"version": "16.5.0",
|
|
5
5
|
"license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
"vite-plugin-static-copy": "^3.3.0",
|
|
101
101
|
"vitest": "^4.1.10",
|
|
102
102
|
"yaml-eslint-parser": "^2.1.0",
|
|
103
|
-
"@ncino/styles": "16.
|
|
103
|
+
"@ncino/styles": "16.5.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@ncino/styles": "16.
|
|
106
|
+
"@ncino/styles": "16.5.0"
|
|
107
107
|
},
|
|
108
108
|
"bugs": {
|
|
109
109
|
"url": "https://github.com/ncino/force-sdk-web-components/issues"
|
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": "16.4.
|
|
4
|
+
"version": "16.4.2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -7235,6 +7235,10 @@
|
|
|
7235
7235
|
"name": "type",
|
|
7236
7236
|
"value": { "type": "'radio' | 'checkbox'", "default": "'radio'" }
|
|
7237
7237
|
},
|
|
7238
|
+
{
|
|
7239
|
+
"name": "orientation",
|
|
7240
|
+
"value": { "type": "'left' | 'right'", "default": "'right'" }
|
|
7241
|
+
},
|
|
7238
7242
|
{
|
|
7239
7243
|
"name": "data-testid",
|
|
7240
7244
|
"value": { "type": "string | undefined", "default": "undefined" }
|
|
@@ -7252,8 +7256,10 @@
|
|
|
7252
7256
|
{ "name": "boxTabindex", "type": "number" },
|
|
7253
7257
|
{ "name": "hasError", "type": "boolean" },
|
|
7254
7258
|
{ "name": "type", "type": "'radio' | 'checkbox'" },
|
|
7259
|
+
{ "name": "orientation", "type": "'left' | 'right'" },
|
|
7255
7260
|
{ "name": "elementId" },
|
|
7256
7261
|
{ "name": "containerClasses" },
|
|
7262
|
+
{ "name": "isLeftOriented" },
|
|
7257
7263
|
{ "name": "iconName" },
|
|
7258
7264
|
{ "name": "labelContent" },
|
|
7259
7265
|
{ "name": "generatedLabelContent" },
|
|
@@ -7285,6 +7291,10 @@
|
|
|
7285
7291
|
"name": "type",
|
|
7286
7292
|
"value": { "type": "string", "default": "'single-select'" }
|
|
7287
7293
|
},
|
|
7294
|
+
{
|
|
7295
|
+
"name": "orientation",
|
|
7296
|
+
"value": { "type": "'left' | 'right'", "default": "'right'" }
|
|
7297
|
+
},
|
|
7288
7298
|
{ "name": "for", "value": { "type": "string", "default": "''" } },
|
|
7289
7299
|
{ "name": "min", "value": { "type": "string" } },
|
|
7290
7300
|
{ "name": "max", "value": { "type": "string" } },
|
|
@@ -7388,6 +7398,7 @@
|
|
|
7388
7398
|
"properties": [
|
|
7389
7399
|
{ "name": "options", "type": "NGC_SELECTION_BOX_GROUP_OPTION[]" },
|
|
7390
7400
|
{ "name": "type", "type": "string" },
|
|
7401
|
+
{ "name": "orientation", "type": "'left' | 'right'" },
|
|
7391
7402
|
{ "name": "radioGroupMarkup" },
|
|
7392
7403
|
{ "name": "checkboxGroupMarkup" },
|
|
7393
7404
|
{ "name": "optionsMarkup" },
|