@ncino/web-components 5.0.0-preview.8 → 5.0.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.
@@ -1 +1 @@
1
- import{property as t}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{TestableLitElement as d}from"../../utils/components/testable-lit-element/testable-lit-element.js";var n=Object.defineProperty,r=(p,i,l,y)=>{for(var e=void 0,s=p.length-1,a;s>=0;s--)(a=p[s])&&(e=a(i,l,e)||e);return e&&n(i,l,e),e};class o extends d{constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.type=null,this.size=null,this.hideBorder=!1}}r([t({type:Boolean})],o.prototype,"disabled");r([t({type:Boolean})],o.prototype,"readonly");r([t()],o.prototype,"type");r([t()],o.prototype,"size");r([t({type:Boolean,attribute:"hide-border"})],o.prototype,"hideBorder");export{o as NjcChip};
1
+ import{property as t}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{TestableLitElement as n}from"../../utils/components/testable-lit-element/testable-lit-element.js";var d=Object.defineProperty,e=(s,p,a,y)=>{for(var o=void 0,i=s.length-1,l;i>=0;i--)(l=s[i])&&(o=l(p,a,o)||o);return o&&d(p,a,o),o};class r extends n{constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.type=null,this.size=null,this.hideBorder=!1,this.startIcon="",this.dismissible=!1}}e([t({type:Boolean})],r.prototype,"disabled");e([t({type:Boolean})],r.prototype,"readonly");e([t()],r.prototype,"type");e([t()],r.prototype,"size");e([t({type:Boolean,attribute:"hide-border"})],r.prototype,"hideBorder");e([t({type:String,attribute:"start-icon"})],r.prototype,"startIcon");e([t({type:Boolean,attribute:"dismissible"})],r.prototype,"dismissible");export{r as NjcChip};
@@ -1,17 +1,27 @@
1
- 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"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as n}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import m from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import u from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import g from"../../../packages/web-components/src/components/chip/gator/chip.gator.scss.js";import{NjcChip as c}from"../chip.js";import{classMap as h}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js";import{unsafeCSS as r}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var b=Object.getOwnPropertyDescriptor,f=(t,o,d,a)=>{for(var s=a>1?void 0:a?b(o,d):o,i=t.length-1,l;i>=0;i--)(l=t[i])&&(s=l(s)||s);return s};let e=class extends c{render(){return this.readonly?this.readonlyChipMarkup:this.chipMarkup}get chipMarkup(){return p`
1
+ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as r,html as i}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 b from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import u from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import g from"../../../packages/web-components/src/components/chip/gator/chip.gator.scss.js";import{NjcChip as d}from"../chip.js";import{classMap as h}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js";import{unsafeCSS as l}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var v=Object.getOwnPropertyDescriptor,f=(s,o,p,n)=>{for(var t=n>1?void 0:n?v(o,p):o,a=s.length-1,c;a>=0;a--)(c=s[a])&&(t=c(t)||t);return t};let e=class extends d{render(){return this.readonly||this.dismissible?this.readonlyChipMarkup:this.chipMarkup}get chipMarkup(){return i`
2
2
  <button
3
3
  class=${h(this.classes)}
4
4
  ?disabled="${this.disabled}"
5
5
  @click=${this.handleClick}
6
6
  >
7
- <slot></slot>
7
+ ${this.startIcon?i`<ngc-icon name="${this.startIcon}" size="x-small"></ngc-icon>`:r}
8
+ <div class="chip-label"><slot></slot></div>
8
9
  </button>
9
- `}get readonlyChipMarkup(){return p`
10
+ `}get readonlyChipMarkup(){return i`
10
11
  <div
11
12
  class="gator-chip__read-only ${h(this.classes)}"
12
13
  aria-disabled="${this.disabled}"
13
14
  @click=${this.handleClick}
14
15
  >
15
- <slot></slot>
16
+ ${this.startIcon?i`<ngc-icon name="${this.startIcon}" size="x-small"></ngc-icon>`:r}
17
+ <div class="chip-label"><slot></slot></div>
18
+ ${this.dismissible?i`
19
+ <ngc-icon-button
20
+ icon-name="exit-circle"
21
+ size="small"
22
+ @click=${this.handleDismiss}
23
+ ?disabled="${this.disabled}"
24
+ .ariaLabel="Remove ${this.textContent?.trim()}"
25
+ ></ngc-icon-button>`:r}
16
26
  </div>
17
- `}handleClick(t){t.stopPropagation(),t.preventDefault(),!(this.disabled||this.readonly)&&this.dispatchEvent(new Event("click",{bubbles:!0}))}get classes(){return{"gator-chip":!0,"gator-chip_small":this.size==="small","gator-chip_disabled":this.disabled,"hide-border":this.hideBorder,[`gator-chip_${this.type}`]:this.type!==null}}};e.shadowRootOptions={...c.shadowRootOptions,delegatesFocus:!0};e.styles=[r(g),r(m),r(u)];e=f([n("ngc-chip")],e);export{e as NgcChip};
27
+ `}handleClick(s){s.stopPropagation(),s.preventDefault(),!(this.disabled||this.readonly||this.dismissible)&&this.dispatchEvent(new Event("click",{bubbles:!0}))}handleDismiss(s){s.stopPropagation(),s.preventDefault(),!this.disabled&&this.dispatchEvent(new Event("dismiss",{bubbles:!0}))}get classes(){return{"gator-chip":!0,"gator-chip_small":this.size==="small","gator-chip_disabled":this.disabled,"hide-border":this.hideBorder,[`gator-chip_${this.type}`]:this.type!==null}}};e.shadowRootOptions={...d.shadowRootOptions,delegatesFocus:!0};e.styles=[l(g),l(b),l(u)];e=f([m("ngc-chip")],e);export{e as NgcChip};
@@ -0,0 +1,16 @@
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as m,html as b}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 u}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as c}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{NgcComponent as f}from"../../../../utils/components/ngc-component.js";import d from"../../../../packages/web-components/src/components/table/gator/table-bulk-controls/table-bulk-controls.gator.scss.js";import{msg as p}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import"../../../checkbox/checkbox.gator.js";import{unsafeCSS as h}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,g=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,_=Reflect.get,r=(l,o,s,a)=>{for(var t=a>1?void 0:a?g(o,s):o,i=l.length-1,n;i>=0;i--)(n=l[i])&&(t=(a?n(o,s,t):n(t))||t);return a&&t&&v(o,s,t),t},S=(l,o,s)=>_(y(l),s,o);let e=class extends f{constructor(){super(...arguments),this.visible=!1,this.selectedRows=0,this.totalRows=0,this.allSelected=!1}handleSelectAllChange(l){this.dispatchEvent(new CustomEvent("selectall",{bubbles:!0,detail:{selected:l.detail.selected}}))}render(){return this.visible?b`
2
+ <div class="gator-table-bulk-controls" aria-live="polite">
3
+ <div class="gator-table-bulk-controls-selection">
4
+ <ngc-checkbox
5
+ title-text="${p("Select All")}"
6
+ hide-label
7
+ ?selected="${this.allSelected}"
8
+ @change="${this.handleSelectAllChange}"
9
+ ></ngc-checkbox>
10
+ <span class="gator-table-bulk-controls-count">${this.selectedRows} ${p("selected")}</span>
11
+ </div>
12
+ <div class="gator-table-bulk-controls-actions">
13
+ <slot></slot>
14
+ </div>
15
+ </div>
16
+ `:m}focus(){}};e.styles=[...S(e,e,"styles"),h(d)];r([c({type:Boolean,reflect:!0})],e.prototype,"visible",2);r([c({type:Number})],e.prototype,"selectedRows",2);r([c({type:Number})],e.prototype,"totalRows",2);r([c({type:Boolean,reflect:!0})],e.prototype,"allSelected",2);e=r([u("ngc-table-bulk-controls")],e);export{e as NgcTableBulkControls};
@@ -1,9 +1,18 @@
1
- import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as f,html as r}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 b}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import w from"../../../packages/web-components/src/components/table/table.tokens.scss.js";import T from"../../../packages/web-components/src/components/table/gator/table.gator.scss.js";import P from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import y from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{NjcTable as C}from"../table.js";import"../../checkbox/checkbox.gator.js";import{unsafeHTML as R}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/unsafe-html.js";import{msg as x}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{unsafeCSS as g}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var B=Object.defineProperty,v=Object.getOwnPropertyDescriptor,p=(t,e,l,s)=>{for(var a=s>1?void 0:s?v(e,l):e,i=t.length-1,d;i>=0;i--)(d=t[i])&&(a=(s?d(e,l,a):d(a))||a);return s&&a&&B(e,l,a),a};let c=class extends C{constructor(){super(...arguments),this.elevated=!1,this.includePagination=!1,this.selectedRows=[],this._currentPage=1}render(){return this.columns?this.renderWrapper(this.getTableHeader(this.columns),this.getTableBody(this.columns,this.displayedRowData)):null}get tableElevatedClass(){return this.elevated?"gator-table-elevated":""}renderWrapper(t,e){return r`
1
+ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as w,html as o}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 $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as f}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as g}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import T from"../../../packages/web-components/src/components/table/table.tokens.scss.js";import R from"../../../packages/web-components/src/components/table/gator/table.gator.scss.js";import y from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import k from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{NjcTable as C}from"../table.js";import"../../checkbox/checkbox.gator.js";import"./table-bulk-controls/table-bulk-controls.gator.js";import{unsafeHTML as P}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/unsafe-html.js";import{msg as b}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{KEY_CONSTANTS as S}from"../../../consts/key-constants.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,L=Object.getOwnPropertyDescriptor,c=(e,t,l,s)=>{for(var a=s>1?void 0:s?L(t,l):t,r=e.length-1,i;r>=0;r--)(i=e[r])&&(a=(s?i(t,l,a):i(a))||a);return s&&a&&v(t,l,a),a};let d=class extends C{constructor(){super(...arguments),this.elevated=!1,this.includePagination=!1,this.selectedRows=[],this._currentPage=1,this.justSelectedRow=null,this.showJumpLink=!1,this.handleKeyDown=e=>{e.key===S.TAB&&(e.shiftKey&&(this.showJumpLink=!0,this.requestUpdate()),document.removeEventListener("keydown",this.handleKeyDown,!0))}}updated(e){super.updated(e),e.has("data")&&(this.selectedRows=this.data.filter(t=>t.selected&&!t.isTableHeader))}render(){return this.columns?this.renderWrapper(this.getTableHeader(this.columns),this.getTableBody(this.columns,this.displayedRowData)):null}get tableElevatedClass(){return this.elevated?"gator-table-elevated":""}get showBulkControls(){return this.selectable&&this.selectedRows.length>0}renderWrapper(e,t){return o`
2
+ <ngc-table-bulk-controls
3
+ ?visible="${this.showBulkControls}"
4
+ .selectedRows="${this.selectedRows.length}"
5
+ .totalRows="${this.data.length}"
6
+ ?allSelected="${this.selectedRows.length===this.data.length}"
7
+ @selectall="${this.handleSelectAll}"
8
+ >
9
+ <slot name="bulk-controls"></slot>
10
+ </ngc-table-bulk-controls>
2
11
  <table class="gator-table ${this.tableElevatedClass}" role="grid"
3
12
  aria-labelledby="${this.tableAriaLabelledBy}">
4
- ${t} ${e}
13
+ ${e} ${t}
5
14
  </table>
6
- ${this.includePagination?r`
15
+ ${this.includePagination?o`
7
16
  <ngc-table-pagination
8
17
  items-per-page="${this.itemsPerPage}"
9
18
  total-items="${this.data.length}"
@@ -11,31 +20,31 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
11
20
  @pagechanged="${this.handlePageChanged}"
12
21
  @itemsperpagechanged="${this.handleItemsPerPageChanged}"
13
22
  ></ngc-table-pagination>
14
- `:f}
15
- `}handlePageChanged(t){this._currentPage=t.detail.page}handleItemsPerPageChanged(t){this.itemsPerPage=t.detail.itemsPerPage}getTableHeader(t){const e=t.map(this.getTableHeaderColumn);return this.selectable&&e.unshift(r`
23
+ `:w}
24
+ `}handlePageChanged(e){this._currentPage=e.detail.page}handleItemsPerPageChanged(e){this.itemsPerPage=e.detail.itemsPerPage}handleJumpLinkClick(e){const t=this.shadowRoot?.querySelector("ngc-table-bulk-controls");t&&t.focus()}handleJumpLinkBlur(){this.showJumpLink=!1,this.requestUpdate()}handleRowSelectCheckboxBlur(){setTimeout(()=>{const e=this.shadowRoot?.activeElement;(!e||!e.classList.contains("gator-table-jump-link"))&&(this.showJumpLink=!1,document.removeEventListener("keydown",this.handleKeyDown,!0),this.requestUpdate())},0)}getTableHeader(e){const t=e.map(this.getTableHeaderColumn);return this.selectable&&t.unshift(o`
16
25
  <th id="col-select" scope="col">
17
26
  <ngc-checkbox
18
- title-text="${x("Select All")}"
27
+ title-text="${b("Select All")}"
19
28
  hide-label
20
29
  ?selected="${this.selectedRows.length===this.data.length}"
21
30
  @change="${l=>this.handleSelectAll(l)}"
22
31
  ></ngc-checkbox>
23
- </th>`),r`
32
+ </th>`),o`
24
33
  <thead role="rowgroup">
25
- <tr role="row">
26
- ${e}
27
- </tr>
34
+ <tr role="row">
35
+ ${t}
36
+ </tr>
28
37
  </thead>
29
- `}handleSelectAll(t){t.detail.selected?(this.selectedRows=[...this.data],this.data.forEach(e=>{e.selected=t.detail.selected})):(this.selectedRows=[],this.data.forEach(e=>{e.selected=!1})),this.dispatchEvent(new CustomEvent("selectall",{bubbles:!0,detail:{selectedRows:this.selectedRows}})),this.requestUpdate()}getTableHeaderColumn(t){const e=`col-${t.field}`;return r`
30
- <th id="${e}" scope="col">${t.name}</th>`}getTableBody(t,e){const l=[];let s={rows:[]};return e.forEach(a=>{a.isTableHeader?((s.rows.length>0||s.header)&&l.push(s),s={header:a,rows:[]}):s.rows.push(a)}),(s.rows.length>0||s.header)&&l.push(s),l.length===0&&e.length>0&&l.push({rows:e}),r`
31
- ${l.map(a=>this.getCategoryBody(a,t))}
32
- `}getCategoryBody(t,e){let l="",s="",a="";t.header&&(l=t.header.headerText||t.header.categoryText||t.header.name||"Category",a=`category-${l.toLowerCase().replace(/\s+/g,"-")}`,s=a);const i=t.header?this.getTableHeaderRow(e,t.header):"",d=t.rows.map(n=>this.getTableBodyRow(n,e,a)),u=e.some(n=>n.includedInTotals===!0),o=t.rows.length>0&&u?this.getTotalRow(t.rows,e,a):"";return r`
33
- <tbody role="rowgroup" ${s?r`aria-labelledby="${s}"`:""}>
38
+ `}handleSelectAll(e){const t=e.detail.selected;t?(this.data.forEach(l=>{l.isTableHeader||(l.selected=!0)}),this.selectedRows=this.data.filter(l=>!l.isTableHeader)):(this.data.forEach(l=>{l.selected=!1}),this.selectedRows=[]),this.dispatchEvent(new CustomEvent("selectall",{bubbles:!0,detail:{selectedRows:this.selectedRows,selected:t}})),this.requestUpdate()}getTableHeaderColumn(e){const t=`col-${e.field}`;return o`
39
+ <th id="${t}" scope="col">${e.name}</th>`}getTableBody(e,t){const l=[];let s={rows:[]};return t.forEach(a=>{a.isTableHeader?((s.rows.length>0||s.header)&&l.push(s),s={header:a,rows:[]}):s.rows.push(a)}),(s.rows.length>0||s.header)&&l.push(s),l.length===0&&t.length>0&&l.push({rows:t}),o`
40
+ ${l.map(a=>this.getCategoryBody(a,e))}
41
+ `}getCategoryBody(e,t){let l="",s="",a="";e.header&&(l=e.header.headerText||e.header.categoryText||e.header.name||"Category",a=`category-${l.toLowerCase().replace(/\s+/g,"-")}`,s=a);const r=e.header?this.getTableHeaderRow(t,e.header):"",i=e.rows.map(h=>this.getTableBodyRow(h,t,a)),m=t.some(h=>h.includedInTotals===!0),n=e.rows.length>0&&m?this.getTotalRow(e.rows,t,a):"";return o`
42
+ <tbody role="rowgroup" ${s?o`aria-labelledby="${s}"`:""}>
43
+ ${r}
34
44
  ${i}
35
- ${d}
36
- ${o}
45
+ ${n}
37
46
  </tbody>
38
- `}getTotalRow(t,e,l){const s={};e.forEach(o=>{s[o.field]=0,o.includedInTotals&&t.forEach(n=>{const h=this.parseNumericValue(n[o.field]);h!==null&&(s[o.field]+=h)})});const a=l?`${l}-total`:"total-row",i=r`
47
+ `}getTotalRow(e,t,l){const s={};t.forEach(n=>{s[n.field]=0,n.includedInTotals&&e.forEach(h=>{const u=this.parseNumericValue(h[n.field]);u!==null&&(s[n.field]+=u)})});const a=l?`${l}-total`:"total-row",r=o`
39
48
  <th
40
49
  id="${a}"
41
50
  scope="row"
@@ -43,45 +52,55 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
43
52
  >
44
53
  Total
45
54
  </th>
46
- `,d=e.map(o=>{const n=`col-${o.field}`,h=[a,l,n].filter(Boolean).join(" ");return o.includedInTotals?r`
55
+ `,i=t.map(n=>{const h=`col-${n.field}`,u=[a,l,h].filter(Boolean).join(" ");return n.includedInTotals?o`
47
56
  <td
48
57
  role="gridcell"
49
- headers="${h}"
58
+ headers="${u}"
50
59
  class="gator-table-total-cell"
51
60
  >
52
- ${this.formatTotal(s[o.field],o)}
61
+ ${this.formatTotal(s[n.field],n)}
53
62
  </td>
54
- `:r`
63
+ `:o`
55
64
  <td
56
65
  role="gridcell"
57
66
  class="gator-table-total-cell"
58
67
  >
59
68
  &nbsp;
60
69
  </td>
61
- `}),u=this.selectable?[i,...d]:[i,...d.slice(1)];return r`
70
+ `}),m=this.selectable?[r,...i]:[r,...i.slice(1)];return o`
62
71
  <tr role="row" class="gator-table-total-row">
63
- ${u}
72
+ ${m}
64
73
  </tr>
65
- `}parseNumericValue(t){if(typeof t=="number")return t;if(typeof t=="string"){const e=t.replace(/[^0-9.-]/g,""),l=parseFloat(e);if(!isNaN(l))return l}return null}formatTotal(t,e){const l=typeof e.decimalPlaces=="number"?e.decimalPlaces:2,s=t.toFixed(l);return typeof e.cellRenderer=="function"?e.cellRenderer({[e.field]:s}):s}getTableBodyRow(t,e,l){const s=e.map(a=>this.getTableBodyCell(t,a,l));if(this.selectable){const a=l?`col-select ${l}`:"col-select";s.unshift(r`
74
+ `}parseNumericValue(e){if(typeof e=="number")return e;if(typeof e=="string"){const t=e.replace(/[^0-9.-]/g,""),l=parseFloat(t);if(!isNaN(l))return l}return null}formatTotal(e,t){const l=typeof t.decimalPlaces=="number"?t.decimalPlaces:2,s=e.toFixed(l);return typeof t.cellRenderer=="function"?t.cellRenderer({[t.field]:s}):s}getTableBodyRow(e,t,l){const s=t.map(a=>this.getTableBodyCell(e,a,l));if(this.selectable){const a=l?`col-select ${l}`:"col-select",r=this.showJumpLink&&this.justSelectedRow===e;s.unshift(o`
66
75
  <td role="gridcell" class="gator-table-checkbox-column" headers="${a}">
67
- <ngc-checkbox
68
- label="test"
69
- ?selected="${t.selected}"
70
- @change="${i=>this.handleTableBodyRowSelected(i,t)}"
71
- ></ngc-checkbox>
72
- </td>`)}return r`
73
- <tr role="row" class="${this.selectable&&t.selected?"gator-table-row-selected":""}">
76
+ ${r?o`
77
+ <ngc-button
78
+ variant="base"
79
+ class="gator-table-jump-link"
80
+ @click="${this.handleJumpLinkClick}"
81
+ @blur="${this.handleJumpLinkBlur}"
82
+ >
83
+ ${b("Jump to bulk actions")}
84
+ </ngc-button>`:o`<ngc-checkbox
85
+ label="test"
86
+ ?selected="${e.selected}"
87
+ @change="${i=>this.handleTableBodyRowSelected(i,e)}"
88
+ id="checkbox-${e.id||Math.random().toString(36).substring(2,11)}"
89
+ @blur="${this.handleRowSelectCheckboxBlur}"
90
+ ></ngc-checkbox>`}
91
+ </td>`),r&&setTimeout(()=>{this.shadowRoot?.querySelector(".gator-table-jump-link")?.focus()},0)}return o`
92
+ <tr role="row" class="${this.selectable&&e.selected?"gator-table-row-selected":""}">
74
93
  ${s}
75
94
  </tr>
76
- `}getTableHeaderRow(t,e){const l=this.selectable?t.length+1:t.length,s=e.headerText||e.categoryText||e.name||"Category";return r`
95
+ `}getTableHeaderRow(e,t){const l=this.selectable?e.length+1:e.length,s=t.headerText||t.categoryText||t.name||"Category";return o`
77
96
  <tr role="row" class="gator-table-category-header">
78
97
  <th role="rowheader" colspan="${l}" scope="rowgroup" class="gator-table-header-cell"
79
98
  id="${`category-${s.toLowerCase().replace(/\s+/g,"-")}`}">
80
99
  ${s}
81
100
  </th>
82
101
  </tr>
83
- `}handleTableBodyRowSelected(t,e){t.detail.selected?(e.selected=!0,this.selectedRows.push(e)):(e.selected=!1,this.selectedRows=this.selectedRows.filter(l=>l!==e)),this.dispatchEvent(new CustomEvent("rowselected",{bubbles:!0,detail:{data:e,selectedRows:this.selectedRows}})),this.requestUpdate()}get displayedRowData(){if(!this.includePagination)return this.data;const t=(this._currentPage-1)*this.itemsPerPage,e=t+this.itemsPerPage;return this.data.slice(t,e)}getTableBodyCell(t,e,l){const s=`col-${e.field}`,a=l?`${s} ${l}`:s;return r`
102
+ `}handleTableBodyRowSelected(e,t){e.detail.selected?(t.selected=!0,this.selectedRows.push(t),this.justSelectedRow=t,this.showJumpLink=!1,document.addEventListener("keydown",this.handleKeyDown,!0)):(t.selected=!1,this.selectedRows=this.selectedRows.filter(l=>l!==t),this.justSelectedRow===t&&(this.justSelectedRow=null,this.showJumpLink=!1)),this.dispatchEvent(new CustomEvent("rowselected",{bubbles:!0,detail:{data:t,selectedRows:this.selectedRows}})),this.requestUpdate()}get displayedRowData(){if(!this.includePagination)return this.data;const e=(this._currentPage-1)*this.itemsPerPage,t=e+this.itemsPerPage;return this.data.slice(e,t)}getTableBodyCell(e,t,l){const s=`col-${t.field}`,a=l?`${s} ${l}`:s;return o`
84
103
  <td role="gridcell" headers="${a}">
85
- ${R(this.getValueForCell(t,e))}
104
+ ${P(this.getValueForCell(e,t))}
86
105
  </td>
87
- `}getValueForCell(t,e){return typeof e.cellRenderer=="function"?e.cellRenderer(t):t[e.field]}};c.styles=[g(y),g(P),g(w),g(T)];p([b({type:Boolean})],c.prototype,"elevated",2);p([b({type:Boolean,attribute:"include-pagination"})],c.prototype,"includePagination",2);p([$()],c.prototype,"_currentPage",2);c=p([m("ngc-table")],c);export{c as NgcTable};
106
+ `}getValueForCell(e,t){return typeof t.cellRenderer=="function"?t.cellRenderer(e):e[t.field]}};d.styles=[p(k),p(y),p(T),p(R)];c([f({type:Boolean})],d.prototype,"elevated",2);c([f({type:Boolean,attribute:"include-pagination"})],d.prototype,"includePagination",2);c([g()],d.prototype,"selectedRows",2);c([g()],d.prototype,"_currentPage",2);c([g()],d.prototype,"justSelectedRow",2);c([g()],d.prototype,"showJumpLink",2);d=c([$("ngc-table")],d);export{d as NgcTable};
@@ -1 +1 @@
1
- const t=":host{max-width:var(--ngc-button-card-width, 21rem)}ngc-card{--ngc-card-display: var(--ngc-button-card-display, flex);--ngc-card-max-width: var(--ngc-button-card-width, 21rem);--ngc-card-padding: var(--spacing-4);cursor:pointer}ngc-card:hover{--ngc-card-box-shadow: 0px 9px 15px rgba(31, 31, 31, .08), 0px 10px 20px rgba(31, 31, 31, .08), 0px 9px 20px rgba(31, 31, 31, .08)}ngc-card:active{--ngc-card-background-color: var(--ngc-button-card-pressed-background-color, var(--color-blue-10, #F3F5F7));--ngc-card-outline: 1px solid var(--ngc-button-card-pressed-outline-color, var(--color-blue-30, #11395B))}ngc-card.selected{--ngc-card-outline: var(--size-stroke-1, 1px) solid var(--ngc-button-card-selected-outline-color, var(--color-stroke-brand, #11395B))}ngc-card[disabled]:hover,ngc-card[disabled]:active,ngc-card[disabled].selected{--ngc-card-box-shadow: unset;--ngc-card-background-color: unset;--ngc-card-outline: unset;--ngc-card-border: unset;cursor:not-allowed}ngc-card:focus-visible{outline:none;--ngc-card-outline: 2px solid var(--ngc-button-card-focused-outline-color, var(--color-blue-30, #11395B))}ngc-chip{--ngc-chip-font-size: .8125rem;--ngc-chip-line-height: 1.125rem;--ngc-chip-padding: var(--spacing-2) var(--spacing-3)}ngc-text-detail{width:100%;--ngc-text-detail-title-color: var(--color-neutral-70);--ngc-text-detail-title-font-size: 1.0625rem;--ngc-text-detail-title-font-weight: 700;--ngc-text-detail-title-line-height: 1.5rem;--ngc-text-detail-subtitle-color: var(--color-neutral-50);--ngc-text-detail-subtitle-line-height: 1.375rem;--ngc-text-detail-subtitle-font-size: .9375rem}.gator-button-card-chip-label{position:absolute;top:0;left:var(--spacing-4);transform:translateY(-50%);--ngc-chip-cursor: pointer}.gator-button-card-container{display:inline-flex;flex-direction:row;justify-content:space-between;align-items:center}.gator-button-card_disabled ngc-text-detail{--ngc-text-detail-title-color: var(--text-color-disabled, #6D6D6D);--ngc-text-detail-subtitle-color: var(--text-color-disabled, #6D6D6D)}";export{t as default};
1
+ const t=":host{max-width:var(--ngc-button-card-width, 21rem)}ngc-card{--ngc-card-display: var(--ngc-button-card-display, flex);--ngc-card-max-width: var(--ngc-button-card-width, 21rem);--ngc-card-padding: var(--spacing-4);cursor:pointer}ngc-card:hover{--ngc-card-box-shadow: 0px 9px 15px rgba(31, 31, 31, .08), 0px 10px 20px rgba(31, 31, 31, .08), 0px 9px 20px rgba(31, 31, 31, .08)}ngc-card:active{--ngc-card-background-color: var(--ngc-button-card-pressed-background-color, var(--color-blue-10, #F3F5F7));--ngc-card-outline: 1px solid var(--ngc-button-card-pressed-outline-color, var(--color-blue-30, #11395B))}ngc-card.selected{--ngc-card-outline: var(--size-stroke-1, 1px) solid var(--ngc-button-card-selected-outline-color, var(--color-stroke-brand, #11395B))}ngc-card[disabled]:hover,ngc-card[disabled]:active,ngc-card[disabled].selected{--ngc-card-box-shadow: unset;--ngc-card-background-color: unset;--ngc-card-outline: unset;--ngc-card-border: unset;cursor:not-allowed}ngc-card:focus-visible{outline:none;--ngc-card-outline: 2px solid var(--ngc-button-card-focused-outline-color, var(--color-blue-30, #11395B))}ngc-chip{--ngc-chip-font-size: .8125rem;--ngc-chip-line-height: 1.125rem}ngc-text-detail{width:100%;--ngc-text-detail-title-color: var(--color-neutral-70);--ngc-text-detail-title-font-size: 1.0625rem;--ngc-text-detail-title-font-weight: 700;--ngc-text-detail-title-line-height: 1.5rem;--ngc-text-detail-subtitle-color: var(--color-neutral-50);--ngc-text-detail-subtitle-line-height: 1.375rem;--ngc-text-detail-subtitle-font-size: .9375rem}.gator-button-card-chip-label{position:absolute;top:0;left:var(--spacing-4);transform:translateY(-50%);--ngc-chip-cursor: pointer}.gator-button-card-container{display:inline-flex;flex-direction:row;justify-content:space-between;align-items:center}.gator-button-card_disabled ngc-text-detail{--ngc-text-detail-title-color: var(--text-color-disabled, #6D6D6D);--ngc-text-detail-subtitle-color: var(--text-color-disabled, #6D6D6D)}";export{t as default};
@@ -1 +1 @@
1
- const r='.gator-chip{background-color:var(--ngc-chip-background-color, var(--color-background-primary));border-radius:var(--ngc-chip-border-radius, 3rem);display:inline-block;padding:var(--ngc-chip-padding, .25rem .75rem);font-family:var(--text-family-body, "Open Sans"),sans-serif;font-size:var(--ngc-chip-font-size, .9375rem);line-height:var(--ngc-chip-line-height);border:var(--ngc-chip-border, 1px solid var(--color-stroke-tertiary, #E5E5E5));color:var(--color-neutral-70);cursor:var(--ngc-chip-cursor, default)}.gator-chip.hide-border{border:1px solid transparent}button:hover{background-color:var(--ngc-chip-hover-background-color, var(--color-neutral-20));cursor:var(--ngc-chip-cursor, pointer)}button:focus-visible{outline:none;box-shadow:var(--ngc-chip-focus-box-shadow, var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-2, 2px) var(--color-focus-gap, #FFF), var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-4, 4px) var(--color-focus-border, #11395B))}button:active{background-color:var(--ngc-chip-active-background-color)}.gator-chip_disabled{cursor:not-allowed!important;color:var(--button-color-default-text-disabled, #6D6D6D);outline:1px solid transparent!important;background:var(--color-surface-disabled, #E5E5E5);border:1px solid transparent!important}.gator-chip_disabled:hover{background:var(--color-surface-disabled, #E5E5E5)!important}.gator-chip__read-only{cursor:var(--ngc-chip-cursor, default !important)}.gator-chip__read-only:active{background-color:var(--ngc-chip-background-color, var(--color-background-primary))}.gator-chip_error:not(.gator-chip_disabled){background:var(--color-surface-error, #FAEBE7);border:1px solid var(--color-stroke-error-weak, #E99F88)}.gator-chip_error:not(.gator-chip_disabled):hover:not(.gator-chip__read-only){background:var(--color-stroke-error-weak, #E99F88)}.gator-chip_error:not(.gator-chip_disabled).hide-border{border:1px solid transparent}.gator-chip_warning:not(.gator-chip_disabled){background:var(--color-surface-error, #FAEBE7);border:1px solid var(--color-stroke-warning, #F5B77F)}.gator-chip_warning:not(.gator-chip_disabled):hover:not(.gator-chip__read-only){background:var(--color-stroke-warning, #F5B77F)}.gator-chip_warning:not(.gator-chip_disabled).hide-border{border:1px solid transparent}.gator-chip_success:not(.gator-chip_disabled){background:var(--color-surface-success, #E9F7F0);border:1px solid var(--color-stroke-success, #90D4B4)}.gator-chip_success:not(.gator-chip_disabled):hover:not(.gator-chip__read-only){background:var(--color-stroke-success, #90D4B4)}.gator-chip_success:not(.gator-chip_disabled).hide-border{border:1px solid transparent}.gator-chip_info:not(.gator-chip_disabled){border:1px solid var(--color-surface-brand-secondary, #C3CDD6);background:var(--color-surface-brand, #F3F5F7)}.gator-chip_info:not(.gator-chip_disabled):hover:not(.gator-chip__read-only){background:var(--color-surface-brand-secondary, #C3CDD6)}.gator-chip_info:not(.gator-chip_disabled).hide-border{border:1px solid transparent}.gator-chip_small{font-size:var(--text-size-caption);line-height:var(--text-line-height-caption)}';export{r as default};
1
+ const r='.gator-chip{background-color:var(--ngc-chip-background-color, var(--color-background-primary));border-radius:var(--ngc-chip-border-radius, 3rem);font-family:var(--text-family-body, "Open Sans"),sans-serif;font-size:var(--ngc-chip-font-size, .9375rem);line-height:var(--ngc-chip-line-height);border:var(--ngc-chip-border, 1px solid var(--color-stroke-tertiary, #E5E5E5));color:var(--color-neutral-70);cursor:var(--ngc-chip-cursor, default);width:max-content;display:flex;flex-direction:row;align-items:center;padding:0 4px}.gator-chip.hide-border{border:1px solid transparent}.gator-chip:has(ngc-icon-button){padding-right:2px}.gator-chip:has(ngc-icon-button) ngc-icon-button{margin-left:-4px}.gator-chip:has(ngc-icon-button) ngc-icon{margin-left:2px}.chip-label{padding:4px}ngc-icon-button{height:24px}button:hover{background-color:var(--ngc-chip-hover-background-color, var(--color-neutral-20));cursor:var(--ngc-chip-cursor, pointer)}button:focus-visible{outline:none;box-shadow:var(--ngc-chip-focus-box-shadow, var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-2, 2px) var(--color-focus-gap, #FFF), var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-4, 4px) var(--color-focus-border, #11395B))}button:active{background-color:var(--ngc-chip-active-background-color)}.gator-chip_disabled{cursor:not-allowed!important;color:var(--button-color-default-text-disabled, #6D6D6D);outline:1px solid transparent!important;background:var(--color-surface-disabled, #E5E5E5);border:1px solid transparent!important}.gator-chip_disabled:hover{background:var(--color-surface-disabled, #E5E5E5)!important}.gator-chip__read-only{cursor:var(--ngc-chip-cursor, default !important)}.gator-chip__read-only:active{background-color:var(--ngc-chip-background-color, var(--color-background-primary))}.gator-chip_error:not(.gator-chip_disabled){background:var(--color-surface-error, #FAEBE7);border:1px solid var(--color-stroke-error-weak, #E99F88)}.gator-chip_error:not(.gator-chip_disabled):hover:not(.gator-chip__read-only){background:var(--color-stroke-error-weak, #E99F88)}.gator-chip_error:not(.gator-chip_disabled).hide-border{border:1px solid transparent}.gator-chip_warning:not(.gator-chip_disabled){background:var(--color-surface-warning, #FEF1E6);border:1px solid var(--color-stroke-warning, #F5B77F)}.gator-chip_warning:not(.gator-chip_disabled):hover:not(.gator-chip__read-only){background:var(--color-stroke-warning, #F5B77F)}.gator-chip_warning:not(.gator-chip_disabled).hide-border{border:1px solid transparent}.gator-chip_success:not(.gator-chip_disabled){background:var(--color-surface-success, #E9F7F0);border:1px solid var(--color-stroke-success, #90D4B4)}.gator-chip_success:not(.gator-chip_disabled):hover:not(.gator-chip__read-only){background:var(--color-stroke-success, #90D4B4)}.gator-chip_success:not(.gator-chip_disabled).hide-border{border:1px solid transparent}.gator-chip_info:not(.gator-chip_disabled){border:1px solid var(--color-surface-brand-secondary, #C3CDD6);background:var(--color-surface-brand, #F3F5F7)}.gator-chip_info:not(.gator-chip_disabled):hover:not(.gator-chip__read-only){background:var(--color-surface-brand-secondary, #C3CDD6)}.gator-chip_info:not(.gator-chip_disabled).hide-border{border:1px solid transparent}.gator-chip_small{font-size:var(--text-size-caption);line-height:var(--text-line-height-caption)}';export{r as default};
@@ -0,0 +1 @@
1
+ const r='.gator-table-bulk-controls{margin-bottom:1rem;display:flex;flex-direction:row;align-items:center;padding:var(--spacing-padding-margin-8, .5rem) var(--spacing-padding-margin-16, 1rem);border-radius:var(--ngc-table-bulk-controls-border-radius, 1rem);gap:1rem;background-color:var(--color-surface-brand, #F3F5F7)}.gator-table-bulk-controls-selection{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-padding-margin-8, .5rem);padding-left:.5rem}.gator-table-bulk-controls-count{font-family:var(--text-family-body),"Open Sans",sans-serif;font-size:var(--text-size-body-2, .875rem);color:var(--text-color-primary-base, #1F1F1F)}.gator-table-bulk-controls-actions{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-padding-margin-8, .5rem)}';export{r as default};
@@ -27,4 +27,14 @@ export declare class NjcChip extends TestableLitElement {
27
27
  @type {boolean}
28
28
  **/
29
29
  hideBorder: boolean;
30
+ /**
31
+ @property startIcon - The icon to display at the start of the chip.
32
+ @type {String}
33
+ **/
34
+ startIcon: string;
35
+ /**
36
+ @property dismissible - If true, the chip displays a dismiss button and emits a "dismiss" event when clicked.
37
+ @type {boolean}
38
+ **/
39
+ dismissible: boolean;
30
40
  }
@@ -14,6 +14,7 @@ export declare class NgcChip extends NjcChip {
14
14
  get chipMarkup(): import('lit').TemplateResult<1>;
15
15
  get readonlyChipMarkup(): import('lit').TemplateResult<1>;
16
16
  handleClick(event: Event): void;
17
+ handleDismiss(event: Event): void;
17
18
  get classes(): {
18
19
  [x: string]: boolean;
19
20
  'gator-chip': boolean;
@@ -0,0 +1,29 @@
1
+ import { nothing } from 'lit';
2
+ import { NgcComponent } from '../../../../utils/components/ngc-component.ts';
3
+ export declare class NgcTableBulkControls extends NgcComponent {
4
+ /**
5
+ * Whether the bulk controls should be visible
6
+ */
7
+ visible: boolean;
8
+ /**
9
+ * The number of selected rows
10
+ */
11
+ selectedRows: number;
12
+ /**
13
+ * The total number of rows
14
+ */
15
+ totalRows: number;
16
+ /**
17
+ * Whether all rows are selected
18
+ */
19
+ allSelected: boolean;
20
+ static styles: import('lit').CSSResult[];
21
+ private handleSelectAllChange;
22
+ render(): import('lit').TemplateResult<1> | typeof nothing;
23
+ focus(): void;
24
+ }
25
+ declare global {
26
+ interface HTMLElementTagNameMap {
27
+ 'ngc-table-bulk-controls': NgcTableBulkControls;
28
+ }
29
+ }
@@ -1,3 +1,4 @@
1
+ import { PropertyValues } from 'lit';
1
2
  import { NjcTable, RowData } from '../table.ts';
2
3
  export declare class NgcTable extends NjcTable {
3
4
  elevated: boolean;
@@ -5,11 +6,18 @@ export declare class NgcTable extends NjcTable {
5
6
  static styles: import('lit').CSSResult[];
6
7
  selectedRows: RowData[];
7
8
  _currentPage: number;
9
+ justSelectedRow: RowData | null;
10
+ showJumpLink: boolean;
11
+ protected updated(_changedProperties: PropertyValues): void;
8
12
  render(): import('lit').TemplateResult<1> | null;
9
13
  get tableElevatedClass(): "" | "gator-table-elevated";
14
+ get showBulkControls(): boolean;
10
15
  renderWrapper(header: unknown, body: unknown): import('lit').TemplateResult<1>;
11
16
  handlePageChanged(event: CustomEvent): void;
12
17
  handleItemsPerPageChanged(event: CustomEvent): void;
18
+ private handleJumpLinkClick;
19
+ private handleJumpLinkBlur;
20
+ private handleRowSelectCheckboxBlur;
13
21
  private getTableHeader;
14
22
  handleSelectAll(event: CustomEvent): void;
15
23
  private getTableHeaderColumn;
@@ -20,6 +28,7 @@ export declare class NgcTable extends NjcTable {
20
28
  private formatTotal;
21
29
  private getTableBodyRow;
22
30
  private getTableHeaderRow;
31
+ handleKeyDown: (e: KeyboardEvent) => void;
23
32
  handleTableBodyRowSelected(event: CustomEvent, rowData: RowData): void;
24
33
  get displayedRowData(): RowData[];
25
34
  private getTableBodyCell;
@@ -1 +1 @@
1
- import{page as s}from"../node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.10_typescript@5.8.3__playwright@1.53.2_77c47ac19cbe97978028e1e5ac862536/node_modules/@vitest/browser/context.js";import n from"../_virtual/axe.js";import{a as o}from"../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.10_@vitest_browser@3.2.4_@vitest_ui@3_8c34ee540b1f52c214debce201d1e515/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js";const d="Supercalifragilisticexpialidocious".repeat(10);async function a(e){return(await n.run(e)).violations}async function p(e){const t=await a(e);o(t,`Expected no axe core violations, but got ${t.length}`).toHaveLength(0)}function x(){return s.viewport(320,256)}function h(e){let t;if(e.scrollWidth!==0?t=e:e.shadowRoot?t=e.shadowRoot.firstElementChild:t=e.firstElementChild,t){const r=t.scrollWidth>t.clientWidth;return o(r).toBe(!1)}return o(!0).toBe(!1)}function g(e,t,r){let i=e.querySelector(":focus-visible");if(i||(i=e.shadowRoot?.querySelector(":focus-visible")),i){const l=getComputedStyle(i).getPropertyValue(t);return o(l).toContain(r)}return o(!0).toBe(!1)}export{g as expectComponentFocusStyle,h as expectComponentNotToHaveHorizontalScrollbar,p as expectNoAxeViolations,x as resizeWindowForReflowTest,a as runAxeAndGetViolations,d as superLongStringForReflowTest};
1
+ import{page as s}from"../node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.10_typescript@5.8.3__playwright@1.53.2_77c47ac19cbe97978028e1e5ac862536/node_modules/@vitest/browser/context.js";import n from"../_virtual/axe.js";import{a as o}from"../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.10_@vitest_browser@3.2.4_@vitest_ui@3_8c34ee540b1f52c214debce201d1e515/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js";const d="Supercalifragilisticexpialidocious".repeat(10);async function a(t){return(await n.run(t)).violations}async function p(t){const e=await a(t);o(e,`Expected no axe core violations, but got ${e.length}: ${JSON.stringify(e)}`).toHaveLength(0)}function x(){return s.viewport(320,256)}function h(t){let e;if(t.scrollWidth!==0?e=t:t.shadowRoot?e=t.shadowRoot.firstElementChild:e=t.firstElementChild,e){const r=e.scrollWidth>e.clientWidth;return o(r).toBe(!1)}return o(!0).toBe(!1)}function g(t,e,r){let i=t.querySelector(":focus-visible");if(i||(i=t.shadowRoot?.querySelector(":focus-visible")),i){const l=getComputedStyle(i).getPropertyValue(e);return o(l).toContain(r)}return o(!0).toBe(!1)}export{g as expectComponentFocusStyle,h as expectComponentNotToHaveHorizontalScrollbar,p as expectNoAxeViolations,x as resizeWindowForReflowTest,a as runAxeAndGetViolations,d as superLongStringForReflowTest};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/web-components",
3
3
  "author": "nCino",
4
- "version": "5.0.0-preview.8",
4
+ "version": "5.0.0",
5
5
  "license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org/"
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@ncino/web-components",
4
- "version": "5.0.0-preview.7",
4
+ "version": "5.0.0-preview.10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "ngc-chip",
116
- "description": "\n---\n\n\n### **Events:**\n - **click**\n\n### **Slots:**\n - _default_ - The content within the button",
116
+ "description": "\n---\n\n\n### **Events:**\n - **click**\n- **dismiss**\n\n### **Slots:**\n - _default_ - The content within the button",
117
117
  "doc-url": "",
118
118
  "attributes": [
119
119
  {
@@ -139,6 +139,14 @@
139
139
  "name": "hide-border",
140
140
  "value": { "type": "boolean", "default": "false" }
141
141
  },
142
+ {
143
+ "name": "start-icon",
144
+ "value": { "type": "String", "default": "''" }
145
+ },
146
+ {
147
+ "name": "dismissible",
148
+ "value": { "type": "boolean", "default": "false" }
149
+ },
142
150
  {
143
151
  "name": "data-testid",
144
152
  "value": { "type": "string | undefined", "default": "undefined" }
@@ -147,7 +155,10 @@
147
155
  "slots": [
148
156
  { "name": "", "description": "The content within the button" }
149
157
  ],
150
- "events": [{ "name": "click", "type": "Event" }],
158
+ "events": [
159
+ { "name": "click", "type": "Event" },
160
+ { "name": "dismiss", "type": "Event" }
161
+ ],
151
162
  "js": {
152
163
  "properties": [
153
164
  { "name": "chipMarkup" },
@@ -161,12 +172,17 @@
161
172
  },
162
173
  { "name": "size", "type": " | 'small'" },
163
174
  { "name": "hideBorder", "type": "boolean" },
175
+ { "name": "startIcon", "type": "String" },
176
+ { "name": "dismissible", "type": "boolean" },
164
177
  { "name": "dataTestid", "type": "string | undefined" },
165
178
  { "name": "labelDataTestid" },
166
179
  { "name": "helpTextDataTestid" },
167
180
  { "name": "errorMessageDataTestid" }
168
181
  ],
169
- "events": [{ "name": "click", "type": "Event" }]
182
+ "events": [
183
+ { "name": "click", "type": "Event" },
184
+ { "name": "dismiss", "type": "Event" }
185
+ ]
170
186
  }
171
187
  },
172
188
  {
@@ -5296,6 +5312,82 @@
5296
5312
  "events": []
5297
5313
  }
5298
5314
  },
5315
+ {
5316
+ "name": "ngc-table-bulk-controls",
5317
+ "description": "\n---\n\n\n### **Events:**\n - **selectall**\n\n### **Methods:**\n - **removeAttributesFromHost(name: _string_, oldValue: _string_, newValue: _string_)** - Removes an attribute from the host element and stores its original value in the map.\nAlso updates the corresponding `dataset` property for the attribute.\n- **restoreAttributesToHost()** - Restores all previously removed attributes to the host element.\nClears the map of removed attributes after restoration.",
5318
+ "doc-url": "",
5319
+ "attributes": [
5320
+ {
5321
+ "name": "visible",
5322
+ "description": "Whether the bulk controls should be visible",
5323
+ "value": { "type": "boolean", "default": "false" }
5324
+ },
5325
+ {
5326
+ "name": "selectedRows",
5327
+ "description": "The number of selected rows",
5328
+ "value": { "type": "number", "default": "0" }
5329
+ },
5330
+ {
5331
+ "name": "totalRows",
5332
+ "description": "The total number of rows",
5333
+ "value": { "type": "number", "default": "0" }
5334
+ },
5335
+ {
5336
+ "name": "allSelected",
5337
+ "description": "Whether all rows are selected",
5338
+ "value": { "type": "boolean", "default": "false" }
5339
+ },
5340
+ {
5341
+ "name": "delegatesARIA",
5342
+ "description": "A boolean property that determines whether ARIA-related attributes\n(e.g., `aria-label`, `aria-labelledby`, `role`, etc.) are managed\nby the host element or delegated to the component.\n\n- When `true` (default), ARIA attributes are removed from the host\n and managed internally by the component.\n- When `false`, previously removed ARIA attributes are restored\n to the host element.",
5343
+ "value": { "type": "boolean", "default": "true" }
5344
+ },
5345
+ {
5346
+ "name": "data-testid",
5347
+ "value": { "type": "string | undefined", "default": "undefined" }
5348
+ }
5349
+ ],
5350
+ "events": [{ "name": "selectall", "type": "CustomEvent" }],
5351
+ "js": {
5352
+ "properties": [
5353
+ {
5354
+ "name": "visible",
5355
+ "description": "Whether the bulk controls should be visible",
5356
+ "type": "boolean"
5357
+ },
5358
+ {
5359
+ "name": "selectedRows",
5360
+ "description": "The number of selected rows",
5361
+ "type": "number"
5362
+ },
5363
+ {
5364
+ "name": "totalRows",
5365
+ "description": "The total number of rows",
5366
+ "type": "number"
5367
+ },
5368
+ {
5369
+ "name": "allSelected",
5370
+ "description": "Whether all rows are selected",
5371
+ "type": "boolean"
5372
+ },
5373
+ {
5374
+ "name": "shouldApplyAttributeDeletion",
5375
+ "description": "Determines whether attribute deletion should be applied.\nThis is controlled by the `delegatesARIA` property.",
5376
+ "type": "boolean"
5377
+ },
5378
+ {
5379
+ "name": "delegatesARIA",
5380
+ "description": "A boolean property that determines whether ARIA-related attributes\n(e.g., `aria-label`, `aria-labelledby`, `role`, etc.) are managed\nby the host element or delegated to the component.\n\n- When `true` (default), ARIA attributes are removed from the host\n and managed internally by the component.\n- When `false`, previously removed ARIA attributes are restored\n to the host element.",
5381
+ "type": "boolean"
5382
+ },
5383
+ { "name": "dataTestid", "type": "string | undefined" },
5384
+ { "name": "labelDataTestid" },
5385
+ { "name": "helpTextDataTestid" },
5386
+ { "name": "errorMessageDataTestid" }
5387
+ ],
5388
+ "events": [{ "name": "selectall", "type": "CustomEvent" }]
5389
+ }
5390
+ },
5299
5391
  {
5300
5392
  "name": "ngc-table",
5301
5393
  "description": "\n---\n\n\n### **Events:**\n - **selectall**\n- **rowselected**",
@@ -5352,7 +5444,11 @@
5352
5444
  { "name": "includePagination", "type": "boolean" },
5353
5445
  { "name": "selectedRows", "type": "RowData[]" },
5354
5446
  { "name": "_currentPage", "type": "number" },
5447
+ { "name": "justSelectedRow", "type": "RowData | null" },
5448
+ { "name": "showJumpLink", "type": "boolean" },
5355
5449
  { "name": "tableElevatedClass" },
5450
+ { "name": "showBulkControls" },
5451
+ { "name": "handleKeyDown" },
5356
5452
  { "name": "displayedRowData" },
5357
5453
  { "name": "columns", "type": "ColumnDefinition[]" },
5358
5454
  { "name": "data", "type": "RowData[]" },