@ncino/web-components 5.1.0-preview.11 → 5.1.0-preview.12

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.
Files changed (23) hide show
  1. package/dist/components/boolean/boolean.gator.js +8 -9
  2. package/dist/components/checkbox/checkbox.gator.js +26 -23
  3. package/dist/components/checkbox-group/checkbox-group.gator.js +7 -8
  4. package/dist/components/input/gator/input-text/input-text.gator.js +13 -13
  5. package/dist/components/radio/radio.gator.js +28 -22
  6. package/dist/components/radio-group/radio-group.gator.js +13 -15
  7. package/dist/components/selection-box-group/selection-box-group.gator.js +10 -12
  8. package/dist/packages/web-components/src/components/boolean/boolean.gator.scss.js +1 -1
  9. package/dist/packages/web-components/src/components/boolean/boolean.gator.tokens.scss.js +1 -1
  10. package/dist/packages/web-components/src/components/checkbox-group/checkbox-group.gator.scss.js +1 -1
  11. package/dist/packages/web-components/src/components/input/gator/help-text/help-text.gator.scss.js +1 -1
  12. package/dist/packages/web-components/src/components/radio/radio.gator.scss.js +1 -1
  13. package/dist/packages/web-components/src/components/radio-group/radio-group.gator.scss.js +1 -1
  14. package/dist/packages/web-components/src/components/selection-box/selection-box.gator.tokens.scss.js +1 -1
  15. package/dist/types/components/boolean/boolean.gator.d.ts +2 -36
  16. package/dist/types/components/checkbox/checkbox.gator.d.ts +5 -10
  17. package/dist/types/components/checkbox-group/checkbox-group.gator.d.ts +2 -30
  18. package/dist/types/components/progress-bar/gator/progress-bar.gator.d.ts +1 -1
  19. package/dist/types/components/radio/radio.gator.d.ts +9 -25
  20. package/dist/types/components/radio-group/radio-group.gator.d.ts +2 -30
  21. package/dist/types/components/selection-box-group/selection-box-group.gator.d.ts +2 -32
  22. package/package.json +1 -1
  23. package/web-types.json +674 -212
@@ -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 d}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 g}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 m from"../../packages/web-components/src/tokens/primitive.tokens.scss.js";import c from"../../packages/web-components/src/tokens/semantic.tokens.scss.js";import b from"../../packages/web-components/src/components/boolean/boolean.gator.scss.js";import f from"../../packages/web-components/src/components/boolean/boolean.gator.tokens.scss.js";import{generateRandomId as v,getElementId as y}from"../../utils/string-utils.js";import"../radio-group/radio-group.gator.js";import{unsafeCSS as l}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var $=Object.defineProperty,w=Object.getOwnPropertyDescriptor,r=(e,o,i,n)=>{for(var a=n>1?void 0:n?w(o,i):o,p=e.length-1,h;p>=0;p--)(h=e[p])&&(a=(n?h(o,i,a):h(a))||a);return n&&a&&$(o,i,a),a};let t=class extends u{constructor(){super(...arguments),this.id="",this.options=[],this.disabled=!1,this.value="",this.label="",this.helpText="",this.hasError=!1,this.errorMessage="",this._randomId=v()}firstUpdated(){this.handleResize(),window.addEventListener("resize",()=>this.handleResize())}render(){return d`
1
+ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as l}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{customElement as h}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as u}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import g from"../../packages/web-components/src/components/boolean/boolean.gator.scss.js";import c from"../../packages/web-components/src/components/boolean/boolean.gator.tokens.scss.js";import{generateRandomId as m,getElementId as f}from"../../utils/string-utils.js";import"../radio-group/radio-group.gator.js";import{NgcInputText as b}from"../input/gator/input-text/input-text.gator.js";import{unsafeCSS as p}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,_=Object.getOwnPropertyDescriptor,$=Object.getPrototypeOf,w=Reflect.get,d=(e,t,o,a)=>{for(var r=a>1?void 0:a?_(t,o):t,i=e.length-1,n;i>=0;i--)(n=e[i])&&(r=(a?n(t,o,r):n(r))||r);return a&&r&&v(t,o,r),r},y=(e,t,o)=>w($(e),o,t);let s=class extends b{constructor(){super(...arguments),this.options=[],this._randomId=m()}firstUpdated(){this.handleResize(),window.addEventListener("resize",()=>this.handleResize())}render(){return l`
2
2
  <ngc-radio-group
3
3
  class=${this.booleanClasses}
4
4
  id=${this.elementId}
@@ -6,16 +6,15 @@ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/re
6
6
  .disabled=${this.disabled}
7
7
  .label=${this.label}
8
8
  help-text=${this.helpText}
9
- ?has-error=${this.hasError}
10
- error-message=${this.errorMessage}
9
+ error-text=${this.errorText}
11
10
  @change=${this.handleChange}
12
11
  >
13
12
  ${this.booleanOptions}
14
- </ngc-radio-group>`}get elementId(){return y(this.id,this._randomId)}get booleanClasses(){let e=["gator-boolean"];return this.isWrapped&&e.push("gator-boolean_wrapped"),this.hasError&&e.push("gator-boolean_error"),this.disabled&&e.push("gator-boolean_disabled"),e.join(" ")}get booleanOptions(){if(!this.options)return null;const e=this.options.map((o,i)=>d`
13
+ </ngc-radio-group>`}get elementId(){return f(this.id,this._randomId)}get booleanClasses(){let e=["gator-boolean"];return this.isWrapped&&e.push("gator-boolean_wrapped"),this.errorText&&e.push("gator-boolean_error"),this.disabled&&e.push("gator-boolean_disabled"),e.join(" ")}get booleanOptions(){if(!this.options)return null;const e=this.options.map((t,o)=>l`
15
14
  <ngc-radio
16
- id="${this.elementId}-option-${i}"
17
- class="gator-boolean-option-${i}${this.selectedClass(o)}"
18
- value=${o.value}
19
- title-text=${o.label}
15
+ id="${this.elementId}-option-${o}"
16
+ class="gator-boolean-option-${o}${this.selectedClass(t)}"
17
+ value=${t.value}
18
+ title-text=${t.label}
20
19
  ></ngc-radio>
21
- `);return d`${e}`}get isWrapped(){const e=this.shadowRoot?.querySelectorAll("ngc-radio");return e&&e.length>1?e[0].offsetTop<e[1].offsetTop:window.innerWidth<475}handleChange(e){const o=e;o.stopImmediatePropagation(),this.value=o.detail,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:this.value}))}handleResize(){const e=this.shadowRoot?.querySelector("ngc-radio-group");this.isWrapped?e?.classList.add("gator-boolean_wrapped"):e?.classList.remove("gator-boolean_wrapped")}selectedClass(e){return this.value===e.value?" gator-boolean-option_selected":""}};t.shadowRootOptions={...u.shadowRootOptions,delegatesFocus:!0};t.styles=[l(b),l(f),l(m),l(c)];r([s({type:String})],t.prototype,"id",2);r([s({type:Array})],t.prototype,"options",2);r([s({type:Boolean})],t.prototype,"disabled",2);r([s({type:String})],t.prototype,"value",2);r([s({type:String})],t.prototype,"label",2);r([s({type:String,attribute:"help-text"})],t.prototype,"helpText",2);r([s({type:Boolean,attribute:"has-error"})],t.prototype,"hasError",2);r([s({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2);t=r([g("ngc-boolean")],t);export{t as NgcBoolean};
20
+ `);return l`${e}`}get isWrapped(){const e=this.shadowRoot?.querySelectorAll("ngc-radio");return e&&e.length>1?e[0].offsetTop<e[1].offsetTop:window.innerWidth<475}handleChange(e){const t=e;t.stopImmediatePropagation(),this.value=t.detail,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:this.value}))}handleResize(){const e=this.shadowRoot?.querySelector("ngc-radio-group");this.isWrapped?e?.classList.add("gator-boolean_wrapped"):e?.classList.remove("gator-boolean_wrapped")}selectedClass(e){return this.value===e.value?" gator-boolean-option_selected":""}};s.styles=[...y(s,s,"styles"),p(g),p(c)];d([u({type:Array})],s.prototype,"options",2);s=d([h("ngc-boolean")],s);export{s as NgcBoolean};
@@ -1,26 +1,29 @@
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 d,getElementId as m}from"../../utils/string-utils.js";import u 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}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as f}from"../../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 v}from"../input/gator/input-text/input-text.gator.js";import{unsafeCSS as x}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var g=Object.defineProperty,y=Object.getOwnPropertyDescriptor,_=Object.getPrototypeOf,$=Reflect.get,r=(e,i,o,l)=>{for(var s=l>1?void 0:l?y(i,o):i,h=e.length-1,n;h>=0;h--)(n=e[h])&&(s=(l?n(i,o,s):n(s))||s);return l&&s&&g(i,o,s),s},R=(e,i,o)=>$(_(e),o,i);let t=class extends v{constructor(){super(...arguments),this.titleText="",this.selected=!1,this.indeterminate=!1,this.hideLabel=!1,this.hasError=!1,this._randomId=d()}updated(e){super.updated(e),e.has("indeterminate")&&this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate),e.has("hasError")&&this.inputRef.value&&this.inputRef.value.setCustomValidity(this.hasError?"true":"")}render(){const e=this.elementId;return p`
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`
2
2
  <div class="gator-form-element">
3
3
  <div id="${e}-checkbox" class="gator-checkbox">
4
- <div class="gator-checkbox-input-wrapper">
5
- <input
6
- ${b(this.inputRef)}
7
- id="${e}"
8
- class="gator-checkbox-input"
9
- type="checkbox"
10
- .checked="${this.selected}"
11
- ?disabled="${this.disabled}"
12
- aria-labelledby="${e}-checkbox"
13
- @change="${this.handleChange}"
14
- aria-label="${this.titleText}"
15
- />
16
- </div>
17
- ${this.hideLabel?null:p`
18
- <label class="gator-checkbox-title">
19
- ${this.titleText}
20
- <slot></slot>
21
- </label>
22
- `}
23
- </div>
24
- ${this.bottomText}
4
+ <div class="gator-checkbox-input-wrapper">
5
+ <input
6
+ ${b(this.inputRef)}
7
+ id="${e}"
8
+ class="gator-checkbox-input"
9
+ type="checkbox"
10
+ .checked="${this.selected}"
11
+ ?disabled="${this.disabled}"
12
+ aria-labelledby="${e}-checkbox"
13
+ @change="${this.handleChange}"
14
+ aria-label="${this.titleText}"
15
+ />
16
+ </div>
17
+ ${this.hideLabel?null:p`
18
+ <label class="gator-checkbox-title">
19
+ ${this.titleText}
20
+ <slot></slot>
21
+ </label>
22
+ `}
23
+ </div>
24
+ ${this.bottomText}
25
25
  </div>
26
- `}get elementId(){return m(this.id,this._randomId)}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.shadowRootOptions={...f.shadowRootOptions,delegatesFocus:!0,mode:"open"};t.styles=[...R(t,t,"styles"),x(u)];r([a({type:String,attribute:"title-text"})],t.prototype,"titleText",2);r([a({type:Boolean})],t.prototype,"selected",2);r([a({type:Boolean})],t.prototype,"indeterminate",2);r([a({type:Boolean,attribute:"hide-label"})],t.prototype,"hideLabel",2);r([a({type:Boolean,attribute:"has-error"})],t.prototype,"hasError",2);t=r([c("ngc-checkbox")],t);export{t as NgcCheckbox};
26
+ `}get elementId(){return u(this.id,this._randomId)}get bottomText(){return this.grouped?f:p`
27
+ ${this.errorTextMarkup}
28
+ ${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};
@@ -1,19 +1,18 @@
1
- import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}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{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 l}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{generateRandomId as g,getElementId as u}from"../../utils/string-utils.js";import b from"../../packages/web-components/src/components/checkbox-group/checkbox-group.gator.scss.js";import x from"../../packages/web-components/src/tokens/primitive.tokens.scss.js";import f from"../../packages/web-components/src/tokens/semantic.tokens.scss.js";import"../checkbox/checkbox.gator.js";import"../input/gator/input-label/input-label.gator.js";import"../input/gator/help-text/help-text.gator.js";import{handleDataTestid as y}from"../../utils/datatestid-utils.js";import{TestableLitElement as v}from"../../utils/components/testable-lit-element/testable-lit-element.js";import{ifDefined as c}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/if-defined.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,E=Object.getOwnPropertyDescriptor,i=(e,s,o,n)=>{for(var t=n>1?void 0:n?E(s,o):s,h=e.length-1,p;h>=0;h--)(p=e[h])&&(t=(n?p(s,o,t):p(t))||t);return n&&t&&$(s,o,t),t};let r=class extends v{constructor(){super(...arguments),this.id="",this.label="",this.helpText="",this.value=void 0,this.disabled=!1,this.hasError=!1,this.errorMessage="",this.options=[],this._randomId=g()}render(){const e=this.elementId;return a`
1
+ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as l}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{customElement as h}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as d}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{generateRandomId as p,getElementId as m}from"../../utils/string-utils.js";import u from"../../packages/web-components/src/components/checkbox-group/checkbox-group.gator.scss.js";import"../checkbox/checkbox.gator.js";import"../input/gator/input-label/input-label.gator.js";import"../input/gator/help-text/help-text.gator.js";import{handleDataTestid as b}from"../../utils/datatestid-utils.js";import{ifDefined as g}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/if-defined.js";import{NgcInputText as f}from"../input/gator/input-text/input-text.gator.js";import{unsafeCSS as x}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,$=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,_=Reflect.get,c=(e,t,s,r)=>{for(var o=r>1?void 0:r?$(t,s):t,n=e.length-1,a;n>=0;n--)(a=e[n])&&(o=(r?a(t,s,o):a(o))||o);return r&&o&&v(t,s,o),o},k=(e,t,s)=>_(y(e),s,t);let i=class extends f{constructor(){super(...arguments),this.options=[],this._randomId=p()}render(){const e=this.elementId;return l`
2
2
  <div class="gator-checkbox-group-container">
3
- ${this.label?a`<ngc-input-label id="${e}-label" data-testid=${c(this.labelDataTestid)}>${this.label}</ngc-input-label>`:null}
3
+ ${this.label?l`<ngc-input-label id="${e}-label" data-testid=${g(this.labelDataTestid)}>${this.label}</ngc-input-label>`:null}
4
4
  <div id="${e}-group"
5
5
  role="group"
6
6
  class="gator-checkbox-group"
7
7
  aria-labelledby="${e}-label"
8
8
  aria-describedby=${this.describedBy}
9
9
  >
10
- ${this.options.length>0?this.checkboxesFromOptions:a`<slot @change=${this.handleCheckboxSelectionChange}></slot>`}
10
+ ${this.options.length>0?this.checkboxesFromOptions:l`<slot @change=${this.handleCheckboxSelectionChange}></slot>`}
11
11
  </div>
12
- ${this.hasError&&this.errorMessage!==""?a`<ngc-help-text id="${e}-error" data-testid=${c(this.errorMessageDataTestid)} icon error>${this.errorMessage}</ngc-help-text>`:null}
13
- ${this.helpText?a`<ngc-help-text id="${e}-help" data-testid=${c(this.helpTextDataTestid)}>${this.helpText}</ngc-help-text>`:null}
12
+ ${this.bottomText}
14
13
  </div>
15
- `}get elementId(){return u(this.id,this._randomId)}get describedBy(){const e=[];return this.errorMessage&&e.push(`${this.elementId}-error`),this.helpText&&e.push(`${this.elementId}-help`),e.join(" ")}get checkboxesFromOptions(){return a`
16
- ${this.options.map(e=>a`
14
+ `}get elementId(){return m(this.id,this._randomId)}get describedBy(){const e=[];return this.errorText&&e.push(`${this.elementId}-error`),this.helpText&&e.push(`${this.elementId}-help`),e.join(" ")}get checkboxesFromOptions(){return l`
15
+ ${this.options.map(e=>l`
17
16
  <ngc-checkbox
18
17
  value="${e.value}"
19
18
  @change=${this.handleCheckboxSelectionChange}
@@ -21,4 +20,4 @@ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/re
21
20
  >
22
21
  </ngc-checkbox>
23
22
  `)}
24
- `}handleCheckboxSelectionChange(e){const s=e;e.stopImmediatePropagation();const o=new Set(this.value?.split(";"));s.detail.selected?o.add(s.detail.value):o.delete(s.detail.value),this.value=Array.from(o).join(";"),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:this.value}))}get checkboxElements(){if(this.options.length>0)return this.shadowRoot?.querySelectorAll("ngc-checkbox");const e=this.shadowRoot?.querySelector("slot")?.assignedElements();return e&&e.length===1&&e[0]instanceof HTMLSlotElement?e[0].assignedElements():e}updated(){const e=new Set(this.value?.split(";")),s=this.checkboxElements;s&&s.length>0&&s.forEach((o,n)=>{const t=o;t.selected=e.has(t.value),t.disabled=this.disabled,t.hasError=this.hasError,y(t,this.dataTestid,`checkbox-${n}`)})}};r.styles=[d(x),d(f),d(b)];i([l({type:String})],r.prototype,"id",2);i([l({type:String})],r.prototype,"label",2);i([l({type:String,attribute:"help-text"})],r.prototype,"helpText",2);i([l({type:String})],r.prototype,"value",2);i([l({type:Boolean})],r.prototype,"disabled",2);i([l({type:Boolean,attribute:"has-error"})],r.prototype,"hasError",2);i([l({type:String,attribute:"error-message"})],r.prototype,"errorMessage",2);i([l({type:Array})],r.prototype,"options",2);r=i([m("ngc-checkbox-group")],r);export{r as NgcCheckboxGroup};
23
+ `}handleCheckboxSelectionChange(e){const t=e;e.stopImmediatePropagation();const s=new Set(this.value?.split(";"));t.detail.selected?s.add(t.detail.value):s.delete(t.detail.value),this.value=Array.from(s).join(";"),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:this.value}))}get checkboxElements(){if(this.options.length>0)return this.shadowRoot?.querySelectorAll("ngc-checkbox");const e=this.shadowRoot?.querySelector("slot")?.assignedElements();return e&&e.length===1&&e[0]instanceof HTMLSlotElement?e[0].assignedElements():e}updated(){const e=new Set(this.value?.split(";")),t=this.checkboxElements;t&&t.length>0&&t.forEach((s,r)=>{const o=s;o.selected=e.has(o.value),o.disabled=this.disabled,o.errorText=this.errorText,o.grouped=!0,b(o,this.dataTestid,`checkbox-${r}`)})}};i.styles=[...k(i,i,"styles"),x(u)];c([d({type:Array})],i.prototype,"options",2);i=c([h("ngc-checkbox-group")],i);export{i as NgcCheckboxGroup};
@@ -1,20 +1,20 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}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"../input-label/input-label.gator.js";import"../help-text/help-text.gator.js";import"../../../icon/gator/icon.gator.js";import"../../../icon/gator/templates/add-link.js";import"../../../icon/gator/templates/airplane.js";import"../../../icon/gator/templates/alarm.js";import"../../../icon/gator/templates/apartment.js";import"../../../icon/gator/templates/arrow-around.js";import"../../../icon/gator/templates/arrow-down.js";import"../../../icon/gator/templates/arrow-left.js";import"../../../icon/gator/templates/arrow-line-left.js";import"../../../icon/gator/templates/arrow-line-right.js";import"../../../icon/gator/templates/arrow-right.js";import"../../../icon/gator/templates/arrow-up.js";import"../../../icon/gator/templates/bank.js";import"../../../icon/gator/templates/bell-disabled.js";import"../../../icon/gator/templates/bell.js";import"../../../icon/gator/templates/binoculars.js";import"../../../icon/gator/templates/book.js";import"../../../icon/gator/templates/box.js";import"../../../icon/gator/templates/cake.js";import"../../../icon/gator/templates/calculator.js";import"../../../icon/gator/templates/calendar.js";import"../../../icon/gator/templates/camera.js";import"../../../icon/gator/templates/caret-up-down.js";import"../../../icon/gator/templates/case.js";import"../../../icon/gator/templates/chart-bar-horizontal.js";import"../../../icon/gator/templates/chart-bar.js";import"../../../icon/gator/templates/chart-donut.js";import"../../../icon/gator/templates/chart-line.js";import"../../../icon/gator/templates/chart-pie.js";import"../../../icon/gator/templates/chart-rise.js";import"../../../icon/gator/templates/chart-scatter.js";import"../../../icon/gator/templates/chat.js";import"../../../icon/gator/templates/check-circle.js";import"../../../icon/gator/templates/check.js";import"../../../icon/gator/templates/checkbox-selected.js";import"../../../icon/gator/templates/checkbox.js";import"../../../icon/gator/templates/checkerboard.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/circle-arrow-down.js";import"../../../icon/gator/templates/circle-arrow-left.js";import"../../../icon/gator/templates/circle-arrow-right.js";import"../../../icon/gator/templates/circle-arrow-up.js";import"../../../icon/gator/templates/circle-dashed.js";import"../../../icon/gator/templates/circle-filled.js";import"../../../icon/gator/templates/circle.js";import"../../../icon/gator/templates/city.js";import"../../../icon/gator/templates/clipboard.js";import"../../../icon/gator/templates/clock-clockwise.js";import"../../../icon/gator/templates/clock-counter-clockwise.js";import"../../../icon/gator/templates/clock.js";import"../../../icon/gator/templates/collapse.js";import"../../../icon/gator/templates/cone.js";import"../../../icon/gator/templates/contact-info.js";import"../../../icon/gator/templates/copy.js";import"../../../icon/gator/templates/credit-card.js";import"../../../icon/gator/templates/crop.js";import"../../../icon/gator/templates/crosshairs.js";import"../../../icon/gator/templates/currency-dollar-simple.js";import"../../../icon/gator/templates/currency-eur.js";import"../../../icon/gator/templates/currency-gbp.js";import"../../../icon/gator/templates/currency-inr.js";import"../../../icon/gator/templates/currency-jpy.js";import"../../../icon/gator/templates/currency-krw.js";import"../../../icon/gator/templates/currency-kzt.js";import"../../../icon/gator/templates/currency-ngn.js";import"../../../icon/gator/templates/currency-rub.js";import"../../../icon/gator/templates/cursor-arrow.js";import"../../../icon/gator/templates/cursor-hand.js";import"../../../icon/gator/templates/cursor.js";import"../../../icon/gator/templates/dashboard.js";import"../../../icon/gator/templates/delete.js";import"../../../icon/gator/templates/dna.js";import"../../../icon/gator/templates/document-add.js";import"../../../icon/gator/templates/document-check.js";import"../../../icon/gator/templates/document-e-sign.js";import"../../../icon/gator/templates/document-image.js";import"../../../icon/gator/templates/document-pdf.js";import"../../../icon/gator/templates/document-sign.js";import"../../../icon/gator/templates/document-zip.js";import"../../../icon/gator/templates/document.js";import"../../../icon/gator/templates/dollar-bills.js";import"../../../icon/gator/templates/dollar-house.js";import"../../../icon/gator/templates/down-payment.js";import"../../../icon/gator/templates/download.js";import"../../../icon/gator/templates/drag-drop.js";import"../../../icon/gator/templates/earth.js";import"../../../icon/gator/templates/exclude-square.js";import"../../../icon/gator/templates/exit-circle.js";import"../../../icon/gator/templates/exit-left.js";import"../../../icon/gator/templates/exit.js";import"../../../icon/gator/templates/expand-arrows.js";import"../../../icon/gator/templates/expand.js";import"../../../icon/gator/templates/export.js";import"../../../icon/gator/templates/eye-closed.js";import"../../../icon/gator/templates/eye-crossed.js";import"../../../icon/gator/templates/eye.js";import"../../../icon/gator/templates/facebook-logo.js";import"../../../icon/gator/templates/file-code.js";import"../../../icon/gator/templates/files.js";import"../../../icon/gator/templates/filter-funnel.js";import"../../../icon/gator/templates/filters-2.js";import"../../../icon/gator/templates/filters.js";import"../../../icon/gator/templates/flags/flag-ad-andorra.js";import"../../../icon/gator/templates/flags/flag-ae-united-arab-emirates.js";import"../../../icon/gator/templates/flags/flag-af-afghanistan.js";import"../../../icon/gator/templates/flags/flag-ag-antigua-and-barbuda.js";import"../../../icon/gator/templates/flags/flag-ai-anguilla.js";import"../../../icon/gator/templates/flags/flag-al-albania.js";import"../../../icon/gator/templates/flags/flag-am-armenia.js";import"../../../icon/gator/templates/flags/flag-ao-angola.js";import"../../../icon/gator/templates/flags/flag-aq-antarctica.js";import"../../../icon/gator/templates/flags/flag-ar-argentina.js";import"../../../icon/gator/templates/flags/flag-as-american-smoa.js";import"../../../icon/gator/templates/flags/flag-at-austria.js";import"../../../icon/gator/templates/flags/flag-au-australia.js";import"../../../icon/gator/templates/flags/flag-aw-aruba.js";import"../../../icon/gator/templates/flags/flag-ax-aland-islands.js";import"../../../icon/gator/templates/flags/flag-az-azerbaijan.js";import"../../../icon/gator/templates/flags/flag-ba-bosnia-and-herzegovina.js";import"../../../icon/gator/templates/flags/flag-bb-barbados.js";import"../../../icon/gator/templates/flags/flag-bd-bangladesh.js";import"../../../icon/gator/templates/flags/flag-be-belgium.js";import"../../../icon/gator/templates/flags/flag-bf-burkina-faso.js";import"../../../icon/gator/templates/flags/flag-bg-bulgaria.js";import"../../../icon/gator/templates/flags/flag-bh-bahrain.js";import"../../../icon/gator/templates/flags/flag-bi-burundi.js";import"../../../icon/gator/templates/flags/flag-bj-benin.js";import"../../../icon/gator/templates/flags/flag-bl-saint-barthelemy.js";import"../../../icon/gator/templates/flags/flag-bm-bermuda.js";import"../../../icon/gator/templates/flags/flag-bn-brunei-darussalam.js";import"../../../icon/gator/templates/flags/flag-bo-bolivia.js";import"../../../icon/gator/templates/flags/flag-bq-bo-bonaire.js";import"../../../icon/gator/templates/flags/flag-bq-sa-sba.js";import"../../../icon/gator/templates/flags/flag-bq-se-snt-eustatius.js";import"../../../icon/gator/templates/flags/flag-br-brazil.js";import"../../../icon/gator/templates/flags/flag-bs-bahamas.js";import"../../../icon/gator/templates/flags/flag-bt-bhutan.js";import"../../../icon/gator/templates/flags/flag-bv-bouvet-island.js";import"../../../icon/gator/templates/flags/flag-bw-botswana.js";import"../../../icon/gator/templates/flags/flag-by-belarus.js";import"../../../icon/gator/templates/flags/flag-bz-belize.js";import"../../../icon/gator/templates/flags/flag-ca-canada.js";import"../../../icon/gator/templates/flags/flag-cc-cocos-keeling-islands.js";import"../../../icon/gator/templates/flags/flag-cd-democratic-republic-of-the-congo.js";import"../../../icon/gator/templates/flags/flag-cf-central-african-republic.js";import"../../../icon/gator/templates/flags/flag-cg-republic-of-the-congo.js";import"../../../icon/gator/templates/flags/flag-ch-switzerland.js";import"../../../icon/gator/templates/flags/flag-ci-côte-divoire-ivory-coast.js";import"../../../icon/gator/templates/flags/flag-ck-cook-islands.js";import"../../../icon/gator/templates/flags/flag-cl-chile.js";import"../../../icon/gator/templates/flags/flag-cm-cameroon.js";import"../../../icon/gator/templates/flags/flag-cn-china.js";import"../../../icon/gator/templates/flags/flag-co-colombia.js";import"../../../icon/gator/templates/flags/flag-cr-costa-rica.js";import"../../../icon/gator/templates/flags/flag-cu-cuba.js";import"../../../icon/gator/templates/flags/flag-cv-cabo-verde.js";import"../../../icon/gator/templates/flags/flag-cw-curaçao.js";import"../../../icon/gator/templates/flags/flag-cx-christmas-island.js";import"../../../icon/gator/templates/flags/flag-cy-cyprus.js";import"../../../icon/gator/templates/flags/flag-cz-czech-republic.js";import"../../../icon/gator/templates/flags/flag-de-germany.js";import"../../../icon/gator/templates/flags/flag-dj-djibouti.js";import"../../../icon/gator/templates/flags/flag-dk-denmark.js";import"../../../icon/gator/templates/flags/flag-dm-dominica.js";import"../../../icon/gator/templates/flags/flag-do-dominican-republic.js";import"../../../icon/gator/templates/flags/flag-dz-algeria.js";import"../../../icon/gator/templates/flags/flag-ec-ecuador.js";import"../../../icon/gator/templates/flags/flag-ee-estonia.js";import"../../../icon/gator/templates/flags/flag-eg-egypt.js";import"../../../icon/gator/templates/flags/flag-eh-western-sahara.js";import"../../../icon/gator/templates/flags/flag-er-eritrea.js";import"../../../icon/gator/templates/flags/flag-es-sain.js";import"../../../icon/gator/templates/flags/flag-et-ethiopia.js";import"../../../icon/gator/templates/flags/flag-fi-finland.js";import"../../../icon/gator/templates/flags/flag-fj-fiji.js";import"../../../icon/gator/templates/flags/flag-fk-falkland-islands.js";import"../../../icon/gator/templates/flags/flag-fm-federated-states-of-micronesia.js";import"../../../icon/gator/templates/flags/flag-fo-faroe-islands.js";import"../../../icon/gator/templates/flags/flag-fr-france.js";import"../../../icon/gator/templates/flags/flag-ga-gabon.js";import"../../../icon/gator/templates/flags/flag-gb-eng-england.js";import"../../../icon/gator/templates/flags/flag-gb-nir-northern-ireland.js";import"../../../icon/gator/templates/flags/flag-gb-sct-sotland.js";import"../../../icon/gator/templates/flags/flag-gb-ukm-united-kingdom.js";import"../../../icon/gator/templates/flags/flag-gb-wls-wales.js";import"../../../icon/gator/templates/flags/flag-gd-grenada.js";import"../../../icon/gator/templates/flags/flag-ge-georgia.js";import"../../../icon/gator/templates/flags/flag-gf-french-guiana.js";import"../../../icon/gator/templates/flags/flag-gg-guernsey.js";import"../../../icon/gator/templates/flags/flag-gh-ghana.js";import"../../../icon/gator/templates/flags/flag-gi-gibraltar.js";import"../../../icon/gator/templates/flags/flag-gl-greenland.js";import"../../../icon/gator/templates/flags/flag-gm-gambia.js";import"../../../icon/gator/templates/flags/flag-gn-guinea.js";import"../../../icon/gator/templates/flags/flag-gp-guadeloupe-2.js";import"../../../icon/gator/templates/flags/flag-gp-guadeloupe.js";import"../../../icon/gator/templates/flags/flag-gq-equatorial-guinea.js";import"../../../icon/gator/templates/flags/flag-gr-greece.js";import"../../../icon/gator/templates/flags/flag-gs-s-georgia-and-s-sandwich-islands.js";import"../../../icon/gator/templates/flags/flag-gt-guatemala.js";import"../../../icon/gator/templates/flags/flag-gu-guam.js";import"../../../icon/gator/templates/flags/flag-gw-guinea-bissau.js";import"../../../icon/gator/templates/flags/flag-gy-guyana.js";import"../../../icon/gator/templates/flags/flag-hk-hong-kong.js";import"../../../icon/gator/templates/flags/flag-hm-heard-and-mcdonald-islands.js";import"../../../icon/gator/templates/flags/flag-hn-honduras.js";import"../../../icon/gator/templates/flags/flag-hr-croatia-hrvatska.js";import"../../../icon/gator/templates/flags/flag-ht-haiti.js";import"../../../icon/gator/templates/flags/flag-hu-hungary.js";import"../../../icon/gator/templates/flags/flag-id-indonesia.js";import"../../../icon/gator/templates/flags/flag-ie-ireland.js";import"../../../icon/gator/templates/flags/flag-il-isreal.js";import"../../../icon/gator/templates/flags/flag-im-isle-of-man.js";import"../../../icon/gator/templates/flags/flag-in-india.js";import"../../../icon/gator/templates/flags/flag-io-british-indian-ocean-territory.js";import"../../../icon/gator/templates/flags/flag-iq-iraq.js";import"../../../icon/gator/templates/flags/flag-ir-iran.js";import"../../../icon/gator/templates/flags/flag-is-iceland.js";import"../../../icon/gator/templates/flags/flag-it-italy.js";import"../../../icon/gator/templates/flags/flag-je-jersey.js";import"../../../icon/gator/templates/flags/flag-jm-jamaica.js";import"../../../icon/gator/templates/flags/flag-jo-jordan.js";import"../../../icon/gator/templates/flags/flag-jp-japan.js";import"../../../icon/gator/templates/flags/flag-ke-kenia.js";import"../../../icon/gator/templates/flags/flag-kg-kyrgyzstan.js";import"../../../icon/gator/templates/flags/flag-kh-cambodia.js";import"../../../icon/gator/templates/flags/flag-ki--kiribati.js";import"../../../icon/gator/templates/flags/flag-km-comoros.js";import"../../../icon/gator/templates/flags/flag-kn-saint-kitts-and-nevis.js";import"../../../icon/gator/templates/flags/flag-kp-korea-north.js";import"../../../icon/gator/templates/flags/flag-kr-korea-south.js";import"../../../icon/gator/templates/flags/flag-kw-kuwait.js";import"../../../icon/gator/templates/flags/flag-ky-cayman-islands.js";import"../../../icon/gator/templates/flags/flag-kz-kazakhstan.js";import"../../../icon/gator/templates/flags/flag-la-laos.js";import"../../../icon/gator/templates/flags/flag-lb-lebanon.js";import"../../../icon/gator/templates/flags/flag-lc-saint-lucia.js";import"../../../icon/gator/templates/flags/flag-li-liechtenstein.js";import"../../../icon/gator/templates/flags/flag-lk-sri-lanka.js";import"../../../icon/gator/templates/flags/flag-lr-liberia.js";import"../../../icon/gator/templates/flags/flag-ls-lesotho.js";import"../../../icon/gator/templates/flags/flag-lt-lithuania.js";import"../../../icon/gator/templates/flags/flag-lu-luxembourg.js";import"../../../icon/gator/templates/flags/flag-lv-latvia.js";import"../../../icon/gator/templates/flags/flag-ly-libya.js";import"../../../icon/gator/templates/flags/flag-ma-morocco.js";import"../../../icon/gator/templates/flags/flag-mc-monaco.js";import"../../../icon/gator/templates/flags/flag-md-moldova.js";import"../../../icon/gator/templates/flags/flag-me-montenegro.js";import"../../../icon/gator/templates/flags/flag-mf-saint-martin.js";import"../../../icon/gator/templates/flags/flag-mg-madagascar.js";import"../../../icon/gator/templates/flags/flag-mh-marshall-islands.js";import"../../../icon/gator/templates/flags/flag-mk-north-macedonia.js";import"../../../icon/gator/templates/flags/flag-ml-mali.js";import"../../../icon/gator/templates/flags/flag-mm-myanmar.js";import"../../../icon/gator/templates/flags/flag-mn-mongolia.js";import"../../../icon/gator/templates/flags/flag-mo-macao.js";import"../../../icon/gator/templates/flags/flag-mp-northern-mariana-islands.js";import"../../../icon/gator/templates/flags/flag-mq-martinique-2.js";import"../../../icon/gator/templates/flags/flag-mq-martinique.js";import"../../../icon/gator/templates/flags/flag-mr-mauritania.js";import"../../../icon/gator/templates/flags/flag-ms-montserrat.js";import"../../../icon/gator/templates/flags/flag-mt-malta.js";import"../../../icon/gator/templates/flags/flag-mu-mauritius.js";import"../../../icon/gator/templates/flags/flag-mv-maldives.js";import"../../../icon/gator/templates/flags/flag-mw-malawi.js";import"../../../icon/gator/templates/flags/flag-mx-mexico.js";import"../../../icon/gator/templates/flags/flag-my-malaysia.js";import"../../../icon/gator/templates/flags/flag-mz-mozambique.js";import"../../../icon/gator/templates/flags/flag-na-namibia.js";import"../../../icon/gator/templates/flags/flag-nc-new-caledonia.js";import"../../../icon/gator/templates/flags/flag-ne-niger.js";import"../../../icon/gator/templates/flags/flag-nf-norfolk-island.js";import"../../../icon/gator/templates/flags/flag-ng-nigeria.js";import"../../../icon/gator/templates/flags/flag-ni-nicaragua.js";import"../../../icon/gator/templates/flags/flag-nl-netherlands.js";import"../../../icon/gator/templates/flags/flag-no-norway.js";import"../../../icon/gator/templates/flags/flag-np-nepal.js";import"../../../icon/gator/templates/flags/flag-nr-nauru.js";import"../../../icon/gator/templates/flags/flag-nu-niue.js";import"../../../icon/gator/templates/flags/flag-nz-new-zealand-aotearoa.js";import"../../../icon/gator/templates/flags/flag-om-oman.js";import"../../../icon/gator/templates/flags/flag-pa-panama.js";import"../../../icon/gator/templates/flags/flag-pe-peru.js";import"../../../icon/gator/templates/flags/flag-pf-french-polynesia.js";import"../../../icon/gator/templates/flags/flag-pg-papua-new-guinea.js";import"../../../icon/gator/templates/flags/flag-ph-philippines.js";import"../../../icon/gator/templates/flags/flag-pk-pakistan.js";import"../../../icon/gator/templates/flags/flag-pl-poland.js";import"../../../icon/gator/templates/flags/flag-pm-saint-pierre-and-miquelon.js";import"../../../icon/gator/templates/flags/flag-pm-st-pierre-and-miquelon.js";import"../../../icon/gator/templates/flags/flag-pn-pitcairn-islands.js";import"../../../icon/gator/templates/flags/flag-pr-puerto-rico.js";import"../../../icon/gator/templates/flags/flag-ps-palestinian-territory.js";import"../../../icon/gator/templates/flags/flag-pt-portugal.js";import"../../../icon/gator/templates/flags/flag-pw-palau.js";import"../../../icon/gator/templates/flags/flag-py-paraguay.js";import"../../../icon/gator/templates/flags/flag-qa-qatar.js";import"../../../icon/gator/templates/flags/flag-re-reunion.js";import"../../../icon/gator/templates/flags/flag-ro-romania.js";import"../../../icon/gator/templates/flags/flag-rs-srbia.js";import"../../../icon/gator/templates/flags/flag-ru-russian-federation.js";import"../../../icon/gator/templates/flags/flag-rw-rwanda.js";import"../../../icon/gator/templates/flags/flag-sa-sudi-arabia.js";import"../../../icon/gator/templates/flags/flag-sb-slomon-islands.js";import"../../../icon/gator/templates/flags/flag-sc-sychelles.js";import"../../../icon/gator/templates/flags/flag-sd-sdan.js";import"../../../icon/gator/templates/flags/flag-se-seden.js";import"../../../icon/gator/templates/flags/flag-sg-sngapore.js";import"../../../icon/gator/templates/flags/flag-sh-sint-helena.js";import"../../../icon/gator/templates/flags/flag-si-sovenia.js";import"../../../icon/gator/templates/flags/flag-sj-salbard-and-jan-mayen.js";import"../../../icon/gator/templates/flags/flag-sk-sovakia.js";import"../../../icon/gator/templates/flags/flag-sl-serra-leone.js";import"../../../icon/gator/templates/flags/flag-sm-sn-marino.js";import"../../../icon/gator/templates/flags/flag-sn-snegal.js";import"../../../icon/gator/templates/flags/flag-so-smalia.js";import"../../../icon/gator/templates/flags/flag-sr-sriname.js";import"../../../icon/gator/templates/flags/flag-ss-south-sudan.js";import"../../../icon/gator/templates/flags/flag-st-so-tome-and-principe.js";import"../../../icon/gator/templates/flags/flag-sv-el-slvador.js";import"../../../icon/gator/templates/flags/flag-sx-snt-maarten.js";import"../../../icon/gator/templates/flags/flag-sy-sria.js";import"../../../icon/gator/templates/flags/flag-sz-saziland.js";import"../../../icon/gator/templates/flags/flag-tc-turks-and-caicos-islands.js";import"../../../icon/gator/templates/flags/flag-td-chad.js";import"../../../icon/gator/templates/flags/flag-tf-french-southern-and-antarctic-lands.js";import"../../../icon/gator/templates/flags/flag-tg-togo.js";import"../../../icon/gator/templates/flags/flag-th-thailand.js";import"../../../icon/gator/templates/flags/flag-tj-tajikistan.js";import"../../../icon/gator/templates/flags/flag-tk-tokelau.js";import"../../../icon/gator/templates/flags/flag-tl-timor-leste.js";import"../../../icon/gator/templates/flags/flag-tm-turkmenistan.js";import"../../../icon/gator/templates/flags/flag-tn-tunisia.js";import"../../../icon/gator/templates/flags/flag-to-tonga.js";import"../../../icon/gator/templates/flags/flag-tr-turkey.js";import"../../../icon/gator/templates/flags/flag-tt-trinidad-and-tobago.js";import"../../../icon/gator/templates/flags/flag-tv-tuvalu.js";import"../../../icon/gator/templates/flags/flag-tw-taiwan.js";import"../../../icon/gator/templates/flags/flag-tz-tanzania.js";import"../../../icon/gator/templates/flags/flag-ua-ukraine.js";import"../../../icon/gator/templates/flags/flag-ug-uganda.js";import"../../../icon/gator/templates/flags/flag-um-united-states-minor-outlying-islands.js";import"../../../icon/gator/templates/flags/flag-us-united-states.js";import"../../../icon/gator/templates/flags/flag-uy-uruguay.js";import"../../../icon/gator/templates/flags/flag-uz-uzbekistan.js";import"../../../icon/gator/templates/flags/flag-va-vatican-city-state.js";import"../../../icon/gator/templates/flags/flag-vc-saint-vincent-and-the-grenadines.js";import"../../../icon/gator/templates/flags/flag-ve-venezuela.js";import"../../../icon/gator/templates/flags/flag-vg-virgin-islands-british.js";import"../../../icon/gator/templates/flags/flag-vi-virgin-islands-us.js";import"../../../icon/gator/templates/flags/flag-vn-vietnam.js";import"../../../icon/gator/templates/flags/flag-vu-vanuatu.js";import"../../../icon/gator/templates/flags/flag-wf-wallis-and-futuna.js";import"../../../icon/gator/templates/flags/flag-ws-smoa.js";import"../../../icon/gator/templates/flags/flag-ye-yemen.js";import"../../../icon/gator/templates/flags/flag-yt-unf-mayotte.js";import"../../../icon/gator/templates/flags/flag-za-south-africa.js";import"../../../icon/gator/templates/flags/flag-zm-zambia.js";import"../../../icon/gator/templates/flags/flag-zw-zimbabwe.js";import"../../../icon/gator/templates/flame.js";import"../../../icon/gator/templates/flash-off.js";import"../../../icon/gator/templates/flash-on.js";import"../../../icon/gator/templates/folder.js";import"../../../icon/gator/templates/gauge.js";import"../../../icon/gator/templates/grid-four.js";import"../../../icon/gator/templates/grid-nine.js";import"../../../icon/gator/templates/hammer.js";import"../../../icon/gator/templates/hand-pointing.js";import"../../../icon/gator/templates/heart.js";import"../../../icon/gator/templates/home-door.js";import"../../../icon/gator/templates/home-finance-arrow.js";import"../../../icon/gator/templates/home-finance.js";import"../../../icon/gator/templates/home-search.js";import"../../../icon/gator/templates/house-simple.js";import"../../../icon/gator/templates/house.js";import"../../../icon/gator/templates/inbox.js";import"../../../icon/gator/templates/info.js";import"../../../icon/gator/templates/instagram-logo.js";import"../../../icon/gator/templates/interest-rate.js";import"../../../icon/gator/templates/invoice.js";import"../../../icon/gator/templates/kanban.js";import"../../../icon/gator/templates/label.js";import"../../../icon/gator/templates/laptop.js";import"../../../icon/gator/templates/layout.js";import"../../../icon/gator/templates/lightbulb-filament.js";import"../../../icon/gator/templates/lightbulb.js";import"../../../icon/gator/templates/link.js";import"../../../icon/gator/templates/linkedin-logo.js";import"../../../icon/gator/templates/list-star.js";import"../../../icon/gator/templates/list.js";import"../../../icon/gator/templates/loading-spinner-gif.js";import"../../../icon/gator/templates/loading.js";import"../../../icon/gator/templates/lock.js";import"../../../icon/gator/templates/magic-wand.js";import"../../../icon/gator/templates/mail-open.js";import"../../../icon/gator/templates/mail.js";import"../../../icon/gator/templates/mailbox.js";import"../../../icon/gator/templates/map.js";import"../../../icon/gator/templates/menu-hamburger.js";import"../../../icon/gator/templates/microsoft-excel-logo.js";import"../../../icon/gator/templates/microsoft-outlook-logo.js";import"../../../icon/gator/templates/microsoft-powerpoint-logo.js";import"../../../icon/gator/templates/microsoft-teams-logo.js";import"../../../icon/gator/templates/microsoft-word-logo.js";import"../../../icon/gator/templates/minus-circle.js";import"../../../icon/gator/templates/minus-square.js";import"../../../icon/gator/templates/minus.js";import"../../../icon/gator/templates/mobile-phone-2.js";import"../../../icon/gator/templates/monitor.js";import"../../../icon/gator/templates/move-doc.js";import"../../../icon/gator/templates/move.js";import"../../../icon/gator/templates/music.js";import"../../../icon/gator/templates/number-1.js";import"../../../icon/gator/templates/number-2.js";import"../../../icon/gator/templates/number-3.js";import"../../../icon/gator/templates/overflow-menu.js";import"../../../icon/gator/templates/paper-airplane.js";import"../../../icon/gator/templates/paperclip.js";import"../../../icon/gator/templates/payments/payment-amazon-pay.js";import"../../../icon/gator/templates/payments/payment-amex.js";import"../../../icon/gator/templates/payments/payment-apple-pay.js";import"../../../icon/gator/templates/payments/payment-discover.js";import"../../../icon/gator/templates/payments/payment-google-pay.js";import"../../../icon/gator/templates/payments/payment-mastercard.js";import"../../../icon/gator/templates/payments/payment-visa.js";import"../../../icon/gator/templates/pen.js";import"../../../icon/gator/templates/pencil-paper.js";import"../../../icon/gator/templates/pencil.js";import"../../../icon/gator/templates/people-multiple.js";import"../../../icon/gator/templates/people-share.js";import"../../../icon/gator/templates/percent.js";import"../../../icon/gator/templates/person-add.js";import"../../../icon/gator/templates/person-check.js";import"../../../icon/gator/templates/person-lock.js";import"../../../icon/gator/templates/person.js";import"../../../icon/gator/templates/phone-alert.js";import"../../../icon/gator/templates/phone-mobile.js";import"../../../icon/gator/templates/phone.js";import"../../../icon/gator/templates/picture.js";import"../../../icon/gator/templates/pin.js";import"../../../icon/gator/templates/pinterest-logo.js";import"../../../icon/gator/templates/plus-circle.js";import"../../../icon/gator/templates/plus.js";import"../../../icon/gator/templates/printer.js";import"../../../icon/gator/templates/question-chat-bubble.js";import"../../../icon/gator/templates/question-circle.js";import"../../../icon/gator/templates/question-mark.js";import"../../../icon/gator/templates/radio-selected.js";import"../../../icon/gator/templates/radio.js";import"../../../icon/gator/templates/receipt.js";import"../../../icon/gator/templates/restricted.js";import"../../../icon/gator/templates/sandals.js";import"../../../icon/gator/templates/save.js";import"../../../icon/gator/templates/screen.js";import"../../../icon/gator/templates/search.js";import"../../../icon/gator/templates/selection.js";import"../../../icon/gator/templates/send.js";import"../../../icon/gator/templates/settings.js";import"../../../icon/gator/templates/share-1.js";import"../../../icon/gator/templates/share-2.js";import"../../../icon/gator/templates/shield-lock.js";import"../../../icon/gator/templates/shield-warning.js";import"../../../icon/gator/templates/sidebar-simple.js";import"../../../icon/gator/templates/sidebar.js";import"../../../icon/gator/templates/smart-home.js";import"../../../icon/gator/templates/sort-arrow-solid-down.js";import"../../../icon/gator/templates/sort-arrow-solid-left.js";import"../../../icon/gator/templates/sort-arrow-solid-right.js";import"../../../icon/gator/templates/sort-arrow-solid-up-down.js";import"../../../icon/gator/templates/sort-arrow-solid-up.js";import"../../../icon/gator/templates/sort-reverse-variant.js";import"../../../icon/gator/templates/sort-variant.js";import"../../../icon/gator/templates/sparkle-filled.js";import"../../../icon/gator/templates/sparkle.js";import"../../../icon/gator/templates/speech-bubble.js";import"../../../icon/gator/templates/square-split-horizontal.js";import"../../../icon/gator/templates/square-split-vertical.js";import"../../../icon/gator/templates/square.js";import"../../../icon/gator/templates/stack.js";import"../../../icon/gator/templates/stamp.js";import"../../../icon/gator/templates/star-four-filled.js";import"../../../icon/gator/templates/star-four.js";import"../../../icon/gator/templates/star.js";import"../../../icon/gator/templates/stopwatch.js";import"../../../icon/gator/templates/sun.js";import"../../../icon/gator/templates/sync.js";import"../../../icon/gator/templates/tab-arrows.js";import"../../../icon/gator/templates/table.js";import"../../../icon/gator/templates/target.js";import"../../../icon/gator/templates/text-aa.js";import"../../../icon/gator/templates/thumbs-down.js";import"../../../icon/gator/templates/thumbs-up.js";import"../../../icon/gator/templates/tools.js";import"../../../icon/gator/templates/touch-id.js";import"../../../icon/gator/templates/trash.js";import"../../../icon/gator/templates/trend-up.js";import"../../../icon/gator/templates/twitter-logo.js";import"../../../icon/gator/templates/unlink.js";import"../../../icon/gator/templates/unlock.js";import"../../../icon/gator/templates/upload.js";import"../../../icon/gator/templates/video.js";import"../../../icon/gator/templates/waffle.js";import"../../../icon/gator/templates/warning-circle.js";import"../../../icon/gator/templates/warning-diamond.js";import"../../../icon/gator/templates/warning-octagon.js";import"../../../icon/gator/templates/warning.js";import"../../../icon/gator/templates/wet-sign.js";import"../../../icon/gator/templates/wifi-off.js";import"../../../icon/gator/templates/wifi.js";import"../../../icon/gator/templates/x-logo.js";import"../../../icon/gator/templates/yelp-logo.js";import"../../../icon/gator/templates/youtube-logo.js";import"../../../icon/gator/templates/zillow-logo.js";import{customElement as f}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{state as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import{createRef as d,ref as c}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{NgcInputBase as y}from"../../base/input-base.gator.js";import{ifDefined as l}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/if-defined.js";import{live as v}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/live.js";import{classMap as $}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js";var b=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(t,o,p,n)=>{for(var m=n>1?void 0:n?g(o,p):o,u=t.length-1,h;u>=0;u--)(h=t[u])&&(m=(n?h(o,p,m):h(m))||m);return n&&m&&b(o,p,m),m};let i=class extends y{constructor(){super(...arguments),this.inputRef=d(),this.controlRef=d(),this.for="",this._inputMode="text"}render(){return a`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as l}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"../input-label/input-label.gator.js";import"../help-text/help-text.gator.js";import{customElement as f}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import{createRef as c,ref as v}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{NgcInputBase as y}from"../../base/input-base.gator.js";import{ifDefined as u}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/if-defined.js";import{live as m}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/live.js";import{classMap as $}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js";var b=Object.defineProperty,g=Object.getOwnPropertyDescriptor,i=(t,a,s,p)=>{for(var r=p>1?void 0:p?g(a,s):a,h=t.length-1,d;h>=0;h--)(d=t[h])&&(r=(p?d(a,s,r):d(r))||r);return p&&r&&b(a,s,r),r};let e=class extends y{constructor(){super(...arguments),this.inputRef=c(),this.controlRef=c(),this.for="",this._inputMode="text"}render(){return l`
2
2
  <div class="gator-form-element">
3
3
  <slot name="label">
4
4
  ${this.label&&!this.iconAsLabel?this.labelMarkup:null}
5
5
  </slot>
6
- <div ${c(this.controlRef)} class="${$(this.controlClasses)}">
6
+ <div ${v(this.controlRef)} class="${$(this.controlClasses)}">
7
7
  <div class="gator-input-container">
8
- ${this.shouldHaveStartMarkup?a`
8
+ ${this.shouldHaveStartMarkup?l`
9
9
  <div class="gator-input-start">
10
10
  ${this.startIconMarkup||this._startIconAsText}
11
11
  </div>`:null}
12
12
  <input
13
- ${c(this.inputRef)}
13
+ ${v(this.inputRef)}
14
14
  type="${this.type}"
15
15
  id="${this.id}-input"
16
- data-testid=${l(this.dataTestid)}-input
17
- .placeholder="${v(this._placeholder)}"
16
+ data-testid=${u(this.dataTestid)}-input
17
+ .placeholder="${m(this._placeholder)}"
18
18
  .required="${this.required}"
19
19
  .disabled="${this.disabled}"
20
20
  ?readonly="${this.readonly}"
@@ -23,13 +23,13 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
23
23
  aria-required="${this.required}"
24
24
  aria-labelledby="${this.ariaLabelledbyValue}"
25
25
  aria-describedby="${this.ariaDescribedby}"
26
- .value="${v(this._value)}"
27
- maxlength="${l(this._maxLength)}"
26
+ .value="${m(this._value)}"
27
+ maxlength="${u(this._maxLength)}"
28
28
  .min="${this.min}"
29
29
  .max="${this.max}"
30
- .step="${l(this.step)}"
30
+ .step="${u(this.step)}"
31
31
  inputmode="${this._inputMode}"
32
- .pattern="${l(this.pattern)}"
32
+ .pattern="${u(this.pattern)}"
33
33
  @input="${this.handleInputEvent}"
34
34
  @change="${this.handleChange}"
35
35
  @click="${this.handleClick}"
@@ -41,7 +41,7 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
41
41
  @wheel="${this.handleWheel}"
42
42
  />
43
43
  <slot name="end-slot">
44
- ${this.shouldHaveEndMarkup?a`
44
+ ${this.shouldHaveEndMarkup?l`
45
45
  <div class="gator-input-end">
46
46
  ${this.passwordVisibilityMarkup}
47
47
  ${this.endIconMarkup}
@@ -52,7 +52,7 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
52
52
 
53
53
  ${this.bottomText}
54
54
  </div>
55
- `}updated(t){t.has("value")&&(this._value=this.value),t.has("placeholder")&&(this._placeholder=this.placeholder),t.has("ariaLabelledByElements")&&this.ariaLabelledByElements&&(this.inputRef.value.ariaLabelledByElements=this.ariaLabelledByElements)}get displayedErrorText(){return this.errorText||this._internalValidationError||this._nativeInputError}get isAriaInvalid(){return this.displayedErrorText?"true":"false"}get passwordVisibilityMarkup(){return this.endIconMarkup||this.type!=="password"?null:a`<ngc-icon name="eye-crossed" @click="${this.togglePasswordVisibility}"></ngc-icon>`}connectedCallback(){super.connectedCallback(),this._value=this.value,this._maxLength=this.maxLength,this._placeholder=this.placeholder}handleNativeInputValidation(t){this.inputRef.value&&(this._nativeInputError=this.inputRef.value.validationMessage),t.preventDefault()}handleWheel(){if(this.type=="number"){this.inputRef.value?.blur();return}}handleInputEvent(t){t.preventDefault(),t.stopPropagation();const o=t.target,p=new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:o.value}});this._value=o.value,this.dispatchEvent(p)}handleChange(t){t.preventDefault(),t.stopPropagation();const o=t.target,p=new CustomEvent("change",{composed:!0,bubbles:!0,detail:{value:o.value}});this._value=o.value,this.dispatchEvent(p)}togglePasswordVisibility(){const t=this.inputRef.value;t&&(t.type=t.type==="password"?"text":"password")}handleInputFocusOut(){super.handleInputFocusOut(),this.inputRef.value?.checkValidity()&&!this.readonly&&(this._nativeInputError="")}get errorTextMarkup(){return this.displayedErrorText?a`
55
+ `}updated(t){t.has("value")&&(this._value=this.value),t.has("placeholder")&&(this._placeholder=this.placeholder),t.has("ariaLabelledByElements")&&this.ariaLabelledByElements&&(this.inputRef.value.ariaLabelledByElements=this.ariaLabelledByElements)}get displayedErrorText(){return this.errorText||this._internalValidationError||this._nativeInputError}get isAriaInvalid(){return this.displayedErrorText?"true":"false"}get passwordVisibilityMarkup(){return this.endIconMarkup||this.type!=="password"?null:l`<ngc-icon name="eye-crossed" @click="${this.togglePasswordVisibility}"></ngc-icon>`}connectedCallback(){super.connectedCallback(),this._value=this.value,this._maxLength=this.maxLength,this._placeholder=this.placeholder}handleNativeInputValidation(t){this.inputRef.value&&(this._nativeInputError=this.inputRef.value.validationMessage),t.preventDefault()}handleWheel(){if(this.type=="number"){this.inputRef.value?.blur();return}}handleInputEvent(t){t.preventDefault(),t.stopPropagation();const a=t.target,s=new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:a.value}});this._value=a.value,this.dispatchEvent(s)}handleChange(t){t.preventDefault(),t.stopPropagation();const a=t.target,s=new CustomEvent("change",{composed:!0,bubbles:!0,detail:{value:a.value}});this._value=a.value,this.dispatchEvent(s)}togglePasswordVisibility(){const t=this.inputRef.value;t&&(t.type=t.type==="password"?"text":"password")}handleInputFocusOut(){super.handleInputFocusOut(),this.inputRef.value?.checkValidity()&&!this.readonly&&(this._nativeInputError="")}get errorTextMarkup(){return this.displayedErrorText?l`
56
56
  <ngc-help-text
57
57
  icon
58
58
  error
@@ -61,4 +61,4 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
61
61
  >
62
62
  ${this.displayedErrorText}
63
63
  </ngc-help-text>
64
- `:null}};i.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0};r([s()],i.prototype,"for",2);r([s({type:Number})],i.prototype,"min",2);r([s({type:Number})],i.prototype,"max",2);r([s({type:Number})],i.prototype,"step",2);r([s({type:String})],i.prototype,"pattern",2);r([e()],i.prototype,"_value",2);r([e()],i.prototype,"_inputMode",2);r([e()],i.prototype,"_placeholder",2);r([e()],i.prototype,"_maxLength",2);r([e()],i.prototype,"_errorText",2);r([e()],i.prototype,"_internalValidationError",2);r([e()],i.prototype,"_nativeInputError",2);i=r([f("ngc-input-text")],i);export{i as NgcInputText};
64
+ `:null}};e.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0};i([o()],e.prototype,"for",2);i([o({type:Number})],e.prototype,"min",2);i([o({type:Number})],e.prototype,"max",2);i([o({type:Number})],e.prototype,"step",2);i([o({type:String})],e.prototype,"pattern",2);i([n()],e.prototype,"_value",2);i([n()],e.prototype,"_inputMode",2);i([n()],e.prototype,"_placeholder",2);i([n()],e.prototype,"_maxLength",2);i([n()],e.prototype,"_errorText",2);i([n()],e.prototype,"_internalValidationError",2);i([n()],e.prototype,"_nativeInputError",2);e=i([f("ngc-input-text")],e);export{e as NgcInputText};
@@ -1,22 +1,28 @@
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 T=Object.defineProperty,$=Object.getOwnPropertyDescriptor,i=(e,a,l,o)=>{for(var r=o>1?void 0:o?$(a,l):a,n=e.length-1,p;n>=0;n--)(p=e[n])&&(r=(o?p(a,l,r):p(r))||r);return o&&r&&T(a,l,r),r};let t=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(e){super.updated(e),e.has("hasError")&&this.inputRef.value&&this.inputRef.value.setCustomValidity(this.hasError?"true":""),e.has("selected")&&this.inputRef.value&&(this.inputRef.value.checked=this.selected)}render(){return h`
2
- <div id="${this.elementId}-radio" class="gator-radio">
3
- <div class="gator-radio-input-wrapper">
4
- <div class="gator-radio-hover-overlay"></div>
5
- <input
6
- ${E(this.inputRef)}
7
- id="${this.elementId}"
8
- class="gator-radio-input"
9
- type="radio"
10
- ?checked="${this.selected}"
11
- ?disabled="${this.disabled}"
12
- tabindex=${this.tabindex}
13
- aria-labelledby="${this.elementId}-radio"
14
- @change="${this.handleChange}"
15
- />
16
- </div>
17
- <label class="gator-radio-title">
18
- ${this.titleText}
19
- <slot></slot>
20
- </label>
21
- </div>
22
- `}get elementId(){return c(this.id,this._randomId)}get tabindex(){let e=this.radioTabindex;return this.selected&&(e=0),this.disabled&&(e=-1),e}handleChange(){this.selected=!this.selected,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:this.value}))}click(){this.disabled||this.inputRef.value?.click()}focus(){this.disabled||this.inputRef.value?.focus()}};t.shadowRootOptions={...u.shadowRootOptions,delegatesFocus:!0,mode:"open"};t.styles=[d(y),d(g),d(b),d(v)];i([s({type:String})],t.prototype,"id",2);i([s({type:String,attribute:"title-text"})],t.prototype,"titleText",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:Boolean,attribute:"has-error"})],t.prototype,"hasError",2);i([s({type:Number,attribute:"radio-tabindex"})],t.prototype,"radioTabindex",2);t=i([m("ngc-radio")],t);export{t as NgcRadio};
1
+ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as p,nothing as h}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{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 d}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{generateRandomId as f,getElementId as m}from"../../utils/string-utils.js";import b from"../../packages/web-components/src/components/radio/radio.gator.tokens.scss.js";import v from"../../packages/web-components/src/components/radio/radio.gator.scss.js";import{createRef as g,ref as x}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{NgcInputText as y}from"../input/gator/input-text/input-text.gator.js";import{unsafeCSS as u}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var T=Object.defineProperty,$=Object.getOwnPropertyDescriptor,R=Object.getPrototypeOf,_=Reflect.get,a=(e,r,s,o)=>{for(var i=o>1?void 0:o?$(r,s):r,l=e.length-1,n;l>=0;l--)(n=e[l])&&(i=(o?n(r,s,i):n(i))||i);return o&&i&&T(r,s,i),i},I=(e,r,s)=>_(R(e),s,r);let t=class extends y{constructor(){super(...arguments),this.titleText="",this.selected=!1,this.radioTabindex=-1,this.grouped=!1,this.inputRef=g(),this._randomId=f()}updated(e){super.updated(e),e.has("errorText")&&this.inputRef.value&&this.inputRef.value.setCustomValidity(this.errorText?"true":""),e.has("selected")&&this.inputRef.value&&(this.inputRef.value.checked=this.selected)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.click)}render(){return p`
2
+ <div class="gator-form-element">
3
+ <div id="${this.elementId}-radio" class="gator-radio">
4
+ <div class="gator-radio-input-wrapper">
5
+ <div class="gator-radio-hover-overlay"></div>
6
+ <input
7
+ ${x(this.inputRef)}
8
+ id="${this.elementId}"
9
+ class="gator-radio-input"
10
+ type="radio"
11
+ ?checked="${this.selected}"
12
+ ?disabled="${this.disabled}"
13
+ tabindex=${this.tabindex}
14
+ aria-labelledby="${this.elementId}-radio"
15
+ @change="${this.handleChange}"
16
+ />
17
+ </div>
18
+ <label class="gator-radio-title">
19
+ ${this.titleText}
20
+ <slot></slot>
21
+ </label>
22
+ </div>
23
+ ${this.bottomText}
24
+ </div>
25
+ `}get bottomText(){return this.grouped?h:p`
26
+ ${this.errorTextMarkup}
27
+ ${this.helpTextMarkup}
28
+ `}get elementId(){return m(this.id,this._randomId)}get tabindex(){let e=this.radioTabindex;return this.selected&&(e=0),this.disabled&&(e=-1),e}handleChange(){this.selected=!this.selected,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:this.value}))}click(){this.disabled||this.inputRef.value?.click()}focus(){this.disabled||this.inputRef.value?.focus()}};t.styles=[...I(t,t,"styles"),u(b),u(v)];a([d({type:String,attribute:"title-text"})],t.prototype,"titleText",2);a([d({type:Boolean})],t.prototype,"selected",2);a([d({type:Number,attribute:"radio-tabindex"})],t.prototype,"radioTabindex",2);a([d({type:Boolean,attribute:"grouped"})],t.prototype,"grouped",2);t=a([c("ngc-radio")],t);export{t as NgcRadio};